You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <be...@us...> - 2014-03-03 01:29:13
|
Revision: 12342
http://sourceforge.net/p/xoops/svn/12342
Author: beckmi
Date: 2014-03-03 01:28:59 +0000 (Mon, 03 Mar 2014)
Log Message:
-----------
Adding RSSFit release 1.22 by Hervet
Modified Paths:
--------------
XoopsModules/rssfit/trunk/rss/README.txt
XoopsModules/rssfit/trunk/rss/admin/about.php
XoopsModules/rssfit/trunk/rss/admin/admin_header.php
XoopsModules/rssfit/trunk/rss/admin/do_channel.php
XoopsModules/rssfit/trunk/rss/admin/do_intro.php
XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php
XoopsModules/rssfit/trunk/rss/admin/footer.php
XoopsModules/rssfit/trunk/rss/admin/index.php
XoopsModules/rssfit/trunk/rss/admin/menu.php
XoopsModules/rssfit/trunk/rss/class/misc.php
XoopsModules/rssfit/trunk/rss/class/plugins.php
XoopsModules/rssfit/trunk/rss/class/rssfeed.php
XoopsModules/rssfit/trunk/rss/header.php
XoopsModules/rssfit/trunk/rss/images/rss.gif
XoopsModules/rssfit/trunk/rss/images/rssfit.png
XoopsModules/rssfit/trunk/rss/include/common.php
XoopsModules/rssfit/trunk/rss/include/functions.php
XoopsModules/rssfit/trunk/rss/include/install.php
XoopsModules/rssfit/trunk/rss/index.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.news.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartfaq.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartpartner.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection2.php
XoopsModules/rssfit/trunk/rss/rss.php
XoopsModules/rssfit/trunk/rss/templates/rssfit_rss.html
XoopsModules/rssfit/trunk/rss/xoops_version.php
Added Paths:
-----------
XoopsModules/rssfit/trunk/rss/changelog.txt
XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguide.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidemanufacturers.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidenews.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.myalbum.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.pical.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.pluginsample.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfdownloads_podcast.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wflinks.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.xoopstube.php
Property Changed:
----------------
XoopsModules/rssfit/trunk/rss/README.txt
XoopsModules/rssfit/trunk/rss/admin/about.php
XoopsModules/rssfit/trunk/rss/admin/admin_header.php
XoopsModules/rssfit/trunk/rss/admin/do_channel.php
XoopsModules/rssfit/trunk/rss/admin/do_intro.php
XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php
XoopsModules/rssfit/trunk/rss/admin/footer.php
XoopsModules/rssfit/trunk/rss/admin/index.php
XoopsModules/rssfit/trunk/rss/admin/menu.php
XoopsModules/rssfit/trunk/rss/class/misc.php
XoopsModules/rssfit/trunk/rss/class/plugins.php
XoopsModules/rssfit/trunk/rss/class/rssfeed.php
XoopsModules/rssfit/trunk/rss/header.php
XoopsModules/rssfit/trunk/rss/include/common.php
XoopsModules/rssfit/trunk/rss/include/functions.php
XoopsModules/rssfit/trunk/rss/include/install.php
XoopsModules/rssfit/trunk/rss/index.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.news.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartfaq.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartpartner.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection2.php
XoopsModules/rssfit/trunk/rss/rss.php
XoopsModules/rssfit/trunk/rss/sql/mysql.sql
XoopsModules/rssfit/trunk/rss/templates/rssfit_rss.html
Modified: XoopsModules/rssfit/trunk/rss/README.txt
===================================================================
--- XoopsModules/rssfit/trunk/rss/README.txt 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/README.txt 2014-03-03 01:28:59 UTC (rev 12342)
@@ -1,10 +1,10 @@
RSSFit - Extendable XML news feed generator
Presented by Brandycoke Productions <http://www.brandycoke.com/>
-Copyright (c) 2004-2005 NS Tai (aka tuff)
+Copyright (c) 2004-2006 NS Tai (aka tuff)
Information
----------------------
-Current Version: 1.2 / 1.5
+Current Version: 1.21
RSSFit is a module for XOOPS generates RSS 2.0 validated XML feed. Web masters can decide what to be displayed in the XML output by activating installed plug-ins.
Key features:
- Plug-in system with several modules prepared
@@ -14,8 +14,9 @@
System Requirements
----------------------
+RSSFit 1.21: XOOPS 2.0.14
RSSFit 1.2: XOOPS 2.0.12-13.2 ; XOOPS Cube 2.0.12/13a
-RSSFit 1.5: XOOPS 2.2.3a
+RSSFit 1.5 (Suspended): XOOPS 2.2.3a
PHP 4.3.x or later with (optional) mbstring extension installed for UTF-8 encoding conversion
Using RSSFit
@@ -56,6 +57,10 @@
Version History
----------------------
+Jul 25, 2006: Version 1.21
+- Fixed compatibility problem with XOOPS 2.0.14
+- Modified WF-Downloads plugin for padcasting (requires WF-Downloads version 3.1)
+----------------------
Dec 23, 2005: Version 1.2 / 1.5
- (Version 1.5) Fixed incompatibility with XOOPS 2.2.3a
- New editable feed information: copyright
Property changes on: XoopsModules/rssfit/trunk/rss/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/about.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/about.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/about.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -38,9 +38,9 @@
<img src="../images/rssfit.png" alt="RSSFit" style="float: left; margin: 0 10px 5px 0;" />
<h4 style="margin: 0;">RSSFit</h4>
<p style="margin-top: 0;">
-Version <?=number_format($xoopsModule->getVar('version')/100, 2);?><br />
+Version <?php echo number_format($xoopsModule->getVar('version')/100, 2);?><br />
Presented by <a href="http://www.brandycoke.com/" target="_blank">Brandycoke Productions</a> <br />
-Copyright © 2003-2005 NS Tai (tuff)
+Copyright © 2003-2006 NS Tai (tuff)
<br clear="all" />
</p>
Property changes on: XoopsModules/rssfit/trunk/rss/admin/about.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/admin_header.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/admin_header.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/admin_header.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/admin/admin_header.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/do_channel.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_channel.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/do_channel.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,7 +33,7 @@
## Project: RSSFit ##
###############################################################################
-if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+if( !defined("RSSFIT_OK") ){
header('Location: index.php');
}
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_channel.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/do_intro.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_intro.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/do_intro.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,7 +33,8 @@
## Project: RSSFit ##
###############################################################################
-if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+
+if( !defined("RSSFIT_OK") ){
header('Location: index.php');
}
@@ -62,7 +63,7 @@
$sub = new XoopsFormTextArea(_AM_EDIT_INTRO_SUB, 'sub', $myts->makeTboxData4PreviewInForm($setting['sub']));
$sub->setDescription(_AM_EDIT_INTRO_SUB_DESC);
-
+
$form = new XoopsThemeForm(_AM_EDIT_INTRO, 'editintro', RSSFIT_ADMIN_URL);
$form->addElement($title);
$form->addElement($tray_content);
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_intro.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_plugins.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/do_plugins.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,7 +33,7 @@
## Project: RSSFit ##
###############################################################################
-if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+if( !defined("RSSFIT_OK") ){
header('Location: index.php');
}
@@ -164,7 +164,7 @@
}
$ret .= "</table>\n";
}
-
+
if( !empty($ret) ){
$hidden = new XoopsFormHidden('op', 'save');
$ret = "<form action='".RSSFIT_ADMIN_URL."' method='post'>\n".$ret
@@ -190,16 +190,16 @@
default:
$result = $plugins_handler->insert($plugin);
break;
-
+
case 'u': // uninstall
$result = $plugins_handler->delete($plugin);
break;
-
+
case 'd': // deactivate
$plugin->setVar('rssf_activated', 0);
$result = $plugins_handler->insert($plugin);
break;
-
+
case 'a': // activate
$plugin->setVar('rssf_activated', 1);
$result = $plugins_handler->insert($plugin);
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_sticky.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/do_sticky.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,7 +33,7 @@
## Project: RSSFit ##
###############################################################################
-if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+if( !defined("RSSFIT_OK") ){
header('Location: index.php');
}
@@ -60,11 +60,11 @@
$dobr = new XoopsFormCheckbox('', 'dobr', $setting['dobr']);
$dobr->addOption(1, _AM_DO_BR);
$tray_content->addElement($dobr);
-
+
$link = new XoopsFormText(_AM_STICKY_LINK, 'link', 50, 255, $myts->makeTboxData4PreviewInForm($setting['link']));
-
+
$applyto = $rss->feedSelectBox(_AM_STICKY_APPLYTO, $setting['feeds'], 10);
-
+
$form = new XoopsThemeForm(_AM_STICKY_EDIT, 'editsticky', RSSFIT_ADMIN_URL);
$form->addElement($title);
$form->addElement($tray_content);
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,7 +33,7 @@
## Project: RSSFit ##
###############################################################################
-if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+if( !defined("RSSFIT_OK") ){
header('Location: index.php');
}
@@ -109,7 +109,7 @@
$sub =& $plugins_handler->get($id);
if( !$handler =& $plugins_handler->checkPlugin($sub) ){
$plugins_handler->forceDeactivate($sub);
- }
+ }
}
if( empty($id) || !$sub ){
redirect_header(RSSFIT_ADMIN_URL, 0, _AM_SUB_PLUGIN_NONE);
@@ -128,7 +128,7 @@
$form->addElement(new XoopsFormText('url', 'img_url', 50, 255, $sub->getVar('img_url', 'e')));
$form->addElement(new XoopsFormText('link', 'img_link', 50, 255, $sub->getVar('img_link', 'e')));
$form->addElement(new XoopsFormText('title', 'img_title', 50, 255, $sub->getVar('img_title', 'e')));
-
+
$form->addElement(new XoopsFormHidden('feed', $id));
$form->addElement(new XoopsFormHidden('op', 'savefeed'));
$form->addElement($hidden_do);
@@ -141,7 +141,7 @@
$sub =& $plugins_handler->get($id);
if( !$handler =& $plugins_handler->checkPlugin($sub) ){
$plugins_handler->forceDeactivate($sub);
- }
+ }
}
if( empty($id) || !$sub || !$handler ){
redirect_header(RSSFIT_ADMIN_URL, 0, _AM_SUB_PLUGIN_NONE);
@@ -159,7 +159,7 @@
redirect_header(RSSFIT_ADMIN_URL.'?do='.$do, 0, _AM_DBUPDATED);
}else{
rssfitAdminHeader();
- echo $sub->getHtmlErrors();
+ echo $sub->getHtmlErrors();
}
break;
}
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/footer.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/footer.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/footer.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -33,8 +33,8 @@
## Project: RSSFit ##
###############################################################################
-echo "<div style='text-align: right; font-size: x-small; margin-top: 15px;'>Powered by <a href='about.php'>".RSSFIT_VERSION."</a>";
-if( !preg_match('/2\.0\.(12|13)/', XOOPS_VERSION) ){
+echo "<div style='text-align: right; font-size: x-small; margin-top: 15px;'>Powered by <a href='about.php'>".RSSFIT_VERSION."</a> | <a href='".RSSFIT_URL."LICENSE.txt' target='_blank'>LICENSE</a> | <a href='".RSSFIT_URL."README.txt' target='_blank'>README</a>";
+if( !preg_match('/2\.0\.14/', XOOPS_VERSION) ){
echo '<br /><span style="color: #F00;"><b>'._AM_XOOPS_VERSION_WRONG.'</b></span>';
}
echo '</div>';
Property changes on: XoopsModules/rssfit/trunk/rss/admin/footer.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/index.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/index.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/index.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -37,6 +37,7 @@
$do = isset($_POST['do']) ? trim($_POST['do']) : $do;
$op = isset($_GET['op']) ? trim($_GET['op']) : 'list';
$op = isset($_POST['op']) ? trim($_POST['op']) : $op;
+define("RSSFIT_OK", 1);
if( file_exists(RSSFIT_ROOT_PATH.'admin/do_'.$do.'.php') ){
include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
Property changes on: XoopsModules/rssfit/trunk/rss/admin/index.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/admin/menu.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/menu.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/admin/menu.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/admin/menu.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/changelog.txt
===================================================================
--- XoopsModules/rssfit/trunk/rss/changelog.txt (rev 0)
+++ XoopsModules/rssfit/trunk/rss/changelog.txt 2014-03-03 01:28:59 UTC (rev 12342)
@@ -0,0 +1,6 @@
+********
+* 1.22 *
+********
+Changes made by Herv\xE9 Thouzard of Instant Zero (http://www.instant-zero.com)
+With some configurations of PHP, it was not possible to access the different parts of the module's administration.
+This version corrects the problem and you should now be able to access all the parts of the administration.
Property changes on: XoopsModules/rssfit/trunk/rss/changelog.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/class/misc.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/class/misc.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/class/misc.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/class/misc.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/class/plugins.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/class/plugins.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/class/plugins.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/class/plugins.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/class/rssfeed.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/class/rssfeed.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/class/rssfeed.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -261,7 +261,7 @@
$text = htmlspecialchars($text, ENT_QUOTES, $this->charset);
$text = preg_replace('/&(#[0-9]+);/i', '&$1;', $text);
}
- if( $this->charset != 'UTF-8' || XOOPS_USE_MULTIBYTES != 1 ){
+ if( !preg_match('/utf-8/i', $this->charset) || XOOPS_USE_MULTIBYTES != 1 ){
$text = str_replace(array_map('chr', array_keys($this->escaped)), $this->escaped, $text);
}
}
Property changes on: XoopsModules/rssfit/trunk/rss/class/rssfeed.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/header.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/header.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/header.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/header.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/images/rss.gif
===================================================================
(Binary files differ)
Modified: XoopsModules/rssfit/trunk/rss/images/rssfit.png
===================================================================
(Binary files differ)
Modified: XoopsModules/rssfit/trunk/rss/include/common.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/include/common.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/include/common.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/include/common.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/include/functions.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/include/functions.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/include/functions.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
@@ -55,9 +55,9 @@
$links[] = array(0 => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid'), 1 => _PREFERENCES);
$admin_links = '<table class="outer" width="100%" cellspacing="1"><tr>';
for( $i=0; $i<count($links); $i++ ){
- $admin_links .= '<td class="even" style="width: 16%; text-align: center;"><a href="'.$links[$i][0].'" accesskey="'.($i+1).'">'.$links[$i][1].'</a></td>';
+ $admin_links .= '<td class="even" style="width: 14%; text-align: center;"><a href="'.$links[$i][0].'" accesskey="'.($i+1).'">'.$links[$i][1].'</a></td>';
}
- $admin_links .= "</tr></table><br clear=all />\n";
+ $admin_links .= "<td class='even' style='width: 14%; text-align: center;'><a href='about.php'>About</a></td></tr></table><br clear='all' />\n";
xoops_cp_header();
echo $admin_links;
}
Property changes on: XoopsModules/rssfit/trunk/rss/include/functions.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/include/install.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/include/install.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/include/install.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/include/install.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/index.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/index.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/index.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/index.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguide.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguide.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguide.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -0,0 +1,85 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+/*
+ * About this RSSFit plug-in
+ * Author: Herv\xE9 Thouzard of Instant Zero (http://www.instant-zero.com)
+ * Requirements (Tested with):
+ * Module: Buyersguide
+ * Version: 1.33
+ * Flux RSS : Derniers produits
+ * RSSFit verision: 1.22
+ * XOOPS version: 2.0.18.1
+ */
+
+if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
+class RssfitBuyersguide{
+ var $dirname = 'buyersguide';
+ var $modname;
+ var $grab;
+
+ function RssfitBuyersguide(){
+ }
+
+ function loadModule(){
+ $mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
+ if( !$mod || !$mod->getVar('isactive') ){
+ return false;
+ }
+ $this->modname = $mod->getVar('name');
+ return $mod;
+ }
+
+ function &grabEntries(&$obj){
+ $ret = false;
+ include XOOPS_ROOT_PATH.'/modules/buyersguide/include/common.php';
+ $items = $hBgProduct->getRecentProducts(0, 0, $this->grab);
+ $i = 0;
+
+ if( false != $items && count($items) > 0 ){
+ foreach($items as $item) {
+ $ret[$i]['link'] = $ret[$i]['guid'] = $item->getLink();
+ $ret[$i]['title'] = $item->getVar('prod_title', 'n');
+ $ret[$i]['timestamp'] = $item->getVar('prod_submited_date');
+ if(xoops_trim($item->getVar('prod_summary')) != '') {
+ $description = $item->getVar('prod_summary');
+ } else {
+ $description = $item->getVar('prod_description');
+ }
+ $ret[$i]['description'] = $description;
+ $ret[$i]['category'] = $this->modname;
+ $ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
+ $i++;
+ }
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguide.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidemanufacturers.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidemanufacturers.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidemanufacturers.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -0,0 +1,80 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+/*
+ * About this RSSFit plug-in
+ * Author: Herv\xE9 Thouzard of Instant Zero (http://www.instant-zero.com)
+ * Requirements (Tested with):
+ * Module: Buyersguide
+ * Version: 1.33
+ * Flux RSS : Derniers Fabricants
+ * RSSFit verision: 1.22
+ * XOOPS version: 2.0.18.1
+ */
+
+if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
+class RssfitBuyersguidemanufacturers{
+ var $dirname = 'buyersguide';
+ var $modname;
+ var $grab;
+
+ function RssfitBuyersguidemanufacturers(){
+ }
+
+ function loadModule(){
+ $mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
+ if( !$mod || !$mod->getVar('isactive') ){
+ return false;
+ }
+ $this->modname = $mod->getVar('name');
+ return $mod;
+ }
+
+ function &grabEntries(&$obj){
+ $ret = false;
+ include XOOPS_ROOT_PATH.'/modules/buyersguide/include/common.php';
+ $items = $hBgManufacturer->getListofActivteManufacturers(0, $this->grab, 'manu_date_added', 'DESC');
+ $i = 0;
+
+ if( false != $items && count($items) > 0 ){
+ foreach($items as $item) {
+ $ret[$i]['link'] = $ret[$i]['guid'] = $item->getLink();
+ $ret[$i]['title'] = $item->getVar('manu_name', 'n');
+ $ret[$i]['timestamp'] = $item->getVar('manu_date_added');
+ $ret[$i]['description'] = $item->getVar('manu_description');
+ $ret[$i]['category'] = $this->modname;
+ $ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
+ $i++;
+ }
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidemanufacturers.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidenews.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidenews.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidenews.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -0,0 +1,80 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+/*
+ * About this RSSFit plug-in
+ * Author: Herv\xE9 Thouzard of Instant Zero (http://www.instant-zero.com)
+ * Requirements (Tested with):
+ * Module: Buyersguide
+ * Version: 1.33
+ * Flux RSS : Derniers Fabricants
+ * RSSFit verision: 1.22
+ * XOOPS version: 2.0.18.1
+ */
+
+if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
+class RssfitBuyersguidenews{
+ var $dirname = 'buyersguide';
+ var $modname;
+ var $grab;
+
+ function RssfitBuyersguidenews(){
+ }
+
+ function loadModule(){
+ $mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
+ if( !$mod || !$mod->getVar('isactive') ){
+ return false;
+ }
+ $this->modname = $mod->getVar('name');
+ return $mod;
+ }
+
+ function &grabEntries(&$obj){
+ $ret = false;
+ include XOOPS_ROOT_PATH.'/modules/buyersguide/include/common.php';
+ $items = $hBgNews->getRecentNews(0, $this->grab);
+ $i = 0;
+
+ if( false != $items && count($items) > 0 ){
+ foreach($items as $item) {
+ $ret[$i]['link'] = $ret[$i]['guid'] = $item->getLink();
+ $ret[$i]['title'] = $item->getVar('news_title', 'n');
+ $ret[$i]['timestamp'] = $item->getVar('news_date');
+ $ret[$i]['description'] = $item->getShortenText();
+ $ret[$i]['category'] = $this->modname;
+ $ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
+ $i++;
+ }
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.buyersguidenews.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/plugins/rssfit.myalbum.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.myalbum.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.myalbum.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -0,0 +1,79 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+/*
+* About this RSSFit plug-in
+* Author: jayjay <http://www.sint-niklaas.be/>
+* Requirements (Tested with):
+* Module: Myalbum <http://www.xoops.org/>
+* Version: 1.0
+* RSSFit version: 1.21
+* XOOPS version: 2.0.18.1
+*/
+
+if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
+class RssfitMyalbum{
+ var $dirname = 'myalbum';
+ var $modname;
+ var $grab;
+
+ function RssfitMyalbum(){
+ }
+
+ function loadModule(){
+ $mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
+ if( !$mod || !$mod->getVar('isactive') ){
+ return false;
+ }
+ $this->modname = $mod->getVar('name');
+ return $mod;
+ }
+
+ function &grabEntries(&$obj){
+ global $xoopsDB;
+ $myts =& MyTextSanitizer::getInstance();
+ $ret = false;
+ $i = 0;
+ $sql = "SELECT p.lid, p.cid, p.title as ptitle, p.ext, p.hits, p.submitter, p.date, t.description, c.title as ctitle FROM ".$xoopsDB->prefix("myalbum_photos")." p, ".$xoopsDB->prefix("myalbum_text")." t, ".$xoopsDB->prefix("myalbum_cat")." c WHERE t.lid=p.lid AND p.cid=c.cid AND p.status>0 ORDER BY p.date DESC";
+ $result = $xoopsDB->query($sql, $this->grab, 0);
+ while( $row = $xoopsDB->fetchArray($result) ){
+ $ret[$i]['title'] = $row['ptitle'];
+ $link = XOOPS_URL.'/modules/'.$this->dirname.'/photo.php?cid='.$row['cid'].'&lid='.$row['lid'];
+ $ret[$i]['link'] = $ret[$i]['guid'] = $link;
+ $ret[$i]['timestamp'] = $row['date'];
+ $ret[$i]['description'] = $myts->displayTarea($row['description']);
+ $ret[$i]['category'] = $this->modname;
+ $ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
+ $i++;
+ }
+ return $ret;
+ }
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.myalbum.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php
___________________________________________________________________
Modified: svn:eol-style
## -1 +1 ##
-native
+LF
\ No newline at end of property
Modified: XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php 2014-03-03 00:52:29 UTC (rev 12341)
+++ XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php 2014-03-03 01:28:59 UTC (rev 12342)
@@ -2,7 +2,7 @@
// $Id$
###############################################################################
## RSSFit - Extendable XML news feed generator ##
-## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## Copyright (c) 2004 - 2006 NS Tai (aka tuff) ##
## <http://www.brandycoke.com/> ##
###############################################################################
## XOOPS - PHP Content Management System ##
Property changes on: XoopsModules/rssfit/tr...
[truncated message content] |
|
From: <be...@us...> - 2014-03-03 00:52:34
|
Revision: 12341
http://sourceforge.net/p/xoops/svn/12341
Author: beckmi
Date: 2014-03-03 00:52:29 +0000 (Mon, 03 Mar 2014)
Log Message:
-----------
Adding Release 1.20 by Brandycoke
Added Paths:
-----------
XoopsModules/rssfit/releases/1.20/rss/
|
|
From: <be...@us...> - 2014-03-03 00:49:47
|
Revision: 12340
http://sourceforge.net/p/xoops/svn/12340
Author: beckmi
Date: 2014-03-03 00:49:38 +0000 (Mon, 03 Mar 2014)
Log Message:
-----------
Adding RSSFit 1.20 by Brandycoke
Added Paths:
-----------
XoopsModules/rssfit/
XoopsModules/rssfit/branches/
XoopsModules/rssfit/releases/
XoopsModules/rssfit/releases/1.20/
XoopsModules/rssfit/releases/1.22/
XoopsModules/rssfit/trunk/
XoopsModules/rssfit/trunk/rss/
XoopsModules/rssfit/trunk/rss/LICENSE.txt
XoopsModules/rssfit/trunk/rss/README.txt
XoopsModules/rssfit/trunk/rss/admin/
XoopsModules/rssfit/trunk/rss/admin/about.php
XoopsModules/rssfit/trunk/rss/admin/admin_header.php
XoopsModules/rssfit/trunk/rss/admin/do_channel.php
XoopsModules/rssfit/trunk/rss/admin/do_intro.php
XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
XoopsModules/rssfit/trunk/rss/admin/do_subfeeds.php
XoopsModules/rssfit/trunk/rss/admin/footer.php
XoopsModules/rssfit/trunk/rss/admin/index.php
XoopsModules/rssfit/trunk/rss/admin/menu.php
XoopsModules/rssfit/trunk/rss/class/
XoopsModules/rssfit/trunk/rss/class/index.html
XoopsModules/rssfit/trunk/rss/class/misc.php
XoopsModules/rssfit/trunk/rss/class/plugins.php
XoopsModules/rssfit/trunk/rss/class/rssfeed.php
XoopsModules/rssfit/trunk/rss/header.php
XoopsModules/rssfit/trunk/rss/images/
XoopsModules/rssfit/trunk/rss/images/index.html
XoopsModules/rssfit/trunk/rss/images/rss.gif
XoopsModules/rssfit/trunk/rss/images/rssfit.png
XoopsModules/rssfit/trunk/rss/images/xml.gif
XoopsModules/rssfit/trunk/rss/include/
XoopsModules/rssfit/trunk/rss/include/common.php
XoopsModules/rssfit/trunk/rss/include/functions.php
XoopsModules/rssfit/trunk/rss/include/index.html
XoopsModules/rssfit/trunk/rss/include/install.php
XoopsModules/rssfit/trunk/rss/index.php
XoopsModules/rssfit/trunk/rss/language/
XoopsModules/rssfit/trunk/rss/language/english/
XoopsModules/rssfit/trunk/rss/language/english/admin.php
XoopsModules/rssfit/trunk/rss/language/english/index.html
XoopsModules/rssfit/trunk/rss/language/english/install.php
XoopsModules/rssfit/trunk/rss/language/english/main.php
XoopsModules/rssfit/trunk/rss/language/english/modinfo.php
XoopsModules/rssfit/trunk/rss/language/french/
XoopsModules/rssfit/trunk/rss/language/french/admin.php
XoopsModules/rssfit/trunk/rss/language/french/index.html
XoopsModules/rssfit/trunk/rss/language/french/install.php
XoopsModules/rssfit/trunk/rss/language/french/main.php
XoopsModules/rssfit/trunk/rss/language/french/modinfo.php
XoopsModules/rssfit/trunk/rss/language/index.html
XoopsModules/rssfit/trunk/rss/plugins/
XoopsModules/rssfit/trunk/rss/plugins/rssfit.ams.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.cbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.comments.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mydownloads.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.mylinks.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.newbb2.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.news.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartfaq.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartpartner.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.smartsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfdownloads.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection.php
XoopsModules/rssfit/trunk/rss/plugins/rssfit.wfsection2.php
XoopsModules/rssfit/trunk/rss/rss.css
XoopsModules/rssfit/trunk/rss/rss.php
XoopsModules/rssfit/trunk/rss/sql/
XoopsModules/rssfit/trunk/rss/sql/index.html
XoopsModules/rssfit/trunk/rss/sql/mysql.sql
XoopsModules/rssfit/trunk/rss/templates/
XoopsModules/rssfit/trunk/rss/templates/index.html
XoopsModules/rssfit/trunk/rss/templates/rssfit_index.html
XoopsModules/rssfit/trunk/rss/templates/rssfit_rss.html
XoopsModules/rssfit/trunk/rss/xoops_version.php
Added: XoopsModules/rssfit/trunk/rss/LICENSE.txt
===================================================================
--- XoopsModules/rssfit/trunk/rss/LICENSE.txt (rev 0)
+++ XoopsModules/rssfit/trunk/rss/LICENSE.txt 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,278 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
Added: XoopsModules/rssfit/trunk/rss/README.txt
===================================================================
--- XoopsModules/rssfit/trunk/rss/README.txt (rev 0)
+++ XoopsModules/rssfit/trunk/rss/README.txt 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,96 @@
+RSSFit - Extendable XML news feed generator
+Presented by Brandycoke Productions <http://www.brandycoke.com/>
+Copyright (c) 2004-2005 NS Tai (aka tuff)
+
+Information
+----------------------
+Current Version: 1.2 / 1.5
+RSSFit is a module for XOOPS generates RSS 2.0 validated XML feed. Web masters can decide what to be displayed in the XML output by activating installed plug-ins.
+Key features:
+ - Plug-in system with several modules prepared
+ - Plug-in example for module developers
+ - RSS 2.0 validated Smarty template
+ - Multi-byte languages compatible
+
+System Requirements
+----------------------
+RSSFit 1.2: XOOPS 2.0.12-13.2 ; XOOPS Cube 2.0.12/13a
+RSSFit 1.5: XOOPS 2.2.3a
+PHP 4.3.x or later with (optional) mbstring extension installed for UTF-8 encoding conversion
+
+Using RSSFit
+----------------------
+To install, go install it just like installing any module of XOOPS. You know you are smart enough to make it right.
+For more information of installing a module of XOOPS, please refer to:
+http://www.xoops.org/modules/smartfaq/faq.php?faqid=90
+
+For detailed documentation please the RSSFit home page:
+http://www.brandycoke.com/products/rssfit/
+
+Who to Contact
+----------------------
+If you have any questions, comments or bug reports for this module, please register and post your message at:
+http://www.brandycoke.com/home/modules/newbb/
+
+Donations welcome
+----------------------
+If you think this module is useful, please consider making a donation to help us continue our work. You can support our future development by pointing your browser to the following hyperlink (all in one line):
+https://www.paypal.com/xclick/business=donations%40brandycoke.com&item_name=Donation+for+Brandycoke+Freewares&item_number=rssfit&no_note=1&tax=0¤cy_code=USD
+
+Services
+----------------------
+If you are interested in custom solutions (exclusive modules/theme development, etc) please contact us at ser...@br....
+
+Credits
+----------------------
+Programmed by NS Tai <tu...@br...>
+German language files translated by DocuAnt <http://www.DocuAnts.com/>
+Bulgarian language files translated by Stefan Ilivanov <http://www.xoopsbg.org/>
+French language files translated by Machenzy
+
+Legal
+----------------------
+This program is released under the terms of the GNU General Public License as published by the Free Software Foundation.
+You may not change or alter any portion of this comment or credits of supporting developers from this source code or any supporting source code which is considered copyrighted (c) material of the original comment or credit authors.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Liaise; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Version History
+----------------------
+Dec 23, 2005: Version 1.2 / 1.5
+- (Version 1.5) Fixed incompatibility with XOOPS 2.2.3a
+- New editable feed information: copyright
+- PHP-debug messages are now completely hidden when prefernece "MIME type of RSS output" is set as "XML", even php-debug is turned on under system admin
+- UTF-8 encoding conversion now requires PHP mbstring extension (Reference: http://www.php.net/manual/en/ref.mbstring.php)
+- Updated plugins
+- Plugins can now serve their own custom tags. (i.e. enclosure)
+- Sticky text will now be hidden if either its title or content field is empty
+- Contents of item-level's "description" elements are now sectioned using "CDATA" (Reference: http://blogs.law.harvard.edu/tech/encodingDescriptions)
+- Fixed "call by reference" errors appear on PHP 4.4 / 5.1
+- German, Bulgarian, French language pack added (Thanks DocuAnt, Stefan Ilivanov, Machenzy)
+----------------------
+Mar 23, 2005: Version 1.1
+Individual sub-feeds based on activated plug-ins
+Editable channel elements
+Sticky text displays as the very first item of a feed
+New and updated plug-ins
+Various bug fixes
+Development sponsored by Stefanos Karagos <http://www.karagos.com/> and IIS-Resources <http://www.iis-resources.com/>
+
+Notes for upgrading from version 1.0x: There is no upgrade patch since over 90 percent of the files are modified. You have to replace the entire directory contents with the new version. Don't forget to update the module after uploading new files. If you have the rss feed smarty template customized you should take a look at the file templates/rssfit_rss.html for corresponding changes.
+----------------------
+Dec 26, 2004: Version 1.03
+Fixed incompatibility with PHP 5
+Fixed rss template not validated by rss-validators
+Fixed a typo in the mylinks plug-in
+Dutch language pack added.
+Italian language pack added.
+Portuguese language pack added.
+----------------------
+Jun 6, 2004: Version 1.02
+French language pack added.
+----------------------
+MAY 9, 2004: Version 1.01
+Spanish language pack added.
+----------------------
+MAY 5, 2004: Version 1.0
+First public release.
Added: XoopsModules/rssfit/trunk/rss/admin/about.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/about.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/about.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,71 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+## Author of this file: NS Tai (aka tuff) ##
+## URL: http://www.brandycoke.com/ ##
+## Project: RSSFit ##
+###############################################################################
+include 'admin_header.php';
+xoops_cp_header();
+?>
+<img src="../images/rssfit.png" alt="RSSFit" style="float: left; margin: 0 10px 5px 0;" />
+<h4 style="margin: 0;">RSSFit</h4>
+<p style="margin-top: 0;">
+Version <?=number_format($xoopsModule->getVar('version')/100, 2);?><br />
+Presented by <a href="http://www.brandycoke.com/" target="_blank">Brandycoke Productions</a> <br />
+Copyright © 2003-2005 NS Tai (tuff)
+<br clear="all" />
+</p>
+
+<h4 style="margin: 0;">License</h4>
+<p style="margin-top: 0;">
+This software is licensed under the CC-GNU GPL.<br />
+<a href="http://creativecommons.org/licenses/GPL/2.0/" target="_blank">Commons Deed</a> |
+<a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">Legal Code</a>
+</p>
+
+<h4 style="margin: 0;">Who to Contact</h4>
+<p style="margin-top: 0;">If you have any questions, comments or bug reports, please register and post your message on the <a href="http://www.brandycoke.com/home/modules/newbb/" target="_blank">discussion area</a>.
+</p>
+
+<h4 style="margin: 0;">Help us keep going</h4>
+<p style="margin: 0;">
+RSSFit is Freeware and Opensource. If you think it is useful and would like to show your appreciation, you can support us in one of the following ways:
+</p>
+<ul>
+ <li><a href="https://www.paypal.com/xclick/business=donations%40brandycoke.com&item_name=Donation+for+Brandycoke+Freewares&item_number=rssfit&no_note=1&tax=0&currency_code=USD">Donate us via PayPal</a>
+ </li>
+ <li><a href="http://www.brandycoke.com/about/services/">Hire us for your web development projects</a>
+ </li>
+</ul>
+
+<?php
+xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/admin/about.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/admin/admin_header.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/admin_header.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/admin_header.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,35 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+
+require '../../../include/cp_header.php';
+require '../include/common.php';
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/admin/admin_header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/admin/do_channel.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_channel.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/do_channel.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,93 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+## Author of this file: NS Tai (aka tuff) ##
+## URL: http://www.brandycoke.com/ ##
+## Project: RSSFit ##
+###############################################################################
+
+if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+ header('Location: index.php');
+}
+
+switch($op){
+default:
+ rssfitAdminHeader();
+ if( $elements =& $rss->mHandler->getObjects(new Criteria('misc_category', 'channel'), '*', 'title') && $img =& $rss->mHandler->getObjects(new Criteria('misc_category', 'channelimg'), '*', 'title') ){
+ $form = new XoopsThemeForm(_AM_EDIT_CHANNEL, 'editchannel', RSSFIT_ADMIN_URL);
+ $form->addElement(new XoopsFormLabel('', '<b>'._AM_EDIT_CHANNEL_REQUIRED.'</b> '.genSpecMoreInfo('req', $rss)));
+ $form->addElement(new XoopsFormText('title', 'ele['.$elements['title']->getVar('misc_id').']', 50, 255, $elements['title']->getVar('misc_content', 'e')), true);
+ $form->addElement(new XoopsFormText('link', 'ele['.$elements['link']->getVar('misc_id').']', 50, 255, $elements['link']->getVar('misc_content', 'e')), true);
+ $form->addElement(new XoopsFormTextArea('description', 'ele['.$elements['description']->getVar('misc_id').']', $elements['description']->getVar('misc_content', 'e')), true);
+
+ $form->addElement(new XoopsFormLabel('', '<b>'._AM_EDIT_CHANNEL_OPTIONAL.'</b> '.genSpecMoreInfo('opt', $rss)));
+ $form->addElement(new XoopsFormText('copyright', 'ele['.$elements['copyright']->getVar('misc_id').']', 50, 255, $elements['copyright']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('managingEditor', 'ele['.$elements['managingEditor']->getVar('misc_id').']', 50, 255, $elements['managingEditor']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('webMaster', 'ele['.$elements['webMaster']->getVar('misc_id').']', 50, 255, $elements['webMaster']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('category', 'ele['.$elements['category']->getVar('misc_id').']', 50, 255, $elements['category']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('generator', 'ele['.$elements['generator']->getVar('misc_id').']', 50, 255, $elements['generator']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('docs', 'ele['.$elements['docs']->getVar('misc_id').']', 50, 255, $elements['docs']->getVar('misc_content', 'e')));
+
+ $form->addElement(new XoopsFormLabel('', '<b>'._AM_EDIT_CHANNEL_IMAGE.'</b> '.genSpecMoreInfo('img', $rss)));
+ $form->addElement(new XoopsFormText('url', 'ele['.$img['url']->getVar('misc_id').']', 50, 255, $img['url']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('link', 'ele['.$img['link']->getVar('misc_id').']', 50, 255, $img['link']->getVar('misc_content', 'e')));
+ $form->addElement(new XoopsFormText('title', 'ele['.$img['title']->getVar('misc_id').']', 50, 255, $img['title']->getVar('misc_content', 'e')));
+
+ $form->addElement($tray_save_cancel);
+ $form->addElement($hidden_do);
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->display();
+ }else{
+ echo '<p>'._AM_DB_RECORD_MISSING.'</p>';
+ }
+break;
+case 'save':
+ extract($_POST);
+ $ids = array_keys($ele);
+ $errors = array();
+ foreach( $ids as $i ){
+ $criteria = new Criteria('misc_id', $i);
+ $fields = array('misc_content' => trim($ele[$i]));
+ if( $err = $rss->mHandler->modifyObjects($criteria, $fields) ){
+ $errors[] = $err;
+ }
+ }
+ if( count($errors) > 0 ){
+ rssfitAdminHeader();
+ foreach( $errors as $e ){
+ echo $e."<br /><br />\n";
+ }
+ }else{
+ redirect_header(RSSFIT_ADMIN_URL.'?do='.$do, 0, _AM_DBUPDATED);
+ }
+break;
+}
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_channel.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/admin/do_intro.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_intro.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/do_intro.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,93 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+## Author of this file: NS Tai (aka tuff) ##
+## URL: http://www.brandycoke.com/ ##
+## Project: RSSFit ##
+###############################################################################
+
+if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+ header('Location: index.php');
+}
+
+if( $intr =& $misc_handler->getObjects(new Criteria('misc_category', 'intro')) ){
+ $intro =& $intr[0];
+ unset($intr);
+}else{
+ $intro =& $misc_handler->create();
+}
+switch($op){
+default:
+ rssfitAdminHeader();
+ $title = new XoopsFormText(_AM_EDIT_INTRO_TITLE, 'title', 50, 255, $intro->getVar('misc_title', 'e'));
+ $title->setDescription(_AM_EDIT_INTRO_TITLE_DESC);
+
+ $setting = $intro->getVar('misc_setting');
+ $tray_content = new XoopsFormElementTray(_AM_EDIT_INTRO_TEXT, '<br />');
+ $tray_content->setDescription(_AM_EDIT_INTRO_TEXT_DESC._AM_EDIT_INTRO_TEXT_DESC_SUB);
+ $tray_content->addElement(new XoopsFormDhtmlTextArea('', 'content', $intro->getVar('misc_content', 'e'), 15, 60));
+ $dohtml = new XoopsFormCheckbox('', 'dohtml', $setting['dohtml']);
+ $dohtml->addOption(1, _AM_DO_HTML);
+ $tray_content->addElement($dohtml);
+ $dobr = new XoopsFormCheckbox('', 'dobr', $setting['dobr']);
+ $dobr->addOption(1, _AM_DO_BR);
+ $tray_content->addElement($dobr);
+
+ $sub = new XoopsFormTextArea(_AM_EDIT_INTRO_SUB, 'sub', $myts->makeTboxData4PreviewInForm($setting['sub']));
+ $sub->setDescription(_AM_EDIT_INTRO_SUB_DESC);
+
+ $form = new XoopsThemeForm(_AM_EDIT_INTRO, 'editintro', RSSFIT_ADMIN_URL);
+ $form->addElement($title);
+ $form->addElement($tray_content);
+ $form->addElement($sub);
+ $form->addElement($tray_save_cancel);
+ $form->addElement($hidden_do);
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->display();
+break;
+
+case 'save':
+ $intro->setVar('misc_category', 'intro');
+ $intro->setVar('misc_title', trim($_POST['title']));
+ $intro->setVar('misc_content', $_POST['content']);
+ $setting = array( 'dohtml' => isset($_POST['dohtml']) ? 1 : 0,
+ 'dobr' => isset($_POST['dobr']) ? 1 : 0,
+ 'sub' => isset($_POST['sub']) ? trim($_POST['sub']) : ''
+ );
+ $intro->setVar('misc_setting', $setting);
+ if( false == $misc_handler->insert($intro) ){
+ rssfitAdminHeader();
+ echo $intro->getHtmlErrors();
+ }else{
+ redirect_header(RSSFIT_ADMIN_URL.'?do='.$do, 0, _AM_DBUPDATED);
+ }
+break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_intro.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_plugins.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/do_plugins.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,239 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+## Author of this file: NS Tai (aka tuff) ##
+## URL: http://www.brandycoke.com/ ##
+## Project: RSSFit ##
+###############################################################################
+
+if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+ header('Location: index.php');
+}
+
+switch($op){
+default:
+ $ret = '';
+ rssfitAdminHeader();
+ // activated plugins
+ $criteria = new Criteria('rssf_activated', 1);
+ if( $plugins =& $plugins_handler->getObjects($criteria, 'p_activated') ){
+ $ret .= "<table cellspacing='1' class='outer' width='100%'>\n"
+ ."<tr><th colspan='5'>"._AM_PLUGIN_ACTIVATED."</th></tr>\n"
+ ."<tr>\n<td class='head' align='center' width='30%'>"._AM_PLUGIN_FILENAME."</td>\n"
+ ."<td class='head' align='center'>"._AM_PLUGIN_MODNAME."</td>\n"
+ ."<td class='head' align='center'>"._AM_PLUGIN_SHOWXENTRIES."</td>\n"
+ ."<td class='head' align='center'>"._AM_PLUGIN_ORDER."</td>\n"
+ ."<td class='head' align='center' width='20%'>"._AM_ACTION."</td>\n"
+ ."</tr>\n";
+ foreach( $plugins as $p ){
+ if( $handler =& $plugins_handler->checkPlugin($p) ){
+ $id = $p->getVar('rssf_conf_id');
+ $entries = new XoopsFormText('', 'rssf_grab['.$id.']', 3, 2, $p->getVar('rssf_grab'));
+ $order = new XoopsFormText('', 'rssf_order['.$id.']', 3, 2, $p->getVar('rssf_order'));
+ $action = new XoopsFormSelect('', 'action['.$id.']', '');
+ $action->addOption('', _SELECT);
+ $action->addOption('d', _AM_PLUGIN_DEACTIVATE);
+ $action->addOption('u', _AM_PLUGIN_UNINSTALL);
+ $ret .= "<tr>\n"
+ ."<td class='odd' align='center'>"
+ .$p->getVar('rssf_filename')."</td>\n"
+ ."<td class='even' align='center'>"
+ .$handler->modname."</td>\n"
+ ."<td class='odd' align='center'>"
+ .$entries->render()."</td>\n"
+ ."<td class='odd' align='center'>"
+ .$order->render()."</td>\n"
+ ."<td class='odd' align='center'>"
+ .$action->render()."</td>\n"
+ ;
+ $ret .= "</tr>\n";
+ }else{
+ $plugins_handler->forceDeactivate($p);
+ }
+ }
+ $ret .= "</table>\n";
+ }
+
+ // inactive plugins
+ if( $plugins =& $plugins_handler->getObjects(new Criteria('rssf_activated', 0), 'p_inactive') ){
+ $ret .= "<br />\n<table cellspacing='1' class='outer' width='100%'>\n"
+ ."<tr><th colspan='3'>"._AM_PLUGIN_INACTIVE."</th></tr>\n"
+ ."<tr>\n<td class='head' align='center' width='30%'>"._AM_PLUGIN_FILENAME."</td>\n"
+ ."<td class='head' align='center'>"._AM_PLUGIN_MODNAME."</td>\n"
+ ."<td class='head' align='center' width='20%'>"._AM_ACTION."</td>\n"
+ ."</tr>\n";
+ foreach( $plugins as $p ){
+ $id = $p->getVar('rssf_conf_id');
+ $action = new XoopsFormSelect('', 'action['.$id.']', '');
+ $action->addOption('', _SELECT);
+ $ret .= "<tr>\n"
+ ."<td class='odd' align='center'>"
+ .$p->getVar('rssf_filename')."</td>\n"
+ ."<td class='even' align='center'>";
+ if( $handler =& $plugins_handler->checkPlugin($p) ){
+ $ret .= $handler->modname;
+ $action->addOption('a', _AM_PLUGIN_ACTIVATE);
+ }else{
+ if( count($p->getErrors()) > 0 ){
+ $ret .= '<b>'._ERRORS."</b>\n";
+ foreach( $p->getErrors() as $e ){
+ $ret .= '<br />'.$e;
+ }
+ }else{
+ $ret .= '<b>'._AM_PLUGIN_UNKNOWNERROR."</b>";
+ }
+ }
+ $ret .= "</td>\n";
+ $action->addOption('u', _AM_PLUGIN_UNINSTALL);
+ $ret .= "<td class='odd' align='center'>"
+ .$action->render()."</td>\n";
+ }
+ $ret .= "</table>\n";
+ }
+
+ // Non-installed plugins
+ if( !$filelist =& $plugins_handler->getPluginFileList() ){
+ $filelist = array();
+ }
+ $list =& XoopsLists::getFileListAsArray(RSSFIT_ROOT_PATH.'plugins');
+ $installable = array();
+ foreach( $list as $f ){
+ if( preg_match('/rssfit\.+[a-zA-Z0-9_]+\.php/', $f) && !in_array($f, $filelist) ){
+ $installable[] = $f;
+ }
+ }
+ if( count($installable) > 0 ){
+ $ret .= "<br />\n<table cellspacing='1' class='outer' width='100%'>\n"
+ ."<tr><th colspan='3'>"._AM_PLUGIN_NONINSTALLED."</th></tr>\n"
+ ."<tr>\n<td class='head' align='center' width='30%'>"._AM_PLUGIN_FILENAME."</td>\n"
+ ."<td class='head' align='center'>"._AM_PLUGIN_MODNAME."</td>\n"
+ ."<td class='head' align='center' width='20%'>"._AM_PLUGIN_INSTALL."</td>\n"
+ ."</tr>\n";
+ foreach( $installable as $i ){
+ $action = new XoopsFormCheckbox('', 'install['.$i.']');
+ $action->addOption('i', ' ');
+ $ret .= "<tr>\n"
+ ."<td class='odd' align='center'>"
+ .$i."</td>\n"
+ ."<td class='even' align='center'>";
+ $p =& $plugins_handler->create();
+ $p->setVar('rssf_filename', $i);
+ if( $handler =& $plugins_handler->checkPlugin($p) ){
+ $ret .= $handler->modname;
+ }else{
+ if( count($p->getErrors()) > 0 ){
+ $ret .= '<b>'._ERRORS."</b>\n";
+ foreach( $p->getErrors() as $e ){
+ $ret .= '<br />'.$e;
+ }
+ }else{
+ $ret .= '<b>'._AM_PLUGIN_UNKNOWNERROR."</b>";
+ }
+ $action->setExtra('disabled="disabled"');
+ }
+ $ret .= "</td>\n";
+ $ret .= "<td class='odd' align='center'>"
+ .$action->render()."</td>\n";
+ }
+ $ret .= "</table>\n";
+ }
+
+ if( !empty($ret) ){
+ $hidden = new XoopsFormHidden('op', 'save');
+ $ret = "<form action='".RSSFIT_ADMIN_URL."' method='post'>\n".$ret
+ ."<br /><table cellspacing='1' class='outer' width='100%'><tr><td class='foot' align='center'>\n"
+ .$tray_save_cancel->render()."\n".$hidden->render()."\n"
+ .$hidden_do->render()."\n</td></tr></table></form>"
+ ;
+ echo $ret;
+ }
+break;
+case 'save':
+ extract($_POST);
+ $err = '';
+ if( isset($action) ){
+ $keys = array_keys($action);
+ foreach( $keys as $k ){
+ $plugin =& $plugins_handler->get($k);
+ if( isset($rssf_grab[$k]) ){
+ $plugin->setVar('rssf_grab', $rssf_grab[$k]);
+ $plugin->setVar('rssf_order', $rssf_order[$k]);
+ }
+ switch($action[$k]){
+ default:
+ $result = $plugins_handler->insert($plugin);
+ break;
+
+ case 'u': // uninstall
+ $result = $plugins_handler->delete($plugin);
+ break;
+
+ case 'd': // deactivate
+ $plugin->setVar('rssf_activated', 0);
+ $result = $plugins_handler->insert($plugin);
+ break;
+
+ case 'a': // activate
+ $plugin->setVar('rssf_activated', 1);
+ $result = $plugins_handler->insert($plugin);
+ break;
+ }
+ if( !$result ){
+ $err .= $plugin->getHtmlErrors();
+ }
+ }
+ }
+ if( !empty($install) ){
+ $files = array_keys($install);
+ foreach( $files as $f ){
+ $p =& $plugins_handler->create();
+ $p->setVar('rssf_filename', $f);
+ if( $handler =& $plugins_handler->checkPlugin($p) ){
+ $p->setVar('rssf_activated', 1);
+ $p->setVar('rssf_grab', $xoopsModuleConfig['plugin_entries']);
+ $p->setVar('sub_entries', $xoopsModuleConfig['plugin_entries']);
+ $p->setVar('sub_link', XOOPS_URL.'/modules/'.$handler->dirname);
+ $p->setVar('sub_title', $xoopsConfig['sitename'].' - '.$handler->modname);
+ $p->setVar('sub_desc', $xoopsConfig['slogan']);
+ if( !$result = $plugins_handler->insert($p) ){
+ $err .= $p->getHtmlErrors();
+ }
+ }
+ }
+ }
+ if( !empty($err) ){
+ rssfitAdminHeader();
+ echo $err;
+ }else{
+ redirect_header(RSSFIT_ADMIN_URL.'?do='.$do, 0, _AM_DBUPDATED);
+ }
+break;
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/rssfit/trunk/rss/admin/do_plugins.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/rssfit/trunk/rss/admin/do_sticky.php
===================================================================
--- XoopsModules/rssfit/trunk/rss/admin/do_sticky.php (rev 0)
+++ XoopsModules/rssfit/trunk/rss/admin/do_sticky.php 2014-03-03 00:49:38 UTC (rev 12340)
@@ -0,0 +1,102 @@
+<?php
+// $Id$
+###############################################################################
+## RSSFit - Extendable XML news feed generator ##
+## Copyright (c) 2004 - 2005 NS Tai (aka tuff) ##
+## <http://www.brandycoke.com/> ##
+###############################################################################
+## XOOPS - PHP Content Management System ##
+## Copyright (c) 2000 XOOPS.org ##
+## <http://www.xoops.org/> ##
+###############################################################################
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## You may not change or alter any portion of this comment or credits ##
+## of supporting developers from this source code or any supporting ##
+## source code which is considered copyrighted (c) material of the ##
+## original comment or credit authors. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU General Public License for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+###############################################################################
+## Author of this file: NS Tai (aka tuff) ##
+## URL: http://www.brandycoke.com/ ##
+## Project: RSSFit ##
+###############################################################################
+
+if( !preg_match('/\/admin\/index\.php/', $_SERVER['PHP_SELF']) ){
+ header('Location: index.php');
+}
+
+if( $intr =& $misc_handler->getObjects(new Criteria('misc_category', 'sticky')) ){
+ $sticky =& $intr[0];
+ unset($intr);
+}else{
+ $sticky =& $misc_handler->create();
+}
+switch($op){
+default:
+ rssfitAdminHeader();
+ $setting = $sticky->getVar('misc_setting');
+ $title = new XoopsFormText(_AM_STICKY_TITLE, 'title', 50, 255, $sticky->getVar('misc_title', 'e'));
+ $title->setDescription(_AM_EDIT_INTRO_TITLE_DESC);
+
+ $tray_content = new XoopsFormElementTray(_AM_STICKY_CONTENT, '<br />');
+ $tray_content->setDescription(_AM_EDIT_INTRO_TEXT_DESC);
+ $content = new XoopsFormTextArea('', 'content', $sticky->getVar('misc_content', 'e'), 10);
+ $tray_content->addElement($content);
+ $dohtml = new XoopsFormCheckbox('', 'dohtml', $setting['dohtml']);
+ $dohtml->addOption(1, _AM_DO_HTML);
+ $tray_content->addElement($dohtml);
+ $dobr = new XoopsFormCheckbox('', 'dobr', $setting['dobr']);
+ $dobr->addOption(1, _AM_DO_BR);
+ $tray_content->addElement($dobr);
+
+ $link = new XoopsFormText(_AM_STICKY_LINK, 'link', 50, 255, $myts->makeTboxData4PreviewInForm($setting['link']));
+
+ $applyto = $rss->feedSelectBox(_AM_STICKY_APPLYTO, $setting['feeds'], 10);
+
+ $form = new XoopsThemeForm(_AM_STICKY_EDIT, 'editsticky', RSSFIT_ADMIN_URL);
+ $form->addElement($title);
+ $form->addElement($tray_content);
+ $form->addElement($link);
+ $form->addElement($applyto);
+ $form->addElement($tray_save_cancel);
+ $form->addElement($hidden_do);
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $form->display();
+break;
+
+case 'save':
+ $sticky->setVar('misc_category', 'sticky');
+ $sticky->setVar('misc_title', trim($_POST['title']));
+ $sticky->setVar('misc_content', $_POST['content']);
+ if( !isset($_POST['feeds']) || count($_POST['feeds']) < 1 || in_array(0, $_POST['feeds']) ){
+ $...
[truncated message content] |
|
From: <txm...@us...> - 2014-03-02 14:33:55
|
Revision: 12339
http://sourceforge.net/p/xoops/svn/12339
Author: txmodxoops
Date: 2014-03-02 14:33:52 +0000 (Sun, 02 Mar 2014)
Log Message:
-----------
Added more html elements
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php 2014-03-02 08:37:41 UTC (rev 12338)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php 2014-03-02 14:33:52 UTC (rev 12339)
@@ -38,17 +38,17 @@
* @param mixed $table
* @param string $file_name
*/
- public function __construct($module, $table) {
+ public function __construct($module, $table, $lang_pref = '_AM_', $lang_post = '') {
$this->module = $module;
$this->table = $table;
- $this->language = $this->geLanguage('_AM_', '_');
+ $this->language = $this->geLanguage($lang_pref, $lang_post);
}
/*
* @public function getHtmlDiv
* @param string $class
* @param string $content
*/
- public function getHtmlDiv($class = '', $content = '') {
+ public function getHtmlDiv($class = 'bnone', $content = '') {
$ret = <<<EOT
<div class='{$class}'>
{$content}
@@ -61,7 +61,7 @@
* @param string $class
* @param string $content
*/
- public function getHtmlSpan($class = '', $content = '') {
+ public function getHtmlSpan($class = 'bnone', $content = '') {
$ret = <<<EOT
<span class='{$class}'>
{$content}
@@ -70,11 +70,38 @@
return $ret;
}
/*
+ * @public function getHtmlAnchor
+ * @param string $class
+ * @param string $url
+ * @param string $target
+ * @param string $content
+ */
+ public function getHtmlAnchor($class = 'bnone', $url = 'http://', $target = '_top', $content = '') {
+ $ret = <<<EOT
+ <a class='{$class}' href='{$url}' target='{$target}'>
+ {$content}
+ </a>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlImage
+ * @param string $class
+ * @param string $src
+ * @param string $alt
+ */
+ public function getHtmlImage($class = 'bnone', $src = 'blank.gif', $alt = 'blank.gif') {
+ $ret = <<<EOT
+ <img class='{$class}' src='{$src}' alt='{$alt}' />
+EOT;
+ return $ret;
+ }
+ /*
* @public function getHtmlTable
* @param string $class
* @param string $content
*/
- public function getHtmlTable($class = '', $content = '') {
+ public function getHtmlTable($class = 'bnone', $content = '') {
$ret = <<<EOT
<table class='{$class}'>
{$content}
@@ -87,7 +114,7 @@
* @param string $class
* @param string $content
*/
- public function getHtmlTableThead($class = '', $content = '') {
+ public function getHtmlTableThead($class = 'bnone', $content = '') {
$ret = <<<EOT
<thead class='{$class}'>
{$content}
@@ -100,7 +127,7 @@
* @param string $class
* @param string $content
*/
- public function getHtmlTableTbody($class = '', $content = '') {
+ public function getHtmlTableTbody($class = 'bnone', $content = '') {
$ret = <<<EOT
<tbody class='{$class}'>
{$content}
@@ -113,7 +140,7 @@
* @param string $class
* @param string $content
*/
- public function getHtmlTableTfoot($class = '', $content = '') {
+ public function getHtmlTableTfoot($class = 'bnone', $content = '') {
$ret = <<<EOT
<tfoot class='{$class}'>
{$content}
@@ -126,7 +153,7 @@
* @param string $class
* @param mixed $field_name
*/
- public function getHtmlTableHead($class = '', $field_name) {
+ public function getHtmlTableHead($class = 'bnone', $field_name) {
$field_name = strtoupper($field_name);
$ret = <<<EOT
<th class='{$class}'><{{$this->language}{$field_name}}></th>
@@ -138,7 +165,7 @@
* @param string $class
* @param string $content
*/
- public function getHtmlTableRow($class = '', $content = '') {
+ public function getHtmlTableRow($class = 'bnone', $content = '') {
$ret = <<<EOT
<tr class='{$class}'>
{$content}
@@ -151,7 +178,7 @@
* @param string $class
* @param mixed $field_name
*/
- public function getHtmlTableData($class = '', $field_name) {
+ public function getHtmlTableData($class = 'bnone', $field_name) {
$table_fieldname = $this->table->getVar('table_fieldname');
$ret = <<<EOT
<td class='{$class}'><{\${$table_fieldname}.{$field_name}}></td>
@@ -178,15 +205,14 @@
* @param mixed $content_else
*/
public function getSmartyConditions($condition = '', $operator = '==', $type = '1', $content_if = '', $content_else = false) {
- $ret = '';
if(!$content_else) {
- $ret .= <<<EOT
+ $ret <<<EOT
<{if ${$condition} {$operator} {$type}'}>
{$content_if}
<{/if}>
EOT;
} else {
- $ret .= <<<EOT
+ $ret <<<EOT
<{if ${$condition} {$operator} {$type}'}>
{$content_if}
<{else}>
|
|
From: <be...@us...> - 2014-03-02 08:37:45
|
Revision: 12338
http://sourceforge.net/p/xoops/svn/12338
Author: beckmi
Date: 2014-03-02 08:37:41 +0000 (Sun, 02 Mar 2014)
Log Message:
-----------
Fixing version images names
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.6.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.6.png
===================================================================
(Binary files differ)
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
===================================================================
(Binary files differ)
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
===================================================================
(Binary files differ)
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png 2014-03-02 01:52:29 UTC (rev 12337)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png 2014-03-02 08:37:41 UTC (rev 12338)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_Beta_1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png 2014-03-02 01:52:29 UTC (rev 12337)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png 2014-03-02 08:37:41 UTC (rev 12338)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7_RC1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
|
|
From: <txm...@us...> - 2014-03-02 01:52:33
|
Revision: 12337
http://sourceforge.net/p/xoops/svn/12337
Author: txmodxoops
Date: 2014-03-02 01:52:29 +0000 (Sun, 02 Mar 2014)
Log Message:
-----------
Updated
Added separated class HtmlSmartyCodes file for admin & user templates
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_templates.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -0,0 +1,48 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: admin_templates.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class AdminTemplates extends HtmlSmartyCodes
+{
+ /*
+ * @public function constructor
+ * @param string $module
+ * @param mixed $table
+ * @param string $file_name
+ */
+ public function __construct($module, $table, $file_name = null) {
+ $this->module = $module;
+ $this->table = $table;
+ $this->file_name = $file_name;
+ $this->language = $this->geLanguage('_AM_', '_');
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ /*$ret = $this->getUploadImage();
+ $ret = $this->getUploadFile();
+ return $ret;*/
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php 2014-02-28 21:29:57 UTC (rev 12336)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -29,30 +29,30 @@
/**
* "path" attribute of the files
*
- * @var string
+ * @var mixed
*/
- private $path = '';
+ private $path = XOOPS_ROOT_PATH.'/modules/TDMCreate';
/**
* "module" attribute of the files
*
- * @var string
+ * @var mixed
*/
- private $_module = '';
+ private $module = null;
/**
* "folder" attribute of the files
*
- * @var string
+ * @var mixed
*/
- private $folder = '';
+ private $folder = null;
/**
* "file_name" attribute of the files
*
- * @var string
+ * @var mixed
*/
- private $file_name = '';
+ private $file_name = null;
/**
* Generates output for the files.
@@ -66,14 +66,16 @@
/*
* @public function getHeader
* @param string $path
+ * @param string $module
* @param string $folder
* @param string $file_name
*/
- public function getHeader($path, $folder, $file_name) {
+ public function getHeader($path, $module, $folder, $file_name) {
$this->path = $path;
$this->folder = $folder;
+ $this->module = $module;
$this->file_name = $file_name;
- $ret = $this->path . DIRECTORY_SEPARATOR . $this->_module . DIRECTORY_SEPARATOR . $this->folder . DIRECTORY_SEPARATOR . $this->file_name;
+ $ret = $this->path . DIRECTORY_SEPARATOR . $this->module . DIRECTORY_SEPARATOR . $this->folder . DIRECTORY_SEPARATOR . $this->file_name;
return $ret;
}
@@ -83,19 +85,19 @@
* @param string $file_name
*/
public function getHeaderComment($module, $file_name) {
- $this->_module = $module;
+ $this->module = $module;
$this->file_name = $file_name;
- $mod_name = $this->_module->getVar('mod_name');
- $mod_version = $this->_module->getVar('mod_version');
- $mod_since = $this->_module->getVar('mod_since');
- //$mod_min_xoops = $this->_module->getVar('mod_min_xoops');
- $mod_author = $this->_module->getVar('mod_author');
- $mod_credits = $this->_module->getVar('mod_credits');
- $mod_a_m = $this->_module->getVar('mod_author_mail');
- $mod_a_w_url = $this->_module->getVar('mod_author_website_url');
- $mod_license = $this->_module->getVar('mod_license');
- $mod_subversion = $this->_module->getVar('mod_subversion');
+ $mod_name = $this->module->getVar('mod_name');
+ $mod_version = $this->module->getVar('mod_version');
+ $mod_since = $this->module->getVar('mod_since');
+ $mod_min_xoops = $this->module->getVar('mod_min_xoops');
+ $mod_author = $this->module->getVar('mod_author');
+ $mod_credits = $this->module->getVar('mod_credits');
+ $mod_a_m = $this->module->getVar('mod_author_mail');
+ $mod_a_w_url = $this->module->getVar('mod_author_website_url');
+ $mod_license = $this->module->getVar('mod_license');
+ $mod_subversion = $this->module->getVar('mod_subversion');
$date = date('D Y/m/d G:i:s');
$package = strtolower($mod_name);
@@ -116,8 +118,9 @@
* @license {$mod_license}
* @package {$package}
* @since {$mod_since}
+ * @min_xoops {$mod_min_xoops}
* @author {$mod_author} <{$mod_a_m}> - <{$mod_a_w_url}>
- * @version \$Id: {$mod_version} {$filename} {$mod_subversion} {$date}Z {$mod_credits} \$
+ * @version \$Id: {$mod_version} {$file_name} {$mod_subversion} {$date}Z {$mod_credits} \$
*/
EOT;
return $ret;
@@ -128,7 +131,7 @@
* @param null
*/
public function getModuleName() {
- $ret = strtolower($this->_module->getVar('mod_name'));
+ $ret = strtolower($this->module->getVar('mod_name'));
return $ret;
}
@@ -139,9 +142,9 @@
*/
public function getLanguage($prefix = '', $extra = '') {
if(!empty($extra))
- $ret = $prefix . strtoupper($this->_module->getVar('mod_name')) . $extra;
+ $ret = $prefix . strtoupper($this->module->getVar('mod_name')) . $extra;
else
- $ret = $prefix . strtoupper($this->_module->getVar('mod_name'));
+ $ret = $prefix . strtoupper($this->module->getVar('mod_name'));
return $ret;
}
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -0,0 +1,227 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: htmlsmartycodes.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class HtmlSmartyCodes extends HeaderFile
+{
+ /*
+ * @var mixed
+ */
+ public $table = null;
+ /*
+ * @var string
+ */
+ public $language = null;
+ /*
+ * @public function constructor
+ * @param string $module
+ * @param mixed $table
+ * @param string $file_name
+ */
+ public function __construct($module, $table) {
+ $this->module = $module;
+ $this->table = $table;
+ $this->language = $this->geLanguage('_AM_', '_');
+ }
+ /*
+ * @public function getHtmlDiv
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlDiv($class = '', $content = '') {
+ $ret = <<<EOT
+ <div class='{$class}'>
+ {$content}
+ </div>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlSpan
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlSpan($class = '', $content = '') {
+ $ret = <<<EOT
+ <span class='{$class}'>
+ {$content}
+ </span>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTable
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlTable($class = '', $content = '') {
+ $ret = <<<EOT
+ <table class='{$class}'>
+ {$content}
+ </table>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTable
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlTableThead($class = '', $content = '') {
+ $ret = <<<EOT
+ <thead class='{$class}'>
+ {$content}
+ </thead>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTable
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlTableTbody($class = '', $content = '') {
+ $ret = <<<EOT
+ <tbody class='{$class}'>
+ {$content}
+ </tbody>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTableTfoot
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlTableTfoot($class = '', $content = '') {
+ $ret = <<<EOT
+ <tfoot class='{$class}'>
+ {$content}
+ </tfoot>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTableHead
+ * @param string $class
+ * @param mixed $field_name
+ */
+ public function getHtmlTableHead($class = '', $field_name) {
+ $field_name = strtoupper($field_name);
+ $ret = <<<EOT
+ <th class='{$class}'><{{$this->language}{$field_name}}></th>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTableRow
+ * @param string $class
+ * @param string $content
+ */
+ public function getHtmlTableRow($class = '', $content = '') {
+ $ret = <<<EOT
+ <tr class='{$class}'>
+ {$content}
+ </tr>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getHtmlTableData
+ * @param string $class
+ * @param mixed $field_name
+ */
+ public function getHtmlTableData($class = '', $field_name) {
+ $table_fieldname = $this->table->getVar('table_fieldname');
+ $ret = <<<EOT
+ <td class='{$class}'><{\${$table_fieldname}.{$field_name}}></td>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getSmartyIncludeFile
+ * @param string $name
+ */
+ public function getSmartyIncludeFile($name = 'header') {
+ $module_name = $this->module->getVar('mod_name');
+ $ret = <<<EOT
+ <{include file='db:{$module_name}_{$name}.html'}>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getSmartyConditions
+ * @param string $condition
+ * @param string $operator
+ * @param string $type
+ * @param string $content_if
+ * @param mixed $content_else
+ */
+ public function getSmartyConditions($condition = '', $operator = '==', $type = '1', $content_if = '', $content_else = false) {
+ $ret = '';
+ if(!$content_else) {
+ $ret .= <<<EOT
+ <{if ${$condition} {$operator} {$type}'}>
+ {$content_if}
+ <{/if}>
+EOT;
+ } else {
+ $ret .= <<<EOT
+ <{if ${$condition} {$operator} {$type}'}>
+ {$content_if}
+ <{else}>
+ {$content_else}
+ <{/if}>
+EOT;
+ }
+ return $ret;
+ }
+ /*
+ * @public function getSmartyForeach
+ * @param string $item
+ * @param string $from
+ * @param string $content
+ */
+ public function getSmartyForeach($item = 'item', $from = 'from', $content = 'content') {
+ $ret = <<<EOT
+ <{foreach item={$item} from=${$from}}>
+ {$content}
+ <{/foreach}>
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function getSmartySection
+ * @param string $name
+ * @param string $loop
+ * @param string $content
+ */
+ public function getSmartySection($name = 'name', $loop = 'loop', $content = 'content') {
+ $ret = <<<EOT
+ <{section name={$name} loop=${$loop}}>
+ {$content}
+ <{/section}>
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_footer.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -0,0 +1,57 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: user_footer.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class UserFooter extends HeaderFile
+{
+ /*
+ * @var string
+ */
+ public $_module = '';
+ /*
+ * @var string
+ */
+ public $file_name = null;
+ /*
+ * @public function constructor
+ * @param string $module
+ * @param string $file_name
+ */
+ public function __construct($module, $file_name) {
+ $this->_module = $module;
+ $this->file_name = $file_name;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module_name = $this->getModuleName();
+ $language = $this->getLanguage('_MA_');
+ $ret <<<EOT
+\n// User footer
+include_once XOOPS_ROOT_PATH.'/footer.php';
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php 2014-02-28 21:29:57 UTC (rev 12336)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -31,21 +31,15 @@
/*
* @var string
*/
- public $_table = array();
- /*
- * @var string
- */
public $file_name = null;
/*
* @public function constructor
* @param string $module
* @param string $file_name
*/
- public function __construct($module, $table, $file_name) {
+ public function __construct($module, $file_name) {
$this->_module = $module;
- $this->_table[] = $table;
$this->file_name = $file_name;
- $this->permissions = $permissions;
}
/*
* @public function render
@@ -53,7 +47,8 @@
*/
public function render() {
$module_name = $this->getModuleName();
- $language = $this->getLanguage('_MA_');
+ $language = $this->getLanguage('_MA_');
+ $stu_mod_name = strtoupper($module_name);
$ret <<<EOT
\nrequire_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
\$dirname = \$GLOBALS['xoopsModule']->getVar('dirname');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-02-28 21:29:57 UTC (rev 12336)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -45,7 +45,6 @@
$this->_module = $module;
$this->_table[] = $table;
$this->file_name = $file_name;
- $this->permissions = $permissions;
}
/*
* @public function render
@@ -53,7 +52,7 @@
*/
public function render() {
$module_name = $this->getModuleName();
- $language = $this->getLanguage('_MA_');
+ $language = $this->getLanguage('_MA_', '_');
$ret <<<EOT
\ninclude_once 'header.php';
\$xoopsOption['template_main'] = '{$stl_mod_name}_index.html';
@@ -63,7 +62,7 @@
// keywords
{$stl_mod_name}_meta_keywords(xoops_getModuleOption('keywords', \$dirname));
// description
-{$stl_mod_name}_meta_description({$language}_DESC);
+{$stl_mod_name}_meta_description({$language}DESC);
//
\$GLOBALS['xoopsTpl']->assign('xoops_mpageurl', {$stu_mod_name}_URL.'/index.php');
\$GLOBALS['xoopsTpl']->assign('{$stl_mod_name}_url', {$stu_mod_name}_URL);
@@ -75,7 +74,7 @@
\$GLOBALS['xoopsTpl']->assign('admin', {$stu_mod_name}_ADMIN);
\$GLOBALS['xoopsTpl']->assign('copyright', \$copyright);
//
-include_once XOOPS_ROOT_PATH.'/footer.php';
+include_once 'footer.php';
EOT;
return $ret;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php 2014-02-28 21:29:57 UTC (rev 12336)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php 2014-03-02 01:52:29 UTC (rev 12337)
@@ -27,7 +27,7 @@
/*
* @var string
*/
- public $_module = ;
+ public $_module = null;
/*
* @var string
*/
|
|
From: <luc...@us...> - 2014-02-28 21:30:02
|
Revision: 12336
http://sourceforge.net/p/xoops/svn/12336
Author: luciorota
Date: 2014-02-28 21:29:57 +0000 (Fri, 28 Feb 2014)
Log Message:
-----------
code standardization (in progress), templatization (in progress), improved html2text function
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_import.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_subscription_list_subscriptions.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_subscription_result.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/xoops_version.php
Added Paths:
-----------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/epl-v10.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/html2text.php
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/import.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -424,7 +424,7 @@
default:
//show basic search form
$objImport =& $importHandler->create();
- $form = $objImport->getFormSearch($plugin, $action_after_read, $limitcheck);
+ $form = $objImport->getSearchForm($plugin, $action_after_read, $limitcheck);
$form->display();
break;
}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/letter.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -106,10 +106,11 @@
$tpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
$tpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
$tpl->assign('lastname', _AM_XNEWSLETTER_SUBSCR_LASTNAME);
+ $tpl->assign('title', $letterObj->getVar('letter_title', 'n')); // new from v1.3
$tpl->assign('content', $obj_letter->getVar("letter_content", "n"));
- $tpl->assign('unsubscribe_url', XOOPS_URL . '/modules/xNewsletter/');
+ $tpl->assign('unsubscribe_url', XOOPS_URL . '/modules/xNewsletter/'); // new from v1.3
//$tpl->assign('catsubscr_id', "0");
- $tpl->assign('subscr_email', "");
+ $tpl->assign('subscr_email', '');
echo "<h2>".$obj_letter->getVar("letter_title")."</h2>";
echo "<div style='clear:both'><div style='padding:10px;border:1px solid black'>";
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_import.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_import.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_import.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -46,7 +46,7 @@
$this->initVar("import_status", XOBJ_DTYPE_INT, null, false, 1);
}
- public function getFormSearch($plugin, $action_after_read = 1, $limitcheck = 0, $action = false)
+ public function getSearchForm($plugin, $action_after_read = 1, $limitcheck = 0, $action = false)
{
global $xoopsDB, $xoopsModuleConfig;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_subscr.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_subscr.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xNewsletter_subscr.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -49,7 +49,7 @@
$this->initVar("subscr_actoptions", XOBJ_DTYPE_TXTBOX, null, false, 500);
}
- public function getFormSearch($action = false)
+ public function getSearchForm($action = false)
{
global $xoopsDB, $xoopsModuleConfig;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/docs/changelog.txt 2014-02-28 21:29:57 UTC (rev 12336)
@@ -1,3 +1,9 @@
+Version 1.3
+--------------
+ - templatize user side (luciorota)
+ - standardize code (luciorota)
+ - added html2txt function for non-HTML mail clients (luciorota)
+
Version 1.2
--------------
- standardize code (luciorota)
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -31,6 +31,7 @@
global $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
+include_once XOOPS_ROOT_PATH . '/include/functions.php';
include_once XOOPS_ROOT_PATH . "/modules/{$xoopsModule->getVar('dirname')}/include/config.php";
include_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -49,14 +50,14 @@
}
// 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);
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -25,10 +25,13 @@
* Version : 1 Mon 2012/11/05 14:31:32 : Exp $
* ****************************************************************************
*/
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+include_once dirname(__FILE__) . '/common.php';
-/***************Blocks***************/
function xNewsletter_block_addCatSelect($cats) {
if(is_array($cats)) {
$cat_sql = "(" . current($cats);
@@ -78,6 +81,8 @@
return $xnewsletter_isAdmin;
}
+
+
function xNewsletter_checkEmail($email, $antispam = false) {
include_once XOOPS_ROOT_PATH . '/include/functions.php';
return checkEmail($email, $antispam);
@@ -85,6 +90,13 @@
+function xNewsletter_html2text($html) {
+ include_once XNEWSLETTER_ROOT_PATH . '/include/html2text/html2text.php';
+ return convert_html_to_text($html);
+}
+
+
+
function xNewsletter_CleanVars(&$global, $key, $default = '', $type = 'int', $notset=false) {
include_once XOOPS_ROOT_PATH . '/include/functions.php';
switch ( $type ) {
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/epl-v10.html
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/epl-v10.html (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/epl-v10.html 2014-02-28 21:29:57 UTC (rev 12336)
@@ -0,0 +1,259 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
\ No newline at end of file
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/html2text.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/html2text.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/html2text/html2text.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -0,0 +1,225 @@
+<?php
+/******************************************************************************
+ * Copyright (c) 2010 Jevon Wright and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jevon Wright - initial API and implementation
+ ****************************************************************************/
+
+/**
+ * Tries to convert the given HTML into a plain text format - best suited for
+ * e-mail display, etc.
+ *
+ * <p>In particular, it tries to maintain the following features:
+ * <ul>
+ * <li>Links are maintained, with the 'href' copied over
+ * <li>Information in the <head> is lost
+ * </ul>
+ *
+ * @param html the input HTML
+ * @return the HTML converted, as best as possible, to text
+ */
+function convert_html_to_text($html) {
+ $html = fix_newlines($html);
+
+ $doc = new DOMDocument();
+ if (!$doc->loadHTML($html))
+ throw new Html2TextException("Could not load HTML - badly formed?", $html);
+
+ $output = iterate_over_node($doc);
+
+ // remove leading and trailing spaces on each line
+ $output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output);
+
+ // remove leading and trailing whitespace
+ $output = trim($output);
+
+ return $output;
+}
+
+/**
+ * Unify newlines; in particular, \r\n becomes \n, and
+ * then \r becomes \n. This means that all newlines (Unix, Windows, Mac)
+ * all become \ns.
+ *
+ * @param text text with any number of \r, \r\n and \n combinations
+ * @return the fixed text
+ */
+function fix_newlines($text) {
+ // replace \r\n to \n
+ $text = str_replace("\r\n", "\n", $text);
+ // remove \rs
+ $text = str_replace("\r", "\n", $text);
+
+ return $text;
+}
+
+function next_child_name($node) {
+ // get the next child
+ $nextNode = $node->nextSibling;
+ while ($nextNode != null) {
+ if ($nextNode instanceof DOMElement) {
+ break;
+ }
+ $nextNode = $nextNode->nextSibling;
+ }
+ $nextName = null;
+ if ($nextNode instanceof DOMElement && $nextNode != null) {
+ $nextName = strtolower($nextNode->nodeName);
+ }
+
+ return $nextName;
+}
+function prev_child_name($node) {
+ // get the previous child
+ $nextNode = $node->previousSibling;
+ while ($nextNode != null) {
+ if ($nextNode instanceof DOMElement) {
+ break;
+ }
+ $nextNode = $nextNode->previousSibling;
+ }
+ $nextName = null;
+ if ($nextNode instanceof DOMElement && $nextNode != null) {
+ $nextName = strtolower($nextNode->nodeName);
+ }
+
+ return $nextName;
+}
+
+function iterate_over_node($node) {
+ if ($node instanceof DOMText) {
+ return preg_replace("/\\s+/im", " ", $node->wholeText);
+ }
+ if ($node instanceof DOMDocumentType) {
+ // ignore
+ return "";
+ }
+
+ $nextName = next_child_name($node);
+ $prevName = prev_child_name($node);
+
+ $name = strtolower($node->nodeName);
+
+ // start whitespace
+ switch ($name) {
+ case "hr":
+ return "------\n";
+
+ case "style":
+ case "head":
+ case "title":
+ case "meta":
+ case "script":
+ // ignore these tags
+ return "";
+
+ case "h1":
+ case "h2":
+ case "h3":
+ case "h4":
+ case "h5":
+ case "h6":
+ // add two newlines
+ $output = "\n";
+ break;
+
+ case "p":
+ case "div":
+ // add one line
+ $output = "\n";
+ break;
+
+ default:
+ // print out contents of unknown tags
+ $output = "";
+ break;
+ }
+
+ // debug
+ //$output .= "[$name,$nextName]";
+
+ for ($i = 0; $i < $node->childNodes->length; $i++) {
+ $n = $node->childNodes->item($i);
+
+ $text = iterate_over_node($n);
+
+ $output .= $text;
+ }
+
+ // end whitespace
+ switch ($name) {
+ case "style":
+ case "head":
+ case "title":
+ case "meta":
+ case "script":
+ // ignore these tags
+ return "";
+
+ case "h1":
+ case "h2":
+ case "h3":
+ case "h4":
+ case "h5":
+ case "h6":
+ $output .= "\n";
+ break;
+
+ case "p":
+ case "br":
+ // add one line
+ if ($nextName != "div")
+ $output .= "\n";
+ break;
+
+ case "div":
+ // add one line only if the next child isn't a div
+ if ($nextName != "div" && $nextName != null)
+ $output .= "\n";
+ break;
+
+ case "a":
+ // links are returned in [text](link) format
+ $href = $node->getAttribute("href");
+ if ($href == null) {
+ // it doesn't link anywhere
+ if ($node->getAttribute("name") != null) {
+ $output = "[$output]";
+ }
+ } else {
+ if ($href == $output) {
+ // link to the same address: just use link
+ $output;
+ } else {
+ // replace it
+ $output = "[$output]($href)";
+ }
+ }
+
+ // does the next node require additional whitespace?
+ switch ($nextName) {
+ case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
+ $output .= "\n";
+ break;
+ }
+
+ default:
+ // do nothing
+ }
+
+ return $output;
+}
+
+class Html2TextException extends Exception {
+ var $more_info;
+
+ public function __construct($message = "", $more_info = "") {
+ parent::__construct($message);
+ $this->more_info = $more_info;
+ }
+}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -37,38 +37,38 @@
//check data before creating task list
if ($letter_id == 0) {
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
+ 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);
+ $letterObj = $letterHandler->get($letter_id);
+ if (count($letterObj) == 0) {
+ redirect_header('letter.php', 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
}
//read categories
- $letter_cats = $obj_letter->getVar("letter_cats");
- if ( $letter_cats == "") {
+ $letter_cats = $letterObj->getVar('letter_cats');
+ if ( $letter_cats == '') {
//no cats
- redirect_header("letter.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
+ redirect_header('letter.php', 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
}
- if ($op=="send_test") {
+ 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);
+ $letter_email_test = $letterObj->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") {
+ 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 .= " 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 .= str_replace('|', ',', $letter_cats);
$sql .= "))) GROUP BY subscr_id;";
$subscribers = $xoopsDB->query($sql) or die();
@@ -77,28 +77,28 @@
$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
+ $protocol_criteria = new CriteriaCompo();
+ $protocol_criteria->add(new Criteria('protocol_letter_id', $letter_id));
+ $protocol_criteria->add(new Criteria('protocol_subscriber_id', $subscr_id));
+ $protocol_criteria->add(new Criteria('protocol_success', 1));
+ $protocolCount = $protocolHandler->getCount($protocol_criteria);
+ if ($protocolCount > 0) $subscr_id = 0; //letter already successfully sent
}
if ($subscr_id > 0) {
- if ($subscriber["subscr_actkey"] == "") {
+ if ($subscriber['subscr_actkey'] == '') {
$u = $subscrHandler->get($subscr_id);
- $subscriber["subscr_actkey"] = xoops_makepass();
- $u->setVar("subscr_actkey", $subscriber["subscr_actkey"] );
+ $subscriber['subscr_actkey'] = xoops_makepass();
+ $u->setVar('subscr_actkey', $subscriber['subscr_actkey']);
$subscrHandler->insert($u);
unset($u);
}
- $recipients[] = $subscriber["subscr_id"];
+ $recipients[] = $subscriber['subscr_id'];
}
}
}
if (count($recipients) == 0) {
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR);
+ redirect_header('letter.php', 3, _AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR);
} else {
//creating task list
$counter = 0;
@@ -112,18 +112,24 @@
}
}
$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().")";
+ // create task list item
+ $sql = "INSERT INTO `{$xoopsDB->prefix('mod_xnewsletter_task')}`";
+ $sql .= " (`task_letter_id`, `task_subscr_id`, `task_starttime`, `task_submitter`, `task_created` )";
+ $sql .= " 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);
+ $protocolObj = $protocolHandler->create();
+ $protocolObj->setVar('protocol_letter_id', $letter_id);
+ $protocolObj->setVar('protocol_subscriber_id', $subscriber_id);
+ $protocolObj->setVar('protocol_status', _AM_XNEWSLETTER_TASK_ERROR_CREATE);
+ $protocolObj->setVar('protocol_success', 0);
+ $protocolObj->setVar('protocol_submitter', $submitter);
+ $protocolObj->setVar('protocol_created', time());
+ if ($protocolHandler->insert($protocolObj)) {
+ // create protocol is ok
+ } else {
+ echo $protocolObj->getHtmlErrors();
+ }
+ unset($protocolObj);
}
}
}
@@ -140,7 +146,7 @@
global $XoopsTpl, $xoopsDB, $xoopsUser, $letterHandler, $accountsHandler, $subscrHandler, $attachmentHandler, $xoopsModuleConfig;
- $protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
+ $protocolHandler = xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
include_once(XOOPS_ROOT_PATH . "/class/template.php");
@@ -155,8 +161,9 @@
//get letters ready to send groups by letter_id
$sql = "SELECT `task_letter_id` FROM {$xoopsDB->prefix('mod_xnewsletter_task')}";
- if ($letter_id > 0)
+ 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;
@@ -164,44 +171,45 @@
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) {
+ $letterObj =& $letterHandler->get($letter_id);
+ if (count($letterObj) == 0) {
return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
}
- //read categories
- $letter_cats = $obj_letter->getVar("letter_cats");
- if ( $letter_cats == "") {
+ // read categories
+ $letter_cats = $letterObj->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)
+ // read data of account
+ $letter_account = $letterObj->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");
+ }
+ $accountObj = $accountsHandler->get($letter_account);
+ $account_type = $accountObj->getVar('accounts_type');
+ $account_yourname = $accountObj->getVar('accounts_yourname');
+ $account_yourmail = $accountObj->getVar('accounts_yourmail');
+ $account_username = $accountObj->getVar('accounts_username');
+ $account_password = $accountObj->getVar('accounts_password');
+ $account_server_out = $accountObj->getVar('accounts_server_out');
+ $account_port_out = $accountObj->getVar('accounts_port_out');
+ $account_securetype_out = $accountObj->getVar('accounts_securetype_out');
- //create basic mail body
- $letter_title = $obj_letter->getVar("letter_title");
- $letter_content = $obj_letter->getVar("letter_content", "n");
+ // create basic mail body
+ $letter_title = $letterObj->getVar('letter_title');
+ $letter_content = $letterObj->getVar('letter_content', 'n');
$tpl = new XoopsTpl();
$tpl->assign('content', $letter_content);
- $tpl->assign('title', $letter_title);
+ $tpl->assign('title', $letter_title); // new from v1.3
// read template
- $letter_template = $obj_letter->getVar("letter_template");
+ $letter_template = $letterObj->getVar('letter_template');
- //get emails of subscribers
+ // get emails of subscribers
$recipients = array();
$sql_tasklist = "SELECT `task_id`, `task_subscr_id` FROM {$xoopsDB->prefix('mod_xnewsletter_task')}";
$sql_tasklist .= " WHERE ((`task_letter_id`= {$letter_id}) AND (`task_starttime` < " . time() . "))";
@@ -210,19 +218,19 @@
}
$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"
- );
+ $subscr_id = $task_letter['task_subscr_id'];
+ $task_id = $task_letter['task_id'];
+ if ($subscr_id == 0) {
+ $recipients[] = array(
+ 'task_id' => $task_id,
+ 'address' => $letterObj->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')}";
$sql_subscr .= " WHERE `subscr_id`= {$subscr_id}";
@@ -232,13 +240,13 @@
$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"]
+ '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)
@@ -250,21 +258,21 @@
}
//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)!="/") {
+ $attachment_criteria = new CriteriaCompo();
+ $attachment_criteria->add(new Criteria('attachment_letter_id', $letter_id));
+ $attachment_criteria->setSort('attachment_id');
+ $attachment_criteria->setOrder('ASC');
+ $attachmentCount = $attachmentHandler->getCount($attachment_criteria);
+ if ($attachmentCount > 0) {
+ $attachmentObjs = $attachmentHandler->getall($attachment_criteria);
+ foreach ($attachmentObjs as $attachment_id => $attachmentObj) {
+ $uploaddir = XOOPS_UPLOAD_PATH . $xoopsModuleConfig['xn_attachment_path'];
+ if (substr($uploaddir, -1) != "/") {
//check, whether path seperator is existing
$uploaddir .= "/";
}
$uploaddir .= $letter_id . "/";
- $attachments[] = $uploaddir . $attachment_arr[$attid]->getVar("attachment_name");
+ $attachments[] = $uploaddir . $attachmentObj->getVar("attachment_name");
}
} else {
$attachments = array();
@@ -302,7 +310,7 @@
$mail->Host = $account_server_out; //sometimes necessary to repeat
}
- if ($account_securetype_out !="") {
+ if ($account_securetype_out != '') {
$mail->SMTPAuth = true;
$mail->SMTPSecure = $account_securetype_out; // sets the prefix to the server
}
@@ -312,27 +320,24 @@
$mail->Subject = $letter_title;
foreach ($recipients as $recipient) {
- $subscriber_id = $recipient["subscriber_id"];
+ $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"]);
+ $tpl->assign('sex', $recipient['subscr_sex']);
+ $tpl->assign('firstname', $recipient['firstname']);
+ $tpl->assign('lastname', $recipient['lastname']);
+ $tpl->assign('subscr_email', $recipient['address']);
+ $activationKey = base64_encode(XOOPS_URL . "||{$subscriber_id}||{$recipient['subscriber_actkey']}||{$recipient['address']}");
+ $tpl->assign('unsubscribe_link', XOOPS_URL . "/modules/xNewsletter/subscription.php?op=unsub&email={$recipient['address']}&actkey={$activationKey}");
- $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);
+ $htmlBody = $tpl->fetch($template_path . $letter_template . '.html');
+ //$textBody = _AM_XNEWSLETTER_LETTER_EMAIL_ALTBODY;
+ //$textBody = strip_tags($htmlBody . "\n" . $link);
+ $textBody = xNewsletter_html2text($htmlBody); // new from v1.3
- $body = $tpl->fetch($template_path . $letter_template . '.html');
+ $mail->AddAddress($recipient['address'], $recipient['firstname'] . " " . $recipient['lastname']);
+ $mail->MsgHTML($htmlBody); // $mail->Body = $htmlBody;
+ $mail->AltBody = $textBody;
- $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);
@@ -361,24 +366,23 @@
$mail->ClearAddresses();
//delete item in table task
- $sql_del = "DELETE FROM {$xoopsDB->prefix('mod_xnewsletter_task')}";
- $sql_del .= " WHERE `task_id`= {$recipient["task_id"]}";
- $result = $xoopsDB->queryF($sql_del);
+ $sql_delete = "DELETE FROM {$xoopsDB->prefix('mod_xnewsletter_task')}";
+ $sql_delete .= " WHERE `task_id`= {$recipient["task_id"]}";
+ $result = $xoopsDB->queryF($sql_delete);
- $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
+ $protocolObj = $protocolHandler->create();
+ $protocolObj->setVar('protocol_letter_id', $letter_id);
+ $protocolObj->setVar('protocol_subscriber_id', $subscriber_id);
+ $protocolObj->setVar('protocol_status', $protocol_status);
+ $protocolObj->setVar('protocol_success', $protocol_success);
+ $protocolObj->setVar('protocol_submitter', $senderuid);
+ $protocolObj->setVar('protocol_created', time());
+ if ($protocolHandler->insert($protocolObj)) {
+ // create protocol is ok
} else {
- echo $obj_protocol->getHtmlErrors();
+ echo $protocolObj->getHtmlErrors();
}
- unset($obj_protocol);
+ unset($protocolObj);
}
unset($mail);
@@ -409,20 +413,19 @@
$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
+ $protocolObj = $protocolHandler->create();
+ $protocolObj->setVar('protocol_letter_id', $letter_id);
+ $protocolObj->setVar('protocol_subscriber_id', 0);
+ $protocolObj->setVar('protocol_status', $protocol_status);
+ $protocolObj->setVar('protocol_success', $protocol_success);
+ $protocolObj->setVar('protocol_submitter', $senderuid);
+ $protocolObj->setVar('protocol_created', time());
+ if ($protocolHandler->insert($protocolObj)) {
+ // create protocol is ok
} else {
- echo $obj_protocol->getHtmlErrors();
+ echo $protocolObj->getHtmlErrors();
}
- unset($obj_protocol);
+ unset($protocolObj);
return $protocol_status;
}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -87,10 +87,11 @@
$xoopsTpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
$xoopsTpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
$xoopsTpl->assign('lastname', _AM_XNEWSLETTER_SUBSCR_LASTNAME);
- $xoopsTpl->assign('title', $letterObj->getVar('letter_title', 'n'));
+ $xoopsTpl->assign('title', $letterObj->getVar('letter_title', 'n')); // new from v1.3
$xoopsTpl->assign('content', $letterObj->getVar('letter_content', 'n'));
$xoopsTpl->assign('unsubscribe_url', XOOPS_URL . '/modules/xNewsletter/');
$xoopsTpl->assign('catsubscr_id', '0');
+ $xoopsTpl->assign('subscr_email', '');
$letter_array = $letterObj->toArray();
$letter_array['letter_content_templated'] = $xoopsTpl->fetch($letterTemplate);
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -234,7 +234,7 @@
$xoopsTpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
$xoopsTpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
$xoopsTpl->assign('lastname', _AM_XNEWSLETTER_SUBSCR_LASTNAME);
- $xoopsTpl->assign('title', $letterObj->getVar('letter_title', 'n'));
+ $xoopsTpl->assign('title', $letterObj->getVar('letter_title', 'n')); // new from v1.3
$xoopsTpl->assign('content', $letterObj->getVar('letter_content', 'n'));
$xoopsTpl->assign('unsubscribe_url', XOOPS_URL . '/modules/xNewsletter/');
$xoopsTpl->assign('catsubscr_id', '0');
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -83,7 +83,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -83,7 +83,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -82,7 +82,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -83,7 +83,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -83,7 +83,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -82,7 +82,6 @@
echo $importObj->getHtmlErrors();
exit();
}
- unset($importObj);
// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php 2014-02-28 10:31:35 UTC (rev 12335)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php 2014-02-28 21:29:57 UTC (rev 12336)
@@ -86,7 +8...
[truncated message content] |
|
From: <be...@us...> - 2014-02-28 10:31:40
|
Revision: 12335
http://sourceforge.net/p/xoops/svn/12335
Author: beckmi
Date: 2014-02-28 10:31:35 +0000 (Fri, 28 Feb 2014)
Log Message:
-----------
Adding images for release
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png 2014-02-27 08:02:54 UTC (rev 12334)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png 2014-02-28 10:31:35 UTC (rev 12335)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/error.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png 2014-02-27 08:02:54 UTC (rev 12334)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png 2014-02-28 10:31:35 UTC (rev 12335)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/16/warning.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png 2014-02-27 08:02:54 UTC (rev 12334)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png 2014-02-28 10:31:35 UTC (rev 12335)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-Beta1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png 2014-02-27 08:02:54 UTC (rev 12334)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png 2014-02-28 10:31:35 UTC (rev 12335)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7-RC1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png 2014-02-27 08:02:54 UTC (rev 12334)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png 2014-02-28 10:31:35 UTC (rev 12335)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/img/xoops_2.5.7.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
|
|
From: <be...@us...> - 2014-02-27 08:03:02
|
Revision: 12334
http://sourceforge.net/p/xoops/svn/12334
Author: beckmi
Date: 2014-02-27 08:02:54 +0000 (Thu, 27 Feb 2014)
Log Message:
-----------
fixed language auto-detection (Rewarder/Mamba) - need testing
Modified Paths:
--------------
XoopsModules/xlanguage/trunk/xlanguage/docs/changelog.txt
XoopsModules/xlanguage/trunk/xlanguage/include/functions.php
XoopsModules/xlanguage/trunk/xlanguage/include/vars.php
XoopsModules/xlanguage/trunk/xlanguage/xoops_version.php
Modified: XoopsModules/xlanguage/trunk/xlanguage/docs/changelog.txt
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/docs/changelog.txt 2014-02-26 02:34:32 UTC (rev 12333)
+++ XoopsModules/xlanguage/trunk/xlanguage/docs/changelog.txt 2014-02-27 08:02:54 UTC (rev 12334)
@@ -1,5 +1,9 @@
xlanguage 3.04:
-------------------
+- fixed language auto-detection (Rewarder/Mamba)
+
+xlanguage 3.04:
+-------------------
- updated POSIX Regex to PCRE (Mamba)
- minor fixes (Mamba)
- fixing generation of configuration file for extended languages
@@ -26,12 +30,12 @@
-------------------
"input" parse improvement, reported by irmtfan @ xoops.org
-xlanguage 2.02
+xlanguage 2.02
-------------------
bugfix for XSS vulnerability
Thanks domifara @ dev.xoops.org
-xlanguage 2.01
+xlanguage 2.01
-------------------
bugfix for nonexisting language
Modified: XoopsModules/xlanguage/trunk/xlanguage/include/functions.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/include/functions.php 2014-02-26 02:34:32 UTC (rev 12333)
+++ XoopsModules/xlanguage/trunk/xlanguage/include/functions.php 2014-02-27 08:02:54 UTC (rev 12334)
@@ -30,57 +30,60 @@
function xlanguage_convert_encoding($value, $out_charset, $in_charset)
{
- if (is_array($value)) {
- foreach($value as $key => $val){
- $value[$key] = xlanguage_convert_encoding($val, $out_charset, $in_charset);
- }
- }
- else {
- $value = xlanguage_convert_item($value, $out_charset, $in_charset);
- }
- return $value;
+ if (is_array($value)) {
+ foreach ($value as $key => $val) {
+ $value[$key] = xlanguage_convert_encoding($val, $out_charset, $in_charset);
+ }
+ } else {
+ $value = xlanguage_convert_item($value, $out_charset, $in_charset);
+ }
+
+ return $value;
}
function xlanguage_convert_item($value, $out_charset, $in_charset)
{
- if(strtolower($in_charset) == strtolower($out_charset)) {
- return $value;
- }
- $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true);
- if(is_object($xconv_handler) &&
- $converted_value = @$xconv_handler->convert_encoding($value, $out_charset, $in_charset)
- ){
- return $converted_value;
- }
- if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) {
- $converted_value = @mb_convert_encoding($value, $out_charset, $in_charset);
- }elseif(function_exists('iconv')) {
- $converted_value = @iconv($in_charset, $out_charset, $value);
- }
- $value = empty($converted_value) ? $value : $converted_value;
+ if (strtolower($in_charset) == strtolower($out_charset)) {
+ return $value;
+ }
+ $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true);
+ if (is_object($xconv_handler)
+ && $converted_value = @$xconv_handler->convert_encoding($value, $out_charset, $in_charset)
+ ) {
+ return $converted_value;
+ }
+ if (XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) {
+ $converted_value = @mb_convert_encoding($value, $out_charset, $in_charset);
+ } elseif (function_exists('iconv')) {
+ $converted_value = @iconv($in_charset, $out_charset, $value);
+ }
+ $value = empty($converted_value) ? $value : $converted_value;
- return $value;
+ return $value;
}
function xlanguage_createConfig()
{
- $xlang_handler=& xoops_getmodulehandler('language', 'xlanguage');
- return $xlang_handler->createConfig();
+ $xlang_handler =& xoops_getmodulehandler('language', 'xlanguage');
+
+ return $xlang_handler->createConfig();
}
function &xlanguage_loadConfig()
{
- $xlang_handler=& xoops_getmodulehandler('language', 'xlanguage');
- $config =& $xlang_handler->loadFileConfig();
- return $config;
+ $xlang_handler =& xoops_getmodulehandler('language', 'xlanguage');
+ $config =& $xlang_handler->loadFileConfig();
+
+ return $config;
}
/**
* Analyzes some PHP environment variables to find the most probable language
* that should be used
*
- * @param string $ string to analyze
- * @param integer $ type of the PHP environment variable which value is $str
+ * @param string $ string to analyze
+ * @param integer $ type of the PHP environment variable which value is $str
+ *
* @global array the list of available translations
* @global string the retained translation keyword
* @access private
@@ -88,196 +91,249 @@
function xlanguage_lang_detect($str = '', $envType = '')
{
global $available_languages;
- $lang='';
-
- if(!empty($available_languages)) {
- foreach ($available_languages AS $key => $value) {
- // $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable,
- // 2 for the 'HTTP_USER_AGENT' one
- $expr = $value[0];
- if (strpos($expr, '[-_]') === FALSE) {
- $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
- }
+ $lang = '';
+
+ if (!empty($available_languages)) {
+ foreach ($available_languages AS $key => $value) {
+ // $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable,
+ // 2 for the 'HTTP_USER_AGENT' one
+ $expr = $value[0];
+ if (strpos($expr, '[-_]') === false) {
+ $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
+ }
// if (($envType == 1 && eregi('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$', $str))
// || ($envType == 2 && eregi('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) {
- if (($envType == 1 && preg_match('#^(' . $expr . ')(;q=[0-9]\\.[0-9])?$#i', $str))
- || ($envType == 2 && preg_match('#(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))#i', $str))) {
- $lang = $key;
- //if($lang != 'en')
- break;
+ if (($envType == 1 && preg_match('#^(' . $expr . ')(;q=[0-9]\\.[0-9])?$#i', $str))
+ || ($envType == 2 && preg_match('#(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))#i', $str))
+ ) {
+ $lang = $key;
+ //if($lang != 'en')
+ break;
+ }
}
}
- }
+
return $lang;
}
function xlanguage_detectLang()
{
- global $available_languages,$_SERVER;
+ global $available_languages, $_SERVER;
- if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
- $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
- }
+ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
+ }
- if (!empty($_SERVER['HTTP_USER_AGENT'])) {
- $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
- }
+ if (!empty($_SERVER['HTTP_USER_AGENT'])) {
+ $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
+ }
- $lang = '';
- $xoops_lang ='';
- // 1. try to findout user's language by checking its HTTP_ACCEPT_LANGUAGE
- // variable
- if (empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE)) {
- $accepted = explode(',', $HTTP_ACCEPT_LANGUAGE);
- $acceptedCnt = count($accepted);
- reset($accepted);
- for ($i = 0; $i < $acceptedCnt; $i++) {
- $lang = xlanguage_lang_detect($accepted[$i], 1);
- if(strncasecmp($lang,'en',2)){
- break;
- }
- }
- }
- // 2. try to findout user's language by checking its HTTP_USER_AGENT variable
- if (empty($lang) && !empty($HTTP_USER_AGENT)) {
- $lang = xlanguage_lang_detect($HTTP_USER_AGENT, 2);
- }
- // 3. If we catch a valid language, configure it
- if (!empty($lang)) {
- $xoops_lang = $available_languages[$lang][1];
- }
- return $xoops_lang;
+ $lang = '';
+ $xoops_lang = '';
+ // 1. try to findout user's language by checking its HTTP_ACCEPT_LANGUAGE variable
+
+
+// if (empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE)) {
+// $accepted = explode(',', $HTTP_ACCEPT_LANGUAGE);
+// $acceptedCnt = count($accepted);
+// reset($accepted);
+// for ($i = 0; $i < $acceptedCnt; ++$i) {
+// $lang = xlanguage_lang_detect($accepted[$i], 1);
+// if (strncasecmp($lang, 'en', 2)) {
+// break;
+// }
+// }
+// }
+
+
+
+//This returns the most preferred langauage "q=1"
+ $lang = getPreferredLanguage();
+
+
+ // 2. if not found in HTTP_ACCEPT_LANGUAGE, try to find user's language by checking its HTTP_USER_AGENT variable
+ if (empty($lang) && !empty($HTTP_USER_AGENT)) {
+ $lang = xlanguage_lang_detect($HTTP_USER_AGENT, 2);
+ }
+ // 3. If we catch a valid language, configure it
+ if (!empty($lang)) {
+ $xoops_lang = $available_languages[$lang][1];
+ }
+
+ return $xoops_lang;
}
-function xlanguage_encoding($output){
- global $xlanguage;
- $output = xlanguage_ml($output);
- // escape XML doc
- if(preg_match("/^\<\?[\s]?xml[\s]+version=([\"'])[^\>]+\\1[\s]+encoding=([\"'])[^\>]+\\2[\s]?\?\>/i", $output)){
- return $output;
- }
- $in_charset = $xlanguage["charset_base"];
+function xlanguage_encoding($output)
+{
+ global $xlanguage;
+ $output = xlanguage_ml($output);
+ // escape XML doc
+ if (preg_match("/^\<\?[\s]?xml[\s]+version=([\"'])[^\>]+\\1[\s]+encoding=([\"'])[^\>]+\\2[\s]?\?\>/i", $output)) {
+ return $output;
+ }
+ $in_charset = $xlanguage["charset_base"];
$out_charset = $xlanguage["charset"];
-
- return $output = xlanguage_convert_encoding($output, $out_charset, $in_charset);
+
+ return $output = xlanguage_convert_encoding($output, $out_charset, $in_charset);
}
function xlanguage_ml($s)
{
- global $xoopsConfig;
- global $xlanguage_langs;
-
- if(!isset($xlanguage_langs)){
- $langs =& $GLOBALS["xlanguage_handler"]->getAll(true);
- foreach( array_keys($langs) as $_lang ) {
- $xlanguage_langs[$_lang] = $langs[$_lang]->getVar("lang_code");
- }
- unset($langs);
- }
- if(empty($xlanguage_langs) || count($xlanguage_langs) ==0) return $s;
-
- // escape brackets inside of <code>...</code>
- $patterns[] = '/(\<code>.*\<\/code>)/isU';
-
- // escape brackets inside of <input type="..." value="...">
- $patterns[] = '/(\<input\b(?![^\>]*\btype=([\'"]?)(submit|image|reset|button))[^\>]*\>)/isU';
-
- // escape brackets inside of <textarea></textarea>
- $patterns[] = '/(\<textarea\b[^>]*>[^\<]*\<\/textarea>)/isU';
-
- $s = preg_replace_callback( $patterns , 'xlanguage_ml_escape_bracket' , $s ) ;
-
-
- // create the pattern between language tags
- $pqhtmltags = explode( ',' , preg_quote( XLANGUAGE_TAGS_RESERVED , '/' ) ) ;
- $mid_pattern = '(?:(?!(' . implode( '|' , $pqhtmltags ) . ')).)*' ;
-
- $patterns = array();
- $replaces = array();
- /* */
- if(isset($xlanguage_langs[$xoopsConfig['language']])) {
- $lang = $xlanguage_langs[$xoopsConfig['language']];
- $patterns[] = '/(\[([^\]]*\|)?'.preg_quote($lang).'(\|[^\]]*)?\])('.$mid_pattern.')(\[\/([^\]]*\|)?'.preg_quote($lang).'(\|[^\]]*)?\])/isU';
- $replaces[] = '$4';
- }
- /* */
- foreach( array_keys($xlanguage_langs) as $_lang ) {
- if($_lang == @$xoopsConfig['language']) continue;
- $name = $xlanguage_langs[$_lang];
- $patterns[] = '/(\[([^\]]*\|)?'.preg_quote($name).'(\|[^\]]*)?\])('.$mid_pattern.')(\[\/([^\]]*\|)?'.preg_quote($name).'(\|[^\]]*)?(\]\<br[\s]?[\/]?\>|\]))/isU';
- $replaces[] = '';
- }
- if(!empty($xoopsConfig['language'])){
- $s = preg_replace( '/\[[\/]?[\|]?'.preg_quote($xoopsConfig['language']).'[\|]?\](\<br \/\>)?/i' , '' , $s ) ;
- }
- if(count($replaces)>0){
- $s = preg_replace( $patterns , $replaces , $s ) ;
- }
+ global $xoopsConfig;
+ global $xlanguage_langs;
- return $s ;
+ if (!isset($xlanguage_langs)) {
+ $langs =& $GLOBALS["xlanguage_handler"]->getAll(true);
+ foreach (array_keys($langs) as $_lang) {
+ $xlanguage_langs[$_lang] = $langs[$_lang]->getVar("lang_code");
+ }
+ unset($langs);
+ }
+ if (empty($xlanguage_langs) || count($xlanguage_langs) == 0) {
+ return $s;
+ }
+
+ // escape brackets inside of <code>...</code>
+ $patterns[] = '/(\<code>.*\<\/code>)/isU';
+
+ // escape brackets inside of <input type="..." value="...">
+ $patterns[] = '/(\<input\b(?![^\>]*\btype=([\'"]?)(submit|image|reset|button))[^\>]*\>)/isU';
+
+ // escape brackets inside of <textarea></textarea>
+ $patterns[] = '/(\<textarea\b[^>]*>[^\<]*\<\/textarea>)/isU';
+
+ $s = preg_replace_callback($patterns, 'xlanguage_ml_escape_bracket', $s);
+
+ // create the pattern between language tags
+ $pqhtmltags = explode(',', preg_quote(XLANGUAGE_TAGS_RESERVED, '/'));
+ $mid_pattern = '(?:(?!(' . implode('|', $pqhtmltags) . ')).)*';
+
+ $patterns = array();
+ $replaces = array();
+ /* */
+ if (isset($xlanguage_langs[$xoopsConfig['language']])) {
+ $lang = $xlanguage_langs[$xoopsConfig['language']];
+ $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])/isU';
+ $replaces[] = '$4';
+ }
+ /* */
+ foreach (array_keys($xlanguage_langs) as $_lang) {
+ if ($_lang == @$xoopsConfig['language']) {
+ continue;
+ }
+ $name = $xlanguage_langs[$_lang];
+ $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?(\]\<br[\s]?[\/]?\>|\]))/isU';
+ $replaces[] = '';
+ }
+ if (!empty($xoopsConfig['language'])) {
+ $s = preg_replace('/\[[\/]?[\|]?' . preg_quote($xoopsConfig['language']) . '[\|]?\](\<br \/\>)?/i', '', $s);
+ }
+ if (count($replaces) > 0) {
+ $s = preg_replace($patterns, $replaces, $s);
+ }
+
+ return $s;
}
-function xlanguage_ml_escape_bracket( $matches )
+function xlanguage_ml_escape_bracket($matches)
{
- global $xlanguage_langs;
- $ret = $matches[1];
- if(!empty($xlanguage_langs)) {
- $pattern = '/(\[([\/])?('.implode("|",array_map("preg_quote", array_values($xlanguage_langs))).')([\|\]]))/isU';
- $ret = preg_replace($pattern, "[\\2\\3\\4", $ret);
- }
- return $ret;
+ global $xlanguage_langs;
+ $ret = $matches[1];
+ if (!empty($xlanguage_langs)) {
+ $pattern = '/(\[([\/])?(' . implode("|", array_map("preg_quote", array_values($xlanguage_langs))) . ')([\|\]]))/isU';
+ $ret = preg_replace($pattern, "[\\2\\3\\4", $ret);
+ }
+
+ return $ret;
}
-
function xlanguage_select_show($options = null)
{
- include_once XOOPS_ROOT_PATH."/modules/xlanguage/blocks/xlanguage_blocks.php";
- if(empty($options)){
- $options[0] = "images"; // display style: image, text, select
- $options[1] = " "; // delimitor
- $options[2] = 5; // items per line
- }
-
- $block = b_xlanguage_select_show($options);
- $block["tag"] = "xlanguage";
-
- $content = "";
- $i = 1;
- if(!empty($block["display"])) { //mb
- if(in_array($block["display"], array("images", "text"))){
- foreach($block["languages"] as $name => $lang){
- $content .= "<a href=\"".$block["url"].$lang["name"]."\" title=\"".$lang["desc"]."\">";
- if($block["display"] == "images"){
- $content .= "<img src=\"".$lang["image"]."\" alt=\"".$lang["desc"]."\"";
- if($block["selected"] != $lang["name"]){
- $content .= " style=\"MozOpacity: .8; opacity: .8; filter:Alpha(opacity=80);\"";
- }
- $content .= "/>";
- }else{
- $content .= $lang["desc"];
- }
- $content .= "</a>";
- if( ( $i++ % $block["number"] ) == 0){
- $content .= "<br />";
- }
- }
- }else{
- $content .= "<select name=\"".$block["tag"]."\"
- onChange=\"if(this.options[this.selectedIndex].value.length >0 ) { window.document.location=this.options[this.selectedIndex].value;}\"
- >";
- if(!empty($block["languages"])) { //mb
- foreach($block["languages"] as $name => $lang){
- $content .= "<option value=\"".$block["url"].$lang["name"]."\"";
- if($block["selected"] == $lang["name"]){
- $content .= " selected ";
- }
- $content .= "/>".$lang["desc"]."</option>";
- }
- }
- $content .= "</select>";
- }
- }
+ include_once XOOPS_ROOT_PATH . "/modules/xlanguage/blocks/xlanguage_blocks.php";
+ if (empty($options)) {
+ $options[0] = "images"; // display style: image, text, select
+ $options[1] = " "; // delimitor
+ $options[2] = 5; // items per line
+ }
- define("XLANGUAGE_SWITCH_CODE", $content);
- return true;
-}
\ No newline at end of file
+ $block = b_xlanguage_select_show($options);
+ $block["tag"] = "xlanguage";
+
+ $content = "";
+ $i = 1;
+ if (!empty($block["display"])) { //mb
+ if (in_array($block["display"], array("images", "text"))) {
+ foreach ($block["languages"] as $name => $lang) {
+ $content .= "<a href=\"" . $block["url"] . $lang["name"] . "\" title=\"" . $lang["desc"] . "\">";
+ if ($block["display"] == "images") {
+ $content .= "<img src=\"" . $lang["image"] . "\" alt=\"" . $lang["desc"] . "\"";
+ if ($block["selected"] != $lang["name"]) {
+ $content .= " style=\"MozOpacity: .8; opacity: .8; filter:Alpha(opacity=80);\"";
+ }
+ $content .= "/>";
+ } else {
+ $content .= $lang["desc"];
+ }
+ $content .= "</a>";
+ if ((++$i % $block["number"]) == 0) {
+ $content .= "<br />";
+ }
+ }
+ } else {
+ $content .= "<select name=\"" . $block["tag"] . "\"
+ onChange=\"if (this.options[this.selectedIndex].value.length >0) { window.document.location=this.options[this.selectedIndex].value;}\"
+ >";
+ if (!empty($block["languages"])) { //mb
+ foreach ($block["languages"] as $name => $lang) {
+ $content .= "<option value=\"" . $block["url"] . $lang["name"] . "\"";
+ if ($block["selected"] == $lang["name"]) {
+ $content .= " selected ";
+ }
+ $content .= "/>" . $lang["desc"] . "</option>";
+ }
+ }
+ $content .= "</select>";
+ }
+ }
+
+ define("XLANGUAGE_SWITCH_CODE", $content);
+
+ return true;
+}
+
+
+
+function getPreferredLanguage()
+{
+ $langs = array();
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+// break up string into pieces (languages and q factors)
+ preg_match_all(
+ '/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i',
+ $_SERVER['HTTP_ACCEPT_LANGUAGE'],
+ $lang_parse
+ );
+ if (count($lang_parse[1])) {
+ // create a list like "en" => 0.8
+ $langs = array_combine($lang_parse[1], $lang_parse[4]);
+ // set default to 1 for any without q factor
+ foreach ($langs as $lang => $val) {
+ if ($val === '') {
+ $langs[$lang] = 1;
+ }
+ }
+ // sort list based on value
+ arsort($langs, SORT_NUMERIC);
+ }
+ }
+//extract most important (first)
+ foreach ($langs as $lang => $val) {
+ break;
+ }
+//if complex language simplify it
+ if (stristr($lang, "-")) {
+ $tmp = explode("-", $lang);
+ $lang = $tmp[0];
+ }
+ return $lang;
+}
Modified: XoopsModules/xlanguage/trunk/xlanguage/include/vars.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/include/vars.php 2014-02-26 02:34:32 UTC (rev 12333)
+++ XoopsModules/xlanguage/trunk/xlanguage/include/vars.php 2014-02-27 08:02:54 UTC (rev 12334)
@@ -1,107 +1,117 @@
-<?php
-// $Id$
-// ------------------------------------------------------------------------ //
-// Xlanguage: eXtensible Language Management For Xoops //
-// Copyright (c) 2004 Xoops China Community //
-// <http://www.xoops.org.cn/> //
-// ------------------------------------------------------------------------ //
-// This program is free software; you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation; either version 2 of the License, or //
-// (at your option) any later version. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
-// Author: D.J.(phppp) ph...@ho... //
-// URL: http://www.xoops.org.cn //
-// ------------------------------------------------------------------------- //
-if(!defined('XLANGUAGE_CONFIG_FILE')) define('XLANGUAGE_CONFIG_FILE', XOOPS_CACHE_PATH.'/xlanguage.php');
-if(!defined('XLANGUAGE_CONFIG_VAR')) define('XLANGUAGE_CONFIG_VAR', 'cached_config');
-if(!defined('XLANGUAGE_LANG_TAG')) define('XLANGUAGE_LANG_TAG', "lang");
-if(!defined('XLANGUAGE_TAGS_RESERVED')) define('XLANGUAGE_TAGS_RESERVED', "</head>,</body>");
-
-/**
- * phpMyAdmin Language Loading File
- */
-
-/**
- * All the supported languages have to be listed in the array below.
- * 1. The key must be the "official" ISO 639 language code and, if required,
- * the dialect code. It can also contains some informations about the
- * charset (see the Russian case).
- * 2. The first of the values associated to the key is used in a regular
- * expression to find some keywords corresponding to the language inside two
- * environment variables.
- * These values contains:
- * - the "official" ISO language code and, if required, the dialect code
- * also ('bu' for Bulgarian, 'fr([-_][[:alpha:]]{2})?' for all French
- * dialects, 'zh[-_]tw' for Chinese traditional...);
- * - the '|' character (it means 'OR');
- * - the full language name.
- * 3. The second values associated to the key is the name of the file to load
- * without the '.php' extension.
- * 4. The last values associated to the key is the language code as defined by
- * the RFC1766.
- *
- * Beware that the sorting order (first values associated to keys by
- * alphabetical reverse order in the array) is important: 'zh-tw' (chinese
- * traditional) must be detected before 'zh' (chinese simplified) for
- * example.
- *
- * When there are more than one charset for a language, we put the -utf-8
- * first.
- */
-$available_languages = array(
- 'ar' => array('ar([-_][[:alpha:]]{2})?|arabic', 'arabic'),
- 'bg' => array('bg|bulgarian', 'bulgarian'),
- 'ca' => array('ca|catalan', 'catalan'),
- 'cs' => array('cs|czech', 'czech'),
- 'da' => array('da|danish', 'danish'),
- 'de' => array('de([-_][[:alpha:]]{2})?|german', 'german'),
- 'el' => array('el|greek', 'greek'),
- 'en' => array('en([-_][[:alpha:]]{2})?|english', 'english'),
- 'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish'),
- 'et' => array('et|estonian', 'estonian'),
- 'fi' => array('fi|finnish', 'finnish'),
- 'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french'),
- 'gl' => array('gl|galician', 'galician'),
- 'he' => array('he|hebrew', 'hebrew'),
- 'hr' => array('hr|croatian', 'croatian'),
- 'hu' => array('hu|hungarian', 'hungarian'),
- 'id' => array('id|indonesian', 'indonesian'),
- 'it' => array('it|italian', 'italian'),
- 'ja' => array('ja|japanese', 'japanese'),
- 'ko' => array('ko|korean', 'koreano'),
- 'ka' => array('ka|georgian', 'georgian'),
- 'lt' => array('lt|lithuanian', 'lithuanian'),
- 'lv' => array('lv|latvian', 'latvian'),
- 'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch'),
- 'no' => array('no|norwegian', 'norwegian'),
- 'pl' => array('pl|polish', 'polish'),
- 'pt-br' => array('pt[-_]br|brazilian portuguese', 'portuguesebr'),
- 'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese'),
- 'ro' => array('ro|romanian', 'romanian'),
- 'ru' => array('ru|russian', 'russian'),
- 'sk' => array('sk|slovak', 'slovak'),
- 'sq' => array('sq|albanian', 'albanian'),
- 'sr' => array('sr|serbian', 'serbian'),
- 'sv' => array('sv|swedish', 'swedish'),
- 'th' => array('th|thai', 'thai'),
- 'tr' => array('tr|turkish', 'turkish'),
- 'uk' => array('uk|ukrainian', 'ukrainian'),
- 'zh-tw' => array('zh[-_]tw|chinese traditional', 'tchinese'),
- 'zh-cn' => array('zh[-_]cn|chinese simplified', 'schinese'),
- );
-?>
\ No newline at end of file
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// Xlanguage: eXtensible Language Management For Xoops //
+// Copyright (c) 2004 Xoops China Community //
+// <http://www.xoops.org.cn/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: D.J.(phppp) ph...@ho... //
+// URL: http://www.xoops.org.cn //
+// ------------------------------------------------------------------------- //
+if (!defined('XLANGUAGE_CONFIG_FILE')) {
+ define('XLANGUAGE_CONFIG_FILE', XOOPS_CACHE_PATH . '/xlanguage.php');
+}
+if (!defined('XLANGUAGE_CONFIG_VAR')) {
+ define('XLANGUAGE_CONFIG_VAR', 'cached_config');
+}
+if (!defined('XLANGUAGE_LANG_TAG')) {
+ define('XLANGUAGE_LANG_TAG', "lang");
+}
+if (!defined('XLANGUAGE_TAGS_RESERVED')) {
+ define('XLANGUAGE_TAGS_RESERVED', "</head>,</body>");
+}
+
+/**
+ * phpMyAdmin Language Loading File
+ */
+
+/**
+ * All the supported languages have to be listed in the array below.
+ * 1. The key must be the "official" ISO 639 language code and, if required,
+ * the dialect code. It can also contains some informations about the
+ * charset (see the Russian case).
+ * 2. The first of the values associated to the key is used in a regular
+ * expression to find some keywords corresponding to the language inside two
+ * environment variables.
+ * These values contains:
+ * - the "official" ISO language code and, if required, the dialect code
+ * also ('bu' for Bulgarian, 'fr([-_][[:alpha:]]{2})?' for all French
+ * dialects, 'zh[-_]tw' for Chinese traditional...);
+ * - the '|' character (it means 'OR');
+ * - the full language name.
+ * 3. The second values associated to the key is the name of the file to load
+ * without the '.php' extension.
+ * 4. The last values associated to the key is the language code as defined by
+ * the RFC1766.
+ *
+ * Beware that the sorting order (first values associated to keys by
+ * alphabetical reverse order in the array) is important: 'zh-tw' (chinese
+ * traditional) must be detected before 'zh' (chinese simplified) for
+ * example.
+ *
+ * When there are more than one charset for a language, we put the -utf-8
+ * first.
+ */
+$available_languages = array(
+ 'ar' => array('ar([-_][[:alpha:]]{2})?|arabic', 'arabic'),
+ 'bg' => array('bg|bulgarian', 'bulgarian'),
+ 'ca' => array('ca|catalan', 'catalan'),
+ 'cs' => array('cs|czech', 'czech'),
+ 'da' => array('da|danish', 'danish'),
+ 'de' => array('de([-_][[:alpha:]]{2})?|german', 'german'),
+ 'el' => array('el|greek', 'greek'),
+ 'en' => array('en([-_][[:alpha:]]{2})?|english', 'english'),
+ 'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish'),
+ 'et' => array('et|estonian', 'estonian'),
+ 'fi' => array('fi|finnish', 'finnish'),
+ 'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french'),
+ 'gl' => array('gl|galician', 'galician'),
+ 'he' => array('he|hebrew', 'hebrew'),
+ 'hr' => array('hr|croatian', 'croatian'),
+ 'hu' => array('hu|hungarian', 'hungarian'),
+ 'id' => array('id|indonesian', 'indonesian'),
+ 'it' => array('it|italian', 'italian'),
+ 'ja' => array('ja|japanese', 'japanese'),
+ 'ko' => array('ko|korean', 'koreano'),
+ 'ka' => array('ka|georgian', 'georgian'),
+ 'lt' => array('lt|lithuanian', 'lithuanian'),
+ 'lv' => array('lv|latvian', 'latvian'),
+ 'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch'),
+ 'no' => array('no|norwegian', 'norwegian'),
+ 'pl' => array('pl|polish', 'polish'),
+ 'pt-br' => array('pt[-_]br|brazilian portuguese', 'portuguesebr'),
+ 'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese'),
+ 'ro' => array('ro|romanian', 'romanian'),
+ 'ru' => array('ru|russian', 'russian'),
+ 'sk' => array('sk|slovak', 'slovak'),
+ 'sq' => array('sq|albanian', 'albanian'),
+ 'sr' => array('sr|serbian', 'serbian'),
+ 'sv' => array('sv|swedish', 'swedish'),
+ 'th' => array('th|thai', 'thai'),
+ 'tr' => array('tr|turkish', 'turkish'),
+ 'uk' => array('uk|ukrainian', 'ukrainian'),
+ 'zh-tw' => array('zh[-_]tw|chinese traditional', 'tchinese'),
+ 'zh-cn' => array('zh[-_]cn|chinese simplified', 'schinese'),
+);
+
+// mb
+$GLOBALS['available_languages'] =& $available_languages;
Modified: XoopsModules/xlanguage/trunk/xlanguage/xoops_version.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/xoops_version.php 2014-02-26 02:34:32 UTC (rev 12333)
+++ XoopsModules/xlanguage/trunk/xlanguage/xoops_version.php 2014-02-27 08:02:54 UTC (rev 12334)
@@ -27,65 +27,65 @@
// Author: D.J.(phppp) ph...@ho... //
// URL: http://xoops.org.cn //
// ------------------------------------------------------------------------- //
-$modversion['name'] = _MI_XLANGUAGE_NAME;
-$modversion['version'] = 3.04;
-$modversion['description'] = _MI_XLANGUAGE_DESC;
-$modversion['credits'] = "Adi Chiributa - web...@ar...; wjue - http://www.wjue.org; GIJOE - http://www.peak.ne.jp";
-$modversion['author'] = "phppp(D.J.)" ;
-$modversion['help'] = "page=help";
-$modversion['license'] = "GNU GPL";
-$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/";
-$modversion['official'] = 0;
-$modversion['image'] = "xlanguage_logo.png";
-$modversion['dirname'] = "xlanguage";
+$modversion['name'] = _MI_XLANGUAGE_NAME;
+$modversion['version'] = 3.05;
+$modversion['description'] = _MI_XLANGUAGE_DESC;
+$modversion['credits'] = "Adi Chiributa - web...@ar...; wjue - http://www.wjue.org; GIJOE - http://www.peak.ne.jp";
+$modversion['author'] = "phppp(D.J.)";
+$modversion['help'] = "page=help";
+$modversion['license'] = "GNU GPL";
+$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html";
+$modversion['official'] = 0;
+$modversion['image'] = "xlanguage_logo.png";
+$modversion['dirname'] = basename(dirname(__FILE__));
$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin';
-$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
-$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
+$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2012/06/19';
-$modversion["module_website_url"] = "www.xoops.org/";
+$modversion['release_date'] = '2014/02/26';
+$modversion["module_website_url"] = "www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Final";
-$modversion['min_php']='5.2';
-$modversion['min_xoops']="2.5.5";
-$modversion['min_admin']='1.1';
-$modversion['min_db']= array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
+$modversion["module_status"] = "Beta 1";
+$modversion['min_php'] = '5.3.7';
+$modversion['min_xoops'] = "2.5.6";
+$modversion['min_admin'] = '1.1';
+$modversion['min_db'] = array('mysql' => '5.0.7', 'mysqli' => '5.0.7');
$modversion['system_menu'] = 1;
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
-$modversion['tables'][0] = "xlanguage_base";
-$modversion['tables'][1] = "xlanguage_ext";
+$modversion['tables'][0] = "xlanguage_base";
+$modversion['tables'][1] = "xlanguage_ext";
// Admin things
-$modversion['hasAdmin'] = 1;
+$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
-$modversion['adminmenu'] = "admin/menu.php";
+$modversion['adminmenu'] = "admin/menu.php";
// Use smarty
$modversion["use_smarty"] = 1;
//language selection block
-$modversion['blocks'][1]['file'] = "xlanguage_blocks.php";
-$modversion['blocks'][1]['name'] = _MI_XLANGUAGE_BNAME;
+$modversion['blocks'][1]['file'] = "xlanguage_blocks.php";
+$modversion['blocks'][1]['name'] = _MI_XLANGUAGE_BNAME;
$modversion['blocks'][1]['description'] = '';
-$modversion['blocks'][1]['show_func'] = "b_xlanguage_select_show";
-$modversion['blocks'][1]['edit_func'] = "b_xlanguage_select_edit";
-$modversion['blocks'][1]['options'] = "images| |5";
-$modversion["blocks"][1]["template"] = "xlanguage_block.html";
+$modversion['blocks'][1]['show_func'] = "b_xlanguage_select_show";
+$modversion['blocks'][1]['edit_func'] = "b_xlanguage_select_edit";
+$modversion['blocks'][1]['options'] = "images| |5";
+$modversion["blocks"][1]["template"] = "xlanguage_block.html";
-$modversion['releasedate'] = "July 9th, 2006";
-$modversion['status'] = "stable";
+$modversion['releasedate'] = "July 9th, 2006";
+$modversion['status'] = "stable";
$modversion['xoopsversion'] = "2.0+";
-$modversion['author_website'][1]['url'] = "http://xoops.org.cn";
+$modversion['author_website'][1]['url'] = "http://xoops.org.cn";
$modversion['author_website'][1]['name'] = "The Xoops China Community";
-$modversion['author_website'][2]['url'] = "http://xoopsforge.com";
+$modversion['author_website'][2]['url'] = "http://xoopsforge.com";
$modversion['author_website'][2]['name'] = "XForge";
-$modversion['author_email'] = "ph...@ho...";
-$modversion['demo_site_url'] = "http://xoops.org.cn";
-$modversion['demo_site_name'] = "Xoops China";
-$modversion['support_site_url'] = "http://xoopsforge.com";
-$modversion['support_site_name'] = "XForge";
\ No newline at end of file
+$modversion['author_email'] = "ph...@ho...";
+$modversion['demo_site_url'] = "http://xoops.org.cn";
+$modversion['demo_site_name'] = "Xoops China";
+$modversion['support_site_url'] = "http://xoopsforge.com";
+$modversion['support_site_name'] = "XForge";
|
|
From: <be...@us...> - 2014-02-26 02:34:44
|
Revision: 12333
http://sourceforge.net/p/xoops/svn/12333
Author: beckmi
Date: 2014-02-26 02:34:32 +0000 (Wed, 26 Feb 2014)
Log Message:
-----------
Updating version number for ModuleAdmin
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/language/english/main.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/xoops_version.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/language/english/main.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/language/english/main.php 2014-02-25 00:34:43 UTC (rev 12332)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/language/english/main.php 2014-02-26 02:34:32 UTC (rev 12333)
@@ -40,4 +40,4 @@
define("_AM_MODULEADMIN_ABOUT","About");
define("_AM_MODULEADMIN_PERMISSIONS","Permissions");
//ModuleAdmin
-define("_AM_MODULEADMIN_ADMIN_FOOTER","<div class='center smallsmall italic pad5'>This module is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
\ No newline at end of file
+define("_AM_MODULEADMIN_ADMIN_FOOTER","<div class='center smallsmall italic pad5'>This module is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/xoops_version.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/xoops_version.php 2014-02-25 00:34:43 UTC (rev 12332)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/xoops_version.php 2014-02-26 02:34:32 UTC (rev 12333)
@@ -14,5 +14,5 @@
* @author Grégory Mage (Aka Mage)
*/
-define("XOOPS_FRAMEWORKS_MODULEADMIN_VERSION", "1.1");
-define("XOOPS_FRAMEWORKS_MODULEADMIN_RELEASEDATE", "2011/08/01");
+define("XOOPS_FRAMEWORKS_MODULEADMIN_VERSION", "1.2");
+define("XOOPS_FRAMEWORKS_MODULEADMIN_RELEASEDATE", "2014/02/25");
|
|
From: <be...@us...> - 2014-02-25 00:34:47
|
Revision: 12332
http://sourceforge.net/p/xoops/svn/12332
Author: beckmi
Date: 2014-02-25 00:34:43 +0000 (Tue, 25 Feb 2014)
Log Message:
-----------
fixed PHP minimum version comparison in ModuleAdmin
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.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 2014-02-24 10:31:01 UTC (rev 12331)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2014-02-25 00:34:43 UTC (rev 12332)
@@ -63,6 +63,7 @@
- updated required PHP and XOOPS versions, module versions in modules (cesag/mamba)
- added xBootstrap theme (UI/UX Team: Angelo Roja, Bleekk, Heyula)
- added extra escape for "e" in YESTERDAY definition in locale.php, which was added in PHP 5.4 (madDan)
+- fixed PHP minimum version comparison in ModuleAdmin (mamba)
Security fixes
- XSS issues reported by Mehdi Dadkhah (rgriffith)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-02-24 10:31:01 UTC (rev 12331)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-02-25 00:34:43 UTC (rev 12332)
@@ -262,8 +262,8 @@
// php version
$path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/";
- if ($this->_obj->getInfo('min_php')) {
- if (phpversion() < $this->_obj->getInfo('min_php')) {
+ if ($this->_obj->getInfo('min_php')) {
+ if (version_compare(phpversion(), $this->_obj->getInfo('min_php'), '<')) {
$ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
} else {
$ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
|
|
From: <be...@us...> - 2014-02-24 10:31:07
|
Revision: 12331
http://sourceforge.net/p/xoops/svn/12331
Author: beckmi
Date: 2014-02-24 10:31:01 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
1.03 Beta 1: Site softcored for Smartphons (bleek), Language revised (muki)
Modified Paths:
--------------
XoopsModules/mastop_go2/trunk/mastop_go2/admin/about.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_footer.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_header.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/blockform.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/blocksadmin.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/feedback.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/go2.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/index.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/menu/jsdomenu.js
XoopsModules/mastop_go2/trunk/mastop_go2/admin/menu.php
XoopsModules/mastop_go2/trunk/mastop_go2/admin/sec.php
XoopsModules/mastop_go2/trunk/mastop_go2/blocks/mgo_go2.bloco.php
XoopsModules/mastop_go2/trunk/mastop_go2/class/formimage.php
XoopsModules/mastop_go2/trunk/mastop_go2/class/formimage_browse.php
XoopsModules/mastop_go2/trunk/mastop_go2/class/mastop_geral.class.php
XoopsModules/mastop_go2/trunk/mastop_go2/class/mgo_go2_go2.class.php
XoopsModules/mastop_go2/trunk/mastop_go2/class/mgo_sec_section.class.php
XoopsModules/mastop_go2/trunk/mastop_go2/docs/changelog.txt
XoopsModules/mastop_go2/trunk/mastop_go2/docs/credits.txt
XoopsModules/mastop_go2/trunk/mastop_go2/docs/install.txt
XoopsModules/mastop_go2/trunk/mastop_go2/docs/lang_diff.txt
XoopsModules/mastop_go2/trunk/mastop_go2/docs/readme.txt
XoopsModules/mastop_go2/trunk/mastop_go2/include/feedback.form.inc.php
XoopsModules/mastop_go2/trunk/mastop_go2/include/funcoes.inc.php
XoopsModules/mastop_go2/trunk/mastop_go2/include/generator.form.inc.php
XoopsModules/mastop_go2/trunk/mastop_go2/include/go2.form.inc.php
XoopsModules/mastop_go2/trunk/mastop_go2/include/sec.form.inc.php
XoopsModules/mastop_go2/trunk/mastop_go2/language/english/admin.php
XoopsModules/mastop_go2/trunk/mastop_go2/language/english/blocks.php
XoopsModules/mastop_go2/trunk/mastop_go2/language/english/help/help.html
XoopsModules/mastop_go2/trunk/mastop_go2/language/english/main.php
XoopsModules/mastop_go2/trunk/mastop_go2/language/english/modinfo.php
XoopsModules/mastop_go2/trunk/mastop_go2/templates/blocks/mgo_go2.block.tpl.html
XoopsModules/mastop_go2/trunk/mastop_go2/xoops_version.php
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/about.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/about.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/about.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -1,17 +1,7 @@
<?php
-/*
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
/**
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package MastopGo2
* @since
* @author XOOPS Development Team
@@ -27,4 +17,5 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
\ No newline at end of file
+include 'admin_footer.php';
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_footer.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_footer.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_footer.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -1,4 +1,16 @@
<?php
+### =============================================================
+### Mastop InfoDigital - Paixão por Internet
+### =============================================================
+### Header com includes padrões para a Admin do Módulo
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital © 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id: admin_footer.php 10037 2012-08-08 11:35:43Z beckmi $
+### =============================================================
global $pathIcon32;
echo "<div class='adminfooter'>\n"
@@ -8,4 +20,6 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
+
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_header.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_header.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/admin_header.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -11,24 +11,28 @@
### =============================================================
### $Id$
### =============================================================
+
include '../../../include/cp_header.php';
-if ( file_exists("../language/".$xoopsConfig['language']."/modinfo.php") ) {
- include_once("../language/".$xoopsConfig['language']."/modinfo.php");
-} else {
- include_once("../language/portuguesebr/modinfo.php");
+
+if (file_exists("../language/".$xoopsConfig['language']."/modinfo.php")){
+ include_once("../language/".$xoopsConfig['language']."/modinfo.php");
+}else{
+ include_once("../language/portuguesebr/modinfo.php");
}
+
include_once XOOPS_ROOT_PATH."/modules/".MGO_MOD_DIR."/include/funcoes.inc.php";
-$c['lang']['filtros'] = MGO_ADM_FILTROS;
-$c['lang']['exibir'] = MGO_ADM_EXIBIR;
-$c['lang']['exibindo'] = MGO_ADM_EXIBINDO;
-$c['lang']['por_pagina'] = MGO_ADM_PORPAGINA;
-$c['lang']['acao'] = MGO_ADM_ACAO;
-$c['lang']['semresult'] = MGO_ADM_SEMRESULT;
-$c['lang']['showhidemenu'] = MGO_ADM_SHOWHIDEMENU;
-$c['lang']['group_action'] = MGO_ADM_GRP_ACTION;
+$c['lang']['filtros'] = MGO_ADM_FILTROS;
+$c['lang']['exibir'] = MGO_ADM_EXIBIR;
+$c['lang']['exibindo'] = MGO_ADM_EXIBINDO;
+$c['lang']['por_pagina'] = MGO_ADM_PORPAGINA;
+$c['lang']['acao'] = MGO_ADM_ACAO;
+$c['lang']['semresult'] = MGO_ADM_SEMRESULT;
+$c['lang']['showhidemenu'] = MGO_ADM_SHOWHIDEMENU;
+
+$c['lang']['group_action'] = MGO_ADM_GRP_ACTION;
$c['lang']['group_erro_sel'] = MGO_ADM_GRP_ERR_SEL;
-$c['lang']['group_del'] = MGO_ADM_GRP_DEL;
+$c['lang']['group_del'] = MGO_ADM_GRP_DEL;
$c['lang']['group_del_sure'] = MGO_ADM_GRP_DEL_SURE;
$path = dirname(dirname(dirname(dirname(__FILE__))));
@@ -54,46 +58,45 @@
function mgo_adm_menu(){
- global $xoopsModule, $xoopsConfig, $xoopsModuleConfig;
- $adm_url = XOOPS_URL."/modules/".MGO_MOD_DIR."/admin/";
- $links[] = array(0 => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid'), 1 => _PREFERENCES);
- //xoops_cp_header();
- echo '
-<link rel="stylesheet" type="text/css" href="menu/style_menu.css" />
-<script type="text/javascript" src="menu/jsdomenu.js"></script>
-<script type="text/javascript" src="menu/jsdomenubar.js"></script>
-<script type="text/javascript">
-function createjsDOMenu() {
- mainMenu1 = new jsDOMenu(170);
- with (mainMenu1) {
- addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'sec.php?op=novo"));
- addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'sec.php?op=listar"));
- }
+ global $xoopsModule, $xoopsConfig, $xoopsModuleConfig;
+ $adm_url = XOOPS_URL."/modules/".MGO_MOD_DIR."/admin/";
+ $links[] = array(0 => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid'), 1 => _PREFERENCES);
- mainMenu2 = new jsDOMenu(170);
- with (mainMenu2) {
- addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'go2.php?op=novo"));
- addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'go2.php?op=listar"));
- }
+ //xoops_cp_header();
+ echo '
+ <link rel="stylesheet" type="text/css" href="menu/style_menu.css" />
+ <script type="text/javascript" src="menu/jsdomenu.js"></script>
+ <script type="text/javascript" src="menu/jsdomenubar.js"></script>
+ <script type="text/javascript">
+ function createjsDOMenu() {
+ mainMenu1 = new jsDOMenu(170);
+ with (mainMenu1) {
+ addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'sec.php?op=novo"));
+ addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'sec.php?op=listar"));
+ }
- mainMenu3 = new jsDOMenu(150);
- with (mainMenu3) {
- addMenuItem(new menuItem("'.MGO_ADM_BLOCKS.'", "", "'.$adm_url.'blocksadmin.php"));
- addMenuItem(new menuItem("'._PREFERENCES.'", "", "'.XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid').'"));
- }
+ mainMenu2 = new jsDOMenu(170);
+ with (mainMenu2) {
+ addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'go2.php?op=novo"));
+ addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'go2.php?op=listar"));
+ }
- menuBar = new jsDOMenuBar();
- with (menuBar) {
- addMenuBarItem(new menuBarItem("'.MGO_ADM_SEC.'", mainMenu1, "cliid"));
- addMenuBarItem(new menuBarItem("'.MGO_ADM_GO2.'", mainMenu2, "prdid"));
- addMenuBarItem(new menuBarItem("'._OPTIONS.'", mainMenu3, "optid"));
- }
- menuBar.items.cliid.showIcon("sec", "sec", "sec");
- menuBar.items.prdid.showIcon("go2", "go2", "go2");
- menuBar.items.optid.showIcon("opt", "opt", "opt");
- menuBar.moveTo(680, 81);
+ mainMenu3 = new jsDOMenu(150);
+ with (mainMenu3) {
+ addMenuItem(new menuItem("'.MGO_ADM_BLOCKS.'", "", "'.$adm_url.'blocksadmin.php"));
+ addMenuItem(new menuItem("'._PREFERENCES.'", "", "'.XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid').'"));
+ }
+
+ menuBar = new jsDOMenuBar();
+ with (menuBar) {
+ addMenuBarItem(new menuBarItem("'.MGO_ADM_SEC.'", mainMenu1, "cliid"));
+ addMenuBarItem(new menuBarItem("'.MGO_ADM_GO2.'", mainMenu2, "prdid"));
+ addMenuBarItem(new menuBarItem("'._OPTIONS.'", mainMenu3, "optid"));
+ }
+ menuBar.items.cliid.showIcon("sec", "sec", "sec");
+ menuBar.items.prdid.showIcon("go2", "go2", "go2");
+ menuBar.items.optid.showIcon("opt", "opt", "opt");
+ menuBar.moveTo(680, 81);
+ }</script>';
}
-</script>
-';
-}
-?>
\ No newline at end of file
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/blockform.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/blockform.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/blockform.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -1,72 +1,87 @@
<?php
### =============================================================
-### Mastop InfoDigital - Paix\xE3o por Internet
+### Mastop InfoDigital - Paixão por Internet
### =============================================================
-### Formul\xE1rio para a Clonagem de Blocos
+### Formulário para a Clonagem de Blocos
### =============================================================
### Developer: Fernando Santos (topet05), fer...@ma...
-### Copyright: Mastop InfoDigital \xA9 2003-2007
+### Copyright: Mastop InfoDigital © 2003-2007
### -------------------------------------------------------------
### www.mastop.com.br
### =============================================================
### $Id$
### =============================================================
+
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$form = new XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', "post", true);
-if (isset($block['name'])) {
- $form->addElement(new XoopsFormLabel(_AM_NAME, $block['name']));
+
+if (isset($block['name'])){
+ $form->addElement(new XoopsFormLabel(_AM_NAME, $block['name']));
}
+
$side_select = new XoopsFormSelect(_AM_BLKTYPE, "bside", $block['side']);
$side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, 7 => _AM_CBBOTTOMLEFT, 8 => _AM_CBBOTTOMRIGHT, 9 => _AM_CBBOTTOM, ));
+
$form->addElement($side_select);
$form->addElement(new XoopsFormText(_AM_WEIGHT, "bweight", 2, 5, $block['weight']));
$form->addElement(new XoopsFormRadioYN(_AM_VISIBLE, 'bvisible', $block['visible']));
+
$mod_select = new XoopsFormSelect(_AM_VISIBLEIN, "bmodule", $block['modules'], 5, true);
$module_handler =& xoops_gethandler('module');
$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
$criteria->add(new Criteria('isactive', 1));
+
$module_list =& $module_handler->getList($criteria);
$module_list[-1] = _AM_TOPPAGE;
$module_list[0] = _AM_ALLPAGES;
+
ksort($module_list);
$mod_select->addOptionArray($module_list);
$form->addElement($mod_select);
$form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false);
-if ( $block['is_custom'] ) {
- $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
- $textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">'._AM_USEFULTAGS.'</span><br /><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>');
- $form->addElement($textarea, true);
- $ctype_select = new XoopsFormSelect(_AM_CTYPE, 'bctype', $block['ctype']);
- $ctype_select->addOptionArray(array('H' => _AM_HTML, 'P' => _AM_PHP, 'S' => _AM_AFWSMILE, 'T' => _AM_AFNOSMILE));
- $form->addElement($ctype_select);
-} else {
- if ($block['template'] != '') {
- $tplfile_handler =& xoops_gethandler('tplfile');
- $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
- if (count($btemplate) > 0) {
- $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>'));
- } else {
- $btemplate2 =& $tplfile_handler->find('default', 'block', $block['bid']);
- if (count($btemplate2) > 0) {
- $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>'));
- }
- }
+
+if ($block['is_custom']){
+ $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
+ $textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">'._AM_USEFULTAGS.'</span><br /><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>');
+ $form->addElement($textarea, true);
+ $ctype_select = new XoopsFormSelect(_AM_CTYPE, 'bctype', $block['ctype']);
+ $ctype_select->addOptionArray(array('H' => _AM_HTML, 'P' => _AM_PHP, 'S' => _AM_AFWSMILE, 'T' => _AM_AFNOSMILE));
+ $form->addElement($ctype_select);
+}else{
+ if ($block['template'] != ''){
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
+ if (count($btemplate) > 0){
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>'));
+ }else{
+ $btemplate2 =& $tplfile_handler->find('default', 'block', $block['bid']);
+ if (count($btemplate2) > 0){
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>'));
+ }
}
- if ($block['edit_form'] != false) {
- $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $block['edit_form']));
- }
+ }
+ if ($block['edit_form'] != false){
+ $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $block['edit_form']));
+ }
}
+
$cache_select = new XoopsFormSelect(_AM_BCACHETIME, 'bcachetime', $block['cachetime']);
$cache_select->addOptionArray(array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH));
$form->addElement($cache_select);
-if (isset($block['bid'])) {
- $form->addElement(new XoopsFormHidden('bid', $block['bid']));
+
+if (isset($block['bid'])){
+ $form->addElement(new XoopsFormHidden('bid', $block['bid']));
}
+
$form->addElement(new XoopsFormHidden('op', $block['op']));
$form->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
$button_tray = new XoopsFormElementTray('', ' ');
-if ($block['is_custom']) {
- $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit"));
+
+if ($block['is_custom']){
+ $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit"));
}
+
$button_tray->addElement(new XoopsFormButton('', 'submitblock', _SUBMIT, "submit"));
-$form->addElement($button_tray);
\ No newline at end of file
+$form->addElement($button_tray);
+
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/blocksadmin.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/blocksadmin.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/blocksadmin.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -1,322 +1,343 @@
-<?php
-### =============================================================
-### Mastop InfoDigital - Paixão por Internet
-### =============================================================
-### Manutenção Individual de Blocos e Grupos
-### =============================================================
-### Developer: Fernando Santos (topet05), fer...@ma...
-### Copyright: Mastop InfoDigital © 2003-2007
-### -------------------------------------------------------------
-### www.mastop.com.br
-### =============================================================
-### $Id$
-### =============================================================
-include_once 'admin_header.php';
-xoops_cp_header();
-$aboutAdmin = new ModuleAdmin();
-
-if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
- exit(MGO_ADM_403);
-}
-
-if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
- include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
- $op = "list";
- if ( isset($_POST) ) {
- foreach ( $_POST as $k => $v ) {
- $$k = $v;
- }
- }
-
- if ( isset($_GET['op']) ) {
- if ($_GET['op'] == "edit" || $_GET['op'] == "delete" || $_GET['op'] == "delete_ok" || $_GET['op'] == "clone") {
- $op = $_GET['op'];
- $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
- }
- }
-
- function listar_blocos()
- {
- include_once 'admin_header.php';
- //xoops_cp_header();
-
- global $xoopsUser, $xoopsConfig, $xoopsModule;
- include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
-
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
- //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
- } else {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
- }
- $module_handler =& xoops_gethandler('module');
- $member_handler =& xoops_gethandler('member');
- $moduleperm_handler =& xoops_gethandler('groupperm');
- $groups =& $member_handler->getGroups();
- $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
- $criteria->add(new Criteria('isactive', 1));
- $module_list =& $module_handler->getList($criteria);
- $module_list[-1] = _AM_TOPPAGE;
- $module_list[0] = _AM_ALLPAGES;
- ksort($module_list);
- echo "
- <h4 style='text-align:left;'>".MGO_MOD_NOME." - "._AM_BADMIN."</h4>";
- $module_handler =& xoops_gethandler('module');
- echo "<form action='".$_SERVER['PHP_SELF']."' name='blockadmin' method='post'>
- <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
- <tr valign='middle'><th align='center'>"._AM_TITLE."</th><th align='center' nowrap='nowrap'>"._AM_SIDE."<br />"._LEFT."-"._CENTER."-"._RIGHT."</th><th align='center'>"._AM_WEIGHT."</th><th align='center'>"._AM_VISIBLE."</th><th align='center'>"._AM_VISIBLEIN."</th><th align='center'>".MGO_ADM_GRUPOS."</th><th align='center'>"._AM_ACTION."</th></tr>
- ";
- $block_arr =& XoopsBlock::getByModule($xoopsModule->mid());
- $block_count = count($block_arr);
- $class = 'even';
- foreach ($block_arr as $i) {
- $groups_perms =& $moduleperm_handler->getGroupIds('block_read', $i->getVar("bid"));
- $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.$i->getVar("bid");
- $result = $db->query($sql);
- $modules = array();
- while ($row = $db->fetchArray($result)) {
- $modules[] = intval($row['module_id']);
- }
- $sel0 = $sel1 = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = "";
- if ( $i->getVar("visible") == 1 ) {
- $sel1 = " checked='checked'";
- } else {
- $sel0 = " checked='checked'";
- }
- if ( $i->getVar("side") == XOOPS_SIDEBLOCK_LEFT){
- $ssel0 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_SIDEBLOCK_RIGHT ){
- $ssel1 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_LEFT ){
- $ssel2 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_RIGHT ){
- $ssel4 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_CENTER ){
- $ssel3 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMLEFT ){
- $ssel5 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMRIGHT ){
- $ssel6 = " checked='checked'";
- } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOM ){
- $ssel7 = " checked='checked'";
- }
- if ( $i->getVar("title") == "" ) {
- $title = " ";
- } else {
- $title = $i->getVar("title");
- }
- $name = $i->getVar("name");
- echo "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[".$i->getVar("bid")."]' value='".$title."'></td><td class='$class' align='center' nowrap='nowrap'>
- <div align='center' >
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_LEFT."'$ssel2 />
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_CENTER."'$ssel3 />
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_RIGHT."'$ssel4 />
- </div>
- <div>
- <span style='float:right'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_RIGHT."'$ssel1 /></span>
- <div align='left'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_LEFT."'$ssel0 /></div>
- </div>
- <div align='center'>
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."'$ssel5 />
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOM."'$ssel7 />
- <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."'$ssel6 />
- </div>
- </td><td class='$class' align='center'><input type='text' name='weight[".$i->getVar("bid")."]' value='".$i->getVar("weight")."' size='5' maxlength='5' /></td><td class='$class' align='center' nowrap><input type='radio' name='visible[".$i->getVar("bid")."]' value='1'$sel1>"._YES." <input type='radio' name='visible[".$i->getVar("bid")."]' value='0'$sel0>"._NO."</td>";
-
- echo "<td class='$class' align='center'><select size='5' name='bmodule[".$i->getVar("bid")."][]' id='bmodule[".$i->getVar("bid")."][]' multiple='multiple'>";
- foreach ($module_list as $k => $v){
- echo "<option value='$k'".((in_array($k, $modules)) ? " selected='selected'" : "").">$v</option>";
- }
- echo "</select></td>";
-
-
- echo "<td class='$class' align='center'><select size='5' name='groups[".$i->getVar("bid")."][]' id='groups[".$i->getVar("bid")."][]' multiple='multiple'>";
- foreach ($groups as $grp){
- echo "<option value='".$grp->getVar('groupid')."' ".((in_array($grp->getVar('groupid'), $groups_perms)) ? " selected='selected'" : "").">".$grp->getVar('name')."</option>";
- }
- echo "</select></td>";
-
- echo "<td class='$class' align='center'><a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$i->getVar("bid")."'>"._EDIT."</a> <a href='blocksadmin.php?op=clone&bid=".$i->getVar("bid")."'>"._CLONE."</a>";
- if ($i->getVar('block_type') != 'S' && $i->getVar('block_type') != 'M') {
- echo " <a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&bid=".$i->getVar("bid")."'>"._DELETE."</a>";
- }
- echo "
- <input type='hidden' name='oldtitle[".$i->getVar("bid")."]' value='".$i->getVar('title')."' />
- <input type='hidden' name='oldside[".$i->getVar("bid")."]' value='".$i->getVar('side')."' />
- <input type='hidden' name='oldweight[".$i->getVar("bid")."]' value='".$i->getVar('weight')."' />
- <input type='hidden' name='oldvisible[".$i->getVar("bid")."]' value='".$i->getVar('visible')."' />
- <input type='hidden' name='bid[".$i->getVar("bid")."]' value='".$i->getVar("bid")."' />
- </td></tr>
- ";
- $class = ($class == 'even') ? 'odd' : 'even';
- }
- echo "<tr><td class='foot' align='center' colspan='7'>
- <input type='hidden' name='op' value='order' />
- ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
- <input type='submit' name='submit' value='"._SUBMIT."' />
- </td></tr></table>
- </form>
- <br /><br />";
- include_once 'admin_footer.php';
- }
- function clone_block($bid)
- {
- global $xoopsConfig;
- if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
- //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
- } else {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
- }
- mgo_adm_menu();
- $myblock = new XoopsBlock($bid);
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.intval($bid);
- $result = $db->query($sql);
- $modules = array();
- while ($row = $db->fetchArray($result)) {
- $modules[] = intval($row['module_id']);
- }
- $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false;
- $block = array('title'=> $myblock->getVar('title').' Clone', 'form_title' => _AM_CLONEBLOCK, 'name' => $myblock->getVar('name'), 'side' => $myblock->getVar('side'), 'weight' => $myblock->getVar('weight'), 'visible' => $myblock->getVar('visible'), 'content' => $myblock->getVar('content', 'N'), 'modules' => $modules, 'is_custom' => $is_custom, 'ctype' => $myblock->getVar('c_type'), 'cachetime' => $myblock->getVar('bcachetime'), 'op' => 'clone_ok', 'bid' => $myblock->getVar('bid'), 'edit_form' => $myblock->getOptions(), 'template' => $myblock->getVar('template'), 'options' => $myblock->getVar('options'));
- echo '<a href="blocksadmin.php">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_CLONEBLOCK.'<br /><br />';
- include 'blockform.php';
- $form->display();
- xoops_cp_footer();
- exit();
- }
-
- function clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
- {
- global $xoopsUser, $xoopsConfig;
- if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
- //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
- } else {
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
- include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
- }
- $block = new XoopsBlock($bid);
- $clone =& $block->xoopsClone();
- if (empty($bmodule)) {
- xoops_cp_header();
- xoops_error(sprintf(_AM_NOTSELNG, _AM_VISIBLEIN));
- xoops_cp_footer();
- exit();
- }
- $clone->setVar('side', $bside);
- $clone->setVar('weight', $bweight);
- $clone->setVar('visible', $bvisible);
- //$clone->setVar('content', $_POST['bcontent']);
- $clone->setVar('title', $_POST['btitle']);
- $clone->setVar('bcachetime', $bcachetime);
- if ( isset($options) && (count($options) > 0) ) {
- $options = implode('|', $options);
- $clone->setVar('options', $options);
- }
- $clone->setVar('bid', 0);
- if ($block->getVar('block_type') == 'C' || $block->getVar('block_type') == 'E') {
- $clone->setVar('block_type', 'E');
- } else {
- $clone->setVar('block_type', 'D');
- }
- $newid = $clone->store();
- if (!$newid) {
- xoops_cp_header();
- $clone->getHtmlErrors();
- xoops_cp_footer();
- exit();
- }
- if ($clone->getVar('template') != '') {
- $tplfile_handler =& xoops_gethandler('tplfile');
- $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
- if (count($btemplate) > 0) {
- $tplclone =& $btemplate[0]->xoopsClone();
- $tplclone->setVar('tpl_id', 0);
- $tplclone->setVar('tpl_refid', $newid);
- $tplfile_handler->insert($tplclone);
- }
- }
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- foreach ($bmodule as $bmid) {
- $sql = 'INSERT INTO '.$db->prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.$bmid.')';
- $db->query($sql);
- }
- $groups =& $xoopsUser->getGroups();
- $count = count($groups);
- for ($i = 0; $i < $count; $i++) {
- $sql = "INSERT INTO ".$db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (".$groups[$i].", ".$newid.", 1, 'block_read')";
- $db->query($sql);
- }
- redirect_header('blocksadmin.php?op=listar',1,_AM_DBUPDATED);
- }
-
- function setar_ordem($bid, $title, $weight, $visible, $side)
- {
- $myblock = new XoopsBlock($bid);
- $myblock->setVar('title', $title);
- $myblock->setVar('weight', $weight);
- $myblock->setVar('visible', $visible);
- $myblock->setVar('side', $side);
- $myblock->store();
- }
-
- if ( $op == "list" ) {
- mgo_adm_menu();
- listar_blocos();
- xoops_cp_footer();
- exit();
- }
-
- if ( $op == "order" ) {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header($_SERVER['PHP_SELF'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
- exit();
- }
- foreach (array_keys($bid) as $i) {
- if ( $oldtitle[$i] != $title[$i] || $oldweight[$i] != $weight[$i] || $oldvisible[$i] != $visible[$i] || $oldside[$i] != $side[$i] )
- setar_ordem($bid[$i], $title[$i], $weight[$i], $visible[$i], $side[$i], $bmodule[$i]);
- if(!empty($bmodule[$i]) && count($bmodule[$i]) > 0){
- $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $xoopsDB->prefix('block_module_link'), $bid[$i]);
- $xoopsDB->query($sql);
- if (in_array(0, $bmodule[$i])) {
- $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], 0);
- $xoopsDB->query($sql);
- }else{
- foreach ($bmodule[$i] as $bmid) {
- $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], intval($bmid));
- $xoopsDB->query($sql);
- }
- }
- }
- $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid[$i]);
- $xoopsDB->query($sql);
- if(!empty($groups[$i])){
- foreach ($groups[$i] as $grp) {
- $sql = sprintf("INSERT INTO %s (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')", $xoopsDB->prefix('group_permission'), $grp, $bid[$i]);
- $xoopsDB->query($sql);
- }
- }
- }
- redirect_header($_SERVER['PHP_SELF'],1,MGO_ADM_SUCESS2);
- exit();
- }
- if ($op == 'clone') {
- clone_block($bid);
- }
-
- if ($op == 'clone_ok') {
- clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options);
- }
-} else {
- echo MGO_ADM_403;
-}
\ No newline at end of file
+<?php
+### =============================================================
+### Mastop InfoDigital - Paixão por Internet
+### =============================================================
+### Manutenção Individual de Blocos e Grupos
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital © 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+
+include_once 'admin_header.php';
+xoops_cp_header();
+$aboutAdmin = new ModuleAdmin();
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())){
+ exit(MGO_ADM_403);
+}
+
+if ( $xoopsUser->isAdmin($xoopsModule->mid())){
+ include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
+ $op = "list";
+ if (isset($_POST)){
+ foreach ($_POST as $k => $v){
+ $$k = $v;
+ }
+ }
+
+ if (isset($_GET['op'])){
+ if ($_GET['op'] == "edit" || $_GET['op'] == "delete" || $_GET['op'] == "delete_ok" || $_GET['op'] == "clone"){
+ $op = $_GET['op'];
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ }
+ }
+
+ function listar_blocos(){
+ include_once 'admin_header.php';
+ //xoops_cp_header();
+
+ global $xoopsUser, $xoopsConfig, $xoopsModule;
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php")){
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ }else{
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+
+ $module_handler =& xoops_gethandler('module');
+ $member_handler =& xoops_gethandler('member');
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $groups =& $member_handler->getGroups();
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_list =& $module_handler->getList($criteria);
+ $module_list[-1] = _AM_TOPPAGE;
+ $module_list[0] = _AM_ALLPAGES;
+ ksort($module_list);
+ echo "
+ <h4 style='text-align:left;'>".MGO_MOD_NOME." - "._AM_BADMIN."</h4>";
+ $module_handler =& xoops_gethandler('module');
+ echo "<form action='".$_SERVER['PHP_SELF']."' name='blockadmin' method='post'>
+ <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'><th align='center'>"._AM_TITLE."</th><th align='center' nowrap='nowrap'>"._AM_SIDE."<br />"._LEFT."-"._CENTER."-"._RIGHT."</th><th align='center'>"._AM_WEIGHT."</th><th align='center'>"._AM_VISIBLE."</th><th align='center'>"._AM_VISIBLEIN."</th><th align='center'>".MGO_ADM_GRUPOS."</th><th align='center'>"._AM_ACTION."</th></tr>
+ ";
+ $block_arr =& XoopsBlock::getByModule($xoopsModule->mid());
+ $block_count = count($block_arr);
+ $class = 'even';
+ foreach ($block_arr as $i){
+ $groups_perms =& $moduleperm_handler->getGroupIds('block_read', $i->getVar("bid"));
+ $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.$i->getVar("bid");
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)){
+ $modules[] = intval($row['module_id']);
+ }
+ $sel0 = $sel1 = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = "";
+ if ($i->getVar("visible") == 1 ){
+ $sel1 = " checked='checked'";
+ }else{
+ $sel0 = " checked='checked'";
+ }
+
+ if ($i->getVar("side") == XOOPS_SIDEBLOCK_LEFT){
+ $ssel0 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_SIDEBLOCK_RIGHT ){
+ $ssel1 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_LEFT ){
+ $ssel2 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_RIGHT ){
+ $ssel4 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_CENTER ){
+ $ssel3 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMLEFT ){
+ $ssel5 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMRIGHT ){
+ $ssel6 = " checked='checked'";
+ }elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOM ){
+ $ssel7 = " checked='checked'";
+ }
+
+ if ($i->getVar("title") == ""){
+ $title = " ";
+ }else{
+ $title = $i->getVar("title");
+ }
+
+ $name = $i->getVar("name");
+ echo "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[".$i->getVar("bid")."]' value='".$title."'></td><td class='$class' align='center' nowrap='nowrap'>
+ <div align='center' >
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_LEFT."'$ssel2 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_CENTER."'$ssel3 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_RIGHT."'$ssel4 />
+ </div>
+ <div>
+ <span style='float:right'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_RIGHT."'$ssel1 /></span>
+ <div align='left'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_LEFT."'$ssel0 /></div>
+ </div>
+ <div align='center'>
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."'$ssel5 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOM."'$ssel7 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."'$ssel6 />
+ </div>
+ </td><td class='$class' align='center'><input type='text' name='weight[".$i->getVar("bid")."]' value='".$i->getVar("weight")."' size='5' maxlength='5' /></td><td class='$class' align='center' nowrap><input type='radio' name='visible[".$i->getVar("bid")."]' value='1'$sel1>"._YES." <input type='radio' name='visible[".$i->getVar("bid")."]' value='0'$sel0>"._NO."</td>";
+
+ echo "<td class='$class' align='center'><select size='5' name='bmodule[".$i->getVar("bid")."][]' id='bmodule[".$i->getVar("bid")."][]' multiple='multiple'>";
+ foreach ($module_list as $k => $v){
+ echo "<option value='$k'".((in_array($k, $modules)) ? " selected='selected'" : "").">$v</option>";
+ }
+
+ echo "</select></td>";
+
+ echo "<td class='$class' align='center'><select size='5' name='groups[".$i->getVar("bid")."][]' id='groups[".$i->getVar("bid")."][]' multiple='multiple'>";
+ foreach ($groups as $grp){
+ echo "<option value='".$grp->getVar('groupid')."' ".((in_array($grp->getVar('groupid'), $groups_perms)) ? " selected='selected'" : "").">".$grp->getVar('name')."</option>";
+ }
+
+ echo "</select></td>";
+
+ echo "<td class='$class' align='center'><a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$i->getVar("bid")."'>"._EDIT."</a> <a href='blocksadmin.php?op=clone&bid=".$i->getVar("bid")."'>"._CLONE."</a>";
+
+ if ($i->getVar('block_type') != 'S' && $i->getVar('block_type') != 'M'){
+ echo " <a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&bid=".$i->getVar("bid")."'>"._DELETE."</a>";
+ }
+
+ echo "
+ <input type='hidden' name='oldtitle[".$i->getVar("bid")."]' value='".$i->getVar('title')."' />
+ <input type='hidden' name='oldside[".$i->getVar("bid")."]' value='".$i->getVar('side')."' />
+ <input type='hidden' name='oldweight[".$i->getVar("bid")."]' value='".$i->getVar('weight')."' />
+ <input type='hidden' name='oldvisible[".$i->getVar("bid")."]' value='".$i->getVar('visible')."' />
+ <input type='hidden' name='bid[".$i->getVar("bid")."]' value='".$i->getVar("bid")."' />
+ </td></tr>
+ ";
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+
+ echo "<tr><td class='foot' align='center' colspan='7'>
+ <input type='hidden' name='op' value='order' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='submit' name='submit' value='"._SUBMIT."' />
+ </td></tr></table>
+ </form>
+ <br /><br />";
+ include_once 'admin_footer.php';
+ }
+
+ function clone_block($bid){
+ global $xoopsConfig;
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php")){
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ }else{
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+
+ mgo_adm_menu();
+ $myblock = new XoopsBlock($bid);
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.intval($bid);
+ $result = $db->query($sql);
+ $modules = array();
+
+ while ($row = $db->fetchArray($result)){
+ $modules[] = intval($row['module_id']);
+ }
+
+ $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false;
+ $block = array('title'=> $myblock->getVar('title').' Clone', 'form_title' => _AM_CLONEBLOCK, 'name' => $myblock->getVar('name'), 'side' => $myblock->getVar('side'), 'weight' => $myblock->getVar('weight'), 'visible' => $myblock->getVar('visible'), 'content' => $myblock->getVar('content', 'N'), 'modules' => $modules, 'is_custom' => $is_custom, 'ctype' => $myblock->getVar('c_type'), 'cachetime' => $myblock->getVar('bcachetime'), 'op' => 'clone_ok', 'bid' => $myblock->getVar('bid'), 'edit_form' => $myblock->getOptions(), 'template' => $myblock->getVar('template'), 'options' => $myblock->getVar('options'));
+ echo '<a href="blocksadmin.php">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_CLONEBLOCK.'<br /><br />';
+ include 'blockform.php';
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ function clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options){
+ global $xoopsUser, $xoopsConfig;
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php")){
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ }else{
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+
+ $block = new XoopsBlock($bid);
+ $clone =& $block->xoopsClone();
+ if (empty($bmodule)){
+ xoops_cp_header();
+ xoops_error(sprintf(_AM_NOTSELNG, _AM_VISIBLEIN));
+ xoops_cp_footer();
+ exit();
+ }
+
+ $clone->setVar('side', $bside);
+ $clone->setVar('weight', $bweight);
+ $clone->setVar('visible', $bvisible);
+ //$clone->setVar('content', $_POST['bcontent']);
+ $clone->setVar('title', $_POST['btitle']);
+ $clone->setVar('bcachetime', $bcachetime);
+ if (isset($options) && (count($options) > 0)){
+ $options = implode('|', $options);
+ $clone->setVar('options', $options);
+ }
+ $clone->setVar('bid', 0);
+ if ($block->getVar('block_type') == 'C' || $block->getVar('block_type') == 'E') {
+ $clone->setVar('block_type', 'E');
+ }else{
+ $clone->setVar('block_type', 'D');
+ }
+
+ $newid = $clone->store();
+ if (!$newid){
+ xoops_cp_header();
+ $clone->getHtmlErrors();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ($clone->getVar('template') != ''){
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
+ if (count($btemplate) > 0){
+ $tplclone =& $btemplate[0]->xoopsClone();
+ $tplclone->setVar('tpl_id', 0);
+ $tplclone->setVar('tpl_refid', $newid);
+ $tplfile_handler->insert($tplclone);
+ }
+ }
+
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ foreach ($bmodule as $bmid){
+ $sql = 'INSERT INTO '.$db->prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.$bmid.')';
+ $db->query($sql);
+ }
+ $groups =& $xoopsUser->getGroups();
+ $count = count($groups);
+ for ($i = 0; $i < $count; $i++){
+ $sql = "INSERT INTO ".$db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (".$groups[$i].", ".$newid.", 1, 'block_read')";
+ $db->query($sql);
+ }
+
+ redirect_header('blocksadmin.php?op=listar',1,_AM_DBUPDATED);
+ }
+
+ function setar_ordem($bid, $title, $weight, $visible, $side){
+ $myblock = new XoopsBlock($bid);
+ $myblock->setVar('title', $title);
+ $myblock->setVar('weight', $weight);
+ $myblock->setVar('visible', $visible);
+ $myblock->setVar('side', $side);
+ $myblock->store();
+ }
+
+ if ( $op == "list" ){
+ mgo_adm_menu();
+ listar_blocos();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ( $op == "order" ){
+ if (!$GLOBALS['xoopsSecurity']->check()){
+ redirect_header($_SERVER['PHP_SELF'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+
+foreach (array_keys($bid) as $i){
+ if ( $oldtitle[$i] != $title[$i] || $oldweight[$i] != $weight[$i] || $oldvisible[$i] != $visible[$i] || $oldside[$i] != $side[$i])
+ setar_ordem($bid[$i], $title[$i], $weight[$i], $visible[$i], $side[$i], $bmodule[$i]);
+ if(!empty($bmodule[$i]) && count($bmodule[$i]) > 0){
+ $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $xoopsDB->prefix('block_module_link'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if (in_array(0, $bmodule[$i])){
+ $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], 0);
+ $xoopsDB->query($sql);
+ }else{
+ foreach ($bmodule[$i] as $bmid){
+ $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], intval($bmid));
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+
+ $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if(!empty($groups[$i])){
+ foreach ($groups[$i] as $grp){
+ $sql = sprintf("INSERT INTO %s (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')", $xoopsDB->prefix('group_permission'), $grp, $bid[$i]);
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+
+ redirect_header($_SERVER['PHP_SELF'],1,MGO_ADM_SUCESS2);
+ exit();
+ }
+
+ if ($op == 'clone'){
+ clone_block($bid);
+ }
+
+ if ($op == 'clone_ok'){
+ clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options);
+ }
+}else{
+ echo MGO_ADM_403;
+}
+
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/feedback.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/feedback.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/feedback.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -1,63 +1,68 @@
<?php
### =============================================================
-### Mastop InfoDigital - Paix\xE3o por Internet
+### Mastop InfoDigital - Paixão por Internet
### =============================================================
-### Arquivo para Solicita\xE7\xE3o de Recursos
+### Arquivo para Solicitação de Recursos
### =============================================================
### Developer: Fernando Santos (topet05), fer...@ma...
-### Copyright: Mastop InfoDigital \xA9 2003-2007
+### Copyright: Mastop InfoDigital © 2003-2007
### -------------------------------------------------------------
### www.mastop.com.br
### =============================================================
### $Id$
### =============================================================
+
include 'admin_header.php';
$op = (isset($_GET['op'])) ? $_GET['op'] : 'feature';
+
if (isset($_GET)) {
- foreach ($_GET as $k => $v) {
- $$k = $v;
- }
+ foreach ($_GET as $k => $v) {
+ $$k = $v;
+ }
}
if (isset($_POST)) {
- foreach ($_POST as $k => $v) {
- $$k = $v;
- }
+ foreach ($_POST as $k => $v) {
+ $$k = $v;
+ }
}
+
switch ($op) {
- case 'salvar':
- $yname = $_POST['yname'];
- $yemail = $_POST['yemail'];
- $ydomain = $_POST['ydomain'];
- $feedback_type = $_POST['feedback_type'];
- $feedback_other = $_POST['feedback_other'];
- $titulo = "Mastop Go2 - FeedBack from ".$ydomain;
- $body = "<b>".$yname." (".$yemail.") - ".$ydomain."</b><br />";
- $body .= "Type: ".$feedback_type.((!empty($feedback_other)) ? " - ".$feedback_other : "")."<br />";
- $body .= $_POST['feedback_content'];
- $xoopsMailer =& getMailer();
- $xoopsMailer->useMail();
- $xoopsMailer->setToEmails('go...@ma...');
- $xoopsMailer->setFromEmail($yemail);
- $xoopsMailer->setFromName($yname);
- $xoopsMailer->setSubject($titulo);
- $xoopsMailer->multimailer->IsHTML(true);
- $xoopsMailer->setBody($body);
- $xoopsMailer->send();
- $msg = '
- <div align="center" style="width: 80%; padding: 10px; padding-top:0px; padding-bottom: 5px; border: 2px solid #9C9C9C; background-color: #F2F2F2; margin-right:auto;margin-left:auto;">
- <h3>'.MGO_ADM_FEEDSUCCESS.'</h3>
- </div>
- ';
- case 'feature':
- default:
- mgo_adm_menu();
- echo (!empty($msg)) ? $msg."<br />" : '';
- $form['titulo'] = MGO_ADM_FEEDBACKN;
- $form['op'] = "salvar";
- include XOOPS_ROOT_PATH."/modules/".MGO_MOD_DIR."/include/feedback.form.inc.php";
- $feedbackform->display();
- break;
+ case 'salvar':
+ $yname = $_POST['yname'];
+ $yemail = $_POST['yemail'];
+ $ydomain = $_POST['ydomain'];
+ $feedback_type = $_POST['feedback_type'];
+ $feedback_other = $_POST['feedback_other'];
+ $titulo = "Mastop Go2 - FeedBack from ".$ydomain;
+ $body = "<b>".$yname." (".$yemail.") - ".$ydomain."</b><br />";
+ $body .= "Type: ".$feedback_type.((!empty($feedback_other)) ? " - ".$feedback_other : "")."<br />";
+ $body .= $_POST['feedback_content'];
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToEmails('go...@ma...');
+ $xoopsMailer->setFromEmail($yemail);
+ $xoopsMailer->setFromName($yname);
+ $xoopsMailer->setSubject($titulo);
+ $xoopsMailer->multimailer->IsHTML(true);
+ $xoopsMailer->setBody($body);
+ $xoopsMailer->send();
+ $msg = '
+ <div align="center" style="width: 80%; padding: 10px; padding-top:0px; padding-bottom: 5px; border: 2px solid #9C9C9C; background-color: #F2F2F2; margin-right:auto;margin-left:auto;">
+ <h3>'.MGO_ADM_FEEDSUCCESS.'</h3>
+ </div>
+ ';
+
+ case 'feature':
+ default:
+ mgo_adm_menu();
+ echo (!empty($msg)) ? $msg."<br />" : '';
+ $form['titulo'] = MGO_ADM_FEEDBACKN;
+ $form['op'] = "salvar";
+ include XOOPS_ROOT_PATH."/modules/".MGO_MOD_DIR."/include/feedback.form.inc.php";
+ $feedbackform->display();
+ break;
}
echo "<div align='center' style='margin-top:10px'><a href='http://www.mastop.com.br/produtos/go2/'><img src='images/mgo2_footer.gif'></a><br /><a style='color: #029116; font-size:11px' href='feedback.php'>".MGO_ADM_FEEDBACK."</a> - <a style='color: #FF0000; font-size:11px' href='http://www.mastop.com.br/produtos/go2/checkversion.php?lang=".$xoopsConfig['language']."&version=".round($xoopsModule->getVar('version') / 100, 2)."' target='_blank'>".MGO_ADM_CHKVERSION."</a></div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
+?>
Modified: XoopsModules/mastop_go2/trunk/mastop_go2/admin/go2.php
===================================================================
--- XoopsModules/mastop_go2/trunk/mastop_go2/admin/go2.php 2014-02-24 10:15:11 UTC (rev 12330)
+++ XoopsModules/mastop_go2/trunk/mastop_go2/admin/go2.php 2014-02-24 10:31:01 UTC (rev 12331)
@@ -18,342 +18,328 @@
$op = (isset($_GET['op'])) ? $_GET['op'] : 'listar';
if (isset($_GET)) {
- foreach (
- $_GET as $k => $v
- ) {
- $$k = $v;
- }
+ foreach ($_GET as $k => $v) {
+ $$k = $v;
+ }
}
if (isset($_POST)) {
- foreach (
- $_POST as $k => $v
- ) {
- $$k = $v;
- }
+ foreach ($_POST as $k => $v) {
+ $$k = $v;
+ }
}
+
$sec_classe =& mgo_getClass(MGO_MOD_TABELA0);
$sec_todos = $sec_classe->pegaTudo();
$sec_select = array();
if ($sec_todos) {
- foreach (
- $sec_todos as $v
- ) {
- $sec_select[$v->getVar($v->id)] = $v->getVar("sec_30_nome");
- }
+ foreach ($sec_todos as $v) {
+ $sec_select[$v->getVar($v->id)] = $v->getVar("sec_30_nome");
+ }
}
+
if (!empty($_POST['group_action'])) {
- switch ($_POST['group_action']) {
- case "group_del":
- if (is_array($_POST['checks'])) {
- foreach (
- $_POST['checks'] as $k => $v
- ) {
- $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
- $go2_classe->delete();
- }
- }
- redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
- break;
+ switch ($_POST['group_action']) {
+ case "group_del":
+ if (is_array($_POST['checks'])) {
+ foreach ($_POST['checks'] as $k => $v){
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
+ $go2_classe->delete();
+ }
+ }
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
- case "zera_count":
- if (is_array($_POST['checks'])) {
- foreach (
- $_POST['checks'] as $k => $v
- ) {
- ...
[truncated message content] |
|
From: <be...@us...> - 2014-02-24 10:15:18
|
Revision: 12330
http://sourceforge.net/p/xoops/svn/12330
Author: beckmi
Date: 2014-02-24 10:15:11 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
Adding release 1.01
Added Paths:
-----------
XoopsModules/mastop_go2/releases/1.01/mastop_go2/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/about.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_footer.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_header.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blockform.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blocksadmin.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/plugin.js
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/feedback.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/go2.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/ASC.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/DESC.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/bg.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/bgs.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/deletar.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/editar.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/envia.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/green.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/green_off.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/mgo2_footer.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/red.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/red_off.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/images/view.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/index.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/go2.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/hbar.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/icon3.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/jsdomenu.js
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/jsdomenubar.js
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/office_xp_arrow.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/office_xp_arrow_o.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/office_xp_divider.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/office_xp_menu_left.png
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/opt.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/sec.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu/style_menu.css
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/menu.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/sec.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/blocks/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/blocks/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/blocks/mgo_go2.bloco.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/formimage.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/formimage_browse.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/mastop_geral.class.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/mgo_go2_go2.class.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/class/mgo_sec_section.class.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/changelog.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/credits.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/install.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/lang_diff.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/leiame.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/licence.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/docs/readme.txt
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/img/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/img/direita.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/img/esquerda.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/img/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/img/loading-bar-black.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/css/jd.css
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/scripts/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/scripts/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/scripts/jd.js
XoopsModules/mastop_go2/releases/1.01/mastop_go2/galeria/scripts/mootools.js
XoopsModules/mastop_go2/releases/1.01/mastop_go2/go2.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/header.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/images/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/images/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/images/mgo2_footer.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/images/mgo2_logo.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/images/spacer.gif
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/feedback.form.inc.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/funcoes.inc.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/generator.form.inc.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/go2.form.inc.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/include/sec.form.inc.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/index.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/admin.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/blocks.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/help/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/help/help.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/help/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/main.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/english/modinfo.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/admin.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/blocks.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/help/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/help/help.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/help/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/main.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/italian/modinfo.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/admin.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/blocks.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/help/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/help/help.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/help/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/main.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/language/portuguesebr/modinfo.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/sql/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/sql/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/sql/mysql.sql
XoopsModules/mastop_go2/releases/1.01/mastop_go2/tac.php
XoopsModules/mastop_go2/releases/1.01/mastop_go2/templates/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/templates/blocks/
XoopsModules/mastop_go2/releases/1.01/mastop_go2/templates/blocks/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/templates/blocks/mgo_go2.block.tpl.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/templates/index.html
XoopsModules/mastop_go2/releases/1.01/mastop_go2/xoops_version.php
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/about.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/about.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/about.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,30 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package MastopGo2
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include 'admin_footer.php';
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/about.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_footer.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_footer.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_footer.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,11 @@
+<?php
+
+global $pathIcon32;
+echo "<div class='adminfooter'>\n"
+ ." <div style='text-align: center;'>\n"
+ ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ ." </div>\n"
+ ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
+ ."</div>";
+
+xoops_cp_footer();
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_footer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_header.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_header.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_header.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,99 @@
+<?php
+### =============================================================
+### Mastop InfoDigital - Paixão por Internet
+### =============================================================
+### Header com includes padrões para a Admin do Módulo
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital © 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+include '../../../include/cp_header.php';
+if ( file_exists("../language/".$xoopsConfig['language']."/modinfo.php") ) {
+ include_once("../language/".$xoopsConfig['language']."/modinfo.php");
+} else {
+ include_once("../language/portuguesebr/modinfo.php");
+}
+include_once XOOPS_ROOT_PATH."/modules/".MGO_MOD_DIR."/include/funcoes.inc.php";
+$c['lang']['filtros'] = MGO_ADM_FILTROS;
+$c['lang']['exibir'] = MGO_ADM_EXIBIR;
+$c['lang']['exibindo'] = MGO_ADM_EXIBINDO;
+$c['lang']['por_pagina'] = MGO_ADM_PORPAGINA;
+$c['lang']['acao'] = MGO_ADM_ACAO;
+$c['lang']['semresult'] = MGO_ADM_SEMRESULT;
+$c['lang']['showhidemenu'] = MGO_ADM_SHOWHIDEMENU;
+
+$c['lang']['group_action'] = MGO_ADM_GRP_ACTION;
+$c['lang']['group_erro_sel'] = MGO_ADM_GRP_ERR_SEL;
+$c['lang']['group_del'] = MGO_ADM_GRP_DEL;
+$c['lang']['group_del_sure'] = MGO_ADM_GRP_DEL_SURE;
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+include_once $path . '/mainfile.php';
+include_once $path . '/include/cp_functions.php';
+require_once $path . '/include/cp_header.php';
+
+global $xoopsModule;
+
+$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+// Load language files
+xoops_loadLanguage('admin', $thisModuleDir);
+xoops_loadLanguage('modinfo', $thisModuleDir);
+xoops_loadLanguage('main', $thisModuleDir);
+
+$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+
+include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+
+
+function mgo_adm_menu(){
+ global $xoopsModule, $xoopsConfig, $xoopsModuleConfig;
+ $adm_url = XOOPS_URL."/modules/".MGO_MOD_DIR."/admin/";
+ $links[] = array(0 => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid'), 1 => _PREFERENCES);
+ //xoops_cp_header();
+ echo '
+<link rel="stylesheet" type="text/css" href="menu/style_menu.css" />
+<script type="text/javascript" src="menu/jsdomenu.js"></script>
+<script type="text/javascript" src="menu/jsdomenubar.js"></script>
+<script type="text/javascript">
+function createjsDOMenu() {
+ mainMenu1 = new jsDOMenu(170);
+ with (mainMenu1) {
+ addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'sec.php?op=novo"));
+ addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'sec.php?op=listar"));
+ }
+
+ mainMenu2 = new jsDOMenu(170);
+ with (mainMenu2) {
+ addMenuItem(new menuItem("'._ADD.'", "", "'.$adm_url.'go2.php?op=novo"));
+ addMenuItem(new menuItem("'.MGO_ADM_GER.'", "", "'.$adm_url.'go2.php?op=listar"));
+ }
+
+ mainMenu3 = new jsDOMenu(150);
+ with (mainMenu3) {
+ addMenuItem(new menuItem("'.MGO_ADM_BLOCKS.'", "", "'.$adm_url.'blocksadmin.php"));
+ addMenuItem(new menuItem("'._PREFERENCES.'", "", "'.XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule->getVar('mid').'"));
+ }
+
+ menuBar = new jsDOMenuBar();
+ with (menuBar) {
+ addMenuBarItem(new menuBarItem("'.MGO_ADM_SEC.'", mainMenu1, "cliid"));
+ addMenuBarItem(new menuBarItem("'.MGO_ADM_GO2.'", mainMenu2, "prdid"));
+ addMenuBarItem(new menuBarItem("'._OPTIONS.'", mainMenu3, "optid"));
+ }
+ menuBar.items.cliid.showIcon("sec", "sec", "sec");
+ menuBar.items.prdid.showIcon("go2", "go2", "go2");
+ menuBar.items.optid.showIcon("opt", "opt", "opt");
+ menuBar.moveTo(680, 81);
+}
+</script>
+';
+}
+?>
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/admin_header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blockform.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blockform.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blockform.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,72 @@
+<?php
+### =============================================================
+### Mastop InfoDigital - Paix\xE3o por Internet
+### =============================================================
+### Formul\xE1rio para a Clonagem de Blocos
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital \xA9 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+$form = new XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', "post", true);
+if (isset($block['name'])) {
+ $form->addElement(new XoopsFormLabel(_AM_NAME, $block['name']));
+}
+$side_select = new XoopsFormSelect(_AM_BLKTYPE, "bside", $block['side']);
+$side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, 7 => _AM_CBBOTTOMLEFT, 8 => _AM_CBBOTTOMRIGHT, 9 => _AM_CBBOTTOM, ));
+$form->addElement($side_select);
+$form->addElement(new XoopsFormText(_AM_WEIGHT, "bweight", 2, 5, $block['weight']));
+$form->addElement(new XoopsFormRadioYN(_AM_VISIBLE, 'bvisible', $block['visible']));
+$mod_select = new XoopsFormSelect(_AM_VISIBLEIN, "bmodule", $block['modules'], 5, true);
+$module_handler =& xoops_gethandler('module');
+$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+$criteria->add(new Criteria('isactive', 1));
+$module_list =& $module_handler->getList($criteria);
+$module_list[-1] = _AM_TOPPAGE;
+$module_list[0] = _AM_ALLPAGES;
+ksort($module_list);
+$mod_select->addOptionArray($module_list);
+$form->addElement($mod_select);
+$form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false);
+if ( $block['is_custom'] ) {
+ $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
+ $textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">'._AM_USEFULTAGS.'</span><br /><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>');
+ $form->addElement($textarea, true);
+ $ctype_select = new XoopsFormSelect(_AM_CTYPE, 'bctype', $block['ctype']);
+ $ctype_select->addOptionArray(array('H' => _AM_HTML, 'P' => _AM_PHP, 'S' => _AM_AFWSMILE, 'T' => _AM_AFNOSMILE));
+ $form->addElement($ctype_select);
+} else {
+ if ($block['template'] != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
+ if (count($btemplate) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>'));
+ } else {
+ $btemplate2 =& $tplfile_handler->find('default', 'block', $block['bid']);
+ if (count($btemplate2) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>'));
+ }
+ }
+ }
+ if ($block['edit_form'] != false) {
+ $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $block['edit_form']));
+ }
+}
+$cache_select = new XoopsFormSelect(_AM_BCACHETIME, 'bcachetime', $block['cachetime']);
+$cache_select->addOptionArray(array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH));
+$form->addElement($cache_select);
+if (isset($block['bid'])) {
+ $form->addElement(new XoopsFormHidden('bid', $block['bid']));
+}
+$form->addElement(new XoopsFormHidden('op', $block['op']));
+$form->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+$button_tray = new XoopsFormElementTray('', ' ');
+if ($block['is_custom']) {
+ $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit"));
+}
+$button_tray->addElement(new XoopsFormButton('', 'submitblock', _SUBMIT, "submit"));
+$form->addElement($button_tray);
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blockform.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blocksadmin.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blocksadmin.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blocksadmin.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,322 @@
+<?php
+### =============================================================
+### Mastop InfoDigital - Paixão por Internet
+### =============================================================
+### Manutenção Individual de Blocos e Grupos
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital © 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+include_once 'admin_header.php';
+xoops_cp_header();
+$aboutAdmin = new ModuleAdmin();
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit(MGO_ADM_403);
+}
+
+if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
+ $op = "list";
+ if ( isset($_POST) ) {
+ foreach ( $_POST as $k => $v ) {
+ $$k = $v;
+ }
+ }
+
+ if ( isset($_GET['op']) ) {
+ if ($_GET['op'] == "edit" || $_GET['op'] == "delete" || $_GET['op'] == "delete_ok" || $_GET['op'] == "clone") {
+ $op = $_GET['op'];
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ }
+ }
+
+ function listar_blocos()
+ {
+ include_once 'admin_header.php';
+ //xoops_cp_header();
+
+ global $xoopsUser, $xoopsConfig, $xoopsModule;
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+ $module_handler =& xoops_gethandler('module');
+ $member_handler =& xoops_gethandler('member');
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $groups =& $member_handler->getGroups();
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_list =& $module_handler->getList($criteria);
+ $module_list[-1] = _AM_TOPPAGE;
+ $module_list[0] = _AM_ALLPAGES;
+ ksort($module_list);
+ echo "
+ <h4 style='text-align:left;'>".MGO_MOD_NOME." - "._AM_BADMIN."</h4>";
+ $module_handler =& xoops_gethandler('module');
+ echo "<form action='".$_SERVER['PHP_SELF']."' name='blockadmin' method='post'>
+ <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'><th align='center'>"._AM_TITLE."</th><th align='center' nowrap='nowrap'>"._AM_SIDE."<br />"._LEFT."-"._CENTER."-"._RIGHT."</th><th align='center'>"._AM_WEIGHT."</th><th align='center'>"._AM_VISIBLE."</th><th align='center'>"._AM_VISIBLEIN."</th><th align='center'>".MGO_ADM_GRUPOS."</th><th align='center'>"._AM_ACTION."</th></tr>
+ ";
+ $block_arr =& XoopsBlock::getByModule($xoopsModule->mid());
+ $block_count = count($block_arr);
+ $class = 'even';
+ foreach ($block_arr as $i) {
+ $groups_perms =& $moduleperm_handler->getGroupIds('block_read', $i->getVar("bid"));
+ $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.$i->getVar("bid");
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)) {
+ $modules[] = intval($row['module_id']);
+ }
+ $sel0 = $sel1 = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = "";
+ if ( $i->getVar("visible") == 1 ) {
+ $sel1 = " checked='checked'";
+ } else {
+ $sel0 = " checked='checked'";
+ }
+ if ( $i->getVar("side") == XOOPS_SIDEBLOCK_LEFT){
+ $ssel0 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_SIDEBLOCK_RIGHT ){
+ $ssel1 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_LEFT ){
+ $ssel2 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_RIGHT ){
+ $ssel4 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_CENTER ){
+ $ssel3 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMLEFT ){
+ $ssel5 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMRIGHT ){
+ $ssel6 = " checked='checked'";
+ } elseif ( $i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOM ){
+ $ssel7 = " checked='checked'";
+ }
+ if ( $i->getVar("title") == "" ) {
+ $title = " ";
+ } else {
+ $title = $i->getVar("title");
+ }
+ $name = $i->getVar("name");
+ echo "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[".$i->getVar("bid")."]' value='".$title."'></td><td class='$class' align='center' nowrap='nowrap'>
+ <div align='center' >
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_LEFT."'$ssel2 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_CENTER."'$ssel3 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_RIGHT."'$ssel4 />
+ </div>
+ <div>
+ <span style='float:right'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_RIGHT."'$ssel1 /></span>
+ <div align='left'><input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_SIDEBLOCK_LEFT."'$ssel0 /></div>
+ </div>
+ <div align='center'>
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."'$ssel5 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOM."'$ssel7 />
+ <input type='radio' name='side[".$i->getVar("bid")."]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."'$ssel6 />
+ </div>
+ </td><td class='$class' align='center'><input type='text' name='weight[".$i->getVar("bid")."]' value='".$i->getVar("weight")."' size='5' maxlength='5' /></td><td class='$class' align='center' nowrap><input type='radio' name='visible[".$i->getVar("bid")."]' value='1'$sel1>"._YES." <input type='radio' name='visible[".$i->getVar("bid")."]' value='0'$sel0>"._NO."</td>";
+
+ echo "<td class='$class' align='center'><select size='5' name='bmodule[".$i->getVar("bid")."][]' id='bmodule[".$i->getVar("bid")."][]' multiple='multiple'>";
+ foreach ($module_list as $k => $v){
+ echo "<option value='$k'".((in_array($k, $modules)) ? " selected='selected'" : "").">$v</option>";
+ }
+ echo "</select></td>";
+
+
+ echo "<td class='$class' align='center'><select size='5' name='groups[".$i->getVar("bid")."][]' id='groups[".$i->getVar("bid")."][]' multiple='multiple'>";
+ foreach ($groups as $grp){
+ echo "<option value='".$grp->getVar('groupid')."' ".((in_array($grp->getVar('groupid'), $groups_perms)) ? " selected='selected'" : "").">".$grp->getVar('name')."</option>";
+ }
+ echo "</select></td>";
+
+ echo "<td class='$class' align='center'><a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&bid=".$i->getVar("bid")."'>"._EDIT."</a> <a href='blocksadmin.php?op=clone&bid=".$i->getVar("bid")."'>"._CLONE."</a>";
+ if ($i->getVar('block_type') != 'S' && $i->getVar('block_type') != 'M') {
+ echo " <a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&bid=".$i->getVar("bid")."'>"._DELETE."</a>";
+ }
+ echo "
+ <input type='hidden' name='oldtitle[".$i->getVar("bid")."]' value='".$i->getVar('title')."' />
+ <input type='hidden' name='oldside[".$i->getVar("bid")."]' value='".$i->getVar('side')."' />
+ <input type='hidden' name='oldweight[".$i->getVar("bid")."]' value='".$i->getVar('weight')."' />
+ <input type='hidden' name='oldvisible[".$i->getVar("bid")."]' value='".$i->getVar('visible')."' />
+ <input type='hidden' name='bid[".$i->getVar("bid")."]' value='".$i->getVar("bid")."' />
+ </td></tr>
+ ";
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+ echo "<tr><td class='foot' align='center' colspan='7'>
+ <input type='hidden' name='op' value='order' />
+ ".$GLOBALS['xoopsSecurity']->getTokenHTML()."
+ <input type='submit' name='submit' value='"._SUBMIT."' />
+ </td></tr></table>
+ </form>
+ <br /><br />";
+ include_once 'admin_footer.php';
+ }
+ function clone_block($bid)
+ {
+ global $xoopsConfig;
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+ mgo_adm_menu();
+ $myblock = new XoopsBlock($bid);
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.intval($bid);
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)) {
+ $modules[] = intval($row['module_id']);
+ }
+ $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false;
+ $block = array('title'=> $myblock->getVar('title').' Clone', 'form_title' => _AM_CLONEBLOCK, 'name' => $myblock->getVar('name'), 'side' => $myblock->getVar('side'), 'weight' => $myblock->getVar('weight'), 'visible' => $myblock->getVar('visible'), 'content' => $myblock->getVar('content', 'N'), 'modules' => $modules, 'is_custom' => $is_custom, 'ctype' => $myblock->getVar('c_type'), 'cachetime' => $myblock->getVar('bcachetime'), 'op' => 'clone_ok', 'bid' => $myblock->getVar('bid'), 'edit_form' => $myblock->getOptions(), 'template' => $myblock->getVar('template'), 'options' => $myblock->getVar('options'));
+ echo '<a href="blocksadmin.php">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_CLONEBLOCK.'<br /><br />';
+ include 'blockform.php';
+ $form->display();
+ xoops_cp_footer();
+ exit();
+ }
+
+ function clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
+ {
+ global $xoopsUser, $xoopsConfig;
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php") ) {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH."/modules/system/language/portuguesebr/admin/groups.php");
+ }
+ $block = new XoopsBlock($bid);
+ $clone =& $block->xoopsClone();
+ if (empty($bmodule)) {
+ xoops_cp_header();
+ xoops_error(sprintf(_AM_NOTSELNG, _AM_VISIBLEIN));
+ xoops_cp_footer();
+ exit();
+ }
+ $clone->setVar('side', $bside);
+ $clone->setVar('weight', $bweight);
+ $clone->setVar('visible', $bvisible);
+ //$clone->setVar('content', $_POST['bcontent']);
+ $clone->setVar('title', $_POST['btitle']);
+ $clone->setVar('bcachetime', $bcachetime);
+ if ( isset($options) && (count($options) > 0) ) {
+ $options = implode('|', $options);
+ $clone->setVar('options', $options);
+ }
+ $clone->setVar('bid', 0);
+ if ($block->getVar('block_type') == 'C' || $block->getVar('block_type') == 'E') {
+ $clone->setVar('block_type', 'E');
+ } else {
+ $clone->setVar('block_type', 'D');
+ }
+ $newid = $clone->store();
+ if (!$newid) {
+ xoops_cp_header();
+ $clone->getHtmlErrors();
+ xoops_cp_footer();
+ exit();
+ }
+ if ($clone->getVar('template') != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
+ if (count($btemplate) > 0) {
+ $tplclone =& $btemplate[0]->xoopsClone();
+ $tplclone->setVar('tpl_id', 0);
+ $tplclone->setVar('tpl_refid', $newid);
+ $tplfile_handler->insert($tplclone);
+ }
+ }
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ foreach ($bmodule as $bmid) {
+ $sql = 'INSERT INTO '.$db->prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.$bmid.')';
+ $db->query($sql);
+ }
+ $groups =& $xoopsUser->getGroups();
+ $count = count($groups);
+ for ($i = 0; $i < $count; $i++) {
+ $sql = "INSERT INTO ".$db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (".$groups[$i].", ".$newid.", 1, 'block_read')";
+ $db->query($sql);
+ }
+ redirect_header('blocksadmin.php?op=listar',1,_AM_DBUPDATED);
+ }
+
+ function setar_ordem($bid, $title, $weight, $visible, $side)
+ {
+ $myblock = new XoopsBlock($bid);
+ $myblock->setVar('title', $title);
+ $myblock->setVar('weight', $weight);
+ $myblock->setVar('visible', $visible);
+ $myblock->setVar('side', $side);
+ $myblock->store();
+ }
+
+ if ( $op == "list" ) {
+ mgo_adm_menu();
+ listar_blocos();
+ xoops_cp_footer();
+ exit();
+ }
+
+ if ( $op == "order" ) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($_SERVER['PHP_SELF'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ foreach (array_keys($bid) as $i) {
+ if ( $oldtitle[$i] != $title[$i] || $oldweight[$i] != $weight[$i] || $oldvisible[$i] != $visible[$i] || $oldside[$i] != $side[$i] )
+ setar_ordem($bid[$i], $title[$i], $weight[$i], $visible[$i], $side[$i], $bmodule[$i]);
+ if(!empty($bmodule[$i]) && count($bmodule[$i]) > 0){
+ $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $xoopsDB->prefix('block_module_link'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if (in_array(0, $bmodule[$i])) {
+ $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], 0);
+ $xoopsDB->query($sql);
+ }else{
+ foreach ($bmodule[$i] as $bmid) {
+ $sql = sprintf("INSERT INTO %s (block_id, module_id) VALUES (%u, %d)", $xoopsDB->prefix('block_module_link'), $bid[$i], intval($bmid));
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+ $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if(!empty($groups[$i])){
+ foreach ($groups[$i] as $grp) {
+ $sql = sprintf("INSERT INTO %s (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')", $xoopsDB->prefix('group_permission'), $grp, $bid[$i]);
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+ redirect_header($_SERVER['PHP_SELF'],1,MGO_ADM_SUCESS2);
+ exit();
+ }
+ if ($op == 'clone') {
+ clone_block($bid);
+ }
+
+ if ($op == 'clone_ok') {
+ clone_block_ok($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options);
+ }
+} else {
+ echo MGO_ADM_403;
+}
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/blocksadmin.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/SatVal.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/color.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/index.html
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/index.html (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/index.html 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/plugin.js
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/plugin.js (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/plugin.js 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,128 @@
+/* DHTML Color Picker, Programming by Ulyses, ColorJack.com */
+
+function $(v) { return(document.getElementById(v)); }
+function $S(v) { return($(v).style); }
+function browser(v) { return(Math.max(navigator.userAgent.toLowerCase().indexOf(v),0)); }
+function toggle(v) { $S(v).display=($S(v).display=='none'?'block':'none'); }
+function within(v,a,z) { return((v>=a && v<=z)?true:false); }
+function XY(e,v) { var z=browser('msie')?Array(event.clientX+document.documentElement.scrollLeft,event.clientY+document.documentElement.scrollTop):Array(e.pageX,e.pageY); return(z[zero(v)]); }
+function zero(v) { v=parseInt(v); return(!isNaN(v)?v:0); }
+function zindex(d) { d.style.zIndex=zINDEX++; }
+
+/* PLUGIN */
+
+var maxValue={'h':'359','s':'100','v':'100'},HSV={0:359,1:100,2:100};
+var SVHeight=165,wSV=162,wH=162,slideHSV={0:359,1:100,2:100},zINDEX=15,stop=1;
+
+function HSVslide(d,o,e) {
+
+ function tXY(e) { tY=XY(e,1)-top; tX=XY(e)-left; }
+ function mkHSV(a,b,c) { return(Math.min(a,Math.max(0,Math.ceil((parseInt(c)/b)*a)))); }
+ function ckHSV(a,b) { if(within(a,0,b)) return(a); else if(a>b) return(b); else if(a<0) return('-'+oo); }
+ function drag(e) { if(!stop) {
+
+ if(d=='SVslide') { tXY(e); ds.left=ckHSV(tX-oo,wSV)+'px'; ds.top=ckHSV(tY-oo,wSV)+'px';
+
+ slideHSV[1]=mkHSV(100,wSV,ds.left); slideHSV[2]=100-mkHSV(100,wSV,ds.top); HSVupdate();
+
+ }
+ else if(d=='Hslide') {
+
+ tXY(e); ds.top=(ckHSV(tY-oo,wH)-5)+'px'; slideHSV[0]=mkHSV(359,wH,ds.top);
+
+ function commit() { var r='hsv',z={},j='';
+
+ for(var i=0; i<=r.length-1; i++) { j=r.substr(i,1); z[i]=(j=='h')?maxValue[j]-mkHSV(maxValue[j],wH,ds.top):HSV[i]; }
+
+ return(HSVupdate(hsv2hex(z)));
+
+ }
+
+ mkColor(commit()); $S('SV').backgroundColor='#'+hsv2hex(Array(HSV[0],100,100));
+
+ }
+ else if(d=='drag') { ds.left=XY(e)+oX-eX+'px'; ds.top=XY(e,1)+oY-eY+'px'; }
+
+ }}
+
+ if(stop) { stop=''; var ds=$S(d!='drag'?d:o);
+
+ if(d=='drag') { var oX=parseInt(ds.left), oY=parseInt(ds.top), eX=XY(e), eY=XY(e,1); zindex($(o)); }
+ else { var left=($(o).offsetLeft+10), top=($(o).offsetTop+22), tX, tY, oo=(d=='Hslide')?2:4; if(d=='SVslide') slideHSV[0]=HSV[0]; }
+
+ document.onmousemove=drag; document.onmouseup=function(){ stop=1; document.onmousemove=''; document.onmouseup=''; }; drag(e);
+
+ }
+}
+
+function HSVupdate(v) { HSV=v?hex2hsv(v):Array(slideHSV[0],slideHSV[1],slideHSV[2]);
+
+ if(!v) v=hsv2hex(Array(slideHSV[0],slideHSV[1],slideHSV[2]));
+
+ mkColor(v); $('plugHEX').innerHTML=v; return(v);
+
+}
+
+function loadSV() { var z=''; for(var i=SVHeight; i>=0; i--) z+="<div style=\"BACKGROUND: #"+hsv2hex(Array(Math.round((359/SVHeight)*i),100,100))+";\"><br /><\/div>"; $('Hmodel').innerHTML=z; }
+
+function updateH(v) { HSV=hex2hsv(v);
+
+ $S('SV').backgroundColor='#'+hsv2hex(Array(HSV[0],100,100));
+ $S('SVslide').top=(parseInt(wSV-wSV*(HSV[2]/100))-4)+'px'; $S('SVslide').left=parseInt(wSV*(HSV[1]/100))+'px';
+ $S('Hslide').top=(parseInt(wH*((maxValue['h']-HSV[0])/maxValue['h']))-7)+'px';
+
+}
+
+/* CONVERSIONS */
+
+function toHex(v) { v=Math.round(Math.min(Math.max(0,v),255)); return("0123456789ABCDEF".charAt((v-v%16)/16)+"0123456789ABCDEF".charAt(v%16)); }
+function hex2rgb(r) { return({0:parseInt(r.substr(0,2),16),1:parseInt(r.substr(2,2),16),2:parseInt(r.substr(4,2),16)}); }
+function rgb2hex(r) { return(toHex(r[0])+toHex(r[1])+toHex(r[2])); }
+function hsv2hex(h) { return(rgb2hex(hsv2rgb(h))); }
+function hex2hsv(v) { return(rgb2hsv(hex2rgb(v))); }
+
+function rgb2hsv(r) { // easyrgb.com/math.php?MATH=M20#text20
+
+ var max=Math.max(r[0],r[1],r[2]),delta=max-Math.min(r[0],r[1],r[2]),H,S,V;
+
+ if(max!=0) { S=Math.round(delta/max*100);
+
+ if(r[0]==max) H=(r[1]-r[2])/delta; else if(r[1]==max) H=2+(r[2]-r[0])/delta; else if(r[2]==max) H=4+(r[0]-r[1])/delta;
+
+ var H=Math.min(Math.round(H*60),360); if(H<0) H+=360;
+
+ }
+
+ return({0:H?H:0,1:S?S:0,2:Math.round((max/255)*100)});
+
+}
+
+function hsv2rgb(r) { // easyrgb.com/math.php?MATH=M21#text21
+
+ var R,B,G,S=r[1]/100,V=r[2]/100,H=r[0]/360;
+
+ if(S>0) { if(H>=1) H=0;
+
+ H=6*H; F=H-Math.floor(H);
+ A=Math.round(255*V*(1.0-S));
+ B=Math.round(255*V*(1.0-(S*F)));
+ C=Math.round(255*V*(1.0-(S*(1.0-F))));
+ V=Math.round(255*V);
+
+ switch(Math.floor(H)) {
+
+ case 0: R=V; G=C; B=A; break;
+ case 1: R=B; G=V; B=A; break;
+ case 2: R=A; G=V; B=C; break;
+ case 3: R=A; G=B; B=V; break;
+ case 4: R=C; G=A; B=V; break;
+ case 5: R=V; G=A; B=B; break;
+
+ }
+
+ return({0:R?R:0,1:G?G:0,2:B?B:0});
+
+ }
+ else return({0:(V=Math.round(V*255)),1:V,2:V});
+
+}
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/plugin.js
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slide.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/slideHue.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topA.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif
===================================================================
(Binary files differ)
Index: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif 2014-02-24 10:13:31 UTC (rev 12329)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif 2014-02-24 10:15:11 UTC (rev 12330)
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/color_picker/topBG.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/feedback.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/feedback.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/feedback.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,63 @@
+<?php
+### =============================================================
+### Mastop InfoDigital - Paix\xE3o por Internet
+### =============================================================
+### Arquivo para Solicita\xE7\xE3o de Recursos
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital \xA9 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+include 'admin_header.php';
+$op = (isset($_GET['op'])) ? $_GET['op'] : 'feature';
+if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
+ $$k = $v;
+ }
+}
+
+if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ $$k = $v;
+ }
+}
+switch ($op) {
+ case 'salvar':
+ $yname = $_POST['yname'];
+ $yemail = $_POST['yemail'];
+ $ydomain = $_POST['ydomain'];
+ $feedback_type = $_POST['feedback_type'];
+ $feedback_other = $_POST['feedback_other'];
+ $titulo = "Mastop Go2 - FeedBack from ".$ydomain;
+ $body = "<b>".$yname." (".$yemail.") - ".$ydomain."</b><br />";
+ $body .= "Type: ".$feedback_type.((!empty($feedback_other)) ? " - ".$feedback_other : "")."<br />";
+ $body .= $_POST['feedback_content'];
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToEmails('go...@ma...');
+ $xoopsMailer->setFromEmail($yemail);
+ $xoopsMailer->setFromName($yname);
+ $xoopsMailer->setSubject($titulo);
+ $xoopsMailer->multimailer->IsHTML(true);
+ $xoopsMailer->setBody($body);
+ $xoopsMailer->send();
+ $msg = '
+ <div align="center" style="width: 80%; padding: 10px; padding-top:0px; padding-bottom: 5px; border: 2px solid #9C9C9C; background-color: #F2F2F2; margin-right:auto;margin-left:auto;">
+ <h3>'.MGO_ADM_FEEDSUCCESS.'</h3>
+ </div>
+ ';
+ case 'feature':
+ default:
+ mgo_adm_menu();
+ echo (!empty($msg)) ? $msg."<br />" : '';
+ $form['titulo'] = MGO_ADM_FEEDBACKN;
+ $form['op'] = "salvar";
+ include XOOPS_ROOT_PATH."/modules/".MGO_MOD_DIR."/include/feedback.form.inc.php";
+ $feedbackform->display();
+ break;
+}
+echo "<div align='center' style='margin-top:10px'><a href='http://www.mastop.com.br/produtos/go2/'><img src='images/mgo2_footer.gif'></a><br /><a style='color: #029116; font-size:11px' href='feedback.php'>".MGO_ADM_FEEDBACK."</a> - <a style='color: #FF0000; font-size:11px' href='http://www.mastop.com.br/produtos/go2/checkversion.php?lang=".$xoopsConfig['language']."&version=".round($xoopsModule->getVar('version') / 100, 2)."' target='_blank'>".MGO_ADM_CHKVERSION."</a></div>";
+xoops_cp_footer();
\ No newline at end of file
Property changes on: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/feedback.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/go2.php
===================================================================
--- XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/go2.php (rev 0)
+++ XoopsModules/mastop_go2/releases/1.01/mastop_go2/admin/go2.php 2014-02-24 10:15:11 UTC (rev 12330)
@@ -0,0 +1,359 @@
+<?php
+### =============================================================
+### Mastop InfoDigital - Paixão por Internet
+### =============================================================
+### Arquivo para Manipulação de Destaques
+### =============================================================
+### Developer: Fernando Santos (topet05), fer...@ma...
+### Copyright: Mastop InfoDigital © 2003-2007
+### -------------------------------------------------------------
+### www.mastop.com.br
+### =============================================================
+### $Id$
+### =============================================================
+
+include_once 'admin_header.php';
+xoops_cp_header();
+$indexAdmin = new ModuleAdmin();
+
+$op = (isset($_GET['op'])) ? $_GET['op'] : 'listar';
+if (isset($_GET)) {
+ foreach (
+ $_GET as $k => $v
+ ) {
+ $$k = $v;
+ }
+}
+
+if (isset($_POST)) {
+ foreach (
+ $_POST as $k => $v
+ ) {
+ $$k = $v;
+ }
+}
+$sec_classe =& mgo_getClass(MGO_MOD_TABELA0);
+$sec_todos = $sec_classe->pegaTudo();
+$sec_select = array();
+if ($sec_todos) {
+ foreach (
+ $sec_todos as $v
+ ) {
+ $sec_select[$v->getVar($v->id)] = $v->getVar("sec_30_nome");
+ }
+}
+if (!empty($_POST['group_action'])) {
+ switch ($_POST['group_action']) {
+ case "group_del":
+ if (is_array($_POST['checks'])) {
+ foreach (
+ $_POST['checks'] as $k => $v
+ ) {
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
+ $go2_classe->delete();
+ }
+ }
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
+
+ case "zera_count":
+ if (is_array($_POST['checks'])) {
+ foreach (
+ $_POST['checks'] as $k => $v
+ ) {
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
+ $go2_classe->setVar("go2_10_acessos", 0);
+ $go2_classe->store();
+ }
+ }
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
+
+ case "desativa":
+ if (is_array($_POST['checks'])) {
+ foreach (
+ $_POST['checks'] as $k => $v
+ ) {
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
+ $go2_classe->desativar();
+ }
+ }
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
+ case "ativa":
+ default:
+ if (is_array($_POST['checks'])) {
+ foreach (
+ $_POST['checks'] as $k => $v
+ ) {
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $k);
+ $go2_classe->ativar();
+ }
+ }
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
+ }
+}
+switch ($op) {
+ case "ativar":
+ $go2_10_id = (!empty($go2_10_id)) ? $go2_10_id : 0;
+ $go2_classe =& mgo_getClass(MGO_MOD_TABELA1, $go2_10_id);
+ if (empty($go2_10_id) || $go2_classe->getVar('go2_10_id') == '') {
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?listar", 3, MGO_ADM_404);
+ }
+ $go2_classe->ativar();
+ redirect_header(XOOPS_URL . "/modules/" . MGO_MOD_DIR . "/admin/go2.php?op=listar", 3, MGO_ADM_SUCESS_UPD);
+ break;
+ case "desativar":
+ $go2_10_id = (!empty($go2_10_id)) ? $go2_10_id : 0;
+ $go2_classe =& mgo_getC...
[truncated message content] |
|
From: <be...@us...> - 2014-02-24 10:13:34
|
Revision: 12329
http://sourceforge.net/p/xoops/svn/12329
Author: beckmi
Date: 2014-02-24 10:13:31 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
Adding release 1.02
Added Paths:
-----------
XoopsModules/mastop_go2/releases/1.02/mastop_go2/
|
|
From: <be...@us...> - 2014-02-24 10:11:01
|
Revision: 12328
http://sourceforge.net/p/xoops/svn/12328
Author: beckmi
Date: 2014-02-24 10:10:57 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
Adding release folders
Added Paths:
-----------
XoopsModules/mastop_go2/releases/1.01/
XoopsModules/mastop_go2/releases/1.02/
XoopsModules/mastop_go2/releases/1.03/
XoopsModules/mastop_go2/releases/1.04/
|
|
From: <be...@us...> - 2014-02-19 21:37:13
|
Revision: 12327
http://sourceforge.net/p/xoops/svn/12327
Author: beckmi
Date: 2014-02-19 21:37:07 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
Updating to Jobs-4.4 RC2 (jlm69)
Modified Paths:
--------------
XoopsModules/jobs/trunk/jobs/READ_ME
XoopsModules/jobs/trunk/jobs/addlisting.php
XoopsModules/jobs/trunk/jobs/admin/about.php
XoopsModules/jobs/trunk/jobs/admin/addregion.php
XoopsModules/jobs/trunk/jobs/admin/admin_footer.php
XoopsModules/jobs/trunk/jobs/admin/job_categories.php
XoopsModules/jobs/trunk/jobs/admin/jobs.php
XoopsModules/jobs/trunk/jobs/admin/lists.php
XoopsModules/jobs/trunk/jobs/admin/main.php
XoopsModules/jobs/trunk/jobs/admin/modjobs.php
XoopsModules/jobs/trunk/jobs/admin/resumes.php
XoopsModules/jobs/trunk/jobs/admin/submitlisting.php
XoopsModules/jobs/trunk/jobs/class/pictures.php
XoopsModules/jobs/trunk/jobs/contact.php
XoopsModules/jobs/trunk/jobs/createresume.php
XoopsModules/jobs/trunk/jobs/deljob.php
XoopsModules/jobs/trunk/jobs/docs/credits.txt
XoopsModules/jobs/trunk/jobs/index.php
XoopsModules/jobs/trunk/jobs/jobscat.php
XoopsModules/jobs/trunk/jobs/language/english/admin.php
XoopsModules/jobs/trunk/jobs/language/english/blocks.php
XoopsModules/jobs/trunk/jobs/language/english/docs.php
XoopsModules/jobs/trunk/jobs/language/english/help/help.html
XoopsModules/jobs/trunk/jobs/language/english/main.php
XoopsModules/jobs/trunk/jobs/language/english/modinfo.php
XoopsModules/jobs/trunk/jobs/language/english/waiting.php
XoopsModules/jobs/trunk/jobs/modcompany.php
XoopsModules/jobs/trunk/jobs/modjob.php
XoopsModules/jobs/trunk/jobs/resumes.php
XoopsModules/jobs/trunk/jobs/templates/jobs_adlist.html
XoopsModules/jobs/trunk/jobs/templates/jobs_category.html
XoopsModules/jobs/trunk/jobs/templates/jobs_index.html
XoopsModules/jobs/trunk/jobs/templates/jobs_premium.html
XoopsModules/jobs/trunk/jobs/viewjobs.php
XoopsModules/jobs/trunk/jobs/xoops_version.php
Added Paths:
-----------
XoopsModules/jobs/trunk/jobs/admin/NEWjobs.php
Removed Paths:
-------------
XoopsModules/jobs/trunk/jobs/error_log
Modified: XoopsModules/jobs/trunk/jobs/READ_ME
===================================================================
--- XoopsModules/jobs/trunk/jobs/READ_ME 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/READ_ME 2014-02-19 21:37:07 UTC (rev 12327)
@@ -8,26 +8,29 @@
1) NEW INSTALL
1. Upload the jobs folder inside the Xoops modules folder, go to modules administration and install.
- 2. Replace the class/xoopsform/formselect.php file with the one provided for your Xoops version.
- 3. For Xoops version 2.3.3b Replace the class/xoopsform/formselect.php file and include/cp_header.php file with the ones provided.
+
2) UPGRADING FROM ANY PREVIOUS VERSION
BACKUP YOUR DATABASE BEFORE THIS UPGRADE. DON'T SAY YOU WEREN'T WARNED.
1. Overwrite the jobs folder with the new files.
2. Replace the class/xoopsform/formselect.php file with the one provided for your Xoops version.
- 3. For Xoops version 2.3.3b Replace the class/xoopsform/formselect.php file and include/cp_header.php file with the ones provided.
- 4. Run the upgrade script as admin. point browser to "http://yoursite/modules/jobs/admin/upgrade.php"
- 5. Update module, in module admin and you are done
+ 3. Run the upgrade script as admin. point browser to "http://yoursite/modules/jobs/admin/upgrade.php"
+ 4. Update module, in module admin and you are done
+Things you MUST do before using this module
+Before using this module there are some things you NEED TO DO FIRST.
+1. You MUST go to JOBS PREFERENCES FIRST and set it up the way you want to. Once you set it to use a Company or not, and add listings, you can not change it later, or it will mess up the way the module works.
+2. Then you need to go to JOBS ADMIN and set up categories, permissions, regions, type management.
+
IMPORTANT!!! You must create a category in resumes before trying to set permissions.
IMPORTANT!!! You must create states or regions unless you don't use states in the preferences.
-IMPORTANT!!! You must replace class/xoopsform/formselect.php and for 2.3.3b include/cp_header.php
+
Donations will allow this software to continue, without them probably not.
Report any problems at www.jlmzone.com
Modified: XoopsModules/jobs/trunk/jobs/addlisting.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/addlisting.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/addlisting.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -75,8 +75,8 @@
exit();
}
-$member_usid = $xoopsUser->getVar("uid", "E");
-
+$member_usid = $xoopsUser->uid();
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$all_comp = jobs_getCompany($member_usid);
if (!$all_comp) {
redirect_header(XOOPS_URL . "/modules/$mydirname/addcompany.php", 2, _JOBS_MUSTADD_COMPANY);
@@ -88,7 +88,7 @@
redirect_header(XOOPS_URL . "/modules/$mydirname/whatcompany.php", 1, _JOBS_WHAT_COMPANY);
}
}
-
+}
if (!empty($_POST['submit'])) {
$jobsdays = $xoopsModuleConfig['jobs_days'];
@@ -245,10 +245,18 @@
if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$form->addElement(new XoopsFormLabel(_JOBS_COMPANY, $thiscompany["comp_name"]));
$form->addElement(new XoopsFormHidden('company', $thiscompany["comp_name"]));
+ } else {
+ $form->addElement(new XoopsFormHidden('company', ""));
}
+
+
+
$form->addElement(new XoopsFormText(_JOBS_EMAIL, 'email', 50, 100, $email), TRUE);
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$form->addElement(new XoopsFormText(_JOBS_TOWN, 'town', 50, 50, $thiscompany["comp_city"]), FALSE);
-
+ } else {
+ $form->addElement(new XoopsFormText(_JOBS_TOWN, 'town', 50, 50, ""), FALSE);
+ }
if ($xoopsModuleConfig['jobs_show_state'] == '1') {
$state_form = new XoopsFormSelect(_JOBS_STATE, "state", $thiscompany["comp_state"], "0", FALSE);
while (list($rid, $name) = $xoopsDB->fetchRow($result2)) {
@@ -256,10 +264,16 @@
$state_form->addOption($rid, $name);
}
$form->addElement($state_form, TRUE);
+ } else {
+ $form->addElement(new XoopsFormHidden('state', ""));
}
-
+
+
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$form->addElement(new XoopsFormText(_JOBS_TEL, "tel", 30, 30, $thiscompany["comp_phone"]), FALSE);
-
+ } else {
+ $form->addElement(new XoopsFormText(_JOBS_TEL, "tel", 30, 30, ""), FALSE);
+ }
$cat_form = (new XoopsFormSelect(_JOBS_CAT, 'cid', ''));
$cattree = $mytree->getChildTreeArray(0, "title ASC");
$cat_form->addOption('', _JOBS_SELECTCAT);
@@ -286,13 +300,13 @@
$form->addElement($type_form);
if (($premium == "1") || ($temp_premium == "1")) {
- $radio = new XoopsFormRadio(_JOBS_STATUS, 'status', "");
+ $radio = new XoopsFormRadio(_JOBS_STATUS, 'status', "1");
$options["1"] = _JOBS_ACTIVE;
$options["0"] = _JOBS_INACTIVE;
$radio->addOptionArray($options);
$form->addElement($radio, TRUE);
} else {
- $form->addElement(new XoopsFormHidden('status', "0"));
+ $form->addElement(new XoopsFormHidden('status', "1"));
}
$form->addElement(new XoopsFormText(_JOBS_TITLE, "title", 40, 50, ""), TRUE);
$form->addElement(jobs_getEditor(_JOBS_DESC, "desctext", "", "100%", "300px", ""), TRUE);
@@ -303,23 +317,31 @@
$sel_form->addOption($nom_price, $nom_price);
}
$form->addElement($sel_form);
-
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$form->addElement(
new XoopsFormTextArea(_JOBS_CONTACTINFO, "contactinfo",
"" . $myts->undoHtmlSpecialChars($myts->displayTarea($thiscompany["comp_contact"], 0, 0, 0, 0, 0))
. "", 6, 40), TRUE
);
+ } else {
+ $form->addElement(
+ new XoopsFormTextArea(_JOBS_CONTACTINFO, "contactinfo",
+ "", 6, 40), TRUE
+ );
+ }
+
if (($premium == "1") || ($temp_premium == "1")) {
- if ($thiscompany["comp_user1_contact"]) {
- $form->addElement(
- new XoopsFormTextArea(_JOBS_CONTACTINFO1, "contactinfo1",
+
+ if (($xoopsModuleConfig['jobs_show_company'] == '1') && ($thiscompany["comp_user1_contact"])) {
+
+ $form->addElement(new XoopsFormTextArea(_JOBS_CONTACTINFO1, "contactinfo1",
"" . $thiscompany["comp_user1_contact"] . "", 6, 40), FALSE
);
} else {
$form->addElement(new XoopsFormTextArea(_JOBS_CONTACTINFO1, "contactinfo1", "", 6, 40), FALSE);
}
- if ($thiscompany["comp_user2_contact"]) {
+ if (($xoopsModuleConfig['jobs_show_company'] == '1') && ($thiscompany["comp_user2_contact"])) {
$form->addElement(
new XoopsFormTextArea(_JOBS_CONTACTINFO2, "contactinfo2",
"" . $thiscompany["comp_user2_contact"] . "", 6, 40), FALSE
@@ -339,7 +361,9 @@
} else {
$form->addElement(new XoopsFormHidden("valid", "0"), FALSE);
}
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$form->addElement(new XoopsFormHidden("comp_id", $thiscompany["comp_id"]), FALSE);
+ }
$form->addElement(new XoopsFormButton('', 'submit', _JOBS_SUBMIT, 'submit'));
$form->display();
$xoopsTpl->assign('submit_form', ob_get_contents());
Added: XoopsModules/jobs/trunk/jobs/admin/NEWjobs.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/NEWjobs.php (rev 0)
+++ XoopsModules/jobs/trunk/jobs/admin/NEWjobs.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -0,0 +1,138 @@
+<?php
+// Jobs for Xoops 2.3.3b and up by John Mordo - jlm69 at Xoops //
+// //
+include_once '../../../include/cp_header.php';
+$mydirname = basename(dirname(dirname(__FILE__)));
+include_once (XOOPS_ROOT_PATH . "/modules/$mydirname/include/functions.php");
+
+include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
+
+include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/class/jobtree.php");
+
+$myts =& MyTextSanitizer::getInstance();
+
+include 'admin_header.php';
+xoops_cp_header();
+$index_admin = new ModuleAdmin();
+echo $index_admin->addNavigation("jobs.php");
+$index_admin->addItemButton(_AM_JOBS_ADD_LINK, 'submitlisting.php', 'add', '');
+echo $index_admin->renderButton('left', '');
+//loadModuleAdminMenu(3, "");
+
+include XOOPS_ROOT_PATH . '/class/pagenav.php';
+
+$countresult = $xoopsDB->query("select COUNT(*) FROM " . $xoopsDB->prefix("jobs_listing") . "");
+list($crow) = $xoopsDB->fetchRow($countresult);
+$crows = $crow;
+
+$nav = '';
+if ($crows > "0") {
+// shows number of jobs per page default = 15
+ $showonpage = 15;
+ $show = "";
+ $show = (intval($show) > 0) ? intval($show) : $showonpage;
+
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ if (!isset($max)) {
+ $max = $start + $show;
+ }
+
+ $sql
+ = "select lid, title, date, status, expire, submitter, valid, premium from " . $xoopsDB->prefix("jobs_listing")
+ . " ORDER BY lid";
+
+ $result1 = $xoopsDB->query($sql, $show, $start);
+ echo "<table border=1 width=100% cellpadding=2 cellspacing=0 border=0><td><tr>";
+
+
+
+
+ if ($crows > 0) {
+ $nav = new XoopsPageNav($crows, $showonpage, $start, 'start', 'op=Region');
+ echo "<br />" . _AM_JOBS_THEREIS . " <b>$crows</b> " . _AM_JOBS_JOBLISTINGS . "<br /><br />";
+ echo $nav->renderNav();
+
+
+
+
+
+ echo "<br /><br /><table width=100% cellpadding=2 cellspacing=0 border=0>";
+ $rank = 1;
+ }
+
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th align=\"center\">" . _AM_JOBS_NUMANN . "</th>
+ <th align=\"center\">" . _AM_JOBS_TITLE2 . "</th>
+ <th align=\"center\">" . _AM_JOBS_SUBMITTED_ON . "</th>
+ <th align=\"center\">" . _AM_JOBS_ACTIVE . "</th>
+ <th align=\"center\">" . _AM_JOBS_EXPIRES . "</th>
+ <th align=\"center\">" . _AM_JOBS_SENDBY . "</th>
+ <th align=\"center\">" . _AM_JOBS_PUBLISHEDCAP . "</th>
+ <th align=\"center\">" . _AM_JOBS_PREMIUM . "</th>
+
+ <th align='center' width='10%'>" . _AM_JOBS_ACTIONS . "</th>
+ </tr>";
+
+ $class = "odd";
+ $result1 = $xoopsDB->query($sql, $show, $start);
+
+
+
+
+
+
+
+ while (list($lid, $title, $date, $status, $expire, $submitter, $valid, $premium) = $xoopsDB->fetchRow($result1)) {
+ $title = $myts->htmlSpecialChars($title);
+ $date2 = formatTimestamp($date, "s");
+ // $expire2 = formatTimestamp($expire, "s");
+
+ echo "<tr class='" . $class . "'>";
+ $class = ($class == "even") ? "odd" : "even";
+ echo "<td align=\"center\">" . $lid."</td>";
+ echo "<td align=\"center\">" . $title . "</td>";
+ echo "<td align=\"center\">" . $date2 . "</td>";
+ echo "<td align=\"center\">" . $status . "</td>";
+ echo "<td align=\"center\">" . $expire . "</td>";
+ echo "<td align=\"center\">" . $submitter . "</td>";
+ echo "<td align=\"center\">" . $valid . "</td>";
+ echo "<td align=\"center\">" . $premium . "</td>";
+
+ echo "<td align='center' width='10%'>
+ <a href='modjobs.php?lid=" . $lid . "'><img src=" . $pathIcon16 . "/edit.png alt='"
+ . _EDIT . "' title='" . _EDIT . "'></a>
+ <a href='../deljob.php?lid=" . $lid . "'><img src=" . $pathIcon16 . "/delete.png alt='"
+ . _DELETE . "' title='" . _DELETE . "'></a>
+ </td>";
+ echo "</tr>";
+
+ }
+ echo "</table><br /><br />";
+ echo $nav->renderNav();
+// echo "</fieldset><br />";
+} else {
+ echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_MAN_JOB . "</legend>";
+ echo "<br /> " . _AM_JOBS_NO_JOB . "<br /><br />";
+ echo "</fieldset>";
+
+// echo "<fieldset><legend style='font-weight: bold; color:#900;'>" . _AM_JOBS_ADD_COMPANY . "</legend>";
+// echo "<a href=\"addcomp.php\">" . _AM_JOBS_ADD_COMPANY . "</a></fieldset>
+// </table<br />";
+}
+
+//include_once 'category3.php';
+//$action='';
+//if ($action === false) {
+// $action = $_SERVER["REQUEST_URI"];
+//}
+//$title='stnihsathsthsths';
+//$form = new myTableForm($title, "form", $action, "post", true);
+//$form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+//$form->display();
+
+include_once 'job_categories.php';
+
+xoops_cp_footer();
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/jobs/trunk/jobs/admin/NEWjobs.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/jobs/trunk/jobs/admin/about.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/about.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/about.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -25,6 +25,6 @@
$aboutAdmin = new ModuleAdmin();
echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', FALSE);
+echo $aboutAdmin->renderAbout('2R5DLEE94B4WN', FALSE);
include 'admin_footer.php';
\ No newline at end of file
Modified: XoopsModules/jobs/trunk/jobs/admin/addregion.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/addregion.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/addregion.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -22,7 +22,7 @@
);
$xoopsDB->query($sql);
- redirect_header("region.php", 13, _AM_JOBS_REGION_ADDED);
+ redirect_header("region.php", 4, _AM_JOBS_REGION_ADDED);
exit();
} else {
@@ -30,7 +30,12 @@
include 'admin_header.php';
xoops_cp_header();
//loadModuleAdminMenu(4, "");
-
+ $index_admin = new ModuleAdmin();
+ echo $index_admin->addNavigation("region.php");
+
+
+
+
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
ob_start();
Modified: XoopsModules/jobs/trunk/jobs/admin/admin_footer.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/admin_footer.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/admin_footer.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -20,6 +20,6 @@
echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n"
. " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
- . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>";
+ . " </div>\n" . " " . _AM_JOBS_MOD_ADMIN_FOOTER . "\n" . "</div>";
xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/jobs/trunk/jobs/admin/job_categories.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/job_categories.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/job_categories.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -28,18 +28,7 @@
else {
$op = 'list';
}
-//include_once $GLOBALS['xoops']->path('class/xoopsform/tableform.php');
-//
-//class myTableForm extends XoopsTableForm {
-//
-//}
-//include_once $GLOBALS['xoops']->path('class/xoopsform/themeform.php');
-//
-//class myTableForm extends XoopsThemeForm {
-//
-//}
-
switch ($op) {
case "list":
default:
@@ -72,11 +61,11 @@
echo "<tr class='" . $class . "'>";
echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>";
- echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/". $category_arr[$i]->getVar("img")
+ echo "<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/". $category_arr[$i]->getVar("img")
. "\" height=\"16px\" title=\"img\" alt=\"img\"></td>";
echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>";
- echo"<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>";
+ echo "<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>";
echo "<td align='center' width='10%'>
<a href='job_categories.php?op=edit_category&cid=" . $category_arr[$i]->getVar("cid")
@@ -120,13 +109,13 @@
echo "<tr class='" . $class . "'>";
echo "<td align=\"left\">" . $prefix . " " . $category_arr[$i]->getVar("title") . "</td>";
- echo"<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/"
+ echo "<td align=\"center\"><img src=\"" . XOOPS_URL . "/modules/jobs/images/cat/"
. $category_arr[$i]->getVar("img")
. "\" height=\"16px\" title=\"img\" alt=\"img\"></td>";
echo "<td align=\"center\">" . $category_arr[$i]->getVar("ordre") . "</td>";
- echo"<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>";
+ echo "<td align=\"center\">" . $category_arr[$i]->getVar("affprice") . "</td>";
echo "<td align='center' width='10%'>
<a href='job_categories.php?op=edit_category&cid="
@@ -187,7 +176,10 @@
//Form category_img
include_once XOOPS_ROOT_PATH . "/class/uploader.php";
$uploaddir = XOOPS_UPLOAD_PATH . "/jobs/images/";
- $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["category_img_mimetypes"], $GLOBALS["xoopsModuleConfig"]["category_img_size"], NULL, NULL);
+ $maxwide = $xoopsModuleConfig['jobs_resized_width'];
+ $maxhigh = $xoopsModuleConfig['jobs_resized_height'];
+ $allowed_mimetypes = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png');
+ $uploader = new XoopsMediaUploader($uploaddir, $allowed_mimetypes, NULL, $maxwide, $maxhigh);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$uploader->setPrefix("category_img_");
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
Modified: XoopsModules/jobs/trunk/jobs/admin/jobs.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/jobs.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/jobs.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -27,8 +27,8 @@
$nav = '';
if ($crows > "0") {
-// shows number of jobs per page default = 15
- $showonpage = 15;
+// shows number of jobs per page set in preferences
+ $showonpage = $xoopsModuleConfig['jobs_joblisting_num'];
$show = "";
$show = (intval($show) > 0) ? intval($show) : $showonpage;
@@ -39,11 +39,27 @@
$sql
= "select lid, title, date, status, expire, submitter, valid, premium from " . $xoopsDB->prefix("jobs_listing")
- . " ORDER BY lid";
+ . " ORDER BY valid,lid";
$result1 = $xoopsDB->query($sql, $show, $start);
echo "<table border=1 width=100% cellpadding=2 cellspacing=0 border=0><td><tr>";
+
+
+
+ if ($crows > 0) {
+ $nav = new XoopsPageNav($crows, $showonpage, $start, 'start', '');
+ echo "<br />" . _AM_JOBS_THEREIS . " <b>$crows</b> " . _AM_JOBS_JOBLISTINGS . "<br /><br />";
+ echo $nav->renderNav();
+
+
+
+
+
+ echo "<br /><br /><table width=100% cellpadding=2 cellspacing=0 border=0>";
+ $rank = 1;
+ }
+
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
<th align=\"center\">" . _AM_JOBS_NUMANN . "</th>
@@ -60,20 +76,34 @@
$class = "odd";
$result1 = $xoopsDB->query($sql, $show, $start);
+
+
+
+
+
+
+
while (list($lid, $title, $date, $status, $expire, $submitter, $valid, $premium) = $xoopsDB->fetchRow($result1)) {
$title = $myts->htmlSpecialChars($title);
$date2 = formatTimestamp($date, "s");
// $expire2 = formatTimestamp($expire, "s");
echo "<tr class='" . $class . "'>";
+
+
+
$class = ($class == "even") ? "odd" : "even";
+
+
echo "<td align=\"center\">" . $lid."</td>";
echo "<td align=\"center\">" . $title . "</td>";
echo "<td align=\"center\">" . $date2 . "</td>";
echo "<td align=\"center\">" . $status . "</td>";
echo "<td align=\"center\">" . $expire . "</td>";
echo "<td align=\"center\">" . $submitter . "</td>";
+
echo "<td align=\"center\">" . $valid . "</td>";
+
echo "<td align=\"center\">" . $premium . "</td>";
echo "<td align='center' width='10%'>
@@ -86,7 +116,7 @@
}
echo "</table><br /><br />";
-
+ echo $nav->renderNav();
// echo "</fieldset><br />";
} else {
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_MAN_JOB . "</legend>";
Modified: XoopsModules/jobs/trunk/jobs/admin/lists.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/lists.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/lists.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -5,7 +5,7 @@
$mydirname = basename(dirname(dirname(__FILE__)));
include_once (XOOPS_ROOT_PATH . "/modules/$mydirname/include/functions.php");
-include_once XOOPS_ROOT_PATH . "/modules/jobs/admin/header.php";
+include_once XOOPS_ROOT_PATH . "/modules/jobs/admin/admin_header.php";
xoops_cp_header();
// loadModuleAdminMenu(3, "");
Modified: XoopsModules/jobs/trunk/jobs/admin/main.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/main.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/main.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -1037,7 +1037,7 @@
}
$xoopsDB->query("insert into " . $xoopsDB->prefix("jobs_type") . " values (NULL, '$type')");
- redirect_header("index.php", 3, _AM_JOBS_ADDTYPE2);
+ redirect_header("main.php", 3, _AM_JOBS_ADDTYPE2);
exit();
}
}
@@ -1078,7 +1078,7 @@
$nom_type = $myts->addSlashes($nom_type);
$xoopsDB->query("update " . $xoopsDB->prefix("jobs_type") . " set nom_type='$nom_type' where id_type='$id_type'");
- redirect_header("index.php", 3, _AM_JOBS_TYPEMOD);
+ redirect_header("main.php", 3, _AM_JOBS_TYPEMOD);
exit();
}
@@ -1088,7 +1088,7 @@
global $xoopsDB, $mydirname, $admin_lang;
$xoopsDB->query("delete from " . $xoopsDB->prefix("jobs_type") . " where id_type='$id_type'");
- redirect_header("index.php", 3, _AM_JOBS_TYPEDEL);
+ redirect_header("main.php", 3, _AM_JOBS_TYPEDEL);
exit();
}
@@ -1121,7 +1121,7 @@
}
$xoopsDB->query("insert into " . $xoopsDB->prefix("jobs_price") . " values (NULL, '$type')");
- redirect_header("index.php", 3, _AM_JOBS_ADDPRICE2);
+ redirect_header("main.php", 3, _AM_JOBS_ADDPRICE2);
exit();
}
}
@@ -1162,7 +1162,7 @@
$xoopsDB->query(
"update " . $xoopsDB->prefix("jobs_price") . " set nom_price='$nom_price' where id_price='$id_price'"
);
- redirect_header("index.php", 3, _AM_JOBS_PRICEMOD);
+ redirect_header("main.php", 3, _AM_JOBS_PRICEMOD);
exit();
}
@@ -1173,7 +1173,7 @@
$xoopsDB->query("delete from " . $xoopsDB->prefix("jobs_price") . " where id_price='$id_price'");
- redirect_header("index.php", 3, _AM_JOBS_PRICEDEL);
+ redirect_header("main.php", 3, _AM_JOBS_PRICEDEL);
exit();
}
Modified: XoopsModules/jobs/trunk/jobs/admin/modjobs.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/modjobs.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/modjobs.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -263,6 +263,8 @@
//
//
// $form->addElement($state_form, TRUE);
+
+ if ($xoopsModuleConfig['jobs_show_state'] == '1') {
$result2 = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid");
$state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", $state, "1", FALSE);
while (list($rid, $name) = $xoopsDB->fetchRow($result2)) {
@@ -270,9 +272,11 @@
$state_form->addOption($rid, $name);
}
$form->addElement($state_form, TRUE);
+ } else {
+ $form->addElement(new XoopsFormHidden("state", ""), FALSE);
+ }
-
$form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO, "contactinfo", $contactinfo, 4,28), FALSE);
$form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO1, "contactinfo1", $contactinfo1,4,28), FALSE);
$form->addElement(new XoopsFormTextArea(_AM_JOBS_CONTACTINFO2, "contactinfo2", $contactinfo2, 4,28), FALSE);
Modified: XoopsModules/jobs/trunk/jobs/admin/resumes.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/resumes.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/resumes.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -27,8 +27,8 @@
$nav = '';
if ($crows > "0") {
-// shows number of companies per page default = 15
- $showonpage = 15;
+// shows number of resumes per page set in preferences
+ $showonpage = $xoopsModuleConfig['jobs_reslisting_num'];;
$show = "";
$show = (intval($show) > 0) ? intval($show) : $showonpage;
@@ -44,6 +44,14 @@
$result1 = $xoopsDB->query($sql, $show, $start);
echo "<table border=1 width=100% cellpadding=2 cellspacing=0 border=0><td><tr>";
+ if ($crows > 0) {
+ $nav = new XoopsPageNav($crows, $showonpage, $start, 'start', '');
+ echo "<br />" . _AM_JOBS_THEREIS . " <b>$crows</b> " . _AM_JOBS_RES_LISTINGS . "<br /><br />";
+ echo $nav->renderNav();
+ echo "<br /><br /><table width=100% cellpadding=2 cellspacing=0 border=0>";
+ $rank = 1;
+ }
+
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
<th align=\"center\">" . _AM_JOBS_RES_NUMBER . "</th>
@@ -89,7 +97,7 @@
}
echo "</table><br /><br />";
-
+ echo $nav->renderNav();
// echo "</fieldset><br />";
} else {
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_JOBS_MAN_RESUME . "</legend>";
Modified: XoopsModules/jobs/trunk/jobs/admin/submitlisting.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/admin/submitlisting.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/admin/submitlisting.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -160,6 +160,11 @@
$indexAdmin->addItemButton(_AM_JOBS_MAN_JOB, 'jobs.php', 'list');
echo $indexAdmin->renderButton('left', '');
+ $iscompany = jobs_getAllCompanies();
+ if (!$iscompany) {
+ redirect_header("addcomp.php", 3, _AM_JOBS_MUSTADD_COMPANY);
+ }
+
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
ob_start();
@@ -216,9 +221,10 @@
if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$company = jobs_getACompany($comp_id);
}
- $result = $xoopsDB->query("select nom_type from " . $xoopsDB->prefix("jobs_type") . " order by nom_type");
- $result1 = $xoopsDB->query("select nom_price from " . $xoopsDB->prefix("jobs_price") . " order by id_price");
- $result2 = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid");
+ $result = $xoopsDB->query("select rid, name from " . $xoopsDB->prefix("jobs_region") . " order by rid");
+ $result1 = $xoopsDB->query("select nom_type from " . $xoopsDB->prefix("jobs_type") . " order by nom_type");
+ $result2 = $xoopsDB->query("select nom_price from " . $xoopsDB->prefix("jobs_price") . " order by id_price");
+
ob_start();
$form = new XoopsThemeForm(_AM_JOBS_ADD_LISTING, 'submitform', 'submitlisting.php');
$form->setExtra('enctype="multipart/form-data"');
@@ -238,11 +244,13 @@
if ($xoopsModuleConfig['jobs_show_state'] == '1') {
$state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", $company["comp_state"], "0", FALSE);
- while (list($rid, $name) = $xoopsDB->fetchRow($result2)) {
+ while (list($rid, $name) = $xoopsDB->fetchRow($result)) {
$state_form->addOption('', _AM_JOBS_SELECT_STATE);
$state_form->addOption($rid, $name);
}
$form->addElement($state_form, TRUE);
+ } else {
+ $form->addElement(new XoopsFormHidden("state", ""));
}
$form->addElement(new XoopsFormText(_AM_JOBS_TEL, "tel", 30, 30, $company["comp_phone"]), FALSE);
@@ -258,11 +266,16 @@
$form->addElement($sel_cat, TRUE);
$form->addElement(new XoopsFormText(_AM_JOBS_HOW_LONG, "expire", 3, 3, $xoopsModuleConfig['jobs_days']), TRUE);
- $type_form = new XoopsFormSelect(_AM_JOBS_TYPE, "type", "", "1", FALSE);
- while (list($nom_type) = $xoopsDB->fetchRow($result)) {
- $type_form->addOption($nom_type, $nom_type);
- }
- $form->addElement($type_form);
+
+
+
+ $type_form = new XoopsFormSelect(_AM_JOBS_TYPE, "type", "", "0", FALSE);
+ while (list($nom_type) = $xoopsDB->fetchRow($result1)) {
+ $type_form->addOption($nom_type, $nom_type);
+ }
+ $form->addElement($type_form);
+
+
$radio = new XoopsFormRadio(_AM_JOBS_STATUS, 'status', 1);
$options["1"] = _AM_JOBS_ACTIVE;
$options["0"] = _AM_JOBS_INACTIVE;
@@ -273,7 +286,7 @@
$form->addElement(jobs_getEditor(_AM_JOBS_REQUIRE, "requirements", "", "100%", "300px", ""), TRUE);
$form->addElement(new XoopsFormText(_AM_JOBS_PRICE2, "price", 40, 50, ""), FALSE);
$sel_form = new XoopsFormSelect(_AM_JOBS_SALARYTYPE, "typeprice", "", "1", FALSE);
- while (list($nom_price) = $xoopsDB->fetchRow($result1)) {
+ while (list($nom_price) = $xoopsDB->fetchRow($result2)) {
$sel_form->addOption($nom_price, $nom_price);
}
$form->addElement($sel_form);
@@ -308,14 +321,19 @@
} else {
$form->addElement(new XoopsFormText(_AM_JOBS_TOWN, 'town', 50, 50, ''), FALSE);
-
+ if ($xoopsModuleConfig['jobs_show_state'] == '1') {
$state_form = new XoopsFormSelect(_AM_JOBS_STATE, "state", "", "0", FALSE);
- while (list($name) = $xoopsDB->fetchRow($result)) {
+ while (list($rid,$name) = $xoopsDB->fetchRow($result)) {
$state_form->addOption('', _AM_JOBS_SELECT_STATE);
- $state_form->addOption($name, $name);
+ $state_form->addOption($rid, $name);
}
$form->addElement($state_form, TRUE);
-
+ } else {
+ $form->addElement(new XoopsFormHidden("state", ""));
+ }
+
+
+
$form->addElement(new XoopsFormText(_AM_JOBS_TEL, "tel", 30, 30, ''), FALSE);
ob_start();
$mytree->makeMyAdminSelBox("title", "title", "", "cid");
@@ -323,7 +341,7 @@
ob_end_clean();
$form->addElement(new XoopsFormText(_AM_JOBS_HOW_LONG, "expire", 3, 3, $xoopsModuleConfig['jobs_days']), TRUE);
$type_form = new XoopsFormSelect(_AM_JOBS_TYPE, "type", "", "1", FALSE);
- while (list($nom_type) = $xoopsDB->fetchRow($result)) {
+ while (list($nom_type) = $xoopsDB->fetchRow($result1)) {
$type_form->addOption($nom_type, $nom_type);
}
$form->addElement($type_form);
@@ -337,7 +355,7 @@
$form->addElement(jobs_getEditor(_AM_JOBS_REQUIRE, "requirements", "", "100%", "300px", ""), TRUE);
$form->addElement(new XoopsFormText(_AM_JOBS_PRICE2, "price", 40, 50, ""), FALSE);
$sel_form = new XoopsFormSelect(_AM_JOBS_SALARYTYPE, "typeprice", "", "1", FALSE);
- while (list($nom_price) = $xoopsDB->fetchRow($result1)) {
+ while (list($nom_price) = $xoopsDB->fetchRow($result2)) {
$sel_form->addOption($nom_price, $nom_price);
}
$form->addElement($sel_form);
Modified: XoopsModules/jobs/trunk/jobs/class/pictures.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/class/pictures.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/class/pictures.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -37,9 +37,8 @@
* Includes of form objects and uploader
*/
include_once XOOPS_ROOT_PATH . "/class/uploader.php";
-include_once XOOPS_ROOT_PATH . "/class/xoopsobject.php";
+include_once XOOPS_ROOT_PATH . "/kernel/object.php";
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
-include_once XOOPS_ROOT_PATH . "/class/xoopsobject.php";
include_once XOOPS_ROOT_PATH . "/modules/$mydirname/include/functions.php";
/**
Modified: XoopsModules/jobs/trunk/jobs/contact.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/contact.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/contact.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -99,9 +99,17 @@
$comp_id = jobs_getCompIdFromName(addslashes($company));
$extra_users = jobs_getThisCompany($comp_id, $usid);
+
+ if ($extra_users) {
$extra_user1 = $extra_users["comp_user1"];
+ } else {
+ $extra_user1 = "";
+ }
+ if ($extra_users) {
$extra_user2 = $extra_users["comp_user2"];
-
+ } else {
+ $extra_user2 = "";
+ }
if ($extra_user1) {
$result3 = $xoopsDB->query("select email from " . $xoopsDB->prefix("users") . " where uid=$extra_user1");
list($extra_user1_email) = $xoopsDB->fetchRow($result3);
Modified: XoopsModules/jobs/trunk/jobs/createresume.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/createresume.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/createresume.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -11,9 +11,9 @@
require_once(XOOPS_ROOT_PATH . "/modules/$mydirname/include/gtickets.php");
$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
include_once XOOPS_ROOT_PATH . "/modules/$mydirname/class/jobtree.php";
-include_once XOOPS_ROOT_PATH . "/class/module.errorhandler.php";
+//include_once XOOPS_ROOT_PATH . "/class/module.errorhandler.php";
include_once(XOOPS_ROOT_PATH . "/modules/$mydirname/include/resume_functions.php");
-$erh = new ErrorHandler;
+//$erh = new ErrorHandler;
$mytree = new JobTree($xoopsDB->prefix("xdir_cat"), "cid", "pid");
$module_id = $xoopsModule->getVar('mid');
@@ -53,9 +53,9 @@
// Check if Title exist
- if ($_POST["resume"] == "") {
- $erh->show("1001");
- }
+// if ($_POST["resume"] == "") {
+// $erh->show("1001");
+// }
$notify = !empty($_POST['notify']) ? 1 : 0;
$member_usid = $xoopsUser->getVar("uid", "E");
@@ -72,10 +72,10 @@
$newid = $xoopsDB->genId($xoopsDB->prefix("jobs_created_resumes") . "_res_lid_seq");
$sql = sprintf("INSERT INTO %s (res_lid, lid, made_resume, date, usid) VALUES (%u, '%s', '%s', '%s', '%s')", $xoopsDB->prefix("jobs_created_resumes"), $newid, $lid, $made_resume, $date, $member_usid);
- $xoopsDB->query($sql) or $erh->show("0013");
+ $xoopsDB->query($sql);
$sql2 = "UPDATE " . $xoopsDB->prefix("jobs_resume") . " SET resume='created' where lid=" . $_POST['lid'] . "";
- $xoopsDB->query($sql2) or $erh->show("0013");
+ $xoopsDB->query($sql2);
redirect_header("viewresume.php?lid=" . addslashes($lid) . "", 3, _JOBS_RES_ADDED);
exit();
Modified: XoopsModules/jobs/trunk/jobs/deljob.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/deljob.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/deljob.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -43,7 +43,7 @@
if ($xoopsUser) {
$ok = !isset($_REQUEST['ok']) ? NULL : $_REQUEST['ok'];
-
+ if ($xoopsModuleConfig['jobs_show_company'] == '1') {
$member_id = $xoopsUser->getVar("uid", "E");
$request1 = $xoopsDB->query(
@@ -53,6 +53,7 @@
list($comp_usid, $comp_user1, $comp_user2) = $xoopsDB->fetchRow($request1);
$comp_users = array($comp_usid, $comp_user1, $comp_user2);
if (in_array($member_id, $comp_users)) {
+
if ($ok == 1) {
$xoopsDB->queryf(
"delete from " . $xoopsDB->prefix("jobs_listing") . " where lid=" . mysql_real_escape_string($lid) . ""
@@ -64,10 +65,30 @@
echo "<br /><center>";
echo "<b>" . _JOBS_SURDELANN . "</b><br /><br />";
}
- echo"[ <a href=\"deljob.php?lid=" . addslashes($lid) . "&ok=1\">" . _JOBS_OUI
+ echo "[ <a href=\"deljob.php?lid=" . addslashes($lid) . "&ok=1\">" . _JOBS_OUI
. "</a> | <a href=\"viewjobs.php?lid=" . addslashes($lid) . "\">" . _JOBS_NON . "</a> ]<br /><br />";
echo "</td></tr></table>";
}
+ } else {
+ if ($ok == 1) {
+ $xoopsDB->queryf(
+ "delete from " . $xoopsDB->prefix("jobs_listing") . " where lid=" . mysql_real_escape_string($lid) . ""
+ );
+ redirect_header("index.php", 3, _JOBS_JOBDEL);
+ exit();
+ } else {
+ echo "<table width='100%' border='0' cellspacing='1' cellpadding='8'><tr class='bg4'><td valign='top'>\n";
+ echo "<br /><center>";
+ echo "<b>" . _JOBS_SURDELANN . "</b><br /><br />";
+ }
+ echo "[ <a href=\"deljob.php?lid=" . addslashes($lid) . "&ok=1\">" . _JOBS_OUI
+ . "</a> | <a href=\"viewjobs.php?lid=" . addslashes($lid) . "\">" . _JOBS_NON . "</a> ]<br /><br />";
+ echo "</td></tr></table>";
+ }
+
+
+
+
}
include(XOOPS_ROOT_PATH . "/footer.php");
Modified: XoopsModules/jobs/trunk/jobs/docs/credits.txt
===================================================================
--- XoopsModules/jobs/trunk/jobs/docs/credits.txt 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/docs/credits.txt 2014-02-19 21:37:07 UTC (rev 12327)
@@ -1,6 +1,8 @@
Credits
===============
-Originally developed by
+Originally developed by John Mordo (jlm69)
-Version 2.3 was updated to XOOPS 2.5.0 Standard GUI by Michael Beck (Mamba)
\ No newline at end of file
+Version 2.3 was updated to XOOPS 2.5.0 Standard GUI by Michael Beck (Mamba)
+
+Version4.4 beta1 and 4.4 beta2 were done by mamba, all other versions are developed by John Mordo
\ No newline at end of file
Deleted: XoopsModules/jobs/trunk/jobs/error_log
===================================================================
--- XoopsModules/jobs/trunk/jobs/error_log 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/error_log 2014-02-19 21:37:07 UTC (rev 12327)
@@ -1,50 +0,0 @@
-[23-May-2010 11:21:32] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:24:41] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:24:48] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:28:04] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:28:25] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:28:32] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:28:39] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:28:47] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:12] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:14] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:20] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:28] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:47] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:51] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:29:59] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:30:04] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:30:25] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 11:30:34] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:50:38] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:50:41] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:50:46] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:51:08] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:51:17] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:51:24] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:54:48] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:55:29] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:56:15] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:56:57] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:57:15] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 18:57:18] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:01:52] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:01:56] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:01:58] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:05:14] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:05:46] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:05:51] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:05:53] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:06:03] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:06:05] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:06:06] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:26] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:34] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:38] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:43] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:49] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:08:52] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:09:00] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:09:10] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:09:15] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
-[23-May-2010 19:09:24] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Modified: XoopsModules/jobs/trunk/jobs/index.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/index.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/index.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -135,7 +135,7 @@
} else {
$xoopsTpl->assign(
'confirm_ads',
- _JOBS_THEREIS . " $propo " . _JOBS_WAIT . "<br /><a href=\"admin/main.php\">" . _JOBS_SEEIT
+ _JOBS_THEREIS . " $propo " . _JOBS_WAIT . "<br /><a href=\"admin/jobs.php\">" . _JOBS_SEEIT
. "</a>"
);
}
@@ -155,7 +155,7 @@
} else {
$xoopsTpl->assign(
'confirm_resume',
- _JOBS_RES_THEREIS . " $res_propo " . _JOBS_RES_WAIT . "<br /><a href=\"admin/main.php\">"
+ _JOBS_RES_THEREIS . " $res_propo " . _JOBS_RES_WAIT . "<br /><a href=\"admin/resumes.php\">"
. _JOBS_RES_SEEIT . "</a>"
);
}
@@ -204,6 +204,10 @@
$subcategories = '';
if ($xoopsModuleConfig["" . $mydirname . "_display_subcat"] == '1') {
foreach ($arr as $ele) {
+
+ $newsubcat = jobs_subcatnew($ele['cid']);
+
+
if (in_array($ele['cid'], $categories)) {
$chtitle = $myts->undoHtmlSpecialChars($ele['title']);
if ($chcount > $xoopsModuleConfig["" . $mydirname . "_subcat_num"]) {
@@ -213,12 +217,24 @@
if ($space > 0) {
$subcategories .= '<br />';
}
- $subcategories
- .= "<a href=\"" . XOOPS_URL . "/modules/$mydirname/jobscat.php?cid=" . $ele['cid'] . "\">"
- . $chtitle . "</a>";
+
+
+ if ($newsubcat == true) {
+
+ $subcategories .= "<a style=\"color:red;\" href=\"jobscat.php?cid=".$ele['cid']."\">".$chtitle."</a>";
+
+}else {
+ $subcategories .= "<a href=\"jobscat.php?cid=".$ele['cid']."\">".$chtitle."</a>";
+ }
+
+
+ // $subcategories
+ // .= "<a href=\"" . XOOPS_URL . "/modules/$mydirname/jobscat.php?cid=" . $ele['cid'] . "\">"
+ // . $chtitle . "</a>";
$space++;
$chcount++;
$content .= $ele['title'] . ' ';
+
}
}
}
@@ -232,6 +248,10 @@
}
$xoopsTpl->assign('cat_count', $count - 1);
+$usesubcats = $xoopsModuleConfig["" . $mydirname . "_display_subcat"];
+$xoopsTpl->assign('usesubcats', $usesubcats);
+
+
list($ann) = $xoopsDB->fetchRow(
$xoopsDB->query(
"select COUNT(*) FROM " . $xoopsDB->prefix("jobs_listing") . " WHERE valid='1' $cat_perms"
Modified: XoopsModules/jobs/trunk/jobs/jobscat.php
===================================================================
--- XoopsModules/jobs/trunk/jobs/jobscat.php 2014-02-19 12:38:18 UTC (rev 12326)
+++ XoopsModules/jobs/trunk/jobs/jobscat.php 2014-02-19 21:37:07 UTC (rev 12327)
@@ -42,14 +42,20 @@
ExpireJob();
+$default_sort = $xoopsModuleConfig['jobs_listing_sortorder'];
+
+$default_orderby = ...
[truncated message content] |
|
From: <be...@us...> - 2014-02-19 12:38:24
|
Revision: 12326
http://sourceforge.net/p/xoops/svn/12326
Author: beckmi
Date: 2014-02-19 12:38:18 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
fixed bug in public download (tomodea), few PSR-2 changes, updates to JS libraries (work in progress)
Modified Paths:
--------------
XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/function.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/index.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/install-extension.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/menu.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/moduleUpdateFunction.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/perm-quota.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/photo.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/public-category.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/upgrade.php
XoopsModules/extgallery/trunk/modules/extgallery/admin/watermark-border.php
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_block_tag.php
XoopsModules/extgallery/trunk/modules/extgallery/blocks/extgallery_blocks.php
XoopsModules/extgallery/trunk/modules/extgallery/changelog.txt
XoopsModules/extgallery/trunk/modules/extgallery/class/ExtgalleryPersistableObjectHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/NestedTree.php
XoopsModules/extgallery/trunk/modules/extgallery/class/catHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/extgalleryMailer.php
XoopsModules/extgallery/trunk/modules/extgallery/class/grouppermform.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pclerror.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltar.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pcltrace.lib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Console/Getopt.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/ColorsDefs.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/GD.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/GD1.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/IM.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/IMAGETYPE.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick/ImageTypes.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imagick2.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/Imlib.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/NetPBM.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform/Driver/image_type_to_mime_type.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/Image/Transform.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/PEAR.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/PEAR5.php
XoopsModules/extgallery/trunk/modules/extgallery/class/pear/System.php
XoopsModules/extgallery/trunk/modules/extgallery/class/photoHandler.php
XoopsModules/extgallery/trunk/modules/extgallery/class/photoUploader.php
XoopsModules/extgallery/trunk/modules/extgallery/class/php-captcha.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/class/plugin.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicPerm.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publiccat.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicecard.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicphoto.php
XoopsModules/extgallery/trunk/modules/extgallery/class/publicrating.php
XoopsModules/extgallery/trunk/modules/extgallery/class/quota.php
XoopsModules/extgallery/trunk/modules/extgallery/class/readIterator.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_delete.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_edit.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_new.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_post.php
XoopsModules/extgallery/trunk/modules/extgallery/comment_reply.php
XoopsModules/extgallery/trunk/modules/extgallery/hook-photo.php
XoopsModules/extgallery/trunk/modules/extgallery/hook-thumb.php
XoopsModules/extgallery/trunk/modules/extgallery/images/captcha.php
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/conf/svn.properties
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/lang/lang_fr.properties
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/JUploadApplet.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/JUploadDaemon.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/context/DefaultJUploadContext.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/context/JUploadContextApplet.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/DefaultFileData.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/PictureFileData.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/filedata/helper/ImageFileConversionInfo.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/DialogUploadRetry.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/JUploadPanelImpl.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/gui/filepanel/FilePanelDataModel2.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/DefaultUploadPolicy$1.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/DefaultUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/PictureUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/policies/SilverpeasUploadPolicy.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/DefaultFileUploadThread.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadManagerThreadImpl.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadThreadFTP.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/FileUploadThreadHTTP.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/PacketConstructionThread.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/helper/HTTPConnectionHelper.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk/jupload2/upload/helper/HttpConnect.class
XoopsModules/extgallery/trunk/modules/extgallery/include/applet/wjhk.jupload.jar
XoopsModules/extgallery/trunk/modules/extgallery/include/comment_function.php
XoopsModules/extgallery/trunk/modules/extgallery/include/fancybox/fancybox.css
XoopsModules/extgallery/trunk/modules/extgallery/include/functions.php
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.classic.css
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.classic.js
XoopsModules/extgallery/trunk/modules/extgallery/include/galleria/galleria.js
XoopsModules/extgallery/trunk/modules/extgallery/include/install_function.php
XoopsModules/extgallery/trunk/modules/extgallery/include/jcarousel/jquery.jcarousel.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/microgallery/style.css
XoopsModules/extgallery/trunk/modules/extgallery/include/notification.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/include/overlay/overlay.jquery.tools.min.js
XoopsModules/extgallery/trunk/modules/extgallery/include/perm.php
XoopsModules/extgallery/trunk/modules/extgallery/include/plugin.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/include/prettyphoto/jquery.prettyPhoto.js
XoopsModules/extgallery/trunk/modules/extgallery/include/prettyphoto/prettyPhoto.css
XoopsModules/extgallery/trunk/modules/extgallery/include/search.inc.php
XoopsModules/extgallery/trunk/modules/extgallery/include/style.css
XoopsModules/extgallery/trunk/modules/extgallery/include/update_function.php
XoopsModules/extgallery/trunk/modules/extgallery/index.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/admin.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/extension.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/mail_template/ecard_html.tpl
XoopsModules/extgallery/trunk/modules/extgallery/language/english/main.php
XoopsModules/extgallery/trunk/modules/extgallery/language/english/modinfo.php
XoopsModules/extgallery/trunk/modules/extgallery/list.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/notification_update.php
XoopsModules/extgallery/trunk/modules/extgallery/plugin/plugin.php
XoopsModules/extgallery/trunk/modules/extgallery/public-album.php
XoopsModules/extgallery/trunk/modules/extgallery/public-categories.php
XoopsModules/extgallery/trunk/modules/extgallery/public-download.php
XoopsModules/extgallery/trunk/modules/extgallery/public-modify.php
XoopsModules/extgallery/trunk/modules/extgallery/public-photo.php
XoopsModules/extgallery/trunk/modules/extgallery/public-post-applet.php
XoopsModules/extgallery/trunk/modules/extgallery/public-rating.php
XoopsModules/extgallery/trunk/modules/extgallery/public-rss.php
XoopsModules/extgallery/trunk/modules/extgallery/public-sendecard.php
XoopsModules/extgallery/trunk/modules/extgallery/public-slideshow.php
XoopsModules/extgallery/trunk/modules/extgallery/public-upload-extended.php
XoopsModules/extgallery/trunk/modules/extgallery/public-upload.php
XoopsModules/extgallery/trunk/modules/extgallery/public-useralbum.php
XoopsModules/extgallery/trunk/modules/extgallery/public-userphoto.php
XoopsModules/extgallery/trunk/modules/extgallery/public-viewecard.php
XoopsModules/extgallery/trunk/modules/extgallery/view.tag.php
XoopsModules/extgallery/trunk/modules/extgallery/xoops_version.php
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php 2014-02-19 00:38:15 UTC (rev 12325)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/about.php 2014-02-19 12:38:18 UTC (rev 12326)
@@ -15,40 +15,40 @@
* @author Zoullou (http://www.zoullou.net)
* @package ExtGallery
* @version $Id$
- */
-
+ */
+
include '../../../include/cp_header.php';
-include 'function.php';
+include 'function.php';
xoops_cp_header();
-
-$module_info =& $module_handler->get( $xoopsModule->getVar("mid") );
-
-$xoopsTpl->assign("module_name", $xoopsModule->getVar("name") );
-$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") );
-$xoopsTpl->assign("module_image", $module_info->getInfo("image") );
-$xoopsTpl->assign("module_version", $module_info->getInfo("version") );
-$xoopsTpl->assign("module_description", $module_info->getInfo("description") );
-$xoopsTpl->assign("module_author", $module_info->getInfo("author") );
-$xoopsTpl->assign("module_credits", $module_info->getInfo("credits") );
-$xoopsTpl->assign("module_license_url", $module_info->getInfo("license_url") );
-$xoopsTpl->assign("module_license", $module_info->getInfo("license") );
-$xoopsTpl->assign("module_status", $module_info->getInfo("module_status") );
-$xoopsTpl->assign("module_website_url", $module_info->getInfo("module_website_url") );
-$xoopsTpl->assign("module_website_name", $module_info->getInfo("module_website_name") );
-$xoopsTpl->assign("author_website_url", $module_info->getInfo("author_website_url") );
-$xoopsTpl->assign("author_website_name", $module_info->getInfo("author_website_name") );
-
-global $xoopsModule;
-$xoopsTpl->assign("module_update_date", formatTimestamp($xoopsModule->getVar("last_update"),"m") );
-
-if ( is_readable( $changelog = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/changelog.txt" ) ){
- $xoopsTpl->assign("changelog", implode("<br />", file( $changelog ) ) );
-}
-$xoTheme->addStylesheet('modules/extgallery/include/admin.css');
+$module_info =& $module_handler->get( $xoopsModule->getVar("mid") );
-// Call template file
-$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_about.html');
-
-xoops_cp_footer();
\ No newline at end of file
+$xoopsTpl->assign("module_name", $xoopsModule->getVar("name") );
+$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") );
+$xoopsTpl->assign("module_image", $module_info->getInfo("image") );
+$xoopsTpl->assign("module_version", $module_info->getInfo("version") );
+$xoopsTpl->assign("module_description", $module_info->getInfo("description") );
+$xoopsTpl->assign("module_author", $module_info->getInfo("author") );
+$xoopsTpl->assign("module_credits", $module_info->getInfo("credits") );
+$xoopsTpl->assign("module_license_url", $module_info->getInfo("license_url") );
+$xoopsTpl->assign("module_license", $module_info->getInfo("license") );
+$xoopsTpl->assign("module_status", $module_info->getInfo("module_status") );
+$xoopsTpl->assign("module_website_url", $module_info->getInfo("module_website_url") );
+$xoopsTpl->assign("module_website_name", $module_info->getInfo("module_website_name") );
+$xoopsTpl->assign("author_website_url", $module_info->getInfo("author_website_url") );
+$xoopsTpl->assign("author_website_name", $module_info->getInfo("author_website_name") );
+
+global $xoopsModule;
+$xoopsTpl->assign("module_update_date", formatTimestamp($xoopsModule->getVar("last_update"),"m") );
+
+if ( is_readable( $changelog = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/changelog.txt" ) ) {
+ $xoopsTpl->assign("changelog", implode("<br />", file( $changelog ) ) );
+}
+
+$xoTheme->addStylesheet('modules/extgallery/include/admin.css');
+
+// Call template file
+$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_about.html');
+
+xoops_cp_footer();
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2014-02-19 00:38:15 UTC (rev 12325)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/album.php 2014-02-19 12:38:18 UTC (rev 12326)
@@ -23,453 +23,451 @@
//$GLOBALS['xoopsOption']['template_main'] = 'extgallery_admin_album.html';
-if(isset($_POST['op'])) {
- $op = $_POST['op'];
+if (isset($_POST['op'])) {
+ $op = $_POST['op'];
} else {
- $op = 'default';
+ $op = 'default';
}
-switch($op) {
-
+switch ($op) {
+
case 'overlay':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_overlay_bg'])) {
- if($xoopsModuleConfig['album_overlay_bg'] != $_POST['album_overlay_bg']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_bg'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_bg',
- 'conf_value'=>$_POST['album_overlay_bg'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_overlay_width'])) {
- if($xoopsModuleConfig['album_overlay_width'] != $_POST['album_overlay_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_width',
- 'conf_value'=>$_POST['album_overlay_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_overlay_height'])) {
- if($xoopsModuleConfig['album_overlay_height'] != $_POST['album_overlay_height']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_overlay_height'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_overlay_height',
- 'conf_value'=>$_POST['album_overlay_height'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_overlay_bg'])) {
+ if ($xoopsModuleConfig['album_overlay_bg'] != $_POST['album_overlay_bg']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_bg'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_bg',
+ 'conf_value'=>$_POST['album_overlay_bg'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_overlay_width'])) {
+ if ($xoopsModuleConfig['album_overlay_width'] != $_POST['album_overlay_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_width',
+ 'conf_value'=>$_POST['album_overlay_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_overlay_height'])) {
+ if ($xoopsModuleConfig['album_overlay_height'] != $_POST['album_overlay_height']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_overlay_height'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_overlay_height',
+ 'conf_value'=>$_POST['album_overlay_height'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
+
case 'tooltip':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_tooltip_width'])) {
- if($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_width',
- 'conf_value'=>$_POST['album_tooltip_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- if(isset($_POST['album_tooltip_width'])) {
- if($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_width'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_width',
- 'conf_value'=>$_POST['album_tooltip_width'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- } $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_tooltip_borderwidth'])) {
- if($xoopsModuleConfig['album_tooltip_borderwidth'] != $_POST['album_tooltip_borderwidth']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_borderwidth'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_borderwidth',
- 'conf_value'=>$_POST['album_tooltip_borderwidth'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_tooltip_bordercolor'])) {
- if($xoopsModuleConfig['album_tooltip_bordercolor'] != $_POST['album_tooltip_bordercolor']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_tooltip_bordercolor'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_tooltip_bordercolor',
- 'conf_value'=>$_POST['album_tooltip_bordercolor'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_tooltip_width'])) {
+ if ($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_width',
+ 'conf_value'=>$_POST['album_tooltip_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ if (isset($_POST['album_tooltip_width'])) {
+ if ($xoopsModuleConfig['album_tooltip_width'] != $_POST['album_tooltip_width']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_width'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_width',
+ 'conf_value'=>$_POST['album_tooltip_width'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ } $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_tooltip_borderwidth'])) {
+ if ($xoopsModuleConfig['album_tooltip_borderwidth'] != $_POST['album_tooltip_borderwidth']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_borderwidth'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_borderwidth',
+ 'conf_value'=>$_POST['album_tooltip_borderwidth'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_tooltip_bordercolor'])) {
+ if ($xoopsModuleConfig['album_tooltip_bordercolor'] != $_POST['album_tooltip_bordercolor']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_tooltip_bordercolor'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_tooltip_bordercolor',
+ 'conf_value'=>$_POST['album_tooltip_bordercolor'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
+
case 'fancybox':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_fancybox_color'])) {
- if($xoopsModuleConfig['album_fancybox_color'] != $_POST['album_fancybox_color']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_color'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_color',
- 'conf_value'=>$_POST['album_fancybox_color'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_opacity'])) {
- if($xoopsModuleConfig['album_fancybox_opacity'] != $_POST['album_fancybox_opacity']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_opacity'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_opacity',
- 'conf_value'=>$_POST['album_fancybox_opacity'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_tin'])) {
- if($xoopsModuleConfig['album_fancybox_tin'] != $_POST['album_fancybox_tin']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_tin'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_tin',
- 'conf_value'=>$_POST['album_fancybox_tin'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_tout'])) {
- if($xoopsModuleConfig['album_fancybox_tout'] != $_POST['album_fancybox_tout']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_tout'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_tout',
- 'conf_value'=>$_POST['album_fancybox_tout'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_title'])) {
- if($xoopsModuleConfig['album_fancybox_title'] != $_POST['album_fancybox_title']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_title'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_title',
- 'conf_value'=>$_POST['album_fancybox_title'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_fancybox_showtype'])) {
- if($xoopsModuleConfig['album_fancybox_showtype'] != $_POST['album_fancybox_showtype']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_fancybox_showtype'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_fancybox_showtype',
- 'conf_value'=>$_POST['album_fancybox_showtype'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_fancybox_color'])) {
+ if ($xoopsModuleConfig['album_fancybox_color'] != $_POST['album_fancybox_color']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_color'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_color',
+ 'conf_value'=>$_POST['album_fancybox_color'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_fancybox_opacity'])) {
+ if ($xoopsModuleConfig['album_fancybox_opacity'] != $_POST['album_fancybox_opacity']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_opacity'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_opacity',
+ 'conf_value'=>$_POST['album_fancybox_opacity'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_fancybox_tin'])) {
+ if ($xoopsModuleConfig['album_fancybox_tin'] != $_POST['album_fancybox_tin']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_tin'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_tin',
+ 'conf_value'=>$_POST['album_fancybox_tin'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_fancybox_tout'])) {
+ if ($xoopsModuleConfig['album_fancybox_tout'] != $_POST['album_fancybox_tout']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_tout'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_tout',
+ 'conf_value'=>$_POST['album_fancybox_tout'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_fancybox_title'])) {
+ if ($xoopsModuleConfig['album_fancybox_title'] != $_POST['album_fancybox_title']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_title'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_title',
+ 'conf_value'=>$_POST['album_fancybox_title'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_fancybox_showtype'])) {
+ if ($xoopsModuleConfig['album_fancybox_showtype'] != $_POST['album_fancybox_showtype']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_fancybox_showtype'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_fancybox_showtype',
+ 'conf_value'=>$_POST['album_fancybox_showtype'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
+
case 'prettyphoto':
- $configHandler =& xoops_gethandler('config');
- $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
+ $configHandler =& xoops_gethandler('config');
+ $moduleIdCriteria = new Criteria('conf_modid',$xoopsModule->getVar('mid'));
- if(isset($_POST['album_prettyphoto_theme'])) {
- if($xoopsModuleConfig['album_prettyphoto_theme'] != $_POST['album_prettyphoto_theme']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_prettyphoto_theme'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_prettyphoto_theme',
- 'conf_value'=>$_POST['album_prettyphoto_theme'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_prettyphoto_speed'])) {
- if($xoopsModuleConfig['album_prettyphoto_speed'] != $_POST['album_prettyphoto_speed']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_prettyphoto_speed'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_prettyphoto_speed',
- 'conf_value'=>$_POST['album_prettyphoto_speed'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_prettyphoto_slidspe'])) {
- if($xoopsModuleConfig['album_prettyphoto_slidspe'] != $_POST['album_prettyphoto_slidspe']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_prettyphoto_slidspe'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_prettyphoto_slidspe',
- 'conf_value'=>$_POST['album_prettyphoto_slidspe'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- if(isset($_POST['album_prettyphoto_autopla'])) {
- if($xoopsModuleConfig['album_prettyphoto_autopla'] != $_POST['album_prettyphoto_autopla']) {
- $criteria = new CriteriaCompo();
- $criteria->add($moduleIdCriteria);
- $criteria->add(new Criteria('conf_name','album_prettyphoto_autopla'));
- $config = $configHandler->getConfigs($criteria);
- $config = $config[0];
- $configValue = array(
- 'conf_modid'=>$xoopsModule->getVar('mid'),
- 'conf_catid'=>0,
- 'conf_name'=>'album_prettyphoto_autopla',
- 'conf_value'=>$_POST['album_prettyphoto_autopla'],
- 'conf_formtype'=>'hidden',
- 'conf_valuetype'=>'text'
- );
- $config->setVars($configValue);
- $configHandler->insertConfig($config);
- }
- }
-
- redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
+ if (isset($_POST['album_prettyphoto_theme'])) {
+ if ($xoopsModuleConfig['album_prettyphoto_theme'] != $_POST['album_prettyphoto_theme']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_prettyphoto_theme'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_prettyphoto_theme',
+ 'conf_value'=>$_POST['album_prettyphoto_theme'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_prettyphoto_speed'])) {
+ if ($xoopsModuleConfig['album_prettyphoto_speed'] != $_POST['album_prettyphoto_speed']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_prettyphoto_speed'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_prettyphoto_speed',
+ 'conf_value'=>$_POST['album_prettyphoto_speed'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_prettyphoto_slidspe'])) {
+ if ($xoopsModuleConfig['album_prettyphoto_slidspe'] != $_POST['album_prettyphoto_slidspe']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_prettyphoto_slidspe'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_prettyphoto_slidspe',
+ 'conf_value'=>$_POST['album_prettyphoto_slidspe'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ if (isset($_POST['album_prettyphoto_autopla'])) {
+ if ($xoopsModuleConfig['album_prettyphoto_autopla'] != $_POST['album_prettyphoto_autopla']) {
+ $criteria = new CriteriaCompo();
+ $criteria->add($moduleIdCriteria);
+ $criteria->add(new Criteria('conf_name','album_prettyphoto_autopla'));
+ $config = $configHandler->getConfigs($criteria);
+ $config = $config[0];
+ $configValue = array(
+ 'conf_modid'=>$xoopsModule->getVar('mid'),
+ 'conf_catid'=>0,
+ 'conf_name'=>'album_prettyphoto_autopla',
+ 'conf_value'=>$_POST['album_prettyphoto_autopla'],
+ 'conf_formtype'=>'hidden',
+ 'conf_valuetype'=>'text'
+ );
+ $config->setVars($configValue);
+ $configHandler->insertConfig($config);
+ }
+ }
+
+ redirect_header("album.php", 3, _AM_EXTGALLERY_CONFIGURATION_SAVED);
break;
-
- case 'default':
- default:
- xoops_cp_header();
-
+
+ case 'default':
+ default:
+ xoops_cp_header();
+
$xoopsTpl->assign('displayalbum', $xoopsModuleConfig['display_type'] == 'album');
- $form = new XoopsThemeForm(_AM_EXTGALLERY_OVERLAY_CONF, 'overlay_conf', 'album.php', 'post', true);
- $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_OVERLAY_BG, 'album_overlay_bg', $xoopsModuleConfig['album_overlay_bg']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_WIDTH, 'album_overlay_width', '5', '5', $xoopsModuleConfig['album_overlay_width']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_HEIGHT, 'album_overlay_height', '5', '5', $xoopsModuleConfig['album_overlay_height']),false);
- $form->addElement(new XoopsFormHidden("op", 'overlay'));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
- $xoopsTpl->assign('overlayform', $form->render());
-
- $form = new XoopsThemeForm(_AM_EXTGALLERY_TOOLTIP_CONF, 'tooltip_conf', 'album.php', 'post', true);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_WIDTH, 'album_tooltip_width', '6', '6', $xoopsModuleConfig['album_tooltip_width']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_BORDER_WIDTH, 'album_tooltip_borderwidth', '6', '6', $xoopsModuleConfig['album_tooltip_borderwidth']),false);
- $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_TOOLTIP_BORDERCOLOR, 'album_tooltip_bordercolor', $xoopsModuleConfig['album_tooltip_bordercolor']),false);
- $form->addElement(new XoopsFormHidden("op", 'tooltip'));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
- $xoopsTpl->assign('tooltipform', $form->render());
-
- $form = new XoopsThemeForm(_AM_EXTGALLERY_FANCYBOX_CONF, 'fancybox_conf', 'album.php', 'post', true);
- $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_FANCYBOX_BGCOLOR, 'album_fancybox_color', $xoopsModuleConfig['album_fancybox_color']),false);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_FANCYBOX_OPACITY, 'album_fancybox_opacity', '6', '6', $xoopsModuleConfig['album_fancybox_opacity']),false);
- $fancyboxtinSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TIN, 'album_fancybox_tin',$xoopsModuleConfig['album_fancybox_tin']);
- $fancyboxtinSelect->addOption("none", _AM_EXTGALLERY_FANCYBOX_NONE);
- $fancyboxtinSelect->addOption("elastic", _AM_EXTGALLERY_FANCYBOX_ELASTIC);
- $form->addElement($fancyboxtinSelect);
- $fancyboxtoutSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TOUT, 'album_fancybox_tout',$xoopsModuleConfig['album_fancybox_tout']);
- $fancyboxtoutSelect->addOption("none", _AM_EXTGALLERY_FANCYBOX_NONE);
- $fancyboxtoutSelect->addOption("elastic", _AM_EXTGALLERY_FANCYBOX_ELASTIC);
- $form->addElement($fancyboxtoutSelect);
- $fancyboxtpSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TITLEPOSITION, 'album_fancybox_title',$xoopsModuleConfig['album_fancybox_title']);
- $fancyboxtpSelect->addOption("over", _AM_EXTGALLERY_FANCYBOX_OVER);
- $fancyboxtpSelect->addOption("inside", _AM_EXTGALLERY_FANCYBOX_INSIDE);
- $fancyboxtpSelect->addOption("outside", _AM_EXTGALLERY_FANCYBOX_OUTSIDE);
- $form->addElement($fancyboxtpSelect);
- $fancyboxshowSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_SHOWTYPE, 'album_fancybox_showtype',$xoopsModuleConfig['album_fancybox_showtype']);
- $fancyboxshowSelect->addOption("single", _AM_EXTGALLERY_FANCYBOX_SINGLE);
- $fancyboxshowSelect->addOption("group", _AM_EXTGALLERY_FANCYBOX_GROUP);
- $form->addElement($fancyboxshowSelect);
- $form->addElement(new XoopsFormHidden("op", 'fancybox'));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
- $xoopsTpl->assign('fancyboxform', $form->render());
-
- $form = new XoopsThemeForm(_AM_EXTGALLERY_PRETTPHOTO_CONF, 'prettyphoto_conf', 'album.php', 'post', true);
- $prettyspeedSelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_SPEED, 'album_prettyphoto_speed',$xoopsModuleConfig['album_prettyphoto_speed']);
- $prettyspeedSelect->addOption("fast", _AM_EXTGALLERY_PRETTPHOTO_FAST);
- $prettyspeedSelect->addOption("slow", _AM_EXTGALLERY_PRETTPHOTO_SLOW);
- $form->addElement($prettyspeedSelect);
- $prettythemeSelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_THEME, 'album_prettyphoto_theme',$xoopsModuleConfig['album_prettyphoto_theme']);
- $prettythemeSelect->addOption("dark_rounded", _AM_EXTGALLERY_PRETTPHOTO_THEME1);
- $prettythemeSelect->addOption("dark_square", _AM_EXTGALLERY_PRETTPHOTO_THEME2);
- $prettythemeSelect->addOption("facebook", _AM_EXTGALLERY_PRETTPHOTO_THEME3);
- $prettythemeSelect->addOption("light_rounded", _AM_EXTGALLERY_PRETTPHOTO_THEME4);
- $prettythemeSelect->addOption("light_square", _AM_EXTGALLERY_PRETTPHOTO_THEME5);
- $form->addElement($prettythemeSelect);
- $form->addElement(new XoopsFormText(_AM_EXTGALLERY_PRETTPHOTO_SLIDESPEED, 'album_prettyphoto_slidspe', '5', '5', $xoopsModuleConfig['album_prettyphoto_slidspe']),false);
- $prettyautoplaySelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY, 'album_prettyphoto_autopla',$xoopsModuleConfig['album_prettyphoto_autopla']);
- $prettyautoplaySelect->addOption("true", _AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY_T);
- $prettyautoplaySelect->addOption("false", _AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY_F);
- $form->addElement($prettyautoplaySelect);
- $form->addElement(new XoopsFormHidden("op", 'prettyphoto'));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
- $xoopsTpl->assign('prettyphotoform', $form->render());
+ $form = new XoopsThemeForm(_AM_EXTGALLERY_OVERLAY_CONF, 'overlay_conf', 'album.php', 'post', true);
+ $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_OVERLAY_BG, 'album_overlay_bg', $xoopsModuleConfig['album_overlay_bg']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_WIDTH, 'album_overlay_width', '5', '5', $xoopsModuleConfig['album_overlay_width']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_OVERLAY_HEIGHT, 'album_overlay_height', '5', '5', $xoopsModuleConfig['album_overlay_height']),false);
+ $form->addElement(new XoopsFormHidden("op", 'overlay'));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+ $xoopsTpl->assign('overlayform', $form->render());
+ $form = new XoopsThemeForm(_AM_EXTGALLERY_TOOLTIP_CONF, 'tooltip_conf', 'album.php', 'post', true);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_WIDTH, 'album_tooltip_width', '6', '6', $xoopsModuleConfig['album_tooltip_width']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_TOOLTIP_BORDER_WIDTH, 'album_tooltip_borderwidth', '6', '6', $xoopsModuleConfig['album_tooltip_borderwidth']),false);
+ $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_TOOLTIP_BORDERCOLOR, 'album_tooltip_bordercolor', $xoopsModuleConfig['album_tooltip_bordercolor']),false);
+ $form->addElement(new XoopsFormHidden("op", 'tooltip'));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+ $xoopsTpl->assign('tooltipform', $form->render());
+
+ $form = new XoopsThemeForm(_AM_EXTGALLERY_FANCYBOX_CONF, 'fancybox_conf', 'album.php', 'post', true);
+ $form->addElement(new XoopsFormColorPicker(_AM_EXTGALLERY_FANCYBOX_BGCOLOR, 'album_fancybox_color', $xoopsModuleConfig['album_fancybox_color']),false);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_FANCYBOX_OPACITY, 'album_fancybox_opacity', '6', '6', $xoopsModuleConfig['album_fancybox_opacity']),false);
+ $fancyboxtinSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TIN, 'album_fancybox_tin',$xoopsModuleConfig['album_fancybox_tin']);
+ $fancyboxtinSelect->addOption("none", _AM_EXTGALLERY_FANCYBOX_NONE);
+ $fancyboxtinSelect->addOption("elastic", _AM_EXTGALLERY_FANCYBOX_ELASTIC);
+ $form->addElement($fancyboxtinSelect);
+ $fancyboxtoutSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TOUT, 'album_fancybox_tout',$xoopsModuleConfig['album_fancybox_tout']);
+ $fancyboxtoutSelect->addOption("none", _AM_EXTGALLERY_FANCYBOX_NONE);
+ $fancyboxtoutSelect->addOption("elastic", _AM_EXTGALLERY_FANCYBOX_ELASTIC);
+ $form->addElement($fancyboxtoutSelect);
+ $fancyboxtpSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TITLEPOSITION, 'album_fancybox_title',$xoopsModuleConfig['album_fancybox_title']);
+ $fancyboxtpSelect->addOption("over", _AM_EXTGALLERY_FANCYBOX_OVER);
+ $fancyboxtpSelect->addOption("inside", _AM_EXTGALLERY_FANCYBOX_INSIDE);
+ $fancyboxtpSelect->addOption("outside", _AM_EXTGALLERY_FANCYBOX_OUTSIDE);
+ $form->addElement($fancyboxtpSelect);
+ $fancyboxshowSelect = new XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_SHOWTYPE, 'album_fancybox_showtype',$xoopsModuleConfig['album_fancybox_showtype']);
+ $fancyboxshowSelect->addOption("single", _AM_EXTGALLERY_FANCYBOX_SINGLE);
+ $fancyboxshowSelect->addOption("group", _AM_EXTGALLERY_FANCYBOX_GROUP);
+ $form->addElement($fancyboxshowSelect);
+ $form->addElement(new XoopsFormHidden("op", 'fancybox'));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+ $xoopsTpl->assign('fancyboxform', $form->render());
+
+ $form = new XoopsThemeForm(_AM_EXTGALLERY_PRETTPHOTO_CONF, 'prettyphoto_conf', 'album.php', 'post', true);
+ $prettyspeedSelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_SPEED, 'album_prettyphoto_speed',$xoopsModuleConfig['album_prettyphoto_speed']);
+ $prettyspeedSelect->addOption("fast", _AM_EXTGALLERY_PRETTPHOTO_FAST);
+ $prettyspeedSelect->addOption("slow", _AM_EXTGALLERY_PRETTPHOTO_SLOW);
+ $form->addElement($prettyspeedSelect);
+ $prettythemeSelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_THEME, 'album_prettyphoto_theme',$xoopsModuleConfig['album_prettyphoto_theme']);
+ $prettythemeSelect->addOption("dark_rounded", _AM_EXTGALLERY_PRETTPHOTO_THEME1);
+ $prettythemeSelect->addOption("dark_square", _AM_EXTGALLERY_PRETTPHOTO_THEME2);
+ $prettythemeSelect->addOption("facebook", _AM_EXTGALLERY_PRETTPHOTO_THEME3);
+ $prettythemeSelect->addOption("light_rounded", _AM_EXTGALLERY_PRETTPHOTO_THEME4);
+ $prettythemeSelect->addOption("light_square", _AM_EXTGALLERY_PRETTPHOTO_THEME5);
+ $form->addElement($prettythemeSelect);
+ $form->addElement(new XoopsFormText(_AM_EXTGALLERY_PRETTPHOTO_SLIDESPEED, 'album_prettyphoto_slidspe', '5', '5', $xoopsModuleConfig['album_prettyphoto_slidspe']),false);
+ $prettyautoplaySelect = new XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY, 'album_prettyphoto_autopla',$xoopsModuleConfig['album_prettyphoto_autopla']);
+ $prettyautoplaySelect->addOption("true", _AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY_T);
+ $prettyautoplaySelect->addOption("false", _AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY_F);
+ $form->addElement($prettyautoplaySelect);
+ $form->addElement(new XoopsFormHidden("op", 'prettyphoto'));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+ $xoopsTpl->assign('prettyphotoform', $form->render());
+
// Call template file
- $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_album.html');
- xoops_cp_footer();
-
- break;
+ $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_album.html');
+ xoops_cp_footer();
+ break;
+
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php
===================================================================
--- XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php 2014-02-19 00:38:15 UTC (rev 12325)
+++ XoopsModules/extgallery/trunk/modules/extgallery/admin/extension.php 2014-02-19 12:38:18 UTC (rev 12326)
@@ -16,41 +16,47 @@
* @package ExtGallery
* @version $Id: extension.php 8088 2011-11-06 09:38:12Z beckmi $
*/
-
+
include '../../../include/cp_header.php';
include 'function.php';
xoops_cp_header();
-function extensionInstalled() {
+/**
+ * @return bool
+ */
+function extensionInstalled()
+{
return file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php');
}
-function extensionActivated() {
+function extensionActivated()
+{
$conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
+
return $conf['extensions']['gallery'];
}
-function activateExtension() {
+function activateExtension()
+{
$conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
$conf['extensions']['gallery'] = 1;
file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
}
-function desactivateExtension() {
+function desactivateExtension()
+{
$conf = include XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php';
$conf['extensions']['gallery'] = 0;
file_put_contents(XOOPS_ROOT_PATH.'/class/textsanitizer/config.custom.php', "<?php\rreturn \$config = ".var_export($conf,true)."\r?>");
}
-if(file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php')){
- $xoopsTpl->assign('extensioninstalled', true);
+if (file_exists(XOOPS_ROOT_PATH.'/class/textsanitizer/gallery/gallery.php')) {
+ $xoopsTpl->assign('extensioninstalled', true);
} else {
- $xoopsTpl->assig...
[truncated message content] |
|
From: <rgr...@us...> - 2014-02-19 00:38:19
|
Revision: 12325
http://sourceforge.net/p/xoops/svn/12325
Author: rgriffith
Date: 2014-02-19 00:38:15 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
Add Rodney's mysqli connector as drop in replacement stored in extras folder.
Also, move version check source for moduleadmin class into connectors.
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/
XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/README.txt
XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/mysqldatabase.php
Added: XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/README.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/README.txt (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/README.txt 2014-02-19 00:38:15 UTC (rev 12325)
@@ -0,0 +1,11 @@
+MySQLi driver for XOOPS 2.5.x
+
+The mysqldatabase.php file in this directory is a drop in replacement for the
+standard MySQL driver found in htdocs/class/database/mysqldatabase.php
+
+If you would like to use the PHP MySQLi extension rather than the now deprecated
+MySQL extension, you can copy this file to the class/database directory to overwrite
+the standard driver. No other changes are required.
+
+There may be direct calls to mysql_* functions that do not go through the driver.
+Those calls will not be changed by installing this updated driver.
Added: XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/mysqldatabase.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/mysqldatabase.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/extras/mysqli/mysqldatabase.php 2014-02-19 00:38:15 UTC (rev 12325)
@@ -0,0 +1,503 @@
+<?php
+/**
+ * MySQL access using MySQLi extension
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package class
+ * @subpackage database
+ * @since 1.0.0
+ * @author Kazumi Ono <on...@xo...>
+ * @author Rodney Fulk <red...@ho...>
+ * @version $Id: mysqldatabase.php 8066 2011-11-06 05:09:33Z beckmi $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+include_once XOOPS_ROOT_PATH . '/class/database/database.php';
+
+/**
+ * connection to a mysql database using MySQLi extension
+ *
+ * @abstract
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2014 XOOPS.org
+ * @package class
+ * @subpackage database
+ */
+class XoopsMySQLDatabase extends XoopsDatabase
+{
+ /**
+ * Database connection
+ *
+ * @var resource
+ */
+ var $conn;
+
+ /**
+ * connect to the database
+ *
+ * @param bool $selectdb select the database now?
+ * @return bool successful?
+ */
+ public function connect($selectdb = TRUE)
+ {
+ static $db_charset_set;
+ if (!extension_loaded('mysqli')) {
+ trigger_error('notrace:mysqli extension not loaded', E_USER_ERROR);
+ return FALSE;
+ }
+
+ $this->allowWebChanges = ($_SERVER['REQUEST_METHOD'] != 'GET');
+
+ if ($selectdb) {
+ $dbname = constant('XOOPS_DB_NAME');
+ } else {
+ $dbname = '';
+ }
+ if (XOOPS_DB_PCONNECT == 1) {
+ $this->conn = mysqli_connect("p:".XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS, $dbname);
+ } else {
+ $this->conn = mysqli_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS, $dbname);
+ }
+
+ if (!$this->conn) {
+ $this->logger->addQuery('', $this->error(), $this->errno());
+ return FALSE;
+ }
+ if (!isset($db_charset_set) && defined('XOOPS_DB_CHARSET') && XOOPS_DB_CHARSET) {
+ $this->queryF("SET NAMES '" . XOOPS_DB_CHARSET . "'");
+ }
+ $db_charset_set = 1;
+ $this->queryF("SET SQL_BIG_SELECTS = 1");
+ return TRUE;
+ }
+
+ /**
+ * generate an ID for a new row
+ *
+ * This is for compatibility only. Will always return 0, because MySQL supports
+ * autoincrement for primary keys.
+ *
+ * @param string $sequence name of the sequence from which to get the next ID
+ * @return int always 0, because mysql has support for autoincrement
+ */
+ public function genId($sequence)
+ {
+ return 0; // will use auto_increment
+ }
+
+ /**
+ * Get a result row as an enumerated array
+ *
+ * @param resource $result
+ * @return array
+ */
+ public function fetchRow($result)
+ {
+ return @mysqli_fetch_row($result);
+ }
+
+ /**
+ * Fetch a result row as an associative array
+ *
+ * @param resource $result
+ * @return array
+ */
+ public function fetchArray($result)
+ {
+ return @mysqli_fetch_assoc($result);
+ }
+
+ /**
+ * Fetch a result row as an associative array
+ *
+ * @param resource $result
+ * @return array
+ */
+ public function fetchBoth($result)
+ {
+ return @mysqli_fetch_array($result, MYSQLI_BOTH);
+ }
+
+ /**
+ * XoopsMySQLiDatabase::fetchObjected()
+ *
+ * @param mixed $result
+ * @return
+ */
+ public function fetchObject($result)
+ {
+ return @mysqli_fetch_object($result);
+ }
+
+ /**
+ * Get the ID generated from the previous INSERT operation
+ *
+ * @return int
+ */
+ public function getInsertId()
+ {
+ return mysqli_insert_id($this->conn);
+ }
+
+ /**
+ * Get number of rows in result
+ *
+ * @param resource $result
+ * @return int
+ */
+ public function getRowsNum($result)
+ {
+ return @mysqli_num_rows($result);
+ }
+
+ /**
+ * Get number of affected rows
+ *
+ * @return int
+ */
+ public function getAffectedRows()
+ {
+ return mysqli_affected_rows($this->conn);
+ }
+
+ /**
+ * Close MySQL connection
+ *
+ * @return void
+ */
+ public function close()
+ {
+ mysqli_close($this->conn);
+ }
+
+ /**
+ * will free all memory associated with the result identifier result.
+ *
+ * @param resource $ query result
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ public function freeRecordSet($result)
+ {
+ return ((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? TRUE : FALSE);
+ }
+
+ /**
+ * Returns the text of the error message from previous MySQL operation
+ *
+ * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
+ */
+ public function error()
+ {
+ return @mysqli_error($this->conn);
+ }
+
+ /**
+ * Returns the numerical value of the error message from previous MySQL operation
+ *
+ * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
+ */
+ public function errno()
+ {
+ return @mysqli_errno($this->conn);
+ }
+
+ /**
+ * Returns escaped string text with single quotes around it to be safely stored in database
+ *
+ * @param string $str unescaped string text
+ * @return string escaped string text with single quotes around
+ */
+ public function quoteString($str)
+ {
+ return $this->quote($str);
+ }
+
+ /**
+ * Quotes a string for use in a query.
+ */
+ public function quote($string)
+ {
+ return "'" . str_replace("\\\"", '"', str_replace("\\"", '"', mysqli_real_escape_string($this->conn, $string))) . "'";
+ }
+
+ /**
+ * Escapes a string for use in a query. Does not add surrounding quotes.
+ *
+ * @param string $string string to escape
+ *
+ * @return string
+ */
+ public function escape($string)
+ {
+ return mysqli_real_escape_string($this->conn, $string);
+ }
+
+ /**
+ * perform a query on the database
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if successful
+ * or TRUE if successful and no result
+ */
+ public function queryF($sql, $limit = 0, $start = 0)
+ {
+ if (!empty($limit)) {
+ if (empty($start)) {
+ $start = 0;
+ }
+ $sql = $sql . ' LIMIT ' . (int) $start . ', ' . (int) $limit;
+ }
+ $this->logger->startTime('query_time');
+ $result = mysqli_query( $this->conn, $sql);
+ $this->logger->stopTime('query_time');
+ $query_time = $this->logger->dumpTime('query_time', TRUE);
+ if ($result) {
+ $this->logger->addQuery($sql, NULL, NULL, $query_time);
+ return $result;
+ } else {
+ $this->logger->addQuery($sql, $this->error(), $this->errno(), $query_time);
+ return FALSE;
+ }
+ }
+
+ /**
+ * perform a query
+ *
+ * This method is empty and does nothing! It should therefore only be
+ * used if nothing is exactly what you want done! ;-)
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @abstract
+ */
+ public function query($sql, $limit = 0, $start = 0)
+ {
+ }
+
+ /**
+ * perform queries from SQL dump file in a batch
+ *
+ * @param string $file file path to an SQL dump file
+ * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
+ */
+ public function queryFromFile($file)
+ {
+ if (FALSE !== ($fp = fopen($file, 'r'))) {
+ include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php';
+ $sql_queries = trim(fread($fp, filesize($file)));
+ SqlUtility::splitMySqlFile($pieces, $sql_queries);
+ foreach ($pieces as $query) {
+ // [0] contains the prefixed query
+ // [4] contains unprefixed table name
+ $prefixed_query = SqlUtility::prefixQuery(trim($query), $this->prefix());
+ if ($prefixed_query != FALSE) {
+ $this->query($prefixed_query[0]);
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /**
+ * Get field name
+ *
+ * @param resource $result query result
+ * @param int $ numerical field index
+ * @return string
+ */
+ public function getFieldName($result, $offset)
+ {
+ return $result->fetch_field_direct($offset)->name;
+ }
+
+ /**
+ * Get field type
+ *
+ * @param resource $result query result
+ * @param int $offset numerical field index
+ * @return string
+ */
+ public function getFieldType($result, $offset)
+ {
+ $typecode = $result->fetch_field_direct($offset)->type;
+ switch($typecode) {
+ case MYSQLI_TYPE_DECIMAL:
+ case MYSQLI_TYPE_NEWDECIMAL:
+ $type='decimal';
+ break;
+ case MYSQLI_TYPE_BIT:
+ $type='bit';
+ break;
+ case MYSQLI_TYPE_TINY:
+ case MYSQLI_TYPE_CHAR:
+ $type='tinyint';
+ break;
+ case MYSQLI_TYPE_SHORT:
+ $type='smallint';
+ break;
+ case MYSQLI_TYPE_LONG:
+ $type='int';
+ break;
+ case MYSQLI_TYPE_FLOAT:
+ $type='float';
+ break;
+ case MYSQLI_TYPE_DOUBLE:
+ $type='double';
+ break;
+ case MYSQLI_TYPE_NULL:
+ $type='NULL';
+ break;
+ case MYSQLI_TYPE_TIMESTAMP:
+ $type='timestamp';
+ break;
+ case MYSQLI_TYPE_LONGLONG:
+ $type='bigint';
+ break;
+ case MYSQLI_TYPE_INT24:
+ $type='mediumint';
+ break;
+ case MYSQLI_TYPE_NEWDATE:
+ case MYSQLI_TYPE_DATE:
+ $type='date';
+ break;
+ case MYSQLI_TYPE_TIME:
+ $type='time';
+ break;
+ case MYSQLI_TYPE_DATETIME:
+ $type='datetime';
+ break;
+ case MYSQLI_TYPE_YEAR:
+ $type='year';
+ break;
+ case MYSQLI_TYPE_INTERVAL:
+ $type='interval';
+ break;
+ case MYSQLI_TYPE_ENUM:
+ $type='enum';
+ break;
+ case MYSQLI_TYPE_SET:
+ $type='set';
+ break;
+ case MYSQLI_TYPE_TINY_BLOB:
+ $type='tinyblob';
+ break;
+ case MYSQLI_TYPE_MEDIUM_BLOB:
+ $type='mediumblob';
+ break;
+ case MYSQLI_TYPE_LONG_BLOB:
+ $type='longblob';
+ break;
+ case MYSQLI_TYPE_BLOB:
+ $type='blob';
+ break;
+ case MYSQLI_TYPE_VAR_STRING:
+ $type='varchar';
+ break;
+ case MYSQLI_TYPE_STRING:
+ $type='char';
+ break;
+ case MYSQLI_TYPE_GEOMETRY:
+ $type='geometry';
+ break;
+ default:
+ $type='unknown';
+ break;
+ }
+ return $type;
+ }
+
+ /**
+ * Get number of fields in result
+ *
+ * @param resource $result query result
+ * @return int
+ */
+ public function getFieldsNum($result)
+ {
+ return mysqli_num_fields($result);
+ }
+
+ /**
+ * getServerVersion get version of the mysql server
+ *
+ * @return string
+ */
+ public function getServerVersion()
+ {
+ return mysqli_get_server_info($this->conn);
+ }
+}
+
+/**
+ * Safe Connection to a MySQL database.
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ * @subpackage database
+ */
+class XoopsMySQLDatabaseSafe extends XoopsMySQLDatabase
+{
+ /**
+ * perform a query on the database
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if successful
+ * or TRUE if successful and no result
+ */
+ public function query($sql, $limit = 0, $start = 0)
+ {
+ return $this->queryF($sql, $limit, $start);
+ }
+}
+
+/**
+ * Read-Only connection to a MySQL database.
+ *
+ * This class allows only SELECT queries to be performed through its
+ * {@link query()} method for security reasons.
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package class
+ * @subpackage database
+ */
+class XoopsMySQLDatabaseProxy extends XoopsMySQLDatabase
+{
+ /**
+ * perform a query on the database
+ *
+ * this method allows only SELECT queries for safety.
+ *
+ * @param string $sql a valid MySQL query
+ * @param int $limit number of records to return
+ * @param int $start offset of first record to return
+ * @return resource query result or FALSE if unsuccessful
+ */
+ public function query($sql, $limit = 0, $start = 0)
+ {
+ $sql = ltrim($sql);
+ if (!$this->allowWebChanges && strtolower(substr($sql, 0, 6)) != 'select') {
+ trigger_error('Database updates are not allowed during processing of a GET request', E_USER_WARNING);
+ return FALSE;
+ }
+
+ return $this->queryF($sql, $limit, $start);
+ }
+}
+
+?>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-02-18 19:47:18 UTC (rev 12324)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-02-19 00:38:15 UTC (rev 12325)
@@ -274,19 +274,21 @@
// Database version
$path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/";
$dbarray=$this->_obj->getInfo('min_db');
+
if ($dbarray[XOOPS_DB_TYPE]) {
+ // changes from redheadedrod to use connector specific version info
switch (XOOPS_DB_TYPE) {
+ // server should be the same in both cases
case "mysql":
- $dbCurrentVersion= mysql_get_server_info();
- break;
case "mysqli":
- $dbCurrentVersion = mysqli_get_server_info();
- break;
- case "pdo":
global $xoopsDB;
- $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION);
+ $dbCurrentVersion= $xoopsDB->getServerVersion();
break;
- default:
+ //case "pdo":
+ // global $xoopsDB;
+ // $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION);
+ // break;
+ default: // don't really support anything other than mysql
$dbCurrentVersion = '0';
break;
}
@@ -372,7 +374,7 @@
{
$ret['label'] = $label;
$line = "";
- switch ($type)
+ switch ($type)
{
default:
case "default":
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php 2014-02-18 19:47:18 UTC (rev 12324)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/database/mysqldatabase.php 2014-02-19 00:38:15 UTC (rev 12325)
@@ -37,7 +37,7 @@
*
* @abstract
* @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @copyright copyright (c) 2000-2014 XOOPS.org
* @package kernel
* @subpackage database
*/
@@ -237,7 +237,7 @@
}
/**
- * Escapes a string for use in a query. Does not add surroundin quotes.
+ * Escapes a string for use in a query. Does not add surrounding quotes.
*
* @param string $string string to escape
*
@@ -352,6 +352,16 @@
{
return mysql_num_fields($result);
}
+
+ /**
+ * getServerVersion get version of the mysql server
+ *
+ * @return string
+ */
+ public function getServerVersion()
+ {
+ return mysql_get_server_info($this->conn);
+ }
}
/**
|
|
From: <luc...@us...> - 2014-02-18 19:47:25
|
Revision: 12324
http://sourceforge.net/p/xoops/svn/12324
Author: luciorota
Date: 2014-02-18 19:47:18 +0000 (Tue, 18 Feb 2014)
Log Message:
-----------
experiment: added formAjaxImageManager element and use it instead of xoops popup image manager
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/imagemanager.php
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/modules/system/templates/system_imagemanager.html
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.php
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/language/english/formajaximagemanager.php
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/sampleform.inc.php
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Canvas-to-Blob-master/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Canvas-to-Blob-master/js/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Canvas-to-Blob-master/js/canvas-to-blob.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Canvas-to-Blob-master/js/canvas-to-blob.min.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/css/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/css/demo.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/css/vendor/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/css/vendor/Jcrop.gif
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/css/vendor/jquery.Jcrop.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/demo.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image-exif-map.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image-exif.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image-ios.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image-meta.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image-orientation.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/load-image.min.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/vendor/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.JavaScript-Load-Image-master/js/vendor/jquery.Jcrop.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ThickBox/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ThickBox/loadingAnimation.gif
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ThickBox/thickbox-compressed.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ThickBox/thickbox.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ThickBox/thickbox.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ajaxloader/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ajaxloader/jquery.ajaxloader.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ajaxloader/jquery.ajaxloader.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.ajaxloader/spinner.gif
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/cors/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/cors/postmessage.html
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/cors/result.html
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/demo-ie8.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/demo.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/jquery.fileupload-noscript.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/jquery.fileupload-ui-noscript.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/jquery.fileupload-ui.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/jquery.fileupload.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/css/style.css
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/img/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/img/loading.gif
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/img/progressbar.gif
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/app.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/cors/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/cors/jquery.postmessage-transport.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/cors/jquery.xdr-transport.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-angular.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-audio.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-image.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-jquery-ui.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-process.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-ui.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-validate.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload-video.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.fileupload.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/jquery.iframe-transport.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/main.js
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/vendor/
XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/xoops_lib/Frameworks/jquery.jQuery-File-Upload-master/js/vendor/jquery.ui.widget.js
Added: XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.css
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.css (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.css 2014-02-18 19:47:18 UTC (rev 12324)
@@ -0,0 +1,120 @@
+/* main containers */
+.faim-formajaximagemenager_container {
+ position: relative;
+ width: 100%;
+ height: 444px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ position: relative;
+ background-color: #FFFFFF;
+ margin: 0px;
+ border: none;
+ padding: 0px;
+
+}
+.faim-formajaximagemenager_list_imgcat_container,
+.faim-formajaximagemenager_edit_image_container,
+.faim-formajaximagemenager_edit_imgcat_container {
+ position: relative;
+ width: 100%;
+ height: 480px;
+}
+
+.faim-formajaximagemenager_container .inner5 {
+ margin: 5px;
+}
+
+/* messages */
+.faim-formajaximagemenager_confirmMsg {
+ margin-top: 0px !important;
+ margin-bottom: 0px !important;
+}
+
+/* images thumbs */
+.faim-thumb {
+ background-color: #FFFFFF;
+ border-color: #CCCCCC #AAAAAA #AAAAAA #CCCCCC;
+ border-style: solid;
+ border-width: 1px;
+ border-radius: 4px;
+ height: 200px;
+ margin: 5px;
+ padding: 5px;
+ position: relative;
+ width: 140px;
+}
+
+.faim-thumb img {
+ border: 0 none;
+}
+
+
+.faim-thumbimg {
+ position: relative;
+ width:140px;
+ height: 140px;
+ padding: 0px;
+ border: none;
+ background: #CCCCCC no-repeat center top;
+}
+
+.faim-actions {
+ position: absolute;
+ width:140px;
+ bottom: 0px;
+ height: 26px;
+ padding: 0px;
+ border: none;
+ background: transparent;
+}
+
+.faim-informations {
+ line-height: 1em;
+ font-weight: bold;
+ width:140px;
+ background: transparent;
+}
+
+.faim-selects {
+ position: absolute;
+ bottom: 0px;
+ width:140px;
+ height: 22px;
+ padding: 0px;
+ border: none;
+ background: transparent;
+}
+
+.faim-actions button img,
+.faim-actions a img,
+.faim-actions span img,
+.faim-actions img,
+.faim-thumbimg img {
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.faim-selects img {
+ cursor: pointer;
+ width: 21px;
+ height: 22px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.faim-actions .tooltip {
+ width: 16px;
+ height: 16px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.faim-selects .tooltip {
+ width: 22px;
+ height: 22px;
+ margin: 0px;
+ padding: 0px;
+}
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7_luciorota/htdocs/class/xoopsform/formajaximagemanager.php 2014-02-18 19:47:18 UTC (rev 12324)
@@ -0,0 +1,1957 @@
+<?php
+/**
+ * XoopsFormAjaxImagemanager component class file
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package kernel
+ * @subpackage form
+ * @since 2.5.7
+ * @author lucio <luc...@gm...>
+ * @version $Id:$
+ */
+error_reporting(0);
+include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+$GLOBALS['xoopsLogger']->activated = false;
+
+//include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+define("FORMAJAXIMAGEMANAGER_FILENAME", basename(__FILE__));
+define("FORMAJAXIMAGEMANAGER_PATH", dirname(__FILE__));
+define("FORMAJAXIMAGEMANAGER_URL", XOOPS_URL . "/class/xoopsform/" . FORMAJAXIMAGEMANAGER_FILENAME);
+define("FORMAJAXIMAGEMANAGER_JS_URL", XOOPS_URL . "/class/xoopsform");
+define("FORMAJAXIMAGEMANAGER_CSS_URL", XOOPS_URL . "/class/xoopsform");
+xoops_loadLanguage('formajaximagemanager');
+
+$module_handler = xoops_gethandler('module');
+$systemModule = $module_handler->getByDirname('system');
+$systemModuleId = $systemModule->id;
+$userGroups = (is_object($GLOBALS['xoopsUser'])) ? $GLOBALS['xoopsUser']->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
+$userIsAdmin = (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($systemModuleId));
+
+$imgcat_handler = xoops_gethandler('imagecategory');
+$image_handler = xoops_gethandler('image');
+$imgcatObjperm_handler = xoops_gethandler('groupperm');
+
+
+
+$op = isset($_POST['op']) ? (string)$_POST['op'] : '';
+//$op = XoopsRequest::getString('op', '', 'POST');
+switch ($op) {
+ default :
+ // NOP
+ break;
+
+ case "getImgcats" :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+
+
+ $criteria = new CriteriaCompo();
+ if ($userIsAdmin) {
+ $imgcatReadListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_read'));
+ $imgcatWriteListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_write'));
+ } else {
+ $imgcatReadListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_read', true));
+ $imgcatWriteListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_write', true));
+ $criteria->add(new Criteria('imgcat_display', true));
+ }
+ if ($imgcat_handler->getCount($criteria) == 0) {
+ // ERROR: no imgcats
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCATS;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCATS;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ $criteria->setSort('imgcat_weight');
+ $criteria->setOrder('ASC');
+ $imgcatsObj = $imgcat_handler->getObjects($criteria, true);
+
+ $imgcatsArray = array();
+ foreach($imgcatsObj as $imgcat_id => $imgcatObj) {
+ $imgcat = array();
+ $imgcat['var']= $imgcatObj->toArray();
+ if ($userIsAdmin) {
+ $imgcat['perm']['edit'] = true;
+ $imgcat['perm']['delete'] = true;
+ $imgcat['perm']['img_read'] = true;
+ $imgcat['perm']['img_write'] = true;
+ $imgcat['perm']['img_delete'] = true;
+ } else {
+ $imgcat['perm']['edit'] = false;
+ $imgcat['perm']['delete'] = false;
+ $imgcat['perm']['img_read'] = in_array($imgcat_id, $imgcatReadListArray);
+ $imgcat['perm']['img_write'] = in_array($imgcat_id, $imgcatWriteListArray);
+ $imgcat['perm']['img_delete'] = false; // IN PROGRESS
+ }
+ $imgcatsArray[$imgcat_id] = $imgcat;
+ unset($imgcat);
+ }
+
+ $data['imgcats'] = $imgcatsArray;
+ $data['xoopsUser']['isAdmin'] = (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($systemModuleId));
+ // Generate ajax return
+ $ret = array();
+ $ret['data'] = $data;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = '';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ break;
+
+ case "getImgcatPermissions" :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+
+ // get imgcat/imgcats
+ $criteria = new CriteriaCompo();
+ if ($imgcat_id != 0) {
+ $criteria->add(new Criteria('imgcat_id', $imgcat_id));
+ }
+ if (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($systemModuleId)) {
+ $imgcatReadListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_read'));
+ $imgcatWriteListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_write'));
+ } else {
+ $imgcatReadListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_read', true));
+ $imgcatWriteListArray = array_keys($imgcat_handler->getList($userGroups, 'imgcat_write', true));
+ $criteria->add(new Criteria('imgcat_display', true));
+ }
+ if ($imgcat_handler->getCount($criteria) == 0) {
+ // ERROR: no imgcats
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCATS;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCATS;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ $criteria->setSort('imgcat_weight');
+ $criteria->setOrder('ASC');
+ $imgcatsObj = $imgcat_handler->getObjects($criteria, true);
+
+ $imgcatsArray = array();
+ foreach($imgcatsObj as $imgcat_id => $imgcatObj) {
+ $imgcat = array();
+ $imgcat['var']= $imgcatObj->toArray();
+ if (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($systemModuleId)) {
+ $imgcat['perm']['edit'] = true;
+ $imgcat['perm']['delete'] = true;
+ $imgcat['perm']['img_read'] = true;
+ $imgcat['perm']['img_write'] = true;
+ $imgcat['perm']['img_delete'] = true;
+ } else {
+ $imgcat['perm']['edit'] = false;
+ $imgcat['perm']['delete'] = false;
+ $imgcat['perm']['img_read'] = in_array($imgcat_id, $imgcatReadListArray);
+ $imgcat['perm']['img_write'] = in_array($imgcat_id, $imgcatWriteListArray);
+ $imgcat['perm']['img_delete'] = false; // IN PROGRESS
+ }
+ $imgcatsArray[$imgcat_id] = $imgcat;
+ unset($imgcat);
+ }
+ $data['imgcats'] = $imgcatsArray;
+ $data['xoopsUser']['isAdmin'] = (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($systemModuleId));
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = $data;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = '';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ break;
+
+ case "getImgcatImagesList" :
+ // get imgcat_id
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id');
+ // get imgcat object
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ // check imgcat object
+ if (!is_object($imgcatObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // check user read permissions
+ $imgcatperm_handler =& xoops_gethandler('groupperm');
+ if (!$imgcatperm_handler->checkRight('imgcat_read', $imgcat_id, $userGroups)) {
+ // ERROR: no read permissions
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_VIEW;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_VIEW;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // get images objects
+ $criteria = new Criteria('imgcat_id', $imgcat_id);
+ $criteria->setSort('image_weight');
+ $criteria->setOrder('ASC');
+ $imagesObjs = $image_handler->getObjects($criteria, false, false);
+ foreach ($imagesObjs as $imageObj) {
+ $image['image_id'] = $imageObj->getVar('image_id');
+ $image['image_name'] = $imageObj->getVar('image_name');
+ $image['image_url'] = XOOPS_URL . '/uploads/' . $imageObj->getVar('image_name');
+ $image['image_path'] = XOOPS_UPLOAD_PATH . '/' . $imageObj->getVar('image_name');
+ $imagesize = getimagesize($image['image_path']);
+ $image['image_width'] = $imagesize[0];
+ $image['image_height'] = $imagesize[1];
+ $image['image_mime'] = $imagesize['mime'];
+ $image['image_nicename'] = $imageObj->getVar('image_nicename');
+ $image['image_mimetype'] = $imageObj->getVar('image_mimetype');
+ $image['image_created'] = $imageObj->getVar('image_created');
+ $image['image_display'] = $imageObj->getVar('image_display');
+ $image['image_weight'] = $imageObj->getVar('image_weight');
+ $image['image_body'] = $imageObj->getVar('image_body');
+ $image['imgcat_id'] = $imageObj->getVar('imgcat_id');
+ $imagesArray[] = $image;
+ unset($image);
+ }
+ // get read/write permissions
+ $perm['img_read'] = true;
+ $perm['img_write'] = $imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $userGroups);
+ // generate ajax return
+ $ret = array();
+ $ret['data']['images'] = $imagesArray;
+ $ret['data']['perm'] = $perm;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = 'ok';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ break;
+
+
+// Images operations
+ case 'getImageForm' :
+
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ // get image_id
+ $image_id = isset($_REQUEST['image_id']) ? (int)$_REQUEST['image_id'] : 0;
+ //$image_id = XoopsRequest::getInt('image_id', 0);
+ // get image object
+ if ($image_id <= 0) {
+ $imageObj = $image_handler->create();
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+ $title = _FAIM_ADD_IMAGE;
+ } else {
+ $imageObj = $image_handler->get($image_id);
+ $imgcat_id = $imageObj->getVar('imgcat_id');
+ $title = _FAIM_EDIT_IMAGE;
+ }
+ // check image object
+ if (!is_object($imageObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMAGE_OBJECT;
+ $ret['html'] = _FAIM_ERROR_NO_IMAGE_OBJECT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // get imgcat object
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ // create image form
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsSimpleForm( $title, 'image_form', 'formajaximagemanager.php', 'post', true );
+ $form->setExtra('enctype="multipart/form-data"');
+ $form->addElement(new XoopsFormText( _IMAGENAME, $name . '_image_nicename', 50, 255, $imageObj->getVar('image_nicename')), true );
+ $select = new XoopsFormSelect( _IMAGECAT, $name . '_image_imgcat_id', $imgcat_id);
+ if ($userIsAdmin) {
+ $categoriesListArray = $imgcat_handler->getList($userGroups, 'imgcat_write');
+ } else {
+ $categoriesListArray = $imgcat_handler->getList($userGroups, 'imgcat_write', true);
+ }
+ $select->addOptionArray($categoriesListArray);
+ $form->addElement($select, true);
+ if (!$imageObj->isNew()) {
+ $form->addElement(new XoopsFormLabel(_IMAGEFILE, "<img src='" . XOOPS_URL . "/image.php?id=" . $image_id . "&width=140&height=140' />"));
+ } else {
+ $form->addElement(new XoopsFormFile(_IMAGEFILE, $name . '_image_file', $imgcatObj->getVar('imgcat_maxsize')), true);
+ }
+ $form->addElement(new XoopsFormText( _IMGWEIGHT, $name . '_image_weight', 3, 4, $imageObj->getVar('image_weight') ) );
+ $form->addElement(new XoopsFormRadioYN( _IMGDISPLAY, $name . '_image_display', $imageObj->getVar('image_display'), _YES, _NO) );
+ if (!$imageObj->isNew()) {
+ $form->addElement(new XoopsFormHidden($name . '_op', 'submitUpdateImageForm'));
+ } else {
+ $form->addElement(new XoopsFormHidden($name . '_op', 'submitNewImageForm'));
+ }
+ $form->addElement(new XoopsFormHidden($name . '_image_id', $image_id));
+ $form->addElement(new XoopsFormHidden($name . '_imgcat_id', $imgcat_id));
+ $form->addElement(new XoopsFormButton('', $name . '_submit_image_button', _SUBMIT, 'button'));
+ // render edit image form
+ $html = '';
+ $html .= "<div id='" . $name . "_edit_image_form'>";
+ $html .= "<b>" . $form->getTitle() . "</b>\n";
+ $html .= "<br />\n";
+ foreach ($form->getElements() as $ele) {
+ if (!$ele->isHidden()) {
+ $caption = $ele->getCaption();
+ if (!empty($caption)) {
+ $html .= "<strong>" . $ele->getCaption() . "</strong><br />\n";
+ }
+ $html .= $ele->render() . "<br />\n";
+ } else {
+ $html .= $ele->render() . "\n";
+ }
+ }
+ $html .= "</div>";
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = $html;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ break;
+
+ case 'submitNewImageForm' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $filename = basename($_FILES[$name . '_image_file']['name']);
+ //$filetype = basename($_FILES[$name . '_image_file']['type']);
+ //$filesize = basename($_FILES[$name . '_image_file']['size']);
+ $image_nicename = !empty($_POST['image_nicename']) ? trim($_POST['image_nicename']) : $filename;
+ $image_weight = isset($_POST['image_weight']) ? $_POST['image_weight'] : 0;
+ $image_display = isset($_POST['image_display']) ? $_POST['image_display'] : true;
+ // get imgcat_id
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id');
+ // get imgcat object
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ // check imgcat object
+ if (!is_object($imgcatObj)) {
+ // ERROR
+ // Generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // check user write permissions
+ $imgcatperm_handler =& xoops_gethandler('groupperm');
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $userGroups)) {
+ // ERROR: non write permissions
+ // Generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_SUBMIT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_SUBMIT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // upload image file and update db
+ $error = false;
+ include_once XOOPS_ROOT_PATH . '/class/uploader.php';
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $imgcatObj->getVar('imgcat_maxsize'), $imgcatObj->getVar('imgcat_maxwidth'), $imgcatObj->getVar('imgcat_maxheight'));
+ $uploader->setPrefix('img');
+ if ($uploader->fetchMedia($name . '_image_file')) {
+ if (!$uploader->upload()) {
+ $error = implode("<br />", $uploader->getErrors(false));
+ } else {
+ // create image object
+ $imageObj = $image_handler->create();
+ $imageObj->setVar('image_name', $uploader->getSavedFileName());
+ $imageObj->setVar('image_nicename', $image_nicename);
+ $imageObj->setVar('image_mimetype', $uploader->getMediaType());
+ $imageObj->setVar('image_created', time());
+ $imageObj->setVar('image_display', $image_display);
+ $imageObj->setVar('image_weight', $image_weight);
+ $imageObj->setVar('imgcat_id', $imgcat_id);
+ if ($imgcatObj->getVar('imgcat_storetype') == 'db') {
+ $fp = @fopen($uploader->getSavedDestination(), 'rb');
+ $fbinary = @fread($fp, filesize($uploader->getSavedDestination()));
+ @fclose($fp);
+ $imageObj->setVar('image_body', $fbinary, true);
+ @unlink($uploader->getSavedDestination());
+ }
+ // store image object in db
+ if (!$image_handler->insert($imageObj)) {
+ $error = sprintf(_FAILSAVEIMG, $imageObj->getVar('image_nicename'));
+ }
+ }
+ } else {
+ $error = sprintf(_FAILFETCHIMG, 0) . "|" . implode("|", $uploader->getErrors(false));
+ }
+ // generate ajax return
+ if ($error) {
+ // ERROR
+ $arr = array('error', $error);
+ } else {
+ $arr = array('success', $imageObj->getVar("image_name"), $imageObj->getVar("image_nicename"));
+ }
+ echo json_encode($arr);
+ exit();
+ break;
+
+ case 'submitUpdateImageForm' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $image_nicename = !empty($_POST['image_nicename']) ? trim($_POST['image_nicename']) : $filename;
+ $image_weight = isset($_POST['image_weight']) ? $_POST['image_weight'] : 0;
+ $image_display = isset($_POST['image_display']) ? $_POST['image_display'] : true;
+ // get imgcat_id
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id');
+ // get imgcat object
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ // check imgcat object
+ if (!is_object($imgcatObj)) {
+ // ERROR
+ // Generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // check user write permissions
+ $imgcatperm_handler =& xoops_gethandler('groupperm');
+ if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $userGroups)) {
+ // ERROR: no write permissions
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_SUBMIT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_SUBMIT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // get image_id
+ $image_id = isset($_REQUEST['image_id']) ? (int)$_REQUEST['image_id'] : 0;
+ //$image_id = XoopsRequest::getInt('image_id', 0);
+ // check image_id
+ if ($image_id <= 0) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['html'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // get image object
+ $imageObj = $image_handler->get($image_id);
+ // check image object
+ if (!is_object($imageObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['html'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // update image object
+ $error = false;
+ $imageObj->setVar('image_nicename', $image_nicename);
+ $imageObj->setVar('image_display', $image_display);
+ $imageObj->setVar('image_weight', $image_weight);
+ $imageObj->setVar('imgcat_id', $imgcat_id);
+ // store image object in db
+ if (!$image_handler->insert($imageObj)) {
+ $error = sprintf(_FAILSAVEIMG, $imageObj->getVar('image_nicename'));
+ }
+ // generate ajax return
+ if ($error) {
+ // ERROR
+ $arr = array('error', $error);
+ } else {
+ $arr = array('success', $imageObj->getVar("image_name"), $imageObj->getVar("image_nicename"));
+ }
+ echo json_encode($arr);
+ exit();
+ break;
+
+ case 'deleteImage' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $ok = isset($_REQUEST['delete_image_ok']) ? $_REQUEST['delete_image_ok'] : false;
+ //$ok = XoopsRequest::getBool('delete_image_ok', false);
+ // get image_id
+ $image_id = isset($_REQUEST['image_id']) ? (int)$_REQUEST['image_id'] : 0;
+ //$image_id = XoopsRequest::getInt('image_id', 0);
+ // check image_id
+ if ($image_id <= 0) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['html'] = _FAIM_ERROR_NO_IMAGE;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // get image object
+ $imageObj = $image_handler->get($image_id);
+ // check image
+ if (!is_object($imageObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMAGE_OBJECT;
+ $ret['html'] = _FAIM_ERROR_NO_IMAGE_OBJECT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ if ($ok == false) {
+ // NOT USED
+ /*
+ $imagesListArray = $image_handler->getList($imgcat_id);
+ $imagesListArrayCount = count($imagesListArray);
+ // render delete imgcat form
+ $html = '';
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = array(
+ 'name' => $name,
+ 'image_id' => $image_id,
+ 'image_nicename' => $image->getVar('image_nicename')
+ );
+ $ret['error'] = true;
+ $ret['message'] = _ERRORS;
+ $ret['html'] = '';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ */
+ exit();
+ }
+ // delete image object form db
+ $errors = array();
+ if (!$image_handler->delete($imageObj)) {
+ // ERROR
+ $errors[] = sprintf( _FAIM_ERROR_NO_IMAGE_DELETE, $imageObj->getVar('image_nicename'));
+ } else {
+ // delete image file from filesystem
+ if (file_exists(XOOPS_UPLOAD_PATH . '/' . $imageObj->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH . '/' . $imageObj->getVar('image_name'))) {
+ // ERROR
+ $errors[] = sprintf( _FAIM_ERROR_NO_IMAGE_DELETE, $imageObj->getVar('image_name') );
+ }
+ }
+
+ if (count($errors) > 0) {
+ ob_start(); // start output buffering
+ xoops_error($errors);
+ $error_html = ob_get_contents(); // store buffer in variable
+ ob_end_clean(); // end buffering and clean up
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = $error_html;
+ $ret['html'] = $error_html;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ } else {
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = _FAIM_IMAGE_DELETED;
+ $ret['html'] = _FAIM_IMAGE_DELETED;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ break;
+
+
+// Imgcats operations
+ case 'getImgcatForm' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+ // check imgcat_id
+ if ($imgcat_id <= 0) {
+ // create imgcat object
+ $imgcatObj =& $imgcat_handler->create();
+ $imgcatObj->setVar('imgcat_maxsize', 50000); // default for new imgcat
+ $imgcatObj->setVar('imgcat_maxwidth', 120); // default for new imgcat
+ $imgcatObj->setVar('imgcat_maxheight', 120); // default for new imgcat
+ $title = _FAIM_ADD_IMGCAT;
+ } else {
+ // get imgcat object
+ $imgcatObj =& $imgcat_handler->get($imgcat_id);
+ $title = _FAIM_EDIT_IMGCAT;
+ }
+ // check imgcat object
+ if (!is_object($imgcatObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_OBJECT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_OBJECT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // create imgcat form
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsSimpleForm( $title, 'imagecat_form', 'formajaximagemanager.php', 'post', true );
+ $form->addElement(new XoopsFormText( _MD_IMGCATNAME, $name . '_imgcat_name', 50, 255, $imgcatObj->getVar('imgcat_name')), true);
+ $form->addElement(new XoopsFormSelectGroup( _MD_IMGCATRGRP, $name . '_imgcat_readgroup', true, array_merge($imgcatObjperm_handler->getGroupIds('imgcat_read', $imgcat_id), array(XOOPS_GROUP_ADMIN)), 3, true));
+ $form->addElement(new XoopsFormSelectGroup( _MD_IMGCATWGRP, $name . '_imgcat_writegroup', true, array_merge($imgcatObjperm_handler->getGroupIds('imgcat_write', $imgcat_id), array(XOOPS_GROUP_ADMIN)), 3, true));
+ $form->addElement(new XoopsFormText( _IMGMAXSIZE, $name . '_imgcat_maxsize', 10, 10, $imgcatObj->getVar('imgcat_maxsize')));
+ $form->addElement(new XoopsFormText( _IMGMAXWIDTH, $name . '_imgcat_maxwidth', 3, 4, $imgcatObj->getVar('imgcat_maxwidth')));
+ $form->addElement(new XoopsFormText( _IMGMAXHEIGHT, $name . '_imgcat_maxheight', 3, 4, $imgcatObj->getVar('imgcat_maxheight')));
+ $form->addElement(new XoopsFormText( _MD_IMGCATWEIGHT, $name . '_imgcat_weight', 3, 4, $imgcatObj->getVar('imgcat_weight')));
+ $form->addElement(new XoopsFormRadioYN( _MD_IMGCATDISPLAY, $name . '_imgcat_display', $imgcatObj->getVar('imgcat_display'), _YES, _NO));
+ $storetype = array( 'db' => _MD_INDB, 'file' => _MD_ASFILE );
+ //$form->addElement(new XoopsFormLabel( _MD_IMGCATSTRTYPE, $storetype[$imgcatObj->getVar('imgcat_storetype')]));
+ if (!$imgcatObj->isNew()) {
+ $form->addElement(new XoopsFormHidden($name . '_imgcat_id', $imgcat_id));
+ $form->addElement(new XoopsFormHidden($name . '_op', 'update.imgcat'));
+ } else {
+ $form->addElement(new XoopsFormHidden($name . '_imgcat_id', 0));
+ $form->addElement(new XoopsFormHidden($name . '_op', 'create.imgcat'));
+ }
+ $form->addElement(new XoopsFormHidden('fct', 'images'));
+ $form->addElement(new XoopsFormButton('', $name . '_submit_imgcat_button', _SUBMIT, 'button'));
+ // render edit imgcat form
+ $html = '';
+ $html .= "<div id='" . $name ."_edit_imgcat_form'>";
+ $html .= "<b>" . $form->getTitle() . "</b>\n";
+ $html .= "<br />\n";
+ foreach ($form->getElements() as $ele) {
+ if (!$ele->isHidden()) {
+ $caption = $ele->getCaption();
+ if (!empty($caption)) {
+ $html .= "<strong>" . $ele->getCaption() . "</strong><br />\n";
+ }
+ $html .= $ele->render() . "<br />\n";
+ } else {
+ $html .= $ele->render() . "\n";
+ }
+ }
+ $html .= "</div>";
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = $html;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ break;
+
+ case 'submitImgcatForm' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+ // check imgcat_id
+ if ($imgcat_id <= 0) {
+ // create imgcat object
+ $imgcatObj = $imgcat_handler->create();
+ $title = _FAIM_ADD_IMGCAT;
+ } else {
+ // get imgcat object
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ $title = _FAIM_EDIT_IMGCAT;
+ }
+ // check imgcat object
+ if (!is_object($imgcatObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_OBJECT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_OBJECT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+
+ $imgcatObj->setVar('imgcat_name', $_POST['imgcat_name']);
+ $imgcatObj->setVar('imgcat_maxsize', $_POST['imgcat_maxsize']);
+ $imgcatObj->setVar('imgcat_maxwidth', $_POST['imgcat_maxwidth']);
+ $imgcatObj->setVar('imgcat_maxheight', $_POST['imgcat_maxheight']);
+ $imgcat_display = empty($_POST['imgcat_display']) ? false : true;
+ $imgcatObj->setVar('imgcat_display', $imgcat_display);
+ $imgcatObj->setVar('imgcat_weight', $_POST['imgcat_weight']);
+ if ($imgcat_id <= 0) {
+ $imgcatObj->setVar('imgcat_storetype', $_POST['imgcat_storetype']);
+ $imgcatObj->setVar('imgcat_type', 'C');
+ } else {
+ // NOP
+ }
+
+ if (!$imgcat_handler->insert($imgcatObj)) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_DB;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_DB;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+
+ $imgcat_id = $imgcatObj->getVar('imgcat_id');
+ // update permissions
+ $imgcatObjperm_handler =& xoops_gethandler('groupperm');
+ $readGroups = isset($_POST['imgcat_readgroup']) ? $_POST['imgcat_readgroup'] : array();
+ //$readGroups = XoopsRequest::getArray('imgcat_readgroup', array(), 'POST');
+ //if (!is_array($readgroups)) $readgroups = array();
+ if (!in_array(XOOPS_GROUP_ADMIN, $readGroups)) {
+ array_push($readGroups, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($readGroups as $readGroup) {
+ $imgcatObjperm =& $imgcatObjperm_handler->create();
+ $imgcatObjperm->setVar('gperm_groupid', $readGroup);
+ $imgcatObjperm->setVar('gperm_itemid', $imgcat_id);
+ $imgcatObjperm->setVar('gperm_name', 'imgcat_read');
+ $imgcatObjperm->setVar('gperm_modid', 1);
+ $imgcatObjperm_handler->insert($imgcatObjperm);
+ unset($imgcatObjperm);
+ }
+
+ $writeGroups = isset($_POST['imgcat_writegroup']) ? $_POST['imgcat_writegroup'] : array();
+ //$writeGroups = XoopsRequest::getArray('imgcat_writegroup', array(), 'POST');
+ if (!in_array(XOOPS_GROUP_ADMIN, $writeGroups)) {
+ array_push($writeGroups, XOOPS_GROUP_ADMIN);
+ }
+ foreach ($writeGroups as $writeGroup) {
+ $imgcatObjperm =& $imgcatObjperm_handler->create();
+ $imgcatObjperm->setVar('gperm_groupid', $writeGroup);
+ $imgcatObjperm->setVar('gperm_itemid', $imgcat_id);
+ $imgcatObjperm->setVar('gperm_name', 'imgcat_write');
+ $imgcatObjperm->setVar('gperm_modid', 1);
+ $imgcatObjperm_handler->insert($imgcatObjperm);
+ unset($imgcatObjperm);
+ }
+
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = '';
+ $ret['html'] = '';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ break;
+
+ case 'deleteImgcat' :
+ $name = isset($_REQUEST['name']) ? (string)$_REQUEST['name'] : '';
+ //$name = XoopsRequest::getString('name');
+ $ok = isset($_REQUEST['delete_imgcat_ok']) ? $_REQUEST['delete_imgcat_ok'] : false;
+ //$ok = XoopsRequest::getBool('delete_imgcat_ok', false);
+ $imgcat_id = isset($_REQUEST['imgcat_id']) ? (int)$_REQUEST['imgcat_id'] : 0;
+ //$imgcat_id = XoopsRequest::getInt('imgcat_id', 0);
+ // check imgcat_id
+ if ($imgcat_id <= 0) {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+
+ $imgcatObj = $imgcat_handler->get($imgcat_id);
+ // check imgcatObj
+ if (!is_object($imgcatObj)) {
+ // generate ajax return
+ // ERROR
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // check imgcat_type
+ if ($imgcatObj->getVar('imgcat_type') != 'C') {
+ // ERROR
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = array(
+ 'name' => $name,
+ 'imgcat_id' => $imgcat_id,
+ 'imgcat_name' => $imgcatObj->getVar('imgcat_name')
+ );
+ $ret['error'] = true;
+ $ret['message'] = _FAIM_ERROR_NO_IMGCAT_EDIT;
+ $ret['html'] = _FAIM_ERROR_NO_IMGCAT_EDIT;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ if ($ok == false) {
+ $imagesListArray = $image_handler->getList($imgcat_id);
+ $imagesListArrayCount = count($imagesListArray);
+ // render delete imgcat form
+ $html = '';
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = array(
+ 'name' => $name,
+ 'imgcat_id' => $imgcat_id,
+ 'imgcat_name' => $imgcatObj->getVar('imgcat_name')
+ );
+ $ret['error'] = true;
+ $ret['message'] = _ERRORS;
+ $ret['html'] = '';
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ // delete images
+ $imagesObjs = $image_handler->getObjects(new Criteria('imgcat_id', $imgcat_id), true, false);
+ $errors = array();
+ foreach ($imagesObjs as $imageObj) {
+ if (!$image_handler->delete($imageObj)) {
+ // ERROR
+ $errors[] = sprintf( _FAIM_ERROR_NO_IMAGE_DELETE, $imageObj->getVar('image_nicename'));
+ } else {
+ if (file_exists(XOOPS_UPLOAD_PATH . '/' . $imageObj->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH . '/' . $imageObj->getVar('image_name'))) {
+ // ERROR
+ $errors[] = sprintf( _FAIM_ERROR_NO_IMAGE_DELETE, $imageObj->getVar('image_name') );
+ }
+ }
+ }
+ // delete imgcat
+ if (!$imgcat_handler->delete($imgcatObj)) {
+ // ERROR
+ $errors[] = sprintf( _FAIM_ERROR_NO_IMGCAT_DELETE, $imgcatObj->getVar('imgcat_name'));
+ }
+ if (count($errors) > 0) {
+ ob_start(); // start output buffering
+ xoops_error($errors);
+ $error_html = ob_get_contents(); // store buffer in variable
+ ob_end_clean(); // end buffering and clean up
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = true;
+ $ret['message'] = $error_html;
+ $ret['html'] = $error_html;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ } else {
+ // generate ajax return
+ $ret = array();
+ $ret['data'] = null;
+ $ret['error'] = false;
+ $ret['message'] = _FAIM_IMGCAT_DELETED;
+ $ret['html'] = _FAIM_IMGCAT_DELETED;
+ $ret['javascript'] = '// NOP';
+ echo json_encode($ret);
+ exit();
+ }
+ break;
+}
+
+
+
+if (!class_exists('XoopsFormAjaxImageManager')) {
+ xoops_load('XoopsFormElement');
+
+ /**
+ * A ajax image manager
+ */
+ class XoopsFormAjaxImageManager extends XoopsFormElement
+ {
+ /**
+ * return mode: 'url', 'id', 'bbcode'
+ *
+ * @var string
+ * @access private
+ */
+ var $_return;
+
+ /**
+ * value: default field value
+ *
+ * @var string
+ * @access private
+ */
+ var $_value = '';
+
+ /**
+ * image id
+ *
+ * @var int
+ * @access private
+ */
+ var $_image_id;
+
+ /**
+ * image category id
+ *
+ * @var int
+ * @access private
+ */
+ var $_imgcat_id;
+
+ /**
+ * if true it's possible to edit/create categories from this element
+ *
+ * @var boolean
+ * @access private
+ */
+ var $_editimgcat;
+
+ /**
+ * Constuctor
+ *
+ * @param string $caption caption
+ * @param string $name name
+ * @param string $value initial content
+ */
+ function __construct($caption, $name, $value = "", $options = array())
+ {
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->setValue($value);
+ $this->setReturn(isset($options['return']) ? $options['return'] : 'url'); // 'url', 'html', 'bbcode', 'id', 'image_id' ...
+ $this->_editimgcat = isset($options['editimgcat']) ? (boolean)$options['editimgcat'] : false;
+
+ $myts = MyTextSanitizer::getInstance();
+
+ $imgcat_handler = xoops_gethandler('imagecategory');
+ $image_handler = xoops_gethandler('image');
+
+ $userGroups = (is_object($GLOBALS['xoopsUser'])) ? $GLOBALS['xoopsUser']->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
+
+ $categories = $imgcat_handler->getList($userGroups, 'imgcat_read', 1);
+ $categoriesCount = count($categories);
+
+ // set default imgcat_id
+ $this->setDefaultImgcatId(($categoriesCount > 0) ? current(array_keys($categories)) : null);
+
+ // get imgcat_id from image_name/image_id
+ if ($value != '') {
+ switch ($this->getReturn()) {
+ case 'url' :
+ $image_name = basename($value);
+ $image_name = preg_replace('/^.+[\\\\\\/]/', '', $value); // because basename() has a bug when processes Asian characters like Chinese
+ $criteria = new Criteria('image_name', $image_name);
+ break;
+ case 'html' :
+ $doc = new DOMDocument();
+ @$doc->loadHTML($value);
+ $tags = $doc->getElementsByTagName('img');
+ foreach ($tags as $tag) {
+ $image_url = $tag->getAttribute('src');
+ }
+ $image_name = basename($image_url); // IN PROGRESS
+ $image_name = preg_replace('/^.+[\\\\\\/]/', '', $image_url); // because basename() has a bug when processes Asian characters like Chinese
+ $criteria = new Criteria('image_name', $image_name);
+ break;
+ case 'id' :
+ case 'image_id' :
+ $criteria = new Criteria('image_id', $value);
+ break;
+ case 'bbcode' :
+ $value = $myts->displayTarea($value, false, false, true, true, false);
+ $doc = new DOMDocument();
+ @$doc->loadHTML($value);
+ $tags = $doc->getElementsByTagName('img');
+ foreach ($tags as $tag) {
+ $image_url = $tag->getAttribute('src');
+ }
+ $image_name = basename($image_url); // IN PROGRESS
+ $image_name = preg_replace('/^.+[\\\\\\/]/', '', $image_url); // because basename() has a bug when processes Asian characters like Chinese
+ $criteria = new Criteria('image_name', $image_name);
+ break;
+ }
+ $imagesObjs = $image_handler->getObjects($criteria, false, false);
+ if (count($imagesObjs) == 1) {
+ $imageObj = $imagesObjs[0];
+ $this->setDefaultImageId($imageObj->getVar('image_id'));
+ $this->setDefaultImgcatId($imageObj->getVar('imgcat_id'));
+ }
+ }
+ }
+
+
+
+ /**
+ * get return mode
+ *
+ * @return string
+ */
+ function getReturn()
+ {
+ return $this->_return;
+ }
+ /**
+ * set return mode
+ *
+ * @return string
+ */
+ function setReturn($return)
+ {
+ $this->_return = $return;
+ }
+
+
+
+ /**
+ * Set initial content
+ *
+ * @param $value string
+ */
+ function setValue($value)
+ {
+ $this->_value = $value;
+ }
+ /**
+ * Get initial content
+ *
+ * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat
+ * @return string
+ */
+ function getValue($encode = false)
+ {
+ return $encode ? htmlspecialchars($this->_value) : $this->_value;
+ }
+
+
+
+ /**
+ * Set initial content
+ *
+ * @param $value string
+ */
+ function setDefaultImageId($image_id)
+ {
+ $this->_image_id = $image_id;
+ }
+ /**
+ * Get image_id
+ *
+ * @return int
+ */
+ function getDefaultImageId()
+ {
+ return $this->_image_id;
+ }
+
+
+
+ /**
+ * Set initial content
+ *
+ * @param $value string
+ */
+ function setDefaultImgcatId($imgcat_id)
+ {
+ $this->_imgcat_id = $imgcat_id;
+ }
+ /**
+ * Get imgcat_id
+ *
+ * @return int
+ */
+ function getDefaultImgcatId()
+ {
+ return $this->_imgcat_id;
+ }
+
+
+
+ /**
+ * prepare HTML for output
+ *
+ * @return sting HTML
+ */
+ function render()
+ {
+ global $xoopsConfig, $xoopsUser;
+ static $commonJsIncluded = false;
+
+ $myts = MyTextSanitizer::getInstance();
+
+ if ( file_exists( XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/images/lightbox-btn-close.gif' ) ) {
+ $xoops_language = $xoopsConfig['language'];
+ } else {
+ $xoops_language = 'english';
+ }
+
+ $commonJs = '
+ var ajaxloader = new Array();
+ var selected_imgcat_id = new Array();
+ var selected_image_id = new Array();
+ var returnType = new Array();
+ //var $xoopsJQuery = jQuery.noConflict();
+ function getImgcatImagesList(name, imgcat_id) {
+ $("div#" + name + "_container").empty();
+ ajaxloader[name] = new ajax...
[truncated message content] |
|
From: <luc...@us...> - 2014-02-18 19:18:52
|
Revision: 12323
http://sourceforge.net/p/xoops/svn/12323
Author: luciorota
Date: 2014-02-18 19:18:49 +0000 (Tue, 18 Feb 2014)
Log Message:
-----------
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7_luciorota/
|
|
From: <luc...@us...> - 2014-02-17 17:27:20
|
Revision: 12322
http://sourceforge.net/p/xoops/svn/12322
Author: luciorota
Date: 2014-02-17 17:27:16 +0000 (Mon, 17 Feb 2014)
Log Message:
-----------
fixed: popup image manager and system module image manager save images in different directory
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/imagemanager.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/imagemanager.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/imagemanager.php 2014-02-17 10:23:15 UTC (rev 12321)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/imagemanager.php 2014-02-17 17:27:16 UTC (rev 12322)
@@ -209,7 +209,7 @@
xoops_footer();
exit();
}
- $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight'));
+ $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/images', array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight'));
$uploader->setPrefix('img');
if ($uploader->fetchMedia($xoops_upload_file[0])) {
if (!$uploader->upload()) {
@@ -217,7 +217,7 @@
} else {
$image_handler =& xoops_gethandler('image');
$image =& $image_handler->create();
- $image->setVar('image_name', $uploader->getSavedFileName());
+ $image->setVar('image_name', 'images/' . $uploader->getSavedFileName());
$image->setVar('image_nicename', $image_nicename);
$image->setVar('image_mimetype', $uploader->getMediaType());
$image->setVar('image_created', time());
|
|
From: <be...@us...> - 2014-02-17 10:23:22
|
Revision: 12321
http://sourceforge.net/p/xoops/svn/12321
Author: beckmi
Date: 2014-02-17 10:23:15 +0000 (Mon, 17 Feb 2014)
Log Message:
-----------
extra escape for "e" in YESTERDAY definition in locale.php (madDan)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/locale.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 2014-02-16 09:02:54 UTC (rev 12320)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2014-02-17 10:23:15 UTC (rev 12321)
@@ -62,6 +62,7 @@
- added "title" to buttons in DHTML Editor (mamba)
- updated required PHP and XOOPS versions, module versions in modules (cesag/mamba)
- added xBootstrap theme (UI/UX Team: Angelo Roja, Bleekk, Heyula)
+- added extra escape for "e" in YESTERDAY definition in locale.php, which was added in PHP 5.4 (madDan)
Security fixes
- XSS issues reported by Mehdi Dadkhah (rgriffith)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/locale.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/locale.php 2014-02-16 09:02:54 UTC (rev 12320)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/locale.php 2014-02-17 10:23:15 UTC (rev 12321)
@@ -24,10 +24,10 @@
setlocale(LC_ALL, 'en_US');
-// !!IMPORTANT!! insert '\' before any char among reserved chars: "a","A","B","c","d","D","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","t","T","U","w","W","Y","y","z","Z"
+// !!IMPORTANT!! insert '\' before any char among reserved chars: "a","A","B","c","d","D","e","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","t","T","U","w","W","Y","y","z","Z"
// insert double '\' before 't','r','n'
define("_TODAY","\T\o\d\a\y G:i");
-define("_YESTERDAY","\Y\e\s\\t\e\\r\d\a\y G:i");
+define("_YESTERDAY","\Y\\e\s\\t\\e\\r\d\a\y G:i");
define("_MONTHDAY","n/j G:i");
define("_YEARMONTHDAY","Y/n/j G:i");
define("_ELAPSE","%s ago");
|
|
From: <luc...@us...> - 2014-02-16 09:02:57
|
Revision: 12320
http://sourceforge.net/p/xoops/svn/12320
Author: luciorota
Date: 2014-02-16 09:02:54 +0000 (Sun, 16 Feb 2014)
Log Message:
-----------
remove unused files
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php 2014-02-16 02:03:54 UTC (rev 12319)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php 2014-02-16 09:02:54 UTC (rev 12320)
@@ -1,151 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * WfdownloadsFormElementChoose Class
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author lucio <luc...@gm...>
- * @package Wfdownloads
- * @since 3.23
- * @version $Id:$
- */
-
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * Form element that ...
- */
-class WfdownloadsFormElementChoose extends XoopsFormElementTray
-{
- /**
- * XoopsFormDateTime::XoopsFormDateTime()
- *
- * @param formelement $formElement
- * @param mixed $arg $value: 2 or more chooseable values or $arg array('value'=>$value, 'name'=>$label)
- */
- function __construct($formElement)
- {
- $formElementName = $formElement->getName();
- $formElementCaption = $formElement->getCaption();
- $formElementDescription = $formElement->getDescription();
- // $i start from 1 because func_get_arg(0) is $formElement
- for ($i = 1; $i <= (func_num_args() - 1); $i++) {
- $arg = func_get_arg($i);
- if (is_array($arg)) {
- if(count($arg) == 0) {
- // empty array
- // NOP
- } elseif (count($arg) == 1) {
- // one dimension array
- reset($arg);
- $value = key($arg);
- $name = $arg[0];
- } else {
- // two or more dimensions array
- $value = isset($arg['value']) ? $arg['value'] : $arg[0];
- $name = isset($arg['name']) ? $arg['name'] : $arg[1];
- }
- } else {
- $value = $arg;
- $name = $arg;
- }
- unset($arg);
-
- $tray = new XoopsFormElementTray ('', ' ', '');
- //$tray = new XoopsFormElementTray ('', '</td><td>', '');
- switch (get_class($formElement)) {
- case 'XoopsFormSelect' :
- if ($formElement->isMultiple()) {
-// IN PROGRESS XoopsFormSelect with $multiple argument true
- } else {
- $button = new XoopsFormButton('', "{$formElementName}_button_{$i}", constant("_BUTTON_{$i}"), 'button');
- $onclick = "onclick='javascript:document.getElementById(\"{$formElementName}\").value = \"{$value}\";'";
- $button->setExtra($onclick);
- $tray->addElement($button);
- $tray->addElement(new XoopsFormLabel ('', $name, "{$formElementName}_name_{$i}"));
- }
- $this->addElement($tray);
- unset($tray);
- unset($button);
- unset($onclick);
- break;
- case 'XoopsFormSelectUser' :
-// IN PROGRESS XoopsFormSelectUser with $multiple argument true
- $button = new XoopsFormButton('', "{$formElementName}_button_{$i}", constant("_BUTTON_{$i}"), 'button');
- $onclick = "onclick='javascript:document.getElementById(\"{$formElementName}\").value = \"{$value}\";'";
- $button->setExtra($onclick);
- $tray->addElement($button);
- $tray->addElement(new XoopsFormLabel ('', $name, "{$formElementName}_name_{$i}"));
- $this->addElement($tray);
- unset($tray);
- unset($button);
- unset($onclick);
- break;
- case 'XoopsFormDateTime' :
- $value = intval($value);
- $value = ($value > 0) ? $value : time();
- $datetime = getDate($value);
- if (is_string($value)) {
- $date = $value;
- $value = time();
- } else {
- $date = date(_SHORTDATESTRING, $value);
- }
- $time = $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10);
- $button = new XoopsFormButton('', "{$formElementName}_button_{$i}", constant("_BUTTON_{$i}"), 'button');
- $onclick = "onclick='javascript:";
- $onclick.= "document.getElementById(\"{$formElementName}[date]\").value = \"{$date}\";";
- $onclick.= "document.getElementById(\"{$formElementName}[time]\").value = \"{$time}\";";
- $onclick.= "'";
- $button->setExtra($onclick);
- $tray->addElement($button);
- $tray->addElement(new XoopsFormLabel ('', $name, "{$formElementName}_name_{$i}"));
- $this->addElement($tray);
- unset($tray);
- unset($button);
- unset($onclick);
- break;
- case 'XoopsFormText' :
- case 'XoopsFormTextArea' :
- case 'XoopsFormDhtmlTextArea' :
- default :
- $button = new XoopsFormButton('', "{$formElementName}_button_{$i}", constant("_BUTTON_{$i}"), 'button');
- $onclick = "onclick='javascript:document.getElementById(\"{$formElementName}\").value = \"{$value}\";'";
- $button->setExtra($onclick);
- $tray->addElement($button);
- $tray->addElement(new XoopsFormLabel ('', $name, "{$formElementName}_name_{$i}"));
- $this->addElement($tray);
- unset($tray);
- unset($button);
- unset($onclick);
- break;
- }
- }
- // set XoopsFormElementTray arguments
- $this->_delimeter = "<br />";
- $this->setCaption($formElementCaption);
- $this->setDescription($formElementDescription);
- $formElement->setCaption('');
- $formElement->setDescription('');
- $this->addElement($formElement);
- }
-
- /**
- * Render custom javascript get content code
- *
- * @seealso XoopsForm::renderGetContentJS
- */
- function renderGetContentJS()
- {
- $formElement->renderGetContentJS();
- }
-}
|
|
From: <be...@us...> - 2014-02-16 02:03:59
|
Revision: 12319
http://sourceforge.net/p/xoops/svn/12319
Author: beckmi
Date: 2014-02-16 02:03:54 +0000 (Sun, 16 Feb 2014)
Log Message:
-----------
Some PSR code formatting
Modified Paths:
--------------
XoopsModules/avaman/trunk/avaman/admin/about.php
XoopsModules/avaman/trunk/avaman/admin/admin_footer.php
XoopsModules/avaman/trunk/avaman/admin/admin_header.php
XoopsModules/avaman/trunk/avaman/admin/avatars.php
XoopsModules/avaman/trunk/avaman/admin/index.php
XoopsModules/avaman/trunk/avaman/admin/menu.php
XoopsModules/avaman/trunk/avaman/admin/smilies.php
XoopsModules/avaman/trunk/avaman/include/Archive_Zip.php
XoopsModules/avaman/trunk/avaman/include/gtickets.php
XoopsModules/avaman/trunk/avaman/language/english/admin.php
XoopsModules/avaman/trunk/avaman/language/english/modinfo.php
XoopsModules/avaman/trunk/avaman/xoops_version.php
Modified: XoopsModules/avaman/trunk/avaman/admin/about.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/about.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/about.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -29,4 +29,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include_once 'admin_footer.php';
\ No newline at end of file
+include_once 'admin_footer.php';
Modified: XoopsModules/avaman/trunk/avaman/admin/admin_footer.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/admin_footer.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/admin_footer.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -27,4 +27,4 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/avaman/trunk/avaman/admin/admin_header.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/admin_header.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/admin_header.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -39,8 +39,8 @@
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) {
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
- }else{
+ } else {
redirect_header("../../../admin.php", 5, _AM_AVAMAN_MODULEADMIN_MISSING, false);
- }
\ No newline at end of file
+ }
Modified: XoopsModules/avaman/trunk/avaman/admin/avatars.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/avatars.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/avatars.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -21,17 +21,16 @@
*/
$avaman_allowed_exts = array(
- 'gif' => 'image/gif' ,
- 'jpg' => 'image/jpeg' ,
- 'jpeg' => 'image/jpeg' ,
- 'png' => 'image/png' ,
+ 'gif' => 'image/gif' ,
+ 'jpg' => 'image/jpeg' ,
+ 'jpeg' => 'image/jpeg' ,
+ 'png' => 'image/png' ,
) ;
$realmyname = 'avatars.php' ;
+include_once '../../../include/cp_header.php' ;
-include_once( '../../../include/cp_header.php' ) ;
-
-include_once "../include/gtickets.php" ;
+include_once '../include/gtickets.php';
include_once 'admin_header.php';
$indexAdmin = new ModuleAdmin();
@@ -42,136 +41,124 @@
// POST Stage
//
-if( ! empty( $_POST['modify_avatars'] ) ) {
+if ( ! empty( $_POST['modify_avatars'] ) ) {
- // Ticket Check
- if ( ! $xoopsGTicket->check() ) {
- redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
- }
+ // Ticket Check
+ if ( ! $xoopsGTicket->check() ) {
+ redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
+ }
- // rename
- $avatar_ids = array() ;
- if( is_array( @$_POST['avatar_names'] ) ) {
- foreach( $_POST['avatar_names'] as $avatar_id => $avatar_name ) {
- $avatar_id = intval( $avatar_id ) ;
- $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_name='".$myts->addSlashes($avatar_name)."' WHERE avatar_id=".intval($avatar_id) ) ;
- $avatar_ids[] = $avatar_id ;
- }
- }
+ // rename
+ $avatar_ids = array() ;
+ if ( is_array( @$_POST['avatar_names'] ) ) {
+ foreach ($_POST['avatar_names'] as $avatar_id => $avatar_name) {
+ $avatar_id = intval( $avatar_id ) ;
+ $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_name='".$myts->addSlashes($avatar_name)."' WHERE avatar_id=".intval($avatar_id) ) ;
+ $avatar_ids[] = $avatar_id ;
+ }
+ }
- // display
- foreach( $avatar_ids as $avatar_id ) {
- if( empty( $_POST['avatar_displays'][$avatar_id] ) ) {
- $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_display=0 WHERE avatar_id=$avatar_id" ) ;
- } else {
- $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_display=1 WHERE avatar_id=$avatar_id" ) ;
- }
- }
+ // display
+ foreach ($avatar_ids as $avatar_id) {
+ if ( empty( $_POST['avatar_displays'][$avatar_id] ) ) {
+ $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_display=0 WHERE avatar_id=$avatar_id" ) ;
+ } else {
+ $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_display=1 WHERE avatar_id=$avatar_id" ) ;
+ }
+ }
- // weight
- foreach( $avatar_ids as $avatar_id ) {
- $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_weight='".intval(@$_POST['avatar_weights'][$avatar_id])."' WHERE avatar_id=$avatar_id" ) ;
- }
+ // weight
+ foreach ($avatar_ids as $avatar_id) {
+ $db->query( "UPDATE ".$db->prefix("avatar")." SET avatar_weight='".intval(@$_POST['avatar_weights'][$avatar_id])."' WHERE avatar_id=$avatar_id" ) ;
+ }
- // delete
- foreach( $avatar_ids as $avatar_id ) {
- if( ! empty( $_POST['avatar_deletes'][$avatar_id] ) ) {
- $result = $db->query( "SELECT a.avatar_file,COUNT(l.user_id) FROM ".$db->prefix("avatar")." a NATURAL LEFT JOIN ".$db->prefix("avatar_user_link")." l WHERE a.avatar_id=$avatar_id GROUP BY a.avatar_id" ) ;
- if( $result ) {
- list( $file , $users ) = $db->fetchRow( $result ) ;
- if( $users > 0 ) continue ;
- if( strstr( $file , '..' ) ) die( '.. found.' ) ;
- @unlink( XOOPS_UPLOAD_PATH . '/' . $file ) ;
- $db->query( "DELETE FROM ".$db->prefix("avatar")." WHERE avatar_id=$avatar_id" ) ;
- }
- }
- }
+ // delete
+ foreach ($avatar_ids as $avatar_id) {
+ if ( ! empty( $_POST['avatar_deletes'][$avatar_id] ) ) {
+ $result = $db->query( "SELECT a.avatar_file,COUNT(l.user_id) FROM ".$db->prefix("avatar")." a NATURAL LEFT JOIN ".$db->prefix("avatar_user_link")." l WHERE a.avatar_id=$avatar_id GROUP BY a.avatar_id" ) ;
+ if ($result) {
+ list( $file , $users ) = $db->fetchRow( $result ) ;
+ if( $users > 0 ) continue ;
+ if( strstr( $file , '..' ) ) die( '.. found.' ) ;
+ @unlink( XOOPS_UPLOAD_PATH . '/' . $file ) ;
+ $db->query( "DELETE FROM ".$db->prefix("avatar")." WHERE avatar_id=$avatar_id" ) ;
+ }
+ }
+ }
- redirect_header( $realmyname , 2 , _AM_AVAMAN_DBUPDATED ) ;
- exit ;
+ redirect_header( $realmyname , 2 , _AM_AVAMAN_DBUPDATED ) ;
+ exit ;
}
-
// ARCHIVE UPLOAD
-if( ! empty( $_FILES['upload_archive']['tmp_name'] ) && is_uploaded_file( $_FILES['upload_archive']['tmp_name'] ) ) {
+if ( ! empty( $_FILES['upload_archive']['tmp_name'] ) && is_uploaded_file( $_FILES['upload_archive']['tmp_name'] ) ) {
- // extract stage
- $orig_filename4check = strtolower( $_FILES['upload_archive']['name'] ) ;
- $orig_ext4check = substr( $orig_filename4check , strrpos( $orig_filename4check , '.' ) + 1 ) ;
- if( $orig_ext4check == 'zip' ) {
-
- // zip
- include_once dirname(dirname(__FILE__)).'/include/Archive_Zip.php' ;
- $reader = new Archive_Zip( $_FILES['upload_archive']['tmp_name'] ) ;
- $files = $reader->extract( array( 'extract_as_string' => true ) ) ;
- if( ! is_array( @$files ) ) die( $reader->errorName() ) ;
-
- } else if( $orig_ext4check == 'tar' || $orig_ext4check == 'tgz' || $orig_ext4check == 'gz' ) {
-
- // tar or tgz or tar.gz
- include_once XOOPS_ROOT_PATH.'/class/class.tar.php' ;
- $tar = new tar() ;
- $tar->openTar( $_FILES['upload_archive']['tmp_name'] ) ;
- $files = array() ;
- foreach( $tar->files as $id => $info ) {
- $files[] = array(
- 'filename' => $info['name'] ,
- 'mtime' => $info['time'] ,
- 'content' => $info['file'] ,
- ) ;
- }
- if( empty( $files ) ) die( _AM_AVAMAN_ERR_INVALIDARCHIVE ) ;
+ // extract stage
+ $orig_filename4check = strtolower( $_FILES['upload_archive']['name'] ) ;
+ $orig_ext4check = substr( $orig_filename4check , strrpos( $orig_filename4check , '.' ) + 1 ) ;
+ if ($orig_ext4check == 'zip') {
- } else if( ! empty( $avaman_allowed_exts[$orig_ext4check] ) ) {
-
- // a single image file
- $files = array() ;
- $files[] = array(
- 'filename' => $_FILES['upload_archive']['name'] ,
- 'mtime' => time() ,
- 'content' => function_exists( 'file_get_contents' ) ? file_get_contents( $_FILES['upload_archive']['tmp_name'] ) : implode( file( $_FILES['upload_archive']['tmp_name'] ) ) ,
- ) ;
- } else {
- die( _AM_AVAMAN_INVALIDEXT ) ;
- }
+ // zip
+ include_once dirname(dirname(__FILE__)).'/include/Archive_Zip.php' ;
+ $reader = new Archive_Zip( $_FILES['upload_archive']['tmp_name'] ) ;
+ $files = $reader->extract( array( 'extract_as_string' => true ) ) ;
+ if( ! is_array( @$files ) ) die( $reader->errorName() ) ;
- // import stage
- $imported = 0 ;
- foreach( $files as $file ) {
-
- if( ! empty( $file['folder'] ) ) continue ;
- $file_pos = strrpos( $file['filename'] , '/' ) ;
- $file_name = $file_pos === false ? $file['filename'] : substr( $file['filename'] , $file_pos + 1 ) ;
- $ext_pos = strrpos( $file_name , '.' ) ;
- if( $ext_pos === false ) continue ;
- $ext = strtolower( substr( $file_name , $ext_pos + 1 ) ) ;
- if( empty( $avaman_allowed_exts[$ext] ) ) continue ;
- $file_node = substr( $file_name , 0 , $ext_pos ) ;
- $save_file_name = uniqid( 'savt' ) . '.' . $ext ;
- $fw = fopen( XOOPS_UPLOAD_PATH.'/'.$save_file_name , "w" ) ;
- if( ! $fw ) continue ;
- @fwrite( $fw , $file['content'] ) ;
- @fclose( $fw ) ;
- $db->query( "INSERT INTO ".$db->prefix("avatar")." SET avatar_file='".addslashes($save_file_name)."', avatar_name='".addslashes($file_node)."', avatar_mimetype='".addslashes(@$avaman_allowed_exts[$ext])."', avatar_created=UNIX_TIMESTAMP(), avatar_display=1, avatar_weight=0, avatar_type='S'" ) ;
+ } elseif ($orig_ext4check == 'tar' || $orig_ext4check == 'tgz' || $orig_ext4check == 'gz') {
- $imported ++ ;
- }
-
- redirect_header( $realmyname , 3 , sprintf( _AM_AVAMAN_FILEUPLOADED , $imported ) ) ;
- exit ;
-}
+ // tar or tgz or tar.gz
+ include_once XOOPS_ROOT_PATH.'/class/class.tar.php' ;
+ $tar = new tar() ;
+ $tar->openTar( $_FILES['upload_archive']['tmp_name'] ) ;
+ $files = array() ;
+ foreach ($tar->files as $id => $info) {
+ $files[] = array(
+ 'filename' => $info['name'] ,
+ 'mtime' => $info['time'] ,
+ 'content' => $info['file'] ,
+ ) ;
+ }
+ if( empty( $files ) ) die( _AM_AVAMAN_ERR_INVALIDARCHIVE ) ;
+ } elseif ( ! empty( $avaman_allowed_exts[$orig_ext4check] ) ) {
+ // a single image file
+ $files = array() ;
+ $files[] = array(
+ 'filename' => $_FILES['upload_archive']['name'] ,
+ 'mtime' => time() ,
+ 'content' => function_exists( 'file_get_contents' ) ? file_get_contents( $_FILES['upload_archive']['tmp_name'] ) : implode( file( $_FILES['upload_archive']['tmp_name'] ) ) ,
+ ) ;
+ } else {
+ die( _AM_AVAMAN_INVALIDEXT ) ;
+ }
+ // import stage
+ $imported = 0 ;
+ foreach ($files as $file) {
+ if( ! empty( $file['folder'] ) ) continue ;
+ $file_pos = strrpos( $file['filename'] , '/' ) ;
+ $file_name = $file_pos === false ? $file['filename'] : substr( $file['filename'] , $file_pos + 1 ) ;
+ $ext_pos = strrpos( $file_name , '.' ) ;
+ if( $ext_pos === false ) continue ;
+ $ext = strtolower( substr( $file_name , $ext_pos + 1 ) ) ;
+ if( empty( $avaman_allowed_exts[$ext] ) ) continue ;
+ $file_node = substr( $file_name , 0 , $ext_pos ) ;
+ $save_file_name = uniqid( 'savt' ) . '.' . $ext ;
+ $fw = fopen( XOOPS_UPLOAD_PATH.'/'.$save_file_name , "w" ) ;
+ if( ! $fw ) continue ;
+ @fwrite( $fw , $file['content'] ) ;
+ @fclose( $fw ) ;
+ $db->query( "INSERT INTO ".$db->prefix("avatar")." SET avatar_file='".addslashes($save_file_name)."', avatar_name='".addslashes($file_node)."', avatar_mimetype='".addslashes(@$avaman_allowed_exts[$ext])."', avatar_created=UNIX_TIMESTAMP(), avatar_display=1, avatar_weight=0, avatar_type='S'" ) ;
+ $imported ++ ;
+ }
+ redirect_header( $realmyname , 3 , sprintf( _AM_AVAMAN_FILEUPLOADED , $imported ) ) ;
+ exit ;
+}
-
-
-
-
-
// Form Stage
xoops_cp_header() ;
@@ -182,39 +169,39 @@
echo "
<form action='$realmyname' id='avaman_upload' method='post' enctype='multipart/form-data' class='odd'>
- <label for='upload_archive'>"._AM_AVAMAN_UPLOAD."</label>
- <br />
- <input type='file' id='upload_archive' name='upload_archive' size='60' />
- <input type='submit' value='"._SUBMIT."' />
+ <label for='upload_archive'>"._AM_AVAMAN_UPLOAD."</label>
+ <br />
+ <input type='file' id='upload_archive' name='upload_archive' size='60' />
+ <input type='submit' value='"._SUBMIT."' />
</form>
<form action='$realmyname' name='avaman_list' id='avaman_list' method='post'>
<table class='outer' id='avaman_main'>
- <tr>
- <th>"._AM_AVAMAN_TH_ID."</th>
- <th>"._AM_AVAMAN_TH_FILE."</th>
- <th>"._AM_AVAMAN_TH_AVATARNAME."</th>
- <th>"._AM_AVAMAN_TH_CREATED."</th>
- <th>"._AM_AVAMAN_TH_DISPLAY."</th>
- <th>"._AM_AVAMAN_TH_WEIGHT."</th>
- <th>"._AM_AVAMAN_TH_USERS."</th>
- <th>"._AM_AVAMAN_TH_DELETE."<input type='checkbox' name='selectall' onclick=\"with(document.avaman_list){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].disabled==false&&elements[i].name.indexOf('deletes')>=0){elements[i].checked=this.checked;}}}\" title='"._AM_AVAMAN_CB_SELECTALL."' /></th>
- </tr>\n" ;
+ <tr>
+ <th>"._AM_AVAMAN_TH_ID."</th>
+ <th>"._AM_AVAMAN_TH_FILE."</th>
+ <th>"._AM_AVAMAN_TH_AVATARNAME."</th>
+ <th>"._AM_AVAMAN_TH_CREATED."</th>
+ <th>"._AM_AVAMAN_TH_DISPLAY."</th>
+ <th>"._AM_AVAMAN_TH_WEIGHT."</th>
+ <th>"._AM_AVAMAN_TH_USERS."</th>
+ <th>"._AM_AVAMAN_TH_DELETE."<input type='checkbox' name='selectall' onclick=\"with(document.avaman_list){for (i=0;i<length;i++) {if(elements[i].type=='checkbox'&&elements[i].disabled==false&&elements[i].name.indexOf('deletes')>=0) {elements[i].checked=this.checked;}}}\" title='"._AM_AVAMAN_CB_SELECTALL."' /></th>
+ </tr>\n" ;
-while( list( $avatar_id , $avatar_file , $avatar_name , $avatar_created , $avatar_display , $avatar_weight , $avatar_users ) = $db->fetchRow( $result ) ) {
- $evenodd = @$evenodd == 'even' ? 'odd' : 'even' ;
- $delete_disabled = $avatar_users > 0 ? "disabled='disabled'" : "" ;
+while ( list( $avatar_id , $avatar_file , $avatar_name , $avatar_created , $avatar_display , $avatar_weight , $avatar_users ) = $db->fetchRow( $result ) ) {
+ $evenodd = @$evenodd == 'even' ? 'odd' : 'even' ;
+ $delete_disabled = $avatar_users > 0 ? "disabled='disabled'" : "" ;
- echo "
- <tr>
- <td class='$evenodd' align='center'>$avatar_id</td>
- <td class='$evenodd' align='center'><img src='".XOOPS_UPLOAD_URL.'/'.urlencode($avatar_file)."' alt='' /></td>
- <td class='$evenodd' align='center'><input type='text' size='24' name='avatar_names[$avatar_id]' value='".htmlspecialchars($avatar_name,ENT_QUOTES)."' /></td>
- <td class='$evenodd' align='center'> ".formatTimestamp($avatar_created)."</td>
- <td class='$evenodd' align='center'><input type='checkbox' name='avatar_displays[$avatar_id]' ".($avatar_display?"checked='checked'":"")." /></td>
- <td class='$evenodd' align='center'><input type='text' size='4' name='avatar_weights[$avatar_id]' value='$avatar_weight' style='text-align:right;' /></td>
- <td class='$evenodd' align='center'>".intval($avatar_users)."</td>
- <td class='$evenodd' align='center'><input type='checkbox' name='avatar_deletes[$avatar_id]' $delete_disabled /></td>
- </tr>\n" ;
+ echo "
+ <tr>
+ <td class='$evenodd' align='center'>$avatar_id</td>
+ <td class='$evenodd' align='center'><img src='".XOOPS_UPLOAD_URL.'/'.urlencode($avatar_file)."' alt='' /></td>
+ <td class='$evenodd' align='center'><input type='text' size='24' name='avatar_names[$avatar_id]' value='".htmlspecialchars($avatar_name,ENT_QUOTES)."' /></td>
+ <td class='$evenodd' align='center'> ".formatTimestamp($avatar_created)."</td>
+ <td class='$evenodd' align='center'><input type='checkbox' name='avatar_displays[$avatar_id]' ".($avatar_display?"checked='checked'":"")." /></td>
+ <td class='$evenodd' align='center'><input type='text' size='4' name='avatar_weights[$avatar_id]' value='$avatar_weight' style='text-align:right;' /></td>
+ <td class='$evenodd' align='center'>".intval($avatar_users)."</td>
+ <td class='$evenodd' align='center'><input type='checkbox' name='avatar_deletes[$avatar_id]' $delete_disabled /></td>
+ </tr>\n" ;
}
echo "
</table>
@@ -223,4 +210,4 @@
</form>
" ;
-include "admin_footer.php";
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/avaman/trunk/avaman/admin/index.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/index.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/index.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -24,9 +24,9 @@
include 'admin_header.php';
xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
+ $indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
-include "admin_footer.php";
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/avaman/trunk/avaman/admin/menu.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/menu.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/menu.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -20,7 +20,6 @@
* @version $Id $
*/
-
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
$path = dirname(dirname(dirname(dirname(__FILE__))));
@@ -33,7 +32,6 @@
$pathModuleAdmin = $module->getInfo('dirmoduleadmin');
$pathLanguage = $path . $pathModuleAdmin;
-
if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) {
$fileinc = $pathLanguage . '/language/english/main.php';
}
@@ -48,17 +46,17 @@
$adminmenu[$i]["link"] = 'admin/index.php';
$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_AVAMAN_AVATARMANAGER;
$adminmenu[$i]["link"] = 'admin/avatars.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/penguin.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_AVAMAN_SMILIESMANAGER;
$adminmenu[$i]["link"] = 'admin/smilies.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/face-smile.png';
-$i++;
+++$i;
$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT;
$adminmenu[$i]["link"] = 'admin/about.php';
-$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png';
\ No newline at end of file
+$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png';
Modified: XoopsModules/avaman/trunk/avaman/admin/smilies.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/admin/smilies.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/admin/smilies.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -21,20 +21,18 @@
*/
$avaman_allowed_exts = array(
- 'gif' => 'image/gif' ,
- 'jpg' => 'image/jpeg' ,
- 'jpeg' => 'image/jpeg' ,
- 'png' => 'image/png' ,
+ 'gif' => 'image/gif' ,
+ 'jpg' => 'image/jpeg' ,
+ 'jpeg' => 'image/jpeg' ,
+ 'png' => 'image/png' ,
) ;
$realmyname = 'smilies.php' ;
-
-include_once( '../../../include/cp_header.php' ) ;
-include_once "../include/gtickets.php" ;
+include_once '../../../include/cp_header.php' ;
+include_once '../include/gtickets.php';
include_once 'admin_header.php';
$indexAdmin = new ModuleAdmin();
-
$db =& XoopsDatabaseFactory::getDatabaseConnection();
$myts =& MyTextSanitizer::getInstance() ;
@@ -42,135 +40,123 @@
// POST Stage
//
-if( ! empty( $_POST['modify_smilies'] ) ) {
+if ( ! empty( $_POST['modify_smilies'] ) ) {
- // Ticket Check
- if ( ! $xoopsGTicket->check() ) {
- redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
- }
+ // Ticket Check
+ if ( ! $xoopsGTicket->check() ) {
+ redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
+ }
- // rename emotion
- $smiles_ids = array() ;
- if( is_array( @$_POST['emotions'] ) ) {
- foreach( $_POST['emotions'] as $smiles_id => $emotion ) {
- $smiles_id = intval( $smiles_id ) ;
- $db->query( "UPDATE ".$db->prefix("smiles")." SET emotion='".$myts->addSlashes($emotion)."' WHERE id=".intval($smiles_id) ) ;
- $smiles_ids[] = $smiles_id ;
- }
- }
+ // rename emotion
+ $smiles_ids = array() ;
+ if ( is_array( @$_POST['emotions'] ) ) {
+ foreach ($_POST['emotions'] as $smiles_id => $emotion) {
+ $smiles_id = intval( $smiles_id ) ;
+ $db->query( "UPDATE ".$db->prefix("smiles")." SET emotion='".$myts->addSlashes($emotion)."' WHERE id=".intval($smiles_id) ) ;
+ $smiles_ids[] = $smiles_id ;
+ }
+ }
- // code
- foreach( $smiles_ids as $smiles_id ) {
- $db->query( "UPDATE ".$db->prefix("smiles")." SET code='".$myts->addSlashes(@$_POST['codes'][$smiles_id])."' WHERE id=$smiles_id" ) ;
- }
+ // code
+ foreach ($smiles_ids as $smiles_id) {
+ $db->query( "UPDATE ".$db->prefix("smiles")." SET code='".$myts->addSlashes(@$_POST['codes'][$smiles_id])."' WHERE id=$smiles_id" ) ;
+ }
- // display
- foreach( $smiles_ids as $smiles_id ) {
- if( empty( $_POST['displays'][$smiles_id] ) ) {
- $db->query( "UPDATE ".$db->prefix("smiles")." SET display=0 WHERE id=$smiles_id" ) ;
- } else {
- $db->query( "UPDATE ".$db->prefix("smiles")." SET display=1 WHERE id=$smiles_id" ) ;
- }
- }
+ // display
+ foreach ($smiles_ids as $smiles_id) {
+ if ( empty( $_POST['displays'][$smiles_id] ) ) {
+ $db->query( "UPDATE ".$db->prefix("smiles")." SET display=0 WHERE id=$smiles_id" ) ;
+ } else {
+ $db->query( "UPDATE ".$db->prefix("smiles")." SET display=1 WHERE id=$smiles_id" ) ;
+ }
+ }
- // delete
- foreach( $smiles_ids as $smiles_id ) {
- if( ! empty( $_POST['deletes'][$smiles_id] ) ) {
- $result = $db->query( "SELECT smile_url FROM ".$db->prefix("smiles")." WHERE id=$smiles_id" ) ;
- if( $result ) {
- list( $file ) = $db->fetchRow( $result ) ;
- if( strstr( $file , '..' ) ) die( '.. found.' ) ;
- @unlink( XOOPS_UPLOAD_PATH . '/' . $file ) ;
- $db->query( "DELETE FROM ".$db->prefix("smiles")." WHERE id=$smiles_id" ) ;
- }
- }
- }
+ // delete
+ foreach ($smiles_ids as $smiles_id) {
+ if ( ! empty( $_POST['deletes'][$smiles_id] ) ) {
+ $result = $db->query( "SELECT smile_url FROM ".$db->prefix("smiles")." WHERE id=$smiles_id" ) ;
+ if ($result) {
+ list( $file ) = $db->fetchRow( $result ) ;
+ if( strstr( $file , '..' ) ) die( '.. found.' ) ;
+ @unlink( XOOPS_UPLOAD_PATH . '/' . $file ) ;
+ $db->query( "DELETE FROM ".$db->prefix("smiles")." WHERE id=$smiles_id" ) ;
+ }
+ }
+ }
- redirect_header( $realmyname , 2 , _AM_AVAMAN_DBUPDATED ) ;
- exit ;
+ redirect_header( $realmyname , 2 , _AM_AVAMAN_DBUPDATED ) ;
+ exit ;
}
-
// ARCHIVE UPLOAD
-if( ! empty( $_FILES['upload_archive']['tmp_name'] ) && is_uploaded_file( $_FILES['upload_archive']['tmp_name'] ) ) {
+if ( ! empty( $_FILES['upload_archive']['tmp_name'] ) && is_uploaded_file( $_FILES['upload_archive']['tmp_name'] ) ) {
- // extract stage
- $orig_filename4check = strtolower( $_FILES['upload_archive']['name'] ) ;
- $orig_ext4check = substr( $orig_filename4check , strrpos( $orig_filename4check , '.' ) + 1 ) ;
- if( $orig_ext4check == 'zip' ) {
-
- // zip
- include_once dirname(dirname(__FILE__)).'/include/Archive_Zip.php' ;
- $reader = new Archive_Zip( $_FILES['upload_archive']['tmp_name'] ) ;
- $files = $reader->extract( array( 'extract_as_string' => true ) ) ;
- if( ! is_array( @$files ) ) die( $reader->errorName() ) ;
-
- } else if( $orig_ext4check == 'tar' || $orig_ext4check == 'tgz' || $orig_ext4check == 'gz' ) {
-
- // tar or tgz or tar.gz
- include_once XOOPS_ROOT_PATH.'/class/class.tar.php' ;
- $tar = new tar() ;
- $tar->openTar( $_FILES['upload_archive']['tmp_name'] ) ;
- $files = array() ;
- foreach( $tar->files as $id => $info ) {
- $files[] = array(
- 'filename' => $info['name'] ,
- 'mtime' => $info['time'] ,
- 'content' => $info['file'] ,
- ) ;
- }
- if( empty( $files ) ) die( _AM_AVAMAN_ERR_INVALIDARCHIVE ) ;
+ // extract stage
+ $orig_filename4check = strtolower( $_FILES['upload_archive']['name'] ) ;
+ $orig_ext4check = substr( $orig_filename4check , strrpos( $orig_filename4check , '.' ) + 1 ) ;
+ if ($orig_ext4check == 'zip') {
- } else if( ! empty( $avaman_allowed_exts[$orig_ext4check] ) ) {
-
- // a single image file
- $files = array() ;
- $files[] = array(
- 'filename' => $_FILES['upload_archive']['name'] ,
- 'mtime' => time() ,
- 'content' => function_exists( 'file_get_contents' ) ? file_get_contents( $_FILES['upload_archive']['tmp_name'] ) : implode( file( $_FILES['upload_archive']['tmp_name'] ) ) ,
- ) ;
- } else {
- die( _AM_AVAMAN_INVALIDEXT ) ;
- }
+ // zip
+ include_once dirname(dirname(__FILE__)).'/include/Archive_Zip.php' ;
+ $reader = new Archive_Zip( $_FILES['upload_archive']['tmp_name'] ) ;
+ $files = $reader->extract( array( 'extract_as_string' => true ) ) ;
+ if( ! is_array( @$files ) ) die( $reader->errorName() ) ;
- // import stage
- $imported = 0 ;
- foreach( $files as $file ) {
-
- if( ! empty( $file['folder'] ) ) continue ;
- $file_pos = strrpos( $file['filename'] , '/' ) ;
- $file_name = $file_pos === false ? $file['filename'] : substr( $file['filename'] , $file_pos + 1 ) ;
- $ext_pos = strrpos( $file_name , '.' ) ;
- if( $ext_pos === false ) continue ;
- $ext = strtolower( substr( $file_name , $ext_pos + 1 ) ) ;
- if( empty( $avaman_allowed_exts[$ext] ) ) continue ;
- $file_node = substr( $file_name , 0 , $ext_pos ) ;
- $save_file_name = uniqid( 'smil' ) . '.' . $ext ;
- $fw = fopen( XOOPS_UPLOAD_PATH.'/'.$save_file_name , "w" ) ;
- if( ! $fw ) continue ;
- @fwrite( $fw , $file['content'] ) ;
- @fclose( $fw ) ;
- $db->query( "INSERT INTO ".$db->prefix("smiles")." SET smile_url='".addslashes($save_file_name)."', code='".addslashes(rawurldecode($file_node))."', display=0, emotion=''" ) ;
+ } elseif ($orig_ext4check == 'tar' || $orig_ext4check == 'tgz' || $orig_ext4check == 'gz') {
- $imported ++ ;
- }
-
- redirect_header( $realmyname , 3 , sprintf( _AM_AVAMAN_FILEUPLOADED , $imported ) ) ;
- exit ;
-}
+ // tar or tgz or tar.gz
+ include_once XOOPS_ROOT_PATH.'/class/class.tar.php' ;
+ $tar = new tar() ;
+ $tar->openTar( $_FILES['upload_archive']['tmp_name'] ) ;
+ $files = array() ;
+ foreach ($tar->files as $id => $info) {
+ $files[] = array(
+ 'filename' => $info['name'] ,
+ 'mtime' => $info['time'] ,
+ 'content' => $info['file'] ,
+ ) ;
+ }
+ if( empty( $files ) ) die( _AM_AVAMAN_ERR_INVALIDARCHIVE ) ;
+ } elseif ( ! empty( $avaman_allowed_exts[$orig_ext4check] ) ) {
+ // a single image file
+ $files = array() ;
+ $files[] = array(
+ 'filename' => $_FILES['upload_archive']['name'] ,
+ 'mtime' => time() ,
+ 'content' => function_exists( 'file_get_contents' ) ? file_get_contents( $_FILES['upload_archive']['tmp_name'] ) : implode( file( $_FILES['upload_archive']['tmp_name'] ) ) ,
+ ) ;
+ } else {
+ die( _AM_AVAMAN_INVALIDEXT ) ;
+ }
+ // import stage
+ $imported = 0 ;
+ foreach ($files as $file) {
+ if( ! empty( $file['folder'] ) ) continue ;
+ $file_pos = strrpos( $file['filename'] , '/' ) ;
+ $file_name = $file_pos === false ? $file['filename'] : substr( $file['filename'] , $file_pos + 1 ) ;
+ $ext_pos = strrpos( $file_name , '.' ) ;
+ if( $ext_pos === false ) continue ;
+ $ext = strtolower( substr( $file_name , $ext_pos + 1 ) ) ;
+ if( empty( $avaman_allowed_exts[$ext] ) ) continue ;
+ $file_node = substr( $file_name , 0 , $ext_pos ) ;
+ $save_file_name = uniqid( 'smil' ) . '.' . $ext ;
+ $fw = fopen( XOOPS_UPLOAD_PATH.'/'.$save_file_name , "w" ) ;
+ if( ! $fw ) continue ;
+ @fwrite( $fw , $file['content'] ) ;
+ @fclose( $fw ) ;
+ $db->query( "INSERT INTO ".$db->prefix("smiles")." SET smile_url='".addslashes($save_file_name)."', code='".addslashes(rawurldecode($file_node))."', display=0, emotion=''" ) ;
+ $imported ++ ;
+ }
+ redirect_header( $realmyname , 3 , sprintf( _AM_AVAMAN_FILEUPLOADED , $imported ) ) ;
+ exit ;
+}
-
-
-
-
-
// Form Stage
xoops_cp_header() ;
echo $indexAdmin->addNavigation('smilies.php');
@@ -182,34 +168,34 @@
echo "
<form action='$realmyname' id='avaman_upload' method='post' enctype='multipart/form-data' class='odd'>
- <label for='upload_archive'>"._AM_AVAMAN_UPLOAD."</label>
- <br />
- <input type='file' id='upload_archive' name='upload_archive' size='60' />
- <input type='submit' value='"._SUBMIT."' />
+ <label for='upload_archive'>"._AM_AVAMAN_UPLOAD."</label>
+ <br />
+ <input type='file' id='upload_archive' name='upload_archive' size='60' />
+ <input type='submit' value='"._SUBMIT."' />
</form>
<form action='$realmyname' name='avaman_list' id='avaman_list' method='post'>
<table class='outer' id='avaman_main'>
- <tr>
- <th>"._AM_AVAMAN_TH_ID."</th>
- <th>"._AM_AVAMAN_TH_FILE."</th>
- <th>"._AM_AVAMAN_TH_CODE."</th>
- <th>"._AM_AVAMAN_TH_EMOTION."</th>
- <th>"._AM_AVAMAN_TH_SMILEDISPLAY."</th>
- <th>"._AM_AVAMAN_TH_DELETE."<input type='checkbox' name='selectall' onclick=\"with(document.avaman_list){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].disabled==false&&elements[i].name.indexOf('deletes')>=0){elements[i].checked=this.checked;}}}\" title='"._AM_AVAMAN_CB_SELECTALL."' /></th>
- </tr>\n" ;
+ <tr>
+ <th>"._AM_AVAMAN_TH_ID."</th>
+ <th>"._AM_AVAMAN_TH_FILE."</th>
+ <th>"._AM_AVAMAN_TH_CODE."</th>
+ <th>"._AM_AVAMAN_TH_EMOTION."</th>
+ <th>"._AM_AVAMAN_TH_SMILEDISPLAY."</th>
+ <th>"._AM_AVAMAN_TH_DELETE."<input type='checkbox' name='selectall' onclick=\"with(document.avaman_list){for (i=0;i<length;i++) {if(elements[i].type=='checkbox'&&elements[i].disabled==false&&elements[i].name.indexOf('deletes')>=0) {elements[i].checked=this.checked;}}}\" title='"._AM_AVAMAN_CB_SELECTALL."' /></th>
+ </tr>\n" ;
-while( list( $smiles_id , $code , $file , $emotion , $display ) = $db->fetchRow( $result ) ) {
- $evenodd = @$evenodd == 'even' ? 'odd' : 'even' ;
+while ( list( $smiles_id , $code , $file , $emotion , $display ) = $db->fetchRow( $result ) ) {
+ $evenodd = @$evenodd == 'even' ? 'odd' : 'even' ;
- echo "
- <tr>
- <td class='$evenodd' align='center'>$smiles_id</td>
- <td class='$evenodd' align='center'><img src='".XOOPS_UPLOAD_URL.'/'.$file."' alt='' /></td>
- <td class='$evenodd' align='center'><input type='text' size='12' name='codes[$smiles_id]' value='".htmlspecialchars($code,ENT_QUOTES)."' /></td>
- <td class='$evenodd' align='center'><input type='text' size='24' name='emotions[$smiles_id]' value='".htmlspecialchars($emotion,ENT_QUOTES)."' /></td>
- <td class='$evenodd' align='center'><input type='checkbox' name='displays[$smiles_id]' ".($display?"checked='checked'":"")." /></td>
- <td class='$evenodd' align='center'><input type='checkbox' name='deletes[$smiles_id]' /></td>
- </tr>\n" ;
+ echo "
+ <tr>
+ <td class='$evenodd' align='center'>$smiles_id</td>
+ <td class='$evenodd' align='center'><img src='".XOOPS_UPLOAD_URL.'/'.$file."' alt='' /></td>
+ <td class='$evenodd' align='center'><input type='text' size='12' name='codes[$smiles_id]' value='".htmlspecialchars($code,ENT_QUOTES)."' /></td>
+ <td class='$evenodd' align='center'><input type='text' size='24' name='emotions[$smiles_id]' value='".htmlspecialchars($emotion,ENT_QUOTES)."' /></td>
+ <td class='$evenodd' align='center'><input type='checkbox' name='displays[$smiles_id]' ".($display?"checked='checked'":"")." /></td>
+ <td class='$evenodd' align='center'><input type='checkbox' name='deletes[$smiles_id]' /></td>
+ </tr>\n" ;
}
echo "
</table>
@@ -218,4 +204,4 @@
</form>
" ;
-include "admin_footer.php";
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/avaman/trunk/avaman/include/Archive_Zip.php
===================================================================
--- XoopsModules/avaman/trunk/avaman/include/Archive_Zip.php 2014-02-15 22:59:32 UTC (rev 12318)
+++ XoopsModules/avaman/trunk/avaman/include/Archive_Zip.php 2014-02-16 02:03:54 UTC (rev 12319)
@@ -85,8 +85,6 @@
define('ARCHIVE_ZIP_PARAM_PRE_ADD', 'callback_pre_add' );
define('ARCHIVE_ZIP_PARAM_POST_ADD', 'callback_post_add' );
-
-
/**
* Class for manipulating zip archive files
*
@@ -145,6 +143,7 @@
die("The extension 'zlib' couldn't be found.\n".
"Please make sure your version of PHP was built ".
"with 'zlib' support.\n");
+
return false;
}
@@ -159,10 +158,10 @@
// {{{ create()
/**
* This method creates a Zip Archive with the filename set with
- * the constructor.
- * The files and directories indicated in $p_filelist
+ * the constructor.
+ * The files and directories indicated in $p_filelist
* are added in the archive.
- * When a directory is in the list, the directory and its content is added
+ * When a directory is in the list, the directory and its content is added
* in the archive.
* The methods takes a variable list of parameters in $p_params.
* The supported parameters for this method are :
@@ -177,7 +176,7 @@
* by a comma, or an array of filenames.
* @param mixed $p_params An array of variable parameters and values.
* @return mixed An array of file description on success,
- * an error code on error
+ * an error code on error
*/
function create($p_filelist, $p_params=0)
{
@@ -185,15 +184,15 @@
// ----- Set default values
if ($p_params === 0) {
- $p_params = array();
+ $p_params = array();
}
if ($this->_check_parameters($p_params,
- array('no_compression' => false,
- 'add_path' => "",
- 'remove_path' => "",
- 'remove_all_path' => false)) != 1) {
- return 0;
- }
+ array('no_compression' => false,
+ 'add_path' => "",
+ 'remove_path' => "",
+ 'remove_all_path' => false)) != 1) {
+ return 0;
+ }
// ----- Look if the $p_filelist is really an array
$p_result_list = array();
@@ -212,7 +211,7 @@
// ----- Invalid variable
else {
$this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER,
- 'Invalid variable type p_filelist');
+ 'Invalid variable type p_filelist');
$v_result = ARCHIVE_ZIP_ERR_INVALID_PARAMETER;
}
@@ -228,8 +227,8 @@
/**
* This method add files or directory in an existing Zip Archive.
* If the Zip Archive does not exist it is created.
- * The files and directories to add are indicated in $p_filelist.
- * When a directory is in the list, the directory and its content is added
+ * The files and directories to add are indicated in $p_filelist.
+ * When a directory is in the list, the directory and its content is added
* in the archive.
* The methods takes a variable list of parameters in $p_params.
* The supported parameters for this method are :
@@ -248,7 +247,7 @@
* by a comma, or an array of filenames.
* @param mixed $p_params An array of variable parameters and values.
* @return mixed An array of file description on success,
- * 0 on an unrecoverable failure, an error code is logged.
+ * 0 on an unrecoverable failure, an error code is logged.
*/
function add($p_filelist, $p_params=0)
{
@@ -256,17 +255,17 @@
// ----- Set default values
if ($p_params === 0) {
- $p_params = array();
+ $p_params = array();
}
if ($this->_check_parameters($p_params,
- array ('no_compression' => false,
- 'add_path' => '',
- 'remove_path' => '',
- 'remove_all_path' => false,
- 'callback_pre_add' => '',
- 'callback_post_add' => '')) != 1) {
- return 0;
- }
+ array ('no_compression' => false,
+ 'add_path' => '',
+ 'remove_path' => '',
+ 'remove_all_path' => false,
+ 'callback_pre_add' => '',
+ 'callback_post_add' => '')) != 1) {
+ return 0;
+ }
// ----- Look if the $p_filelist is really an array
$p_result_list = array();
@@ -287,7 +286,7 @@
// ----- Invalid variable
else {
$this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER,
- "add() : Invalid variable type p_filelist");
+ "add() : Invalid variable type p_filelist");
$v_result = ARCHIVE_ZIP_ERR_INVALID_PARAMETER;
}
@@ -303,11 +302,11 @@
// {{{ listContent()
/**
* This method gives the names and properties of the files and directories
- * which are present in the zip archive.
+ * which are present in the zip archive.
* The properties of each entries in the list are :
* filename : Name of the file.
- * For create() or add() it's the filename given by the user.
- * For an extract() it's the filename of the extracted file.
+ * For create() or add() it's the filename given by the user.
+ * For an extract() it's the filename of the extracted file.
* stored_filename : Name of the file / directory stored in the archive.
* size : Size of the stored file.
* compressed_size : Size of the file's data compressed in the archive
@@ -322,27 +321,27 @@
* filtered : the file/dir was not extracted (filtered by user)
* already_a_directory : the file can't be extracted because a
* directory with the same name already
- * exists
+ * exists
* write_protected : the file can't be extracted because a file
* with the same name already exists and is
* write protected
* newer_exist : the file was not extracted because a newer
- * file already exists
+ * file already exists
* path_creation_fail : the file is not extracted because the
- * folder does not exists and can't be
- * created
+ * folder does not exists and can't be
+ * created
* write_error : the file was not extracted because there was a
* error while writing the file
* read_error : the file was not extracted because there was a
- * error while reading the file
+ * error while reading the file
* invalid_header : the file was not extracted because of an
- * archive format error (bad file header)
+ * archive format error (bad file header)
* Note that each time a method can continue operating when there
* is an error on a single file, the error is only logged in the file status.
*
* @access public
* @return mixed An array of file description on success,
- * 0 on an unrecoverable failure, an error code is logged.
+ * 0 on an unrecoverable failure, an error code is logged.
*/
function listContent()
{
@@ -356,6 +355,7 @@
$v_list = array();
if ($this->_list($v_list) != 1) {
unset($v_list);
+
return(0);
}
@@ -370,11 +370,11 @@
* feature (extract by name, by index, by ereg, by preg). The extraction
* can occur in the current path or an other path.
* All the advanced features are activated by the use of variable
- * parameters.
- * The return value is an array of entry descriptions which gives
- * information on extracted files (See listContent()).
- * The method may return a success value (an array) even if some files
- * are not correctly extracted (see the file status in listContent()).
+ * parameters.
+ * The return value is an array of entry descriptions which gives
+ * information on extracted files (See listContent()).
+ * The method may return a success value (an array) even if some files
+ * are not correctly extracted (see the file status in listContent()).
* The supported variable parameters for this method are :
* 'add_path' : Path where the files and directories are to be extracted
* 'remove_path' : First part ('root' part) of the memorized path
@@ -399,7 +399,7 @@
* @access public
* @param mixed $p_params An array of variable parameters and values.
* @return mixed An array of file description on success,
- * 0 on an unrecoverable failure, an error code is logged.
+ * 0 on an unrecoverable failure, an error code is logged.
*/
function extract($p_params=0)
{
@@ -413,27 +413,28 @@
// ----- Set default values
if ($p_params === 0) {
- $p_params = array();
+ $p_params = array();
}
if ($this->_check_parameters($p_params,
- array ('extract_as_string' => false,
- 'add_path' => '',
- 'remove_path' => '',
- 'remove_all_path' => false,
- 'callback_pre_extract' => '',
- 'callback_post_extract' => '',
- 'set_chmod' => 0,
- 'by_name' => '',
- 'by_index' => '',
- 'by_ereg' => '',
- 'by_preg' => '') ) != 1) {
- return 0;
- }
+ array ('extract_as_string' => false,
+ 'add_path' => '',
+ 'remove_path' => '',
+ 'remove_all_path' => false,
+ 'callback_pre_extract' => '',
+ 'callback_post_extract' => '',
+ 'set_chmod' => 0,
+ 'by_name' => '',
+ 'by_index' => '',
+ 'by_ereg' => '',
+ 'by_preg' => '') ) != 1) {
+ return 0;
+ }
// ----- Call the extracting fct
$v_list = array();
if ($this->_extractByRule($v_list, $p_params) != 1) {
unset($v_list);
+
return(0);
}
@@ -441,7 +442,6 @@
}
// }}}
-
// {{{ delete()
/**
* This methods delete archive entries in the zip archive.
@@ -462,7 +462,7 @@
* @access public
* @param mixed $p_params An array of variable parameters and values.
* @return mixed An array of file description on success,
- * 0 on an unrecoverable failure, an error code is logged.
+ * 0 on an unrecoverable failure, an error code is logged.
*/
function delete($p_params)
{
@@ -475,12 +475,12 @@
// ----- Set default values
if ($this->_check_parameters($p_params,
- array ('by_name' => '',
- 'by_index' => '',
- 'by_ereg' => '',
- 'by_preg' => '') ) != 1) {
- return 0;
- }
+ array ('by_name' => '',
+ 'by_index' => '',
+ 'by_ereg' => '',
+ 'by_preg' => '') ) != 1) {
+ return 0;
+ }
// ----- Check that at least one rule is set
if ( ($p_params['by_name'] == '')
@@ -488,8 +488,9 @@
&& ($p_params['by_ereg'] == '')
&& ($p_params['by_preg'] == '')) {
$this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER,
- 'At least one filtering rule must'
- .' be set as parameter');
+ 'At least one filtering rule must'
+ .' be set as parameter');
+
return 0;
}
@@ -497,6 +498,7 @@
$v_list = array();
if ($this->_deleteByRule($v_list, $p_params) != 1) {
unset($v_list);
+
return(0);
}
@@ -536,8 +538,9 @@
// ----- Open the zip file
if (($this->_zip_fd = @fopen($this->_zipname, 'rb')) == 0) {
$this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL,
- 'Unable to open archive \''.$this->_zipname
- .'\' in binary read mode');
+ 'Unable to open archive \''.$this->_zipname
+ .'\' in binary read mode');
+
return 0;
}
@@ -559,16 +562,15 @@
}
// }}}
-
// {{{ duplicate()
/**
* This method creates an archive by copying the content of an other one.
- * If the archive already exist, it is replaced by the new one without
- * any warning.
+ * If the archive already exist, it is replaced by the new one without
+ * any warning.
*
* @access public
* @param mixed $p_archive It can be a valid Archive_Zip object or
- * the filename of a valid zip archive.
+ * the filename of a valid zip archive.
* @return integer 1 on success, 0 on failure.
*/
function duplicate($p_archive)
@@ -577,7 +579,7 @@
// ----- Look if the $p_archive is a Archive_Zip object
if ( (is_object($p_archive))
- && (strtolower(get_class($p_archive)) == 'archive_zip')) {
+ && (strtolower(get_class($p_archive)) == 'archive_zip')) {
$v_result = $this->_duplicate($p_archive->_zipname);
}
@@ -587,10 +589,9 @@
// TBC : Should also check the archive format
if (!is_file($p_archive)) {
$this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE,
- "No file with filename '".$p_archive."'");
+ "No file with filename '".$p_archive."'");
$v_result = ARCHIVE_ZIP_ERR_MISSING_FILE;
- }
- else {
+ } else {
$v_result = $this->_duplicate($p_archive);
}
}
@@ -598,7 +599,7 @@
// ----- Invalid variable
else {
$this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER,
- "Invalid variable type p_archive_to_add");
+ "Invalid variable type p_archive_to_add");
$v_result = ARCHIVE_ZIP_ERR_INVALID_PARAMETER;
}
@@ -609,13 +610,13 @@
// {{{ merge()
/**
* This method merge a valid zip archive at the end of the
- * archive identified by the Archive_Zip object.
+ * archive identified by the Archive_Zip object.
* If the archive ($this) does not exist, the merge becomes a duplicate.
* If the archive to add does not exist, the merge is a success.
*
* @access public
* @param mixed $p_archive_to_add It can be a valid Archive_Zip object or
- * the filename of a valid zip archive.
+ * the filename of a valid zip archive.
* @return integer 1 on success, 0 on failure.
*/
function merge($p_archive_to_add)
@@ -630,7 +631,7 @@
// ----- Look if the $p_archive_to_add is a Archive_Zip object
if ( (is_object($p_archive_to_add))
- && (strtolower(get_class($p_archive_to_add)) == 'archive_zip')) {
+ && (strtolower(get_class($p_archive_to_add)) == 'archive_zip')) {
$v_result = $this->_merge($p_archive_to_add);
}
@@ -646,7 +647,7 @@
// ----- Invalid variable
else {
$this->_errorLog(ARCHIVE_ZIP_ERR_INVALID_PARAMETER,
- "Invalid variable type p_archive_to_add");
+ "Invalid variable type p_archive_to_add");
$v_result = ARCHIVE_ZIP_ERR_INVALID_PARAMETER;
}
@@ -678,29 +679,27 @@
function errorName($p_with_code=false)
{
$v_const_list = get_defined_constants();
-
- // ----- Extract error constants from all const.
+
+ // ----- Extract error constants from all const.
for (reset($v_const_list);
- list($v_key, $v_value) = each($v_const_list);) {
- if (substr($v_key, 0, strlen('ARCHIVE_ZIP_ERR_'))
- =='ARCHIVE_ZIP_ERR_') {
- $v_error_list[$v_key] = $v_value;
- }
+ list($v_key, $v_value) = each($v_const_list);) {
+ if (substr($v_key, 0, strlen('ARCHIVE_ZIP_ERR_'))
+ =='ARCHIVE_ZIP_ERR_') {
+ $v_error_list[$v_key] = $v_value;
+ }
}
-
+
// ----- Search the name form the code value
$v_key=array_search($this->_error_code, $v_error_list, true);
- if ($v_key!=false) {
+ if ($v_key!=false) {
$v_value = $v_key;
- }
- else {
+ } else {
$v_value = 'NoName';
- }
-
+ }
+
if ($p_with_code) {
return($v_value.' ('.$this->_error_code.')');
- }
- else {
+ } else {
return($v_value);
}
}
@@ -721,14 +720,12 @@
{
if ($p_full) {
return($this->errorName(true)." : ".$this->_error_string);
- }
- else {
+ } else {
return($this->_error_string." [code ".$this->_error_code."]");
}
}
// }}}
-
// -----------------------------------------------------------------------------
// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
// ***** *****
@@ -767,7 +764,8 @@
if (!is_file($this->_zipname)) {
// ----- Error log
$this->_errorLog(ARCHIVE_ZIP_ERR_MISSING_FILE,
- "Missing archive file '".$this->_zipname."'");
+ "Missing archive file '".$this->_zipname."'");
+
return(false);
}
@@ -775,7 +773,8 @@
if (!is_readable($this->_zipname)) {
// ----- Error log
$this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL,
- "Unable to read archive '".$this->_zipname."'");
+ "Unable to read archive '".$this->_zipname."'");
+
return(false);
}
@@ -810,13 +809,12 @@
$v_result=1;
$v_list_detail = array();
- $p_add_dir = $p_params['add_path'];
- $p_remove_dir = $p_params['remove_path'];
- $p_remove_all_dir = $p_params['remove_all_path'];
+ $p_add_dir = $p_params['add_path'];
+ $p_remove_dir = $p_params['remove_path'];
+ $p_remove_all_dir = $p_params['remove_all_path'];
// ----- Open the file in write mode
- if (($v_result = $this->_openFd('wb')) != 1)
- {
+ if (($v_result = $this->_openFd('wb')) != 1) {
// ----- Return
return $v_result;
}
@@ -849,13 +847,14 @@
$v_result=1;
$v_list_detail = array();
- $p_add_dir = $p_params['add_path'];
- $p_remove_dir = $p_params['remove_path'];
- $p_remove_all_dir = $p_params['remove_all_path'];
+ $p_add_dir = $p_params['add_path'];
+ $p_remove_dir = $p_params['remove_path'];
+ $p_remove_all_dir = $p_params['remove_all_path'];
// ----- Look if the archive exists or is empty and need to be created
if ((!is_file($this->_zipname)) || (filesize($this->_zipname) == 0)) {
$v_result = $this->_create($p_list, $p_result_list, $p_params);
+
return $v_result;
}
@@ -866,9 +865,9 @@
// ----- Read the central directory informations
$v_central_dir = array();
- if (($v_result = $this->_readEndCentralDir($v_central_dir)) != 1)
- {
+ if (($v_result = $this->_readEndCentralDir($v_central_dir)) != 1) {
$this->_closeFd();
+
return $v_result;
}
@@ -879,31 +878,30 @@
$v_zip_temp_name = ARCHIVE_ZIP_TEMPORARY_DIR.uniqid('archive_zip-').'.tmp';
// ----- Open the temporary file in write mode
- if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
- {
+ if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) {
$this->_closeFd();
$this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL,
- 'Unable to open temporary file \''
- .$v_zip_temp_name.'\' in binary write mode');
+ 'Unable to open temporary file \''
+ .$v_zip_temp_name.'\' in binary write mode');
+
return Archive_Zip::errorCode();
}
// ----- Copy the files from the archive to the temporary file
// TBC : Here I should better append the file and go back to erase the
- // central dir
+ // central dir
$v_size = $v_central_dir['offset'];
- while ($v_size != 0)
- {
+ while ($v_size != 0) {
$v_read_size = ($v_size < ARCHIVE_ZIP_READ_BLOCK_SIZE
- ? $v_size : ARCHIVE_ZIP_READ_BLOCK_SIZE);
+ ? $v_size : ARCHIVE_ZIP_READ_BLOCK_SIZE);
$v_buffer = fread($this->_zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Swap the file descriptor
- // Here is a trick : I swap the temporary fd with the zip fd, in order to
+ // Here is a trick : I swap the temporary fd with the zip fd, in order to
// use the following methods on the temporary fil and not the real archive
$v_swap = $this->_zip_fd;
$this->_zip_fd = $v_zip_temp_fd;
@@ -912,8 +910,8 @@
// ----- Add the files
$v_header_list = array();
if (($v_result = $this->_addFileList($p_list, $v_header_list,
- $p_add_dir, $p_remove_dir,
- $p_remove_all_dir, $p_params)) != 1)
+ $p_add_dir, $p_remove_dir,
+ $p_remove_all_dir, $p_params)) != 1)
{
fclose($v_zip_temp_fd);
$this->_closeFd();
@@ -928,18 +926,16 @@
// ----- Copy the block of file headers from the old archive
$v_size = $v_central_dir['size'];
- while ($v_size != 0)
- {
+ while ($v_size != 0) {
$v_read_size = ($v_size < ARCHIVE_ZIP_READ_BLOCK_SIZE
- ? $v_size : ARCHIVE_ZIP_READ_BLOCK_SIZE);
+ ? $v_size : ARCHIVE_ZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($v_zip_temp_fd, $v_read_size);
@fwrite($this->_zip_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Create the Central Dir files header
- for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
- {
+ for ($i=0, $v_count=0; $i<sizeof($v_header_list); ++$i) {
// ----- Create the file header
if ($v_header_list[$i]['status'] == 'ok') {
if (($v_result=$this->_writeCentralFileHeader($v_header_list[$i]))!=1) {
@@ -965,9 +961,9 @@
// ----- Create the central dir footer
if (($v_result = $this->_writeCentralHeader($v_count
- +$v_central_dir['entries'],
- $v_size, $v_offset,
- $v_comment)) != 1) {
+ +$v_central_dir['entries'],
+ $v_size, $v_offset,
+ $v_comment)) != 1) {
// ----- Reset the file list
unset($v_header_list);
@@ -1016,19 +1012,19 @@
$v_result=1;
// ----- Look if already open
- if ($this->_zip_fd != 0)
- {
+ if ($this->_zip_fd != 0) {
$this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL,
- 'Zip file \''.$this->_zipname.'\' already open');
+ 'Zip file \''.$this->_zipname.'\' already open');
+
return Archive_Zip::errorCode();
}
// ----- Open the zip file
- if (($this->_zip_fd = @fopen($this->_zipname, $p_mode)) == 0)
- {
+ if (($this->_zip_fd = @fopen($this->_zipname, $p_mode)) == 0) {
$this->_errorLog(ARCHIVE_ZIP_ERR_READ_OPEN_FAIL,
- 'Unable to open archive \''.$this->_zipname
- .'\' in '.$p_mode.' mode');
+ 'Unable to open archive \''.$this->_zipname
+ .'\' in '.$p_mode.' mode');
+
return Archive_Zip::errorCode();
}
@@ -1088,8 +1084,8 @@
// ----- Add the files
$v_header_list = array();
if (($v_result = $this->_addFileList($p_list, $v_header_list,
- $p_add_dir, $p_remove_dir,
- $p_remove_all_dir, $p_params)) != 1) {
+ $p_add_dir, $p_remove_dir,
+ $p_remove_all_dir, $p_params)) != 1) {
return $v_result;
}
@@ -1097,8 +1093,7 @@
$v_offset = @ftell($this->_zip_fd);
// ----- Create the Central Dir files header
- for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
- {
+ for ($i=0,$v_count=0; $i<sizeof($v_header_list); ++$i) {
// ----- Create the file header
if ($v_header_list[$i]['status'] == 'ok') {
if (($v_result = $this->_writeCentralFileHeader($v_header_list[$i])) != 1) {
@@ -11...
[truncated message content] |
|
From: <be...@us...> - 2014-02-15 22:59:39
|
Revision: 12318
http://sourceforge.net/p/xoops/svn/12318
Author: beckmi
Date: 2014-02-15 22:59:32 +0000 (Sat, 15 Feb 2014)
Log Message:
-----------
Adding AltSys 0.82 from XoopsCube
Added Paths:
-----------
XoopsModules/altSys/
XoopsModules/altSys/branches/
XoopsModules/altSys/releases/
XoopsModules/altSys/trunk/
XoopsModules/altSys/trunk/htdocs/
XoopsModules/altSys/trunk/htdocs/modules/
XoopsModules/altSys/trunk/htdocs/modules/altsys/
XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/
XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/admin_menu.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/index.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png
XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/
XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/.htaccess
XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/blocks.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/index.html
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif
XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/.htaccess
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/index.html
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/oninstall.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onuninstall.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onupdate.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/index.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/mytrustdirname.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/
XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/AltsysPreload.class.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/setup_xoops_trust_path.php
XoopsModules/altSys/trunk/htdocs/modules/altsys/xoops_version.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/CHANGELOG
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/README
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/TODO
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/admin_menu.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/blocks/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/blocks/block_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/blocks.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/AltsysBreadcrumbs.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/D3LanguageManager.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/D3NotificationHandler.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/D3Tpl.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdmin.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdminForICMS.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdminForX20S.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdminForX22.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdminForX25.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/MyBlocksAdminForXCL21.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/SetupAltsysLangMgr.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/altsysUtils.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/class/d3utilities.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/controllers.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/get_templates.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/get_tplsvarsinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Archive_Zip.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Legacy_AltsysAdminRenderSystem.class.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Text_Diff.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Text_Diff_Renderer.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Text_Diff_Renderer_inline.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/Text_Diff_Renderer_unified.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/admin_in_theme.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/admin_in_theme_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/admin_in_theme_header.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/adminmenu_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/altsys_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/autoupdate_from_d3module.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/autoupdate_from_module.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/autoupdate_from_theme.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/compilehook.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/gtickets.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/lang_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/mygroupperm.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/mygrouppermform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/tpls_functions.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/include/x20_keepblockoptions.inc.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/index.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/english/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/french/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/german/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/ja_utf8/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/japanese/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/persian/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/index.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/portuguese/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/index.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/pt_utf8/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/admin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/admin_in_theme.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/blocks_common.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/blocks_each.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/compilehookadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/modinfo.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/language/spanish/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenu.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenusub/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenusub/myblocksadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenusub/mylangadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenusub/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mymenusub/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mypreferences.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mytplsadmin.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/mytplsform.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/oninstall.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/onuninstall.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/onupdate.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/preload.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/put_templates.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/smarty_plugins/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/smarty_plugins/resource.db.php
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/sql/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/sql/mysql.sql
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/block_admin_menu.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/inc_mymenu.css
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/inc_mymenu.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/inc_mymenusub.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/inc_mytplsadmin.css
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/main_myblocksadmin_edit.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/main_myblocksadmin_edit_4legacy.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/main_myblocksadmin_edit_4x25.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/main_myblocksadmin_list.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/templates/main_mylangadmin.html
XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/xoops_version.php
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/admin_menu.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/admin_menu.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/admin_menu.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH in mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/admin_menu.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/admin_menu.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/index.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/index.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/index.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,13 @@
+<?php
+
+require '../../../mainfile.php' ;
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH in mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/index.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/admin/index.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/altsys_slogo.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/.htaccess
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/.htaccess (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/.htaccess 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,2 @@
+order deny,allow
+deny from all
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/blocks.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/blocks.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/blocks.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/blocks.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/blocks.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/index.html
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/index.html (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/blocks/index.html 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_closed.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_opened.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_closed.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/adminmenu_selected_opened.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png
===================================================================
(Binary files differ)
Index: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png 2014-02-15 22:34:58 UTC (rev 12317)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png 2014-02-15 22:59:32 UTC (rev 12318)
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/images/module_icon.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/.htaccess
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/.htaccess (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/.htaccess 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,2 @@
+order deny,allow
+deny from all
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/Legacy_AltsysAdminRenderSystem.class.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/index.html
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/index.html (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/index.html 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/oninstall.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/oninstall.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/oninstall.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/oninstall.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/oninstall.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onuninstall.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onuninstall.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onuninstall.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onuninstall.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onuninstall.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onupdate.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onupdate.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onupdate.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onupdate.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/include/onupdate.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/index.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/index.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/index.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,9 @@
+<?php
+
+$xoopsOption['nocommon'] = 1 ;
+define('_LEGACY_PREVENT_LOAD_CORE_',true) ;
+require '../../mainfile.php' ;
+
+header( 'Location: '.XOOPS_URL.'/user.php' ) ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/index.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/mytrustdirname.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/mytrustdirname.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/mytrustdirname.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,3 @@
+<?php
+ $mytrustdirname = 'altsys' ;
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/mytrustdirname.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/AltsysPreload.class.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/AltsysPreload.class.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/AltsysPreload.class.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$mydirpath = dirname( dirname( __FILE__ ) ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/preload/AltsysPreload.class.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/setup_xoops_trust_path.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/setup_xoops_trust_path.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/setup_xoops_trust_path.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,65 @@
+<?php
+
+$xoopsOption['nocommon'] = 1 ;
+define('_LEGACY_PREVENT_LOAD_CORE_',1) ;
+
+include '../../mainfile.php' ;
+
+if( defined( 'XOOPS_TRUST_PATH' ) && XOOPS_TRUST_PATH != '' && file_exists( XOOPS_TRUST_PATH.'/libs/altsys' ) ) {
+ die( 'No problem with your XOOPS_TRUST_PATH' ) ;
+}
+
+
+// show the hint if password mathes
+$hint = '' ;
+if( @$_POST['dbpassword'] == XOOPS_DB_PASS ) {
+ // find XOOPS_TRUST_PATH
+ $xoops_trust_path = '' ;
+ $base_dirs = array( XOOPS_ROOT_PATH , dirname(XOOPS_ROOT_PATH) , dirname(dirname(XOOPS_ROOT_PATH )) ) ;
+ foreach( $base_dirs as $base_dir ) {
+ $dh = @opendir( $base_dir ) ;
+ if( ! empty( $dh ) ) {
+ while( ( $file = readdir( $dh ) ) !== false ) {
+ if( substr( $file , 0 , 1 ) == '.' ) continue ;
+ $fullpath = $base_dir . '/' . $file ;
+ if( ! is_dir( $fullpath ) ) continue ;
+ if( is_dir( $fullpath.'/libs/altsys' ) ) {
+ $xoops_trust_path = $fullpath ;
+ break 2 ;
+ }
+ }
+ }
+ }
+ // fall back
+ if( empty( $xoops_trust_path ) ) {
+ $xoops_trust_path = dirname(XOOPS_ROOT_PATH).'/xoops_trust_path' ;
+ }
+ // create the hint
+ if( ! defined( 'XOOPS_TRUST_PATH' ) ) {
+ $hint = "Insert the red line.<br />define('XOOPS_ROOT_PATH', '".htmlspecialchars(XOOPS_ROOT_PATH,ENT_QUOTES)."');<br /><ins style='color:red;'>define('XOOPS_TRUST_PATH', '".htmlspecialchars($xoops_trust_path,ENT_QUOTES)."');</ins>";
+ } else {
+ $hint = "<del>define('XOOPS_TRUST_PATH', '');</del><br /><ins style='color:red;'>define('XOOPS_TRUST_PATH', '".htmlspecialchars($xoops_trust_path,ENT_QUOTES)."');</ins>";
+ }
+}
+
+
+
+
+
+// default form
+?>
+<html>
+<head>
+<title>set up XOOPS_TRUST_PATH</title>
+</head>
+<body>
+<h1>Set up XOOPS_TRUST_PATH</h1>
+<p>You missed inserting a line defining XOOPS_TRUST_PATH in mainfile.php</p>
+<p>Insert it by yourself, or follow the procedures</p>
+<form action="" method="post">
+ Your MySQL Password:<input type="password" name="dbpassword" size="16" />
+ <input type="submit" value="next" />
+</form>
+<?php if($hint) echo 'Edit mainfile.php like this: <blockquote style="border: black solid 1px;">'.$hint.'</blockquote>' ?>
+</body>
+</html>
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/setup_xoops_trust_path.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/modules/altsys/xoops_version.php
===================================================================
--- XoopsModules/altSys/trunk/htdocs/modules/altsys/xoops_version.php (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/modules/altsys/xoops_version.php 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,12 @@
+<?php
+
+if( ! defined( 'XOOPS_TRUST_PATH' ) ) die( 'set XOOPS_TRUST_PATH into mainfile.php' ) ;
+
+$mydirname = basename( dirname( __FILE__ ) ) ;
+$mydirpath = dirname( __FILE__ ) ;
+// require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname
+$mytrustdirname = 'altsys' ;
+
+require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/xoops_version.php' ;
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/altSys/trunk/htdocs/modules/altsys/xoops_version.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/CHANGELOG
===================================================================
--- XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/CHANGELOG (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/CHANGELOG 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,343 @@
+[xlang:en]
+
+
+
+v0.71 (2008-12-21)
+- modified rendering options form for XCL2.1 cl::{BlockClass} (thx tohokuaiki)
+- modified some behaviors for XOOPS2.3
+- fixed group permissions is lost in custom block previewing
+- added RTL support (use _GLOBAL_LEFT/RIGHT instead of left,right directly)
+- updated language files
+-- persian (thx voltan)
+-- portuguesebr (thx leco1) 0.71b
+- fixed _GLOBAL_LEFT is defined as 'right' if _ADM_USE_RTL is not defined 0.71a
+- _ADM_USE_RTL\xA4\xAC\xC4\xEA\xB5\xC1\xA4\xB5\xA4\xEC\xA4Ƥ\xA4\xA4ʤ\xA4\xB4Ķ\xAD\xA4\xC7_GLOBAL_LEFT\xA4\xACright\xA4ˤʤ\xEB\xA5Х\xB0\xA4\xF2\xBD\xA4\xC0\xB5 0.71a
+- added a delegate D3NotificationHandler.Trigger into D3NotificationHandler 0.71b
+
+v0.70 (2008-12-14) Note: update the module
+- rewritten myblocksadmin fully
+- modified groups can be selected in list_blocks and edit_block
+- added a support for ImpressCMS (page ID and block positions)
+- removed a support for XOOPS2.2
+- added WYSIWYG edition for custom blocks by common/fckeditor (fckxoops)
+- removed WYSIWYG edition for custom blocks by common/spaw
+- added language files
+-- portuguesebr (thx leco1)
+
+v0.61 (2008-09-05)
+- added D3NotificationHandler
+- fixed some modinfo.php loaded twice with langauge overridding 0.61a
+
+v0.60 (2008-08-07)
+- fixed warning by assert() in Text_Diff
+- fixed notices missing modinfo.php (thx shige-p)
+
+v0.59 (2008-05-22)
+- fixed css for admin with XCL2.1 and "admin in theme"
+- modified the compatibility of blocksadmin with XCL2.1
+- updated gtickets.php
+- updated language files
+-- persian (thx stranger) 0.59a
+
+v0.58 (2008-04-10)
+- fixed wrong breadcrumbs as my*admin
+- modified "admin in theme" read language files under the theme
+- added setup_xoops_trust_path.php
+
+v0.57 (2008-04-01)
+- modified public top altsys
+- fixed typo in langman (thx nobunobu)
+- fixed templates_c/index.html can be removed (thx nobunobu)
+- added module's language files under the theme for XCL2.1
+- added pagetype's language files under the theme for XCL2.1
+- fixed menu duplication with admin in theme and XCL2.1 (thx nobunobu)
+- added a class named AltsysBreadcrumbs
+- modified xoops_breadcrumbs for "admin in theme"
+- added language files
+-- spanish (thx debianus)
+
+v0.56 (2007-12-28)
+- added a feature of custom template file (not custom "template set")
+- modified cloned blocks have independent "func_num" each other
+- modified compatibility with some XCL special modules about admin_in_theme
+- added partially overriding language constants by XOOPS_ROOT_PATH/my_language
+- modified mylangadmin displays which constants are overridden partially 0.56a
+- modified compatibility with NBFrame 0.56a
+
+v0.55 (2007-07-12)
+- modified the compatibility against XOOPS 2.0.14/15/16
+- added a class D3Tpl extends XoopsTpl
+- modified adminmenu hack (thx nobu) 0.55a
+- updated language files 0.55a
+-- persian (thx voltan)
+- added language files 0.55a
+-- german (thx rene)
+
+v0.54 (2007-07-06)
+- fixed admin_in_theme conflicts PHP debug of conventinal XOOPS2
+- fixed admin_in_theme conflicts redirect hack
+
+v0.53 (2007-06-05)
+- modified some interfaces
+- renamed language
+-- ja_utf8 (formerly japanaeseutf)
+
+v0.52 (2007-05-11)
+- added config of "force block cloning"
+- mofieid cache files for overriding language constants
+- modified mylangadmin can treat modinfo.php even
+
+v0.51 (2007-05-10)
+- added mylangadmin for conventional modules
+- added a preload for overriding XC Legacy 2.1 Language Manager
+- modified interface of mylangadmin
+- templatized mymenu for altsys
+- templatized mymenusub for altsys
+
+v0.50 (2007-05-07)
+- added mylangadmin - the override system for language constants
+- templatized mymenu
+- added "update and continue to edit" button into mytplsadmin
+- added language files
+-- japaneseutf
+- modified the compatibility of mylangadmin 0.50a
+- updated language files 0.50a
+-- persian (thx voltan)
+
+v0.41 (2007-04-04)
+- modified tplsadmin can edit themes with dbtheme module
+- fixed compatibility between "admin in theme" and Legacy 2.1 (thx sakichi)
+- fixed redirect_message 0.41a
+
+v0.40 (2007-03-27) note: overwrite XOOPS_ROOT_PATH/modules/altsys also
+- modified the structure radically
+- added a bridge "admin in theme" to XC Legacy 2.1
+- added a block of adminmenu
+- modified README better
+
+v0.36 (2007-03-23)
+- modified compatibilities of "admin in theme" still
+- added a feature blocks can be displayed in "admin in theme" (also xoops.org)
+- changed blocks displaying rule in "admin in theme" (specify ALTSYS explicitly)
+- added xoops_breadcrumbs for "admin in theme"
+- fixed compatibity problem with php5 on "admin in theme" (thx sakichi) 0.36a
+
+v0.35 (2007-03-22)
+- modified compatibilities of "admin in theme"
+- added a feature any blocks can be displayed in "admin in theme" (only with JP)
+
+v0.34 (2007-03-21)
+- added a feature of "admin in theme"
+
+v0.33 (2007-03-20)
+- modified admin menu hacks a little bit
+- modified compilehookadmin for other than html templates
+- updated language files
+-- persian (thx voltan)
+
+v0.32 (2007-03-19)
+- modified admin menu hacks
+- fixed a bug on installing newly (thx fourpsk)
+
+v0.31 (2007-03-18)
+- added admin menu hacks :-)
+
+v0.30 (2007-03-14) note: remove XOOPS_ROOT_PATH/modules/altsys once
+- modified the structure of file tree
+
+v0.21 (2006-10-27)
+- fixed wrong link from templates (thx makimaki)
+- added language persian (thx voltan)
+
+v0.20 (2006-10-18)
+- modified compatibility with Cube 2.1 beta
+- fixed wrong links of admin menu (thx usagiya) 0.20a
+
+v0.12 (2006-07-18)
+- modified compatibility with Cube 2.1 alpha3 without system module
+
+v0.11 (2006-06-21)
+- fixed uri of spaw in myblocksadmin (thx nico)
+- modified icon (thx argon)
+
+v0.10 (2006-05-19)
+- 1st release as altsys
+- myblocksadmin
+- mytplsadmin
+- mypreferences
+- compilehookadmin
+- fixed escaping rule of & (myblocksadmin)
+- XOOPS 2.2 ready (myblocksadmin)
+
+
+[/xlang:en]
+[xlang:ja]
+
+v0.71 (2008-12-21)
+- XCL2.1\xA4\xCEcl::{BlockClass}\xA4\xCB\xC2б\xFE\xA4\xB7\xA4\xBF (thx tohokuaiki)
+- XOOPS2.3\xA4Ǥ\xCEư\xBA\xEE\xA4\xF2\xB3\xCEǧ\xA4\xB7\xA4\xBF
+- \xA5ץ\xEC\xA5ӥ塼\xBB\xFE\xA4˥\xB0\xA5롼\xA5\xA2\xB8¤\xAC\xBC\xBA\xA4\xEF\xA4\xEC\xA4Ƥ\xA4\xA4\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5
+- RTL\xA5\xB5\xA5ݡ\xBC\xA5\xC8 (left\xA4\xE4right\xA4\xF2ľ\xA4˵\xAD\xBDҤ\xBB\xA4\xBA\xA4ˡ\xA2_GLOBAL_LEFT/RIGHT\xA4\xF2\xBBȤ\xA6)
+- \xB8\xC0\xB8\xEC\xC4\xEA\xBF\x{139E7F}\xB7
+-- persian (thx voltan)
+-- portuguesebr (thx leco1) 0.71b
+- _ADM_USE_RTL\xA4\xAC\xC4\xEA\xB5\xC1\xA4\xB5\xA4\xEC\xA4Ƥ\xA4\xA4ʤ\xA4\xB4Ķ\xAD\xA4\xC7_GLOBAL_LEFT\xA4\xACright\xA4ˤʤ\xEB\xA5Х\xB0\xA4\xF2\xBD\xA4\xC0\xB5 0.71a
+- \xA5\xA4\xA5٥\xF3\xA5\xC8\xC4\xCC\xC3Υϥ\xF3\xA5ɥ餬 D3NotificationHandler.Trigger \xA4\xF2call\xA4\xB9\xA4\xEB\xA4褦\xCAѹ\xB9 0.71b
+
+v0.70 (2008-12-14) \xA2\xA8 \xCDץ⥸\xA5塼\xA5륢\xA5åץǡ\xBC\xA5\xC8
+- myblocksadmin\xA4\xF2\xA4ޤ\xEB\xA4ޤ\xEB\xBD\xF1\xA4\xADľ\xA4\xB7\xA4\xBF
+- ɽ\xBC\xA8\xC2оݥ\xB0\xA5롼\xA5פ\xF2ľ\xC0\xDC\xC1\xAA\xC2\xF2\xA4Ǥ\xAD\xA4\xEB\xA4褦\xA4ˤ\xB7\xA4\xBF
+- ImpressCMS\xA4\xCB\xC2б\xFE\xA4\xB7\xA4\xBF\xA1ʥڡ\xBC\xA5\xB8ID\xA4\xAA\xA4\xE8\xA4\xD3\xC4ɲå֥\xED\xA5å\xAF\xA5ݥ\xB8\xA5\xB7\xA5\xE7\xA5\xF3\xA1\xCB
+- XOOPS2.2\xA4ؤ\xCE\xC2б\xFE\xA4\xF2\xA4\xE4\xA4
+- common/fckeditor (fckxoops)\xA4ǥ\xAB\xA5\xB9\xA5\xBF\xA5\xE0\xA5֥\xED\xA5å\xAF\xA4\xF2\xCAԽ\xB8\xA4Ǥ\xAD\xA4\xEB\xA4褦\xA4ˤ\xB7\xA4\xBF
+- \xA5\xAB\xA5\xB9\xA5\xBF\xA5\xE0\xA5֥\xED\xA5å\xAF\xCAԽ\xB8\xA4\xC7spaw\xA4ؤ\xCE\xC2б\xFE\xA4\xF2\xA4\xE4\xA4
+- \xB8\xC0\xB8\xEC\xC4\xEA\xBF\xF4\xC4ɲ\xC3
+-- portuguesebr (thx leco1)
+
+v0.61 (2008-09-05)
+- D3NotificationHandler \xA4\xF2\xC4ɲ\xC3
+- \xB8\xC0\xB8\xEC\xC4\xEA\xBF\x{125AA1}\xBC\xA5С\xBC\xA5饤\xA5ɤ\xC7 modinfo.php \xA4\xAC\xC6\xF3\xC5\xD9\xC6ɤޤ\xEC\xA4Ƥ\xB7\xA4ޤ\xA6\xB8\xBD\xBEݤ\xF2\xBD\xA4\xC0\xB5 0.61a
+
+v0.60 (2008-08-07)
+- Text_Diff\xA4\xAC\xC5Ǥ\xAFassert()\xA4ˤ\xE8\xA4\xEBWarning\xA4\xF2\xA4Ȥꤢ\xA4\xA8\xA4\xBA\xBEä\xB7\xA4\xBF
+- modinfo.php\xA4\xF2\xC6ɤ߹\xFE\xA4ޤʤ\xA4\xA5\xB1\xA1\xBC\xA5\xB9\xA4\xC7Notice\xA4\xAC\xBDФƤ\xA4\xA4\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 (thx shige-p)
+
+v0.59 (2008-05-22)
+- XCL2.1\xA4ˤ\xAA\xA4\xB1\xA4\xEB\xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤǡ\xA2CSS\xA4\xAC\xC6ɤ߹\xFE\xA4ޤ\xEC\xA4ʤ\xA4\xCC\xE4\xC2\xEA\xA4β\xFE\xC1\xB1
+- XCL2.1\xA4ˤ\xAA\xA4\xB1\xA4\xEB\xA5֥\xED\xA5å\xAF\xB4\xC9\xCD\xFD\xA4\xCE\xC1\xEA\xC0\xAD\xCC\xE4\xC2\xEA\xB2\xFE\xC1\xB1
+- gtickets.php \xA4ι\xB9\xBF\xB7
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5빹\xBF\xB7
+-- persian (thx stranger) 0.59a
+
+v0.58 (2008-04-10)
+- \xA5ѥ\xBA\xB4\xD8Ϣ\xA4ΥХ\xB0\xBD\xA4\xC0\xB5
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤΥơ\xBC\xA5\xBC\xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC2б\xFE
+- XOOPS_TRUST_PATH\xA4\xF2\xC0\xDF\xC4ꤷ\xA4Ƥ\xA4\xA4ʤ\xA4\xBE\xEC\xB9\xE7\xA4\xCE\xC2б\xFE\xC4ɲ\xC3
+
+v0.57 (2008-04-01)
+- Altsys\xA4ϥ⥸\xA5塼\xA5\xEB\xA4Ȥ\xB7\xA4Ƥ\xB7\xA4ޤä\xBF\xBE\xEC\xB9\xE7\xA4\xCE\xC2н\xE8\xA4\xF2\xC4ɲ\xC3
+- \xB8\xC0\xB8\xEC\xA5ޥ͡\xBC\xA5\xB8\xA5\xE3\xA4\xCEtypo\xBD\xA4\xC0\xB5 (thx nobunobu)
+- \xA5ƥ\xF3\xA5ץ졼\xA5ȥ\xAD\xA5\xE3\xA5å\xB7\xA5\xE5\xC6\xE2\xA5ե\xA1\xA5\xA4\xA5\xEB\xA4θ\xED\xBA\xEF\xBD\xFC\xBD\xA4\xC0\xB5 (thx nobunobu)
+- XCL2.1\xCDѸ\xC0\xB8\xEC\xA5ޥ͡\xBC\xA5\xB8\xA5\xE3\xA5եå\xAFpreload\xA4Υơ\xBC\xA5\xBC\xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC2б\xFE
+- XCL2.1\xCDѸ\xC0\xB8\xEC\xA5ޥ͡\xBC\xA5\xB8\xA5\xE3\xA5եå\xAFpreload\xA4\xCEmy_language/\xB2\xBC\xA5ڡ\xBC\xA5\xB8\xA5\xBF\xA5\xA4\xA5\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC2б\xFE
+- XCL2.1\xA4δ\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤǡ\xA2\xA5\xE1\xA5˥塼\xB9\xE0\xCCܤ\xAC\xBD\xC5ʣ\xA4\xB9\xA4\xEB\xA5Х\xB0\xA4ν\xA4\xC0\xB5 (thx nobunobu)
+- AltsysBreadcrumbs \xA5\xAF\xA5饹\xA4ο\xB7\xC0\xDF
+- Altsys\xC6\xE2\xA4\xCExoops_breadcrumbs\xA4\xF2\xC8\xE6\xB3\xD3Ū\xBF\xBF\xCC\xCC\xCCܤ˺\xEE\xA4ä\xBF
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC4ɲ\xC3
+-- spanish (thx debianus)
+
+v0.56 (2007-12-28)
+- \xA5\xAB\xA5\xB9\xA5\xBF\xA5\xE0\xA5ƥ\xF3\xA5ץ졼\xA5Ȥμ\xC2\xC1\xF5
+- ʣ\xC0\xBD\xA5֥\xED\xA5å\xAF\xA4\xCEfunc_num\xA4\xAC\xA4ʤ\xEB\xA4٤\xAF\xA5\xC0\xA5֤\xE9\xA4ʤ\xA4\xA4褦\xA4ˤ\xB7\xA4\xBF
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤ\xC7 Module.class.php \xA4ǥ\xAA\xA1\xBC\xA5С\xBC\xA5饤\xA5ɤ\xB9\xA4\xEB\xA5⥸\xA5塼\xA5\xEB\xA4\xCB\xC2б\xFE\xA4\xB7\xA4\xBF
+- XOOPS_ROOT_PATH/my_language \xA4ˤ\xE8\xA4\xEB\xB8\xC0\xB8\xEC\xC4\xEA\xBF\xF4\xA4κ\xB9ʬ\xA5\xAA\xA1\xBC\xA5С\xBC\xA5饤\xA5ɤ\xF2\xBC\xC2\xC1\x{164DE4}\xBF
+- \xBA\xB9ʬ\xA5\xAA\xA1\xBC\xA5С\xBC\xA5饤\xA5ɾ\x{176DE4}\xF2\xB4\xC9\xCD\xFD\xB2\xE8\xCC̤Ǥ\xE2\xB3\xCEǧ\xA4Ǥ\xAD\xA4\xEB\xA4褦\xA4ˤ\xB7\xA4\xBF 0.56a
+- NBFrame\xA4ؤ\xCE\xC2б\xFE 0.56a
+
+v0.55 (2007-07-12)
+- \xCBܲ\xC8\xC8ǥ\xB3\xA5\xA22.0.14/15/16\xA4Ȥθߴ\xB9\xC0\xAD\xB2\xFE\xC1\xB1
+- XoopsTpl\xA4\xF2\xB7Ѿ\xB5\xA4\xB7\xA4\xBFD3Tpl\xA5\xAF\xA5饹\xA4μ\xC2\xC1\xF5\xA1\xA6\xCD\xF8\xCD\xD1
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥\xE1\xA5˥塼\xBD\xB9\xA4\xA8\xB5\xA1ǽ\xA4β\xFE\xC1\xB1 (thx nobu) 0.55a
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5빹\xBF\xB7 0.55a
+-- persian (thx voltan)
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC4ɲ\xC3 0.55a
+-- german (thx rene)
+
+v0.54 (2007-07-06)
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤ\xF2\xBBȤ\xA6\xA4ȥ\xA8\xA5顼ɽ\xBC\xA8\xA4\xAC\xA4ʤ\xAF\xA4ʤäƤ\xB7\xA4ޤä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤȤ\xAA\xBC\xEA\xB7ڹ\xE2®\xB2\xBDHack\xA4Ȥξ\xD7\xC6ͤ\xF2\xB2\xF3\xC8\xF2
+
+v0.53 (2007-06-05)
+- \xBA٤\xAB\xA4\xCA\xC1\xE0\xBA\xEE\xC0\xAD\xB8\xFE\xBE\xE5
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB̾\xCAѹ\xB9
+-- ja_utf8 (\xB5\xEC japanaeseutf)
+
+v0.52 (2007-05-11)
+- \xA5֥\xED\xA5å\xAF\xB6\xAF\xC0\xA9ʣ\xC0\xBD\xB2\xC4ǽ\xA5\xAA\xA5ץ\xB7\xA5\xE7\xA5\xF3\xA4ο\xB7\xC0\xDF
+- \xA5\xAD\xA5\xE3\xA5å\xB7\xA5\xE5\xA5ե\xA1\xA5\xA4\xA5\xEB\xA4\xCE\xC0\xB8\xC0\xAE\xA5롼\xA5\xEB\xCAѹ\xB9
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5륪\xA1\xBC\xA5С\xBC\xA5饤\xA5ɤ\xC7 modinfo.php \xA4ⰷ\xA4\xA8\xA4\xEB\xA4褦\xA4ˤ\xB7\xA4\xBF
+
+v0.51 (2007-05-10)
+- \xC4̾\xEF\xA5⥸\xA5塼\xA5\xEB\xA4\xE2\xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5륪\xA1\xBC\xA5С\xBC\xA5饤\xA5ɥ\xB7\xA5\xB9\xA5ƥ\xE0\xA4ǰ\xB7\xA4\xA8\xA4\xEB\xA4褦\xA4˻\xC5\xCD\xCD\xCAѹ\xB9
+- XoopsCube Legacy 2.1 \xCDѤΥ\xE9\xA5\xBC\xA5\xB8\xA5ޥ͡\xBC\xA5\xB8\xA5㥪\xA1\xBC\xA5С\xBC\xA5饤\xA5\xC9preload\xA4\xCEƱ\xBA\xAD
+- mylangadmin \xA4\xCE\xC1\xE0\xBA\xEE\xC0\xAD\xB2\xFE\xC1\xB1
+- altsys\xC0\xEC\xCD\xD1mymenu\xA4Υƥ\xF3\xA5ץ졼\xA5Ȳ\xBD
+- Ʊ\xA5\xB5\xA5֥\xE1\xA5˥塼\xA4Υƥ\xF3\xA5ץ졼\xA5Ȳ\xBD
+
+v0.50 (2007-05-07)
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5륪\xA1\xBC\xA5С\xBC\xA5饤\xA5ɥ\xB7\xA5\xB9\xA5ƥ\xE0mylangadmin\xA4μ\xC2\xC1\xF5
+- mymenu\xA4Υƥ\xF3\xA5ץ졼\xA5Ȳ\xBD
+- \xA5ƥ\xF3\xA5ץ졼\xA5\xC8\xCAԽ\xB8\xA4Ǥγ\xCEǧ\xA5ܥ\xBF\xA5\xF3\xA4\xCE\xC4ɲ\xC3
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5\xEB\xC4ɲ\xC3
+-- japaneseutf
+- mylangadmin\xA4θߴ\xB9\xC0\xAD\xB2\xFE\xC1\xB1 0.50a
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5뽤\xC0\xB5 0.50a
+-- persian (thx voltan)
+
+v0.41 (2007-04-04)
+- tplsadmin \xA4\xF2\xA5ơ\xBC\xA5\xDE\xCAԽ\xB8\xC2б\xFE\xA4\xB7\xA4\xBF (dbtheme\xA5⥸\xA5塼\xA5\xEB\xA4Ȥ\xCEʻ\xCDѻ\xFE)
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤ\xCE\xC2\xD0Legacy 2.1\xB8ߴ\xB9\xC0\xAD\xA4\xF2\xB8\xFE\xBE夵\xA4\xBB\xA4\xBF (thx sakichi)
+- \xA4\xAA\xBC\xEA\xB7ڹ\xE2®\xB2\xBDHack\xA4ǥ\xE1\xA5å\xBB\xA1\xBC\xA5\xB8\xA4\xACɽ\xBC\xA8\xA4\xB5\xA4\xEC\xA4Ƥ\xA4\xA4ʤ\xAB\xA4ä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 0.41a
+
+v0.40 (2007-03-27) \xA2\xA8 \xB8\xF8\xB3\xAB¦\xA4\xE2\xBE\xE5\xBD\xB7\xA4Ƥ\xAF\xA4\xC0\xA4\xB5\xA4\xA4
+- \xB9\xBD¤\xA4\xF2\xC2\xE7\xC9\xFD\xA4\xCB\xCAѹ\xB9\xA4\xB7\xA4\xBF
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤ\xF2XC Legacy 2.1\xA4\xC7ư\xA4\xAF\xA4褦\xA4ˤ\xB7\xA4\xBF
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥\xE1\xA5˥塼\xA4\xF2\xA5֥\xED\xA5å\xAF\xB2\xBD\xA4\xB7\xA4\xBF
+- \xA5ɥ\xAD\xA5\xE5\xA5\xE1\xA5\xF3\xA5Ȥ\xB7\xC0\xB0\xC8\x{1E4DE4}\xBF
+
+v0.36 (2007-03-23)
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤθߴ\xB9\xC0\xAD\xA4Τ\xB5\xA4\xE9\xA4ʤ\xEB\xB2\xFE\xC1\xB1
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤǡ\xA2\xCBܲ\xC8\xC8\xC72.0.x\xA4Ǥ\xE2\xA5֥\xED\xA5å\xAFɽ\xBC\xA8\xA4\xF2\xB2\xC4ǽ\xA4Ȥ\xB7\xA4\xBF
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޥ֥\xED\xA5å\xAFɽ\xBC\xA8\xBB\xC5\xCD\xCD\xCAѹ\xB9 \xA1\xCA\xC2оݤ\xCB"ALTSYS"\xA4\xAC\xCC\xC0\xBC\xA8Ū\xA4˻\xD8\xC4ꤵ\xA4줿\xBB\xFE\xA4\xC0\xA4\xB1\xA1\xCB
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤǤ\xCExoops_breadcrumbs\xC2б\xFE
+- PHP\xA4\xC0\xA4ȴ\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤ\xAC\xB5\xA1ǽ\xA4\xB7\xA4ʤ\xAB\xA4ä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 (thx sakichi) 0.36a
+
+v0.35 (2007-03-22)
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̥ơ\xBC\xA5ޤθߴ\xB9\xC0\xAD\xB2\xFE\xC1\xB1
+- \xA5֥\xED\xA5å\xAFɽ\xBC\xA8\xA4\xF2\xB2\xC4ǽ\xA4ˤ\xB7\xA4\xBF (\xB8\xBD\xBE\xF5\xA4Ǥ\xCFJP\xC8ǤΤ\xDF)
+
+v0.34 (2007-03-21)
+- \xB4\xC9\xCD\xFD\xB2\xE8\xCC̤\xF2\xB8\xF8\xB3\xAB¦\xA5ơ\xBC\xA5ޤ\xC7ɽ\xBC\xA8\xA4\xB9\xA4뵡ǽ\xA4\xCE\xC4ɲ\xC3
+
+v0.33 (2007-03-20)
+- \xB4\xC9\xCD\xFD\xA5\xE1\xA5˥塼\xA4ν\xB9\xA4\xA8\xB5\xA1ǽ\xA4\xF2\xA4⤦\xBE\xAF\xA4\xB7\xB2\xFE\xCEɤ\xB7\xA4\xBF
+- \xA5ƥ\xF3\xA5ץ졼\xA5Ȥι\xE2\xC5٤ʴ\xC9\xCD\xFD\xA4ǡ\xA2HTML\xB0ʳ\xB0\xA4Υƥ\xF3\xA5ץ졼\xA5Ȥν\xE8\xCD\xFD\xA4\xF2\xCAѹ\xB9
+- \xB8\xC0\xB8\xEC\xA5ե\xA1\xA5\xA4\xA5빹\xBF\xB7
+-- persian (thx voltan)
+
+v0.32 (2007-03-19)
+- \xB4\xC9\xCD\xFD\xA5\xE1\xA5˥塼\xA4ν\xB9\xA4\xA8\xB5\xA1ǽ\xA4δ\xB0\xC0\xAE\xC5٤\xF2\xB9\xE2\xA4
+- 0.31\xA4ǥ\xA4\xA5ȡ\xBC\xA5\xEB\xA4Ǥ\xAD\xA4ʤ\xAF\xA4ʤäƤ\xA4\xA4\xBF\xA5Х\xB0\xA4ν\xA4\xC0\xB5 (thx fourpsk)
+
+v0.31 (2007-03-18)
+- \xB4\xC9\xCD\xFD\xA5\xE1\xA5˥塼\xA4ν\xB9\xA4\xA8\xB5\xA1ǽ\xC4ɲ\xC3
+
+v0.30 (2007-03-14) \xA2\xA8 \xB8\xF8\xB3\xAB¦\xA4ä\xBF\xA4\xF3\xBEä\xB7\xA4Ƥ\xAF\xA4\xC0\xA4\xB5\xA4\xA4
+- \xA5ե\xA1\xA5\xA4\xA5빽\xC0\xAE\xA4θ\xABľ\xA4\xB7\xA1ʰʹߤ\xCFXOOPS_TRUST_PATH\xA4Τ߾\xE5\xBD\xB9\xA4\xEC\xA4\xD0\xCEɤ\xA4\xB7\xC1\xA4ˤ\xB7\xA4\xBF\xA1\xCB
+
+v0.21 (2006-10-27)
+- \xA5ƥ\xF3\xA5ץ졼\xA5Ȥؤ\xCE\xCB\xE4\xA4\xE1\xB9\xFE\xA4ߤǥ\xEA\xA5\xF3\xA5\xAF\xC0褬\xA4\xAA\xA4\xAB\xA4\xB7\xA4\xAB\xA4ä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 (thx makimaki)
+- \xA5ȥ륳\xB8\xEC\xC4ɲ\xC3 (thx voltan)
+
+v0.20 (2006-10-18)
+- Cube 2.1 beta \xA4\xC7ư\xA4\xAF\xA4褦\xA4ˤ\xB7\xA4\xBF
+- \xA5\xE1\xA5˥塼\xA4\xAC\xA4\xAA\xA4\xAB\xA4\xB7\xA4\xAB\xA4ä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 (thx usagiya) 0.20a
+
+v0.12 (2006-07-18)
+- Cube 2.1 alpha3 \xA4\xC7system\xA5⥸\xA5塼\xA5뤬¸\xBAߤ\xB7\xA4ʤ\xA4\xBE\xEC\xB9\xE7\xA4ؤ\xCE\xC2б\xFE\xA4\xF2\xC4ɲ\xC3
+
+v0.11 (2006-06-21)
+- myblocksadmin\xBE\xE5\xA4\xCEspaw\xA5\xEA\xA5\xAC\xA4\xAA\xA4\xAB\xA4\xB7\xA4\xAB\xA4ä\xBF\xA4Τ\xF2\xBD\xA4\xC0\xB5 (thx nico)
+- \xA5\xA2\xA5\xA4\xA5\xB3\xA5\xB7 (thx argon)
+
+v0.10 (2006-05-19)
+- \xBAǽ\xE9\xA4Υ\xEA\xA5\xA5\xB9
+- myblocksadmin
+- mytplsadmin
+- mypreferences
+- compilehookadmin
+- & \xA4ΰ\xB7\xA4\xA4\xA4\xF2\xBD\xA4\xC0\xB5 (myblocksadmin)
+- XOOPS 2.2\xC2б\xFE (myblocksadmin)
+
+
+[/xlang:ja]
Added: XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/README
===================================================================
--- XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/README (rev 0)
+++ XoopsModules/altSys/trunk/htdocs/xoops_lib/libs/altsys/README 2014-02-15 22:59:32 UTC (rev 12318)
@@ -0,0 +1,282 @@
+[mlimg]
+[xlang:en]
+== ALTSYS == alternative system module & library
+
+[b]SUMMARY:[/b]
+
+The unified module of blocksadmin, tplsadmin, etc around the system.
+
+I'm appreciated your bug reports :-)
+
+I'll maintain this module instead of blocksadmin, tplsadmin, avaman etc.
+
+
+[b]INSTALL:[/b]
+
+- set XOOPS_TRUST_PATH into mainfile.php
+- copy xoops_trus_path/libs/ in the archive into XOOPS_TRUST_PATH/
+- copy html/modules/altsys in the archive into XOOPS_ROOT_PATH/modules/
+- install it
+
+
+[b]UPDATE[/b]
+from 0.2x/0.3x:
+ - remove XOOPS_ROOT_PATH/modules/altsys/ once
+ - upload/overwrite both XOOPS_ROOT_PATH/modules/altsys and XOOPS_TRUST_PATH/libs/altsys
+
+
+[b]FEATURES[/b]
+
+- easy block administration
+- easy permission adminstration
+- easy copy/delete/edit any DB templates
+- easy import/export any DB templates
+- displaying diff between each version of templates
+- finding the template you want to edit easily
+- making an Extension for Dreamweaver to edit templates
+- modifying adminmenu in the left side of XOOPS 2.0.x easier
+- displaying admin controll panels in any conventional themes
+- supporting three types of template auto-updating into the DB
+- modifying operations/developments of any versions of core (X2,XCL2.1,ImpressCMS etc.) efficient
+
+
+[b]DB template auto-updating feature[/b]
+
+This feature make your customizing/developping DB templates much efficient.
+Altsys supports three types of auto-updating into the DB.
+
+(1) auto-updating template under the theme.
+This feature is useful for developper of site/theme.
+Insert a line just after including common.php of mainfile.php.
+[code]
+ include XOOPS_ROOT_PATH."/include/common.php";
+ [color=ff0000]
+ include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_theme.inc.php" ;
+ [/color]
+[/code]
+Then, just modifying the templates of /themes/(your_theme)/templates/* will be updated into the DB
+
+(2) auto-updating template under the module
+This feature is useful for developper of modules.
+Insert two lines just after including common.php of mainfile.php.
+[code]
+ include XOOPS_ROOT_PATH."/include/common.php";
+ [color=ff0000]
+ $tplsadmin_autoupdate_dirnames = array( '(your_module)' ) ;
+ include XOOPS_TRUST_PATH."/libs/altsys/include/autoupdate_from_module.inc.php" ;
+ [/color]
+[/code]
+Then, just modifying the templates of /modules/(your_module)/templates/* will be updated into the DB.
+You can specify modules multiply. eg) array( 'piCal' , 'tinyd0' )
+
+(3) auto-updating template under XOOPS_TRUST_PATH
+This feature is useful for developper of D3 modules.
+Insert two lines just after including common.php of m...
[truncated message content] |