You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(361) |
Oct
(65) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(798) |
Feb
(694) |
Mar
(586) |
Apr
(145) |
May
(24) |
Jun
(24) |
Jul
(56) |
Aug
(11) |
Sep
(138) |
Oct
(107) |
Nov
(58) |
Dec
(39) |
| 2004 |
Jan
(157) |
Feb
(24) |
Mar
(13) |
Apr
(14) |
May
(73) |
Jun
(106) |
Jul
(217) |
Aug
(91) |
Sep
(116) |
Oct
(357) |
Nov
(27) |
Dec
(272) |
| 2005 |
Jan
(97) |
Feb
(40) |
Mar
(167) |
Apr
(365) |
May
(344) |
Jun
(357) |
Jul
(407) |
Aug
(529) |
Sep
(204) |
Oct
(52) |
Nov
(80) |
Dec
(1) |
| 2006 |
Jan
(2) |
Feb
(1) |
Mar
(11) |
Apr
(112) |
May
(121) |
Jun
(86) |
Jul
(51) |
Aug
(48) |
Sep
(107) |
Oct
(20) |
Nov
(50) |
Dec
(11) |
| 2007 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(11) |
May
(2) |
Jun
(25) |
Jul
(67) |
Aug
(134) |
Sep
(54) |
Oct
(69) |
Nov
(10) |
Dec
(74) |
| 2008 |
Jan
(73) |
Feb
(81) |
Mar
(64) |
Apr
(98) |
May
(157) |
Jun
(68) |
Jul
(80) |
Aug
(108) |
Sep
(176) |
Oct
(107) |
Nov
(265) |
Dec
(60) |
| 2009 |
Jan
(149) |
Feb
(140) |
Mar
(195) |
Apr
(141) |
May
(53) |
Jun
(45) |
Jul
(98) |
Aug
(153) |
Sep
(160) |
Oct
(138) |
Nov
(139) |
Dec
(104) |
| 2010 |
Jan
(188) |
Feb
(259) |
Mar
(133) |
Apr
(104) |
May
(42) |
Jun
(121) |
Jul
(38) |
Aug
(223) |
Sep
(259) |
Oct
(255) |
Nov
(106) |
Dec
(157) |
| 2011 |
Jan
(202) |
Feb
(110) |
Mar
(261) |
Apr
(272) |
May
(218) |
Jun
(108) |
Jul
(141) |
Aug
(205) |
Sep
(326) |
Oct
(279) |
Nov
(368) |
Dec
(238) |
| 2012 |
Jan
(239) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(3) |
2
(10) |
|
3
(4) |
4
|
5
|
6
|
7
(1) |
8
(3) |
9
(2) |
|
10
(1) |
11
(2) |
12
(6) |
13
(1) |
14
(6) |
15
|
16
(10) |
|
17
|
18
|
19
|
20
(1) |
21
|
22
|
23
|
|
24
(1) |
25
(2) |
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: <ez...@us...> - 2009-05-24 16:51:57
|
Revision: 3255
http://xoops.svn.sourceforge.net/xoops/?rev=3255&view=rev
Author: ezsky
Date: 2009-05-24 16:51:47 +0000 (Sun, 24 May 2009)
Log Message:
-----------
fixed bug mod_clearFile can not executed ,like create category in newbb.
Modified Paths:
--------------
ThirdParty/Frameworks/art/trunk/art/functions.cache.php
Modified: ThirdParty/Frameworks/art/trunk/art/functions.cache.php
===================================================================
--- ThirdParty/Frameworks/art/trunk/art/functions.cache.php 2009-05-20 02:18:59 UTC (rev 3254)
+++ ThirdParty/Frameworks/art/trunk/art/functions.cache.php 2009-05-24 16:51:47 UTC (rev 3255)
@@ -101,7 +101,7 @@
closedir($handle);
}
} else {
- foreach (glob($root_path . "/{$dirname}_{$name}*.php") as $file) {
+ foreach (glob($root_path . "/*{$dirname}_{$name}*.php") as $file) {
@unlink($file);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-20 02:19:11
|
Revision: 3254
http://xoops.svn.sourceforge.net/xoops/?rev=3254&view=rev
Author: wishcraft
Date: 2009-05-20 02:18:59 +0000 (Wed, 20 May 2009)
Log Message:
-----------
X-Reaggregator 1.13 (Release)
Added Paths:
-----------
XoopsModules/xreaggregator/releases/2.13/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/menu.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator_block.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/mashables.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregator.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregatorrenderer.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/feed.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/htaccess.dist
XoopsModules/xreaggregator/releases/2.13/xreaggregator/htaccess.dist.bak
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/Thumbs.db
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/left_both.gif
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/mashable.gif
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/right_both.gif
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/rss.gif
XoopsModules/xreaggregator/releases/2.13/xreaggregator/images/xreaggregator_slogo.png
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/aggregation.addnew.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/aggregation.edit.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/aggregation.list.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/collaboration_feed.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/functions.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/mashables.addnew.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/mashables.edit.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/mashables.list.form.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/include/update.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/index.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/admin.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/blocks.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/main.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/english/modinfo.php
XoopsModules/xreaggregator/releases/2.13/xreaggregator/language/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/sql/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/sql/mysql.sql
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/blocks/
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/blocks/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/blocks/xreaggregator_block_rss.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/xreaggregator_feed.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/xreaggregator_index.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/templates/xreaggregator_rss.html
XoopsModules/xreaggregator/releases/2.13/xreaggregator/xoops_version.php
XoopsModules/xreaggregator/trunk/xreaggregator/
XoopsModules/xreaggregator/trunk/xreaggregator/admin/
XoopsModules/xreaggregator/trunk/xreaggregator/admin/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/admin/index.php
XoopsModules/xreaggregator/trunk/xreaggregator/admin/menu.php
XoopsModules/xreaggregator/trunk/xreaggregator/blocks/
XoopsModules/xreaggregator/trunk/xreaggregator/blocks/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/blocks/xreaggregator.php
XoopsModules/xreaggregator/trunk/xreaggregator/blocks/xreaggregator_block.html
XoopsModules/xreaggregator/trunk/xreaggregator/class/
XoopsModules/xreaggregator/trunk/xreaggregator/class/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/class/mashables.php
XoopsModules/xreaggregator/trunk/xreaggregator/class/xreaggregator.php
XoopsModules/xreaggregator/trunk/xreaggregator/class/xreaggregatorrenderer.php
XoopsModules/xreaggregator/trunk/xreaggregator/feed.php
XoopsModules/xreaggregator/trunk/xreaggregator/htaccess.dist
XoopsModules/xreaggregator/trunk/xreaggregator/htaccess.dist.bak
XoopsModules/xreaggregator/trunk/xreaggregator/images/
XoopsModules/xreaggregator/trunk/xreaggregator/images/Thumbs.db
XoopsModules/xreaggregator/trunk/xreaggregator/images/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/images/left_both.gif
XoopsModules/xreaggregator/trunk/xreaggregator/images/mashable.gif
XoopsModules/xreaggregator/trunk/xreaggregator/images/right_both.gif
XoopsModules/xreaggregator/trunk/xreaggregator/images/rss.gif
XoopsModules/xreaggregator/trunk/xreaggregator/images/xreaggregator_slogo.png
XoopsModules/xreaggregator/trunk/xreaggregator/include/
XoopsModules/xreaggregator/trunk/xreaggregator/include/aggregation.addnew.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/aggregation.edit.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/aggregation.list.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/collaboration_feed.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/functions.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/mashables.addnew.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/mashables.edit.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/mashables.list.form.php
XoopsModules/xreaggregator/trunk/xreaggregator/include/update.php
XoopsModules/xreaggregator/trunk/xreaggregator/index.php
XoopsModules/xreaggregator/trunk/xreaggregator/language/
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/admin.php
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/blocks.php
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/main.php
XoopsModules/xreaggregator/trunk/xreaggregator/language/english/modinfo.php
XoopsModules/xreaggregator/trunk/xreaggregator/language/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/sql/
XoopsModules/xreaggregator/trunk/xreaggregator/sql/mysql.sql
XoopsModules/xreaggregator/trunk/xreaggregator/templates/
XoopsModules/xreaggregator/trunk/xreaggregator/templates/blocks/
XoopsModules/xreaggregator/trunk/xreaggregator/templates/blocks/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/templates/blocks/xreaggregator_block_rss.html
XoopsModules/xreaggregator/trunk/xreaggregator/templates/index.html
XoopsModules/xreaggregator/trunk/xreaggregator/templates/xreaggregator_feed.html
XoopsModules/xreaggregator/trunk/xreaggregator/templates/xreaggregator_index.html
XoopsModules/xreaggregator/trunk/xreaggregator/templates/xreaggregator_rss.html
XoopsModules/xreaggregator/trunk/xreaggregator/xoops_version.php
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.html
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.html (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.html 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/index.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,458 @@
+<?php
+// $Id: index.php,v 1.6 2005/06/26 15:38:28 mithyt2 Exp $
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+include '../../../include/cp_header.php';
+include XOOPS_ROOT_PATH.'/modules/xreaggregator/include/functions.php';
+$op = 'list';
+
+if (isset($_REQUEST)) {
+ foreach ($_REQUEST as $k => $v) {
+ ${$k} = $v;
+ }
+}
+
+if (isset($_REQUEST['op'])) {
+ $op = $_REQUEST['op'];
+ $xreaggregator_id = intval($_REQUEST['xreaggregator_id']);
+}
+if ($op == 'mashables') {
+
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $hlman =& xoops_getmodulehandler('xreaggregator');
+ $mlman =& xoops_getmodulehandler('mashables');
+ $xreaggregators =& $hlman->getObjects();
+ $xreagcount = count($xreaggregators);
+ $mashables =& $mlman->getObjects();
+ $mashcount = count($mashables);
+
+ $fct = $_REQUEST['fct'];
+
+ switch ($fct) {
+
+ case 'edit':
+ if ($id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $ml =& $mlman->get($id);
+ if (!is_object($ml)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+
+ xoops_cp_header();
+ adminMenu(2);
+ include('../include/mashables.edit.form.php');
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit();
+
+ break;
+
+ case 'editgo':
+ $id = intval($id);
+ if ($id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $ml =& $mlman->get($id);
+ if (!is_object($ml)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ $ml->setVar('name', $name);
+ $ml->setVar('display', $display);
+ $ml->setVar('random', $random);
+ $ml->setVar('weight', $weight);
+ $ml->setVar('groups', $groups);
+ $ml->setVar('domains', $domains);
+
+ if (!$GLOBALS['xoopsSecurity']->check() || !$mlman->insert($ml)) {
+ $msg = sprintf(_AM_FAILUPDATE, $ml->getVar('name'));
+ $msg .= '<br />'.$ml->getErrors();
+ $msg .= '<br />'.implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error($msg);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('index.php?op=mashables', 2, _AM_DBUPDATED);
+
+ break;
+ case 'delete':
+ if ($id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $ml =& $mlman->get($id);
+ if (!is_object($ml)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ xoops_cp_header();
+ $name = $ml->getVar('name');
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ //echo '<a href="index.php">'. _AM_HLMAIN .'</a> <span style="font-weight:bold;">»»</span> '.$name.'<br /><br />';
+ xoops_confirm(array('fct' => 'deletego', 'op' => 'mashables', 'id' => $ml->getVar('id')), 'index.php', sprintf(_AM_WANTDEL, $name));
+ xoops_cp_footer();
+ exit();
+ break;
+
+ case 'deletego':
+ $id = intval($id);
+ if ($id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $ml =& $mlman->get($id);
+ if (!is_object($ml)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ if (!$GLOBALS['xoopsSecurity']->check() || !$mlman->delete($ml)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error(sprintf(_AM_FAILDELETE, $ml->getVar('name'))."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('index.php?op=mashables', 2, _AM_DBUPDATED);
+ break;
+
+ case 'addgo':
+ if ($GLOBALS['xoopsSecurity']->check()) {
+ $ml =& $mlman->create();
+ $ml->setVar('name', $name);
+ $ml->setVar('groups', $groups);
+ $ml->setVar('domains', $domain);
+ $ml->setVar('display', $display);
+ $ml->setVar('weight', $weight);
+ $ml->setVar('random', $random);
+ @$mlman->insert($ml);
+ } else {
+ redirect_header('index.php?op=mashables', 2, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+
+ redirect_header('index.php?op=mashables', 2, _AM_DBUPDATED);
+ break;
+
+ case 'update':
+ $i = 0;
+ $msg = '';
+ foreach ($_POST['id'] as $id => $value) {
+ $ml =& $mlman->get($id);
+ if (!is_object($ml)) {
+ $i++;
+ continue;
+ }
+ $display[$id] = empty($display[$id]) ? 0 : $display[$id];
+ $random[$id] = empty($random[$id]) ? 0 : $random[$id];
+ $ml->setVar('name', $name[$id]);
+ $ml->setVar('weight', $weight[$id]);
+ $ml->setVar('groups', $group[$id]);
+ $ml->setVar('domains', $domain[$id]);
+ $ml->setVar('random', $random[$id]);
+ $ml->setVar('groups', $groups[$id]);
+
+ if (!$mlman->insert($ml)) {
+ $msg .= '<br />'.sprintf(_AM_FAILUPDATE, $ml->getVar('name'));
+ }
+ $i++;
+ }
+ if ($msg != '') {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS_MASHABLES."</h4>";
+ xoops_error($msg);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('index.php?op=mashables', 2, _AM_DBUPDATED);
+
+ break;
+
+ case "list":
+ default:
+ xoops_cp_header();
+ adminMenu(2);
+ include('../include/mashables.list.form.php');
+
+ include('../include/mashables.addnew.form.php');
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit();
+ }
+}
+if ($op == 'list') {
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $hlman =& xoops_getmodulehandler('xreaggregator');
+ $xreaggregators =& $hlman->getObjects();
+ $count = count($xreaggregators);
+
+ xoops_cp_header();
+ adminMenu(1);
+ include('../include/aggregation.list.form.php');
+
+ include('../include/aggregation.addnew.form.php');
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'update') {
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $i = 0;
+ $msg = '';
+ foreach ($_POST['xreaggregator_id'] as $id => $value) {
+ $hl =& $hlman->get($id);
+ if (!is_object($hl)) {
+ $i++;
+ continue;
+ }
+ $xreaggregator_display[$id] = empty($xreaggregator_display[$id]) ? 0 : $xreaggregator_display[$id];
+ $xreaggregator_asblock[$id] = empty($xreaggregator_asblock[$id]) ? 0 : $xreaggregator_asblock[$id];
+ $old_cachetime = $hl->getVar('xreaggregator_cachetime');
+ $hl->setVar('xreaggregator_cachetime', $xreaggregator_cachetime[$i]);
+ $old_display = $hl->getVar('xreaggregator_display');
+ $hl->setVar('xreaggregator_display', $xreaggregator_display[$id]);
+ $hl->setVar('xreaggregator_weight', $xreaggregator_weight[$id]);
+ $old_asblock = $hl->getVar('xreaggregator_asblock');
+ $hl->setVar('xreaggregator_asblock', $xreaggregator_asblock[$id]);
+ $old_encoding = $hl->getVar('xreaggregator_encoding');
+ $hl->setVar('xreaggregator_encoding', $xreaggregator_encoding[$i]);
+ if (!$hlman->insert($hl)) {
+ $msg .= '<br />'.sprintf(_AM_FAILUPDATE, $hl->getVar('xreaggregator_name'));
+ } else {
+ if ($hl->getVar('xreaggregator_xml') == '') {
+ $renderer =& xreaggregator_getrenderer($hl);
+ $renderer->updateCache();
+ }
+ }
+ $i++;
+ }
+ if ($msg != '') {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error($msg);
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('index.php', 2, _AM_DBUPDATED);
+}
+
+if ($op == 'addgo') {
+ if ($GLOBALS['xoopsSecurity']->check()) {
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $hl =& $hlman->create();
+ $hl->setVar('xreaggregator_name', $xreaggregator_name);
+ $hl->setVar('xreaggregator_url', $xreaggregator_url);
+ $hl->setVar('xreaggregator_rssurl', $xreaggregator_rssurl);
+ $hl->setVar('xreaggregator_display', $xreaggregator_display);
+ $hl->setVar('xreaggregator_weight', $xreaggregator_weight);
+ $hl->setVar('xreaggregator_asblock', $xreaggregator_asblock);
+ $hl->setVar('xreaggregator_encoding', $xreaggregator_encoding);
+ $hl->setVar('xreaggregator_cachetime', $xreaggregator_cachetime);
+ $hl->setVar('xreaggregator_domains', '|'.implode('|',$xreaggregator_domains));
+ $hl->setVar('xreaggregator_mainfull', $xreaggregator_mainfull);
+ $hl->setVar('xreaggregator_mainimg', $xreaggregator_mainimg);
+ $hl->setVar('xreaggregator_mainmax', $xreaggregator_mainmax);
+ $hl->setVar('xreaggregator_blockimg', $xreaggregator_blockimg);
+ $hl->setVar('xreaggregator_blockmax', $xreaggregator_blockmax);
+ if (!$hlman->insert($hl)) {
+ $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('xreaggregator_name'));
+ $msg .= '<br />'.$hl->getErrors();
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error($msg);
+ xoops_cp_footer();
+ exit();
+ } else {
+ if ($hl->getVar('xreaggregator_xml') == '') {
+ $renderer =& xreaggregator_getrenderer($hl);
+ $renderer->updateCache();
+ }
+ }
+ }
+ else {
+ redirect_header('index.php', 2, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ redirect_header('index.php', 2, _AM_DBUPDATED);
+}
+
+if ($op == 'edit') {
+ if ($xreaggregator_id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $hl =& $hlman->get($xreaggregator_id);
+ if (!is_object($hl)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ adminMenu(1);
+ include('../include/aggregation.edit.form.php');
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'editgo') {
+ $xreaggregator_id = intval($xreaggregator_id);
+ if ($xreaggregator_id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $hl =& $hlman->get($xreaggregator_id);
+ if (!is_object($hl)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ $hl->setVar('xreaggregator_name', $xreaggregator_name);
+ $hl->setVar('xreaggregator_url', $xreaggregator_url);
+ $hl->setVar('xreaggregator_encoding', $xreaggregator_encoding);
+ $hl->setVar('xreaggregator_rssurl', $xreaggregator_rssurl);
+ $hl->setVar('xreaggregator_display', $xreaggregator_display);
+ $hl->setVar('xreaggregator_weight', $xreaggregator_weight);
+ $hl->setVar('xreaggregator_asblock', $xreaggregator_asblock);
+ $hl->setVar('xreaggregator_cachetime', $xreaggregator_cachetime);
+ $hl->setVar('xreaggregator_domains', '|'.implode('|',$xreaggregator_domains));
+ $hl->setVar('xreaggregator_mainfull', $xreaggregator_mainfull);
+ $hl->setVar('xreaggregator_mainimg', $xreaggregator_mainimg);
+ $hl->setVar('xreaggregator_mainmax', $xreaggregator_mainmax);
+ $hl->setVar('xreaggregator_blockimg', $xreaggregator_blockimg);
+ $hl->setVar('xreaggregator_blockmax', $xreaggregator_blockmax);
+
+ if (!$GLOBALS['xoopsSecurity']->check() || !$hlman->insert($hl)) {
+ $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('xreaggregator_name'));
+ $msg .= '<br />'.$hl->getErrors();
+ $msg .= '<br />'.implode('<br />', $GLOBALS['xoopsSecurity']->getErrors());
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error($msg);
+ xoops_cp_footer();
+ exit();
+ } else {
+ if ($hl->getVar('xreaggregator_xml') == '') {
+ $renderer =& xreaggregator_getrenderer($hl);
+ $renderer->updateCache();
+ }
+ }
+ redirect_header('index.php', 2, _AM_DBUPDATED);
+}
+
+if ($op == 'delete') {
+ if ($xreaggregator_id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $hl =& $hlman->get($xreaggregator_id);
+ if (!is_object($hl)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ xoops_cp_header();
+ $name = $hl->getVar('xreaggregator_name');
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ //echo '<a href="index.php">'. _AM_HLMAIN .'</a> <span style="font-weight:bold;">»»</span> '.$name.'<br /><br />';
+ xoops_confirm(array('op' => 'deletego', 'xreaggregator_id' => $hl->getVar('xreaggregator_id')), 'index.php', sprintf(_AM_WANTDEL, $name));
+ xoops_cp_footer();
+ exit();
+}
+
+if ($op == 'deletego') {
+ $xreaggregator_id = intval($xreaggregator_id);
+ if ($xreaggregator_id <= 0) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_INVALIDID);
+ xoops_cp_footer();
+ exit();
+ }
+ $hlman =& xoops_getmodulehandler('xreaggregator');;
+ $hl =& $hlman->get($xreaggregator_id);
+ if (!is_object($hl)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(_AM_OBJECTNG);
+ xoops_cp_footer();
+ exit();
+ }
+ if (!$GLOBALS['xoopsSecurity']->check() || !$hlman->delete($hl)) {
+ xoops_cp_header();
+ echo "<h4>"._AM_XREAGGREGATORS."</h4>";
+ xoops_error(sprintf(_AM_FAILDELETE, $hl->getVar('xreaggregator_name'))."<br />".implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ xoops_cp_footer();
+ exit();
+ }
+ redirect_header('index.php', 2, _AM_DBUPDATED);
+}
+
+?>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/menu.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/menu.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/admin/menu.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,34 @@
+<?php
+// $Id: menu.php,v 2.09 2004/12/26 19:12:09 wishcraft Exp $
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+global $adminmenu;
+$adminmenu=array();
+$adminmenu[1]['title'] = _XA_REAGGREGATOR_ADMENU1;
+$adminmenu[1]['link'] = "admin/index.php";
+$adminmenu[2]['title'] = _XA_REAGGREGATOR_ADMENU2;
+$adminmenu[2]['link'] = "admin/index.php?op=mashables";
+
+?>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/index.html
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/index.html (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/index.html 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,48 @@
+<?php
+// $Id: xreaggregator.php,v 2.09 2004/12/26 19:12:09 wishcraft Exp $
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+include_once XOOPS_ROOT_PATH.'/modules/xreaggregator/include/functions.php';
+
+function B_XREAGGREGATOR_SHOW($options)
+{
+ global $xoopsConfig;
+ $block = array();
+ $hlman =& xoops_getmodulehandler('xreaggregator', 'xreaggregator');
+ $xreaggregators =& $hlman->getObjects(new Criteria('xreaggregator_asblock', 1));
+ $count = count($xreaggregators);
+ for ($i = 0; $i < $count; $i++) {
+ $renderer =& xreaggregator_getrenderer($xreaggregators[$i]);
+ if (!$renderer->renderBlock()) {
+ if ($xoopsConfig['debug_mode'] == 2) {
+ $block['feeds'][] = sprintf(_XAL_FAILGET, $xreaggregators[$i]->getVar('xreaggregator_name')).'<br />'.$renderer->getErrors();
+ }
+ continue;
+ }
+ $block['feeds'][] = $renderer->getBlock();
+ }
+ return $block;
+}
+?>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator_block.html
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator_block.html (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/blocks/xreaggregator_block.html 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,12 @@
+<a href="<{$site_url}>" target="_blank"><{$site_name}></a><br />
+<{if $image.url != ""}>
+ <img src="<{$image.url}>" width="<{$image.width|default:88}>" height="<{$image.height|default:31}>" alt="<{$image.title}>" /><br />
+<{/if}>
+
+<ul>
+<{section name=i loop=$items}>
+ <{if $items[i].title != ""}>
+ <li><a href="<{$xoops_url}>/modules/xreaggregator/index.php?id=<{$site_id}>#<{$items[i].link}>"><{$items[i].title}></a></li>
+ <{/if}>
+<{/section}>
+</ul>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/index.html
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/index.html (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/index.html 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/mashables.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/mashables.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/mashables.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,165 @@
+<?php
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for Mashables
+ * @author Simon Roberts (si...@ch...)
+ * @copyright copyright (c) 2000-2009 XOOPS.org
+ * @package kernel
+ */
+class xreaggregatorMashables extends XoopsObject
+{
+
+ function xreaggregatorMashables($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false, 128);
+ $this->initVar('groups', XOBJ_DTYPE_ARRAY, null, true);
+ $this->initVar('domains', XOBJ_DTYPE_ARRAY, null, true);
+ $this->initVar('weight', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('display', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('random', XOBJ_DTYPE_INT, null, false);
+ }
+
+}
+
+
+/**
+* XOOPS Mashables handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class xreaggregatorMashablesHandler extends XoopsObjectHandler
+{
+ function xreaggregatorMashablesHandler(&$db)
+ {
+ $this->db =& $db;
+ }
+
+ function delete_id($id)
+ {
+ global $xoopsDB;
+ $sql = "DELETE FROM ".$xoopsDB->prefix('xreaggregator_mashables')." WHERE id = $id";
+ $resa = $xoopsDB->queryF($sql);
+ if ($resa==true)
+ return true;
+ else
+ return false;
+ }
+
+ function &getInstance(&$db)
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new xreaggregatorMashablesHandler($db);
+ }
+ return $instance;
+ }
+
+ function &create()
+ {
+ return new xreaggregatorMashables();
+ }
+
+ function &get($id)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('xreaggregator_mashables').' WHERE id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $xreaggregator = new xreaggregatorMashables();
+ $xreaggregator->assignVars($this->db->fetchArray($result));
+ return $xreaggregator;
+ }
+ }
+ return false;
+ }
+
+ function insert(&$xreaggregator)
+ {
+ if (!is_a($xreaggregator, 'xreaggregatorMashables')) {
+ return false;
+ }
+ if (!$xreaggregator->cleanVars()) {
+ return false;
+ }
+ foreach ($xreaggregator->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if (empty($id)) {
+ $id = $this->db->genId('XREAGGREGATOR_MASHABLE_ID_SEQ');
+ $sql = 'INSERT INTO '.$this->db->prefix('xreaggregator_mashables').' (id, name, random, display, weight, domains, groups) VALUES ('.$id.', '.$this->db->quoteString(name).', '.$random.', '.$display.', '.$weight.', '.$this->db->quoteString($domains).', '.$this->db->quoteString($groups).')';
+ } else {
+ $sql = 'UPDATE '.$this->db->prefix('xreaggregator_mashables').' SET name='.$this->db->quoteString($name).', random='.$random.', display='.$display.', weight='.$weight.', domains='.$this->db->quoteString($domains).', groups='.$this->db->quoteString($groups).' WHERE id='.$id;
+ }
+
+ if (!$this->db->queryF($sql)) {
+ return false;
+ }
+ if (empty($id)) {
+ $id = $this->db->getInsertId();
+ }
+ $xreaggregator->assignVar('id', $id);
+ return $id;
+ }
+
+ function delete(&$xreaggregator)
+ {
+ if (!is_a($xreaggregator, 'xreaggregatorMashables')) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE id = %u", $this->db->prefix('xreaggregator_mashables'), $xreaggregator->getVar('id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ function &getObjects($criteria = null)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('xreaggregator_mashables');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $sql .= ' ORDER BY xreaggregator_weight '.$criteria->getOrder();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $xreaggregator = new xreaggregatorMashables();
+ $xreaggregator->assignVars($myrow);
+ $ret[] =& $xreaggregator;
+ unset($xreaggregator);
+ }
+ return $ret;
+ }
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('xreaggregator_mashables');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+}
+?>
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregator.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregator.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregator.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,187 @@
+<?php
+// $Id: xreaggregator.php,v 1.02 2008/06/10 15:05:30 wishcraft Exp $
+// ------------------------------------------------------------------------ //
+// 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: Simon Roberts (AKA wishcraft) //
+// URL: http://www.chronolabs.org.au //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+
+class xreaggregatorxreaggregator extends XoopsObject
+{
+
+ function xreaggregatorxreaggregator()
+ {
+ $this->XoopsObject();
+ $this->initVar('xreaggregator_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('xreaggregator_name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('xreaggregator_url', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('xreaggregator_rssurl', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('xreaggregator_cachetime', XOBJ_DTYPE_INT, 600, false);
+ $this->initVar('xreaggregator_asblock', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('xreaggregator_display', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('xreaggregator_encoding', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('xreaggregator_weight', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('xreaggregator_mainimg', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('xreaggregator_mainfull', XOBJ_DTYPE_INT, 1, false);
+ $this->initVar('xreaggregator_mainmax', XOBJ_DTYPE_INT, 10, false);
+ $this->initVar('xreaggregator_blockimg', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('xreaggregator_blockmax', XOBJ_DTYPE_INT, 10, false);
+ $this->initVar('xreaggregator_xml', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('xreaggregator_updated', XOBJ_DTYPE_INT, 0, false);
+ $this->initVar('xreaggregator_domains', XOBJ_DTYPE_OTHER, null, false);
+ }
+
+ function cacheExpired()
+ {
+ if (time() - $this->getVar('xreaggregator_updated') > $this->getVar('xreaggregator_cachetime')) {
+ return true;
+ }
+ return false;
+ }
+}
+
+class xreaggregatorxreaggregatorHandler
+{
+ var $db;
+
+ function xreaggregatorxreaggregatorHandler(&$db)
+ {
+ $this->db =& $db;
+ }
+
+ function &getInstance(&$db)
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new xreaggregatorxreaggregatorHandler($db);
+ }
+ return $instance;
+ }
+
+ function &create()
+ {
+ return new xreaggregatorxreaggregator();
+ }
+
+ function &get($id)
+ {
+ $id = intval($id);
+ if ($id > 0) {
+ $sql = 'SELECT * FROM '.$this->db->prefix('xreaggregator').' WHERE xreaggregator_id='.$id;
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $xreaggregator = new xreaggregatorxreaggregator();
+ $xreaggregator->assignVars($this->db->fetchArray($result));
+ return $xreaggregator;
+ }
+ }
+ return false;
+ }
+
+ function insert(&$xreaggregator)
+ {
+ if (strtolower(get_class($xreaggregator)) != 'xreaggregatorxreaggregator') {
+ return false;
+ }
+ if (!$xreaggregator->cleanVars()) {
+ return false;
+ }
+ foreach ($xreaggregator->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if (empty($xreaggregator_id)) {
+ $xreaggregator_id = $this->db->genId('xreaggregator_XREAGGREGATOR_id_seq');
+ $sql = 'INSERT INTO '.$this->db->prefix('xreaggregator').' (xreaggregator_id, xreaggregator_name, xreaggregator_url, xreaggregator_rssurl, xreaggregator_encoding, xreaggregator_cachetime, xreaggregator_asblock, xreaggregator_display, xreaggregator_weight, xreaggregator_mainimg, xreaggregator_mainfull, xreaggregator_mainmax, xreaggregator_blockimg, xreaggregator_blockmax, xreaggregator_xml, xreaggregator_updated, xreaggregator_domains) VALUES ('.$xreaggregator_id.', '.$this->db->quoteString($xreaggregator_name).', '.$this->db->quoteString($xreaggregator_url).', '.$this->db->quoteString($xreaggregator_rssurl).', '.$this->db->quoteString($xreaggregator_encoding).', '.$xreaggregator_cachetime.', '.$xreaggregator_asblock.', '.$xreaggregator_display.', '.$xreaggregator_weight.', '.$xreaggregator_mainimg.', '.$xreaggregator_mainfull.', '.$xreaggregator_mainmax.', '.$xreaggregator_blockimg.', '.$xreaggregator_blockmax.', '.$this->db->quoteString($xreaggregator_xml).', '.time().', '.$this->db->quoteString($xreaggregator_domains).')';
+ } else {
+ $sql = 'UPDATE '.$this->db->prefix('xreaggregator').' SET xreaggregator_name='.$this->db->quoteString($xreaggregator_name).', xreaggregator_url='.$this->db->quoteString($xreaggregator_url).', xreaggregator_rssurl='.$this->db->quoteString($xreaggregator_rssurl).', xreaggregator_encoding='.$this->db->quoteString($xreaggregator_encoding).', xreaggregator_cachetime='.$xreaggregator_cachetime.', xreaggregator_asblock='.$xreaggregator_asblock.', xreaggregator_display='.$xreaggregator_display.', xreaggregator_weight='.$xreaggregator_weight.', xreaggregator_mainimg='.$xreaggregator_mainimg.', xreaggregator_mainfull='.$xreaggregator_mainfull.', xreaggregator_mainmax='.$xreaggregator_mainmax.', xreaggregator_blockimg='.$xreaggregator_blockimg.', xreaggregator_blockmax='.$xreaggregator_blockmax.', xreaggregator_xml = '.$this->db->quoteString($xreaggregator_xml).', xreaggregator_updated='.$xreaggregator_updated.', xreaggregator_domains='.$this->db->quoteString($xreaggregator_domains).' WHERE xreaggregator_id='.$xreaggregator_id;
+ }
+ if (!$result = $this->db->queryF($sql)) {
+ return false;
+ }
+ if (empty($xreaggregator_id)) {
+ $xreaggregator_id = $this->db->getInsertId();
+ }
+ $xreaggregator->assignVar('xreaggregator_id', $xreaggregator_id);
+ return $xreaggregator_id;
+ }
+
+ function delete(&$xreaggregator)
+ {
+ if (get_class($xreaggregator) != 'xreaggregatorxreaggregator') {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE xreaggregator_id = %u", $this->db->prefix('xreaggregator'), $xreaggregator->getVar('xreaggregator_id'));
+ if (!$result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ function &getObjects($criteria = null)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->db->prefix('xreaggregator');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ $sql .= ' ORDER BY xreaggregator_weight '.$criteria->getOrder();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $xreaggregator = new xreaggregatorxreaggregator();
+ $xreaggregator->assignVars($myrow);
+ $ret[] =& $xreaggregator;
+ unset($xreaggregator);
+ }
+ return $ret;
+ }
+
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('xreaggregator');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (!$result =& $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregatorrenderer.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregatorrenderer.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/class/xreaggregatorrenderer.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,275 @@
+<?php
+// $Id: xreaggregatorrenderer.php,v 1.02 2008/06/10 15:05:30 wishcraft Exp $
+// ------------------------------------------------------------------------ //
+// 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: Simon Roberts (AKA wishcraft) //
+// URL: http://www.chronolabs.org.au //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+if (!defined('XOOPS_ROOT_PATH')) {
+ die("XOOPS root path not defined");
+}
+
+include_once XOOPS_ROOT_PATH.'/class/template.php';
+include_once XOOPS_ROOT_PATH.'/modules/xreaggregator/language/'.$GLOBALS['xoopsConfig']['language'].'/main.php';
+
+class xreaggregatorRenderer
+{
+ // holds reference to xreaggregator class object
+ var $_hl;
+
+ var $_tpl;
+
+ var $_feed;
+
+ var $_block;
+
+ var $_errors = array();
+
+ // RSS2 SAX parser
+ var $_parser;
+
+
+ function xreaggregatorRenderer(&$xreaggregator)
+ {
+ $this->_hl =& $xreaggregator;
+ $this->_tpl = new XoopsTpl();
+ }
+
+ function updateCache()
+ {
+ if (!$fp = fopen($this->_hl->getVar('xreaggregator_rssurl'), 'r')) {
+ $this->_setErrors('Could not open file: '.$this->_hl->getVar('xreaggregator_rssurl'));
+ return false;
+ }
+ $data = '';
+ while (!feof ($fp)) {
+ $data .= fgets($fp, 4096);
+ }
+ fclose ($fp);
+ $this->_hl->setVar('xreaggregator_xml', $this->convertToUtf8($data));
+ $this->_hl->setVar('xreaggregator_updated', time());
+ $xreaggregator_handler =& xoops_getmodulehandler('xreaggregator', 'xreaggregator');
+ return $xreaggregator_handler->insert($this->_hl);
+ }
+
+ function renderFeed($force_update = false)
+ {
+ if ($force_update || $this->_hl->cacheExpired()) {
+ if (!$this->updateCache()) {
+ return false;
+ }
+ }
+ if (!$this->_parse()) {
+ return false;
+ }
+ $this->_tpl->clear_all_assign();
+ $this->_tpl->assign('xoops_url', XOOPS_URL);
+ $channel_data =& $this->_parser->getChannelData();
+ array_walk($channel_data, array($this, 'convertFromUtf8'));
+ $this->_tpl->assign_by_ref('channel', $channel_data);
+ if ($this->_hl->getVar('xreaggregator_mainimg') == 1) {
+ $image_data =& $this->_parser->getImageData();
+ array_walk($image_data, array($this, 'convertFromUtf8'));
+ $this->_tpl->assign_by_ref('image', $image_data);
+ }
+ if ($this->_hl->getVar('xreaggregator_mainfull') == 1) {
+ $this->_tpl->assign('show_full', true);
+ } else {
+ $this->_tpl->assign('show_full', false);
+ }
+ $items =& $this->_parser->getItems();
+ $count = count($items);
+ $max = ($count > $this->_hl->getVar('xreaggregator_mainmax')) ? $this->_hl->getVar('xreaggregator_mainmax') : $count;
+ for ($i = 0; $i < $max; $i++) {
+ array_walk($items[$i], array($this, 'convertFromUtf8'));
+ $this->_tpl->append_by_ref('items', $items[$i]);
+ }
+ $this->_tpl->assign(array('lang_lastbuild' => _XAL_LASTBUILD, 'lang_language' => _XAL_LANGUAGE, 'lang_description' => _XAL_DESCRIPTION, 'lang_webmaster' => _XAL_WEBMASTER, 'lang_category' => _XAL_CATEGORY, 'lang_generator' => _XAL_GENERATOR, 'lang_title' => _XAL_TITLE, 'lang_pubdate' => _XAL_PUBDATE, 'lang_description' => _XAL_DESCRIPTION, 'lang_more' => _MORE));
+ $this->_feed =& $this->_tpl->fetch('db:xreaggregator_feed.html');
+ return true;
+ }
+
+ function renderRSS($force_update = false)
+ {
+ if ($force_update || $this->_hl->cacheExpired()) {
+ if (!$this->updateCache()) {
+ return false;
+ }
+ }
+
+ if (!$this->_parse()) {
+ return false;
+ }
+
+ $channel_data =& $this->_parser->getChannelData();
+ $image_data =& $this->_parser->getImageData();
+ $items =& $this->_parser->getItems();
+
+ $channel_data = $this->xr_htmlspecialchars($this->xr_htmlspecialchars_decode($channel_data));
+ $image_data = $this->xr_htmlspecialchars($this->xr_htmlspecialchars_decode($image_data));
+ $items = $this->xr_htmlspecialchars($this->xr_htmlspecialchars_decode($items));
+
+ return array("items" => $items, "image" => $image_data, "channel" => $channel_data);
+ }
+
+ function xr_htmlspecialchars($obj_items)
+ {
+ foreach($obj_items as $key => $item)
+ {
+ if (is_array($item))
+ {
+ $obj_items[$key] = $this->xr_htmlspecialchars($item);
+ } else {
+ $obj_items[$key] = htmlspecialchars($item);
+ }
+ }
+
+ return $obj_items;
+ }
+
+ function xr_htmlspecialchars_decode($obj_items)
+ {
+ foreach($obj_items as $key => $item)
+ {
+ if (is_array($item))
+ {
+ $obj_items[$key] = $this->xr_htmlspecialchars_decode($item);
+ } else {
+ $obj_items[$key] = htmlspecialchars_decode($item);
+ }
+ }
+
+ return $obj_items;
+ }
+
+ function renderBlock($force_update = false)
+ {
+ if ($force_update || $this->_hl->cacheExpired()) {
+ if (!$this->updateCache()) {
+ return false;
+ }
+ }
+ if (!$this->_parse()) {
+ return false;
+ }
+ $this->_tpl->clear_all_assign();
+ $this->_tpl->assign('xoops_url', XOOPS_URL);
+ $channel_data =& $this->_parser->getChannelData();
+ array_walk($channel_data, array($this, 'convertFromUtf8'));
+ $this->_tpl->assign_by_ref('channel', $channel_data);
+ if ($this->_hl->getVar('xreaggregator_blockimg') == 1) {
+ $image_data =& $this->_parser->getImageData();
+ array_walk($image_data, array($this, 'convertFromUtf8'));
+ $this->_tpl->assign_by_ref('image', $image_data);
+ }
+ $items =& $this->_parser->getItems();
+ $count = count($items);
+ $max = ($count > $this->_hl->getVar('xreaggregator_blockmax')) ? $this->_hl->getVar('xreaggregator_blockmax') : $count;
+ for ($i = 0; $i < $max; $i++) {
+ array_walk($items[$i], array($this, 'convertFromUtf8'));
+ $this->_tpl->append_by_ref('items', $items[$i]);
+ }
+ $this->_tpl->assign(array('site_name' => $this->_hl->getVar('xreaggregator_name'), 'site_url' => $this->_hl->getVar('xreaggregator_url'), 'site_id' => $this->_hl->getVar('xreaggregator_id')));
+ $this->_block =& $this->_tpl->fetch('file:'.XOOPS_ROOT_PATH.'/modules/xreaggregator/blocks/xreaggregator_block.html');
+ return true;
+ }
+
+
+
+ function &_parse()
+ {
+ if (isset($this->_parser)) {
+ return true;
+ }
+ include_once XOOPS_ROOT_PATH.'/class/xml/rss/xmlrss2parser.php';
+ $this->_parser = new XoopsXmlRss2Parser($this->_hl->getVar('xreaggregator_xml'));
+ switch ($this->_hl->getVar('xreaggregator_encoding')) {
+ case 'utf-8':
+ $this->_parser->useUtfEncoding();
+ break;
+ case 'us-ascii':
+ $this->_parser->useAsciiEncoding();
+ break;
+ default:
+ $this->_parser->useIsoEncoding();
+ break;
+ }
+ $result = $this->_parser->parse();
+ if (!$result) {
+ $this->_setErrors($this->_parser->getErrors(false));
+ unset($this->_parser);
+ return false;
+ }
+ return true;
+ }
+
+ function &getFeed()
+ {
+ return $this->_feed;
+ }
+
+ function &getBlock()
+ {
+ return $this->_block;
+ }
+
+ function _setErrors($err)
+ {
+ $this->_errors[] = $err;
+ }
+
+ function &getErrors($ashtml = true)
+ {
+ if (!$ashtml) {
+ return $this->_errors;
+ } else {
+ $ret = '';
+ if (count($this->_errors) > 0) {
+ foreach ($this->_errors as $error) {
+ $ret .= $error.'<br />';
+ }
+ }
+ return $ret;
+ }
+ }
+
+ // abstract
+ // overide this method in /language/your_language/xreaggregatorrenderer.php
+ // this method is called by the array_walk function
+ // return void
+ function convertFromUtf8(&$value, $key)
+ {
+ }
+
+ // abstract
+ // overide this method in /language/your_language/xreaggregatorrenderer.php
+ // return string
+ function &convertToUtf8(&$xmlfile)
+ {
+ return $xmlfile;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xreaggregator/releases/2.13/xreaggregator/feed.php
===================================================================
--- XoopsModules/xreaggregator/releases/2.13/xreaggregator/feed.php (rev 0)
+++ XoopsModules/xreaggregator/releases/2.13/xreaggregator/feed.php 2009-05-20 02:18:59 UTC (rev 3254)
@@ -0,0 +1,271 @@
+<?php
+// $Id: index.php,v 1.6 2005/06/26 15:38:28 mithyt2 Exp $
+// ------------------------------------------------------------------------ //
+// 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: Simon Roberts (AKA wishcraft) //
+// URL: http://www.chronolabs.org.au //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+ function vsort($array, $id="id", $sort_ascending=true, $is_object_array = false) {
+ $temp_array = array();
+ while(count($array)>0) {
+ $lowest_id = 0;
+ $index=0;
+ if($is_object_array){
+ foreach ($array as $item) {
+ ...
[truncated message content] |
|
From: <luc...@us...> - 2009-05-16 22:34:46
|
Revision: 3253
http://xoops.svn.sourceforge.net/xoops/?rev=3253&view=rev
Author: luciorota
Date: 2009-05-16 22:34:44 +0000 (Sat, 16 May 2009)
Log Message:
-----------
bugfix: once again! != is better !== ;-)
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2009-05-16 22:25:16 UTC (rev 3252)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2009-05-16 22:34:44 UTC (rev 3253)
@@ -168,7 +168,7 @@
if ( isset($this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"]) ) {
$checklist = explode(",", $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"] );
foreach ( $checklist as $plugin ) {
- if ( strpos( strtolower($plugin), "xoops") !== false ) {
+ if ( strpos( strtolower($plugin), "xoops") != false ) {
if ( in_array( $plugin, $this->xoopsPlugins ) ) {
$buttons[] = $plugin;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2009-05-16 22:25:24
|
Revision: 3252
http://xoops.svn.sourceforge.net/xoops/?rev=3252&view=rev
Author: luciorota
Date: 2009-05-16 22:25:16 +0000 (Sat, 16 May 2009)
Log Message:
-----------
small bugfix: != is better than !== ;-)
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2009-05-16 21:11:45 UTC (rev 3251)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2009-05-16 22:25:16 UTC (rev 3252)
@@ -222,7 +222,7 @@
$xoopsPlugins = array();
$allplugins = XoopsLists::getDirListAsArray( XOOPS_ROOT_PATH . $this->rootpath . "/plugins" );
foreach ( $allplugins as $plugin ) {
- if ( strpos( strtolower($plugin), "xoops") !== false && file_exists(XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php") ) {
+ if ( strpos( strtolower($plugin), "xoops") != false && file_exists(XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php") ) {
if ( $right = @include XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php" ) {
$xoopsPlugins[$plugin] = $plugin;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-16 21:11:58
|
Revision: 3251
http://xoops.svn.sourceforge.net/xoops/?rev=3251&view=rev
Author: wishcraft
Date: 2009-05-16 21:11:45 +0000 (Sat, 16 May 2009)
Log Message:
-----------
xTRANSAM 1.04 (Release) - Language Translator
Modified Paths:
--------------
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/xoops_version.php
Added Paths:
-----------
XoopsModules/xtransam/releases/1.04/
XoopsModules/xtransam/releases/1.04/xtransam/
XoopsModules/xtransam/releases/1.04/xtransam/admin/
XoopsModules/xtransam/releases/1.04/xtransam/admin/admin_header.php
XoopsModules/xtransam/releases/1.04/xtransam/admin/index.html
XoopsModules/xtransam/releases/1.04/xtransam/admin/index.php
XoopsModules/xtransam/releases/1.04/xtransam/admin/menu.php
XoopsModules/xtransam/releases/1.04/xtransam/class/
XoopsModules/xtransam/releases/1.04/xtransam/class/files.php
XoopsModules/xtransam/releases/1.04/xtransam/class/googleprovider.php
XoopsModules/xtransam/releases/1.04/xtransam/class/index.html
XoopsModules/xtransam/releases/1.04/xtransam/class/iobase.php
XoopsModules/xtransam/releases/1.04/xtransam/class/languages.php
XoopsModules/xtransam/releases/1.04/xtransam/class/translator.php
XoopsModules/xtransam/releases/1.04/xtransam/images/
XoopsModules/xtransam/releases/1.04/xtransam/images/Thumbs.db
XoopsModules/xtransam/releases/1.04/xtransam/images/index.html
XoopsModules/xtransam/releases/1.04/xtransam/images/left_both.gif
XoopsModules/xtransam/releases/1.04/xtransam/images/right_both.gif
XoopsModules/xtransam/releases/1.04/xtransam/images/xtransam_slogo.png
XoopsModules/xtransam/releases/1.04/xtransam/include/
XoopsModules/xtransam/releases/1.04/xtransam/include/forms.php
XoopsModules/xtransam/releases/1.04/xtransam/include/functions.php
XoopsModules/xtransam/releases/1.04/xtransam/include/index.html
XoopsModules/xtransam/releases/1.04/xtransam/include/update.php
XoopsModules/xtransam/releases/1.04/xtransam/language/
XoopsModules/xtransam/releases/1.04/xtransam/language/english/
XoopsModules/xtransam/releases/1.04/xtransam/language/english/admin.php
XoopsModules/xtransam/releases/1.04/xtransam/language/english/index.html
XoopsModules/xtransam/releases/1.04/xtransam/language/english/modinfo.php
XoopsModules/xtransam/releases/1.04/xtransam/language/index.html
XoopsModules/xtransam/releases/1.04/xtransam/sql/
XoopsModules/xtransam/releases/1.04/xtransam/sql/index.html
XoopsModules/xtransam/releases/1.04/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.04/xtransam/xoops_version.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/update.php
Property Changed:
----------------
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/
Added: XoopsModules/xtransam/releases/1.04/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/admin/admin_header.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/admin/admin_header.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,50 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ error_reporting(E_ALL);
+include '../../../mainfile.php';
+include '../../../include/cp_header.php';
+include '../include/functions.php';
+
+include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+
+if (is_object($xoopsUser)) {
+ $xoopsModule = XoopsModule::getByDirname('xtransam');
+ if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
+ redirect_header(XOOPS_URL . "/", 3, _NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL . "/", 1, _NOPERM);
+ exit();
+}
+$myts = &MyTextSanitizer::getInstance();
+error_reporting(E_ALL);
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/admin/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/admin/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/admin/index.html 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/admin/index.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/admin/index.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/admin/index.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,233 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+define ("_CHARSET","UTF-8");
+define ("_CHARSET_ISO","ISO-8859-1");
+
+include 'admin_header.php';
+include_once '../include/forms.php';
+
+error_reporting(E_ALL);
+global $xoopsDB;
+
+ if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+ if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+
+ini_set("max_execution_time", "300");
+
+switch ($op){
+case "save-languages":
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ foreach($id as $key => $value)
+ {
+ switch($value){
+ case "new":
+ $lang = $lang_handler->create();
+ break;
+ default:
+ $lang = $lang_handler->get($value);
+ }
+
+ if (!empty($name[$key])&&!empty($code[$key])) {
+ $lang->setVar('name', $name[$key]);
+ $lang->setVar('code', $code[$key]);
+ $lang->setVar('foldername', $folder[$key]);
+ $lang->setVar('provider', $provider[$key]);
+ @$lang_handler->insert($lang);
+ }
+ }
+ redirect_header("index.php?op=languages",2,_XT_LANGSAVEOK);
+ break;
+case "languages":
+ xoops_cp_header();
+ adminMenu(3);
+ languagesForm_display();
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+case "export":
+ global $xoopsUser;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $files = $files_handler->getObjects($criteria);
+
+ $from_folder = $lang_handler->folder($io->getvar('languagefrom'));
+ $to_folder = $lang_handler->folder($io->getvar('languageto'));
+
+ foreach($files as $file) {
+ $path = explode('/', $file->getVar('path'));
+
+ foreach($path as $key => $value)
+ if (strtolower($value) == strtolower($from_folder)) {
+ $path[$key] = $to_folder;
+ }
+
+ $wpath = implode('/', $path).'/';
+
+ if($wpath!=$file->getVar('path')){
+ $bfile = file($file->getVar('path').$file->getVar('filename'));
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new Criteria('fileid', $file->getVar('id')));
+ $trans = $trans_handler->getObjects($criteria);
+ foreach($trans as $tran) {
+ $search = $trans_handler->change_charset(hex2bin($tran->getVar('replacestr')), _CHARSET_ISO, _CHARSET);
+ $name = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET);
+ $translation = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET);
+ $translation = str_replace('\"', '"', $translation);
+ $translation = str_replace('"', '\"', $translation);
+ $replace = 'define("'.$name.'", "'.$translation.'");';
+ $bfile[$tran->getVar('line')] = str_replace($search, $replace, $bfile[$tran->getVar('line')]);
+ }
+ @makeWritable($wpath, true);
+ if (file_exists($wpath.$file->getVar('filename')))
+ unlink($wpath.$file->getVar('filename'));
+ $file = @fopen($wpath.$file->getVar('filename'), 'w');
+ $bfile[-1] = "<?php // Translation done by xtransam & ".$xoopsUser->uname()." - ".date('Y-m-d H:i')." ?>\n";
+ $buffer = implode('', $bfile);
+ fwrite($file, $buffer, strlen($buffer));
+ fclose($file);
+
+ }
+
+ }
+ redirect_header("index.php?op=bbs",2,_XT_EXPORTCOMPLETE);
+ break;
+case "save":
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ foreach($trans as $key => $value) {
+ $tran = $trans_handler->get($key);
+ $tran->setVar('hexval_translation', bin2hex($trans_handler->change_charset($value, _CHARSET, _CHARSET_ISO)));
+ $trans_handler->insert($tran);
+ }
+ redirect_header("index.php?op=manage&id=$id&fileid=$fileid",2,_XT_SAVECOMPLETE);
+ break;
+case "manage":
+ xoops_cp_header();
+ adminMenu(2);
+ managerForm_display($id, $fileid);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "analysis":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->analysepath($io);
+ redirect_header("index.php?op=bbs",2,_XT_ANLYSISCOMPLETE);
+ break;
+
+case "import":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->importfiles($io);
+ redirect_header("index.php?op=bbs",2,_XT_IMPORTCOMPLETE);
+ break;
+
+case "translate":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($trans_handler->getCount($criteria)>0) {
+ $trans = $trans_handler->getObjects($criteria);
+ $start = time();
+ foreach($trans as $tran) {
+ if ($tran->isempty()){
+ $from = $lang_handler->code($io->getVar('languagefrom'));
+ $to = $lang_handler->code($io->getVar('languageto'));
+ $provider = $lang_handler->provider($tran->getVar('toid'));
+ if (strlen($provider)>0) {
+ $provider_handler = xoops_getmodulehandler($provider.'provider', 'xtransam');
+ $translation = $trans_handler->change_charset($provider_handler->translate($from,$to, $tran->getVar('hexval_orginal')), _CHARSET, _CHARSET_ISO);
+ $tran->setVar('hexval_translation', bin2hex($translation));
+ if (strlen($translation)>0)
+ $tran->setVar('auto', 1);
+ else
+ $tran->setVar('auto', 0);
+ $trans_handler->insert($tran);
+ }
+ if ($start+28<time())
+ {
+ $restart++;
+ redirect_header("index.php?op=translate&id=$id&restart=$restart",2,sprintf(_XT_30SECONDSCONTINUING, $restart));
+ }
+ }
+ }
+ }
+ redirect_header("index.php?op=bbs",2,_XT_TRANSLATIONCOMPLETE);
+ break;
+
+case "languages":
+
+ break;
+case "bbs":
+
+ xoops_cp_header();
+ adminMenu(2);
+ translationForm_display(false);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "wizard":
+default:
+
+ xoops_cp_header();
+ adminMenu(1);
+ wizardForm_display($step);
+ translationForm_display(true);
+ footer_adminMenu();
+ xoops_cp_footer();
+ break;
+
+}
+
+
+
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/admin/menu.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/admin/menu.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/admin/menu.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,38 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+global $adminmenu;
+$adminmenu = array();
+$adminmenu[1]['title'] = _MI_XTRANSAM_ADMENU1;
+$adminmenu[1]['link'] = "admin/index.php?op=wizard";
+$adminmenu[2]['title'] = _MI_XTRANSAM_ADMENU2;
+$adminmenu[2]['link'] = "admin/index.php?op=bbs";
+$adminmenu[3]['title'] = _MI_XTRANSAM_ADMENU3;
+$adminmenu[3]['link'] = "admin/index.php?op=languages";
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/files.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/files.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/files.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,208 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamFiles extends XoopsObject
+{
+
+ function XtransamFiles($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT);
+ $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('imported', XOBJ_DTYPE_INT, 0);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamFilesHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+ var $regex = '/define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*) \);|define\((.*)\);|define \((.*)\);|define \((.*)\);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*)\);|define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( (.*) \);|define\( (.*) \);/';
+ var $seperator = array('", "', '","', '" , "', '" , "', '", "', '" , "',
+ '", \'', '",\'', '" , \'', '" , \'', '", \'', '" , \'' ,
+ '\', \'', '\',\'', '\' , \'', '\' , \'', '\', \'', '\' , \'',
+ '\', "', '\',"', '\' , "', '\' , "', '\', "', '\' , "');
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_files", 'XtransamFiles', "id", "path");
+ }
+
+ function importfiles($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $io->getVar('id')), 'AND');
+ $criteria->add(new Criteria('`imported`', 0), 'AND');
+ $files = $this->getObjects($criteria);
+
+ foreach ($files as $file) {
+ $content = file_get_contents($file->getVar('path').'/'.$file->getVar('filename'));
+ $lines = explode("\n", $content);
+ foreach($lines as $key => $line) {
+ if (strpos(' '.$line,'define')>0) {
+ @preg_match_all($this->regex, $line, $matches);
+
+ $def = array();
+ foreach($matches as $match)
+ foreach($match as $result) {
+ if (!empty($result)&&substr($result,0,6)!='define') {
+ foreach($this->seperator as $sep)
+ if (strpos($result, $sep)>0)
+ if (count(explode($sep, $result))==2)
+ $result = explode($sep, $result);
+
+ $def[0] = substr(trim($result[0]),1);
+ $def[1] = substr(trim($result[1]),0, strlen(trim($result[1]))-1);
+ } elseif (substr($result,0,6)=='define') {
+ $def[3] = $result;
+ }
+ }
+
+
+ if (!empty($def[0])&&!empty($def[1])) {
+ $trans = $trans_handler->create();
+ $trans->setVar('ioid',$io->getVar('id'));
+ $trans->setVar('fromid',$io->getVar('languagefrom'));
+ $trans->setVar('toid',$io->getVar('languageto'));
+ $trans->setVar('fileid',$file->getVar('id'));
+ $trans->setVar('linetype','define');
+ $trans->setVar('line', $key);
+ $trans->setVar('hexval_name',bin2hex($trans_handler->change_charset($def[0], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('hexval_orginal',bin2hex($trans_handler->change_charset($def[1], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('replacestr',bin2hex($trans_handler->change_charset($def[3], _CHARSET, _CHARSET_ISO)));
+
+ if (!$trans_handler->exists($trans))
+ $trans_handler->insert($trans);
+ }
+ }
+ }
+
+ $file->setVar('imported', '1');
+ $this->insert($file);
+
+ }
+ }
+
+
+ function analysepath($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ switch ($io->getVar('point'))
+ {
+ case "core":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/language/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/language/'.$io->getVar('path');
+ break;
+ case "module":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path');
+ break;
+ }
+
+ foreach($files as $key => $file)
+ {
+ if (file_exists($file)) {
+ $tfile = $this->create();
+ $tfile->setVar('filename', basename($file));
+ $tfile->setVar('path', str_replace(basename($file),'',$file));
+ $tfile->setVar('ioid', $io->getVar('id'));
+ if (!$this->exists($tfile))
+ @$this->insert($tfile);
+ }
+ }
+
+ }
+
+ private function dirToArray($directory, $recursive, $fileext = 'php') {
+ $array_items = array();
+ if ($handle = opendir($directory)) {
+ while (false !== ($file = readdir($handle))) {
+ $filecomp = explode('.', $file);
+ if ($file != "." && $file != "..") {
+ if (is_dir($directory. "/" . $file)) {
+ if($recursive) {
+ $array_items = array_merge($array_items, $this->dirToArray($directory. "/" . $file, $recursive));
+ }
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ } else {
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ }
+ }
+ }
+ closedir($handle);
+ }
+ return $array_items;
+ }
+
+ function exists($file)
+ {
+ if (!is_a($file, 'XtransamFiles'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $file->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`path`', $file->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`filename`', $file->getVar('filename')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/googleprovider.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/googleprovider.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/googleprovider.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,120 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamGoogleprovider extends XoopsObject
+{
+
+ function XtransamGoogleprovider($id = null)
+ {
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamGoogleproviderHandler extends XoopsPersistableObjectHandler
+{
+
+ var $url = "http://ajax.googleapis.com/ajax/services/language/translate";
+ var $retrieve = array('start' => '<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>',
+ 'end' => '</textarea>');
+
+ function __construct(&$db)
+ { }
+
+ function translate($fromcode, $tocode, $hexvalue)
+ {
+
+ $response = $this->send_post($this->url, $this->hex2bin($hexvalue), $fromcode, $tocode, XOOPS_URL);
+ if (preg_match("/{\"translatedText\":\"([^\"]+)\"/i", $response, $matches)) {
+ return self::_unescapeUTF8EscapeSeq($this->clean($matches[1]));
+ }
+ }
+
+ private function _unescapeUTF8EscapeSeq($str) {
+ return preg_replace_callback("/\\\u([0-9a-f]{4})/i", create_function('$matches', 'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_NOQUOTES, \'UTF-8\');'), $str);
+ }
+
+ private function hex2bin($h)
+ {
+ if (!is_string($h)) return null;
+ $r='';
+ for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); }
+ return $r;
+ }
+
+ private function clean($var)
+ {
+ $var = htmlspecialchars_decode($var);
+ $var = str_replace('% s', ' %s ', $var);
+ $var = str_replace('% u', ' %u ', $var);
+ $var = str_replace('% d', ' %d ', $var);
+ if (strpos($var, 'text/css'))
+ $var ='';
+ return $var;
+ }
+
+ function send_post($url, $text, $from, $to, $referer = null)
+ {
+ $langpair = $from.'|'.$to;
+ $text = $text;
+
+ $params = array('http' =>
+ array(
+ 'method' => 'POST',
+ 'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
+ "Referer: $referer\r\n",
+ "content"=> http_build_query(array('langpair'=>$langpair, 'q'=>$text, 'v'=>'1.0'))
+ )
+ );
+ $ctx = stream_context_create($params);
+ $fp = fopen($url, 'rb', false, $ctx);
+ $response = stream_get_contents($fp);
+
+ return $response;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/index.html 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/iobase.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/iobase.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/iobase.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,155 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamIobase extends XoopsObject
+{
+
+ function XtransamIobase($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('point', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('languagefrom', XOBJ_DTYPE_INT, null);
+ $this->initVar('languageto', XOBJ_DTYPE_INT, null);
+ $this->initVar('done', XOBJ_DTYPE_INT, null);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamIobaseHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_iobase", 'XtransamIobase', "id", "path");
+ }
+
+ function insert($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ if (!$this->exists($io))
+ $sql = "INSERT INTO ".$this->db->prefix('xtransam_iobase')." (`point`, `path`, `languagefrom`, `languageto`) VALUES ('".$io->getVar('point')."', '".$io->getVar('path')."', '".$io->getVar('languagefrom')."', '".$io->getVar('languageto')."')";
+ else
+ $sql = "UPDATE ".$this->db->prefix('xtransam_iobase')." SET `point` = '".$io->getVar('point')."', `path` = '".$io->getVar('path')."', `languagefrom` = '".$io->getVar('languagefrom')."', `languageto` = '".$io->getVar('languageto')."', `total` = '".$io->getVar('total')."', `done` = '".$io->getVar('done')."' where `id` = ".$io->getVar('id');
+
+ return $this->db->queryF($sql);
+
+ }
+
+ function &getObjects($criteria = null, $fields = null, $asObject = true, $id_as_key = true)
+ {
+ if (is_array($fields) && count($fields) > 0) {
+ if (! in_array($this->handler->keyName, $fields)) {
+ $fields[] = $this->handler->keyName;
+ }
+ $select = "`" . implode("`, `", $fields) . "`";
+ } else {
+ $select = "*";
+ }
+ $limit = null;
+ $start = null;
+ $sql = "SELECT {$select} FROM `".$this->db->prefix('xtransam_iobase')."`";
+ if (isset($criteria) && is_subclass_of($criteria, "criteriaelement")) {
+ $sql .= " " . $criteria->renderWhere();
+ if ($sort = $criteria->getSort()) {
+ $sql .= " ORDER BY {$sort} " . $criteria->getOrder();
+ $orderSet = true;
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ if (empty($orderSet)) {
+ // $sql .= " ORDER BY `{$this->handler->keyName}` DESC";
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ $ret = array();
+ if ($asObject) {
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object = &$this->create(false);
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object;
+ } else {
+ $ret[] = $object;
+ }
+ unset($object);
+ }
+ } else {
+ $object = &$this->create(false);
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object->getValues(array_keys($myrow));
+ } else {
+ $ret[] = $object->getValues(array_keys($myrow));
+ }
+ }
+ unset($object);
+ }
+ return $ret;
+ }
+
+ function exists($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return true;
+
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`point`', $io->getVar('point')), 'AND');
+ $criteria->add(new Criteria('`path`', $io->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`languagefrom`', $io->getVar('languagefrom')), 'AND');
+ $criteria->add(new Criteria('`languageto`', $io->getVar('languageto')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/languages.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/languages.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/languages.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,132 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamLanguages extends XoopsObject
+{
+
+ function XtransamLanguages($id = null)
+ {
+ $this->initVar('lang_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('provider', XOBJ_DTYPE_TXTBOX, null, false, 20);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('code', XOBJ_DTYPE_TXTBOX, null, true, 6);
+ $this->initVar('foldername', XOBJ_DTYPE_TXTBOX, null, false, 255);
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamLanguagesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, "xtransam_languages", 'XtransamLanguages', "lang_id", "name");
+ }
+
+ function name($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['name'];
+ } else {
+ return false;
+ }
+ }
+
+ function provider($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['provider'];
+ } else {
+ return false;
+ }
+ }
+
+ function folder($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ if (empty($objs[0]['foldername']))
+ return strtolower($objs[0]['name']);
+ else
+ return strtolower($objs[0]['foldername']);
+
+ } else {
+ return false;
+ }
+ }
+
+ function code($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false);
+ return $objs[0]['code'];
+ } else {
+ return false;
+ }
+ }
+
+ function validlanguage($name)
+ {
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`name`', $name, 'LIKE'), 'OR');
+ $criteria->add(new Criteria('`foldername`', $name, 'LIKE'), 'OR');
+ if ($this->getCount($criteria)>0)
+ {
+ $objs = $this->getObjects($criteria);
+ return $objs[0]->getVar('lang_id');
+ } else {
+ return false;
+ }
+
+ }
+
+}
+?>
Added: XoopsModules/xtransam/releases/1.04/xtransam/class/translator.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/class/translator.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/class/translator.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,127 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamTranslator extends XoopsObject
+{
+
+ function XtransamTranslator($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fromid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('toid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fileid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('linetype', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('hexval_name', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_orginal', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_translation', XOBJ_DTYPE_OTHER);
+ $this->initVar('replacestr', XOBJ_DTYPE_OTHER, null);
+ $this->initVar('out', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('line', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('auto', XOBJ_DTYPE_INT, null, false);
+ }
+
+ function isempty()
+ {
+ $hexval_translation = $this->getVar('hexval_translation');
+ return empty($hexval_translation);
+ }
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamTranslatorHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_translator", 'XtransamTranslator', "id", "hexval_name");
+ }
+
+ function change_charset($text, $charset_output = 'UTF-8', $charset_input = 'ISO-8859-1')
+ {
+ // Values can be : UTF-8 ; ASCII
+ //$detected_encoding = mb_detect_encoding($text);
+ // if ($charset_output == $detected_encoding) {
+ if ($charset_output == $charset_input) {
+ // Encoding is already good
+ return $text;
+ } elseif ($charset_output == 'UTF-8' && $charset_input == 'ISO-8859-1') {
+ // ISO-8859-1 -> UTF8
+ return utf8_encode($text);
+ } elseif ($charset_output == 'ISO-8859-1' && $charset_input == 'UTF-8') {
+ // UTF8 -> ISO-8859-1
+ return utf8_decode($text);
+ } else {
+ // * -> UTF8
+ if (function_exists("mb_convert_encoding")) {
+ return mb_convert_encoding($text, $charset_output, $charset_input);
+ }else{
+ return $text;
+ }
+
+ }
+ }
+
+ function exists($trans)
+ {
+ if (!is_a($trans, 'XtransamTranslator'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $trans->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`fromid`', $trans->getVar('fromid')), 'AND');
+ $criteria->add(new Criteria('`toid`', $trans->getVar('toid')), 'AND');
+ $criteria->add(new Criteria('`fileid`', $trans->getVar('fileid')), 'AND');
+ $criteria->add(new Criteria('`linetype`', $trans->getVar('linetype')), 'AND');
+ $criteria->add(new Criteria('`hexval_name`', $trans->getVar('hexval_name')), 'AND');
+
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.04/xtransam/images/Thumbs.db
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.04/xtransam/images/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/images/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/images/index.html 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.04/xtransam/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.04/xtransam/images/left_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.04/xtransam/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.04/xtransam/images/right_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.04/xtransam/images/xtransam_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.04/xtransam/images/xtransam_slogo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.04/xtransam/include/forms.php
===================================================================
--- XoopsModules/xtransam/releases/1.04/xtransam/include/forms.php (rev 0)
+++ XoopsModules/xtransam/releases/1.04/xtransam/include/forms.php 2009-05-16 21:11:45 UTC (rev 3251)
@@ -0,0 +1,312 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ function languagesForm_display() {
+ $form_sel = new XoopsThemeForm(_XT_LANGUAGEMATRIX, "languages", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $langs = $lang_handler->getObjects(NULL);
+
+ $ele_tray[0] = new XoopsFormElementTray(_XT_NEWLANG,' ');
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_NAME, 'name[0]', 26, 255));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_CODE, 'code[0]', 10, 6));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_FOLDER, 'folder[0]', 26, 255));
+
+ $ele_select = new XoopsFormSelect(_XT_PROVIDER, 'provider[0]');
+ define(_XT_PROV_GOOGLE, 'google');
+ define(_XT_PROV_GOOGLEDESC, 'Google API');
+ $ele_select->addOption(_XT_PROV_GOOGLE, _XT_PROV_GOOGLEDESC);
+
+ $ele_tray[0]->addElement($ele_select);
+ $ele_tray[0]->addElement(new XoopsFormHidden('id[0]', 'new'));
+ $form_sel->addElement($ele_tray[0]);
+
+ foreach ($langs as $lang) {
+ $ele_tray[$lang->getVar('lang_id')] = new XoopsFormElementTray($lang->getVar('name'),' ');
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_NAME, 'name['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('name'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_CODE, 'code['.$lang->getVar('lang_id').']', 10, 6, htmlspecialchars($lang->getVar('code'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_FOLDER, 'folder['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('foldername'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormHidden('id['.$lang->getVar('id').']', $lang->getVar('lang_id')));
+ $ele_select->setValue($lang->getVar('id'));
+ $ele_tray[$lang->getVar('lang_id')]->addElement($ele_select);
+ $form_sel->addElement($ele_tray[$lang->getVar('lang_id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save-languages"));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+ function managerForm_display($ioid, $fileid)
+ {
+ $form_sel = new XoopsThemeForm(_XT_SELECTFILETOEDIT, "filesel", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $io = $io_handler->get($ioid);
+ $files = $files_handler->getObjects(new Criteria('ioid', $ioid));
+
+ if ($fileid==0)
+ $fileid = $files[0]->getVar('id');
+
+ $table_sel = new XoopsFormSelect(_XT_SELECTFILETOEDIT.':', 'select');
+ $table_sel->setExtra('');
+ $table_sel->setValue("index.php?op=manage&id=$ioid&fileid=".$fileid);
+ foreach($files as $file)
+ $table_sel->addOption("index.php?op=manage&id=$ioid&fileid=".$file->getVar('id'), $file->getVar('filename'));
+
+ $form_sel->addElement($table_sel);
+ $form_sel->display();
+
+ $form_sel = new XoopsThemeForm(sprintf(_XT_TRANSLATIONEDITOR, $lang_handler->name($io->getVar('languagefrom')), $lang_handler->name($io->getVar('languageto'))), "editor", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $trans = $trans_handler->getObjects(new Criteria('fileid', $fileid));
+ foreach($trans as $tran) {
+ $txtbox[$tran->getVar('id')] = new XoopsFormTextArea($trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET), 'trans['.$tran->getVar('id').']', $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET), 2, 85);
+ $txtbox[$tran->getVar('id')]->setDescription($lang_handler->name($tran->getVar('fromid')).": ".$trans_handler->change_charset(hex2bin($tran->getVar('hexval_orginal')), _CHARSET_ISO, _CHARSET));
+ $form_sel->addElement($txtbox[$tran->getVar('id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save"));
+ $form_sel->addElement(new XoopsFormHidden("id", $ioid));
+ $form_sel->addElement(new XoopsFormHidden("fileid", $fileid));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+
+ function translationForm_display($display=false)
+ {
+ $form_sel = new XoopsThemeForm(_XT_TRANSLATIONBUFFER, "transgo", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $ios = $io_handler->getObjects(NULL);
+ foreach ($ios as $io) {
+ $ele_tray[$io->getVar('id')] = new XoopsFormElementTray($io->getVar('point'),' ');
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPATH, $io->getVar('path')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPOINT, $io->getVar('point')));
+ $lang_from = $lang_handler->get($io->getVar('languagefrom'));
+ $lang_to = $lang_handler->get($io->getVar('languageto'));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEFROM, $lang_from->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATETO, $lang_to->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=deletebuffer&id='.$io->getVar('id').'">'._DELETE.'</a>'));
+ if ($display==false) {
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($files_handler->getCount($criteria)==0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=analysis&id='.$io->getVar('id').'">'._XT_ANALYSIS.'</a>'));
+ } else {
+ $criteria->add(new Criteria('imported', '0'));
+ if ($files_handler->getCount($criteria)>0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=import&id='.$io->getVar('id').'">'._XT_IMPORT.'</a>'));
+ } else {
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-16 20:59:57
|
Revision: 3250
http://xoops.svn.sourceforge.net/xoops/?rev=3250&view=rev
Author: wishcraft
Date: 2009-05-16 20:59:49 +0000 (Sat, 16 May 2009)
Log Message:
-----------
#forumpost311623 - Field Missing from SQL sql/mysql.sql
Modified Paths:
--------------
XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
Removed Paths:
-------------
XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql.bak
Modified: XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,12 +1,12 @@
+CREATE TABLE `xtransam_files` (
+`id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+`ioid` INT(12) UNSIGNED DEFAULT '0',
+`filename` VARCHAR(255) DEFAULT NULL,
+`path` VARCHAR(255) DEFAULT NULL,
+`imported` TINYINT(2) DEFAULT '0',
+PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
Deleted: XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql.bak
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql.bak 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql.bak 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,90 +0,0 @@
-
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_iobase` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `point` enum('core','module') DEFAULT 'module',
- `path` varchar(255) DEFAULT NULL,
- `languagefrom` smallint(6) DEFAULT '0',
- `languageto` smallint(6) DEFAULT '0',
- `total` int(12) DEFAULT '0',
- `done` int(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_languages` (
- `lang_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
- `provider` enum('google') DEFAULT NULL,
- `name` varchar(255) DEFAULT NULL,
- `code` varchar(6) DEFAULT NULL,
- `foldername` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`lang_id`)
-) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (1,'google','Albanian','sq',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (2,'google','Arabic','ar',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (3,'google','Bulgarian','bg',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (4,'google','Catalan','ca',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (5,'google','Chinese (Simplified)','zh-CN','schinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (6,'google','Chinese (Traditional)','zh-TW','tchinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (7,'google','Croatian','hr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (8,'google','Czech','cs',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (9,'google','Danish','da',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (10,'google','Dutch','nl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (11,'google','English','en',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (12,'google','Estonian','et',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (13,'google','Filipino','tl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (14,'google','Finnish','fi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (15,'google','French','fr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (16,'google','Galician','gl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (17,'google','German','de',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (18,'google','Greek','el',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (19,'google','Hebrew','iw',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (20,NULL,'Hindi','hi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (21,'google','Hungarian','hu',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (22,'google','Indonesian','id',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (23,'google','Italian','it',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (24,'google','Japanese','ja',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (25,'google','Korean','ko',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (26,'google','Latvian','lv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (27,'google','Lithuanian','lt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (28,'google','Maltese','mt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (29,'google','Norwegian','no',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (30,'google','Polish','pl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (31,'google','Portuguese','pt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (32,'google','Romanian','ro',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (33,'google','Russian','ru',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (34,'google','Serbian','sr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (35,'google','Slovak','sk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (36,'google','Slovenian','sl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (37,'google','Spanish','es',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (38,'google','Swedish','sv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (39,'google','Thai','th',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (40,'google','Turkish','tr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (41,'google','Ukrainian','uk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (42,'google','Vietnamese','vi',NULL);
-
-CREATE TABLE `xtransam_translator` (
- `id` INT(30) UNSIGNED NOT NULL AUTO_INCREMENT,
- `ioid` INT(12) UNSIGNED DEFAULT '0',
- `fromid` SMALLINT(6) DEFAULT '0',
- `toid` SMALLINT(6) DEFAULT '0',
- `fileid` INT(12) DEFAULT '0',
- `linetype` ENUM('define') DEFAULT 'define',
- `hexval_name` MEDIUMTEXT,
- `hexval_orginal` MEDIUMTEXT,
- `hexval_translation` MEDIUMTEXT,
- `replacestr` MEDIUMTEXT,
- `out` ENUM('1','0') DEFAULT '0',
- `line` INT(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
-
Modified: XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,14 +1,12 @@
+CREATE TABLE `xtransam_files` (
+`id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+`ioid` INT(12) UNSIGNED DEFAULT '0',
+`filename` VARCHAR(255) DEFAULT NULL,
+`path` VARCHAR(255) DEFAULT NULL,
+`imported` TINYINT(2) DEFAULT '0',
+PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
-CREATE TABLE `xtransam_files` (
- `id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
- `ioid` INT(12) UNSIGNED DEFAULT '0',
- `filename` VARCHAR(255) DEFAULT NULL,
- `path` VARCHAR(255) DEFAULT NULL,
- `imported` TINYINT(2) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MYISAM CHARSET=utf8;
-
-
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
Modified: XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,12 +1,12 @@
+CREATE TABLE `xtransam_files` (
+`id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+`ioid` INT(12) UNSIGNED DEFAULT '0',
+`filename` VARCHAR(255) DEFAULT NULL,
+`path` VARCHAR(255) DEFAULT NULL,
+`imported` TINYINT(2) DEFAULT '0',
+PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
Deleted: XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql.bak
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql.bak 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql.bak 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,90 +0,0 @@
-
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_iobase` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `point` enum('core','module') DEFAULT 'module',
- `path` varchar(255) DEFAULT NULL,
- `languagefrom` smallint(6) DEFAULT '0',
- `languageto` smallint(6) DEFAULT '0',
- `total` int(12) DEFAULT '0',
- `done` int(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_languages` (
- `lang_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
- `provider` enum('google') DEFAULT NULL,
- `name` varchar(255) DEFAULT NULL,
- `code` varchar(6) DEFAULT NULL,
- `foldername` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`lang_id`)
-) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (1,'google','Albanian','sq',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (2,'google','Arabic','ar',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (3,'google','Bulgarian','bg',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (4,'google','Catalan','ca',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (5,'google','Chinese (Simplified)','zh-CN','schinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (6,'google','Chinese (Traditional)','zh-TW','tchinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (7,'google','Croatian','hr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (8,'google','Czech','cs',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (9,'google','Danish','da',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (10,'google','Dutch','nl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (11,'google','English','en',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (12,'google','Estonian','et',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (13,'google','Filipino','tl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (14,'google','Finnish','fi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (15,'google','French','fr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (16,'google','Galician','gl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (17,'google','German','de',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (18,'google','Greek','el',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (19,'google','Hebrew','iw',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (20,NULL,'Hindi','hi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (21,'google','Hungarian','hu',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (22,'google','Indonesian','id',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (23,'google','Italian','it',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (24,'google','Japanese','ja',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (25,'google','Korean','ko',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (26,'google','Latvian','lv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (27,'google','Lithuanian','lt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (28,'google','Maltese','mt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (29,'google','Norwegian','no',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (30,'google','Polish','pl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (31,'google','Portuguese','pt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (32,'google','Romanian','ro',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (33,'google','Russian','ru',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (34,'google','Serbian','sr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (35,'google','Slovak','sk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (36,'google','Slovenian','sl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (37,'google','Spanish','es',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (38,'google','Swedish','sv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (39,'google','Thai','th',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (40,'google','Turkish','tr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (41,'google','Ukrainian','uk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (42,'google','Vietnamese','vi',NULL);
-
-CREATE TABLE `xtransam_translator` (
- `id` INT(30) UNSIGNED NOT NULL AUTO_INCREMENT,
- `ioid` INT(12) UNSIGNED DEFAULT '0',
- `fromid` SMALLINT(6) DEFAULT '0',
- `toid` SMALLINT(6) DEFAULT '0',
- `fileid` INT(12) DEFAULT '0',
- `linetype` ENUM('define') DEFAULT 'define',
- `hexval_name` MEDIUMTEXT,
- `hexval_orginal` MEDIUMTEXT,
- `hexval_translation` MEDIUMTEXT,
- `replacestr` MEDIUMTEXT,
- `out` ENUM('1','0') DEFAULT '0',
- `line` INT(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
-
Modified: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql 2009-05-16 18:33:20 UTC (rev 3249)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql 2009-05-16 20:59:49 UTC (rev 3250)
@@ -1,12 +1,12 @@
+CREATE TABLE `xtransam_files` (
+`id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+`ioid` INT(12) UNSIGNED DEFAULT '0',
+`filename` VARCHAR(255) DEFAULT NULL,
+`path` VARCHAR(255) DEFAULT NULL,
+`imported` TINYINT(2) DEFAULT '0',
+PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-16 18:33:30
|
Revision: 3249
http://xoops.svn.sourceforge.net/xoops/?rev=3249&view=rev
Author: wishcraft
Date: 2009-05-16 18:33:20 +0000 (Sat, 16 May 2009)
Log Message:
-----------
xTRANSAM 1.03 (Release) - Language Translator
Modified Paths:
--------------
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/xoops_version.php
Added Paths:
-----------
XoopsModules/xtransam/releases/1.03/
XoopsModules/xtransam/releases/1.03/xtransam/
XoopsModules/xtransam/releases/1.03/xtransam/admin/
XoopsModules/xtransam/releases/1.03/xtransam/admin/admin_header.php
XoopsModules/xtransam/releases/1.03/xtransam/admin/index.html
XoopsModules/xtransam/releases/1.03/xtransam/admin/index.php
XoopsModules/xtransam/releases/1.03/xtransam/admin/menu.php
XoopsModules/xtransam/releases/1.03/xtransam/class/
XoopsModules/xtransam/releases/1.03/xtransam/class/files.php
XoopsModules/xtransam/releases/1.03/xtransam/class/googleprovider.php
XoopsModules/xtransam/releases/1.03/xtransam/class/index.html
XoopsModules/xtransam/releases/1.03/xtransam/class/iobase.php
XoopsModules/xtransam/releases/1.03/xtransam/class/languages.php
XoopsModules/xtransam/releases/1.03/xtransam/class/translator.php
XoopsModules/xtransam/releases/1.03/xtransam/images/
XoopsModules/xtransam/releases/1.03/xtransam/images/Thumbs.db
XoopsModules/xtransam/releases/1.03/xtransam/images/index.html
XoopsModules/xtransam/releases/1.03/xtransam/images/left_both.gif
XoopsModules/xtransam/releases/1.03/xtransam/images/right_both.gif
XoopsModules/xtransam/releases/1.03/xtransam/images/xtransam_slogo.png
XoopsModules/xtransam/releases/1.03/xtransam/include/
XoopsModules/xtransam/releases/1.03/xtransam/include/forms.php
XoopsModules/xtransam/releases/1.03/xtransam/include/functions.php
XoopsModules/xtransam/releases/1.03/xtransam/include/index.html
XoopsModules/xtransam/releases/1.03/xtransam/language/
XoopsModules/xtransam/releases/1.03/xtransam/language/english/
XoopsModules/xtransam/releases/1.03/xtransam/language/english/admin.php
XoopsModules/xtransam/releases/1.03/xtransam/language/english/index.html
XoopsModules/xtransam/releases/1.03/xtransam/language/english/modinfo.php
XoopsModules/xtransam/releases/1.03/xtransam/language/index.html
XoopsModules/xtransam/releases/1.03/xtransam/sql/
XoopsModules/xtransam/releases/1.03/xtransam/sql/index.html
XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.03/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/releases/1.03/xtransam/xoops_version.php
Added: XoopsModules/xtransam/releases/1.03/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/admin/admin_header.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/admin/admin_header.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,50 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ error_reporting(E_ALL);
+include '../../../mainfile.php';
+include '../../../include/cp_header.php';
+include '../include/functions.php';
+
+include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+
+if (is_object($xoopsUser)) {
+ $xoopsModule = XoopsModule::getByDirname('xtransam');
+ if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
+ redirect_header(XOOPS_URL . "/", 3, _NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL . "/", 1, _NOPERM);
+ exit();
+}
+$myts = &MyTextSanitizer::getInstance();
+error_reporting(E_ALL);
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/admin/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/admin/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/admin/index.html 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/admin/index.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/admin/index.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/admin/index.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,233 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+define ("_CHARSET","UTF-8");
+define ("_CHARSET_ISO","ISO-8859-1");
+
+include 'admin_header.php';
+include_once '../include/forms.php';
+
+error_reporting(E_ALL);
+global $xoopsDB;
+
+ if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+ if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+
+ini_set("max_execution_time", "300");
+
+switch ($op){
+case "save-languages":
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ foreach($id as $key => $value)
+ {
+ switch($value){
+ case "new":
+ $lang = $lang_handler->create();
+ break;
+ default:
+ $lang = $lang_handler->get($value);
+ }
+
+ if (!empty($name[$key])&&!empty($code[$key])) {
+ $lang->setVar('name', $name[$key]);
+ $lang->setVar('code', $code[$key]);
+ $lang->setVar('foldername', $folder[$key]);
+ $lang->setVar('provider', $provider[$key]);
+ @$lang_handler->insert($lang);
+ }
+ }
+ redirect_header("index.php?op=languages",2,_XT_LANGSAVEOK);
+ break;
+case "languages":
+ xoops_cp_header();
+ adminMenu(3);
+ languagesForm_display();
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+case "export":
+ global $xoopsUser;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $files = $files_handler->getObjects($criteria);
+
+ $from_folder = $lang_handler->folder($io->getvar('languagefrom'));
+ $to_folder = $lang_handler->folder($io->getvar('languageto'));
+
+ foreach($files as $file) {
+ $path = explode('/', $file->getVar('path'));
+
+ foreach($path as $key => $value)
+ if (strtolower($value) == strtolower($from_folder)) {
+ $path[$key] = $to_folder;
+ }
+
+ $wpath = implode('/', $path).'/';
+
+ if($wpath!=$file->getVar('path')){
+ $bfile = file($file->getVar('path').$file->getVar('filename'));
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new Criteria('fileid', $file->getVar('id')));
+ $trans = $trans_handler->getObjects($criteria);
+ foreach($trans as $tran) {
+ $search = $trans_handler->change_charset(hex2bin($tran->getVar('replacestr')), _CHARSET_ISO, _CHARSET);
+ $name = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET);
+ $translation = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET);
+ $translation = str_replace('\"', '"', $translation);
+ $translation = str_replace('"', '\"', $translation);
+ $replace = 'define("'.$name.'", "'.$translation.'");';
+ $bfile[$tran->getVar('line')] = str_replace($search, $replace, $bfile[$tran->getVar('line')]);
+ }
+ @makeWritable($wpath, true);
+ if (file_exists($wpath.$file->getVar('filename')))
+ unlink($wpath.$file->getVar('filename'));
+ $file = @fopen($wpath.$file->getVar('filename'), 'w');
+ $bfile[-1] = "<?php // Translation done by xtransam & ".$xoopsUser->uname()." - ".date('Y-m-d H:i')." ?>\n";
+ $buffer = implode('', $bfile);
+ fwrite($file, $buffer, strlen($buffer));
+ fclose($file);
+
+ }
+
+ }
+ redirect_header("index.php?op=bbs",2,_XT_EXPORTCOMPLETE);
+ break;
+case "save":
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ foreach($trans as $key => $value) {
+ $tran = $trans_handler->get($key);
+ $tran->setVar('hexval_translation', bin2hex($trans_handler->change_charset($value, _CHARSET, _CHARSET_ISO)));
+ $trans_handler->insert($tran);
+ }
+ redirect_header("index.php?op=manage&id=$id&fileid=$fileid",2,_XT_SAVECOMPLETE);
+ break;
+case "manage":
+ xoops_cp_header();
+ adminMenu(2);
+ managerForm_display($id, $fileid);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "analysis":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->analysepath($io);
+ redirect_header("index.php?op=bbs",2,_XT_ANLYSISCOMPLETE);
+ break;
+
+case "import":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->importfiles($io);
+ redirect_header("index.php?op=bbs",2,_XT_IMPORTCOMPLETE);
+ break;
+
+case "translate":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($trans_handler->getCount($criteria)>0) {
+ $trans = $trans_handler->getObjects($criteria);
+ $start = time();
+ foreach($trans as $tran) {
+ if ($tran->isempty()){
+ $from = $lang_handler->code($io->getVar('languagefrom'));
+ $to = $lang_handler->code($io->getVar('languageto'));
+ $provider = $lang_handler->provider($tran->getVar('toid'));
+ if (strlen($provider)>0) {
+ $provider_handler = xoops_getmodulehandler($provider.'provider', 'xtransam');
+ $translation = $trans_handler->change_charset($provider_handler->translate($from,$to, $tran->getVar('hexval_orginal')), _CHARSET, _CHARSET_ISO);
+ $tran->setVar('hexval_translation', bin2hex($translation));
+ if (strlen($translation)>0)
+ $tran->setVar('auto', 1);
+ else
+ $tran->setVar('auto', 0);
+ $trans_handler->insert($tran);
+ }
+ if ($start+28<time())
+ {
+ $restart++;
+ redirect_header("index.php?op=translate&id=$id&restart=$restart",2,sprintf(_XT_30SECONDSCONTINUING, $restart));
+ }
+ }
+ }
+ }
+ redirect_header("index.php?op=bbs",2,_XT_TRANSLATIONCOMPLETE);
+ break;
+
+case "languages":
+
+ break;
+case "bbs":
+
+ xoops_cp_header();
+ adminMenu(2);
+ translationForm_display(false);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "wizard":
+default:
+
+ xoops_cp_header();
+ adminMenu(1);
+ wizardForm_display($step);
+ translationForm_display(true);
+ footer_adminMenu();
+ xoops_cp_footer();
+ break;
+
+}
+
+
+
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/admin/menu.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/admin/menu.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/admin/menu.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,38 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+global $adminmenu;
+$adminmenu = array();
+$adminmenu[1]['title'] = _MI_XTRANSAM_ADMENU1;
+$adminmenu[1]['link'] = "admin/index.php?op=wizard";
+$adminmenu[2]['title'] = _MI_XTRANSAM_ADMENU2;
+$adminmenu[2]['link'] = "admin/index.php?op=bbs";
+$adminmenu[3]['title'] = _MI_XTRANSAM_ADMENU3;
+$adminmenu[3]['link'] = "admin/index.php?op=languages";
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/files.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/files.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/files.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,208 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamFiles extends XoopsObject
+{
+
+ function XtransamFiles($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT);
+ $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('imported', XOBJ_DTYPE_INT, 0);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamFilesHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+ var $regex = '/define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*) \);|define\((.*)\);|define \((.*)\);|define \((.*)\);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*)\);|define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( (.*) \);|define\( (.*) \);/';
+ var $seperator = array('", "', '","', '" , "', '" , "', '", "', '" , "',
+ '", \'', '",\'', '" , \'', '" , \'', '", \'', '" , \'' ,
+ '\', \'', '\',\'', '\' , \'', '\' , \'', '\', \'', '\' , \'',
+ '\', "', '\',"', '\' , "', '\' , "', '\', "', '\' , "');
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_files", 'XtransamFiles', "id", "path");
+ }
+
+ function importfiles($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $io->getVar('id')), 'AND');
+ $criteria->add(new Criteria('`imported`', 0), 'AND');
+ $files = $this->getObjects($criteria);
+
+ foreach ($files as $file) {
+ $content = file_get_contents($file->getVar('path').'/'.$file->getVar('filename'));
+ $lines = explode("\n", $content);
+ foreach($lines as $key => $line) {
+ if (strpos(' '.$line,'define')>0) {
+ @preg_match_all($this->regex, $line, $matches);
+
+ $def = array();
+ foreach($matches as $match)
+ foreach($match as $result) {
+ if (!empty($result)&&substr($result,0,6)!='define') {
+ foreach($this->seperator as $sep)
+ if (strpos($result, $sep)>0)
+ if (count(explode($sep, $result))==2)
+ $result = explode($sep, $result);
+
+ $def[0] = substr(trim($result[0]),1);
+ $def[1] = substr(trim($result[1]),0, strlen(trim($result[1]))-1);
+ } elseif (substr($result,0,6)=='define') {
+ $def[3] = $result;
+ }
+ }
+
+
+ if (!empty($def[0])&&!empty($def[1])) {
+ $trans = $trans_handler->create();
+ $trans->setVar('ioid',$io->getVar('id'));
+ $trans->setVar('fromid',$io->getVar('languagefrom'));
+ $trans->setVar('toid',$io->getVar('languageto'));
+ $trans->setVar('fileid',$file->getVar('id'));
+ $trans->setVar('linetype','define');
+ $trans->setVar('line', $key);
+ $trans->setVar('hexval_name',bin2hex($trans_handler->change_charset($def[0], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('hexval_orginal',bin2hex($trans_handler->change_charset($def[1], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('replacestr',bin2hex($trans_handler->change_charset($def[3], _CHARSET, _CHARSET_ISO)));
+
+ if (!$trans_handler->exists($trans))
+ $trans_handler->insert($trans);
+ }
+ }
+ }
+
+ $file->setVar('imported', '1');
+ $this->insert($file);
+
+ }
+ }
+
+
+ function analysepath($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ switch ($io->getVar('point'))
+ {
+ case "core":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/language/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/language/'.$io->getVar('path');
+ break;
+ case "module":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path');
+ break;
+ }
+
+ foreach($files as $key => $file)
+ {
+ if (file_exists($file)) {
+ $tfile = $this->create();
+ $tfile->setVar('filename', basename($file));
+ $tfile->setVar('path', str_replace(basename($file),'',$file));
+ $tfile->setVar('ioid', $io->getVar('id'));
+ if (!$this->exists($tfile))
+ @$this->insert($tfile);
+ }
+ }
+
+ }
+
+ private function dirToArray($directory, $recursive, $fileext = 'php') {
+ $array_items = array();
+ if ($handle = opendir($directory)) {
+ while (false !== ($file = readdir($handle))) {
+ $filecomp = explode('.', $file);
+ if ($file != "." && $file != "..") {
+ if (is_dir($directory. "/" . $file)) {
+ if($recursive) {
+ $array_items = array_merge($array_items, $this->dirToArray($directory. "/" . $file, $recursive));
+ }
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ } else {
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ }
+ }
+ }
+ closedir($handle);
+ }
+ return $array_items;
+ }
+
+ function exists($file)
+ {
+ if (!is_a($file, 'XtransamFiles'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $file->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`path`', $file->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`filename`', $file->getVar('filename')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/googleprovider.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/googleprovider.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/googleprovider.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,120 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamGoogleprovider extends XoopsObject
+{
+
+ function XtransamGoogleprovider($id = null)
+ {
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamGoogleproviderHandler extends XoopsPersistableObjectHandler
+{
+
+ var $url = "http://ajax.googleapis.com/ajax/services/language/translate";
+ var $retrieve = array('start' => '<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>',
+ 'end' => '</textarea>');
+
+ function __construct(&$db)
+ { }
+
+ function translate($fromcode, $tocode, $hexvalue)
+ {
+
+ $response = $this->send_post($this->url, $this->hex2bin($hexvalue), $fromcode, $tocode, XOOPS_URL);
+ if (preg_match("/{\"translatedText\":\"([^\"]+)\"/i", $response, $matches)) {
+ return self::_unescapeUTF8EscapeSeq($this->clean($matches[1]));
+ }
+ }
+
+ private function _unescapeUTF8EscapeSeq($str) {
+ return preg_replace_callback("/\\\u([0-9a-f]{4})/i", create_function('$matches', 'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_NOQUOTES, \'UTF-8\');'), $str);
+ }
+
+ private function hex2bin($h)
+ {
+ if (!is_string($h)) return null;
+ $r='';
+ for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); }
+ return $r;
+ }
+
+ private function clean($var)
+ {
+ $var = htmlspecialchars_decode($var);
+ $var = str_replace('% s', ' %s ', $var);
+ $var = str_replace('% u', ' %u ', $var);
+ $var = str_replace('% d', ' %d ', $var);
+ if (strpos($var, 'text/css'))
+ $var ='';
+ return $var;
+ }
+
+ function send_post($url, $text, $from, $to, $referer = null)
+ {
+ $langpair = $from.'|'.$to;
+ $text = $text;
+
+ $params = array('http' =>
+ array(
+ 'method' => 'POST',
+ 'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
+ "Referer: $referer\r\n",
+ "content"=> http_build_query(array('langpair'=>$langpair, 'q'=>$text, 'v'=>'1.0'))
+ )
+ );
+ $ctx = stream_context_create($params);
+ $fp = fopen($url, 'rb', false, $ctx);
+ $response = stream_get_contents($fp);
+
+ return $response;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/index.html 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/iobase.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/iobase.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/iobase.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,155 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamIobase extends XoopsObject
+{
+
+ function XtransamIobase($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('point', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('languagefrom', XOBJ_DTYPE_INT, null);
+ $this->initVar('languageto', XOBJ_DTYPE_INT, null);
+ $this->initVar('done', XOBJ_DTYPE_INT, null);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamIobaseHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_iobase", 'XtransamIobase', "id", "path");
+ }
+
+ function insert($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ if (!$this->exists($io))
+ $sql = "INSERT INTO ".$this->db->prefix('xtransam_iobase')." (`point`, `path`, `languagefrom`, `languageto`) VALUES ('".$io->getVar('point')."', '".$io->getVar('path')."', '".$io->getVar('languagefrom')."', '".$io->getVar('languageto')."')";
+ else
+ $sql = "UPDATE ".$this->db->prefix('xtransam_iobase')." SET `point` = '".$io->getVar('point')."', `path` = '".$io->getVar('path')."', `languagefrom` = '".$io->getVar('languagefrom')."', `languageto` = '".$io->getVar('languageto')."', `total` = '".$io->getVar('total')."', `done` = '".$io->getVar('done')."' where `id` = ".$io->getVar('id');
+
+ return $this->db->queryF($sql);
+
+ }
+
+ function &getObjects($criteria = null, $fields = null, $asObject = true, $id_as_key = true)
+ {
+ if (is_array($fields) && count($fields) > 0) {
+ if (! in_array($this->handler->keyName, $fields)) {
+ $fields[] = $this->handler->keyName;
+ }
+ $select = "`" . implode("`, `", $fields) . "`";
+ } else {
+ $select = "*";
+ }
+ $limit = null;
+ $start = null;
+ $sql = "SELECT {$select} FROM `".$this->db->prefix('xtransam_iobase')."`";
+ if (isset($criteria) && is_subclass_of($criteria, "criteriaelement")) {
+ $sql .= " " . $criteria->renderWhere();
+ if ($sort = $criteria->getSort()) {
+ $sql .= " ORDER BY {$sort} " . $criteria->getOrder();
+ $orderSet = true;
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ if (empty($orderSet)) {
+ // $sql .= " ORDER BY `{$this->handler->keyName}` DESC";
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ $ret = array();
+ if ($asObject) {
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object = &$this->create(false);
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object;
+ } else {
+ $ret[] = $object;
+ }
+ unset($object);
+ }
+ } else {
+ $object = &$this->create(false);
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object->getValues(array_keys($myrow));
+ } else {
+ $ret[] = $object->getValues(array_keys($myrow));
+ }
+ }
+ unset($object);
+ }
+ return $ret;
+ }
+
+ function exists($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return true;
+
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`point`', $io->getVar('point')), 'AND');
+ $criteria->add(new Criteria('`path`', $io->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`languagefrom`', $io->getVar('languagefrom')), 'AND');
+ $criteria->add(new Criteria('`languageto`', $io->getVar('languageto')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/languages.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/languages.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/languages.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,132 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamLanguages extends XoopsObject
+{
+
+ function XtransamLanguages($id = null)
+ {
+ $this->initVar('lang_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('provider', XOBJ_DTYPE_TXTBOX, null, false, 20);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('code', XOBJ_DTYPE_TXTBOX, null, true, 6);
+ $this->initVar('foldername', XOBJ_DTYPE_TXTBOX, null, false, 255);
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamLanguagesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, "xtransam_languages", 'XtransamLanguages', "lang_id", "name");
+ }
+
+ function name($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['name'];
+ } else {
+ return false;
+ }
+ }
+
+ function provider($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['provider'];
+ } else {
+ return false;
+ }
+ }
+
+ function folder($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ if (empty($objs[0]['foldername']))
+ return strtolower($objs[0]['name']);
+ else
+ return strtolower($objs[0]['foldername']);
+
+ } else {
+ return false;
+ }
+ }
+
+ function code($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false);
+ return $objs[0]['code'];
+ } else {
+ return false;
+ }
+ }
+
+ function validlanguage($name)
+ {
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`name`', $name, 'LIKE'), 'OR');
+ $criteria->add(new Criteria('`foldername`', $name, 'LIKE'), 'OR');
+ if ($this->getCount($criteria)>0)
+ {
+ $objs = $this->getObjects($criteria);
+ return $objs[0]->getVar('lang_id');
+ } else {
+ return false;
+ }
+
+ }
+
+}
+?>
Added: XoopsModules/xtransam/releases/1.03/xtransam/class/translator.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/class/translator.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/class/translator.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,127 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamTranslator extends XoopsObject
+{
+
+ function XtransamTranslator($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fromid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('toid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fileid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('linetype', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('hexval_name', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_orginal', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_translation', XOBJ_DTYPE_OTHER);
+ $this->initVar('replacestr', XOBJ_DTYPE_OTHER, null);
+ $this->initVar('out', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('line', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('auto', XOBJ_DTYPE_INT, null, false);
+ }
+
+ function isempty()
+ {
+ $hexval_translation = $this->getVar('hexval_translation');
+ return empty($hexval_translation);
+ }
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamTranslatorHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_translator", 'XtransamTranslator', "id", "hexval_name");
+ }
+
+ function change_charset($text, $charset_output = 'UTF-8', $charset_input = 'ISO-8859-1')
+ {
+ // Values can be : UTF-8 ; ASCII
+ //$detected_encoding = mb_detect_encoding($text);
+ // if ($charset_output == $detected_encoding) {
+ if ($charset_output == $charset_input) {
+ // Encoding is already good
+ return $text;
+ } elseif ($charset_output == 'UTF-8' && $charset_input == 'ISO-8859-1') {
+ // ISO-8859-1 -> UTF8
+ return utf8_encode($text);
+ } elseif ($charset_output == 'ISO-8859-1' && $charset_input == 'UTF-8') {
+ // UTF8 -> ISO-8859-1
+ return utf8_decode($text);
+ } else {
+ // * -> UTF8
+ if (function_exists("mb_convert_encoding")) {
+ return mb_convert_encoding($text, $charset_output, $charset_input);
+ }else{
+ return $text;
+ }
+
+ }
+ }
+
+ function exists($trans)
+ {
+ if (!is_a($trans, 'XtransamTranslator'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $trans->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`fromid`', $trans->getVar('fromid')), 'AND');
+ $criteria->add(new Criteria('`toid`', $trans->getVar('toid')), 'AND');
+ $criteria->add(new Criteria('`fileid`', $trans->getVar('fileid')), 'AND');
+ $criteria->add(new Criteria('`linetype`', $trans->getVar('linetype')), 'AND');
+ $criteria->add(new Criteria('`hexval_name`', $trans->getVar('hexval_name')), 'AND');
+
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.03/xtransam/images/Thumbs.db
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.03/xtransam/images/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/images/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/images/index.html 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.03/xtransam/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.03/xtransam/images/left_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.03/xtransam/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.03/xtransam/images/right_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.03/xtransam/images/xtransam_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.03/xtransam/images/xtransam_slogo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.03/xtransam/include/forms.php
===================================================================
--- XoopsModules/xtransam/releases/1.03/xtransam/include/forms.php (rev 0)
+++ XoopsModules/xtransam/releases/1.03/xtransam/include/forms.php 2009-05-16 18:33:20 UTC (rev 3249)
@@ -0,0 +1,312 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ function languagesForm_display() {
+ $form_sel = new XoopsThemeForm(_XT_LANGUAGEMATRIX, "languages", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $langs = $lang_handler->getObjects(NULL);
+
+ $ele_tray[0] = new XoopsFormElementTray(_XT_NEWLANG,' ');
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_NAME, 'name[0]', 26, 255));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_CODE, 'code[0]', 10, 6));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_FOLDER, 'folder[0]', 26, 255));
+
+ $ele_select = new XoopsFormSelect(_XT_PROVIDER, 'provider[0]');
+ define(_XT_PROV_GOOGLE, 'google');
+ define(_XT_PROV_GOOGLEDESC, 'Google API');
+ $ele_select->addOption(_XT_PROV_GOOGLE, _XT_PROV_GOOGLEDESC);
+
+ $ele_tray[0]->addElement($ele_select);
+ $ele_tray[0]->addElement(new XoopsFormHidden('id[0]', 'new'));
+ $form_sel->addElement($ele_tray[0]);
+
+ foreach ($langs as $lang) {
+ $ele_tray[$lang->getVar('lang_id')] = new XoopsFormElementTray($lang->getVar('name'),' ');
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_NAME, 'name['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('name'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_CODE, 'code['.$lang->getVar('lang_id').']', 10, 6, htmlspecialchars($lang->getVar('code'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_FOLDER, 'folder['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('foldername'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormHidden('id['.$lang->getVar('id').']', $lang->getVar('lang_id')));
+ $ele_select->setValue($lang->getVar('id'));
+ $ele_tray[$lang->getVar('lang_id')]->addElement($ele_select);
+ $form_sel->addElement($ele_tray[$lang->getVar('lang_id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save-languages"));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+ function managerForm_display($ioid, $fileid)
+ {
+ $form_sel = new XoopsThemeForm(_XT_SELECTFILETOEDIT, "filesel", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $io = $io_handler->get($ioid);
+ $files = $files_handler->getObjects(new Criteria('ioid', $ioid));
+
+ if ($fileid==0)
+ $fileid = $files[0]->getVar('id');
+
+ $table_sel = new XoopsFormSelect(_XT_SELECTFILETOEDIT.':', 'select');
+ $table_sel->setExtra('');
+ $table_sel->setValue("index.php?op=manage&id=$ioid&fileid=".$fileid);
+ foreach($files as $file)
+ $table_sel->addOption("index.php?op=manage&id=$ioid&fileid=".$file->getVar('id'), $file->getVar('filename'));
+
+ $form_sel->addElement($table_sel);
+ $form_sel->display();
+
+ $form_sel = new XoopsThemeForm(sprintf(_XT_TRANSLATIONEDITOR, $lang_handler->name($io->getVar('languagefrom')), $lang_handler->name($io->getVar('languageto'))), "editor", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $trans = $trans_handler->getObjects(new Criteria('fileid', $fileid));
+ foreach($trans as $tran) {
+ $txtbox[$tran->getVar('id')] = new XoopsFormTextArea($trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET), 'trans['.$tran->getVar('id').']', $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET), 2, 85);
+ $txtbox[$tran->getVar('id')]->setDescription($lang_handler->name($tran->getVar('fromid')).": ".$trans_handler->change_charset(hex2bin($tran->getVar('hexval_orginal')), _CHARSET_ISO, _CHARSET));
+ $form_sel->addElement($txtbox[$tran->getVar('id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save"));
+ $form_sel->addElement(new XoopsFormHidden("id", $ioid));
+ $form_sel->addElement(new XoopsFormHidden("fileid", $fileid));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+
+ function translationForm_display($display=false)
+ {
+ $form_sel = new XoopsThemeForm(_XT_TRANSLATIONBUFFER, "transgo", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $ios = $io_handler->getObjects(NULL);
+ foreach ($ios as $io) {
+ $ele_tray[$io->getVar('id')] = new XoopsFormElementTray($io->getVar('point'),' ');
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPATH, $io->getVar('path')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPOINT, $io->getVar('point')));
+ $lang_from = $lang_handler->get($io->getVar('languagefrom'));
+ $lang_to = $lang_handler->get($io->getVar('languageto'));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEFROM, $lang_from->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATETO, $lang_to->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=deletebuffer&id='.$io->getVar('id').'">'._DELETE.'</a>'));
+ if ($display==false) {
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($files_handler->getCount($criteria)==0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=analysis&id='.$io->getVar('id').'">'._XT_ANALYSIS.'</a>'));
+ } else {
+ $criteria->add(new Criteria('imported', '0'));
+ if ($files_handler->getCount($criteria)>0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=import&id='.$io->getVar('id').'">'._XT_IMPORT.'</a>'));
+ } else {
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new Criteria('auto', '1'));
+ if ($trans_handler->getCount($criteria)!=$trans_handler->getCo...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-16 18:19:53
|
Revision: 3248
http://xoops.svn.sourceforge.net/xoops/?rev=3248&view=rev
Author: wishcraft
Date: 2009-05-16 18:19:44 +0000 (Sat, 16 May 2009)
Log Message:
-----------
#forumpost311623 - Field Missing from SQL sql/mysql.sql
Modified Paths:
--------------
XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
Removed Paths:
-------------
XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql.bak
Modified: XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql 2009-05-16 09:40:56 UTC (rev 3247)
+++ XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql 2009-05-16 18:19:44 UTC (rev 3248)
@@ -1,12 +1,14 @@
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `xtransam_files` (
+ `id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `ioid` INT(12) UNSIGNED DEFAULT '0',
+ `filename` VARCHAR(255) DEFAULT NULL,
+ `path` VARCHAR(255) DEFAULT NULL,
+ `imported` TINYINT(2) DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
+
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
Deleted: XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql.bak
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql.bak 2009-05-16 09:40:56 UTC (rev 3247)
+++ XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql.bak 2009-05-16 18:19:44 UTC (rev 3248)
@@ -1,90 +0,0 @@
-
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_iobase` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `point` enum('core','module') DEFAULT 'module',
- `path` varchar(255) DEFAULT NULL,
- `languagefrom` smallint(6) DEFAULT '0',
- `languageto` smallint(6) DEFAULT '0',
- `total` int(12) DEFAULT '0',
- `done` int(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_languages` (
- `lang_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
- `provider` enum('google') DEFAULT NULL,
- `name` varchar(255) DEFAULT NULL,
- `code` varchar(6) DEFAULT NULL,
- `foldername` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`lang_id`)
-) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (1,'google','Albanian','sq',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (2,'google','Arabic','ar',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (3,'google','Bulgarian','bg',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (4,'google','Catalan','ca',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (5,'google','Chinese (Simplified)','zh-CN','schinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (6,'google','Chinese (Traditional)','zh-TW','tchinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (7,'google','Croatian','hr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (8,'google','Czech','cs',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (9,'google','Danish','da',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (10,'google','Dutch','nl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (11,'google','English','en',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (12,'google','Estonian','et',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (13,'google','Filipino','tl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (14,'google','Finnish','fi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (15,'google','French','fr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (16,'google','Galician','gl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (17,'google','German','de',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (18,'google','Greek','el',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (19,'google','Hebrew','iw',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (20,NULL,'Hindi','hi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (21,'google','Hungarian','hu',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (22,'google','Indonesian','id',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (23,'google','Italian','it',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (24,'google','Japanese','ja',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (25,'google','Korean','ko',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (26,'google','Latvian','lv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (27,'google','Lithuanian','lt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (28,'google','Maltese','mt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (29,'google','Norwegian','no',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (30,'google','Polish','pl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (31,'google','Portuguese','pt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (32,'google','Romanian','ro',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (33,'google','Russian','ru',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (34,'google','Serbian','sr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (35,'google','Slovak','sk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (36,'google','Slovenian','sl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (37,'google','Spanish','es',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (38,'google','Swedish','sv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (39,'google','Thai','th',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (40,'google','Turkish','tr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (41,'google','Ukrainian','uk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (42,'google','Vietnamese','vi',NULL);
-
-CREATE TABLE `xtransam_translator` (
- `id` INT(30) UNSIGNED NOT NULL AUTO_INCREMENT,
- `ioid` INT(12) UNSIGNED DEFAULT '0',
- `fromid` SMALLINT(6) DEFAULT '0',
- `toid` SMALLINT(6) DEFAULT '0',
- `fileid` INT(12) DEFAULT '0',
- `linetype` ENUM('define') DEFAULT 'define',
- `hexval_name` MEDIUMTEXT,
- `hexval_orginal` MEDIUMTEXT,
- `hexval_translation` MEDIUMTEXT,
- `replacestr` MEDIUMTEXT,
- `out` ENUM('1','0') DEFAULT '0',
- `line` INT(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
-
Modified: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql 2009-05-16 09:40:56 UTC (rev 3247)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql 2009-05-16 18:19:44 UTC (rev 3248)
@@ -1,12 +1,14 @@
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE `xtransam_files` (
+ `id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT,
+ `ioid` INT(12) UNSIGNED DEFAULT '0',
+ `filename` VARCHAR(255) DEFAULT NULL,
+ `path` VARCHAR(255) DEFAULT NULL,
+ `imported` TINYINT(2) DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MYISAM CHARSET=utf8;
+
CREATE TABLE `xtransam_iobase` (
`id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`point` enum('core','module') DEFAULT 'module',
Deleted: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql.bak
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql.bak 2009-05-16 09:40:56 UTC (rev 3247)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql.bak 2009-05-16 18:19:44 UTC (rev 3248)
@@ -1,90 +0,0 @@
-
-CREATE TABLE `xtransam_files` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `filename` varchar(255) DEFAULT NULL,
- `path` varchar(255) DEFAULT NULL,
- `imported` smallint(6) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_iobase` (
- `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
- `point` enum('core','module') DEFAULT 'module',
- `path` varchar(255) DEFAULT NULL,
- `languagefrom` smallint(6) DEFAULT '0',
- `languageto` smallint(6) DEFAULT '0',
- `total` int(12) DEFAULT '0',
- `done` int(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-CREATE TABLE `xtransam_languages` (
- `lang_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
- `provider` enum('google') DEFAULT NULL,
- `name` varchar(255) DEFAULT NULL,
- `code` varchar(6) DEFAULT NULL,
- `foldername` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`lang_id`)
-) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (1,'google','Albanian','sq',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (2,'google','Arabic','ar',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (3,'google','Bulgarian','bg',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (4,'google','Catalan','ca',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (5,'google','Chinese (Simplified)','zh-CN','schinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (6,'google','Chinese (Traditional)','zh-TW','tchinese_utf8');
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (7,'google','Croatian','hr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (8,'google','Czech','cs',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (9,'google','Danish','da',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (10,'google','Dutch','nl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (11,'google','English','en',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (12,'google','Estonian','et',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (13,'google','Filipino','tl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (14,'google','Finnish','fi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (15,'google','French','fr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (16,'google','Galician','gl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (17,'google','German','de',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (18,'google','Greek','el',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (19,'google','Hebrew','iw',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (20,NULL,'Hindi','hi',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (21,'google','Hungarian','hu',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (22,'google','Indonesian','id',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (23,'google','Italian','it',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (24,'google','Japanese','ja',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (25,'google','Korean','ko',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (26,'google','Latvian','lv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (27,'google','Lithuanian','lt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (28,'google','Maltese','mt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (29,'google','Norwegian','no',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (30,'google','Polish','pl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (31,'google','Portuguese','pt',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (32,'google','Romanian','ro',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (33,'google','Russian','ru',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (34,'google','Serbian','sr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (35,'google','Slovak','sk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (36,'google','Slovenian','sl',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (37,'google','Spanish','es',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (38,'google','Swedish','sv',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (39,'google','Thai','th',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (40,'google','Turkish','tr',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (41,'google','Ukrainian','uk',NULL);
-insert into `xtransam_languages` (`lang_id`,`provider`,`name`,`code`,`foldername`) values (42,'google','Vietnamese','vi',NULL);
-
-CREATE TABLE `xtransam_translator` (
- `id` INT(30) UNSIGNED NOT NULL AUTO_INCREMENT,
- `ioid` INT(12) UNSIGNED DEFAULT '0',
- `fromid` SMALLINT(6) DEFAULT '0',
- `toid` SMALLINT(6) DEFAULT '0',
- `fileid` INT(12) DEFAULT '0',
- `linetype` ENUM('define') DEFAULT 'define',
- `hexval_name` MEDIUMTEXT,
- `hexval_orginal` MEDIUMTEXT,
- `hexval_translation` MEDIUMTEXT,
- `replacestr` MEDIUMTEXT,
- `out` ENUM('1','0') DEFAULT '0',
- `line` INT(12) DEFAULT '0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-16 09:41:05
|
Revision: 3247
http://xoops.svn.sourceforge.net/xoops/?rev=3247&view=rev
Author: wishcraft
Date: 2009-05-16 09:40:56 +0000 (Sat, 16 May 2009)
Log Message:
-----------
#forumpost311616 - Error: Handler does not exist (Runeher)
Modified Paths:
--------------
XoopsModules/xtransam/releases/1.02/xtransam/include/functions.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/functions.php
Modified: XoopsModules/xtransam/releases/1.02/xtransam/include/functions.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/include/functions.php 2009-05-16 09:20:11 UTC (rev 3246)
+++ XoopsModules/xtransam/releases/1.02/xtransam/include/functions.php 2009-05-16 09:40:56 UTC (rev 3247)
@@ -30,7 +30,7 @@
function adminMenu ($currentoption = 0) {
/* Nice buttons styles */
global $xoopsConfig,$xoopsModule;
- $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module_handler =& xoops_gethandler('module');
$xoopsModule = $module_handler->getByDirname('xtransam');
$dirname=$xoopsModule->getVar('dirname');
echo "
Modified: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/functions.php
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/functions.php 2009-05-16 09:20:11 UTC (rev 3246)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/functions.php 2009-05-16 09:40:56 UTC (rev 3247)
@@ -30,7 +30,7 @@
function adminMenu ($currentoption = 0) {
/* Nice buttons styles */
global $xoopsConfig,$xoopsModule;
- $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module_handler =& xoops_gethandler('module');
$xoopsModule = $module_handler->getByDirname('xtransam');
$dirname=$xoopsModule->getVar('dirname');
echo "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-16 09:20:16
|
Revision: 3246
http://xoops.svn.sourceforge.net/xoops/?rev=3246&view=rev
Author: wishcraft
Date: 2009-05-16 09:20:11 +0000 (Sat, 16 May 2009)
Log Message:
-----------
#forumpost311615 - bug fix
Modified Paths:
--------------
XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php
XoopsModules/xtransam/releases/1.02/xtransam/language/english/modinfo.php
XoopsModules/xtransam/releases/1.02/xtransam/xoops_version.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/admin_header.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/modinfo.php
Modified: XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php 2009-05-16 02:02:55 UTC (rev 3245)
+++ XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php 2009-05-16 09:20:11 UTC (rev 3246)
@@ -36,7 +36,7 @@
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
if (is_object($xoopsUser)) {
- $xoopsModule = XoopsModule::getByDirname("xsoap");
+ $xoopsModule = XoopsModule::getByDirname('xtransam');
if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
redirect_header(XOOPS_URL . "/", 3, _NOPERM);
exit();
Modified: XoopsModules/xtransam/releases/1.02/xtransam/language/english/modinfo.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/language/english/modinfo.php 2009-05-16 02:02:55 UTC (rev 3245)
+++ XoopsModules/xtransam/releases/1.02/xtransam/language/english/modinfo.php 2009-05-16 09:20:11 UTC (rev 3246)
@@ -28,4 +28,8 @@
// ------------------------------------------------------------------------ //
define('_XV_XTRANSAM_NAME', 'L-Translator');
define('_XV_XTRANSAM_DESC', 'L-Translator is used to translate language file in xoops.<br><em>Written in memory of John Miller (Microsoft Australia)</em>');
+
+ define('_MI_XTRANSAM_ADMENU1', 'Translation Wizard');
+ define('_MI_XTRANSAM_ADMENU2', 'Do Translation');
+ define('_MI_XTRANSAM_ADMENU3', 'Language Matrix');
?>
\ No newline at end of file
Modified: XoopsModules/xtransam/releases/1.02/xtransam/xoops_version.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/xoops_version.php 2009-05-16 02:02:55 UTC (rev 3245)
+++ XoopsModules/xtransam/releases/1.02/xtransam/xoops_version.php 2009-05-16 09:20:11 UTC (rev 3246)
@@ -28,7 +28,7 @@
// ------------------------------------------------------------------------ //
$modversion['name'] = _XV_XTRANSAM_NAME;
-$modversion['version'] = 1.02;
+$modversion['version'] = 1.01;
$modversion['description'] = _XV_XTRANSAM_DESC;
$modversion['author'] = "Wishcraft";
$modversion['credits'] = "The XOOPS Project";
Modified: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/admin_header.php 2009-05-16 02:02:55 UTC (rev 3245)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/admin_header.php 2009-05-16 09:20:11 UTC (rev 3246)
@@ -36,7 +36,7 @@
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
if (is_object($xoopsUser)) {
- $xoopsModule = XoopsModule::getByDirname("xsoap");
+ $xoopsModule = XoopsModule::getByDirname('xtransam');
if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
redirect_header(XOOPS_URL . "/", 3, _NOPERM);
exit();
Modified: XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/modinfo.php
===================================================================
--- XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/modinfo.php 2009-05-16 02:02:55 UTC (rev 3245)
+++ XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/modinfo.php 2009-05-16 09:20:11 UTC (rev 3246)
@@ -28,4 +28,8 @@
// ------------------------------------------------------------------------ //
define('_XV_XTRANSAM_NAME', 'L-Translator');
define('_XV_XTRANSAM_DESC', 'L-Translator is used to translate language file in xoops.<br><em>Written in memory of John Miller (Microsoft Australia)</em>');
+
+ define('_MI_XTRANSAM_ADMENU1', 'Translation Wizard');
+ define('_MI_XTRANSAM_ADMENU2', 'Do Translation');
+ define('_MI_XTRANSAM_ADMENU3', 'Language Matrix');
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-16 02:03:01
|
Revision: 3245
http://xoops.svn.sourceforge.net/xoops/?rev=3245&view=rev
Author: wishcraft
Date: 2009-05-16 02:02:55 +0000 (Sat, 16 May 2009)
Log Message:
-----------
xTRANSAM 1.02 (Release) - Language Translator
Modified Paths:
--------------
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/index.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/languages.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/forms.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/admin.php
Added Paths:
-----------
XoopsModules/xtransam/releases/1.02/
XoopsModules/xtransam/releases/1.02/xtransam/
XoopsModules/xtransam/releases/1.02/xtransam/admin/
XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php
XoopsModules/xtransam/releases/1.02/xtransam/admin/index.html
XoopsModules/xtransam/releases/1.02/xtransam/admin/index.php
XoopsModules/xtransam/releases/1.02/xtransam/admin/menu.php
XoopsModules/xtransam/releases/1.02/xtransam/class/
XoopsModules/xtransam/releases/1.02/xtransam/class/files.php
XoopsModules/xtransam/releases/1.02/xtransam/class/googleprovider.php
XoopsModules/xtransam/releases/1.02/xtransam/class/index.html
XoopsModules/xtransam/releases/1.02/xtransam/class/iobase.php
XoopsModules/xtransam/releases/1.02/xtransam/class/languages.php
XoopsModules/xtransam/releases/1.02/xtransam/class/translator.php
XoopsModules/xtransam/releases/1.02/xtransam/images/
XoopsModules/xtransam/releases/1.02/xtransam/images/Thumbs.db
XoopsModules/xtransam/releases/1.02/xtransam/images/index.html
XoopsModules/xtransam/releases/1.02/xtransam/images/left_both.gif
XoopsModules/xtransam/releases/1.02/xtransam/images/right_both.gif
XoopsModules/xtransam/releases/1.02/xtransam/images/xtransam_slogo.png
XoopsModules/xtransam/releases/1.02/xtransam/include/
XoopsModules/xtransam/releases/1.02/xtransam/include/forms.php
XoopsModules/xtransam/releases/1.02/xtransam/include/functions.php
XoopsModules/xtransam/releases/1.02/xtransam/include/index.html
XoopsModules/xtransam/releases/1.02/xtransam/language/
XoopsModules/xtransam/releases/1.02/xtransam/language/english/
XoopsModules/xtransam/releases/1.02/xtransam/language/english/admin.php
XoopsModules/xtransam/releases/1.02/xtransam/language/english/index.html
XoopsModules/xtransam/releases/1.02/xtransam/language/english/modinfo.php
XoopsModules/xtransam/releases/1.02/xtransam/language/index.html
XoopsModules/xtransam/releases/1.02/xtransam/sql/
XoopsModules/xtransam/releases/1.02/xtransam/sql/index.html
XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.02/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/releases/1.02/xtransam/xoops_version.php
Added: XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/admin/admin_header.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,50 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ error_reporting(E_ALL);
+include '../../../mainfile.php';
+include '../../../include/cp_header.php';
+include '../include/functions.php';
+
+include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+
+if (is_object($xoopsUser)) {
+ $xoopsModule = XoopsModule::getByDirname("xsoap");
+ if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
+ redirect_header(XOOPS_URL . "/", 3, _NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL . "/", 1, _NOPERM);
+ exit();
+}
+$myts = &MyTextSanitizer::getInstance();
+error_reporting(E_ALL);
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/admin/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/admin/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/admin/index.html 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/admin/index.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/admin/index.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/admin/index.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,233 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+define ("_CHARSET","UTF-8");
+define ("_CHARSET_ISO","ISO-8859-1");
+
+include 'admin_header.php';
+include_once '../include/forms.php';
+
+error_reporting(E_ALL);
+global $xoopsDB;
+
+ if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+ if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+
+ini_set("max_execution_time", "300");
+
+switch ($op){
+case "save-languages":
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ foreach($id as $key => $value)
+ {
+ switch($value){
+ case "new":
+ $lang = $lang_handler->create();
+ break;
+ default:
+ $lang = $lang_handler->get($value);
+ }
+
+ if (!empty($name[$key])&&!empty($code[$key])) {
+ $lang->setVar('name', $name[$key]);
+ $lang->setVar('code', $code[$key]);
+ $lang->setVar('foldername', $folder[$key]);
+ $lang->setVar('provider', $provider[$key]);
+ @$lang_handler->insert($lang);
+ }
+ }
+ redirect_header("index.php?op=languages",2,_XT_LANGSAVEOK);
+ break;
+case "languages":
+ xoops_cp_header();
+ adminMenu(3);
+ languagesForm_display();
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+case "export":
+ global $xoopsUser;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $files = $files_handler->getObjects($criteria);
+
+ $from_folder = $lang_handler->folder($io->getvar('languagefrom'));
+ $to_folder = $lang_handler->folder($io->getvar('languageto'));
+
+ foreach($files as $file) {
+ $path = explode('/', $file->getVar('path'));
+
+ foreach($path as $key => $value)
+ if (strtolower($value) == strtolower($from_folder)) {
+ $path[$key] = $to_folder;
+ }
+
+ $wpath = implode('/', $path).'/';
+
+ if($wpath!=$file->getVar('path')){
+ $bfile = file($file->getVar('path').$file->getVar('filename'));
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new Criteria('fileid', $file->getVar('id')));
+ $trans = $trans_handler->getObjects($criteria);
+ foreach($trans as $tran) {
+ $search = $trans_handler->change_charset(hex2bin($tran->getVar('replacestr')), _CHARSET_ISO, _CHARSET);
+ $name = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET);
+ $translation = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET);
+ $translation = str_replace('\"', '"', $translation);
+ $translation = str_replace('"', '\"', $translation);
+ $replace = 'define("'.$name.'", "'.$translation.'");';
+ $bfile[$tran->getVar('line')] = str_replace($search, $replace, $bfile[$tran->getVar('line')]);
+ }
+ @makeWritable($wpath, true);
+ if (file_exists($wpath.$file->getVar('filename')))
+ unlink($wpath.$file->getVar('filename'));
+ $file = @fopen($wpath.$file->getVar('filename'), 'w');
+ $bfile[-1] = "<?php // Translation done by xtransam & ".$xoopsUser->uname()." - ".date('Y-m-d H:i')." ?>\n";
+ $buffer = implode('', $bfile);
+ fwrite($file, $buffer, strlen($buffer));
+ fclose($file);
+
+ }
+
+ }
+ redirect_header("index.php?op=bbs",2,_XT_EXPORTCOMPLETE);
+ break;
+case "save":
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ foreach($trans as $key => $value) {
+ $tran = $trans_handler->get($key);
+ $tran->setVar('hexval_translation', bin2hex($trans_handler->change_charset($value, _CHARSET, _CHARSET_ISO)));
+ $trans_handler->insert($tran);
+ }
+ redirect_header("index.php?op=manage&id=$id&fileid=$fileid",2,_XT_SAVECOMPLETE);
+ break;
+case "manage":
+ xoops_cp_header();
+ adminMenu(2);
+ managerForm_display($id, $fileid);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "analysis":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->analysepath($io);
+ redirect_header("index.php?op=bbs",2,_XT_ANLYSISCOMPLETE);
+ break;
+
+case "import":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->importfiles($io);
+ redirect_header("index.php?op=bbs",2,_XT_IMPORTCOMPLETE);
+ break;
+
+case "translate":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($trans_handler->getCount($criteria)>0) {
+ $trans = $trans_handler->getObjects($criteria);
+ $start = time();
+ foreach($trans as $tran) {
+ if ($tran->isempty()){
+ $from = $lang_handler->code($io->getVar('languagefrom'));
+ $to = $lang_handler->code($io->getVar('languageto'));
+ $provider = $lang_handler->provider($tran->getVar('toid'));
+ if (strlen($provider)>0) {
+ $provider_handler = xoops_getmodulehandler($provider.'provider', 'xtransam');
+ $translation = $trans_handler->change_charset($provider_handler->translate($from,$to, $tran->getVar('hexval_orginal')), _CHARSET, _CHARSET_ISO);
+ $tran->setVar('hexval_translation', bin2hex($translation));
+ if (strlen($translation)>0)
+ $tran->setVar('auto', 1);
+ else
+ $tran->setVar('auto', 0);
+ $trans_handler->insert($tran);
+ }
+ if ($start+28<time())
+ {
+ $restart++;
+ redirect_header("index.php?op=translate&id=$id&restart=$restart",2,sprintf(_XT_30SECONDSCONTINUING, $restart));
+ }
+ }
+ }
+ }
+ redirect_header("index.php?op=bbs",2,_XT_TRANSLATIONCOMPLETE);
+ break;
+
+case "languages":
+
+ break;
+case "bbs":
+
+ xoops_cp_header();
+ adminMenu(2);
+ translationForm_display(false);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "wizard":
+default:
+
+ xoops_cp_header();
+ adminMenu(1);
+ wizardForm_display($step);
+ translationForm_display(true);
+ footer_adminMenu();
+ xoops_cp_footer();
+ break;
+
+}
+
+
+
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/admin/menu.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/admin/menu.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/admin/menu.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,38 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+global $adminmenu;
+$adminmenu = array();
+$adminmenu[1]['title'] = _MI_XTRANSAM_ADMENU1;
+$adminmenu[1]['link'] = "admin/index.php?op=wizard";
+$adminmenu[2]['title'] = _MI_XTRANSAM_ADMENU2;
+$adminmenu[2]['link'] = "admin/index.php?op=bbs";
+$adminmenu[3]['title'] = _MI_XTRANSAM_ADMENU3;
+$adminmenu[3]['link'] = "admin/index.php?op=languages";
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/files.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/files.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/files.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,208 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamFiles extends XoopsObject
+{
+
+ function XtransamFiles($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT);
+ $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('imported', XOBJ_DTYPE_INT, 0);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamFilesHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+ var $regex = '/define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*) \);|define\((.*)\);|define \((.*)\);|define \((.*)\);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*)\);|define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( (.*) \);|define\( (.*) \);/';
+ var $seperator = array('", "', '","', '" , "', '" , "', '", "', '" , "',
+ '", \'', '",\'', '" , \'', '" , \'', '", \'', '" , \'' ,
+ '\', \'', '\',\'', '\' , \'', '\' , \'', '\', \'', '\' , \'',
+ '\', "', '\',"', '\' , "', '\' , "', '\', "', '\' , "');
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_files", 'XtransamFiles', "id", "path");
+ }
+
+ function importfiles($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $io->getVar('id')), 'AND');
+ $criteria->add(new Criteria('`imported`', 0), 'AND');
+ $files = $this->getObjects($criteria);
+
+ foreach ($files as $file) {
+ $content = file_get_contents($file->getVar('path').'/'.$file->getVar('filename'));
+ $lines = explode("\n", $content);
+ foreach($lines as $key => $line) {
+ if (strpos(' '.$line,'define')>0) {
+ @preg_match_all($this->regex, $line, $matches);
+
+ $def = array();
+ foreach($matches as $match)
+ foreach($match as $result) {
+ if (!empty($result)&&substr($result,0,6)!='define') {
+ foreach($this->seperator as $sep)
+ if (strpos($result, $sep)>0)
+ if (count(explode($sep, $result))==2)
+ $result = explode($sep, $result);
+
+ $def[0] = substr(trim($result[0]),1);
+ $def[1] = substr(trim($result[1]),0, strlen(trim($result[1]))-1);
+ } elseif (substr($result,0,6)=='define') {
+ $def[3] = $result;
+ }
+ }
+
+
+ if (!empty($def[0])&&!empty($def[1])) {
+ $trans = $trans_handler->create();
+ $trans->setVar('ioid',$io->getVar('id'));
+ $trans->setVar('fromid',$io->getVar('languagefrom'));
+ $trans->setVar('toid',$io->getVar('languageto'));
+ $trans->setVar('fileid',$file->getVar('id'));
+ $trans->setVar('linetype','define');
+ $trans->setVar('line', $key);
+ $trans->setVar('hexval_name',bin2hex($trans_handler->change_charset($def[0], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('hexval_orginal',bin2hex($trans_handler->change_charset($def[1], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('replacestr',bin2hex($trans_handler->change_charset($def[3], _CHARSET, _CHARSET_ISO)));
+
+ if (!$trans_handler->exists($trans))
+ $trans_handler->insert($trans);
+ }
+ }
+ }
+
+ $file->setVar('imported', '1');
+ $this->insert($file);
+
+ }
+ }
+
+
+ function analysepath($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ switch ($io->getVar('point'))
+ {
+ case "core":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/language/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/language/'.$io->getVar('path');
+ break;
+ case "module":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path');
+ break;
+ }
+
+ foreach($files as $key => $file)
+ {
+ if (file_exists($file)) {
+ $tfile = $this->create();
+ $tfile->setVar('filename', basename($file));
+ $tfile->setVar('path', str_replace(basename($file),'',$file));
+ $tfile->setVar('ioid', $io->getVar('id'));
+ if (!$this->exists($tfile))
+ @$this->insert($tfile);
+ }
+ }
+
+ }
+
+ private function dirToArray($directory, $recursive, $fileext = 'php') {
+ $array_items = array();
+ if ($handle = opendir($directory)) {
+ while (false !== ($file = readdir($handle))) {
+ $filecomp = explode('.', $file);
+ if ($file != "." && $file != "..") {
+ if (is_dir($directory. "/" . $file)) {
+ if($recursive) {
+ $array_items = array_merge($array_items, $this->dirToArray($directory. "/" . $file, $recursive));
+ }
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ } else {
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ }
+ }
+ }
+ closedir($handle);
+ }
+ return $array_items;
+ }
+
+ function exists($file)
+ {
+ if (!is_a($file, 'XtransamFiles'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $file->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`path`', $file->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`filename`', $file->getVar('filename')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/googleprovider.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/googleprovider.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/googleprovider.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,120 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamGoogleprovider extends XoopsObject
+{
+
+ function XtransamGoogleprovider($id = null)
+ {
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamGoogleproviderHandler extends XoopsPersistableObjectHandler
+{
+
+ var $url = "http://ajax.googleapis.com/ajax/services/language/translate";
+ var $retrieve = array('start' => '<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>',
+ 'end' => '</textarea>');
+
+ function __construct(&$db)
+ { }
+
+ function translate($fromcode, $tocode, $hexvalue)
+ {
+
+ $response = $this->send_post($this->url, $this->hex2bin($hexvalue), $fromcode, $tocode, XOOPS_URL);
+ if (preg_match("/{\"translatedText\":\"([^\"]+)\"/i", $response, $matches)) {
+ return self::_unescapeUTF8EscapeSeq($this->clean($matches[1]));
+ }
+ }
+
+ private function _unescapeUTF8EscapeSeq($str) {
+ return preg_replace_callback("/\\\u([0-9a-f]{4})/i", create_function('$matches', 'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_NOQUOTES, \'UTF-8\');'), $str);
+ }
+
+ private function hex2bin($h)
+ {
+ if (!is_string($h)) return null;
+ $r='';
+ for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); }
+ return $r;
+ }
+
+ private function clean($var)
+ {
+ $var = htmlspecialchars_decode($var);
+ $var = str_replace('% s', ' %s ', $var);
+ $var = str_replace('% u', ' %u ', $var);
+ $var = str_replace('% d', ' %d ', $var);
+ if (strpos($var, 'text/css'))
+ $var ='';
+ return $var;
+ }
+
+ function send_post($url, $text, $from, $to, $referer = null)
+ {
+ $langpair = $from.'|'.$to;
+ $text = $text;
+
+ $params = array('http' =>
+ array(
+ 'method' => 'POST',
+ 'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
+ "Referer: $referer\r\n",
+ "content"=> http_build_query(array('langpair'=>$langpair, 'q'=>$text, 'v'=>'1.0'))
+ )
+ );
+ $ctx = stream_context_create($params);
+ $fp = fopen($url, 'rb', false, $ctx);
+ $response = stream_get_contents($fp);
+
+ return $response;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/index.html 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/iobase.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/iobase.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/iobase.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,155 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamIobase extends XoopsObject
+{
+
+ function XtransamIobase($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('point', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('languagefrom', XOBJ_DTYPE_INT, null);
+ $this->initVar('languageto', XOBJ_DTYPE_INT, null);
+ $this->initVar('done', XOBJ_DTYPE_INT, null);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamIobaseHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_iobase", 'XtransamIobase', "id", "path");
+ }
+
+ function insert($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ if (!$this->exists($io))
+ $sql = "INSERT INTO ".$this->db->prefix('xtransam_iobase')." (`point`, `path`, `languagefrom`, `languageto`) VALUES ('".$io->getVar('point')."', '".$io->getVar('path')."', '".$io->getVar('languagefrom')."', '".$io->getVar('languageto')."')";
+ else
+ $sql = "UPDATE ".$this->db->prefix('xtransam_iobase')." SET `point` = '".$io->getVar('point')."', `path` = '".$io->getVar('path')."', `languagefrom` = '".$io->getVar('languagefrom')."', `languageto` = '".$io->getVar('languageto')."', `total` = '".$io->getVar('total')."', `done` = '".$io->getVar('done')."' where `id` = ".$io->getVar('id');
+
+ return $this->db->queryF($sql);
+
+ }
+
+ function &getObjects($criteria = null, $fields = null, $asObject = true, $id_as_key = true)
+ {
+ if (is_array($fields) && count($fields) > 0) {
+ if (! in_array($this->handler->keyName, $fields)) {
+ $fields[] = $this->handler->keyName;
+ }
+ $select = "`" . implode("`, `", $fields) . "`";
+ } else {
+ $select = "*";
+ }
+ $limit = null;
+ $start = null;
+ $sql = "SELECT {$select} FROM `".$this->db->prefix('xtransam_iobase')."`";
+ if (isset($criteria) && is_subclass_of($criteria, "criteriaelement")) {
+ $sql .= " " . $criteria->renderWhere();
+ if ($sort = $criteria->getSort()) {
+ $sql .= " ORDER BY {$sort} " . $criteria->getOrder();
+ $orderSet = true;
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ if (empty($orderSet)) {
+ // $sql .= " ORDER BY `{$this->handler->keyName}` DESC";
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ $ret = array();
+ if ($asObject) {
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object = &$this->create(false);
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object;
+ } else {
+ $ret[] = $object;
+ }
+ unset($object);
+ }
+ } else {
+ $object = &$this->create(false);
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object->getValues(array_keys($myrow));
+ } else {
+ $ret[] = $object->getValues(array_keys($myrow));
+ }
+ }
+ unset($object);
+ }
+ return $ret;
+ }
+
+ function exists($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return true;
+
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`point`', $io->getVar('point')), 'AND');
+ $criteria->add(new Criteria('`path`', $io->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`languagefrom`', $io->getVar('languagefrom')), 'AND');
+ $criteria->add(new Criteria('`languageto`', $io->getVar('languageto')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/languages.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/languages.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/languages.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,132 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamLanguages extends XoopsObject
+{
+
+ function XtransamLanguages($id = null)
+ {
+ $this->initVar('lang_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('provider', XOBJ_DTYPE_TXTBOX, null, false, 20);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('code', XOBJ_DTYPE_TXTBOX, null, true, 6);
+ $this->initVar('foldername', XOBJ_DTYPE_TXTBOX, null, false, 255);
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamLanguagesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, "xtransam_languages", 'XtransamLanguages', "lang_id", "name");
+ }
+
+ function name($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['name'];
+ } else {
+ return false;
+ }
+ }
+
+ function provider($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['provider'];
+ } else {
+ return false;
+ }
+ }
+
+ function folder($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ if (empty($objs[0]['foldername']))
+ return strtolower($objs[0]['name']);
+ else
+ return strtolower($objs[0]['foldername']);
+
+ } else {
+ return false;
+ }
+ }
+
+ function code($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false);
+ return $objs[0]['code'];
+ } else {
+ return false;
+ }
+ }
+
+ function validlanguage($name)
+ {
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`name`', $name, 'LIKE'), 'OR');
+ $criteria->add(new Criteria('`foldername`', $name, 'LIKE'), 'OR');
+ if ($this->getCount($criteria)>0)
+ {
+ $objs = $this->getObjects($criteria);
+ return $objs[0]->getVar('lang_id');
+ } else {
+ return false;
+ }
+
+ }
+
+}
+?>
Added: XoopsModules/xtransam/releases/1.02/xtransam/class/translator.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/class/translator.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/class/translator.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,127 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamTranslator extends XoopsObject
+{
+
+ function XtransamTranslator($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fromid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('toid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fileid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('linetype', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('hexval_name', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_orginal', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_translation', XOBJ_DTYPE_OTHER);
+ $this->initVar('replacestr', XOBJ_DTYPE_OTHER, null);
+ $this->initVar('out', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('line', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('auto', XOBJ_DTYPE_INT, null, false);
+ }
+
+ function isempty()
+ {
+ $hexval_translation = $this->getVar('hexval_translation');
+ return empty($hexval_translation);
+ }
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamTranslatorHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_translator", 'XtransamTranslator', "id", "hexval_name");
+ }
+
+ function change_charset($text, $charset_output = 'UTF-8', $charset_input = 'ISO-8859-1')
+ {
+ // Values can be : UTF-8 ; ASCII
+ //$detected_encoding = mb_detect_encoding($text);
+ // if ($charset_output == $detected_encoding) {
+ if ($charset_output == $charset_input) {
+ // Encoding is already good
+ return $text;
+ } elseif ($charset_output == 'UTF-8' && $charset_input == 'ISO-8859-1') {
+ // ISO-8859-1 -> UTF8
+ return utf8_encode($text);
+ } elseif ($charset_output == 'ISO-8859-1' && $charset_input == 'UTF-8') {
+ // UTF8 -> ISO-8859-1
+ return utf8_decode($text);
+ } else {
+ // * -> UTF8
+ if (function_exists("mb_convert_encoding")) {
+ return mb_convert_encoding($text, $charset_output, $charset_input);
+ }else{
+ return $text;
+ }
+
+ }
+ }
+
+ function exists($trans)
+ {
+ if (!is_a($trans, 'XtransamTranslator'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $trans->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`fromid`', $trans->getVar('fromid')), 'AND');
+ $criteria->add(new Criteria('`toid`', $trans->getVar('toid')), 'AND');
+ $criteria->add(new Criteria('`fileid`', $trans->getVar('fileid')), 'AND');
+ $criteria->add(new Criteria('`linetype`', $trans->getVar('linetype')), 'AND');
+ $criteria->add(new Criteria('`hexval_name`', $trans->getVar('hexval_name')), 'AND');
+
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.02/xtransam/images/Thumbs.db
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.02/xtransam/images/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/images/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/images/index.html 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.02/xtransam/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.02/xtransam/images/left_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.02/xtransam/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.02/xtransam/images/right_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.02/xtransam/images/xtransam_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.02/xtransam/images/xtransam_slogo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.02/xtransam/include/forms.php
===================================================================
--- XoopsModules/xtransam/releases/1.02/xtransam/include/forms.php (rev 0)
+++ XoopsModules/xtransam/releases/1.02/xtransam/include/forms.php 2009-05-16 02:02:55 UTC (rev 3245)
@@ -0,0 +1,312 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ function languagesForm_display() {
+ $form_sel = new XoopsThemeForm(_XT_LANGUAGEMATRIX, "languages", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $langs = $lang_handler->getObjects(NULL);
+
+ $ele_tray[0] = new XoopsFormElementTray(_XT_NEWLANG,' ');
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_NAME, 'name[0]', 26, 255));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_CODE, 'code[0]', 10, 6));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_FOLDER, 'folder[0]', 26, 255));
+
+ $ele_select = new XoopsFormSelect(_XT_PROVIDER, 'provider[0]');
+ define(_XT_PROV_GOOGLE, 'google');
+ define(_XT_PROV_GOOGLEDESC, 'Google API');
+ $ele_select->addOption(_XT_PROV_GOOGLE, _XT_PROV_GOOGLEDESC);
+
+ $ele_tray[0]->addElement($ele_select);
+ $ele_tray[0]->addElement(new XoopsFormHidden('id[0]', 'new'));
+ $form_sel->addElement($ele_tray[0]);
+
+ foreach ($langs as $lang) {
+ $ele_tray[$lang->getVar('lang_id')] = new XoopsFormElementTray($lang->getVar('name'),' ');
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_NAME, 'name['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('name'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_CODE, 'code['.$lang->getVar('lang_id').']', 10, 6, htmlspecialchars($lang->getVar('code'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_FOLDER, 'folder['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('foldername'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormHidden('id['.$lang->getVar('id').']', $lang->getVar('lang_id')));
+ $ele_select->setValue($lang->getVar('id'));
+ $ele_tray[$lang->getVar('lang_id')]->addElement($ele_select);
+ $form_sel->addElement($ele_tray[$lang->getVar('lang_id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save-languages"));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+ function managerForm_display($ioid, $fileid)
+ {
+ $form_sel = new XoopsThemeForm(_XT_SELECTFILETOEDIT, "filesel", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $io = $io_handler->get($ioid);
+ $files = $files_handler->getObjects(new Criteria('ioid', $ioid));
+
+ if ($fileid==0)
+ $fileid = $files[0]->getVar('id');
+
+ $table_sel = new XoopsFormSelect(_XT_SELECTFILETOEDIT.':', 'select');
+ $table_sel->setExtra('');
+ $table_sel->setValue("index.php?op=manage&id=$ioid&fileid=".$fileid);
+ foreach($files as $file)
+ $table_sel->addOption("index.php?op=manage&id=$ioid&fileid=".$file->getVar('id'), $file->getVar('filename'));
+
+ $form_sel->addElement($table_sel);
+ $form_sel->display();
+
+ $form_sel = new XoopsThemeForm(sprintf(_XT_TRANSLATIONEDITOR, $lang_handler->name($io->getVar('languagefrom')), $lang_handler->name($io->getVar('languageto'))), "editor", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $trans = $trans_handler->getObjects(new Criteria('fileid', $fileid));
+ foreach($trans as $tran) {
+ $txtbox[$tran->getVar('id')] = new XoopsFormTextArea($trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET), 'trans['.$tran->getVar('id').']', $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET), 2, 85);
+ $txtbox[$tran->getVar('id')]->setDescription($lang_handler->name($tran->getVar('fromid')).": ".$trans_handler->change_charset(hex2bin($tran->getVar('hexval_orginal')), _CHARSET_ISO, _CHARSET));
+ $form_sel->addElement($txtbox[$tran->getVar('id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save"));
+ $form_sel->addElement(new XoopsFormHidden("id", $ioid));
+ $form_sel->addElement(new XoopsFormHidden("fileid", $fileid));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+
+ function translationForm_display($display=false)
+ {
+ $form_sel = new XoopsThemeForm(_XT_TRANSLATIONBUFFER, "transgo", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $ios = $io_handler->getObjects(NULL);
+ foreach ($ios as $io) {
+ $ele_tray[$io->getVar('id')] = new XoopsFormElementTray($io->getVar('point'),' ');
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPATH, $io->getVar('path')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEPOINT, $io->getVar('point')));
+ $lang_from = $lang_handler->get($io->getVar('languagefrom'));
+ $lang_to = $lang_handler->get($io->getVar('languageto'));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATEFROM, $lang_from->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(_XT_LABELTRANSLATETO, $lang_to->getVar('name')));
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=deletebuffer&id='.$io->getVar('id').'">'._DELETE.'</a>'));
+ if ($display==false) {
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($files_handler->getCount($criteria)==0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=analysis&id='.$io->getVar('id').'">'._XT_ANALYSIS.'</a>'));
+ } else {
+ $criteria->add(new Criteria('imported', '0'));
+ if ($files_handler->getCount($criteria)>0) {
+ $ele_tray[$io->getVar('id')]->addElement(new XoopsFormLabel(' | ', '<a href="index.php?op=import&id='.$io->getVar('id').'">'._XT_IMPORT.'</a>'));
+ } else {
+ $criteria = new CriteriaCompo(new Criteria...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-16 00:38:43
|
Revision: 3244
http://xoops.svn.sourceforge.net/xoops/?rev=3244&view=rev
Author: wishcraft
Date: 2009-05-16 00:38:33 +0000 (Sat, 16 May 2009)
Log Message:
-----------
Translator Module for XOOPS 2.3 - xTRANSAM 1.01 (Internal Development)
Added Paths:
-----------
XoopsModules/xtransam/
XoopsModules/xtransam/branches/
XoopsModules/xtransam/releases/
XoopsModules/xtransam/releases/1.01/
XoopsModules/xtransam/releases/1.01/xtransam/
XoopsModules/xtransam/releases/1.01/xtransam/admin/
XoopsModules/xtransam/releases/1.01/xtransam/admin/admin_header.php
XoopsModules/xtransam/releases/1.01/xtransam/admin/index.html
XoopsModules/xtransam/releases/1.01/xtransam/admin/index.php
XoopsModules/xtransam/releases/1.01/xtransam/admin/menu.php
XoopsModules/xtransam/releases/1.01/xtransam/class/
XoopsModules/xtransam/releases/1.01/xtransam/class/files.php
XoopsModules/xtransam/releases/1.01/xtransam/class/googleprovider.php
XoopsModules/xtransam/releases/1.01/xtransam/class/index.html
XoopsModules/xtransam/releases/1.01/xtransam/class/iobase.php
XoopsModules/xtransam/releases/1.01/xtransam/class/languages.php
XoopsModules/xtransam/releases/1.01/xtransam/class/translator.php
XoopsModules/xtransam/releases/1.01/xtransam/images/
XoopsModules/xtransam/releases/1.01/xtransam/images/Thumbs.db
XoopsModules/xtransam/releases/1.01/xtransam/images/index.html
XoopsModules/xtransam/releases/1.01/xtransam/images/left_both.gif
XoopsModules/xtransam/releases/1.01/xtransam/images/right_both.gif
XoopsModules/xtransam/releases/1.01/xtransam/images/xtransam_slogo.png
XoopsModules/xtransam/releases/1.01/xtransam/include/
XoopsModules/xtransam/releases/1.01/xtransam/include/forms.php
XoopsModules/xtransam/releases/1.01/xtransam/include/functions.php
XoopsModules/xtransam/releases/1.01/xtransam/include/index.html
XoopsModules/xtransam/releases/1.01/xtransam/language/
XoopsModules/xtransam/releases/1.01/xtransam/language/english/
XoopsModules/xtransam/releases/1.01/xtransam/language/english/admin.php
XoopsModules/xtransam/releases/1.01/xtransam/language/english/index.html
XoopsModules/xtransam/releases/1.01/xtransam/language/english/modinfo.php
XoopsModules/xtransam/releases/1.01/xtransam/language/index.html
XoopsModules/xtransam/releases/1.01/xtransam/sql/
XoopsModules/xtransam/releases/1.01/xtransam/sql/index.html
XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql
XoopsModules/xtransam/releases/1.01/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/releases/1.01/xtransam/xoops_version.php
XoopsModules/xtransam/trunk/
XoopsModules/xtransam/trunk/htdocs/
XoopsModules/xtransam/trunk/htdocs/modules/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/admin_header.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/index.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/admin/menu.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/files.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/googleprovider.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/iobase.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/languages.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/class/translator.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/Thumbs.db
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/left_both.gif
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/right_both.gif
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/images/xtransam_slogo.png
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/forms.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/functions.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/include/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/admin.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/english/modinfo.php
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/language/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/index.html
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/sql/mysql.sql.bak
XoopsModules/xtransam/trunk/htdocs/modules/xtransam/xoops_version.php
Added: XoopsModules/xtransam/releases/1.01/xtransam/admin/admin_header.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/admin/admin_header.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/admin/admin_header.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,50 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ error_reporting(E_ALL);
+include '../../../mainfile.php';
+include '../../../include/cp_header.php';
+include '../include/functions.php';
+
+include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+
+if (is_object($xoopsUser)) {
+ $xoopsModule = XoopsModule::getByDirname("xsoap");
+ if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
+ redirect_header(XOOPS_URL . "/", 3, _NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL . "/", 1, _NOPERM);
+ exit();
+}
+$myts = &MyTextSanitizer::getInstance();
+error_reporting(E_ALL);
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/admin/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/admin/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/admin/index.html 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/admin/index.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/admin/index.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/admin/index.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,232 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+define ("_CHARSET","UTF-8");
+define ("_CHARSET_ISO","ISO-8859-1");
+
+include 'admin_header.php';
+include_once '../include/forms.php';
+
+error_reporting(E_ALL);
+global $xoopsDB;
+
+ if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+ if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ ${$k} = $v;
+ }
+ }
+
+
+ini_set("max_execution_time", "300");
+
+switch ($op){
+case "save-languages":
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ foreach($id as $key => $value)
+ {
+ switch($value){
+ case "new":
+ $lang = $lang_handler->create();
+ break;
+ default:
+ $lang = $lang_handler->get($value);
+ }
+
+ if (!empty($name[$value])&&!empty($code[$value])) {
+ $lang->setVar('name', $name[$value]);
+ $lang->setVar('code', $code[$value]);
+ $lang->setVar('foldername', $folder[$value]);
+ @$lang_handler->insert($lang);
+ }
+ }
+ redirect_header("index.php?op=languages",2,_XT_LANGSAVEOK);
+ break;
+case "languages":
+ xoops_cp_header();
+ adminMenu(3);
+ languagesForm_display();
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+case "export":
+ global $xoopsUser;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $files = $files_handler->getObjects($criteria);
+
+ $from_folder = $lang_handler->folder($io->getvar('languagefrom'));
+ $to_folder = $lang_handler->folder($io->getvar('languageto'));
+
+ foreach($files as $file) {
+ $path = explode('/', $file->getVar('path'));
+
+ foreach($path as $key => $value)
+ if (strtolower($value) == strtolower($from_folder)) {
+ $path[$key] = $to_folder;
+ }
+
+ $wpath = implode('/', $path).'/';
+
+ if($wpath!=$file->getVar('path')){
+ $bfile = file($file->getVar('path').$file->getVar('filename'));
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ $criteria->add(new Criteria('fileid', $file->getVar('id')));
+ $trans = $trans_handler->getObjects($criteria);
+ foreach($trans as $tran) {
+ $search = $trans_handler->change_charset(hex2bin($tran->getVar('replacestr')), _CHARSET_ISO, _CHARSET);
+ $name = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET);
+ $translation = $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET);
+ $translation = str_replace('\"', '"', $translation);
+ $translation = str_replace('"', '\"', $translation);
+ $replace = 'define("'.$name.'", "'.$translation.'");';
+ $bfile[$tran->getVar('line')] = str_replace($search, $replace, $bfile[$tran->getVar('line')]);
+ }
+ @makeWritable($wpath, true);
+ if (file_exists($wpath.$file->getVar('filename')))
+ unlink($wpath.$file->getVar('filename'));
+ $file = @fopen($wpath.$file->getVar('filename'), 'w');
+ $bfile[-1] = "<?php // Translation done by xtransam & ".$xoopsUser->uname()." - ".date('Y-m-d H:i')." ?>\n";
+ $buffer = implode('', $bfile);
+ fwrite($file, $buffer, strlen($buffer));
+ fclose($file);
+
+ }
+
+ }
+ redirect_header("index.php?op=bbs",2,_XT_EXPORTCOMPLETE);
+ break;
+case "save":
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ foreach($trans as $key => $value) {
+ $tran = $trans_handler->get($key);
+ $tran->setVar('hexval_translation', bin2hex($trans_handler->change_charset($value, _CHARSET, _CHARSET_ISO)));
+ $trans_handler->insert($tran);
+ }
+ redirect_header("index.php?op=manage&id=$id&fileid=$fileid",2,_XT_SAVECOMPLETE);
+ break;
+case "manage":
+ xoops_cp_header();
+ adminMenu(2);
+ managerForm_display($id, $fileid);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "analysis":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->analysepath($io);
+ redirect_header("index.php?op=bbs",2,_XT_ANLYSISCOMPLETE);
+ break;
+
+case "import":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $io = $io_handler->get($id);
+ @$files_handler->importfiles($io);
+ redirect_header("index.php?op=bbs",2,_XT_IMPORTCOMPLETE);
+ break;
+
+case "translate":
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $io = $io_handler->get($id);
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $criteria = new CriteriaCompo(new Criteria('ioid', $io->getVar('id')));
+ if ($trans_handler->getCount($criteria)>0) {
+ $trans = $trans_handler->getObjects($criteria);
+ $start = time();
+ foreach($trans as $tran) {
+ if ($tran->isempty()){
+ $from = $lang_handler->code($io->getVar('languagefrom'));
+ $to = $lang_handler->code($io->getVar('languageto'));
+ $provider = $lang_handler->provider($tran->getVar('toid'));
+ if (strlen($provider)>0) {
+ $provider_handler = xoops_getmodulehandler($provider.'provider', 'xtransam');
+ $translation = $trans_handler->change_charset($provider_handler->translate($from,$to, $tran->getVar('hexval_orginal')), _CHARSET, _CHARSET_ISO);
+ $tran->setVar('hexval_translation', bin2hex($translation));
+ if (strlen($translation)>0)
+ $tran->setVar('auto', 1);
+ else
+ $tran->setVar('auto', 0);
+ $trans_handler->insert($tran);
+ }
+ if ($start+28<time())
+ {
+ $restart++;
+ redirect_header("index.php?op=translate&id=$id&restart=$restart",2,sprintf(_XT_30SECONDSCONTINUING, $restart));
+ }
+ }
+ }
+ }
+ redirect_header("index.php?op=bbs",2,_XT_TRANSLATIONCOMPLETE);
+ break;
+
+case "languages":
+
+ break;
+case "bbs":
+
+ xoops_cp_header();
+ adminMenu(2);
+ translationForm_display(false);
+ footer_adminMenu();
+ xoops_cp_footer();
+
+ break;
+
+case "wizard":
+default:
+
+ xoops_cp_header();
+ adminMenu(1);
+ wizardForm_display($step);
+ translationForm_display(true);
+ footer_adminMenu();
+ xoops_cp_footer();
+ break;
+
+}
+
+
+
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/admin/menu.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/admin/menu.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/admin/menu.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,38 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+global $adminmenu;
+$adminmenu = array();
+$adminmenu[1]['title'] = _MI_XTRANSAM_ADMENU1;
+$adminmenu[1]['link'] = "admin/index.php?op=wizard";
+$adminmenu[2]['title'] = _MI_XTRANSAM_ADMENU2;
+$adminmenu[2]['link'] = "admin/index.php?op=bbs";
+$adminmenu[3]['title'] = _MI_XTRANSAM_ADMENU3;
+$adminmenu[3]['link'] = "admin/index.php?op=languages";
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/files.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/files.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/files.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,208 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamFiles extends XoopsObject
+{
+
+ function XtransamFiles($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT);
+ $this->initVar('filename', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('imported', XOBJ_DTYPE_INT, 0);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamFilesHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+ var $regex = '/define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*) \);|define\((.*)\);|define \((.*)\);|define \((.*)\);|define \( ([\"\', \ta-zA-Z0-9_]+)\);|define\( (.*)\);|define\((.*) \);|define \((.*) \);|define \((.*) \);|define \( (.*) \);|define\( (.*) \);/';
+ var $seperator = array('", "', '","', '" , "', '" , "', '", "', '" , "',
+ '", \'', '",\'', '" , \'', '" , \'', '", \'', '" , \'' ,
+ '\', \'', '\',\'', '\' , \'', '\' , \'', '\', \'', '\' , \'',
+ '\', "', '\',"', '\' , "', '\' , "', '\', "', '\' , "');
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_files", 'XtransamFiles', "id", "path");
+ }
+
+ function importfiles($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $io->getVar('id')), 'AND');
+ $criteria->add(new Criteria('`imported`', 0), 'AND');
+ $files = $this->getObjects($criteria);
+
+ foreach ($files as $file) {
+ $content = file_get_contents($file->getVar('path').'/'.$file->getVar('filename'));
+ $lines = explode("\n", $content);
+ foreach($lines as $key => $line) {
+ if (strpos(' '.$line,'define')>0) {
+ @preg_match_all($this->regex, $line, $matches);
+
+ $def = array();
+ foreach($matches as $match)
+ foreach($match as $result) {
+ if (!empty($result)&&substr($result,0,6)!='define') {
+ foreach($this->seperator as $sep)
+ if (strpos($result, $sep)>0)
+ if (count(explode($sep, $result))==2)
+ $result = explode($sep, $result);
+
+ $def[0] = substr(trim($result[0]),1);
+ $def[1] = substr(trim($result[1]),0, strlen(trim($result[1]))-1);
+ } elseif (substr($result,0,6)=='define') {
+ $def[3] = $result;
+ }
+ }
+
+
+ if (!empty($def[0])&&!empty($def[1])) {
+ $trans = $trans_handler->create();
+ $trans->setVar('ioid',$io->getVar('id'));
+ $trans->setVar('fromid',$io->getVar('languagefrom'));
+ $trans->setVar('toid',$io->getVar('languageto'));
+ $trans->setVar('fileid',$file->getVar('id'));
+ $trans->setVar('linetype','define');
+ $trans->setVar('line', $key);
+ $trans->setVar('hexval_name',bin2hex($trans_handler->change_charset($def[0], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('hexval_orginal',bin2hex($trans_handler->change_charset($def[1], _CHARSET, _CHARSET_ISO)));
+ $trans->setVar('replacestr',bin2hex($trans_handler->change_charset($def[3], _CHARSET, _CHARSET_ISO)));
+
+ if (!$trans_handler->exists($trans))
+ $trans_handler->insert($trans);
+ }
+ }
+ }
+
+ $file->setVar('imported', '1');
+ $this->insert($file);
+
+ }
+ }
+
+
+ function analysepath($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ switch ($io->getVar('point'))
+ {
+ case "core":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/language/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/language/'.$io->getVar('path');
+ break;
+ case "module":
+ $files = $this->dirToArray(XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path'), true);
+ $path = XOOPS_ROOT_PATH.'/modules/'.$io->getVar('path');
+ break;
+ }
+
+ foreach($files as $key => $file)
+ {
+ if (file_exists($file)) {
+ $tfile = $this->create();
+ $tfile->setVar('filename', basename($file));
+ $tfile->setVar('path', str_replace(basename($file),'',$file));
+ $tfile->setVar('ioid', $io->getVar('id'));
+ if (!$this->exists($tfile))
+ @$this->insert($tfile);
+ }
+ }
+
+ }
+
+ private function dirToArray($directory, $recursive, $fileext = 'php') {
+ $array_items = array();
+ if ($handle = opendir($directory)) {
+ while (false !== ($file = readdir($handle))) {
+ $filecomp = explode('.', $file);
+ if ($file != "." && $file != "..") {
+ if (is_dir($directory. "/" . $file)) {
+ if($recursive) {
+ $array_items = array_merge($array_items, $this->dirToArray($directory. "/" . $file, $recursive));
+ }
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ } else {
+ $file = $directory . "/" . $file;
+ if (in_array($fileext, $filecomp))
+ $array_items[] = preg_replace("/\/\//si", "/", $file);
+ }
+ }
+ }
+ closedir($handle);
+ }
+ return $array_items;
+ }
+
+ function exists($file)
+ {
+ if (!is_a($file, 'XtransamFiles'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $file->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`path`', $file->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`filename`', $file->getVar('filename')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/googleprovider.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/googleprovider.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/googleprovider.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,120 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamGoogleprovider extends XoopsObject
+{
+
+ function XtransamGoogleprovider($id = null)
+ {
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamGoogleproviderHandler extends XoopsPersistableObjectHandler
+{
+
+ var $url = "http://ajax.googleapis.com/ajax/services/language/translate";
+ var $retrieve = array('start' => '<textarea name=utrans wrap=SOFT dir="ltr" rows=5 id=suggestion>',
+ 'end' => '</textarea>');
+
+ function __construct(&$db)
+ { }
+
+ function translate($fromcode, $tocode, $hexvalue)
+ {
+
+ $response = $this->send_post($this->url, $this->hex2bin($hexvalue), $fromcode, $tocode, XOOPS_URL);
+ if (preg_match("/{\"translatedText\":\"([^\"]+)\"/i", $response, $matches)) {
+ return self::_unescapeUTF8EscapeSeq($this->clean($matches[1]));
+ }
+ }
+
+ private function _unescapeUTF8EscapeSeq($str) {
+ return preg_replace_callback("/\\\u([0-9a-f]{4})/i", create_function('$matches', 'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_NOQUOTES, \'UTF-8\');'), $str);
+ }
+
+ private function hex2bin($h)
+ {
+ if (!is_string($h)) return null;
+ $r='';
+ for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); }
+ return $r;
+ }
+
+ private function clean($var)
+ {
+ $var = htmlspecialchars_decode($var);
+ $var = str_replace('% s', ' %s ', $var);
+ $var = str_replace('% u', ' %u ', $var);
+ $var = str_replace('% d', ' %d ', $var);
+ if (strpos($var, 'text/css'))
+ $var ='';
+ return $var;
+ }
+
+ function send_post($url, $text, $from, $to, $referer = null)
+ {
+ $langpair = $from.'|'.$to;
+ $text = $text;
+
+ $params = array('http' =>
+ array(
+ 'method' => 'POST',
+ 'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
+ "Referer: $referer\r\n",
+ "content"=> http_build_query(array('langpair'=>$langpair, 'q'=>$text, 'v'=>'1.0'))
+ )
+ );
+ $ctx = stream_context_create($params);
+ $fp = fopen($url, 'rb', false, $ctx);
+ $response = stream_get_contents($fp);
+
+ return $response;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/index.html 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/iobase.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/iobase.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/iobase.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,155 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamIobase extends XoopsObject
+{
+
+ function XtransamIobase($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('point', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('path', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('languagefrom', XOBJ_DTYPE_INT, null);
+ $this->initVar('languageto', XOBJ_DTYPE_INT, null);
+ $this->initVar('done', XOBJ_DTYPE_INT, null);
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamIobaseHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_iobase", 'XtransamIobase', "id", "path");
+ }
+
+ function insert($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return false;
+
+ if (!$this->exists($io))
+ $sql = "INSERT INTO ".$this->db->prefix('xtransam_iobase')." (`point`, `path`, `languagefrom`, `languageto`) VALUES ('".$io->getVar('point')."', '".$io->getVar('path')."', '".$io->getVar('languagefrom')."', '".$io->getVar('languageto')."')";
+ else
+ $sql = "UPDATE ".$this->db->prefix('xtransam_iobase')." SET `point` = '".$io->getVar('point')."', `path` = '".$io->getVar('path')."', `languagefrom` = '".$io->getVar('languagefrom')."', `languageto` = '".$io->getVar('languageto')."', `total` = '".$io->getVar('total')."', `done` = '".$io->getVar('done')."' where `id` = ".$io->getVar('id');
+
+ return $this->db->queryF($sql);
+
+ }
+
+ function &getObjects($criteria = null, $fields = null, $asObject = true, $id_as_key = true)
+ {
+ if (is_array($fields) && count($fields) > 0) {
+ if (! in_array($this->handler->keyName, $fields)) {
+ $fields[] = $this->handler->keyName;
+ }
+ $select = "`" . implode("`, `", $fields) . "`";
+ } else {
+ $select = "*";
+ }
+ $limit = null;
+ $start = null;
+ $sql = "SELECT {$select} FROM `".$this->db->prefix('xtransam_iobase')."`";
+ if (isset($criteria) && is_subclass_of($criteria, "criteriaelement")) {
+ $sql .= " " . $criteria->renderWhere();
+ if ($sort = $criteria->getSort()) {
+ $sql .= " ORDER BY {$sort} " . $criteria->getOrder();
+ $orderSet = true;
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ if (empty($orderSet)) {
+ // $sql .= " ORDER BY `{$this->handler->keyName}` DESC";
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ $ret = array();
+ if ($asObject) {
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object = &$this->create(false);
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object;
+ } else {
+ $ret[] = $object;
+ }
+ unset($object);
+ }
+ } else {
+ $object = &$this->create(false);
+ while ($myrow = $this->db->fetchArray($result)) {
+ $object->assignVars($myrow);
+ if ($id_as_key) {
+ $ret[$myrow['id']] = $object->getValues(array_keys($myrow));
+ } else {
+ $ret[] = $object->getValues(array_keys($myrow));
+ }
+ }
+ unset($object);
+ }
+ return $ret;
+ }
+
+ function exists($io)
+ {
+ if (!is_a($io, 'XtransamIobase'))
+ return true;
+
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`point`', $io->getVar('point')), 'AND');
+ $criteria->add(new Criteria('`path`', $io->getVar('path')), 'AND');
+ $criteria->add(new Criteria('`languagefrom`', $io->getVar('languagefrom')), 'AND');
+ $criteria->add(new Criteria('`languageto`', $io->getVar('languageto')), 'AND');
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/languages.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/languages.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/languages.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,131 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamLanguages extends XoopsObject
+{
+
+ function XtransamLanguages($id = null)
+ {
+ $this->initVar('lang_id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('provider', XOBJ_DTYPE_TXTBOX, null, false, 20);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ $this->initVar('code', XOBJ_DTYPE_TXTBOX, null, true, 6);
+ $this->initVar('foldername', XOBJ_DTYPE_TXTBOX, null, false, 255);
+
+ }
+
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamLanguagesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, "xtransam_languages", 'XtransamLanguages', "lang_id", "name");
+ }
+
+ function name($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['name'];
+ } else {
+ return false;
+ }
+ }
+
+ function provider($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ return $objs[0]['provider'];
+ } else {
+ return false;
+ }
+ }
+
+ function folder($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false );
+ if (empty($objs[0]['foldername']))
+ return strtolower($objs[0]['name']);
+ else
+ return strtolower($objs[0]['foldername']);
+
+ } else {
+ return false;
+ }
+ }
+
+ function code($id)
+ {
+ if ($this->getCount(new Criteria('lang_id', $id))>0)
+ {
+ $objs = $this->getObjects(new Criteria('lang_id', $id), false, false);
+ return $objs[0]['code'];
+ } else {
+ return false;
+ }
+ }
+
+ function validlanguage($name)
+ {
+ include_once(XOOPS_ROOT_PATH.'/class/criteria.php');
+ $criteria = new CriteriaCompo(new Criteria('`name`', $name, 'LIKE'), 'OR');
+ $criteria->add(new Criteria('`foldername`', $name, 'LIKE'), 'OR');
+ if ($this->getCount($criteria)>0)
+ {
+ $objs = $this->getObjects($criteria);
+ return $objs[0]->getVar('lang_id');
+ } else {
+ return false;
+ }
+
+ }
+}
+?>
Added: XoopsModules/xtransam/releases/1.01/xtransam/class/translator.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/class/translator.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/class/translator.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,127 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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 //
+// ------------------------------------------------------------------------ //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+/**
+ * Class for policies
+ * @author Simon Roberts <on...@xo...>
+ * @copyright copyright (c) 2009-2003 XOOPS.org
+ * @package kernel
+ */
+class XtransamTranslator extends XoopsObject
+{
+
+ function XtransamTranslator($id = null)
+ {
+ $this->initVar('id', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('ioid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fromid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('toid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('fileid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('linetype', XOBJ_DTYPE_OTHER, null, false, 20);
+ $this->initVar('hexval_name', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_orginal', XOBJ_DTYPE_OTHER);
+ $this->initVar('hexval_translation', XOBJ_DTYPE_OTHER);
+ $this->initVar('replacestr', XOBJ_DTYPE_OTHER, null);
+ $this->initVar('out', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('line', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('auto', XOBJ_DTYPE_INT, null, false);
+ }
+
+ function isempty()
+ {
+ $hexval_translation = $this->getVar('hexval_translation');
+ return empty($hexval_translation);
+ }
+}
+
+
+/**
+* XOOPS policies handler class.
+* This class is responsible for providing data access mechanisms to the data source
+* of XOOPS user class objects.
+*
+* @author Simon Roberts <si...@ch...>
+* @package kernel
+*/
+class XtransamTranslatorHandler extends XoopsPersistableObjectHandler
+{
+
+ var $db;
+
+ function __construct(&$db)
+ {
+ $this->db = $db;
+ parent::__construct($db, "xtransam_translator", 'XtransamTranslator', "id", "hexval_name");
+ }
+
+ function change_charset($text, $charset_output = 'UTF-8', $charset_input = 'ISO-8859-1')
+ {
+ // Values can be : UTF-8 ; ASCII
+ //$detected_encoding = mb_detect_encoding($text);
+ // if ($charset_output == $detected_encoding) {
+ if ($charset_output == $charset_input) {
+ // Encoding is already good
+ return $text;
+ } elseif ($charset_output == 'UTF-8' && $charset_input == 'ISO-8859-1') {
+ // ISO-8859-1 -> UTF8
+ return utf8_encode($text);
+ } elseif ($charset_output == 'ISO-8859-1' && $charset_input == 'UTF-8') {
+ // UTF8 -> ISO-8859-1
+ return utf8_decode($text);
+ } else {
+ // * -> UTF8
+ if (function_exists("mb_convert_encoding")) {
+ return mb_convert_encoding($text, $charset_output, $charset_input);
+ }else{
+ return $text;
+ }
+
+ }
+ }
+
+ function exists($trans)
+ {
+ if (!is_a($trans, 'XtransamTranslator'))
+ return true;
+
+ $criteria = new CriteriaCompo(new Criteria('`ioid`', $trans->getVar('ioid')), 'AND');
+ $criteria->add(new Criteria('`fromid`', $trans->getVar('fromid')), 'AND');
+ $criteria->add(new Criteria('`toid`', $trans->getVar('toid')), 'AND');
+ $criteria->add(new Criteria('`fileid`', $trans->getVar('fileid')), 'AND');
+ $criteria->add(new Criteria('`linetype`', $trans->getVar('linetype')), 'AND');
+ $criteria->add(new Criteria('`hexval_name`', $trans->getVar('hexval_name')), 'AND');
+
+ if ($this->getCount($criteria)>0)
+ return true;
+ else
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.01/xtransam/images/Thumbs.db
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.01/xtransam/images/index.html
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/images/index.html (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/images/index.html 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xtransam/releases/1.01/xtransam/images/left_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.01/xtransam/images/left_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.01/xtransam/images/right_both.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.01/xtransam/images/right_both.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.01/xtransam/images/xtransam_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/xtransam/releases/1.01/xtransam/images/xtransam_slogo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/xtransam/releases/1.01/xtransam/include/forms.php
===================================================================
--- XoopsModules/xtransam/releases/1.01/xtransam/include/forms.php (rev 0)
+++ XoopsModules/xtransam/releases/1.01/xtransam/include/forms.php 2009-05-16 00:38:33 UTC (rev 3244)
@@ -0,0 +1,303 @@
+<?php
+// $Autho: wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2009 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: Simon Roberts (si...@ch...) -- //
+// ------------------------------------------------------------------------ //
+ function languagesForm_display() {
+ $form_sel = new XoopsThemeForm(_XT_LANGUAGEMATRIX, "languages", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $langs = $lang_handler->getObjects(NULL);
+
+ /* $ele_tray[0] = new XoopsFormElementTray(_XT_NEWLANG,' ');
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_NAME, 'name[0]', 26, 255));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_CODE, 'code[0]', 10, 6));
+ $ele_tray[0]->addElement(new XoopsFormText(_XT_FOLDER, 'folder[0]', 26, 255));
+ $ele_tray[0]->addElement(new XoopsFormHidden('id[0]', 'new'));
+ $form_sel->addElement($ele_tray[0]); */
+
+ foreach ($langs as $lang) {
+ $ele_tray[$lang->getVar('lang_id')] = new XoopsFormElementTray($lang->getVar('name'),' ');
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_NAME, 'name['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('name'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_CODE, 'code['.$lang->getVar('lang_id').']', 10, 6, htmlspecialchars($lang->getVar('code'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormText(_XT_FOLDER, 'folder['.$lang->getVar('lang_id').']', 26, 255, htmlspecialchars($lang->getVar('foldername'))));
+ $ele_tray[$lang->getVar('lang_id')]->addElement(new XoopsFormHidden('id['.$lang->getVar('id').']', $lang->getVar('lang_id')));
+ $form_sel->addElement($ele_tray[$lang->getVar('lang_id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save-languages"));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+ function managerForm_display($ioid, $fileid)
+ {
+ $form_sel = new XoopsThemeForm(_XT_SELECTFILETOEDIT, "filesel", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $io_handler = xoops_getmodulehandler('iobase', 'xtransam');
+ $lang_handler = xoops_getmodulehandler('languages', 'xtransam');
+ $files_handler = xoops_getmodulehandler('files', 'xtransam');
+ $trans_handler = xoops_getmodulehandler('translator', 'xtransam');
+
+ $io = $io_handler->get($ioid);
+ $files = $files_handler->getObjects(new Criteria('ioid', $ioid));
+
+ if ($fileid==0)
+ $fileid = $files[0]->getVar('id');
+
+ $table_sel = new XoopsFormSelect(_XT_SELECTFILETOEDIT.':', 'select');
+ $table_sel->setExtra('');
+ $table_sel->setValue("index.php?op=manage&id=$ioid&fileid=".$fileid);
+ foreach($files as $file)
+ $table_sel->addOption("index.php?op=manage&id=$ioid&fileid=".$file->getVar('id'), $file->getVar('filename'));
+
+ $form_sel->addElement($table_sel);
+ $form_sel->display();
+
+ $form_sel = new XoopsThemeForm(sprintf(_XT_TRANSLATIONEDITOR, $lang_handler->name($io->getVar('languagefrom')), $lang_handler->name($io->getVar('languageto'))), "editor", $_SERVER['PHP_SELF'] ."");
+ $form_sel->setExtra( "enctype='multipart/form-data'" ) ;
+
+ $trans = $trans_handler->getObjects(new Criteria('fileid', $fileid));
+ foreach($trans as $tran) {
+ $txtbox[$tran->getVar('id')] = new XoopsFormTextArea($trans_handler->change_charset(hex2bin($tran->getVar('hexval_name')), _CHARSET_ISO, _CHARSET), 'trans['.$tran->getVar('id').']', $trans_handler->change_charset(hex2bin($tran->getVar('hexval_translation')), _CHARSET_ISO, _CHARSET), 2, 85);
+ $txtbox[$tran->getVar('id')]->setDescription($lang_handler->name($tran->getVar('fromid')).": ".$trans_handler->change_charset(hex2bin($tran->getVar('hexval_orginal')), _CHARSET_ISO, _CHARSET));
+ $form_sel->addElement($txtbox[$tran->getVar('id')]);
+ }
+
+ $form_sel->addElement(new XoopsFormHidden("op", "save"));
+ $form_sel->addElement(new XoopsFormHidden("id", $ioid));
+ $form_sel->addElement(new XoopsFormHidden("fileid", $fileid));
+ $form_sel->addElement(new XoopsFormButton('', 'send', _SEND, 'submit'));
+ $form_sel->display();
+
+ }
+
+
+ function translationForm_display($display=false)
+ {
+ $form_sel = new XoopsTh...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-14 05:49:56
|
Revision: 3243
http://xoops.svn.sourceforge.net/xoops/?rev=3243&view=rev
Author: wishcraft
Date: 2009-05-14 05:49:47 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Text Santizer Bug fixed (Xoops DHTML Editor + IMG tag) - Allow Scripted Images
Modified Paths:
--------------
XoopsCore/trunk/htdocs/class/module.textsanitizer.php
XoopsCore/trunk/htdocs/class/textsanitizer/image/image.php
Modified: XoopsCore/trunk/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 05:32:12 UTC (rev 3242)
+++ XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 05:49:47 UTC (rev 3243)
@@ -359,31 +359,7 @@
$replacements[] = '<span style="font-family: \\2;">\\3</span>';
$patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
$replacements[] = '<a href="mailto:\\1">\\1</a>';
- if ($allowimage)
- {
- $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\1" width="\\2" src="\\3">';
- $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\2" width="\\1" src="\\3">';
- $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\1" src="\\2">';
- $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<img width="\\1" src="\\2">';
- $patterns[] = "/\[img](.*)\[\/img\]/sU";
- $replacements[] = '<img src="\\1">';
- } else {
- $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<!--<img align="\\1" width="\\2" src="\\3">-->';
- $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<!--<img align="\\2" width="\\1" src="\\3">-->';
- $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<!--<img align="\\1" src="\\2">-->';
- $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<!--<img width="\\1" src="\\2">-->';
- $patterns[] = "/\[img](.*)\[\/img\]/sU";
- $replacements[] = '<!--<img src="\\1">-->';
- }
-
+
$patterns[] = "/\[b](.*)\[\/b\]/sU";
$replacements[] = '<strong>\\1</strong>';
$patterns[] = "/\[i](.*)\[\/i\]/sU";
Modified: XoopsCore/trunk/htdocs/class/textsanitizer/image/image.php
===================================================================
--- XoopsCore/trunk/htdocs/class/textsanitizer/image/image.php 2009-05-14 05:32:12 UTC (rev 3242)
+++ XoopsCore/trunk/htdocs/class/textsanitizer/image/image.php 2009-05-14 05:49:47 UTC (rev 3243)
@@ -33,15 +33,31 @@
$ts->patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
$ts->patterns[] = "/\[img width=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
$ts->patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+ // Added for script driven images
+ $ts->patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
+ $ts->patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
+ $ts->patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
+ $ts->patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
+ $ts->patterns[] = "/\[img](.*)\[\/img\]/sU";
+
$ts->patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
$ts->patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
+
if (empty($ts->config['allowimage'])) {
$ts->replacements[] = '<a href="\\5" rel="external">\\5</a>';
$ts->replacements[] = '<a href="\\3" rel="external">\\3</a>';
$ts->replacements[] = '<a href="\\3" rel="external">\\3</a>';
$ts->replacements[] = '<a href="\\1" rel="external">\\1</a>';
+ // Added for script driven images
+ $ts->replacements[] = '<img align="\\1" width="\\2" src="\\3">';
+ $ts->replacements[] = '<img align="\\2" width="\\1" src="\\3">';
+ $ts->replacements[] = '<img align="\\1" src="\\2">';
+ $ts->replacements[] = '<img width="\\1" src="\\2">';
+ $ts->replacements[] = '<img src="\\1">';
+
$ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\\4" rel="external" title="\\5">\\5</a>';
$ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\\2" rel="external" title="\\3">\\3</a>';
+
} else {
if (! empty($config['clickable']) && ! empty($config['max_width']) && ! empty($GLOBALS['xoTheme'])) {
if (! $jsLoaded) {
@@ -53,11 +69,27 @@
$ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\3\");'><img src='\\3' class='\\2' alt='Open in new window' border='0' " . ($config['resize'] ? ""javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
$ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\3\");'><img src='\\3' alt='Open in new window' border='0' "JavaScript:if(this.width>\\2)this.width=\\2\" /></a><br />";
$ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\1\");'><img src='\\1' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+
+ // Added for script driven images
+ $ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\3\");'><img align=\'\\1' width='\\2' src='\\3' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+
+ $ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\3\");'><img align='\\2' width='\\1' src='\\3' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+ $ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\2\");'><img align='\\1' src='\\2' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+ $ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\2\");'><img width='\\1' src='\\2' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+ $ts->replacements[] = "<a href='javascript:CaricaFoto(\"\\1\");'><img src='\\1' alt='Open in new window' border='0'" . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+
} else {
$ts->replacements[] = "<img src='\\5' class='\\2' border='0' alt='' "JavaScript:if(this.width>\\4) this.width=\\4\" />";
$ts->replacements[] = "<img src='\\3' class='\\2' border='0' alt='' " . ($config['resize'] ? ""javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
$ts->replacements[] = "<img src='\\3' border='0' alt='' "JavaScript:if(this.width>\\2) this.width=\\2\" />";
$ts->replacements[] = "<img src='\\1' border='0' alt='' " . ($config['resize'] ? " "javascript:imageResize(this, " . $config['max_width'] . ")\"" : "") . "/></a>";
+ // Added for script driven images
+ $ts->replacements[] = '<img align="\\1" width="\\2" src="\\3">';
+ $ts->replacements[] = '<img align="\\2" width="\\1" src="\\3">';
+ $ts->replacements[] = '<img align="\\1" src="\\2">';
+ $ts->replacements[] = '<img width="\\1" src="\\2">';
+ $ts->replacements[] = '<img src="\\1">';
+
}
$ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\\4" class="\\2" alt="\\5" />';
$ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\\2" alt="\\3" />';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-14 05:32:25
|
Revision: 3242
http://xoops.svn.sourceforge.net/xoops/?rev=3242&view=rev
Author: wishcraft
Date: 2009-05-14 05:32:12 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Text Santizer Bug fixed (Xoops DHTML Editor + IMG tag)
Modified Paths:
--------------
XoopsCore/trunk/htdocs/class/module.textsanitizer.php
Modified: XoopsCore/trunk/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 04:51:58 UTC (rev 3241)
+++ XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 05:32:12 UTC (rev 3242)
@@ -359,18 +359,31 @@
$replacements[] = '<span style="font-family: \\2;">\\3</span>';
$patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
$replacements[] = '<a href="mailto:\\1">\\1</a>';
-
- $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\1" width="\\2" src="\\3">';
- $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\2" width="\\1" src="\\3">';
- $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
- $replacements[] = '<img align="\\1" src="\\2">';
- $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
- $replacements[] = '<img width="\\1" src="\\2">';
- $patterns[] = "/\[img](.*)\[\/img\]/sU";
- $replacements[] = '<img src="\\1">';
-
+ if ($allowimage)
+ {
+ $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\1" width="\\2" src="\\3">';
+ $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\2" width="\\1" src="\\3">';
+ $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\1" src="\\2">';
+ $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img width="\\1" src="\\2">';
+ $patterns[] = "/\[img](.*)\[\/img\]/sU";
+ $replacements[] = '<img src="\\1">';
+ } else {
+ $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<!--<img align="\\1" width="\\2" src="\\3">-->';
+ $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<!--<img align="\\2" width="\\1" src="\\3">-->';
+ $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<!--<img align="\\1" src="\\2">-->';
+ $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<!--<img width="\\1" src="\\2">-->';
+ $patterns[] = "/\[img](.*)\[\/img\]/sU";
+ $replacements[] = '<!--<img src="\\1">-->';
+ }
+
$patterns[] = "/\[b](.*)\[\/b\]/sU";
$replacements[] = '<strong>\\1</strong>';
$patterns[] = "/\[i](.*)\[\/i\]/sU";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-14 04:54:49
|
Revision: 3241
http://xoops.svn.sourceforge.net/xoops/?rev=3241&view=rev
Author: wishcraft
Date: 2009-05-14 04:51:58 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Text Santizer Bug fixed (Xoops DHTML Editor + IMG tag)
Modified Paths:
--------------
XoopsCore/trunk/htdocs/class/module.textsanitizer.php
Modified: XoopsCore/trunk/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 01:47:58 UTC (rev 3240)
+++ XoopsCore/trunk/htdocs/class/module.textsanitizer.php 2009-05-14 04:51:58 UTC (rev 3241)
@@ -1,958 +1,970 @@
-<?php
-/**
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/**
- * Xoops Editor usage guide
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package kernel
- * @subpackage core
- * @since 2.3.0
- * @author Taiwen Jiang <ph...@us...>
- * @author John Neill <cat...@xo...>
- * @version $Id$
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * Abstract class for extensions
- *
- * @author Taiwen Jiang <ph...@us...>
- * @copyright The Xoops Project
- */
-class MyTextSanitizerExtension
-{
- var $instance;
- var $ts;
- var $config;
- var $image_path;
-
- /**
- * Constructor
- *
- * @param unknown_type $ts
- */
- function __construct(&$ts)
- {
- $this->ts = $ts;
- $this->image_path = XOOPS_URL . '/images/form';
- }
-
- /**
- * MyTextSanitizerExtension
- *
- * @param object $ts
- * @return MyTextSanitizerExtension
- */
- function MyTextSanitizerExtension(&$ts)
- {
- $this->__construct($ts);
- }
-
- /**
- * loadConfig
- *
- * @param string $path
- * @return string
- */
- function loadConfig($path = null)
- {
- $ts = &MyTextSanitizer::getInstance();
- $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
- if (false === strpos($path, '/')) {
- if (is_dir( $ts->path_basic.'/'.$path)) {
- $path = $ts->path_basic.'/'.$path;
- } else {
- if (is_dir($ts->path_plugin.'/'.$path)) {
- $path = $ts->path_plugin.'/'.$path;
- }
-
- }
- }
- $config_default = array();
- $config_custom = array();
- if (file_exists( $path.'/config.php')) {
- $config_default = include $path.'/config.php';
- }
- if (file_exists( $path.'/config.php')) {
- $config_custom = include $path.'/config.custom';
- }
- return $this->mergeConfig($config_default, $config_custom);
- }
-
- /**
- * Merge Config
- *
- * @param array $config_default
- * @param array $config_custom
- * @return array
- */
- function mergeConfig($config_default, $config_custom)
- {
- if (is_array($config_custom)) {
- foreach($config_custom as $key => $val) {
- if (is_array($config_default[$key])) {
- $config_default[$key] = $this->mergeConfig($config_default[$key], $config_custom[$key]);
- } else {
- $config_default[$key] = $val;
- }
- }
- }
- return $config_default;
- }
-
- /**
- * encode
- *
- * @return array
- */
- function encode()
- {
- return array();
- }
-
- /**
- * decode
- *
- * @return Null
- */
- function decode()
- {
- return null;
- }
-}
-
-/**
- * Class to "clean up" text for various uses
- *
- * <strong>Singleton</strong>
- *
- * @package kernel
- * @subpackage core
- * @author Kazumi Ono <on...@xo...>
- * @author Taiwen Jiang <ph...@us...>
- * @author Goghs Cheng
- * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
- */
-/**
- * MyTextSanitizer
- *
- * @package
- * @author John
- * @copyright Copyright (c) 2009
- * @version $Id$
- * @access public
- */
-class MyTextSanitizer
-{
- /**
- *
- * @var array
- */
- var $smileys = array();
-
- /**
- */
- var $censorConf;
-
- /**
- *
- * @var holding reference to text
- */
- var $text = "";
- var $patterns = array();
- var $replacements = array();
-
- var $path_basic;
- var $path_plugin;
-
- var $config;
-
- function __construct()
- {
- $this->path_basic = XOOPS_ROOT_PATH . '/class/textsanitizer';
- $this->path_plugin = XOOPS_ROOT_PATH . '/Frameworks/textsanitizer';
- $this->config = $this->loadConfig();
- }
-
- /**
- * Constructor of this class
- *
- * Gets allowed html tags from admin config settings
- * <br> should not be allowed since nl2br will be used
- * when storing data.
- *
- * @access private
- * @todo Sofar, this does nuttin' ;-)
- */
- function MyTextSanitizer()
- {
- $this->__construct();
- }
-
- /**
- * Enter description here...
- *
- * @param string $name
- * @return array
- */
- function loadConfig($name = null)
- {
- if (! empty($name)) {
- return MyTextSanitizerExtension::loadConfig($name);
- }
- $config_default = include $this->path_basic . '/config.php';
- $config_custom = array();
- if (file_exists($file = $this->path_basic . '/config.custom.php')) {
- include $file;
- }
- return $this->mergeConfig($config_default, $config_custom);
- }
-
- /**
- * Enter description here...
- *
- * @param array $config_default
- * @param array $config_custom
- * @return unknown
- */
- function mergeConfig($config_default, $config_custom)
- {
- if (is_array($config_custom)) {
- foreach($config_custom as $key => $val) {
- if (is_array($config_default[$key])) {
- $config_default[$key] = $this->mergeConfig($config_default[$key], $config_custom[$key]);
- } else {
- $config_default[$key] = $val;
- }
- }
- }
- return $config_default;
- }
-
- /**
- * Access the only instance of this class
- *
- * @return object
- * @static
- * @staticvar object
- */
- function &getInstance()
- {
- static $instance;
- if (! isset($instance)) {
- $instance = new MyTextSanitizer();
- }
- return $instance;
- }
-
- /**
- * Get the smileys
- *
- * @param boole $isAll TRUE for all smileys, FALSE for smileys with display = 1
- * @return array
- */
- function getSmileys($isAll = true)
- {
- if (count($this->smileys) == 0) {
- $xoopsDB = &XoopsDatabaseFactory::getDatabaseConnection();
- if ($getsmiles = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('smiles'))) {
- while ($smiles = $xoopsDB->fetchArray($getsmiles)) {
- array_push($this->smileys, $smiles);
- }
- }
- }
- if ($isAll) {
- return $this->smileys;
- }
-
- $smileys = array();
- foreach($this->smileys as $smile) {
- if (empty($smile['display'])) {
- continue;
- }
- $smileys[] = $smile;
- }
- return $smileys;
- }
-
- /**
- * Replace emoticons in the message with smiley images
- *
- * @param string $message
- * @return string
- */
- function smiley($message)
- {
- $smileys = $this->getSmileys();
- foreach($smileys as $smile) {
- $message = str_replace($smile['code'], '<img src="' . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smile['smile_url']) . '" alt="" />', $message);
- }
- return $message;
- }
-
- /**
- * Make links in the text clickable
- *
- * @param string $text
- * @return string
- */
- function makeClickable(&$text)
- {
- $valid_chars = "a-z0-9\/\-_+=.~!%@?#&;:$\|";
- $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([{$valid_chars}]+)/ei");
- $replacements = array("'\\1<a href=\"\\2://\\3\" title=\"\\2://\\3\" rel=\"external\">\\2://'.MyTextSanitizer::truncate( '\\3' ).'</a>'" , "'\\1<a href=\"http://www.\\2.\\3\" title=\"www.\\2.\\3\" rel=\"external\">'.MyTextSanitizer::truncate( 'www.\\2.\\3' ).'</a>'" , "'\\1<a href=\"ftp://ftp.\\2.\\3\" title=\"ftp.\\2.\\3\" rel=\"external\">'.MyTextSanitizer::truncate( 'ftp.\\2.\\3' ).'</a>'" , "'\\1<a href=\"mailto:\\2@\\3\" title=\"\\2@\\3\">'.MyTextSanitizer::truncate( '\\2@\\3' ).'</a>'");
- return preg_replace($patterns, $replacements, $text);
- }
-
- /**
- * MyTextSanitizer::truncate()
- *
- * @param mixed $text
- * @return
- */
- function truncate($text)
- {
- $instance = MyTextSanitizer::getInstance();
- if (empty($text) || empty($instance->config['truncate_length']) || strlen($text) < $instance->config['truncate_length']) {
- return $text;
- }
- $len = floor($instance->config['truncate_length'] / 2);
- $ret = substr($text, 0, $len) . ' ... ' . substr($text, 5 - $len);
- return $ret;
- }
-
- /**
- * Replace XoopsCodes with their equivalent HTML formatting
- *
- * @param string $text
- * @param bool $allowimage Allow images in the text?
- * On FALSE, uses links to images.
- * @return string
- */
- function &xoopsCodeDecode(&$text, $allowimage = 1)
- {
- $patterns = array();
- $replacements = array();
- $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU";
- $replacements[] = '<a href="' . XOOPS_URL . '/\\2">\\3</a>';
- $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
- $replacements[] = '<a href="\\2" rel="external" title="">\\3</a>';
- $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
- $replacements[] = '<a href="\\2" rel="external" title="">\\3</a>';
- $patterns[] = "/\[url=(['\"]?)([^'\"<>]*)\\1](.*)\[\/url\]/sU";
- $replacements[] = '<a href="http://\\2" rel="external" title="">\\3</a>';
- $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU";
- $replacements[] = '<span style="color: #\\2;">\\3</span>';
- $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU";
- $replacements[] = '<span style="font-size: \\2;">\\3</span>';
- $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU";
- $replacements[] = '<span style="font-family: \\2;">\\3</span>';
- $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
- $replacements[] = '<a href="mailto:\\1">\\1</a>';
- $patterns[] = "/\[b](.*)\[\/b\]/sU";
- $replacements[] = '<strong>\\1</strong>';
- $patterns[] = "/\[i](.*)\[\/i\]/sU";
- $replacements[] = '<i>\\1</i>';
- $patterns[] = "/\[u](.*)\[\/u\]/sU";
- $replacements[] = '<u>\\1</u>';
- $patterns[] = "/\[d](.*)\[\/d\]/sU";
- $replacements[] = '<del>\\1</del>';
- $patterns[] = "/\[center](.*)\[\/center\]/sU";
- $replacements[] = '<div style="text-align: center;">\\1</div>';
- $patterns[] = "/\[left](.*)\[\/left\]/sU";
- $replacements[] = '<div style="text-align: left;">\\1</div>';
- $patterns[] = "/\[right](.*)\[\/right\]/sU";
- $replacements[] = '<div style="text-align: right;">\\1</div>';
- $patterns[] = "/\[quote]/sU";
- $replacements[] = _QUOTEC . '<div class="xoopsQuote"><blockquote>';
- $patterns[] = "/\[\/quote]/sU";
- $replacements[] = '</blockquote></div>';
-
- $this->text = $text;
- $this->patterns = $patterns;
- $this->replacements = $replacements;
-
- $this->config['allowimage'] = $allowimage;
- $this->executeExtensions();
-
- $text = preg_replace($this->patterns, $this->replacements, $this->text);
- return $text;
- }
-
- /**
- * A quick solution for filtering XSS scripts
- *
- * @TODO : To be improved
- */
- function filterXss($text)
- {
- $patterns = array();
- $replacements = array();
- $text = str_replace("\x00", "", $text);
- $c = "[\x01-\x1f]*";
- $patterns[] = "/\bj{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}[\s]*:/si";
- $replacements[] = "javascript;";
- $patterns[] = "/\ba{$c}b{$c}o{$c}u{$c}t{$c}[\s]*:/si";
- $replacements[] = "about;";
- $patterns[] = "/\bx{$c}s{$c}s{$c}[\s]*:/si";
- $replacements[] = "xss;";
- $text = preg_replace($patterns, $replacements, $text);
- return $text;
- }
-
- /**
- * Convert linebreaks to <br /> tags
- *
- * @param string $text
- * @return string
- */
- function nl2Br($text)
- {
- return preg_replace('/(\015\012)|(\015)|(\012)/', '<br />', $text);
- }
-
- /**
- * Add slashes to the text if magic_quotes_gpc is turned off.
- *
- * @param string $text
- * @return string
- */
- function addSlashes($text)
- {
- if (! get_magic_quotes_gpc()) {
- $text = addslashes($text);
- }
- return $text;
- }
-
- /**
- * if magic_quotes_gpc is on, stirip back slashes
- *
- * @param string $text
- * @return string
- */
- function stripSlashesGPC($text)
- {
- if (get_magic_quotes_gpc()) {
- $text = stripslashes($text);
- }
- return $text;
- }
-
- /**
- * Convert special characters to HTML entities
- *
- * @param string $text string being converted
- * @param int $quote_style
- * @param string $charset character set used in conversion
- * @param bool $double_encode
- * @return string
- */
- function htmlSpecialChars($text, $quote_style = ENT_QUOTES, $charset = 'ISO-8859-1', $double_encode = true)
- {
- // return preg_replace('/&/i', '&', htmlspecialchars($text, ENT_QUOTES));
- if (version_compare(phpversion(), '5.2.3', '>=')) {
- $text = htmlspecialchars($text, $quote_style, $charset, $double_encode);
- } else {
- $text = htmlspecialchars($text, $quote_style);
- }
- return preg_replace(array('/&/i' , '/ /i'), array('&' , '&nbsp;'), $text);
- }
-
- /**
- * Reverses {@link htmlSpecialChars()}
- *
- * @param string $text
- * @return string
- */
- function undoHtmlSpecialChars($text)
- {
- return preg_replace(array('/>/i' , '/</i' , '/"/i' , '/'/i' , '/&nbsp;/i'), array('>' , '<' , '"' , '\'' , " "), $text);
- }
-
- /**
- * Filters textarea form data in DB for display
- *
- * @param string $text
- * @param bool $html allow html?
- * @param bool $smiley allow smileys?
- * @param bool $xcode allow xoopscode?
- * @param bool $image allow inline images?
- * @param bool $br convert linebreaks?
- * @return string
- */
- function &displayTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
- {
- if ($html != 1) {
- // html not allowed
- $text = $this->htmlSpecialChars($text);
- }
- $text = $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
- if ($smiley != 0) {
- // process smiley
- $text = $this->smiley($text);
- }
- if ($xcode != 0) {
- // decode xcode
- if ($image != 0) {
- // image allowed
- $text = $this->xoopsCodeDecode($text);
- } else {
- // image not allowed
- $text = $this->xoopsCodeDecode($text, 0);
- }
- }
- if ($br != 0) {
- $text = $this->nl2Br($text);
- }
- $text = $this->codeConv($text, $xcode);
- $text = $this->makeClickable($text);
- if (! empty($this->config['filterxss_on_display'])) {
- $text = $this->filterXss($text);
- }
- return $text;
- }
-
- /**
- * Filters textarea form data submitted for preview
- *
- * @param string $text
- * @param bool $html allow html?
- * @param bool $smiley allow smileys?
- * @param bool $xcode allow xoopscode?
- * @param bool $image allow inline images?
- * @param bool $br convert linebreaks?
- * @return string
- */
- function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
- {
- $text = $this->stripSlashesGPC($text);
- $text = $this->displayTarea($text, $html, $smiley, $xcode, $image, $br);
- return $text;
- }
-
- /**
- * Replaces banned words in a string with their replacements
- *
- * @param string $text
- * @return string
- * @deprecated
- */
- function &censorString(&$text)
- {
- $ret = $this->executeExtension('censor', $text);
- if ($ret === false) {
- return $text;
- }
- return $ret;
- }
-
- /**
- * MyTextSanitizer::codePreConv()
- *
- * @param mixed $text
- * @param mixed $xcode
- * @return
- */
- function codePreConv($text, $xcode = 1)
- {
- if ($xcode != 0) {
- $patterns = "/\[code([^\]]*?)\](.*)\[\/code\]/esU";
- $replacements = "'[code\\1]'.base64_encode('\\2').'[/code]'";
- $text = preg_replace($patterns, $replacements, $text);
- }
- return $text;
- }
-
- /**
- * MyTextSanitizer::codeConv()
- *
- * @param mixed $text
- * @param mixed $xcode
- * @return
- */
- function codeConv($text, $xcode = 1)
- {
- if (empty($xcode)) {
- return $text;
- }
- $patterns = "/\[code([^\]]*?)\](.*)\[\/code\]/esU";
- $replacements = "'<div class=\"xoopsCode\"><code>'.\$this->executeExtension('syntaxhighlight', \$this->htmlSpecialChars(str_replace('\\\"', '\"', base64_decode('$2'))), '$1').'</code></div>'";
- $text = preg_replace($patterns, $replacements, $text);
- return $text;
- }
-
- /**
- * MyTextSanitizer::executeExtensions()
- *
- * @return
- */
- function executeExtensions()
- {
- $extensions = array_filter($this->config['extensions']);
- if (empty($extensions)) {
- return true;
- }
- foreach(array_keys($extensions) as $extension) {
- $this->executeExtension($extension);
- }
- }
-
- /**
- * MyTextSanitizer::loadExtension()
- *
- * @param mixed $name
- * @return
- */
- function loadExtension($name)
- {
- if (! include_once $this->path_basic . '/' . $name . '/' . $name . '.php') {
- if (! include_once $this->path_plugin . '/' . $name . '/' . $name . '.php') {
- return false;
- }
- }
- $class = 'Myts' . ucfirst($name);
- if (! class_exists($class)) {
- trigger_error('Extension ' . $name . ' not exist', E_USER_WARNING);
- return false;
- }
- $extension = &new $class($this);
- return $extension;
- }
-
- /**
- * MyTextSanitizer::executeExtension()
- *
- * @param mixed $name
- * @return
- */
- function executeExtension($name)
- {
- $extension = $this->loadExtension($name);
- $args = array_slice(func_get_args(), 1);
- return call_user_func_array(array($extension , 'load'), array_merge(array(&$this), $args));
- }
-
- /**
- * Filter out possible malicious text
- * kses project at SF could be a good solution to check
- *
- * @param string $text text to filter
- * @param bool $force force filtering
- * @return string filtered text
- */
- function textFilter($text, $force = false)
- {
- $ret = $this->executeExtension('textfilter', $text, $force);
- if ($ret === false) {
- return $text;
- }
- return $ret;
- }
- // #################### Deprecated Methods ######################
- /**
- * *#@+
- *
- * @deprecated
- */
-
- /**
- * MyTextSanitizer::codeSanitizer()
- *
- * @param mixed $str
- * @param mixed $image
- * @return
- */
- function codeSanitizer($str, $image = 1)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $str = $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str)));
- $str = $this->xoopsCodeDecode($str, $image);
- return $str;
- }
-
- /**
- * MyTextSanitizer::sanitizeForDisplay()
- *
- * @param mixed $text
- * @param integer $allowhtml
- * @param integer $smiley
- * @param mixed $bbcode
- * @return
- */
- function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- if ($allowhtml == 0) {
- $text = $this->htmlSpecialChars($text);
- } else {
- // $config =& $GLOBALS['xoopsConfig'];
- // $allowed = $config['allowed_html'];
- // $text = strip_tags($text, $allowed);
- $text = $this->makeClickable($text);
- }
- if ($smiley == 1) {
- $text = $this->smiley($text);
- }
- if ($bbcode == 1) {
- $text = $this->xoopsCodeDecode($text);
- }
- $text = $this->nl2Br($text);
- return $text;
- }
-
- /**
- * MyTextSanitizer::sanitizeForPreview()
- *
- * @param mixed $text
- * @param integer $allowhtml
- * @param integer $smiley
- * @param mixed $bbcode
- * @return
- */
- function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->oopsStripSlashesGPC($text);
- if ($allowhtml == 0) {
- $text = $this->htmlSpecialChars($text);
- } else {
- // $config =& $GLOBALS['xoopsConfig'];
- // $allowed = $config['allowed_html'];
- // $text = strip_tags($text, $allowed);
- $text = $this->makeClickable($text);
- }
- if ($smiley == 1) {
- $text = $this->smiley($text);
- }
- if ($bbcode == 1) {
- $text = $this->xoopsCodeDecode($text);
- }
- $text = $this->nl2Br($text);
- return $text;
- }
-
- /**
- * MyTextSanitizer::makeTboxData4Save()
- *
- * @param mixed $text
- * @return
- */
- function makeTboxData4Save($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- // $text = $this->undoHtmlSpecialChars($text);
- return $this->addSlashes($text);
- }
-
- /**
- * MyTextSanitizer::makeTboxData4Show()
- *
- * @param mixed $text
- * @param mixed $smiley
- * @return
- */
- function makeTboxData4Show($text, $smiley = 0)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->htmlSpecialChars($text);
- return $text;
- }
-
- /**
- * MyTextSanitizer::makeTboxData4Edit()
- *
- * @param mixed $text
- * @return
- */
- function makeTboxData4Edit($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::makeTboxData4Preview()
- *
- * @param mixed $text
- * @param mixed $smiley
- * @return
- */
- function makeTboxData4Preview($text, $smiley = 0)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->stripSlashesGPC($text);
- $text = $this->htmlSpecialChars($text);
- return $text;
- }
-
- /**
- * MyTextSanitizer::makeTboxData4PreviewInForm()
- *
- * @param mixed $text
- * @return
- */
- function makeTboxData4PreviewInForm($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->stripSlashesGPC($text);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::makeTareaData4Save()
- *
- * @param mixed $text
- * @return
- */
- function makeTareaData4Save($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->addSlashes($text);
- }
-
- /**
- * MyTextSanitizer::makeTareaData4Show()
- *
- * @param mixed $text
- * @param integer $html
- * @param integer $smiley
- * @param mixed $xcode
- * @return
- */
- function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->displayTarea($text, $html, $smiley, $xcode);
- return $text;
- }
-
- /**
- * MyTextSanitizer::makeTareaData4Edit()
- *
- * @param mixed $text
- * @return
- */
- function makeTareaData4Edit($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::makeTareaData4Preview()
- *
- * @param mixed $text
- * @param integer $html
- * @param integer $smiley
- * @param mixed $xcode
- * @return
- */
- function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- $text = $this->previewTarea($text, $html, $smiley, $xcode);
- return $text;
- }
-
- /**
- * MyTextSanitizer::makeTareaData4PreviewInForm()
- *
- * @param mixed $text
- * @return
- */
- function makeTareaData4PreviewInForm($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- // if magic_quotes_gpc is on, do stipslashes
- $text = $this->stripSlashesGPC($text);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::makeTareaData4InsideQuotes()
- *
- * @param mixed $text
- * @return
- */
- function makeTareaData4InsideQuotes($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::oopsStripSlashesGPC()
- *
- * @param mixed $text
- * @return
- */
- function oopsStripSlashesGPC($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->stripSlashesGPC($text);
- }
-
- /**
- * MyTextSanitizer::oopsStripSlashesRT()
- *
- * @param mixed $text
- * @return
- */
- function oopsStripSlashesRT($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- if (get_magic_quotes_runtime()) {
- $text = stripslashes($text);
- }
- return $text;
- }
-
- /**
- * MyTextSanitizer::oopsAddSlashes()
- *
- * @param mixed $text
- * @return
- */
- function oopsAddSlashes($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->addSlashes($text);
- }
-
- /**
- * MyTextSanitizer::oopsHtmlSpecialChars()
- *
- * @param mixed $text
- * @return
- */
- function oopsHtmlSpecialChars($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->htmlSpecialChars($text);
- }
-
- /**
- * MyTextSanitizer::oopsNl2Br()
- *
- * @param mixed $text
- * @return
- */
- function oopsNl2Br($text)
- {
- trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
- return $this->nl2br($text);
- }
-}
-
-?>
+<?php
+/**
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * Xoops Editor usage guide
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package kernel
+ * @subpackage core
+ * @since 2.3.0
+ * @author Taiwen Jiang <ph...@us...>
+ * @author John Neill <cat...@xo...>
+ * @version $Id$
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * Abstract class for extensions
+ *
+ * @author Taiwen Jiang <ph...@us...>
+ * @copyright The Xoops Project
+ */
+class MyTextSanitizerExtension
+{
+ var $instance;
+ var $ts;
+ var $config;
+ var $image_path;
+
+ /**
+ * Constructor
+ *
+ * @param unknown_type $ts
+ */
+ function __construct(&$ts)
+ {
+ $this->ts = $ts;
+ $this->image_path = XOOPS_URL . '/images/form';
+ }
+
+ /**
+ * MyTextSanitizerExtension
+ *
+ * @param object $ts
+ * @return MyTextSanitizerExtension
+ */
+ function MyTextSanitizerExtension(&$ts)
+ {
+ $this->__construct($ts);
+ }
+
+ /**
+ * loadConfig
+ *
+ * @param string $path
+ * @return string
+ */
+ function loadConfig($path = null)
+ {
+ $ts = &MyTextSanitizer::getInstance();
+ $path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
+ if (false === strpos($path, '/')) {
+ if (is_dir( $ts->path_basic.'/'.$path)) {
+ $path = $ts->path_basic.'/'.$path;
+ } else {
+ if (is_dir($ts->path_plugin.'/'.$path)) {
+ $path = $ts->path_plugin.'/'.$path;
+ }
+
+ }
+ }
+ $config_default = array();
+ $config_custom = array();
+ if (file_exists( $path.'/config.php')) {
+ $config_default = include $path.'/config.php';
+ }
+ if (file_exists( $path.'/config.php')) {
+ $config_custom = include $path.'/config.custom';
+ }
+ return $this->mergeConfig($config_default, $config_custom);
+ }
+
+ /**
+ * Merge Config
+ *
+ * @param array $config_default
+ * @param array $config_custom
+ * @return array
+ */
+ function mergeConfig($config_default, $config_custom)
+ {
+ if (is_array($config_custom)) {
+ foreach($config_custom as $key => $val) {
+ if (is_array($config_default[$key])) {
+ $config_default[$key] = $this->mergeConfig($config_default[$key], $config_custom[$key]);
+ } else {
+ $config_default[$key] = $val;
+ }
+ }
+ }
+ return $config_default;
+ }
+
+ /**
+ * encode
+ *
+ * @return array
+ */
+ function encode()
+ {
+ return array();
+ }
+
+ /**
+ * decode
+ *
+ * @return Null
+ */
+ function decode()
+ {
+ return null;
+ }
+}
+
+/**
+ * Class to "clean up" text for various uses
+ *
+ * <strong>Singleton</strong>
+ *
+ * @package kernel
+ * @subpackage core
+ * @author Kazumi Ono <on...@xo...>
+ * @author Taiwen Jiang <ph...@us...>
+ * @author Goghs Cheng
+ * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org
+ */
+/**
+ * MyTextSanitizer
+ *
+ * @package
+ * @author John
+ * @copyright Copyright (c) 2009
+ * @version $Id$
+ * @access public
+ */
+class MyTextSanitizer
+{
+ /**
+ *
+ * @var array
+ */
+ var $smileys = array();
+
+ /**
+ */
+ var $censorConf;
+
+ /**
+ *
+ * @var holding reference to text
+ */
+ var $text = "";
+ var $patterns = array();
+ var $replacements = array();
+
+ var $path_basic;
+ var $path_plugin;
+
+ var $config;
+
+ function __construct()
+ {
+ $this->path_basic = XOOPS_ROOT_PATH . '/class/textsanitizer';
+ $this->path_plugin = XOOPS_ROOT_PATH . '/Frameworks/textsanitizer';
+ $this->config = $this->loadConfig();
+ }
+
+ /**
+ * Constructor of this class
+ *
+ * Gets allowed html tags from admin config settings
+ * <br> should not be allowed since nl2br will be used
+ * when storing data.
+ *
+ * @access private
+ * @todo Sofar, this does nuttin' ;-)
+ */
+ function MyTextSanitizer()
+ {
+ $this->__construct();
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param string $name
+ * @return array
+ */
+ function loadConfig($name = null)
+ {
+ if (! empty($name)) {
+ return MyTextSanitizerExtension::loadConfig($name);
+ }
+ $config_default = include $this->path_basic . '/config.php';
+ $config_custom = array();
+ if (file_exists($file = $this->path_basic . '/config.custom.php')) {
+ include $file;
+ }
+ return $this->mergeConfig($config_default, $config_custom);
+ }
+
+ /**
+ * Enter description here...
+ *
+ * @param array $config_default
+ * @param array $config_custom
+ * @return unknown
+ */
+ function mergeConfig($config_default, $config_custom)
+ {
+ if (is_array($config_custom)) {
+ foreach($config_custom as $key => $val) {
+ if (is_array($config_default[$key])) {
+ $config_default[$key] = $this->mergeConfig($config_default[$key], $config_custom[$key]);
+ } else {
+ $config_default[$key] = $val;
+ }
+ }
+ }
+ return $config_default;
+ }
+
+ /**
+ * Access the only instance of this class
+ *
+ * @return object
+ * @static
+ * @staticvar object
+ */
+ function &getInstance()
+ {
+ static $instance;
+ if (! isset($instance)) {
+ $instance = new MyTextSanitizer();
+ }
+ return $instance;
+ }
+
+ /**
+ * Get the smileys
+ *
+ * @param boole $isAll TRUE for all smileys, FALSE for smileys with display = 1
+ * @return array
+ */
+ function getSmileys($isAll = true)
+ {
+ if (count($this->smileys) == 0) {
+ $xoopsDB = &XoopsDatabaseFactory::getDatabaseConnection();
+ if ($getsmiles = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('smiles'))) {
+ while ($smiles = $xoopsDB->fetchArray($getsmiles)) {
+ array_push($this->smileys, $smiles);
+ }
+ }
+ }
+ if ($isAll) {
+ return $this->smileys;
+ }
+
+ $smileys = array();
+ foreach($this->smileys as $smile) {
+ if (empty($smile['display'])) {
+ continue;
+ }
+ $smileys[] = $smile;
+ }
+ return $smileys;
+ }
+
+ /**
+ * Replace emoticons in the message with smiley images
+ *
+ * @param string $message
+ * @return string
+ */
+ function smiley($message)
+ {
+ $smileys = $this->getSmileys();
+ foreach($smileys as $smile) {
+ $message = str_replace($smile['code'], '<img src="' . XOOPS_UPLOAD_URL . '/' . htmlspecialchars($smile['smile_url']) . '" alt="" />', $message);
+ }
+ return $message;
+ }
+
+ /**
+ * Make links in the text clickable
+ *
+ * @param string $text
+ * @return string
+ */
+ function makeClickable(&$text)
+ {
+ $valid_chars = "a-z0-9\/\-_+=.~!%@?#&;:$\|";
+ $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([{$valid_chars}]+)/ei" , "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([{$valid_chars}]+)/ei");
+ $replacements = array("'\\1<a href=\"\\2://\\3\" title=\"\\2://\\3\" rel=\"external\">\\2://'.MyTextSanitizer::truncate( '\\3' ).'</a>'" , "'\\1<a href=\"http://www.\\2.\\3\" title=\"www.\\2.\\3\" rel=\"external\">'.MyTextSanitizer::truncate( 'www.\\2.\\3' ).'</a>'" , "'\\1<a href=\"ftp://ftp.\\2.\\3\" title=\"ftp.\\2.\\3\" rel=\"external\">'.MyTextSanitizer::truncate( 'ftp.\\2.\\3' ).'</a>'" , "'\\1<a href=\"mailto:\\2@\\3\" title=\"\\2@\\3\">'.MyTextSanitizer::truncate( '\\2@\\3' ).'</a>'");
+ return preg_replace($patterns, $replacements, $text);
+ }
+
+ /**
+ * MyTextSanitizer::truncate()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function truncate($text)
+ {
+ $instance = MyTextSanitizer::getInstance();
+ if (empty($text) || empty($instance->config['truncate_length']) || strlen($text) < $instance->config['truncate_length']) {
+ return $text;
+ }
+ $len = floor($instance->config['truncate_length'] / 2);
+ $ret = substr($text, 0, $len) . ' ... ' . substr($text, 5 - $len);
+ return $ret;
+ }
+
+ /**
+ * Replace XoopsCodes with their equivalent HTML formatting
+ *
+ * @param string $text
+ * @param bool $allowimage Allow images in the text?
+ * On FALSE, uses links to images.
+ * @return string
+ */
+ function &xoopsCodeDecode(&$text, $allowimage = 1)
+ {
+ $patterns = array();
+ $replacements = array();
+ $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU";
+ $replacements[] = '<a href="' . XOOPS_URL . '/\\2">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="\\2" rel="external" title="">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="\\2" rel="external" title="">\\3</a>';
+ $patterns[] = "/\[url=(['\"]?)([^'\"<>]*)\\1](.*)\[\/url\]/sU";
+ $replacements[] = '<a href="http://\\2" rel="external" title="">\\3</a>';
+ $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU";
+ $replacements[] = '<span style="color: #\\2;">\\3</span>';
+ $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU";
+ $replacements[] = '<span style="font-size: \\2;">\\3</span>';
+ $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU";
+ $replacements[] = '<span style="font-family: \\2;">\\3</span>';
+ $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU";
+ $replacements[] = '<a href="mailto:\\1">\\1</a>';
+
+ $patterns[] = "/\[img align=(left|right|center)\ width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\1" width="\\2" src="\\3">';
+ $patterns[] = "/\[img width=([0-9]*)\ align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\2" width="\\1" src="\\3">';
+ $patterns[] = "/\[img align=(left|right|center)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img align="\\1" src="\\2">';
+ $patterns[] = "/\[img width=([0-9]*)\](.*)\[\/img\]/sU";
+ $replacements[] = '<img width="\\1" src="\\2">';
+ $patterns[] = "/\[img](.*)\[\/img\]/sU";
+ $replacements[] = '<img src="\\1">';
+
+ $patterns[] = "/\[b](.*)\[\/b\]/sU";
+ $replacements[] = '<strong>\\1</strong>';
+ $patterns[] = "/\[i](.*)\[\/i\]/sU";
+ $replacements[] = '<i>\\1</i>';
+ $patterns[] = "/\[u](.*)\[\/u\]/sU";
+ $replacements[] = '<u>\\1</u>';
+ $patterns[] = "/\[d](.*)\[\/d\]/sU";
+ $replacements[] = '<del>\\1</del>';
+ $patterns[] = "/\[center](.*)\[\/center\]/sU";
+ $replacements[] = '<div style="text-align: center;">\\1</div>';
+ $patterns[] = "/\[left](.*)\[\/left\]/sU";
+ $replacements[] = '<div style="text-align: left;">\\1</div>';
+ $patterns[] = "/\[right](.*)\[\/right\]/sU";
+ $replacements[] = '<div style="text-align: right;">\\1</div>';
+ $patterns[] = "/\[quote]/sU";
+ $replacements[] = _QUOTEC . '<div class="xoopsQuote"><blockquote>';
+ $patterns[] = "/\[\/quote]/sU";
+ $replacements[] = '</blockquote></div>';
+
+ $this->text = $text;
+ $this->patterns = $patterns;
+ $this->replacements = $replacements;
+
+ $this->config['allowimage'] = $allowimage;
+ $this->executeExtensions();
+
+ $text = preg_replace($this->patterns, $this->replacements, $this->text);
+ return $text;
+ }
+
+ /**
+ * A quick solution for filtering XSS scripts
+ *
+ * @TODO : To be improved
+ */
+ function filterXss($text)
+ {
+ $patterns = array();
+ $replacements = array();
+ $text = str_replace("\x00", "", $text);
+ $c = "[\x01-\x1f]*";
+ $patterns[] = "/\bj{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}[\s]*:/si";
+ $replacements[] = "javascript;";
+ $patterns[] = "/\ba{$c}b{$c}o{$c}u{$c}t{$c}[\s]*:/si";
+ $replacements[] = "about;";
+ $patterns[] = "/\bx{$c}s{$c}s{$c}[\s]*:/si";
+ $replacements[] = "xss;";
+ $text = preg_replace($patterns, $replacements, $text);
+ return $text;
+ }
+
+ /**
+ * Convert linebreaks to <br /> tags
+ *
+ * @param string $text
+ * @return string
+ */
+ function nl2Br($text)
+ {
+ return preg_replace('/(\015\012)|(\015)|(\012)/', '<br />', $text);
+ }
+
+ /**
+ * Add slashes to the text if magic_quotes_gpc is turned off.
+ *
+ * @param string $text
+ * @return string
+ */
+ function addSlashes($text)
+ {
+ if (! get_magic_quotes_gpc()) {
+ $text = addslashes($text);
+ }
+ return $text;
+ }
+
+ /**
+ * if magic_quotes_gpc is on, stirip back slashes
+ *
+ * @param string $text
+ * @return string
+ */
+ function stripSlashesGPC($text)
+ {
+ if (get_magic_quotes_gpc()) {
+ $text = stripslashes($text);
+ }
+ return $text;
+ }
+
+ /**
+ * Convert special characters to HTML entities
+ *
+ * @param string $text string being converted
+ * @param int $quote_style
+ * @param string $charset character set used in conversion
+ * @param bool $double_encode
+ * @return string
+ */
+ function htmlSpecialChars($text, $quote_style = ENT_QUOTES, $charset = 'ISO-8859-1', $double_encode = true)
+ {
+ // return preg_replace('/&/i', '&', htmlspecialchars($text, ENT_QUOTES));
+ if (version_compare(phpversion(), '5.2.3', '>=')) {
+ $text = htmlspecialchars($text, $quote_style, $charset, $double_encode);
+ } else {
+ $text = htmlspecialchars($text, $quote_style);
+ }
+ return preg_replace(array('/&/i' , '/ /i'), array('&' , '&nbsp;'), $text);
+ }
+
+ /**
+ * Reverses {@link htmlSpecialChars()}
+ *
+ * @param string $text
+ * @return string
+ */
+ function undoHtmlSpecialChars($text)
+ {
+ return preg_replace(array('/>/i' , '/</i' , '/"/i' , '/'/i' , '/&nbsp;/i'), array('>' , '<' , '"' , '\'' , " "), $text);
+ }
+
+ /**
+ * Filters textarea form data in DB for display
+ *
+ * @param string $text
+ * @param bool $html allow html?
+ * @param bool $smiley allow smileys?
+ * @param bool $xcode allow xoopscode?
+ * @param bool $image allow inline images?
+ * @param bool $br convert linebreaks?
+ * @return string
+ */
+ function &displayTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
+ {
+ if ($html != 1) {
+ // html not allowed
+ $text = $this->htmlSpecialChars($text);
+ }
+ $text = $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18)
+ if ($smiley != 0) {
+ // process smiley
+ $text = $this->smiley($text);
+ }
+ if ($xcode != 0) {
+ // decode xcode
+ if ($image != 0) {
+ // image allowed
+ $text = $this->xoopsCodeDecode($text);
+ } else {
+ // image not allowed
+ $text = $this->xoopsCodeDecode($text, 0);
+ }
+ }
+ if ($br != 0) {
+ $text = $this->nl2Br($text);
+ }
+ $text = $this->codeConv($text, $xcode);
+ $text = $this->makeClickable($text);
+ if (! empty($this->config['filterxss_on_display'])) {
+ $text = $this->filterXss($text);
+ }
+ return $text;
+ }
+
+ /**
+ * Filters textarea form data submitted for preview
+ *
+ * @param string $text
+ * @param bool $html allow html?
+ * @param bool $smiley allow smileys?
+ * @param bool $xcode allow xoopscode?
+ * @param bool $image allow inline images?
+ * @param bool $br convert linebreaks?
+ * @return string
+ */
+ function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
+ {
+ $text = $this->stripSlashesGPC($text);
+ $text = $this->displayTarea($text, $html, $smiley, $xcode, $image, $br);
+ return $text;
+ }
+
+ /**
+ * Replaces banned words in a string with their replacements
+ *
+ * @param string $text
+ * @return string
+ * @deprecated
+ */
+ function &censorString(&$text)
+ {
+ $ret = $this->executeExtension('censor', $text);
+ if ($ret === false) {
+ return $text;
+ }
+ return $ret;
+ }
+
+ /**
+ * MyTextSanitizer::codePreConv()
+ *
+ * @param mixed $text
+ * @param mixed $xcode
+ * @return
+ */
+ function codePreConv($text, $xcode = 1)
+ {
+ if ($xcode != 0) {
+ $patterns = "/\[code([^\]]*?)\](.*)\[\/code\]/esU";
+ $replacements = "'[code\\1]'.base64_encode('\\2').'[/code]'";
+ $text = preg_replace($patterns, $replacements, $text);
+ }
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::codeConv()
+ *
+ * @param mixed $text
+ * @param mixed $xcode
+ * @return
+ */
+ function codeConv($text, $xcode = 1)
+ {
+ if (empty($xcode)) {
+ return $text;
+ }
+ $patterns = "/\[code([^\]]*?)\](.*)\[\/code\]/esU";
+ $replacements = "'<div class=\"xoopsCode\"><code>'.\$this->executeExtension('syntaxhighlight', \$this->htmlSpecialChars(str_replace('\\\"', '\"', base64_decode('$2'))), '$1').'</code></div>'";
+ $text = preg_replace($patterns, $replacements, $text);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::executeExtensions()
+ *
+ * @return
+ */
+ function executeExtensions()
+ {
+ $extensions = array_filter($this->config['extensions']);
+ if (empty($extensions)) {
+ return true;
+ }
+ foreach(array_keys($extensions) as $extension) {
+ $this->executeExtension($extension);
+ }
+ }
+
+ /**
+ * MyTextSanitizer::loadExtension()
+ *
+ * @param mixed $name
+ * @return
+ */
+ function loadExtension($name)
+ {
+ if (! include_once $this->path_basic . '/' . $name . '/' . $name . '.php') {
+ if (! include_once $this->path_plugin . '/' . $name . '/' . $name . '.php') {
+ return false;
+ }
+ }
+ $class = 'Myts' . ucfirst($name);
+ if (! class_exists($class)) {
+ trigger_error('Extension ' . $name . ' not exist', E_USER_WARNING);
+ return false;
+ }
+ $extension = &new $class($this);
+ return $extension;
+ }
+
+ /**
+ * MyTextSanitizer::executeExtension()
+ *
+ * @param mixed $name
+ * @return
+ */
+ function executeExtension($name)
+ {
+ $extension = $this->loadExtension($name);
+ $args = array_slice(func_get_args(), 1);
+ return call_user_func_array(array($extension , 'load'), array_merge(array(&$this), $args));
+ }
+
+ /**
+ * Filter out possible malicious text
+ * kses project at SF could be a good solution to check
+ *
+ * @param string $text text to filter
+ * @param bool $force force filtering
+ * @return string filtered text
+ */
+ function textFilter($text, $force = false)
+ {
+ $ret = $this->executeExtension('textfilter', $text, $force);
+ if ($ret === false) {
+ return $text;
+ }
+ return $ret;
+ }
+ // #################### Deprecated Methods ######################
+ /**
+ * *#@+
+ *
+ * @deprecated
+ */
+
+ /**
+ * MyTextSanitizer::codeSanitizer()
+ *
+ * @param mixed $str
+ * @param mixed $image
+ * @return
+ */
+ function codeSanitizer($str, $image = 1)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $str = $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str)));
+ $str = $this->xoopsCodeDecode($str, $image);
+ return $str;
+ }
+
+ /**
+ * MyTextSanitizer::sanitizeForDisplay()
+ *
+ * @param mixed $text
+ * @param integer $allowhtml
+ * @param integer $smiley
+ * @param mixed $bbcode
+ * @return
+ */
+ function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ if ($allowhtml == 0) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ // $config =& $GLOBALS['xoopsConfig'];
+ // $allowed = $config['allowed_html'];
+ // $text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ($smiley == 1) {
+ $text = $this->smiley($text);
+ }
+ if ($bbcode == 1) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::sanitizeForPreview()
+ *
+ * @param mixed $text
+ * @param integer $allowhtml
+ * @param integer $smiley
+ * @param mixed $bbcode
+ * @return
+ */
+ function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->oopsStripSlashesGPC($text);
+ if ($allowhtml == 0) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ // $config =& $GLOBALS['xoopsConfig'];
+ // $allowed = $config['allowed_html'];
+ // $text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ($smiley == 1) {
+ $text = $this->smiley($text);
+ }
+ if ($bbcode == 1) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::makeTboxData4Save()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTboxData4Save($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ // $text = $this->undoHtmlSpecialChars($text);
+ return $this->addSlashes($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTboxData4Show()
+ *
+ * @param mixed $text
+ * @param mixed $smiley
+ * @return
+ */
+ function makeTboxData4Show($text, $smiley = 0)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::makeTboxData4Edit()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTboxData4Edit($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTboxData4Preview()
+ *
+ * @param mixed $text
+ * @param mixed $smiley
+ * @return
+ */
+ function makeTboxData4Preview($text, $smiley = 0)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->stripSlashesGPC($text);
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::makeTboxData4PreviewInForm()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTboxData4PreviewInForm($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4Save()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTareaData4Save($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->addSlashes($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4Show()
+ *
+ * @param mixed $text
+ * @param integer $html
+ * @param integer $smiley
+ * @param mixed $xcode
+ * @return
+ */
+ function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->displayTarea($text, $html, $smiley, $xcode);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4Edit()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTareaData4Edit($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4Preview()
+ *
+ * @param mixed $text
+ * @param integer $html
+ * @param integer $smiley
+ * @param mixed $xcode
+ * @return
+ */
+ function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ $text = $this->previewTarea($text, $html, $smiley, $xcode);
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4PreviewInForm()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTareaData4PreviewInForm($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ // if magic_quotes_gpc is on, do stipslashes
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::makeTareaData4InsideQuotes()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function makeTareaData4InsideQuotes($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::oopsStripSlashesGPC()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function oopsStripSlashesGPC($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->stripSlashesGPC($text);
+ }
+
+ /**
+ * MyTextSanitizer::oopsStripSlashesRT()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function oopsStripSlashesRT($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ if (get_magic_quotes_runtime()) {
+ $text = stripslashes($text);
+ }
+ return $text;
+ }
+
+ /**
+ * MyTextSanitizer::oopsAddSlashes()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function oopsAddSlashes($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->addSlashes($text);
+ }
+
+ /**
+ * MyTextSanitizer::oopsHtmlSpecialChars()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function oopsHtmlSpecialChars($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->htmlSpecialChars($text);
+ }
+
+ /**
+ * MyTextSanitizer::oopsNl2Br()
+ *
+ * @param mixed $text
+ * @return
+ */
+ function oopsNl2Br($text)
+ {
+ trigger_error(__CLASS__ . "::" . __FUNCTION__ . ' is deprecated', E_USER_WARNING);
+ return $this->nl2br($text);
+ }
+}
+
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-14 02:03:24
|
Revision: 3240
http://xoops.svn.sourceforge.net/xoops/?rev=3240&view=rev
Author: wishcraft
Date: 2009-05-14 01:47:58 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Reverting mysql.data.sql to 2.3.4 standardisation - remmed extra lines.
Modified Paths:
--------------
XoopsCore/trunk/htdocs/install/sql/mysql.data.sql
Modified: XoopsCore/trunk/htdocs/install/sql/mysql.data.sql
===================================================================
--- XoopsCore/trunk/htdocs/install/sql/mysql.data.sql 2009-05-14 01:47:00 UTC (rev 3239)
+++ XoopsCore/trunk/htdocs/install/sql/mysql.data.sql 2009-05-14 01:47:58 UTC (rev 3240)
@@ -74,7 +74,7 @@
INSERT INTO configoption VALUES (28, '_MD_AM_AUTH_CONFOPTION_XOOPS', 'xoops', 74);
INSERT INTO configoption VALUES (29, '_MD_AM_AUTH_CONFOPTION_LDAP', 'ldap', 74);
INSERT INTO configoption VALUES (30, '_MD_AM_AUTH_CONFOPTION_AD', 'ads', 74);
-INSERT INTO configoption VALUES (31, '_MD_AM_AUTH_CONFOPTION_SOAP', 'soap', 74);
+# INSERT INTO configoption VALUES (31, '_MD_AM_AUTH_CONFOPTION_SOAP', 'soap', 74);
# Welcoming message type
INSERT INTO configoption VALUES (32, '_NO', '0', 95);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-14 02:03:16
|
Revision: 3239
http://xoops.svn.sourceforge.net/xoops/?rev=3239&view=rev
Author: wishcraft
Date: 2009-05-14 01:47:00 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Reverting makedata.php to 2.3.4 standardisation - remmed extra lines.
Modified Paths:
--------------
XoopsCore/trunk/htdocs/install/include/makedata.php
Modified: XoopsCore/trunk/htdocs/install/include/makedata.php
===================================================================
--- XoopsCore/trunk/htdocs/install/include/makedata.php 2009-05-14 00:50:39 UTC (rev 3238)
+++ XoopsCore/trunk/htdocs/install/include/makedata.php 2009-05-14 01:47:00 UTC (rev 3239)
@@ -249,7 +249,7 @@
$dbm->insert('config', " VALUES (94, 0, 1, 'cpanel', '_MD_AM_CPANEL', 'default', '_MD_AM_CPANELDSC', 'cpanel', 'other', 11)");
$dbm->insert('config', " VALUES (95, 0, 2, 'welcome_type', '_MD_AM_WELCOMETYPE', '1', '_MD_AM_WELCOMETYPE_DESC', 'select', 'int', 3)");
-
+ /* SOAP API INSTALL (XOOPS 2.4.x)
$dbm->insert('config', " VALUES (96, 0, 7, 'soap_xoops_username', '_MD_AM_SOAP_USERNAME', '', '_MD_AM_SOAP_USERNAMEDESC', 'text', 'text', 21)");
$dbm->insert('config', " VALUES (97, 0, 7, 'soap_xoops_password', '_MD_AM_SOAP_PASSWORD', '', '_MD_AM_SOAP_PASSWORDDESC', 'password', 'text', 22)");
$dbm->insert('config', " VALUES (98, 0, 7, 'soap_soapclient', '_MD_AM_SOAP_CLIENT', '', '_MD_AM_SOAP_CLIENTDESC', 'textbox', 'text', 23)");
@@ -265,7 +265,7 @@
$dbm->insert('config', " VALUES (108, 0, 7, 'soap_fieldmapping', '_MD_AM_SOAP_FIELDMAPPING', 'name=name|uname=uname|email=email', '_MD_AM_SOAP_FIELDMAPPINGDESC', 'textarea', 'text', 33)");
$dbm->insert('config', " VALUES (109, 0, 7, 'soap_provisionning', '_MD_AM_SOAP_PROVISION', '1', '_MD_AM_SOAP_PROVISION', 'yesno', 'int', 34)");
- $dbm->insert('config', " VALUES (110, 0, 7, 'soap_provisionning_group', '_MD_AM_SOAP_PROVISIONGROUP', 'a:1:{i:0;s:1:\"2\";}', '_MD_AM_SOAP_PROVISIONGROUPDESC', 'group_multi', 'array', 35)");
+ $dbm->insert('config', " VALUES (110, 0, 7, 'soap_provisionning_group', '_MD_AM_SOAP_PROVISIONGROUP', 'a:1:{i:0;s:1:\"2\";}', '_MD_AM_SOAP_PROVISIONGROUPDESC', 'group_multi', 'array', 35)");*/
return $gruops;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-14 00:50:55
|
Revision: 3238
http://xoops.svn.sourceforge.net/xoops/?rev=3238&view=rev
Author: wishcraft
Date: 2009-05-14 00:50:39 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Kernel Streamlines (Backwards Compatibility) - Compare old User.php to others class files - missing many basic functions. These have been completed
Modified Paths:
--------------
XoopsCore/trunk/htdocs/kernel/avatar.php
XoopsCore/trunk/htdocs/kernel/block.php
XoopsCore/trunk/htdocs/kernel/comment.php
XoopsCore/trunk/htdocs/kernel/configcategory.php
XoopsCore/trunk/htdocs/kernel/configitem.php
XoopsCore/trunk/htdocs/kernel/configoption.php
XoopsCore/trunk/htdocs/kernel/group.php
XoopsCore/trunk/htdocs/kernel/groupperm.php
XoopsCore/trunk/htdocs/kernel/image.php
XoopsCore/trunk/htdocs/kernel/imagecategory.php
XoopsCore/trunk/htdocs/kernel/imageset.php
XoopsCore/trunk/htdocs/kernel/imagesetimg.php
XoopsCore/trunk/htdocs/kernel/module.php
XoopsCore/trunk/htdocs/kernel/notification.php
XoopsCore/trunk/htdocs/kernel/privmessage.php
XoopsCore/trunk/htdocs/kernel/tplfile.php
XoopsCore/trunk/htdocs/kernel/tplset.php
XoopsCore/trunk/htdocs/kernel/user.php
Modified: XoopsCore/trunk/htdocs/kernel/avatar.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/avatar.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/avatar.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -54,7 +54,80 @@
$this->initVar('avatar_type', XOBJ_DTYPE_OTHER, 0, false);
}
+
/**
+ * Returns Class Base Variable avatar_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('avatar_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_id
+ */
+ function avatar_id($format='')
+ {
+ return $this->getVar('avatar_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_file
+ */
+ function avatar_file($format='')
+ {
+ return $this->getVar('avatar_file', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_name
+ */
+ function avatar_name($format='')
+ {
+ return $this->getVar('avatar_name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_mimetype
+ */
+ function avatar_mimetype($format='')
+ {
+ return $this->getVar('avatar_mimetype', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_created
+ */
+ function avatar_created($format='')
+ {
+ return $this->getVar('avatar_created', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_display
+ */
+ function avatar_display($format='')
+ {
+ return $this->getVar('avatar_display', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_weight
+ */
+ function avatar_weight($format='')
+ {
+ return $this->getVar('avatar_weight', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_type
+ */
+ function avatar_type($format='')
+ {
+ return $this->getVar('avatar_type', $format);
+ }
+
+ /**
* Set User Count
*
* @param unknown_type $value
Modified: XoopsCore/trunk/htdocs/kernel/block.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/block.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/block.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -81,7 +81,176 @@
}
}
+
/**
+ * Returns Class Base Variable bid
+ */
+ function id($format='N')
+ {
+ return $this->getVar('bid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable bid
+ */
+ function bid($format='')
+ {
+ return $this->getVar('bid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable mid
+ */
+ function mid($format='')
+ {
+ return $this->getVar('mid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable func_num
+ */
+ function func_num($format='')
+ {
+ return $this->getVar('func_num', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_id
+ */
+ function options($format='')
+ {
+ return $this->getVar('options', $format);
+ }
+
+ /**
+ * Returns Class Base Variable name
+ */
+ function name($format='')
+ {
+ return $this->getVar('name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable title
+ */
+ function title($format='')
+ {
+ return $this->getVar('title', $format);
+ }
+
+ /**
+ * Returns Class Base Variable content
+ */
+ function content($format='')
+ {
+ return $this->getVar('content', $format);
+ }
+
+ /**
+ * Returns Class Base Variable side
+ */
+ function side($format='')
+ {
+ return $this->getVar('side', $format);
+ }
+
+ /**
+ * Returns Class Base Variable weight
+ */
+ function weight($format='')
+ {
+ return $this->getVar('weight', $format);
+ }
+
+ /**
+ * Returns Class Base Variable visible
+ */
+ function visible($format='')
+ {
+ return $this->getVar('visible', $format);
+ }
+
+ /**
+ * Returns Class Base Variable block_type
+ */
+ function block_type($format='')
+ {
+ return $this->getVar('block_type', $format);
+ }
+
+ /**
+ * Returns Class Base Variable c_type
+ */
+ function c_type($format='')
+ {
+ return $this->getVar('c_type', $format);
+ }
+
+ /**
+ * Returns Class Base Variable isactive
+ */
+ function isactive($format='')
+ {
+ return $this->getVar('isactive', $format);
+ }
+
+ /**
+ * Returns Class Base Variable dirname
+ */
+ function dirname($format='')
+ {
+ return $this->getVar('dirname', $format);
+ }
+
+ /**
+ * Returns Class Base Variable func_file
+ */
+ function func_file($format='')
+ {
+ return $this->getVar('func_file', $format);
+ }
+
+ /**
+ * Returns Class Base Variable show_func
+ */
+ function show_func($format='')
+ {
+ return $this->getVar('show_func', $format);
+ }
+
+ /**
+ * Returns Class Base Variable edit_func
+ */
+ function edit_func($format='')
+ {
+ return $this->getVar('edit_func', $format);
+ }
+
+ /**
+ * Returns Class Base Variable template
+ */
+ function template($format='')
+ {
+ return $this->getVar('template', $format);
+ }
+
+ /**
+ * Returns Class Base Variable avatar_id
+ */
+ function bcachetime($format='')
+ {
+ return $this->getVar('bcachetime', $format);
+ }
+
+ /**
+ * Returns Class Base Variable last_modified
+ */
+ function last_modified($format='')
+ {
+ return $this->getVar('last_modified', $format);
+ }
+
+ /**
* return the content of the block for output
*
* @param string $format
Modified: XoopsCore/trunk/htdocs/kernel/comment.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/comment.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/comment.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -67,6 +67,175 @@
}
/**
+ * Returns Class Base Variable com_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('com_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_id
+ */
+ function com_id($format='')
+ {
+ return $this->getVar('com_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_pid
+ */
+ function com_pid($format='')
+ {
+ return $this->getVar('com_pid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_modid
+ */
+ function com_modid($format='')
+ {
+ return $this->getVar('com_modid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_icon
+ */
+ function com_icon($format='')
+ {
+ return $this->getVar('com_icon', $format);
+ }
+
+ /**
+ * Returns Class Base Variable bid
+ */
+ function com_title($format='')
+ {
+ return $this->getVar('com_title', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_text
+ */
+ function com_text($format='')
+ {
+ return $this->getVar('com_text', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_created
+ */
+ function com_created($format='')
+ {
+ return $this->getVar('com_created', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_modified
+ */
+ function com_modified($format='')
+ {
+ return $this->getVar('com_modified', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_uid
+ */
+ function com_uid($format='')
+ {
+ return $this->getVar('com_uid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_ip
+ */
+ function com_ip($format='')
+ {
+ return $this->getVar('com_ip', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_sig
+ */
+ function com_sig($format='')
+ {
+ return $this->getVar('com_sig', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_itemid
+ */
+ function com_itemid($format='')
+ {
+ return $this->getVar('com_itemid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_rootid
+ */
+ function com_rootid($format='')
+ {
+ return $this->getVar('com_rootid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_status
+ */
+ function com_status($format='')
+ {
+ return $this->getVar('com_status', $format);
+ }
+
+ /**
+ * Returns Class Base Variable com_exparams
+ */
+ function com_exparams($format='')
+ {
+ return $this->getVar('com_exparams', $format);
+ }
+
+ /**
+ * Returns Class Base Variable bid
+ */
+ function dohtml($format='')
+ {
+ return $this->getVar('dohtml', $format);
+ }
+
+ /**
+ * Returns Class Base Variable dosmiley
+ */
+ function dosmiley($format='')
+ {
+ return $this->getVar('dosmiley', $format);
+ }
+
+ /**
+ * Returns Class Base Variable doxcode
+ */
+ function doxcode($format='')
+ {
+ return $this->getVar('doxcode', $format);
+ }
+
+ /**
+ * Returns Class Base Variable doimage
+ */
+ function doimage($format='')
+ {
+ return $this->getVar('doimage', $format);
+ }
+
+ /**
+ * Returns Class Base Variable dobr
+ */
+ function dobr($format='')
+ {
+ return $this->getVar('dobr', $format);
+ }
+
+
+ /**
* Is this comment on the root level?
*
* @return bool
Modified: XoopsCore/trunk/htdocs/kernel/configcategory.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/configcategory.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/configcategory.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -48,6 +48,40 @@
$this->initVar('confcat_name', XOBJ_DTYPE_OTHER, null);
$this->initVar('confcat_order', XOBJ_DTYPE_INT, 0);
}
+
+ /**
+ * Returns Class Base Variable confcat_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('confcat_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confcat_id
+ */
+ function confcat_id($format='')
+ {
+ return $this->getVar('confcat_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confcat_name
+ */
+ function confcat_name($format='')
+ {
+ return $this->getVar('confcat_name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confcat_order
+ */
+ function confcat_order($format='')
+ {
+ return $this->getVar('confcat_order', $format);
+ }
+
+
}
/**
Modified: XoopsCore/trunk/htdocs/kernel/configitem.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/configitem.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/configitem.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -73,6 +73,95 @@
$this->initVar('conf_order', XOBJ_DTYPE_INT);
}
+ /**
+ * Returns Class Base Variable conf_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('conf_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_id
+ */
+ function conf_id($format='')
+ {
+ return $this->getVar('conf_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_modid
+ */
+ function conf_modid($format='')
+ {
+ return $this->getVar('conf_modid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_catid
+ */
+ function conf_catid($format='')
+ {
+ return $this->getVar('conf_catid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_name
+ */
+ function conf_name($format='')
+ {
+ return $this->getVar('conf_name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_title
+ */
+ function conf_title($format='')
+ {
+ return $this->getVar('conf_title', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_value
+ */
+ function conf_value($format='')
+ {
+ return $this->getVar('conf_value', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_desc
+ */
+ function conf_desc($format='')
+ {
+ return $this->getVar('conf_desc', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_formtype
+ */
+ function conf_formtype($format='')
+ {
+ return $this->getVar('conf_formtype', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_valuetype
+ */
+ function conf_valuetype($format='')
+ {
+ return $this->getVar('conf_valuetype', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_order
+ */
+ function conf_order($format='')
+ {
+ return $this->getVar('conf_order', $format);
+ }
+
+
/**
* Get a config value in a format ready for output
*
Modified: XoopsCore/trunk/htdocs/kernel/configoption.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/configoption.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/configoption.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -48,6 +48,48 @@
$this->initVar('confop_value', XOBJ_DTYPE_TXTBOX, null, true, 255);
$this->initVar('conf_id', XOBJ_DTYPE_INT, 0);
}
+
+ /**
+ * Returns Class Base Variable confop_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('confop_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confop_id
+ */
+ function confop_id($format='')
+ {
+ return $this->getVar('confop_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confop_name
+ */
+ function confop_name($format='')
+ {
+ return $this->getVar('confop_name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable confop_value
+ */
+ function confop_value($format='')
+ {
+ return $this->getVar('confop_value', $format);
+ }
+
+ /**
+ * Returns Class Base Variable conf_id
+ */
+ function conf_id($format='')
+ {
+ return $this->getVar('conf_id', $format);
+ }
+
+
}
/**
Modified: XoopsCore/trunk/htdocs/kernel/group.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/group.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/group.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -1,453 +1,504 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-/**
- * Xoops Kernel Class
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package kernel
- * @subpackage Xoops Groups
- * @since 2.0.0
- * @author Kazumi Ono <on...@xo...>
- * @version $Id$
- */
-defined('XOOPS_ROOT_PATH') or die('Restricted access');
-
-/**
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000 XOOPS.org
- **/
-
-/**
- * a group of users
- *
- * @copyright copyright (c) 2000-2003 XOOPS.org
- * @author Kazumi Ono <on...@xo...>
- * @package kernel
- */
-class XoopsGroup extends XoopsObject
-{
- /**
- * constructor
- */
- function XoopsGroup()
- {
- $this->XoopsObject();
- $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
- $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 100);
- $this->initVar('description', XOBJ_DTYPE_TXTAREA, null, false);
- $this->initVar('group_type', XOBJ_DTYPE_OTHER, null, false);
- $this->initVar('group_official', XOBJ_DTYPE_INT, 0, false);
- }
-}
-
-/**
- * XOOPS group handler class.
- * This class is responsible for providing data access mechanisms to the data source
- * of XOOPS group class objects.
- *
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
- * @package kernel
- * @subpackage member
- */
-class XoopsGroupHandler extends XoopsObjectHandler
-{
-
- /**
- * create a new {@link XoopsGroup} object
- *
- * @param bool $isNew mark the new object as "new"?
- * @return object XoopsGroup reference to the new object
- *
- */
- function &create($isNew = true)
- {
- $group = new XoopsGroup();
- if ($isNew) {
- $group->setNew();
- }
- return $group;
- }
-
- /**
- * retrieve a specific group
- *
- * @param int $id ID of the group to get
- * @return object XoopsGroup reference to the group object, FALSE if failed
- */
- function &get($id)
- {
- $id = intval($id);
- $group = false;
- if ($id > 0) {
- $sql = 'SELECT * FROM ' . $this->db->prefix('groups') . ' WHERE groupid=' . $id;
- if (! $result = $this->db->query($sql)) {
- return $group;
- }
- $numrows = $this->db->getRowsNum($result);
- if ($numrows == 1) {
- $group = new XoopsGroup();
- $group->assignVars($this->db->fetchArray($result));
- }
- }
- return $group;
- }
-
- /**
- * insert a group into the database
- *
- * @param object reference to the group object
- * @return mixed ID of the group if inserted, FALSE if failed, TRUE if already present and unchanged.
- */
- function insert(&$group)
- {
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
- */
- if (! is_a($group, 'xoopsgroup')) {
- return false;
- }
- if (! $group->isDirty()) {
- return true;
- }
- if (! $group->cleanVars()) {
- return false;
- }
- foreach($group->cleanVars as $k => $v) {
- ${$k} = $v;
- }
- if ($group->isNew()) {
- $groupid = $this->db->genId('group_groupid_seq');
- $sql = sprintf("INSERT INTO %s (groupid, name, description, group_type) VALUES (%u, %s, %s, %s)", $this->db->prefix('groups'), $groupid, $this->db->quoteString($name), $this->db->quoteString($description), $this->db->quoteString($group_type));
- } else {
- $sql = sprintf("UPDATE %s SET name = %s, description = %s, group_type = %s WHERE groupid = %u", $this->db->prefix('groups'), $this->db->quoteString($name), $this->db->quoteString($description), $this->db->quoteString($group_type), $groupid);
- }
- if (! $result = $this->db->query($sql)) {
- return false;
- }
- if (empty($groupid)) {
- $groupid = $this->db->getInsertId();
- }
- $group->assignVar('groupid', $groupid);
- return true;
- }
-
- /**
- * remove a group from the database
- *
- * @param object $group reference to the group to be removed
- * @return bool FALSE if failed
- */
- function delete(&$group)
- {
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
- */
- if (! is_a($group, 'xoopsgroup')) {
- return false;
- }
- $sql = sprintf("DELETE FROM %s WHERE groupid = %u", $this->db->prefix('groups'), $group->getVar('groupid'));
- if (! $result = $this->db->query($sql)) {
- return false;
- }
- return true;
- }
-
- /**
- * retrieve groups from the database
- *
- * @param object $criteria {@link CriteriaElement} with conditions for the groups
- * @param bool $id_as_key should the groups' IDs be used as keys for the associative array?
- * @return mixed Array of groups
- */
- function getObjects($criteria = null, $id_as_key = false)
- {
- $ret = array();
- $limit = $start = 0;
- $sql = 'SELECT * FROM ' . $this->db->prefix('groups');
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' ' . $criteria->renderWhere();
- $limit = $criteria->getLimit();
- $start = $criteria->getStart();
- }
- $result = $this->db->query($sql, $limit, $start);
- if (! $result) {
- return $ret;
- }
- while ($myrow = $this->db->fetchArray($result)) {
- $group = new XoopsGroup();
- $group->assignVars($myrow);
- if (! $id_as_key) {
- $ret[] = & $group;
- } else {
- $ret[$myrow['groupid']] = & $group;
- }
- unset($group);
- }
- return $ret;
- }
-}
-
-/**
- * membership of a user in a group
- *
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
- * @package kernel
- */
-class XoopsMembership extends XoopsObject
-{
- /**
- * constructor
- */
- function XoopsMembership()
- {
- $this->XoopsObject();
- $this->initVar('linkid', XOBJ_DTYPE_INT, null, false);
- $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
- $this->initVar('uid', XOBJ_DTYPE_INT, null, false);
- }
-}
-
-/**
- * XOOPS membership handler class. (Singleton)
- *
- * This class is responsible for providing data access mechanisms to the data source
- * of XOOPS group membership class objects.
- *
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
- * @package kernel
- */
-class XoopsMembershipHandler extends XoopsObjectHandler
-{
-
- /**
- * create a new membership
- *
- * @param bool $isNew should the new object be set to "new"?
- * @return object XoopsMembership
- */
- function &create($isNew = true)
- {
- $mship = new XoopsMembership();
- if ($isNew) {
- $mship->setNew();
- }
- return $mship;
- }
-
- /**
- * retrieve a membership
- *
- * @param int $id ID of the membership to get
- * @return mixed reference to the object if successful, else FALSE
- */
- function &get($id)
- {
- $id = intval($id);
- $mship = false;
- if ($id > 0) {
- $sql = 'SELECT * FROM ' . $this->db->prefix('groups_users_link') . ' WHERE linkid=' . $id;
- if (! $result = $this->db->query($sql)) {
- return $mship;
- }
- $numrows = $this->db->getRowsNum($result);
- if ($numrows == 1) {
- $mship = new XoopsMembership();
- $mship->assignVars($this->db->fetchArray($result));
- }
- }
- return $mship;
- }
-
- /**
- * inserts a membership in the database
- *
- * @param object $mship reference to the membership object
- * @return bool TRUE if already in DB or successful, FALSE if failed
- */
- function insert(&$mship)
- {
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
- */
- if (! is_a($mship, 'xoopsmembership')) {
- return false;
- }
- if (! $mship->isDirty()) {
- return true;
- }
- if (! $mship->cleanVars()) {
- return false;
- }
- foreach($mship->cleanVars as $k => $v) {
- ${$k} = $v;
- }
- if ($mship->isNew()) {
- $linkid = $this->db->genId('groups_users_link_linkid_seq');
- $sql = sprintf("INSERT INTO %s (linkid, groupid, uid) VALUES (%u, %u, %u)", $this->db->prefix('groups_users_link'), $linkid, $groupid, $uid);
- } else {
- $sql = sprintf("UPDATE %s SET groupid = %u, uid = %u WHERE linkid = %u", $this->db->prefix('groups_users_link'), $groupid, $uid, $linkid);
- }
- if (! $result = $this->db->query($sql)) {
- return false;
- }
- if (empty($linkid)) {
- $linkid = $this->db->getInsertId();
- }
- $mship->assignVar('linkid', $linkid);
- return true;
- }
-
- /**
- * delete a membership from the database
- *
- * @param object $mship reference to the membership object
- * @return bool FALSE if failed
- */
- function delete(&$mship)
- {
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
- */
- if (! is_a($mship, 'xoopsmembership')) {
- return false;
- }
-
- $sql = sprintf("DELETE FROM %s WHERE linkid = %u", $this->db->prefix('groups_users_link'), $groupm->getVar('linkid'));
- if (! $result = $this->db->query($sql)) {
- return false;
- }
- return true;
- }
-
- /**
- * retrieve memberships from the database
- *
- * @param object $criteria {@link CriteriaElement} conditions to meet
- * @param bool $id_as_key should the ID be used as the array's key?
- * @return array array of references
- */
- function getObjects($criteria = null, $id_as_key = false)
- {
- $ret = array();
- $limit = $start = 0;
- $sql = 'SELECT * FROM ' . $this->db->prefix('groups_users_link');
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' ' . $criteria->renderWhere();
- $limit = $criteria->getLimit();
- $start = $criteria->getStart();
- }
- $result = $this->db->query($sql, $limit, $start);
- if (! $result) {
- return $ret;
- }
- while ($myrow = $this->db->fetchArray($result)) {
- $mship = new XoopsMembership();
- $mship->assignVars($myrow);
- if (! $id_as_key) {
- $ret[] = & $mship;
- } else {
- $ret[$myrow['linkid']] = & $mship;
- }
- unset($mship);
- }
- return $ret;
- }
-
- /**
- * count how many memberships meet the conditions
- *
- * @param object $criteria {@link CriteriaElement} conditions to meet
- * @return int
- */
- function getCount($criteria = null)
- {
- $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('groups_users_link');
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' ' . $criteria->renderWhere();
- }
- $result = $this->db->query($sql);
- if (! $result) {
- return 0;
- }
- list ($count) = $this->db->fetchRow($result);
- return $count;
- }
-
- /**
- * delete all memberships meeting the conditions
- *
- * @param object $criteria {@link CriteriaElement} with conditions to meet
- * @return bool
- */
- function deleteAll($criteria = null)
- {
- $sql = 'DELETE FROM ' . $this->db->prefix('groups_users_link');
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' ' . $criteria->renderWhere();
- }
- if (! $result = $this->db->query($sql)) {
- return false;
- }
- return true;
- }
-
- /**
- * retrieve groups for a user
- *
- * @param int $uid ID of the user
- * @param bool $asobject should the groups be returned as {@link XoopsGroup}
- * objects? FALSE returns associative array.
- * @return array array of groups the user belongs to
- */
- function getGroupsByUser($uid)
- {
- $ret = array();
- $sql = 'SELECT groupid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE uid=' . intval($uid);
- $result = $this->db->query($sql);
- if (! $result) {
- return $ret;
- }
- while ($myrow = $this->db->fetchArray($result)) {
- $ret[] = $myrow['groupid'];
- }
- return $ret;
- }
-
- /**
- * retrieve users belonging to a group
- *
- * @param int $groupid ID of the group
- * @param bool $asobject return users as {@link XoopsUser} objects?
- * FALSE will return arrays
- * @param int $limit number of entries to return
- * @param int $start offset of first entry to return
- * @return array array of users belonging to the group
- */
- function getUsersByGroup($groupid, $limit = 0, $start = 0)
- {
- $ret = array();
- $sql = 'SELECT uid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE groupid=' . intval($groupid);
- $result = $this->db->query($sql, $limit, $start);
- if (! $result) {
- return $ret;
- }
- while ($myrow = $this->db->fetchArray($result)) {
- $ret[] = $myrow['uid'];
- }
- return $ret;
- }
-}
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Xoops Kernel Class
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package kernel
+ * @subpackage Xoops Groups
+ * @since 2.0.0
+ * @author Kazumi Ono <on...@xo...>
+ * @version $Id$
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+/**
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000 XOOPS.org
+ **/
+
+/**
+ * a group of users
+ *
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @author Kazumi Ono <on...@xo...>
+ * @package kernel
+ */
+class XoopsGroup extends XoopsObject
+{
+ /**
+ * constructor
+ */
+ function XoopsGroup()
+ {
+ $this->XoopsObject();
+ $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 100);
+ $this->initVar('description', XOBJ_DTYPE_TXTAREA, null, false);
+ $this->initVar('group_type', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('group_official', XOBJ_DTYPE_INT, 0, false);
+ }
+
+ /**
+ * Returns Class Base Variable groupid
+ */
+ function id($format='N')
+ {
+ return $this->getVar('groupid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable groupid
+ */
+ function groupid($format='')
+ {
+ return $this->getVar('groupid', $format);
+ }
+
+
+ /**
+ * Returns Class Base Variable name
+ */
+ function name($format='')
+ {
+ return $this->getVar('name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable description
+ */
+ function description($format='')
+ {
+ return $this->getVar('description', $format);
+ }
+
+ /**
+ * Returns Class Base Variable group_type
+ */
+ function group_type($format='')
+ {
+ return $this->getVar('group_type', $format);
+ }
+
+ /**
+ * Returns Class Base Variable group_official
+ */
+ function group_official($format='')
+ {
+ return $this->getVar('group_official', $format);
+ }
+
+
+}
+
+/**
+ * XOOPS group handler class.
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS group class objects.
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ * @subpackage member
+ */
+class XoopsGroupHandler extends XoopsObjectHandler
+{
+
+ /**
+ * create a new {@link XoopsGroup} object
+ *
+ * @param bool $isNew mark the new object as "new"?
+ * @return object XoopsGroup reference to the new object
+ *
+ */
+ function &create($isNew = true)
+ {
+ $group = new XoopsGroup();
+ if ($isNew) {
+ $group->setNew();
+ }
+ return $group;
+ }
+
+ /**
+ * retrieve a specific group
+ *
+ * @param int $id ID of the group to get
+ * @return object XoopsGroup reference to the group object, FALSE if failed
+ */
+ function &get($id)
+ {
+ $id = intval($id);
+ $group = false;
+ if ($id > 0) {
+ $sql = 'SELECT * FROM ' . $this->db->prefix('groups') . ' WHERE groupid=' . $id;
+ if (! $result = $this->db->query($sql)) {
+ return $group;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $group = new XoopsGroup();
+ $group->assignVars($this->db->fetchArray($result));
+ }
+ }
+ return $group;
+ }
+
+ /**
+ * insert a group into the database
+ *
+ * @param object reference to the group object
+ * @return mixed ID of the group if inserted, FALSE if failed, TRUE if already present and unchanged.
+ */
+ function insert(&$group)
+ {
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (! is_a($group, 'xoopsgroup')) {
+ return false;
+ }
+ if (! $group->isDirty()) {
+ return true;
+ }
+ if (! $group->cleanVars()) {
+ return false;
+ }
+ foreach($group->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($group->isNew()) {
+ $groupid = $this->db->genId('group_groupid_seq');
+ $sql = sprintf("INSERT INTO %s (groupid, name, description, group_type) VALUES (%u, %s, %s, %s)", $this->db->prefix('groups'), $groupid, $this->db->quoteString($name), $this->db->quoteString($description), $this->db->quoteString($group_type));
+ } else {
+ $sql = sprintf("UPDATE %s SET name = %s, description = %s, group_type = %s WHERE groupid = %u", $this->db->prefix('groups'), $this->db->quoteString($name), $this->db->quoteString($description), $this->db->quoteString($group_type), $groupid);
+ }
+ if (! $result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($groupid)) {
+ $groupid = $this->db->getInsertId();
+ }
+ $group->assignVar('groupid', $groupid);
+ return true;
+ }
+
+ /**
+ * remove a group from the database
+ *
+ * @param object $group reference to the group to be removed
+ * @return bool FALSE if failed
+ */
+ function delete(&$group)
+ {
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (! is_a($group, 'xoopsgroup')) {
+ return false;
+ }
+ $sql = sprintf("DELETE FROM %s WHERE groupid = %u", $this->db->prefix('groups'), $group->getVar('groupid'));
+ if (! $result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * retrieve groups from the database
+ *
+ * @param object $criteria {@link CriteriaElement} with conditions for the groups
+ * @param bool $id_as_key should the groups' IDs be used as keys for the associative array?
+ * @return mixed Array of groups
+ */
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM ' . $this->db->prefix('groups');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' ' . $criteria->renderWhere();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (! $result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $group = new XoopsGroup();
+ $group->assignVars($myrow);
+ if (! $id_as_key) {
+ $ret[] = & $group;
+ } else {
+ $ret[$myrow['groupid']] = & $group;
+ }
+ unset($group);
+ }
+ return $ret;
+ }
+}
+
+/**
+ * membership of a user in a group
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ */
+class XoopsMembership extends XoopsObject
+{
+ /**
+ * constructor
+ */
+ function XoopsMembership()
+ {
+ $this->XoopsObject();
+ $this->initVar('linkid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
+ $this->initVar('uid', XOBJ_DTYPE_INT, null, false);
+ }
+}
+
+/**
+ * XOOPS membership handler class. (Singleton)
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS group membership class objects.
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ */
+class XoopsMembershipHandler extends XoopsObjectHandler
+{
+
+ /**
+ * create a new membership
+ *
+ * @param bool $isNew should the new object be set to "new"?
+ * @return object XoopsMembership
+ */
+ function &create($isNew = true)
+ {
+ $mship = new XoopsMembership();
+ if ($isNew) {
+ $mship->setNew();
+ }
+ return $mship;
+ }
+
+ /**
+ * retrieve a membership
+ *
+ * @param int $id ID of the membership to get
+ * @return mixed reference to the object if successful, else FALSE
+ */
+ function &get($id)
+ {
+ $id = intval($id);
+ $mship = false;
+ if ($id > 0) {
+ $sql = 'SELECT * FROM ' . $this->db->prefix('groups_users_link') . ' WHERE linkid=' . $id;
+ if (! $result = $this->db->query($sql)) {
+ return $mship;
+ }
+ $numrows = $this->db->getRowsNum($result);
+ if ($numrows == 1) {
+ $mship = new XoopsMembership();
+ $mship->assignVars($this->db->fetchArray($result));
+ }
+ }
+ return $mship;
+ }
+
+ /**
+ * inserts a membership in the database
+ *
+ * @param object $mship reference to the membership object
+ * @return bool TRUE if already in DB or successful, FALSE if failed
+ */
+ function insert(&$mship)
+ {
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (! is_a($mship, 'xoopsmembership')) {
+ return false;
+ }
+ if (! $mship->isDirty()) {
+ return true;
+ }
+ if (! $mship->cleanVars()) {
+ return false;
+ }
+ foreach($mship->cleanVars as $k => $v) {
+ ${$k} = $v;
+ }
+ if ($mship->isNew()) {
+ $linkid = $this->db->genId('groups_users_link_linkid_seq');
+ $sql = sprintf("INSERT INTO %s (linkid, groupid, uid) VALUES (%u, %u, %u)", $this->db->prefix('groups_users_link'), $linkid, $groupid, $uid);
+ } else {
+ $sql = sprintf("UPDATE %s SET groupid = %u, uid = %u WHERE linkid = %u", $this->db->prefix('groups_users_link'), $groupid, $uid, $linkid);
+ }
+ if (! $result = $this->db->query($sql)) {
+ return false;
+ }
+ if (empty($linkid)) {
+ $linkid = $this->db->getInsertId();
+ }
+ $mship->assignVar('linkid', $linkid);
+ return true;
+ }
+
+ /**
+ * delete a membership from the database
+ *
+ * @param object $mship reference to the membership object
+ * @return bool FALSE if failed
+ */
+ function delete(&$mship)
+ {
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (! is_a($mship, 'xoopsmembership')) {
+ return false;
+ }
+
+ $sql = sprintf("DELETE FROM %s WHERE linkid = %u", $this->db->prefix('groups_users_link'), $groupm->getVar('linkid'));
+ if (! $result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * retrieve memberships from the database
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to meet
+ * @param bool $id_as_key should the ID be used as the array's key?
+ * @return array array of references
+ */
+ function getObjects($criteria = null, $id_as_key = false)
+ {
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM ' . $this->db->prefix('groups_users_link');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' ' . $criteria->renderWhere();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (! $result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $mship = new XoopsMembership();
+ $mship->assignVars($myrow);
+ if (! $id_as_key) {
+ $ret[] = & $mship;
+ } else {
+ $ret[$myrow['linkid']] = & $mship;
+ }
+ unset($mship);
+ }
+ return $ret;
+ }
+
+ /**
+ * count how many memberships meet the conditions
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to meet
+ * @return int
+ */
+ function getCount($criteria = null)
+ {
+ $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('groups_users_link');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' ' . $criteria->renderWhere();
+ }
+ $result = $this->db->query($sql);
+ if (! $result) {
+ return 0;
+ }
+ list ($count) = $this->db->fetchRow($result);
+ return $count;
+ }
+
+ /**
+ * delete all memberships meeting the conditions
+ *
+ * @param object $criteria {@link CriteriaElement} with conditions to meet
+ * @return bool
+ */
+ function deleteAll($criteria = null)
+ {
+ $sql = 'DELETE FROM ' . $this->db->prefix('groups_users_link');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' ' . $criteria->renderWhere();
+ }
+ if (! $result = $this->db->query($sql)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * retrieve groups for a user
+ *
+ * @param int $uid ID of the user
+ * @param bool $asobject should the groups be returned as {@link XoopsGroup}
+ * objects? FALSE returns associative array.
+ * @return array array of groups the user belongs to
+ */
+ function getGroupsByUser($uid)
+ {
+ $ret = array();
+ $sql = 'SELECT groupid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE uid=' . intval($uid);
+ $result = $this->db->query($sql);
+ if (! $result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] = $myrow['groupid'];
+ }
+ return $ret;
+ }
+
+ /**
+ * retrieve users belonging to a group
+ *
+ * @param int $groupid ID of the group
+ * @param bool $asobject return users as {@link XoopsUser} objects?
+ * FALSE will return arrays
+ * @param int $limit number of entries to return
+ * @param int $start offset of first entry to return
+ * @return array array of users belonging to the group
+ */
+ function getUsersByGroup($groupid, $limit = 0, $start = 0)
+ {
+ $ret = array();
+ $sql = 'SELECT uid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE groupid=' . intval($groupid);
+ $result = $this->db->query($sql, $limit, $start);
+ if (! $result) {
+ return $ret;
+ }
+ while ($myrow = $this->db->fetchArray($result)) {
+ $ret[] = $myrow['uid'];
+ }
+ return $ret;
+ }
+}
?>
\ No newline at end of file
Modified: XoopsCore/trunk/htdocs/kernel/groupperm.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/groupperm.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/groupperm.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -1,24 +1,24 @@
<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
-/**
- * Xoops Kernel Class
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package kernel
- * @subpackage Xoops Group Permissions
- * @since 2.0.0
- * @author Kazumi Ono <on...@xo...>
- * @version $Id$
+/**
+ * Xoops Kernel Class
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package kernel
+ * @subpackage Xoops Group Permissions
+ * @since 2.0.0
+ * @author Kazumi Ono <on...@xo...>
+ * @version $Id$
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
@@ -27,22 +27,22 @@
* @copyright copyright (c) 2000 XOOPS.org
**/
-/**
- * A group permission
- *
- * These permissions are managed through a {@link XoopsGroupPermHandler} object
- *
- * @package kernel
- *
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
+/**
+ * A group permission
+ *
+ * These permissions are managed through a {@link XoopsGroupPermHandler} object
+ *
+ * @package kernel
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
*/
class XoopsGroupPerm extends XoopsObject
{
- /**
- * Constructor
- *
+ /**
+ * Constructor
+ *
*/
function XoopsGroupPerm()
{
@@ -53,26 +53,75 @@
$this->initVar('gperm_modid', XOBJ_DTYPE_INT, 0, false);
$this->initVar('gperm_name', XOBJ_DTYPE_OTHER, null, false);
}
+
+ /**
+ * Returns Class Base Variable gperm_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('gperm_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable gperm_id
+ */
+ function gperm_id($format='')
+ {
+ return $this->getVar('gperm_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable gperm_groupid
+ */
+ function gperm_groupid($format='')
+ {
+ return $this->getVar('gperm_groupid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable gperm_itemid
+ */
+ function gperm_itemid($format='')
+ {
+ return $this->getVar('gperm_itemid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable gperm_modid
+ */
+ function gperm_modid($format='')
+ {
+ return $this->getVar('gperm_modid', $format);
+ }
+
+ /**
+ * Returns Class Base Variable gperm_name
+ */
+ function gperm_name($format='')
+ {
+ return $this->getVar('gperm_name', $format);
+ }
+
}
-/**
- * XOOPS group permission handler class.
- *
- * This class is responsible for providing data access mechanisms to the data source
- * of XOOPS group permission class objects.
- * This class is an abstract class to be implemented by child group permission classes.
- *
- * @see XoopsGroupPerm
- * @author Kazumi Ono <on...@xo...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
+/**
+ * XOOPS group permission handler class.
+ *
+ * This class is responsible for providing data access mechanisms to the data source
+ * of XOOPS group permission class objects.
+ * This class is an abstract class to be implemented by child group permission classes.
+ *
+ * @see XoopsGroupPerm
+ * @author Kazumi Ono <on...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
*/
class XoopsGroupPermHandler extends XoopsObjectHandler
{
- /**
- * Create a new {@link XoopsGroupPerm}
- *
- * @return bool $isNew Flag the object as "new"?
+ /**
+ * Create a new {@link XoopsGroupPerm}
+ *
+ * @return bool $isNew Flag the object as "new"?
*/
function &create($isNew = true)
{
@@ -83,12 +132,12 @@
return $perm;
}
- /**
- * Retrieve a group permission
- *
- * @param int $id ID
- *
- * @return object {@link XoopsGroupPerm}, FALSE on fail
+ /**
+ * Retrieve a group permission
+ *
+ * @param int $id ID
+ *
+ * @return object {@link XoopsGroupPerm}, FALSE on fail
*/
function &get($id)
{
@@ -108,17 +157,17 @@
return $perm;
}
- /**
- * Store a {@link XoopsGroupPerm}
- *
- * @param object &$perm {@link XoopsGroupPerm} object
- *
- * @return bool TRUE on success
+ /**
+ * Store a {@link XoopsGroupPerm}
+ *
+ * @param object &$perm {@link XoopsGroupPerm} object
+ *
+ * @return bool TRUE on success
*/
function insert(&$perm)
{
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
*/
if (! is_a($perm, 'xoopsgroupperm')) {
return false;
@@ -148,17 +197,17 @@
return true;
}
- /**
- * Delete a {@link XoopsGroupPerm}
- *
- * @param object &$perm
- *
- * @return bool TRUE on success
+ /**
+ * Delete a {@link XoopsGroupPerm}
+ *
+ * @param object &$perm
+ *
+ * @return bool TRUE on success
*/
function delete(&$perm)
{
- /**
- * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
*/
if (! is_a($perm, 'xoopsgroupperm')) {
return false;
@@ -170,13 +219,13 @@
return true;
}
- /**
- * Retrieve multiple {@link XoopsGroupPerm}s
- *
- * @param object $criteria {@link CriteriaElement}
- * @param bool $id_as_key Use IDs as array keys?
- *
- * @return array Array of {@link XoopsGroupPerm}s
+ /**
+ * Retrieve multiple {@link XoopsGroupPerm}s
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key Use IDs as array keys?
+ *
+ * @return array Array of {@link XoopsGroupPerm}s
*/
function getObjects($criteria = null, $id_as_key = false)
{
@@ -205,12 +254,12 @@
return $ret;
}
- /**
- * Count some {@link XoopsGroupPerm}s
- *
- * @param object $criteria {@link CriteriaElement}
- *
- * @return int
+ /**
+ * Count some {@link XoopsGroupPerm}s
+ *
+ * @param object $criteria {@link CriteriaElement}
+ *
+ * @return int
*/
function getCount($criteria = null)
{
@@ -226,12 +275,12 @@
return $count;
}
- /**
- * Delete all permissions by a certain criteria
- *
- * @param object $criteria {@link CriteriaElement}
- *
- * @return bool TRUE on success
+ /**
+ * Delete all permissions by a certain criteria
+ *
+ * @param object $criteria {@link CriteriaElement}
+ *
+ * @return bool TRUE on success
*/
function deleteAll($criteria = null)
{
@@ -245,13 +294,13 @@
return true;
}
- /**
- * Delete all module specific permissions assigned for a group
- *
- * @param int $gperm_groupid ID of a group
- * @param int $gperm_modid ID of a module
- *
- * @return bool TRUE on success
+ /**
+ * Delete all module specific permissions assigned for a group
+ *
+ * @param int $gperm_groupid ID of a group
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE on success
*/
function deleteByGroup($gperm_groupid, $gperm_modid = null)
{
@@ -262,14 +311,14 @@
return $this->deleteAll($criteria);
}
- /**
- * Delete all module specific permissions
- *
- * @param int $gperm_modid ID of a module
- * @param string $gperm_name Name of a module permission
- * @param int $gperm_itemid ID of a module item
- *
- * @return bool TRUE on success
+ /**
+ * Delete all module specific permissions
+ *
+ * @param int $gperm_modid ID of a module
+ * @param string $gperm_name Name of a module permission
+ * @param int $gperm_itemid ID of a module item
+ *
+ * @return bool TRUE on success
*/
function deleteByModule($gperm_modid, $gperm_name = null, $gperm_itemid = null)
{
@@ -283,15 +332,15 @@
return $this->deleteAll($criteria);
}
- /**
- * Check permission
- *
- * @param string $gperm_name Name of permission
- * @param int $gperm_itemid ID of an item
- * @param int/array $gperm_groupid A group ID or an array of group IDs
- * @param int $gperm_modid ID of a module
- *
- * @return bool TRUE if permission is enabled
+ /**
+ * Check permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int/array $gperm_groupid A group ID or an array of group IDs
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE if permission is enabled
*/
function checkRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
{
@@ -324,15 +373,15 @@
return false;
}
- /**
- * Add a permission
- *
- * @param string $gperm_name Name of permission
- * @param int $gperm_itemid ID of an item
- * @param int $gperm_groupid ID of a group
- * @param int $gperm_modid ID of a module
- *
- * @return bool TRUE if success
+ /**
+ * Add a permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int $gperm_groupid ID of a group
+ * @param int $gperm_modid ID of a module
+ *
+ * @return bool TRUE if success
*/
function addRight($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid = 1)
{
@@ -344,14 +393,14 @@
return $this->insert($perm);
}
- /**
- * Get all item IDs that a group is assigned a specific permission
- *
- * @param string $gperm_name Name of permission
- * @param int/array $gperm_groupid A group ID or an array of group IDs
- * @param int $gperm_modid ID of a module
- *
- * @return array array of item IDs
+ /**
+ * Get all item IDs that a group is assigned a specific permission
+ *
+ * @param string $gperm_name Name of permission
+ * @param int/array $gperm_groupid A group ID or an array of group IDs
+ * @param int $gperm_modid ID of a module
+ *
+ * @return array array of item IDs
*/
function getItemIds($gperm_name, $gperm_groupid, $gperm_modid = 1)
{
@@ -374,14 +423,14 @@
return array_unique($ret);
}
- /**
- * Get all group IDs assigned a specific permission for a particular item
- *
- * @param string $gperm_name Name of permission
- * @param int $gperm_itemid ID of an item
- * @param int $gperm_modid ID of a module
- *
- * @return array array of group IDs
+ /**
+ * Get all group IDs assigned a specific permission for a particular item
+ *
+ * @param string $gperm_name Name of permission
+ * @param int $gperm_itemid ID of an item
+ * @param int $gperm_modid ID of a module
+ *
+ * @return array array of group IDs
*/
function getGroupIds($gperm_name, $gperm_itemid, $gperm_modid = 1)
{
Modified: XoopsCore/trunk/htdocs/kernel/image.php
===================================================================
--- XoopsCore/trunk/htdocs/kernel/image.php 2009-05-12 21:26:17 UTC (rev 3237)
+++ XoopsCore/trunk/htdocs/kernel/image.php 2009-05-14 00:50:39 UTC (rev 3238)
@@ -52,6 +52,88 @@
$this->initVar('image_body', XOBJ_DTYPE_SOURCE, null, true);
$this->initVar('imgcat_id', XOBJ_DTYPE_INT, 0, false);
}
+
+ /**
+ * Returns Class Base Variable image_id
+ */
+ function id($format='N')
+ {
+ return $this->getVar('image_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_id
+ */
+ function image_id($format='')
+ {
+ return $this->getVar('image_id', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_name
+ */
+ function image_name($format='')
+ {
+ return $this->getVar('image_name', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_nicename
+ */
+ function image_nicename($format='')
+ {
+ return $this->getVar('image_nicename', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_mimetype
+ */
+ function image_mimetype($format='')
+ {
+ return $this->getVar('image_mimetype', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_created
+ */
+ function image_created($format='')
+ {
+ return $this->getVar('image_created', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_display
+ */
+ function image_display($format='')
+ {
+ return $this->getVar('image_display', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_weight
+ */
+ function image_weight($format='')
+ {
+ return $this->getVar('image_weight', $format);
+ }
+
+ /**
+ * Returns Class Base Variable image_body
+ */
+ function image_body($format='')
+ {
+ r...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-12 21:26:24
|
Revision: 3237
http://xoops.svn.sourceforge.net/xoops/?rev=3237&view=rev
Author: wishcraft
Date: 2009-05-12 21:26:17 +0000 (Tue, 12 May 2009)
Log Message:
-----------
Revert Changes back to 2.3.4 revision 3151
Revision Links:
--------------
http://xoops.svn.sourceforge.net/xoops/?rev=3151&view=rev
Removed Paths:
-------------
XoopsCore/trunk/htdocs/class/auth/auth_soap.php
XoopsCore/trunk/htdocs/class/auth/auth_soap_provisionning.php
XoopsCore/trunk/htdocs/class/soap/
XoopsCore/trunk/upgrade/upd-2.3.1-to-2.3.4/
Property Changed:
----------------
XoopsCore/trunk/htdocs/images/
Deleted: XoopsCore/trunk/htdocs/class/auth/auth_soap.php
===================================================================
--- XoopsCore/trunk/htdocs/class/auth/auth_soap.php 2009-05-12 05:57:14 UTC (rev 3236)
+++ XoopsCore/trunk/htdocs/class/auth/auth_soap.php 2009-05-12 21:26:17 UTC (rev 3237)
@@ -1,294 +0,0 @@
-<?php
-// $Id: auth_SOAP.php 1600 2008-05-07 wishcraft $
-// auth_soap.php - SOAP authentification class
-// ------------------------------------------------------------------------ //
-// 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 //
-// ------------------------------------------------------------------------ //
-/**
- * @package kernel
- * @subpackage auth
- * @description Authentification class for standard Xoops X-Soap Server V2.3 or V3
- * @author Simon Roberts WISHCRAFT <si...@ch...>
- * @copyright copyright (c) 2000-2003 XOOPS.org
- */
-include_once XOOPS_ROOT_PATH . '/class/auth/auth_soap_provisionning.php';
-include_once XOOPS_ROOT_PATH . '/class/soap/xoopssoap.php';
-
-
-class XoopsAuthSoap extends XoopsAuth {
-
- var $soap_client;
- var $_dao;
- var $soap_soapclient;
- var $soap_wdsl;
- var $soap_proxyhost;
- var $soap_proxyport;
- var $soap_proxyusername;
- var $soap_proxypassword;
- var $soap_timeout;
- var $soap_responsetimeout;
- /**
- * Authentication Service constructor
- */
- function XoopsAuthSoap (&$dao) {
- $this->_dao = $dao;
- //The config handler object allows us to look at the configuration options that are stored in the database
- $config_handler =& xoops_gethandler('config');
- $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
- $confcount = count($config);
- foreach ($config as $key => $val) {
- $this->$key = $val;
- }
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $this->soap_client = new soapclient($this->soap_soapclient, $this->soap_wdsl, $this->soap_proxyhost, $this->soap_proxyport, $this->soap_proxyusername, $this->soap_proxypassword, $this->soap_timeout, $this->soap_responsetimeout);
- break;
- case "INHERIT":
- $this->soap_client = new soapclient($this->soap_soapclient);
- break;
- }
- }
-
-
- /**
- * Authenticate user again SOAP directory (Bind)
- *
- * @param string $uname Username
- * @param string $pwd Password
- *
- * @return bool
- */
- function authenticate($uname, $pwd = null) {
- $authenticated = false;
-
- if (!$this->soap_client) {
- $this->setErrors(0, _AUTH_SOAP_EXTENSION_NOT_LOAD);
- return $authenticated;
- }
-
- if (in_array(strtolower($uname),explode("|",strtolower($this->soap_filterperson)))){
- $member_handler =& xoops_gethandler('member');
- $user =& $member_handler->loginUser($uname, $pwd);
- if ($user == false) {
- $this->setErrors(1, _US_INCORRECTLOGIN);
- }
- return ($user);
-
- }
-
-
- $rnd = rand(-100000, 100000000);
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_authentication', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd)));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_authentication', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd)));
- break;
- }
- if ($result['ERRNUM']==1){
- return $this->loadXoopsUser($result["RESULT"], $uname, $pwd);
- } else {
- $member_handler =& xoops_gethandler('member');
- $user =& $member_handler->loginUser($uname, $pwd);
- if ($user == false) {
- $this->setErrors(1, _US_INCORRECTLOGIN);
- }
- return ($user);
- }
-
-
-
- }
-
-
-
- function loadXoopsUser($result, $uname, $pwd = null) {
-
- $provisHandler = XoopsAuthProvisionning::getInstance($this);
- if (count($result) > 0) {
- $xoopsUser = $provisHandler->sync($result, $uname, $pwd);
- }
- else $this->setErrors(0, sprintf('loadXoopsUser - ' . _AUTH_SOAP_CANT_READ_ENTRY, $userdn));
-
- return $xoopsUser;
- }
-
- /**
- * validate a user via soap
- *
- * @param string $uname
- * @param string $email
- * @param string $pass
- * @param string $vpass
- *
- * @return string
- */
- function validate($uname, $email, $pass, $vpass){
-
- $rnd = rand(-100000, 100000000);
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_user_validate', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd)));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_user_validation', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd)));
- break;
- }
-
- if ($result['ERRNUM']==1){
- return $result["RESULT"];
- } else {
- return false;
- }
-
- }
-
- /**
- * get the xoops site disclaimer via soap
- *
- * @return string
- */
- function network_disclaimer(){
-
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_network_disclaimer', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_network_disclaimer', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password));
- break;
- }
-
-
- if ($result['ERRNUM']==1){
- return $result["RESULT"];
- } else {
- return false;
- }
-
- }
-
- /**
- * create a user
- *
- * @param bool $user_viewemail
- * @param string $uname
- * @param string $email
- * @param string $url
- * @param string $actkey
- * @param string $pass
- * @param integer $timezone_offset
- * @param bool $user_mailok
- * @param array $siteinfo
- *
- * @return array
- */
- function create_user($user_viewemail, $uname, $email, $url, $actkey,
- $pass, $timezone_offset, $user_mailok, $siteinfo){
-
- $siteinfo = $this->check_siteinfo($siteinfo);
-
- $rnd = rand(-100000, 100000000);
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_create_user', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "siteinfo" => $siteinfo, "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd)));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_create_user', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo));
- break;
- }
-
- if ($result['ERRNUM']==1){
-
- return $result["RESULT"];
-
- } else {
- return false;
- }
- }
-
- /**
- * checks an activation of a user via soap
- *
- * @param integer $uname
- * @param string $actkey
- * @param array $siteinfo
- *
- * @return array
- */
- function check_activation($uname, $actkey, $siteinfo){
-
-
- $rnd = rand(-100000, 100000000);
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_check_activation', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "activate" => array('uname' => $uname, 'actkey' => $actkey, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$actkey), "rand"=>$rnd, 'siteinfo' => $siteinfo)));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_check_activation', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "activate" => array('uname' => $uname, 'actkey' => $actkey, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$actkey), "rand"=>$rnd, 'siteinfo' => $siteinfo)));
- break;
- }
-
- //print_r($result);
- if ($result['ERRNUM']==1){
- return $result["RESULT"];
- } else {
- return $return = array("state" => 1, "action" => "redirect_header", "url" => 'index.php', "opt" => 5, "text" => 'Activation failed!');
- }
-
- }
-
- function lost_password ($email)
- {
-
- if ($email == '') {
- redirect_header("user.php",2,_US_SORRYNOTFOUND);
- exit();
- }
-
- $rnd = rand(-100000, 100000000);
- switch (XOOPS_SOAP_LIB){
- case "NUSOAP":
- $result = $this->soap_client->call('xoops_lostpassword', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "lost" => array('email' => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$email), "rand"=>$rnd)));
- break;
- case "INHERIT":
- $result = $this->soap_client->__soapCall('xoops_lostpassword', array("username"=> $this->soap_xoops_username, "password"=> $this->soap_xoops_password, "lost" => array('email' => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$email), "rand"=>$rnd)));
- break;
- }
-
- //print_r($result);
- if ($result['ERRNUM']==1){
- return $result["RESULT"];
- } else {
- return 'Lost Password failed!';
- }
-
- }
-
-}
-// end class
-
-
-?>
Deleted: XoopsCore/trunk/htdocs/class/auth/auth_soap_provisionning.php
===================================================================
--- XoopsCore/trunk/htdocs/class/auth/auth_soap_provisionning.php 2009-05-12 05:57:14 UTC (rev 3236)
+++ XoopsCore/trunk/htdocs/class/auth/auth_soap_provisionning.php 2009-05-12 21:26:17 UTC (rev 3237)
@@ -1,215 +0,0 @@
-<?php
-// $Id: auth_soap_provisionning.php 1600 2008-05-08 wishcraft $
-// ------------------------------------------------------------------------ //
-// 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 //
-// ------------------------------------------------------------------------ //
-/**
- * @package kernel
- * @subpackage auth
- * @description Authentification provisionning class. This class is responsible to
- * provide synchronisation method to Xoops User Database
- *
- * @author Simon Roberts WISHCRAFT <si...@ch...>
- * @copyright copyright (c) 2000-2009 XOOPS.org
- */
-
-class XoopsAuthProvisionning {
-
- var $_auth_instance;
-
- function &getInstance(&$auth_instance)
- {
- static $provis_instance;
- if (!isset($provis_instance)) {
- $provis_instance = new XoopsAuthProvisionning($auth_instance);
- }
- return $provis_instance;
- }
-
- /**
- * Authentication Service constructor
- */
- function XoopsAuthProvisionning (&$auth_instance) {
- $this->_auth_instance = &$auth_instance;
- $config_handler =& xoops_gethandler('config');
- $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH);
- foreach ($config as $key => $val) {
- $this->$key = $val;
- }
- $config_gen =& $config_handler->getConfigsByCat(XOOPS_CONF);
- $this->default_TZ = $config_gen['default_TZ'];
- $this->theme_set = $config_gen['theme_set'];
- $this->com_mode = $config_gen['com_mode'];
- $this->com_order = $config_gen['com_order'];
- }
-
- /**
- * Return a Xoops User Object
- *
- * @return XoopsUser or false
- */
- function getXoopsUser($uname) {
- $member_handler =& xoops_gethandler('member');
- $criteria = new Criteria('uname', $uname);
- $getuser = $member_handler->getUsers($criteria);
- if (count($getuser) == 1)
- return $getuser[0];
- else return false;
- }
-
- /**
- * Launch the synchronisation process
- *
- * @return bool
- */
- function sync($datas, $uname, $pwd = null) {
- $xoopsUser = $this->getXoopsUser($uname);
- if (!$xoopsUser) { // Xoops User Database not exists
- if ($this->soap_provisionning) {
- $xoopsUser = $this->add($datas, $uname, $pwd);
- } else $this->_auth_instance->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname));
- } else { // Xoops User Database exists
-
- }
- return $xoopsUser;
- }
-
- /**
- * Add a new user to the system
- *
- * @return bool
- */
- function add($datas, $uname, $pwd = null) {
- $ret = false;
- $member_handler =& xoops_gethandler('member');
- // Create XOOPS Database User
- $newuser = $member_handler->createUser();
- $newuser->setVar('uname', $uname);
- $newuser->setVar('pass', md5(stripslashes($pwd)));
- $newuser->setVar('email', $datas['email']);
- $newuser->setVar('rank', 0);
- $newuser->setVar('level', 1);
- $newuser->setVar('timezone_offset', $this->default_TZ);
- $newuser->setVar('theme', $this->theme_set);
- $newuser->setVar('umode', $this->com_mode);
- $newuser->setVar('uorder', $this->com_order);
- if ($this->soap_provisionning)
- $tab_mapping = explode('|', $this->soap_field_mapping);
- else
- $tab_mapping = explode('|', $this->ldap_field_mapping);
-
- foreach ($tab_mapping as $mapping) {
- $fields = explode('=', trim($mapping));
- if ($fields[0] && $fields[1])
- $newuser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])]));
- }
- if ($member_handler->insertUser($newuser)) {
- }
- if ($member_handler->insertUser($newuser)) {
- foreach ($this->soap_provisionning_group as $groupid)
- $member_handler->addUserToGroup($groupid, $newuser->getVar('uid'));
- $newuser->unsetNew();
- return $newuser;
- } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors());
-
- $newuser->unsetNew();
- return $newuser;
- //else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors());
- return $ret;
- }
-
- /**
- * Modify user information
- *
- * @return bool
- */
- function change(&$xoopsUser, $datas, $uname, $pwd = null) {
- $ret = false;
- $member_handler =& xoops_gethandler('member');
- $xoopsUser->setVar('pass', md5(stripslashes($pwd)));
- $tab_mapping = explode('|', $this->ldap_field_mapping);
- foreach ($tab_mapping as $mapping) {
- $fields = explode('=', trim($mapping));
- if ($fields[0] && $fields[1])
- $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0]));
- }
- if ($member_handler->insertUser($xoopsUser)) {
- return $xoopsUser;
- } else redirect_header(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors());
- return $ret;
- }
-
- function change_soap(&$xoopsUser, $datas, $uname, $pwd = null) {
- $ret = false;
- $member_handler =& xoops_gethandler('member');
- $xoopsUser->setVar('pass', md5(stripslashes($pwd)));
- $tab_mapping = explode('|', $this->soap_field_mapping);
- foreach ($tab_mapping as $mapping) {
- $fields = explode('=', trim($mapping));
- if ($fields[0] && $fields[1])
- $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0]));
- }
- if ($member_handler->insertUser($xoopsUser)) {
- return $xoopsUser;
- } else redirect_header(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors());
- return $ret;
- }
-
- /**
- * Modify a user
- *
- * @return bool
- */
- function delete() {
- }
-
- /**
- * Suspend a user
- *
- * @return bool
- */
- function suspend() {
- }
-
- /**
- * Restore a user
- *
- * @return bool
- */
- function restore() {
- }
-
- /**
- * Add a new user to the system
- *
- * @return bool
- */
- function resetpwd() {
- }
-
-
-}
-// end class
-
-?>
Property changes on: XoopsCore/trunk/htdocs/images
___________________________________________________________________
Added: svn:ignore
+ *.db
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-12 05:57:20
|
Revision: 3236
http://xoops.svn.sourceforge.net/xoops/?rev=3236&view=rev
Author: wishcraft
Date: 2009-05-12 05:57:14 +0000 (Tue, 12 May 2009)
Log Message:
-----------
xoops_version.php - changes
Modified Paths:
--------------
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php 2009-05-12 05:46:26 UTC (rev 3235)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php 2009-05-12 05:57:14 UTC (rev 3236)
@@ -29,7 +29,7 @@
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
-$modversion['name'] = _MD_AM_PREF;
+$modversion['name'] = _MI_MULTISITE_ADMENU6;
$modversion['version'] = "";
$modversion['description'] = "XOOPS Site Preferences";
$modversion['author'] = "";
@@ -37,9 +37,9 @@
$modversion['help'] = "preferences.html";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 1;
-$modversion['image'] = "pref.gif";
+$modversion['image'] = "defines.gif";
$modversion['hasAdmin'] = 1;
-$modversion['adminpath'] = "admin.php?fct=preferences";
+$modversion['adminpath'] = "admin.php?fct=definesadmin";
$modversion['category'] = XOOPS_MULTISITE_PREF;
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php 2009-05-12 05:46:26 UTC (rev 3235)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php 2009-05-12 05:57:14 UTC (rev 3236)
@@ -29,7 +29,7 @@
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
-$modversion['name'] = _MI_MULTISITE_ADMENU4;
+$modversion['name'] = _MI_MULTISITE_ADMENU7;
$modversion['version'] = "";
$modversion['description'] = "Domains Administration";
$modversion['author'] = "Simon Roberts (www.chronolabs.org.au)";
@@ -37,8 +37,8 @@
$modversion['help'] = "domainsadmin.html";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
-$modversion['image'] = "domainsadmin.gif";
+$modversion['image'] = "domaingroupsadmin.gif";
$modversion['hasAdmin'] = 1;
-$modversion['adminpath'] = "admin.php?fct=domainsadmin";
+$modversion['adminpath'] = "admin.php?fct=domaingroupsadmin";
$modversion['category'] = XOOPS_MULTISITE_MODULE;
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-12 05:47:37
|
Revision: 3235
http://xoops.svn.sourceforge.net/xoops/?rev=3235&view=rev
Author: wishcraft
Date: 2009-05-12 05:46:26 +0000 (Tue, 12 May 2009)
Log Message:
-----------
multisite version 1.22 - for *.xoops.org
Modified Paths:
--------------
XoopsModules/multisite/trunk/modules/multisite/admin/menu.php
XoopsModules/multisite/trunk/modules/multisite/class/domain.php
XoopsModules/multisite/trunk/modules/multisite/class/domainoption.php
XoopsModules/multisite/trunk/modules/multisite/constants.php
XoopsModules/multisite/trunk/modules/multisite/language/english/modinfo.php
XoopsModules/multisite/trunk/modules/multisite/menu.php
XoopsModules/multisite/trunk/modules/multisite/xoops_version.php
Added Paths:
-----------
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/domaingroupsadmin.php
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/index.html
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/main.php
XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php
XoopsModules/multisite/trunk/modules/multisite/language/english/admin/domaingroupsadmin.php
Added: XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/domaingroupsadmin.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/domaingroupsadmin.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/domaingroupsadmin.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -0,0 +1,346 @@
+<?php
+// $Id: modulesadmin.php 2701 2009-01-20 23:45:46Z dugris $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+function create_new_domaingroup()
+{
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module =& $module_handler->getByDirname('multisite');
+ $domain_handler =& xoops_getmodulehandler('domain', 'multisite');
+ $domopt_handler =& xoops_getmodulehandler('domainoption', 'multisite');
+
+
+
+ $ndomain = $domain_handler->createDomain();
+
+ $ndomain->setVar("dom_modid", $module->getVar('mid'));
+ $ndomain->setVar("dom_catid", getDomainGroupCat());
+ $ndomain->setVar("dom_name", 'domaingroup');
+ $ndomain->setVar('dom_value', $_POST['name'][0]);
+ $ndomain->setVar("dom_title", '_MD_AM_DOMAINGROUP');
+ $ndomain->setVar("dom_desc", '_MD_AM_DOMAINGROUPDESC');
+ $ndomain->setVar("dom_formtype", 'textbox');
+ $ndomain->setVar("dom_valuetype", 'text');
+
+ $domain_handler->insertDomain($ndomain);
+
+
+ foreach($_POST['domaingroup'][0] as $key => $value)
+ {
+ $domopt = $domopt_handler->create();
+ $domopt->setVar('domop_name', urldecode($value));
+ $domopt->setVar('domop_value', $value);
+ $domopt->setVar('dom_id', $ndomain->getVar('dom_id'));
+ $domopt_handler->insert($domopt);
+ }
+
+
+ $bdomain = $domain_handler->createDomain();
+
+ $bdomain->setVar("dom_pid", $ndomain->getVar('dom_pid'));
+ $bdomain->setVar("dom_modid", $module->getVar('mid'));
+ $bdomain->setVar("dom_catid", getDomainGroupCat());
+ $bdomain->setVar("dom_name", 'domaingroupprimary');
+ $bdomain->setVar('dom_value', $_POST['primary'][0]);
+ $bdomain->setVar("dom_title", '_MD_AM_DOMAINGROUPPRIM');
+ $bdomain->setVar("dom_desc", '_MD_AM_DOMAINGROUPPRIMDESC');
+ $bdomain->setVar("dom_formtype", 'textbox');
+ $bdomain->setVar("dom_valuetype", 'text');
+
+ $domain_handler->insertDomain($bdomain);
+
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, sprintf(_MD_AM_CREATEGROUP_SUCCESSFUL,$_POST['name'][0]));
+
+}
+
+function delete_domaingroup($op, $fct, $id)
+{
+ global $xoopsDB;
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module =& $module_handler->getByDirname('multisite');
+
+ $config_handler =& xoops_getmodulehandler('domain', 'multisite');
+
+ $config = $config_handler->getDomain($id);
+
+ if ($config->getVar('dom_name')=='domain')
+ {
+ $yy = $config->getVar('dom_id');
+
+ $sql = sprintf("DELETE FROM %s WHERE dom_id = %u or dom_pid = %u", $xoopsDB->prefix('domain'), $config->getVar('dom_id'), $config->getVar('dom_id'));
+ if (!$xoopsDB->queryF($sql))
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, _MD_AM_DELETEDOMAINGROUP_UNSUCCESS);
+
+ $sql = sprintf("DELETE FROM %s WHERE dom_id = %u", $xoopsDB->prefix('domainoption'), $configs_a[0]->getVar('dom_id'));
+ if (!$xoopsDB->queryF($sql))
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, _MD_AM_DELETEDOMAINGROUP_UNSUCCESS);
+
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, sprintf(_MD_AM_DELETEDOMAINGROUP_SUCCESS,$config->getVar('dom_value')));
+ } else {
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, _MD_AM_DELETEDOMAINGROUP_UNSUCCESS);
+ }
+}
+
+function edit_domaingroups($op, $fct)
+{
+
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module =& $module_handler->getByDirname('multisite');
+ $domain_handler =& xoops_getmodulehandler('domain', 'multisite');
+ $domopt_handler =& xoops_getmodulehandler('domainoption', 'multisite');
+
+ for($ii=0;$ii<=(int)$_POST['total'];$ii++)
+ {
+
+ $id = intval((isset($_GET['id']))?(int)$_GET['id'][$ii]:$_POST['id'][$ii]);
+
+ if ($id>0)
+ {
+ $domaingroup = $domain_handler->getDomain($id);
+
+ if (is_array($domaingroup))
+ $domaingroup = $domaingroup[0];
+
+ $domaingroup->setVar('dom_value', $_POST['name'][$id]);
+ $domain_handler->insertDomain($domaingroup);
+
+ $domainoptions = $domain_handler->getDomainOptions(new Criteria('dom_id', $id), true);
+ $contains = array();
+ foreach($domainoptions as $key => $domainoption)
+ {
+ if (!in_array($domainoption->getVar('domop_value'), $_POST['domaingroup'][$id]))
+ $domopt_handler->delete($domainoption);
+ else
+ $contains[$key] = $domainoption->getVar('domop_value');
+ }
+
+ foreach($_POST['domaingroup'][$id] as $key => $value)
+ if (!in_array($value, $contains))
+ {
+ $domopt = $domopt_handler->create();
+ $domopt->setVar('domop_name', urldecode($value));
+ $domopt->setVar('domop_value', $value);
+ $domopt->setVar('dom_id', $id);
+ $domopt_handler->insert($domopt);
+ }
+
+ $criteria = new CriteriaCompo(new Criteria('dom_catid', getDomainGroupCat()));
+ $criteria->add(new Criteria('dom_name', 'domaingroupprimary')) ;
+ $criteria->add(new Criteria('dom_pid', $id)) ;
+ $domaingroup = $domain_handler->getDomains($criteria);
+ if (is_array($domaingroup))
+ $domaingroup = $domaingroup[0];
+
+ $domaingroup->setVar('dom_value', $_POST['primary'][$id]);
+ $domain_handler->insertDomain($domaingroup);
+ }
+ }
+ redirect_header('admin.php?fct=domaingroupsadmin', 3, _MD_AM_EDITDOMAINGROUP_SUCCESS);
+}
+
+function add_domaingroup_form($op, $fct)
+{
+
+ $op = "adddomain";
+
+ include(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+
+ $form = new XoopsThemeForm(_MD_AM_NEWDOMAINGROUP, array("op","fct"), xoops_getenv('PHP_SELF')."?fct=$fct&op=$op");
+ $form->setExtra('enctype="multipart/form-data"');
+
+ $ii++;
+ $domain[$ii] = new XoopsFormText(_MD_AM_DOMAINGROUP, "name[0]", 35, 255 , $xoopsConfig['sitename']);
+ $primary[$ii] = new XoopsFormSelectDomains(_MD_AM_PRIMARYDOMAINGROUP, "primary[0]", array(0=>urlencode(XOOPS_URL)));
+
+ $group[$ii] = new XoopsFormCheckBoxDomains(_MD_AM_INGROUPDOMAINGROUPS, "domaingroup[0]", array(0=>urlencode(XOOPS_URL)), ' ', false);
+
+ $form->addElement($domain[$ii]);
+ $form->addElement($primary[$ii]);
+ $form->addElement($group[$ii]);
+
+ $form->addElement(new XoopsFormHidden('id[0]', '0'));
+ $form->addElement(new XoopsFormHidden('op', 'adddomain'));
+ $submit = new XoopsFormButton("", "submit", _SUBMIT, "submit");
+ $form->addElement($submit);
+
+ echo $form->render();
+}
+
+function edit_domaingroup_form($id, $op, $fct)
+{
+
+ $op = "edit";
+
+ include(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+
+ xoops_cp_header();
+ adminMenu(XOOPS_MULTISITE_DOMAINGROUPS);
+
+ $ii++;
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module =& $module_handler->getByDirname('multisite');
+ $domain_handler =& xoops_getmodulehandler('domain', 'multisite');
+
+ $domaingroup = $domain_handler->getDomain($id);
+
+ if (is_array($domaingroup))
+ $domaingroup = $domaingroup[0];
+
+ $form = new XoopsThemeForm(_MD_AM_NEWDOMAINGROUP, array("op","fct"), xoops_getenv('PHP_SELF')."?fct=$fct&op=$op");
+ $form->setExtra('enctype="multipart/form-data"');
+
+ $domain[$ii] = new XoopsFormText(_MD_AM_DOMAINGROUP, "name[$id]", 35, 255 , $domaingroup->getConfValueForOutput());
+ $form->addElement(new XoopsFormHidden("id[$ii]", $id));
+
+ foreach($domain_handler->getDomainOptions(new Criteria('dom_id', $domaingroup->getVar('dom_id')), true) as $key => $dmgroup)
+ $dgroup[$key] = $dmgroup->getVar('domop_value');
+
+ $group[$ii] = new XoopsFormCheckBoxDomains(_MD_AM_INGROUPDOMAINGROUPS, "domaingroup[$id]", $dgroup, ' ', false);
+
+ $criteria = new CriteriaCompo(new Criteria('dom_catid', getDomainGroupCat()));
+ $criteria->add(new Criteria('dom_name', 'domaingroupprimary')) ;
+ $criteria->add(new Criteria('dom_pid', $id)) ;
+ $domaingroup = $domain_handler->getDomains($criteria);
+ if (is_array($domaingroup))
+ $domaingroup = $domaingroup[0];
+
+ $primary[$ii] = new XoopsFormSelectDomains(_MD_AM_PRIMARYDOMAINGROUP, "primary[$id]", $domaingroup->getConfValueForOutput());
+
+
+ $form->addElement($domain[$ii]);
+ $form->addElement($primary[$ii]);
+ $form->addElement($group[$ii]);
+
+ $form->addElement(new XoopsFormHidden('op', 'edit'));
+ $form->addElement(new XoopsFormHidden('total', $ii));
+ $submit = new XoopsFormButton("", "submit", _SUBMIT, "submit");
+ $form->addElement($submit);
+
+ echo $form->render();
+
+ xoops_cp_footer();
+}
+
+
+function xoops_domaingroup_list($op, $fct)
+{
+ include(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+
+ $op = "edit";
+
+ xoops_cp_header();
+ adminMenu(XOOPS_MULTISITE_DOMAINGROUPS);
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $module =& $module_handler->getByDirname('multisite');
+ $domain_handler =& xoops_getmodulehandler('domain', 'multisite');
+
+ $criteria = new CriteriaCompo(new Criteria('dom_catid', getDomainGroupCat()));
+ $criteria->add(new Criteria('dom_name', 'domaingroup')) ;
+ $domaingroup = $domain_handler->getDomains($criteria);
+ $dgcount = count($domaingroup);
+
+ $form = new XoopsThemeForm(_MD_AM_CURRENTDOMAINGROUP, array("op","fct"), xoops_getenv('PHP_SELF')."?fct=$fct&op=$op");
+ $form->setExtra('enctype="multipart/form-data"');
+
+ foreach ($domaingroup as $dg)
+ {
+
+ $ii++;
+ $yy = $dg->getVar('dom_id');
+
+ $tray[$ii] = new XoopsFormElementTray($dg->getConfValueForOutput(),' ');
+ $tray[$ii]->addElement(new XoopsFormHidden("id[$ii]", $yy));
+
+ $criteria = new CriteriaCompo(new Criteria('dom_catid', getDomainGroupCat()));
+ $criteria->add(new Criteria('dom_name', 'domaingroupprimary')) ;
+ $criteria->add(new Criteria('dom_pid', $yy)) ;
+ $domaingroup = $domain_handler->getDomains($criteria);
+
+ if (is_array($domaingroup))
+ $domaingroup = $domaingroup[0];
+
+ $tray[$ii]->addElement(new XoopsFormSelectDomains(_MD_AM_TRAYPRIMARYGROUP, "primary[$yy]", $domaingroup->getConfValueForOutput()));
+ $dgroup = array();
+ foreach($domain_handler->getDomainOptions(new Criteria('dom_id', $yy), true) as $key => $dmgroup)
+ $dgroup[$key] = $dmgroup->getVar('domop_value');
+
+ $tray[$ii]->addElement(new XoopsFormSelectDomains(_MD_AM_TRAYDOMAINGROUP, "domaingroup[$yy]", $dgroup, 3, true));
+
+ $label_txt = "<a href='".XOOPS_URL."/modules/multisite/admin.php?fct=$fct&op=delete&id=$yy'>Delete</a> | ";
+ $label_txt .= "<a href='".XOOPS_URL."/modules/multisite/admin.php?fct=$fct&op=editdomain&id=$yy'>Edit</a> ";
+
+ $tray[$ii]->addElement(new XoopsFormLabel("", $label_txt));
+
+ $form->addElement($tray[$ii]);
+ }
+
+ $form->addElement(new XoopsFormHidden('total', $ii));
+
+ $form->addElement(new XoopsFormHidden('op', 'edit'));
+ $submit = new XoopsFormButton("", "submit", _SUBMIT, "submit");
+ $form->addElement($submit);
+
+ @add_domaingroup_form($op, $fct);
+
+ if ($dgcount>0)
+ echo $form->render();
+
+ footer_adminMenu();
+ xoops_cp_footer();
+}
+
+
+function getDomainGroupCat() {
+ $domaincat_handler = xoops_getmodulehandler('domaincategory', 'multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('domcat_name', 'XOOPS_DOMAIN_GROUP'));
+ if (!$domaincat_handler->getCount($criteria))
+ {
+ $domcat = $domaincat_handler->create();
+ $domcat->setVar('domcat_name', 'XOOPS_DOMAIN_GROUP');
+ $domaincat_handler->insert($domcat);
+ } else {
+ $domcat = $domaincat_handler->getObjects($criteria);
+ if (is_array($domcat))
+ $domcat = $domcat[0];
+ }
+
+ return $domcat->getVar('domcat_id');
+}
+
+?>
\ No newline at end of file
Added: XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/index.html
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/index.html (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/index.html 2009-05-12 05:46:26 UTC (rev 3235)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/main.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/main.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -0,0 +1,73 @@
+<?php
+// $Id: main.php 2711 2009-01-22 10:01:21Z phppp $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+}
+error_reporting(E_ALL);
+include_once XOOPS_ROOT_PATH."/modules/multisite/admin/domaingroupsadmin/domaingroupsadmin.php";
+$op = "list";
+if ( isset($_REQUEST) ) {
+ foreach ( $_REQUEST as $k => $v ) {
+ ${$k} = $v;
+ }
+}
+
+if ( $op == "list" ) {
+ @xoops_domaingroup_list($op, $_GET['fct']);
+ exit();
+}
+
+if ( $op == "adddomain")
+{
+ @create_new_domaingroup($op, $_GET['fct']);
+ exit;
+}
+
+if ( $op == "editdomain")
+{
+ @edit_domaingroup_form($_GET['id'], $op, $_GET['fct']);
+ exit;
+}
+
+if ( $op == "delete")
+{
+ @delete_domaingroup($op, $_GET['fct'], $_GET['id']);
+ exit;
+}
+
+if ( $op == "edit")
+{
+ @edit_domaingroups($op, $_GET['fct']);
+ exit;
+}
+
+?>
\ No newline at end of file
Added: XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/domaingroupsadmin/xoops_version.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -0,0 +1,44 @@
+<?php
+// $Id: xoops_version.php 2 02/16/2009 3:44 PM wishcraft $
+// ------------------------------------------------------------------------ //
+// 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: Simon Roberts (AKA wishcraft) //
+// URL: http://www.chronolabs.org.au/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MI_MULTISITE_ADMENU4;
+$modversion['version'] = "";
+$modversion['description'] = "Domains Administration";
+$modversion['author'] = "Simon Roberts (www.chronolabs.org.au)";
+$modversion['credits'] = "Wishcraft";
+$modversion['help'] = "domainsadmin.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 0;
+$modversion['image'] = "domainsadmin.gif";
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=domainsadmin";
+$modversion['category'] = XOOPS_MULTISITE_MODULE;
+?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/menu.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/menu.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/menu.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -29,6 +29,7 @@
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
global $adminmenu;
+$adminmenu = array();
$adminmenu[1]['title'] = _MI_MULTISITE_ADMENU1;
$adminmenu[1]['link'] = "admin.php?fct=blocksadmin";
$adminmenu[2]['title'] = _MI_MULTISITE_ADMENU2;
@@ -41,4 +42,7 @@
$adminmenu[5]['link'] = "admin.php?fct=policiesadmin";
$adminmenu[6]['title'] = _MI_MULTISITE_ADMENU6;
$adminmenu[6]['link'] = "admin.php?fct=definesadmin";
+$adminmenu[7]['title'] = _MI_MULTISITE_ADMENU7;
+$adminmenu[7]['link'] = "admin.php?fct=domaingroupsadmin";
+
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/class/domain.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/domain.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/class/domain.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -396,7 +396,7 @@
if ($domain_handler->getDomainCount($criteria)>0) {
$domain_obj =$domain_handler->getDomain($criteria);
if ($withoptions == true) {
- $domain_obj[0]->setConfOptions($this->getDomainOptions(new Criteria('conf_id', $domain_obj[0]->getVar('dom_id'))));
+ $domain_obj[0]->setConfOptions($this->getDomainOptions(new Criteria('dom_id', $domain_obj[0]->getVar('dom_id'))));
}
if ($
$domain_obj[0]->setVar('dom_value', $config->getVar('conf_value'));
Modified: XoopsModules/multisite/trunk/modules/multisite/class/domainoption.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/domainoption.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/class/domainoption.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -174,7 +174,7 @@
return false;
}
$sql = sprintf("DELETE FROM %s WHERE domop_id = %u", $this->db->prefix('domainoption'), $domoption->getVar('domop_id'));
- if (!$result = $this->db->query($sql)) {
+ if (!$result = $this->db->queryF($sql)) {
return false;
}
return true;
Modified: XoopsModules/multisite/trunk/modules/multisite/constants.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/constants.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/constants.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -32,4 +32,5 @@
define('XOOPS_MULTISITE_DOMAINS', 4);
define('XOOPS_MULTISITE_POLICIES', 5);
define('XOOPS_MULTISITE_DEFINES', 6);
+define('XOOPS_MULTISITE_DOMAINGROUPS', 7);
?>
\ No newline at end of file
Added: XoopsModules/multisite/trunk/modules/multisite/language/english/admin/domaingroupsadmin.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/language/english/admin/domaingroupsadmin.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/language/english/admin/domaingroupsadmin.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -0,0 +1,40 @@
+<?php
+
+// Domain/Sub-domain Terms
+define('_MD_AM_NEWDOMAINGROUP','Create a New Domain Group');
+define('_MD_AM_DOMAINGROUP','Domain/Subdomain Group');
+define('_MD_AM_LANGUAGE','Language');
+define('_MD_AM_THEME','Theme');
+define('_MD_AM_START_MODULE','Start-up Module');
+define('_MD_AM_ADDDOMAINGROUP_SUCCESS', 'Domain Group Successfully added to pool');
+define('_MD_AM_ADDDOMAINGROUP_EXISTS', 'Domain group already exists');
+define('_MD_AM_CURRENTDOMAINGROUP', 'Current Domain & Sub-domain Pool');
+define('_MD_AM_DELETEDOMAINGROUP_SUCCESS', 'Deletion of domain group %s successful');
+define('_MD_AM_DELETEDOMAINGROUP_UNSUCCESS', 'Deletion of domain group failed');
+define('_MD_AM_EDITDOMAINGROUP_SUCCESS', 'Domain Group Editing Successful');
+define('_AM_ALLDOMAINGROUPS', 'ALL Domains');
+
+define('_MD_AM_DOMAINGROUP_PAGETITLE', 'Site Name:');
+define('_MD_AM_DOMAINGROUP_SLOGAN', 'Site Slogon:');
+define('_MD_AM_DOMAINGROUP_METADESCRIPTION', 'Site Meta Description:');
+define('_MD_AM_DOMAINGROUP_METAFOOTER', 'Site Footer:');
+define('_MD_AM_DOMAINGROUP_METAKEYWORDS', 'Site Keywords');
+
+define('_MD_AM_PRIMARYDOMAINGROUP', 'Select Primary Domain');
+define('_MD_AM_INGROUPDOMAINGROUPS', 'In Group');
+define('_MD_AM_TRAYPRIMARYGROUP', 'Primary Domain');
+define('_MD_AM_TRAYDOMAINGROUP', 'Grouped into');
+
+define('_MD_AM_EDITDOMAINGROUP','Edit Domain Group %s');
+define("_MD_AM_MODADMIN","Modules Administration");
+define("_MD_AM_MODULES","Modules");
+// Feeds
+if(!defined('_MD_AM_ADD_FEED_FAILED'))
+{
+ define('_MD_AM_ADD_FEED_FAILED', 'Adding Feed %s Failed');
+ define('_MD_AM_ADD_FEED_SUCCESSFUL', 'Adding Feed %s Successful');
+ define('_MD_AM_ADD_FEED_RSS', 'Adding RSS Feeds');
+ define('_MD_AM_ADD_FEED_SITEMAP', 'Adding Sitemap Feeds');
+}
+
+?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/language/english/modinfo.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/language/english/modinfo.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/language/english/modinfo.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -19,6 +19,7 @@
define("_MI_MULTISITE_ADMENU4", "Domains");
define("_MI_MULTISITE_ADMENU5", "Access Policies");
define("_MI_MULTISITE_ADMENU6", "Defines");
+define("_MI_MULTISITE_ADMENU7", "Domain Groups");
define("_MI_MULTISITE_BNAME1", "Main Menu");
Modified: XoopsModules/multisite/trunk/modules/multisite/menu.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/menu.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/menu.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -29,6 +29,7 @@
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
global $adminmenu;
+$adminmenu = array();
$adminmenu[1]['title'] = _MI_MULTISITE_ADMENU1;
$adminmenu[1]['link'] = "admin.php?fct=blocksadmin";
$adminmenu[2]['title'] = _MI_MULTISITE_ADMENU2;
@@ -41,5 +42,7 @@
$adminmenu[5]['link'] = "admin.php?fct=policiesadmin";
$adminmenu[6]['title'] = _MI_MULTISITE_ADMENU6;
$adminmenu[6]['link'] = "admin.php?fct=definesadmin";
+$adminmenu[7]['title'] = _MI_MULTISITE_ADMENU7;
+$adminmenu[7]['link'] = "admin.php?fct=domaingroupsadmin";
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/xoops_version.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/xoops_version.php 2009-05-12 00:40:25 UTC (rev 3234)
+++ XoopsModules/multisite/trunk/modules/multisite/xoops_version.php 2009-05-12 05:46:26 UTC (rev 3235)
@@ -30,7 +30,7 @@
// ------------------------------------------------------------------------- //
$modversion['name'] = _MI_MULTISITE_NAME;
-$modversion['version'] = 1.21;
+$modversion['version'] = 1.22;
$modversion['description'] = _MI_MULTISITE_DESC;
$modversion['author'] = "Wishcraft";
$modversion['credits'] = "The XOOPS Project";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-12 00:40:37
|
Revision: 3234
http://xoops.svn.sourceforge.net/xoops/?rev=3234&view=rev
Author: wishcraft
Date: 2009-05-12 00:40:25 +0000 (Tue, 12 May 2009)
Log Message:
-----------
News 1.63 (Multisite Edition) - branch
Added Paths:
-----------
XoopsModules/news/branches/1.x/
XoopsModules/news/branches/1.x/Multisite/
XoopsModules/news/branches/1.x/Multisite/news/
XoopsModules/news/branches/1.x/Multisite/news/XLANGUAGE_CONFIG_FILE
XoopsModules/news/branches/1.x/Multisite/news/admin/
XoopsModules/news/branches/1.x/Multisite/news/admin/amsimport.php
XoopsModules/news/branches/1.x/Multisite/news/admin/functions.php
XoopsModules/news/branches/1.x/Multisite/news/admin/groupperms.php
XoopsModules/news/branches/1.x/Multisite/news/admin/index.php
XoopsModules/news/branches/1.x/Multisite/news/admin/menu.php
XoopsModules/news/branches/1.x/Multisite/news/admin/upgrade.php
XoopsModules/news/branches/1.x/Multisite/news/archive.php
XoopsModules/news/branches/1.x/Multisite/news/article.php
XoopsModules/news/branches/1.x/Multisite/news/backendt.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/
XoopsModules/news/branches/1.x/Multisite/news/blocks/index.html
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_archives.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_bigstory.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_block_tag.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_moderate.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_randomnews.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_top.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_topics.php
XoopsModules/news/branches/1.x/Multisite/news/blocks/news_topicsnav.php
XoopsModules/news/branches/1.x/Multisite/news/changelog.txt
XoopsModules/news/branches/1.x/Multisite/news/class/
XoopsModules/news/branches/1.x/Multisite/news/class/blacklist.php
XoopsModules/news/branches/1.x/Multisite/news/class/class.mimetype.php
XoopsModules/news/branches/1.x/Multisite/news/class/class.newsstory.php
XoopsModules/news/branches/1.x/Multisite/news/class/class.newstopic.php
XoopsModules/news/branches/1.x/Multisite/news/class/class.sfiles.php
XoopsModules/news/branches/1.x/Multisite/news/class/index.html
XoopsModules/news/branches/1.x/Multisite/news/class/keyhighlighter.class.php
XoopsModules/news/branches/1.x/Multisite/news/class/registryfile.php
XoopsModules/news/branches/1.x/Multisite/news/class/tree.php
XoopsModules/news/branches/1.x/Multisite/news/comment_delete.php
XoopsModules/news/branches/1.x/Multisite/news/comment_edit.php
XoopsModules/news/branches/1.x/Multisite/news/comment_new.php
XoopsModules/news/branches/1.x/Multisite/news/comment_post.php
XoopsModules/news/branches/1.x/Multisite/news/comment_reply.php
XoopsModules/news/branches/1.x/Multisite/news/config.php
XoopsModules/news/branches/1.x/Multisite/news/extra/
XoopsModules/news/branches/1.x/Multisite/news/extra/modules/
XoopsModules/news/branches/1.x/Multisite/news/extra/modules/tag/
XoopsModules/news/branches/1.x/Multisite/news/extra/modules/tag/plugin/
XoopsModules/news/branches/1.x/Multisite/news/extra/modules/tag/plugin/news.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/
XoopsModules/news/branches/1.x/Multisite/news/fpdf/chinese.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/ex.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/courier.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/helvetica.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/helveticab.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/helveticabi.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/helveticai.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/index.html
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1250.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1251.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1252.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1253.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1254.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1255.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1257.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp1258.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/cp874.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/index.html
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-1.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-11.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-15.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-16.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-2.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-4.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-5.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-7.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/iso-8859-9.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/koi8-r.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/koi8-u.map
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/makefont/makefont.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/symbol.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/times.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/timesb.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/timesbi.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/timesi.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/font/zapfdingbats.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/fpdf.inc.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/fpdf.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/gif.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/index.html
XoopsModules/news/branches/1.x/Multisite/news/fpdf/japanese.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/korean.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/english.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/french.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/index.html
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/japanese.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/korean.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/schinese.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/language/tchinese.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/makepdf_class.php
XoopsModules/news/branches/1.x/Multisite/news/fpdf/makepdf_config.php
XoopsModules/news/branches/1.x/Multisite/news/header.php
XoopsModules/news/branches/1.x/Multisite/news/images/
XoopsModules/news/branches/1.x/Multisite/news/images/acrobat.gif
XoopsModules/news/branches/1.x/Multisite/news/images/active.gif
XoopsModules/news/branches/1.x/Multisite/news/images/articles.png
XoopsModules/news/branches/1.x/Multisite/news/images/attach.gif
XoopsModules/news/branches/1.x/Multisite/news/images/bg.png
XoopsModules/news/branches/1.x/Multisite/news/images/blinklist.gif
XoopsModules/news/branches/1.x/Multisite/news/images/close12.gif
XoopsModules/news/branches/1.x/Multisite/news/images/delicious.gif
XoopsModules/news/branches/1.x/Multisite/news/images/diggman.gif
XoopsModules/news/branches/1.x/Multisite/news/images/export.png
XoopsModules/news/branches/1.x/Multisite/news/images/fark.gif
XoopsModules/news/branches/1.x/Multisite/news/images/forum.gif
XoopsModules/news/branches/1.x/Multisite/news/images/friend.gif
XoopsModules/news/branches/1.x/Multisite/news/images/furl.gif
XoopsModules/news/branches/1.x/Multisite/news/images/help.png
XoopsModules/news/branches/1.x/Multisite/news/images/home.png
XoopsModules/news/branches/1.x/Multisite/news/images/hover.gif
XoopsModules/news/branches/1.x/Multisite/news/images/index.html
XoopsModules/news/branches/1.x/Multisite/news/images/left_both.png
XoopsModules/news/branches/1.x/Multisite/news/images/maintain.png
XoopsModules/news/branches/1.x/Multisite/news/images/metagen.png
XoopsModules/news/branches/1.x/Multisite/news/images/news_slogo.png
XoopsModules/news/branches/1.x/Multisite/news/images/news_slogo2.png
XoopsModules/news/branches/1.x/Multisite/news/images/newsletter.png
XoopsModules/news/branches/1.x/Multisite/news/images/newsvine.gif
XoopsModules/news/branches/1.x/Multisite/news/images/open12.gif
XoopsModules/news/branches/1.x/Multisite/news/images/options.png
XoopsModules/news/branches/1.x/Multisite/news/images/permissions.png
XoopsModules/news/branches/1.x/Multisite/news/images/pixel.gif
XoopsModules/news/branches/1.x/Multisite/news/images/print.gif
XoopsModules/news/branches/1.x/Multisite/news/images/purge.png
XoopsModules/news/branches/1.x/Multisite/news/images/reddit.gif
XoopsModules/news/branches/1.x/Multisite/news/images/right_both.png
XoopsModules/news/branches/1.x/Multisite/news/images/rss.gif
XoopsModules/news/branches/1.x/Multisite/news/images/sel.gif
XoopsModules/news/branches/1.x/Multisite/news/images/selected.gif
XoopsModules/news/branches/1.x/Multisite/news/images/selectedEnd.gif
XoopsModules/news/branches/1.x/Multisite/news/images/selectedStart.gif
XoopsModules/news/branches/1.x/Multisite/news/images/selected_left_F90.gif
XoopsModules/news/branches/1.x/Multisite/news/images/selected_right_F90.gif
XoopsModules/news/branches/1.x/Multisite/news/images/simpy.png
XoopsModules/news/branches/1.x/Multisite/news/images/size.gif
XoopsModules/news/branches/1.x/Multisite/news/images/spurl.gif
XoopsModules/news/branches/1.x/Multisite/news/images/statistics.png
XoopsModules/news/branches/1.x/Multisite/news/images/topics/
XoopsModules/news/branches/1.x/Multisite/news/images/topics/blank.png
XoopsModules/news/branches/1.x/Multisite/news/images/topics/index.html
XoopsModules/news/branches/1.x/Multisite/news/images/topics/xoops.gif
XoopsModules/news/branches/1.x/Multisite/news/images/topics.png
XoopsModules/news/branches/1.x/Multisite/news/images/unselected.gif
XoopsModules/news/branches/1.x/Multisite/news/images/unselectedEnd.gif
XoopsModules/news/branches/1.x/Multisite/news/images/unselected_left.gif
XoopsModules/news/branches/1.x/Multisite/news/images/unselected_right.gif
XoopsModules/news/branches/1.x/Multisite/news/images/update.png
XoopsModules/news/branches/1.x/Multisite/news/images/yahoomyweb.gif
XoopsModules/news/branches/1.x/Multisite/news/include/
XoopsModules/news/branches/1.x/Multisite/news/include/comment_functions.php
XoopsModules/news/branches/1.x/Multisite/news/include/functions.php
XoopsModules/news/branches/1.x/Multisite/news/include/index.html
XoopsModules/news/branches/1.x/Multisite/news/include/notification.inc.php
XoopsModules/news/branches/1.x/Multisite/news/include/pagenav.php
XoopsModules/news/branches/1.x/Multisite/news/include/search.inc.php
XoopsModules/news/branches/1.x/Multisite/news/include/storyform.inc.php
XoopsModules/news/branches/1.x/Multisite/news/index.php
XoopsModules/news/branches/1.x/Multisite/news/js/
XoopsModules/news/branches/1.x/Multisite/news/js/dojo.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/
XoopsModules/news/branches/1.x/Multisite/news/js/src/a11y.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/color.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/common.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/display.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/iframe.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/images/
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/layout.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/metrics.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/selection.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/shadow.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/style.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/html/util.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/array.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/assert.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/common.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/declare.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/extras.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/func.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/repr.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/timing/
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/timing/Streamer.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/timing/Timer.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/timing/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lang/type.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/Animation.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/extras.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/html.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/rounded.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/shadow.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/lfx/toggle.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/ns.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/uri/
XoopsModules/news/branches/1.x/Multisite/news/js/src/uri/Uri.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/uri/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/DomWidget.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/FisheyeList.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/HtmlWidget.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/Manager.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/Parse.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/Widget.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/templates/
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/templates/FisheyeList.css
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/templates/images/
XoopsModules/news/branches/1.x/Multisite/news/js/src/widget/templates/images/tab_close.gif
XoopsModules/news/branches/1.x/Multisite/news/js/src/xml/
XoopsModules/news/branches/1.x/Multisite/news/js/src/xml/Parse.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/xml/XslTransform.js
XoopsModules/news/branches/1.x/Multisite/news/js/src/xml/__package__.js
XoopsModules/news/branches/1.x/Multisite/news/lang.diff
XoopsModules/news/branches/1.x/Multisite/news/language/
XoopsModules/news/branches/1.x/Multisite/news/language/english/
XoopsModules/news/branches/1.x/Multisite/news/language/english/admin.php
XoopsModules/news/branches/1.x/Multisite/news/language/english/blocks.php
XoopsModules/news/branches/1.x/Multisite/news/language/english/index.html
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/category_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/global_newcategory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/global_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/global_storysubmit_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/index.html
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/story_approve_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/mail_template/topic_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/english/main.php
XoopsModules/news/branches/1.x/Multisite/news/language/english/modinfo.php
XoopsModules/news/branches/1.x/Multisite/news/language/english/newsletter.php
XoopsModules/news/branches/1.x/Multisite/news/language/french/
XoopsModules/news/branches/1.x/Multisite/news/language/french/admin.php
XoopsModules/news/branches/1.x/Multisite/news/language/french/blocks.php
XoopsModules/news/branches/1.x/Multisite/news/language/french/index.html
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/category_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/global_newcategory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/global_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/global_storysubmit_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/index.html
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/story_approve_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/mail_template/topic_newstory_notify.tpl
XoopsModules/news/branches/1.x/Multisite/news/language/french/main.php
XoopsModules/news/branches/1.x/Multisite/news/language/french/modinfo.php
XoopsModules/news/branches/1.x/Multisite/news/language/french/newsletter.php
XoopsModules/news/branches/1.x/Multisite/news/language/index.html
XoopsModules/news/branches/1.x/Multisite/news/licence.txt
XoopsModules/news/branches/1.x/Multisite/news/list.tag.php
XoopsModules/news/branches/1.x/Multisite/news/makepdf.php
XoopsModules/news/branches/1.x/Multisite/news/micro_summary.php
XoopsModules/news/branches/1.x/Multisite/news/newsbythisauthor.php
XoopsModules/news/branches/1.x/Multisite/news/notification_update.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/
XoopsModules/news/branches/1.x/Multisite/news/pdf/CHANGELOG.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/LICENSE.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/README.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/barcodes.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/cache/
XoopsModules/news/branches/1.x/Multisite/news/pdf/cache/chapter_demo_1.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/cache/chapter_demo_2.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/cache/table_data_demo.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/cache/utf8test.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/de.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/en.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/eng.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/fr.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/it.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/lang/nl.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/tcpdf_config.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/config/tcpdf_config_alt.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/.noencode
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/README.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ZarBold.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ZarBold.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/almohanad.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/almohanad.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/almohanad.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/arialunicid0.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/courier.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/courierb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/courierbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/courieri.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/AUTHORS
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/BUGS
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/LICENSE
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/NEWS
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/README
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/langcover.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavu-fonts-ttf-2.25/unicover.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans-extralight.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans-extralight.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans-extralight.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusans.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensed.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensed.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensed.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusanscondensedi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmono.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmono.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmono.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonob.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonob.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonob.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonobi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonobi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonobi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonoi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonoi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavusansmonoi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserif.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserif.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserif.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensed.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensed.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensed.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifcondensedi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/dejavuserifi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/AUTHORS
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/COPYING
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/CREDITS
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/ChangeLog
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/INSTALL
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freefont-20060126/README
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemono.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemono.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemono.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonob.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonob.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonob.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonobi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonobi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonobi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonoi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonoi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freemonoi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesans.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesans.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesans.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freesansi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserif.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserif.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserif.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifb.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifb.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifbi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifbi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifi.ctg.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/freeserifi.z
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/helvetica.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/helveticab.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/helveticabi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/helveticai.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/hysmyeongjostdmedium.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/kozgopromedium.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/kozminproregular.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/msungstdlight.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/stsongstdlight.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/symbol.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/times.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/timesb.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/timesbi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/timesi.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ttf2ufm/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ttf2ufm/README.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ttf2ufm/makefontuni.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/ttf2ufm/ttf2ufm-src.zip
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/uni2cid_ac15.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/uni2cid_ag15.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/uni2cid_aj16.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/uni2cid_ak12.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/README.TXT
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1250.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1251.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1252.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1253.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1254.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1255.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1257.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp1258.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/cp874.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-1.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-11.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-15.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-16.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-2.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-4.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-5.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-7.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/iso-8859-9.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/koi8-r.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/enc/koi8-u.map
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/freetype6.dll
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/makefont.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/src/
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/src/pfm2afm-src.zip
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/src/readme.txt
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/src/ttf2ufm-src.zip
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/utils/zlib1.dll
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/zapfdingbats.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/fonts/zarbold.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/htmlcolors.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/_blank.png
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/bug.eps
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/image_demo.jpg
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/logo_example.gif
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/logo_example.jpg
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/logo_example.png
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/pelican.ai
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/tcpdf_logo.jpg
XoopsModules/news/branches/1.x/Multisite/news/pdf/images/tiger.ai
XoopsModules/news/branches/1.x/Multisite/news/pdf/pdf.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/tcpdf.php
XoopsModules/news/branches/1.x/Multisite/news/pdf/unicode_data.php
XoopsModules/news/branches/1.x/Multisite/news/print.php
XoopsModules/news/branches/1.x/Multisite/news/ratenews.php
XoopsModules/news/branches/1.x/Multisite/news/readme.txt
XoopsModules/news/branches/1.x/Multisite/news/seo/
XoopsModules/news/branches/1.x/Multisite/news/seo/.htaccess
XoopsModules/news/branches/1.x/Multisite/news/seo/index.html
XoopsModules/news/branches/1.x/Multisite/news/sql/
XoopsModules/news/branches/1.x/Multisite/news/sql/index.html
XoopsModules/news/branches/1.x/Multisite/news/sql/mysql.sql
XoopsModules/news/branches/1.x/Multisite/news/submit.php
XoopsModules/news/branches/1.x/Multisite/news/templates/
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/index.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_archives.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_bigstory.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_moderate.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_randomnews.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_top.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_topicnav.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_block_topics.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_tag_block_cloud.html
XoopsModules/news/branches/1.x/Multisite/news/templates/blocks/news_tag_block_top.html
XoopsModules/news/branches/1.x/Multisite/news/templates/index.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_archive.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_article.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_by_this_author.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_by_topic.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_index.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_item.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_ratenews.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_rss.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_topics_directory.html
XoopsModules/news/branches/1.x/Multisite/news/templates/news_whos_who.html
XoopsModules/news/branches/1.x/Multisite/news/topics_directory.php
XoopsModules/news/branches/1.x/Multisite/news/upgrade.txt
XoopsModules/news/branches/1.x/Multisite/news/view.tag.php
XoopsModules/news/branches/1.x/Multisite/news/visit.php
XoopsModules/news/branches/1.x/Multisite/news/whoswho.php
XoopsModules/news/branches/1.x/Multisite/news/xoops_version.php
Added: XoopsModules/news/branches/1.x/Multisite/news/XLANGUAGE_CONFIG_FILE
===================================================================
--- XoopsModules/news/branches/1.x/Multisite/news/XLANGUAGE_CONFIG_FILE (rev 0)
+++ XoopsModules/news/branches/1.x/Multisite/news/XLANGUAGE_CONFIG_FILE 2009-05-12 00:40:25 UTC (rev 3234)
@@ -0,0 +1,31 @@
+<?php
+ $XLANGUAGE_CONFIG_VAR['xlanguage_base'] = array(
+ "english"=>array(
+ "lang_name"=>"english",
+ "lang_desc"=>"English",
+ "lang_charset"=>"ISO",
+ "lang_code"=>"en",
+ "lang_image"=>"english.gif",
+ "lang_id"=>1,
+ "weight"=>1
+ ),
+ "german"=>array(
+ "lang_name"=>"german",
+ "lang_desc"=>"German",
+ "lang_charset"=>"ISO",
+ "lang_code"=>"de",
+ "lang_image"=>"german.gif",
+ "lang_id"=>2,
+ "weight"=>1
+ ),
+ "french"=>array(
+ "lang_name"=>"french",
+ "lang_desc"=>"French",
+ "lang_charset"=>"ISO",
+ "lang_code"=>"fr",
+ "lang_image"=>"french.gif",
+ "lang_id"=>3,
+ "weight"=>1
+ ),
+ );
+?>
\ No newline at end of file
Added: XoopsModules/news/branches/1.x/Multisite/news/admin/amsimport.php
===================================================================
--- XoopsModules/news/branches/1.x/Multisite/news/admin/amsimport.php (rev 0)
+++ XoopsModules/news/branches/1.x/Multisite/news/admin/amsimport.php 2009-05-12 00:40:25 UTC (rev 3234)
@@ -0,0 +1,253 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+/**
+ * AMS Import
+ *
+ * This script will import topics, articles, files, links, ratings, comments and notifications from AMS 2.41
+ *
+ * @package News
+ * @author Instant Zero (http://www.instant-zero.com)
+ * @copyright 2005, 2006 - Instant Zero
+ * @version 1.0
+ */
+
+include_once '../../../include/cp_header.php';
+xoops_cp_header();
+include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
+include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
+include_once XOOPS_ROOT_PATH.'/modules/news/class/class.sfiles.php';
+include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';
+include_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
+
+if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
+ if(!isset($_POST['go']) ) {
+ echo '<h1>Welcome to the AMS 2.41 import script</h1>';
+ echo '<br /><br />Select the import options you wan to use :';
+ echo "<form method='post' action='amsimport.php'>";
+ echo "<br /><input type='checkbox' name='useforum' value='1' /> Import forums links inside news (at the bottom of the news)";
+ echo "<br /><input type='checkbox' name='useextlinks' value='1' /> Import external links inside news (at the bottom of the news)";
+ echo "<br /><br /><input type='submit' name='go' value='Import' />";
+ echo '</form>';
+ echo "<br /><br />If you check the two last options then the forum's link and all the external links will be added at the end of the body text.";
+ } else {
+ // Launch the import
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php';
+ } else {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/main.php';
+ }
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php';
+ } else {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/admin.php';
+ }
+ $db =& Database::getInstance();
+ // User's choices
+ $use_forum = (isset($_POST['useforum']) && $_POST['useforum']==1) ? 1 : 0;
+ $use_extlinks = (isset($_POST['useextlinks']) && $_POST['useextlinks']==1) ? 1 : 0;
+ // Retreive News module's ID
+ $module_handler =& xoops_gethandler('module');
+ $newsModule =& $module_handler->getByDirname('news');
+ $news_mid = $newsModule->getVar('mid');
+ // Retreive AMS module's ID
+ $AmsModule =& $module_handler->getByDirname('AMS');
+ $ams_mid = $AmsModule->getVar('mid');
+
+ // Retreive AMS tables names
+ $ams_topics = $xoopsDB->prefix('ams_topics');
+ $ams_articles = $xoopsDB->prefix('ams_article');
+ $ams_text = $xoopsDB->prefix('ams_text');
+ $ams_files = $xoopsDB->prefix('ams_files');
+ $ams_links = $xoopsDB->prefix('ams_link');
+ $ams_rating = $xoopsDB->prefix('ams_rating');
+ // Retreive News tables names
+ $news_stories_votedata = $xoopsDB->prefix('stories_votedata');
+ // Misc
+ $comment_handler =& xoops_gethandler('comment');
+ $notification_handler =& xoops_gethandler('notification');
+ $ams_news_topics=array(); // Key => AMS Id, Value => News ID
+
+ // The import by itself
+ // Read topics by their order
+ $mytree = new XoopsTree($ams_topics,'topic_id','topic_pid');
+ $ams_topics = $mytree->getChildTreeArray(0,'weight');
+ foreach($ams_topics as $one_amstopic) {
+ // First we create the topic
+ $topicpid=0;
+ if($one_amstopic['topic_pid']!=0) { // Search for its the parent
+ if(array_key_exists($one_amstopic['topic_pid'],$ams_news_topics)) {
+ $topicpid=$ams_news_topics[$one_amstopic['topic_pid']];
+ }
+ }
+ $news_topic = new NewsTopic();
+ $news_topic->setTopicPid($topicpid);
+ $news_topic->setTopicTitle($one_amstopic['topic_title']);
+ $news_topic->setTopicImgurl($one_amstopic['topic_imgurl']);
+ $news_topic->setMenu(0);
+ $news_topic->setTopicFrontpage(1);
+ $news_topic->Settopic_rssurl('');
+ $news_topic->setTopicDescription('');
+ $news_topic->setTopic_color('000000');
+ $news_topic->store();
+ echo '<br>- The following topic was imported : '.$news_topic->topic_title();
+ $ams_topicid = $one_amstopic['topic_id'];
+ $news_topicid = $news_topic->topic_id();
+ $ams_news_topics[$ams_topicid] = $news_topicid;
+
+ // Then we insert all its articles
+ $result = $db->query('SELECT * FROM '.$ams_articles.' WHERE topicid='.$ams_topicid.' ORDER BY created');
+ while ( $article = $db->fetchArray($result) ) {
+ $ams_newsid = $article['storyid'];
+
+ // We search for the last version
+ $result2 = $db->query('SELECT * FROM '.$ams_text.' WHERE storyid='.$ams_newsid.' AND current=1');
+ $text_lastversion = $db->fetchArray($result2);
+
+ // We search for the number of votes
+ $result3 = $db->query('SELECT count(*) as cpt FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
+ $votes = $db->fetchArray($result3);
+
+ // The links
+ $links='';
+ if($use_extlinks) {
+ $result7 = $db->query('SELECT * FROM '.$ams_links.' WHERE storyid='.$ams_newsid.' ORDER BY linkid');
+ while ( $link = $db->fetchArray($result7) ) {
+ if(trim($links)=='') {
+ $links="\n\n"._AMS_NW_RELATEDARTICLES."\n\n";
+ }
+ $links .= _AMS_NW_EXTERNALLINK.' [url='.$link['link_link'].']'.$link['link_title'].'[/url]'."\n";
+ }
+ }
+
+ // The forum
+ $forum='';
+ if($use_forum && $one_amstopic['forum_id']!=0) {
+ $forum = "\n\n".'[url='.XOOPS_URL.'/modules/newbb/viewforum.php?forum='.$one_amstopic['forum_id'].']'._AMS_AM_LINKEDFORUM.'[/url]'."\n";
+ }
+
+ // We create the story
+ $news = new NewsStory();
+ $news->setUid($text_lastversion['uid']);
+ $news->setTitle($article['title']);
+ $news->created=$article['created'];
+ $news->setPublished($article['published']);
+ $news->setExpired($article['expired']);
+ $news->setHostname($article['hostname']);
+ $news->setNohtml($article['nohtml']);
+ $news->setNosmiley($article['nosmiley']);
+ $news->setHometext($text_lastversion['hometext']);
+ $news->setBodytext($text_lastversion['bodytext'].$links.$forum);
+ $news->Setkeywords('');
+ $news->Setdescription('');
+ $news->counter=$article['counter'];
+ $news->setTopicId($news_topicid);
+ $news->setIhome($article['ihome']);
+ $news->setNotifyPub($article['notifypub']);
+ $news->story_type=$article['story_type'];
+ $news->setTopicdisplay($article['topicdisplay']);
+ $news->setTopicalign($article['topicalign']);
+ $news->setComments($article['comments']);
+ $news->rating=$article['rating'];
+ $news->votes=$votes['cpt'];
+ $approved = $article['published']>0 ? true : false;
+ $news->approved=$approved;
+ $news->store($approved);
+ echo '<br> This story was imported : '.$news->title();
+ $news_newsid=$news->storyid(); // ********************
+
+ // The files
+ $result4 = $db->query('SELECT * FROM '.$ams_files.' WHERE storyid='.$ams_newsid);
+ while ( $file = $db->fetchArray($result4) ) {
+ $sfile = new sFiles();
+ $sfile->setFileRealName($file['filerealname']);
+ $sfile->setStoryid($news_newsid);
+ $sfile->date=$file['date'];
+ $sfile->setMimetype($file['mimetype']);
+ $sfile->setDownloadname($file['downloadname']);
+ $sfile->counter=$file['counter'];
+ $sfile->store();
+ echo '<br> This file was imported : '.$sfile->getDownloadname();
+ $news_fileid=$sfile->fileid;
+ }
+
+ // The ratings
+ $result5 = $db->query('SELECT * FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
+ while ( $ratings = $db->fetchArray($result5) ) {
+ $result6 = $db->queryF('INSERT INTO '.$news_stories_votedata." (storyid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (".$news_newsid.','.$ratings['ratinguser'].','.$ratings['rating'].','.$ratings['ratinghostname'].','.$ratings['ratingtimestamp'].')');
+ }
+
+ // The comments
+ $comments =& $comment_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
+ if(is_array($comments) && count($comments)>0) {
+ foreach($comments as $onecomment) {
+ $onecomment->setNew();
+ $onecomment->setVar('com_modid',$news_mid);
+ $onecomment->setVar('com_itemid',$news_newsid);
+ $comment_handler->insert($onecomment);
+ }
+ }
+ unset($comments);
+
+ // The notifications of this news
+ //$notifications =& $notification_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
+ $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
+ $criteria->add(new Criteria('not_itemid', $ams_newsid));
+ $criteria->setOrder('ASC');
+ $notifications = $notification_handler->getObjects($criteria);
+ if(is_array($notifications) && count($notifications)>0) {
+ foreach($notifications as $onenotification) {
+ $onenotification->setNew();
+ $onenotification->setVar('not_modid',$news_mid);
+ $onenotification->setVar('not_itemid',$news_newsid);
+ $notification_handler->insert($onenotification);
+ }
+ }
+ unset($notifications);
+ }
+ }
+ // Finally, import all the globals notifications
+ $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
+ $criteria->add(new Criteria('not_category', 'global'));
+ $criteria->setOrder('ASC');
+ $notifications = $notification_handler->getObjects($criteria);
+ if(is_array($notifications) && count($notifications)>0) {
+ foreach($notifications as $onenotification) {
+ $onenotification->setNew();
+ $onenotification->setVar('not_modid',$news_mid);
+ $onenotification->setVar('not_itemid',$news_newsid);
+ $notification_handler->insert($onenotification);
+ }
+ }
+ unset($notifications);
+ echo "<p><a href='".XOOPS_URL."/modules/news/admin/groupperms.php'>The import is finished, don't forget to verify and set the topics permissions !</a></p>";
+ }
+} else {
+ redirect_header(XOOPS_URL.'/modules/news/index.php', 3, _NOPERM);
+ exit();
+}
+xoops_cp_footer();
+?>
Added: XoopsModules/news/branches/1.x/Multisite/news/admin/functions.php
===================================================================
--- XoopsModules/news/branches/1.x/Multisite/news/admin/functions.php (rev 0)
+++ XoopsModules/news/branches/1.x/Multisite/news/admin/functions.php 2009-05-12 00:40:25 UTC (rev 3234)
@@ -0,0 +1,233 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+/**
+ * Function used to display a menu similar to the launcher on OS X
+ *
+ * Enable webmasters to navigate thru the module's features.
+ * Each time you select an option in the admin panel of the news module, this option is highlighted in this menu
+ *
+ * NOTE : Please give credits if you copy this code !
+ *
+ * @package News
+ * @author Instant Zero (http://www.instant-zero.com) & Dojo Javscript Toolkit
+ * @copyright (c) Instant Zero - http://www.instant-zero.com
+ */
+function adminmenu($currentoption = 0, $breadcrumb = '')
+{
+ global $xoopsModule, $xoopsConfig;
+
+ include XOOPS_ROOT_PATH.'/modules/news/config.php';
+ if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
+ include_once XOOPS_ROOT_PATH. '/modules/news/language/' . $xoopsConfig['language'] . '/modinfo.php';
+ } else {
+ include_once XOOPS_ROOT_PATH . '/modules/news/language/english/modinfo.php';
+ }
+
+ if(!$cfg['use_fun_menu']) {
+ $tblColors = array('','','','','','','','','');
+ if($currentoption>=0) {
+ $tblColors[$currentoption] = 'current';
+ }
+
+ /* Nice buttons styles */
+ echo "
+ <style type='text/css'>
+ #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
+ #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/news/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
+ #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
+ #buttonbar li { display:inline; margin:0; padding:0; }
+ #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/news/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
+ #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/news/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
+ /* Commented Backslash Hack hides rule from IE5-Mac \*/
+ #buttonbar a span {float:none;}
+ /* End IE5-Mac hack */
+ #buttonbar a:hover span { color:#333; }
+ #buttonbar #current a { background-position:0 -150px; border-width:0; }
+ #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
+ #buttonbar a:hover { background-position:0% -150px; }
+ #buttonbar a:hover span { background-position:100% -150px; }
+ </style>
+ ";
+
+ echo "<div id='buttontop'>";
+ echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>";
+ echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar('mid')."\">" . _AM_NEWS_GENERALSET . "</a> | <a href=\"../index.php\">" . _AM_NEWS_GOTOMOD . "</a> | <a href=\"#\">" . _AM_NEWS_HELP . "</a> | <a href='index.php?op=verifydb'>". _AM_NEWS_VERIFY_TABLES ."</a></td>";
+ echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $xoopsModule->name() . " " . _AM_NEWS_MODULEADMIN . "</b> " . $breadcrumb . "</td>";
+ echo '</tr></table>';
+ echo '</div>';
+
+ echo "<div id='buttonbar'>";
+ echo '<ul>';
+ echo "<li id='" . $tblColors[0] . "'><a href=\"index.php?op=topicsmanager\"\"><span>"._MI_NEWS_ADMENU2 ."</span></a></li>\n";
+ echo "<li id='" . $tblColors[1] . "'><a href=\"index.php?op=newarticle\"><span>" . _MI_NEWS_ADMENU3 . "</span></a></li>\n";
+ echo "<li id='" . $tblColors[2] . "'><a href=\"groupperms.php\"><span>" . _MI_NEWS_GROUPPERMS . "</span></a></li>\n";
+ echo "<li id='" . $tblColors[3] . "'><a href=\"index.php?op=prune\"><span>" . _MI_NEWS_PRUNENEWS . "</span></a></li>\n";
+ echo "<li id='" . $tblColors[4] . "'><a href=\"index.php?op=export\"><span>" . _MI_NEWS_EXPORT . "</span></a></li>\n";
+ echo "<li id='" . $tblColors[5] . "'><a href=\"index.php?op=configurenewsletter\"><span>" . _MI_NEWS_NEWSLETTER . "</span></a></li>\n";
+ echo "<li id='" . $tblColors[6] . "'><a href=\"index.php?op=stats\"><span>" . _MI_NEWS_STATS . "</span></a></li>\n";
+ if ($xoopsModule->getVar('version') != 163) {
+ echo "<li id='" . $tblColors[7] . "'><a href=\"upgrade.php\"><span>" . _AM_NEWS_UPGRADE . "</span></a></li>\n";
+ }
+ echo "<li id='" . $tblColors[8] . "'><a href=\"index.php?op=metagen\"><span>" . _MI_NEWS_METAGEN . "</span></a></li>\n";
+ echo '</ul></div>';
+ echo '<br /><br /><pre> </pre><pre> </pre>';
+ } else {
+?>
+ <script type="text/javascript" src="../js/dojo.js"></script>
+ <script language="JavaScript" type="text/javascript">
+ dojo.require("dojo.widget.FisheyeList");
+ dojo.hostenv.writeIncludes();
+ </script>
+ <script>
+ function load_app(id){
+ urltogo = new Array("../../system/admin.php?fct=preferences&op=showmod&mod=<?php echo $xoopsModule->getVar('mid'); ?>","../index.php","#","index.php?op=verifydb","index.php?op=topicsmanager","index.php?op=newarticle","groupperms.php","index.php?op=prune","index.php?op=export","index.php?op=configurenewsletter","index.php?op=stats","index.php?op=metagen","upgrade.php");
+ window.location.href = urltogo[...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-12 00:35:11
|
Revision: 3233
http://xoops.svn.sourceforge.net/xoops/?rev=3233&view=rev
Author: wishcraft
Date: 2009-05-12 00:24:37 +0000 (Tue, 12 May 2009)
Log Message:
-----------
NewBB (CBB) 3.10 (Multisite Edition) - branch
Added Paths:
-----------
XoopsModules/newbb/branches/3.x - Multisite/
XoopsModules/newbb/branches/3.x - Multisite/XLANGUAGE_CONFIG_FILE
XoopsModules/newbb/branches/3.x - Multisite/action.post.php
XoopsModules/newbb/branches/3.x - Multisite/action.topic.php
XoopsModules/newbb/branches/3.x - Multisite/action.transfer.php
XoopsModules/newbb/branches/3.x - Multisite/admin/
XoopsModules/newbb/branches/3.x - Multisite/admin/about.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_blocks.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_cat_manager.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_digest.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_forum_manager.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_forum_prune.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_forum_reorder.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_header.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_permissions.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_report.php
XoopsModules/newbb/branches/3.x - Multisite/admin/admin_votedata.php
XoopsModules/newbb/branches/3.x - Multisite/admin/index.html
XoopsModules/newbb/branches/3.x - Multisite/admin/index.php
XoopsModules/newbb/branches/3.x - Multisite/admin/menu.php
XoopsModules/newbb/branches/3.x - Multisite/archive.php
XoopsModules/newbb/branches/3.x - Multisite/blocks/
XoopsModules/newbb/branches/3.x - Multisite/blocks/index.html
XoopsModules/newbb/branches/3.x - Multisite/blocks/newbb_block.php
XoopsModules/newbb/branches/3.x - Multisite/changelog.txt
XoopsModules/newbb/branches/3.x - Multisite/class/
XoopsModules/newbb/branches/3.x - Multisite/class/category.php
XoopsModules/newbb/branches/3.x - Multisite/class/digest.php
XoopsModules/newbb/branches/3.x - Multisite/class/forum.php
XoopsModules/newbb/branches/3.x - Multisite/class/index.html
XoopsModules/newbb/branches/3.x - Multisite/class/karma.php
XoopsModules/newbb/branches/3.x - Multisite/class/moderate.php
XoopsModules/newbb/branches/3.x - Multisite/class/newbbtree.php
XoopsModules/newbb/branches/3.x - Multisite/class/online.php
XoopsModules/newbb/branches/3.x - Multisite/class/permission.php
XoopsModules/newbb/branches/3.x - Multisite/class/post.php
XoopsModules/newbb/branches/3.x - Multisite/class/rate.php
XoopsModules/newbb/branches/3.x - Multisite/class/read.php
XoopsModules/newbb/branches/3.x - Multisite/class/readforum.php
XoopsModules/newbb/branches/3.x - Multisite/class/readtopic.php
XoopsModules/newbb/branches/3.x - Multisite/class/report.php
XoopsModules/newbb/branches/3.x - Multisite/class/text.php
XoopsModules/newbb/branches/3.x - Multisite/class/topic.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/blog/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/bookmark/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/dokuwiki/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/action.email.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/email/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/index.html
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pdf/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/pm/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/print/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/config.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/index.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/language/
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer/wordpress/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/class/transfer.php
XoopsModules/newbb/branches/3.x - Multisite/class/uploader.php
XoopsModules/newbb/branches/3.x - Multisite/class/user.php
XoopsModules/newbb/branches/3.x - Multisite/class/xmlrss.php
XoopsModules/newbb/branches/3.x - Multisite/class/xoopsformloader.php
XoopsModules/newbb/branches/3.x - Multisite/delete.php
XoopsModules/newbb/branches/3.x - Multisite/digest.php
XoopsModules/newbb/branches/3.x - Multisite/dl_attachment.php
XoopsModules/newbb/branches/3.x - Multisite/edit.php
XoopsModules/newbb/branches/3.x - Multisite/fckeditor.config.js
XoopsModules/newbb/branches/3.x - Multisite/fckeditor.connector.php
XoopsModules/newbb/branches/3.x - Multisite/fckeditor.upload.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/
XoopsModules/newbb/branches/3.x - Multisite/fpdf/chinese.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/ex.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/courier.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/helvetica.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/helveticab.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/helveticabi.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/helveticai.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1250.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1251.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1252.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1253.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1254.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1255.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1257.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp1258.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/cp874.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-1.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-11.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-15.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-16.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-2.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-4.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-5.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-7.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/iso-8859-9.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/koi8-r.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/koi8-u.map
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/makefont/makefont.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/symbol.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/times.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/timesb.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/timesbi.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/timesi.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/font/zapfdingbats.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/fpdf.inc.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/fpdf.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/gif.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/japanese.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/korean.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/english.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/french.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/japanese.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/korean.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/schinese.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/language/tchinese.php
XoopsModules/newbb/branches/3.x - Multisite/fpdf/makepdf_class.php
XoopsModules/newbb/branches/3.x - Multisite/gpl.txt
XoopsModules/newbb/branches/3.x - Multisite/header.php
XoopsModules/newbb/branches/3.x - Multisite/images/
XoopsModules/newbb/branches/3.x - Multisite/images/add-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/aim-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/aim-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/approve-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/approve-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/arrow-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/arrow-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/bg.gif
XoopsModules/newbb/branches/3.x - Multisite/images/bg.png
XoopsModules/newbb/branches/3.x - Multisite/images/blank.gif
XoopsModules/newbb/branches/3.x - Multisite/images/category/
XoopsModules/newbb/branches/3.x - Multisite/images/category/blank.gif
XoopsModules/newbb/branches/3.x - Multisite/images/category/cbb.png
XoopsModules/newbb/branches/3.x - Multisite/images/category/topxoops.png
XoopsModules/newbb/branches/3.x - Multisite/images/category/xoops-cn.png
XoopsModules/newbb/branches/3.x - Multisite/images/cbb.png
XoopsModules/newbb/branches/3.x - Multisite/images/del_topic-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/del_topic-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/delete.gif
XoopsModules/newbb/branches/3.x - Multisite/images/delete.png
XoopsModules/newbb/branches/3.x - Multisite/images/digest-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/digest-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/disable.gif
XoopsModules/newbb/branches/3.x - Multisite/images/document-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/document-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/edit.gif
XoopsModules/newbb/branches/3.x - Multisite/images/edit.png
XoopsModules/newbb/branches/3.x - Multisite/images/email-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/email-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/enable.gif
XoopsModules/newbb/branches/3.x - Multisite/images/external.png
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/ace.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/avi.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/bmp.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/doc.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/exe.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/flash.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/gif.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/html.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/jpeg.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/jpg.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/mid.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/mov.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/mp3.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/mpg.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/netscape.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/pdf.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/png.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/ppt.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/rar.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/txt.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/unknown.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/wav.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/xls.gif
XoopsModules/newbb/branches/3.x - Multisite/images/filetypes/zip.gif
XoopsModules/newbb/branches/3.x - Multisite/images/home-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/home-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/icq-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/icq-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/attachment-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/attachment-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/clip-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/clip-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/doubledown-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/doubledown-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/down-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/down-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/english/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/flat-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/flat-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_digest-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_digest-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_locked_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_locked_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_locked_big_newposts-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_locked_big_newposts-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_new_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_new_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_sticky-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_sticky-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/forum_moderators-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/forum_moderators-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/german/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_red_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/hot_red_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/index.html
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/left-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/left-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/lock-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/lock-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/pixel-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/post_content-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/post_content-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/printer-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/printer-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate1-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate1-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate2-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate2-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate3-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate3-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate4-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate4-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate5-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rate5-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/red_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/red_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/red_folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/red_folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/right-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/right-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/blue.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/green.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/img_backing.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/img_left.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/img_right.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/rpg/orange.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/schinese/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/tchinese/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/threaded-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/threaded-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/whosonline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/default/whosonline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/attachment-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/attachment-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/clip-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/clip-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/doubledown-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/doubledown-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/down-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/down-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/english/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/flat-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/flat-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_digest-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_digest-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_locked_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_locked_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_locked_big_newposts-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_locked_big_newposts-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_new_big-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_new_big-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_sticky-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_sticky-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/forum_moderators-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/forum_moderators-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_red_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/hot_red_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/index.html
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/left-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/left-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/lock-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/lock-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/pixel-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/post_content-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/post_content-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/printer-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/printer-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate1-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate1-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate2-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate2-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate3-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate3-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate4-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate4-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate5-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rate5-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/red_folder-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/red_folder-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/red_folder_user-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/red_folder_user-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/right-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/right-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/blue.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/green.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/img_backing.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/img_left.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/img_right.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/rpg/orange.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/schinese/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/new_forum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/new_forum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/new_subforum-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/new_subforum-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/offline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/offline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/online-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/online-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_delete-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_delete-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_edit-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_edit-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_quote-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_quote-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_report-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_report-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/p_up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_new-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_new-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_poll-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_poll-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_qr-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_qr-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_reply-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/tchinese/t_reply-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/threaded-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/threaded-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/up-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/up-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/whosonline-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/imagesets/hsyong/whosonline-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/index.html
XoopsModules/newbb/branches/3.x - Multisite/images/left_both.gif
XoopsModules/newbb/branches/3.x - Multisite/images/left_both.png
XoopsModules/newbb/branches/3.x - Multisite/images/lock_topic-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/lock_topic-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/minus-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/minus-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/minus.gif
XoopsModules/newbb/branches/3.x - Multisite/images/minus.png
XoopsModules/newbb/branches/3.x - Multisite/images/move_topic-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/move_topic-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/msnm-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/msnm-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/news-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/news-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/pdf-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/pdf-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/personal-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/personal-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/plus-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/plus-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/plus.gif
XoopsModules/newbb/branches/3.x - Multisite/images/plus.png
XoopsModules/newbb/branches/3.x - Multisite/images/pm-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/pm-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/right_both.gif
XoopsModules/newbb/branches/3.x - Multisite/images/right_both.png
XoopsModules/newbb/branches/3.x - Multisite/images/rss-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/rss-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/spacer-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/sticky-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/sticky-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/undigest-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/undigest-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/unlock_topic-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/unlock_topic-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/unsticky-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/unsticky-a.png
XoopsModules/newbb/branches/3.x - Multisite/images/xoopsbb_slogo.gif
XoopsModules/newbb/branches/3.x - Multisite/images/xoopsbb_slogo.png
XoopsModules/newbb/branches/3.x - Multisite/images/xoopsbb_slogo.png2
XoopsModules/newbb/branches/3.x - Multisite/images/yahoo-a.gif
XoopsModules/newbb/branches/3.x - Multisite/images/yahoo-newbb.png
XoopsModules/newbb/branches/3.x - Multisite/include/
XoopsModules/newbb/branches/3.x - Multisite/include/forumform.inc.php
XoopsModules/newbb/branches/3.x - Multisite/include/functions.image.php
XoopsModules/newbb/branches/3.x - Multisite/include/functions.ini.php
XoopsModules/newbb/branches/3.x - Multisite/include/functions.php
XoopsModules/newbb/branches/3.x - Multisite/include/functions.welcome.php
XoopsModules/newbb/branches/3.x - Multisite/include/index.html
XoopsModules/newbb/branches/3.x - Multisite/include/js/
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_browserdetect.js
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_dynMenu.js
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_menu_click.js
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_tip.js
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_tipstyle.js
XoopsModules/newbb/branches/3.x - Multisite/include/js/newbb_toggle.js
XoopsModules/newbb/branches/3.x - Multisite/include/module.php
XoopsModules/newbb/branches/3.x - Multisite/include/module.v100.php
XoopsModules/newbb/branches/3.x - Multisite/include/module.v220.php
XoopsModules/newbb/branches/3.x - Multisite/include/newbb.htc
XoopsModules/newbb/branches/3.x - Multisite/include/notification.inc.php
XoopsModules/newbb/branches/3.x - Multisite/include/plugin.dist.php
XoopsModules/newbb/branches/3.x - Multisite/include/plugin.php
XoopsModules/newbb/branches/3.x - Multisite/include/pngbehavior.htc
XoopsModules/newbb/branches/3.x - Multisite/include/search.inc.php
XoopsModules/newbb/branches/3.x - Multisite/include/update.php
XoopsModules/newbb/branches/3.x - Multisite/include/vars.php
XoopsModules/newbb/branches/3.x - Multisite/index.php
XoopsModules/newbb/branches/3.x - Multisite/language/
XoopsModules/newbb/branches/3.x - Multisite/language/english/
XoopsModules/newbb/branches/3.x - Multisite/language/english/admin.php
XoopsModules/newbb/branches/3.x - Multisite/language/english/blocks.php
XoopsModules/newbb/branches/3.x - Multisite/language/english/index.html
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/forum_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/forum_newthread_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/global_digest_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/global_newforum_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/global_newfullpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/global_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/mail_template/thread_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/english/main.php
XoopsModules/newbb/branches/3.x - Multisite/language/english/modinfo.php
XoopsModules/newbb/branches/3.x - Multisite/language/index.html
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/admin.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/blocks.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/index.html
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/forum_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/forum_newthread_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/global_digest_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/global_newforum_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/global_newfullpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/global_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/mail_template/thread_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/main.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese/modinfo.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/admin.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/blocks.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/index.html
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/forum_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/forum_newthread_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/global_digest_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/global_newforum_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/global_newfullpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/global_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/mail_template/thread_newpost_notify.tpl
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/main.php
XoopsModules/newbb/branches/3.x - Multisite/language/schinese_utf8/modinfo.php
XoopsModules/newbb/branches/3.x - Multisite/makepdf.php
XoopsModules/newbb/branches/3.x - Multisite/moderate.php
XoopsModules/newbb/branches/3.x - Multisite/newtopic.php
XoopsModules/newbb/branches/3.x - Multisite/notification_update.php
XoopsModules/newbb/branches/3.x - Multisite/polls.php
XoopsModules/newbb/branches/3.x - Multisite/post.php
XoopsModules/newbb/branches/3.x - Multisite/print.php
XoopsModules/newbb/branches/3.x - Multisite/ratethread.php
XoopsModules/newbb/branches/3.x - Multisite/readme.txt
XoopsModules/newbb/branches/3.x - Multisite/reply.php
XoopsModules/newbb/branches/3.x - Multisite/report.php
XoopsModules/newbb/branches/3.x - Multisite/rss.php
XoopsModules/newbb/branches/3.x - Multisite/search.php
XoopsModules/newbb/branches/3.x - Multisite/sql/
XoopsModules/newbb/branches/3.x - Multisite/sql/index.html
XoopsModules/newbb/branches/3.x - Multisite/sql/mysql.304.sql
XoopsModules/newbb/branches/3.x - Multisite/sql/mysql.sql
XoopsModules/newbb/branches/3.x - Multisite/sql/upgrade_230.sql
XoopsModules/newbb/branches/3.x - Multisite/templates/
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/index.html
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/newbb_block.html
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/newbb_block_author.html
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/newbb_block_post.html
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/newbb_block_text.html
XoopsModules/newbb/branches/3.x - Multisite/templates/blocks/newbb_block_topic.html
XoopsModules/newbb/branches/3.x - Multisite/templates/index.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb.css
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_index.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_item.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_menu_click.css
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_menu_hover.css
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_online.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_poll_results.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_poll_view.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_rss.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_search.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_searchresults.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_thread.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_viewall.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_viewforum.html
XoopsModules/newbb/branches/3.x - Multisite/templates/newbb_viewpo...
[truncated message content] |
|
From: <wis...@us...> - 2009-05-12 00:11:00
|
Revision: 3232
http://xoops.svn.sourceforge.net/xoops/?rev=3232&view=rev
Author: wishcraft
Date: 2009-05-12 00:10:51 +0000 (Tue, 12 May 2009)
Log Message:
-----------
Multisite version 1.21 (Now with Definer)
Modified Paths:
--------------
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php
XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php 2009-05-11 23:27:54 UTC (rev 3231)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php 2009-05-12 00:10:51 UTC (rev 3232)
@@ -51,6 +51,11 @@
if (isset($_REQUEST['define_name'])) {
$define_name = $_REQUEST['define_name'];
}
+
+ if (isset($_REQUEST['define_id'])) {
+ $define_id = intval($_REQUEST['define_id']);
+ }
+
if (isset($_REQUEST['domain'])) {
$domain = (string)urldecode(($_REQUEST['domain']));
} else {
@@ -140,7 +145,7 @@
$eletray[$domain_out->getVar('dom_id')] = new XoopsFormElementTray(htmlspecialchars($define->getConfValueForOutput()), " ");
$eletray[$domain_out->getVar('dom_id')]->addElement(new XoopsFormText('', 'define_var['.$domain_out->getVar('dom_id').']', 50, 255,htmlspecialchars($domain_out->getConfValueForOutput())));
- $eletray[$domain_out->getVar('dom_id')]->addElement(new XoopsFormLabel('', "<a href='admin.php?fct=$fct&op=edit&domain_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._EDIT."</a> <a href='admin.php?fct=$fct&op=delete&domain_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._DELETE."</a>"));
+ $eletray[$domain_out->getVar('dom_id')]->addElement(new XoopsFormLabel('', "<a href='admin.php?fct=$fct&op=edit&define_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._EDIT."</a> <a href='admin.php?fct=$fct&op=delete&define_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._DELETE."</a>"));
$def_form->addElement($eletray[$domain_out->getVar('dom_id')]);
}
}
@@ -176,22 +181,77 @@
exit;
}
+ if ($op == 'delete')
+ {
+ $define = $domain_handler->getDomain($define_id);
+ $define_name = $domain_handler->getDomain($define->getVar('dom_pid'));
+
+ if (!empty($use_mysession) && $xoopsConfig['use_mysession'] == 0 && $session_name != '') {
+ setcookie($session_name, session_id(), time()+(60*intval($session_expire)), '/', '', 0);
+ }
+ $delete_def_a = $domain_handler->deleteDomain($define);
+ $delete_def_b = $domain_handler->deleteDomain($define_name);
+
+ // Clean cached files, may take long time
+ // User reigister_shutdown_function to keep running after connection closes so that cleaning cached files can be finished
+ // Cache management should be performed on a separate page
+ register_shutdown_function( array( &$xoopsTpl, 'clear_all_cache' ) );
+
+ if ($lang_updated) {
+ // Flush cache files for cpanel GUIs
+ xoops_load("cpanel", "system");
+ XoopsSystemCpanel::flush();
+ }
+
+ if ($delete_def_a && $delete_def_b)
+ redirect_header("admin.php?fct=definesadmin&domain=".urlencode($domain), 2, _MD_AM_DBUPDATED);
+ else
+ redirect_header("admin.php?fct=definesadmin&domain=".urlencode($domain), 2, _MD_AM_DBFAILED);
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit;
+ }
+
+ if ($op == 'edit')
+ {
+ $define = $domain_handler->getDomain($define_id);
+ $define_name = $domain_handler->getDomain($define->getVar('dom_pid'));
+
+ if ($_GET['op']==$op)
+ echo '<a href="'.XOOPS_URL.'/modules/multisite/admin.php?op=list&fct='.$fct.'&domain='.urlencode($domain).'">'. _MD_AM_DEFLIST .'</a> <span style="font-weight:bold;">»»</span> '.$module->name().' »» '.$obj_domain->getVar('dom_value').'<br /><br />';
+ $nform = new XoopsThemeForm(_AM_SELECT_DEFINEEDIT, 'newform', 'admin.php?fct=definesadmin', 'post', true);
+ $nform->setExtra('enctype="multipart/form-data"');
+ $eletray = new XoopsFormElementTray(_AM_SELECT_DEFINEEDIT, " ");
+ $eletray->addElement(new XoopsFormText(_AM_SELECT_DEFINENAME, 'define_name['.$define_id.']', 50, 255,$define_name->getConfValueForOutput()));
+ $eletray->addElement(new XoopsFormText(_AM_SELECT_DEFINEVALUE, 'define_var['.$define_id.']', 50, 255,$define->getConfValueForOutput()));
+ $nform->addElement(new XoopsFormHidden('domain', urlencode($domain)));
+ $nform->addElement(new XoopsFormHidden('fct', $fct));
+ $nform->addElement($eletray);
+ $nform->addElement(new XoopsFormHidden('op', 'save'));
+ $nform->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
+ $nform->display();
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit;
+ }
+
+
+
if ($op == 'save') {
$domain_handler =& xoops_getmodulehandler('domain','multisite');
if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header("admin.php?fct=preferences&domain=".urlencode($domain), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ redirect_header("admin.php?fct=definesadmin&domain=".urlencode($domain), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
}
if (!empty($use_mysession) && $xoopsConfig['use_mysession'] == 0 && $session_name != '') {
- setcookie($session_name, session_id(), time()+(60*intval($session_expire)), '/', '', 0);
+ setcookie($session_name, session_id(), time()+(60*intval($session_expire)), '/', '', 0);
}
if (is_array($define_var))
foreach($define_var as $key => $value)
{
- echo $key;
switch ($key) {
case "'new'":
case "new":
@@ -227,6 +287,12 @@
$define = $domain_handler->getDomain($key);
$define->setVar('dom_value', $value);
$domain_handler->insertDomain($define);
+
+ if (isset($define_name[$key])&&!empty($define_name[$key])) {
+ $defineb = $domain_handler->getDomain($define->getVar('dom_pid'));
+ $defineb->setVar('dom_value', $define_name[$key]);
+ $domain_handler->insertDomain($defineb);
+ }
break;
}
Modified: XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php 2009-05-11 23:27:54 UTC (rev 3231)
+++ XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php 2009-05-12 00:10:51 UTC (rev 3232)
@@ -270,7 +270,7 @@
return false;
}
$sql = sprintf("DELETE FROM %s WHERE dom_id = %u", $this->db->prefix('domain'), $domain->getVar('dom_id'));
- if (!$result = $this->db->query($sql)) {
+ if (!$result = $this->db->queryF($sql)) {
return false;
}
return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wis...@us...> - 2009-05-11 23:28:09
|
Revision: 3231
http://xoops.svn.sourceforge.net/xoops/?rev=3231&view=rev
Author: wishcraft
Date: 2009-05-11 23:27:54 +0000 (Mon, 11 May 2009)
Log Message:
-----------
Multisite version 2.1 (Now with Definer)
Modified Paths:
--------------
XoopsModules/multisite/trunk/modules/multisite/admin/blocksadmin/main.php
XoopsModules/multisite/trunk/modules/multisite/admin/menu.php
XoopsModules/multisite/trunk/modules/multisite/admin/preferences/main.php
XoopsModules/multisite/trunk/modules/multisite/admin/version/main.php
XoopsModules/multisite/trunk/modules/multisite/class/domain.php
XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php
XoopsModules/multisite/trunk/modules/multisite/constants.php
XoopsModules/multisite/trunk/modules/multisite/include/functions.php
XoopsModules/multisite/trunk/modules/multisite/include/install.php
XoopsModules/multisite/trunk/modules/multisite/language/english/admin/preferences.php
XoopsModules/multisite/trunk/modules/multisite/language/english/modinfo.php
XoopsModules/multisite/trunk/modules/multisite/menu.php
XoopsModules/multisite/trunk/modules/multisite/post.load.php
XoopsModules/multisite/trunk/modules/multisite/sql/multisite.sql
XoopsModules/multisite/trunk/modules/multisite/xoops_version.php
Added Paths:
-----------
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/index.html
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php
XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php
XoopsModules/multisite/trunk/modules/multisite/class/formcheckboxdomains.php
XoopsModules/multisite/trunk/modules/multisite/language/english/admin/definesadmin.php
XoopsModules/multisite/trunk/modules/multisite/post.define.load.php
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/blocksadmin/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/blocksadmin/main.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/blocksadmin/main.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -76,7 +76,8 @@
$myts =& MyTextSanitizer::getInstance();
$myblock->setVar('title', $myts->stripSlashesGPC($btitle));
$myblock->setVar('content', $myts->stripSlashesGPC($bcontent));
- $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.$xoopsConfig['sitename'].'</title><link rel="stylesheet" type="text/css" media="all" href="'.xoops_getcss($xoopsConfig['theme_set']).'" /></head><body><table><tr><th>'.$myblock->getVar('title').'</th></tr><tr><td>'.$myblock->getContent('S', $bctype).'</td></tr></table></body></html>';
+ $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /><meta http-equiv="content-language" content="'._LANGCODE.'" /><title>'.$xoopsConfig['sitename'].'</title><link rel="stylesheet" type="text/css" media="all" href="'.xoops_getcss($xoopsConfig['theme_set']).'" /></head><body><table><tr><th>'.$myblock->getVar('title').'</th></tr><tr><td>'.$myblock->getContent('S', $bctype).'</td></tr></table>
+</body></html>';
$block['edit_form'] = false;
$block['template'] = '';
Added: XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/index.html
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/index.html (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/index.html 2009-05-11 23:27:54 UTC (rev 3231)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/main.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -0,0 +1,252 @@
+<?php
+// $Id: main.php 2879 2009-02-27 00:53:34Z wishcraft $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ exit("Access Denied");
+} else {
+
+
+ $op = 'list';
+ if (isset($_REQUEST)) {
+ foreach ( $_REQUEST as $k => $v ) {
+ ${$k} = $v;
+ }
+ }
+ if (isset($_REQUEST['op'])) {
+ $op = trim($_REQUEST['op']);
+ }
+
+ if (isset($_REQUEST['define_var'])) {
+ $define_var = $_REQUEST['define_var'];
+ }
+
+ if (isset($_REQUEST['define_name'])) {
+ $define_name = $_REQUEST['define_name'];
+ }
+ if (isset($_REQUEST['domain'])) {
+ $domain = (string)urldecode(($_REQUEST['domain']));
+ } else {
+ $domain = XOOPS_URL;
+ }
+
+ xoops_cp_header();
+ adminMenu(XOOPS_MULTISITE_DEFINES);
+
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ if (!class_exists('XoopsFormSelectDomains'))
+ include_once XOOPS_ROOT_PATH . '/modules/multisite/class/formselectdomains.php';
+
+ $domain_handler = xoops_getmodulehandler('domain', 'multisite');
+
+ $purl = parse_url($domain);
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_name', 'domain'));
+ $criteria->add(new Criteria('dom_value', $purl['host']));
+
+ if(!$domain_handler->getDomainCount($criteria))
+ {
+ redirect_header('admin.php?fct=domainsadmin', 1);
+ } else {
+ $obj_domain = $domain_handler->getDomains($criteria);
+ if (is_array($obj_domain))
+ $obj_domain = $obj_domain[0];
+ }
+
+ $domaincat_handler = xoops_getmodulehandler('domaincategory', 'multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('domcat_name', 'XOOPS_DEFINE'));
+ if (!$domaincat_handler->getCount($criteria))
+ {
+ $domcat = $domaincat_handler->create();
+ $domcat->setVar('domcat_name', 'XOOPS_DEFINE');
+ $domaincat_handler->insert($domcat);
+ } else {
+ $domcat = $domaincat_handler->getObjects($criteria);
+ if (is_array($domcat))
+ $domcat = $domcat[0];
+ }
+
+ $module_handler = xoops_gethandler('module');
+ $module = $module_handler->getByDirname('multisite');
+
+ if ($op == 'list') {
+
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_name', 'define')) ;
+ $criteria->add(new Criteria('dom_pid', $obj_domain->getVar('dom_id'))) ;
+ $criteria->add(new Criteria('dom_catid', $domcat->getVar('domcat_id'))) ;
+ $criteria->add(new Criteria('dom_modid', $module->mid())) ;
+ $defines = $domain_handler->getDomains($criteria, true);
+
+ $definescount = count($defines);
+
+ echo '<h4>'._MD_AM_SITEDEFS_DOMAIN.'</h4><ul>';
+
+ $sform = new XoopsThemeForm(_AM_SELECT_DOMAIN, array("domain","fct","op"), "admin.php?fct=$fct&op=$op&domain=".urlencode($domain));
+ $sform->setExtra('enctype="multipart/form-data"');
+ $sform->addElement(new XoopsFormSelectDomains(_AM_DOMAINS, "domain", !empty($domain)?urlencode($domain):urlencode(XOOPS_URL), 1, false));
+ $sform->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
+ $sform->display();
+
+
+ include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $def_form = new XoopsThemeForm(_MD_AM_MODDEFINE, 'def_form', 'admin.php?fct=definesadmin', 'post', true);
+ $def_form->addElement(new XoopsFormHidden('domain', urlencode($domain)));
+
+ if ($definescount)
+ foreach ($defines as $key => $define)
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_name', 'define_var')) ;
+ $criteria->add(new Criteria('dom_catid', $domcat->getVar('domcat_id'))) ;
+ $criteria->add(new Criteria('dom_pid', $define->getVar('dom_id'))) ;
+ $criteria->add(new Criteria('dom_modid', $module->mid())) ;
+
+ if(!$domain_handler->getDomainCount($criteria))
+ {
+
+ } else {
+ $domain_out = $domain_handler->getDomains($criteria);
+ if (is_array($domain_out))
+ $domain_out = $domain_out[0];
+
+ $eletray[$domain_out->getVar('dom_id')] = new XoopsFormElementTray(htmlspecialchars($define->getConfValueForOutput()), " ");
+ $eletray[$domain_out->getVar('dom_id')]->addElement(new XoopsFormText('', 'define_var['.$domain_out->getVar('dom_id').']', 50, 255,htmlspecialchars($domain_out->getConfValueForOutput())));
+ $eletray[$domain_out->getVar('dom_id')]->addElement(new XoopsFormLabel('', "<a href='admin.php?fct=$fct&op=edit&domain_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._EDIT."</a> <a href='admin.php?fct=$fct&op=delete&domain_id=".$domain_out->getVar('dom_id')."&domain=".urlencode($domain)."'>"._DELETE."</a>"));
+ $def_form->addElement($eletray[$domain_out->getVar('dom_id')]);
+ }
+ }
+
+ $def_form->addElement(new XoopsFormHidden('op', 'save'));
+ $def_form->addElement(new XoopsFormHidden('fct', $fct));
+ $def_form->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
+ echo '<a href="'.XOOPS_URL.'/modules/multisite/admin.php?op=addnew&fct='.$fct.'&domain='.urlencode($domain).'">'. _MD_AM_DEFADD .'</a> <span style="font-weight:bold;">»»</span> '.$module->name().' »» '.$obj_domain->getVar('dom_value').'<br /><br />';
+ $def_form->display();
+
+ $op = 'addnew';
+ }
+
+
+ if ($op == 'addnew')
+ {
+
+ if ($_GET['op']==$op)
+ echo '<a href="'.XOOPS_URL.'/modules/multisite/admin.php?op=list&fct='.$fct.'&domain='.urlencode($domain).'">'. _MD_AM_DEFLIST .'</a> <span style="font-weight:bold;">»»</span> '.$module->name().' »» '.$obj_domain->getVar('dom_value').'<br /><br />';
+ $nform = new XoopsThemeForm(_AM_SELECT_DEFINENEW, 'newform', 'admin.php?fct=definesadmin', 'post', true);
+ $nform->setExtra('enctype="multipart/form-data"');
+ $eletray = new XoopsFormElementTray(_AM_SELECT_DEFINENEW, " ");
+ $eletray->addElement(new XoopsFormText(_AM_SELECT_DEFINENAME, 'define_name[\'new\']', 50, 255,""));
+ $eletray->addElement(new XoopsFormText(_AM_SELECT_DEFINEVALUE, 'define_var[\'new\']', 50, 255,""));
+ $nform->addElement(new XoopsFormHidden('domain', urlencode($domain)));
+ $nform->addElement(new XoopsFormHidden('fct', $fct));
+ $nform->addElement($eletray);
+ $nform->addElement(new XoopsFormHidden('op', 'save'));
+ $nform->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
+ $nform->display();
+ footer_adminMenu();
+ xoops_cp_footer();
+ exit;
+ }
+
+
+
+ if ($op == 'save') {
+ $domain_handler =& xoops_getmodulehandler('domain','multisite');
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header("admin.php?fct=preferences&domain=".urlencode($domain), 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+
+ if (!empty($use_mysession) && $xoopsConfig['use_mysession'] == 0 && $session_name != '') {
+ setcookie($session_name, session_id(), time()+(60*intval($session_expire)), '/', '', 0);
+ }
+
+ if (is_array($define_var))
+ foreach($define_var as $key => $value)
+ {
+ echo $key;
+ switch ($key) {
+ case "'new'":
+ case "new":
+
+ $define = $domain_handler->createDomain();
+ $define->setVar('dom_pid', $obj_domain->getVar('dom_id'));
+ $define->setVar('dom_modid', $module->mid());
+ $define->setVar('dom_catid', $domcat->getVar('domcat_id'));
+ $define->setVar('dom_name', 'define');
+ $define->setVar('dom_value', $define_name[$key]);
+ $define->setVar('dom_title', '_MD_AM_DEFINES');
+ $define->setVar('dom_desc', '_MD_AM_DEFINESDESC');
+ $define->setVar('dom_formtype', 'textbox');
+ $define->setVar('dom_valuetype', 'text');
+ $define->setVar('dom_order', 1);
+ $domain_handler->insertDomain($define);
+
+ $defineb = $domain_handler->createDomain();
+ $defineb->setVar('dom_pid', $define->getVar('dom_id'));
+ $defineb->setVar('dom_modid', $module->mid());
+ $defineb->setVar('dom_catid', $domcat->getVar('domcat_id'));
+ $defineb->setVar('dom_name', 'define_var');
+ $defineb->setVar('dom_value', $value);
+ $defineb->setVar('dom_title', '_MD_AM_DEFINESVAR');
+ $defineb->setVar('dom_desc', '_MD_AM_DEFINESVARDESC');
+ $defineb->setVar('dom_formtype', 'textbox');
+ $defineb->setVar('dom_valuetype', 'text');
+ $defineb->setVar('dom_order', 1);
+ $domain_handler->insertDomain($defineb);
+
+ break;
+ default:
+ $define = $domain_handler->getDomain($key);
+ $define->setVar('dom_value', $value);
+ $domain_handler->insertDomain($define);
+ break;
+ }
+
+ }
+
+ // Clean cached files, may take long time
+ // User reigister_shutdown_function to keep running after connection closes so that cleaning cached files can be finished
+ // Cache management should be performed on a separate page
+ register_shutdown_function( array( &$xoopsTpl, 'clear_all_cache' ) );
+
+ if ($lang_updated) {
+ // Flush cache files for cpanel GUIs
+ xoops_load("cpanel", "system");
+ XoopsSystemCpanel::flush();
+ }
+
+ redirect_header("admin.php?fct=definesadmin&domain=".urlencode($domain), 2, _MD_AM_DBUPDATED);
+ footer_adminMenu();
+ xoops_cp_footer();
+ }
+
+}
+?>
Added: XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/definesadmin/xoops_version.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -0,0 +1,45 @@
+<?php
+// $Id: xoops_version.php 2 2005-11-02 18:23:29Z skalpa $
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$modversion['name'] = _MD_AM_PREF;
+$modversion['version'] = "";
+$modversion['description'] = "XOOPS Site Preferences";
+$modversion['author'] = "";
+$modversion['credits'] = "The XOOPS Project";
+$modversion['help'] = "preferences.html";
+$modversion['license'] = "GPL see LICENSE";
+$modversion['official'] = 1;
+$modversion['image'] = "pref.gif";
+
+$modversion['hasAdmin'] = 1;
+$modversion['adminpath'] = "admin.php?fct=preferences";
+$modversion['category'] = XOOPS_MULTISITE_PREF;
+?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/menu.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/menu.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/menu.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -39,5 +39,6 @@
$adminmenu[4]['link'] = "admin.php?fct=domainsadmin";
$adminmenu[5]['title'] = _MI_MULTISITE_ADMENU5;
$adminmenu[5]['link'] = "admin.php?fct=policiesadmin";
-
+$adminmenu[6]['title'] = _MI_MULTISITE_ADMENU6;
+$adminmenu[6]['link'] = "admin.php?fct=definesadmin";
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/preferences/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/preferences/main.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/preferences/main.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -32,6 +32,8 @@
if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
exit("Access Denied");
} else {
+
+
$op = 'list';
if (isset($_POST)) {
foreach ( $_POST as $k => $v ) {
@@ -187,6 +189,7 @@
echo '<h4>'._MD_AM_MODULEPREF.'</h4><ul>';
for ($i = 0; $i < $modulecount; $i++) {
switch ($modules[$i]->dirname()) {
+ case "multisite":
case "system":
break;
default:
@@ -275,6 +278,12 @@
$ele = new XoopsFormTextArea($title, $domains[$i]->getVar('dom_name'), $myts->htmlspecialchars($domains[$i]->getConfValueForOutput()), 5, 50);
}
break;
+ case 'domain':
+ $ele = new XoopsFormSelectDomains($title, $domains[$i]->getVar('dom_name'), $domains[$i]->getConfValueForOutput());
+ break;
+ case 'multidomain':
+ $ele = new XoopsFormSelectDomains($title, $domains[$i]->getVar('dom_name'), $domains[$i]->getConfValueForOutput(), 5, true);
+ break;
case 'select':
$ele = new XoopsFormSelect($title, $domains[$i]->getVar('dom_name'), $domains[$i]->getConfValueForOutput());
$options = $domain_handler->getDomainOptions(new Criteria('dom_id', $domains[$i]->getVar('dom_id')));
@@ -433,6 +442,12 @@
$ele->addOption($optval, $optkey);
}
break;
+ case 'domain':
+ $ele = new XoopsFormSelectDomains($title, $domains[$i]->getVar('dom_name'), $domains[$i]->getConfValueForOutput());
+ break;
+ case 'multidomain':
+ $ele = new XoopsFormSelectDomains($title, $domains[$i]->getVar('dom_name'), $domains[$i]->getConfValueForOutput(), 5, true);
+ break;
case 'select_multi':
$ele = new XoopsFormSelect($title, $config[$i]->getVar('dom_name'), $config[$i]->getConfValueForOutput(), 5, true);
$options = $domain_handler->getDomainOptions(new Criteria('dom_id', $config[$i]->getVar('dom_id')));
Modified: XoopsModules/multisite/trunk/modules/multisite/admin/version/main.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/admin/version/main.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/admin/version/main.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -103,5 +103,6 @@
echo "<a href=\"javascript:window.close();\">Close</a>";
echo "<br /><br /><br /><br /><br /><br />";
echo "</td></tr></table></div>";
-echo "</body></html>";
+echo "
+</body></html>";
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/class/domain.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/domain.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/class/domain.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -136,22 +136,19 @@
{
$domain =& $this->_cHandler->get($id);
if ($withoptions == true) {
- $domain->setConfOptions($this->getdomainOptions(new Criteria('dom_id', $id)));
+ $domain->setConfOptions($this->getDomainOptions(new Criteria('dom_id', $id)));
}
return $domain;
}
/**
- * insert a new domain in the database
+ * insert a new domain options in the database
*
* @param object &$domain reference to the {@link MultisiteDomainItem}
*/
- function insertDomain(&$domain)
+
+ function insertDomainOptions($options, &$domain)
{
- if (!$this->_cHandler->insert($domain)) {
- return false;
- }
- $options =& $domain->getConfOptions();
$count = count($options);
$dom_id = $domain->getVar('dom_id');
for ($i = 0; $i < $count; $i++) {
@@ -162,6 +159,20 @@
}
}
}
+ }
+
+ /**
+ * insert a new domain in the database
+ *
+ * @param object &$domain reference to the {@link MultisiteDomainItem}
+ */
+ function insertDomain(&$domain)
+ {
+ if (!$this->_cHandler->insert($domain)) {
+ return false;
+ }
+ $options =& $domain->getConfOptions();
+ @$this->insertDomainOptions($options, $domain);
if (!empty($this->_cacheddomains[$domain->getVar('dom_modid')][$domain->getVar('dom_catid')])) {
unset ($this->_cacheddomains[$domain->getVar('dom_modid')][$domain->getVar('dom_catid')]);
}
@@ -181,7 +192,7 @@
$options =& $domain->getConfOptions();
$count = count($options);
if ($count == 0) {
- $options = $this->getdomainOptions(new Criteria('dom_id', $domain->getVar('dom_id')));
+ $options = $this->getDomainOptions(new Criteria('dom_id', $domain->getVar('dom_id')));
$count = count($options);
}
if (is_array($options) && $count > 0) {
@@ -238,12 +249,27 @@
if (!empty($category)) {
$criteria->add(new Criteria('dom_catid', intval($category)));
}
- $domains = $this->getdomains($criteria, true);
+ $domains = $this->getDomains($criteria, true);
if (is_array($domains)) {
foreach (array_keys($domains) as $i) {
$ret[$domains[$i]->getVar('dom_name')] = $domains[$i]->getConfValueForOutput();
}
- }
+ } else {
+ $config_handler = xoops_gethandler('config');
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('conf_modid', intval($module)));
+ if (! empty($category)) {
+ $criteria->add(new Criteria('conf_catid', intval($category)));
+ }
+ $configs = $config_handler->getConfigs($criteria, true);
+ if (is_array($configs)) {
+ foreach(array_keys($configs) as $i) {
+ $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
+ }
+ }
+ $_cacheddomains[$module][$category] = $ret;
+ return $_cacheddomains[$module][$category];
+ }
$_cacheddomains[$module][$category] = $ret;
return $_cacheddomains[$module][$category];
}
@@ -258,12 +284,164 @@
}
}
- function get_domain_id($domain)
+ function get_domain_id()
{
return $this->_domain_id;
}
+
+ /**
+ * Get converts a XoopsConfigItem to a MultisiteDomainItem
+ *
+ * @param int $category ID of a category
+ * @param int $module ID of a module
+ *
+ * @return array array of {@link MultisiteDomain}s
+ */
+
+ function getConfigItem($config, $withoptions = false, $
+ {
+ global $xoopsDB;
+
+ $confcat_handler =& xoops_gethandler('configcategory');
+ $confcat =& $confcat_handler->get($config->getVar('conf_catid'));
+ if (is_object($confcat))
+ {
+ $domcat_handler =& xoops_getmodulehandler('domaincategory','multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('domcat_name', $confcat->getVar('confcat_name')));
+ $domcat = $domcat_handler->getObjects($criteria);
+ }
+
+ if (is_object($domcat[0]))
+ {
+ $domain_handler =& xoops_getmodulehandler('domain','multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_pid', $this->_domain_id));
+ $criteria->add(new Criteria('dom_modid', $config->getVar('conf_modid')));
+ $criteria->add(new Criteria('dom_name', $config->getVar('conf_name')));
+ $criteria->add(new Criteria('dom_catid', $domcat[0]->getVar('domcat_id')));
+ if ($domain_handler->getDomainCount($criteria)>0) {
+ $domain_obj =$domain_handler->getDomain($criteria);
+ if ($withoptions == true) {
+ $domain_obj->setConfOptions($this->getDomainOptions(new Criteria('dom_id', $domain_obj->getVar('dom_id'))));
+ }
+ if ($
+ $domain_obj->setVar('dom_value', $config->getVar('conf_value'));
+
+ $newconfig = new XoopsConfigItem();
+ $newconfig->setVar('conf_id', $config->getVar('conf_id'));
+ $newconfig->setVar('conf_modid', $domain_obj->getVar('dom_modid'));
+ $newconfig->setVar('conf_catid', $domain_obj->getVar('dom_catid'));
+ $newconfig->setVar('conf_name', $domain_obj->getVar('dom_name'));
+ $newconfig->setVar('conf_title', $domain_obj->getVar('dom_title'));
+ $newconfig->setVar('conf_value', $domain_obj->getVar('dom_value'));
+ $newconfig->setVar('conf_desc', $domain_obj->getVar('dom_desc'));
+ $newconfig->setVar('conf_formtype', $domain_obj->getVar('dom_formtype'));
+ $newconfig->setVar('conf_valuetype', $domain_obj->getVar('dom_valuetype'));
+ $newconfig->setVar('conf_order', $domain_obj->getVar('dom_order'));
+ if ($withoptions == true) {
+ $configOptionHandler = new XoopsConfigOptionHandler($xoopsDB);
+ $config->setConfOptions($configOptionHandler->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id'))));
+ }
+ return $newconfig;
+ } else {
+ if ($withoptions == true) {
+ $configOptionHandler = new XoopsConfigOptionHandler($xoopsDB);
+ $config->setConfOptions($configOptionHandler->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id'))));
+ }
+ return $config;
+ }
+ } else {
+ if ($withoptions == true) {
+ $configOptionHandler = new XoopsConfigOptionHandler($xoopsDB);
+ $config->setConfOptions($configOptionHandler->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id'))));
+ }
+ return $config;
+ }
+ }
+
+
/**
+ * Get converts a XoopsConfigItem to a MultisiteDomainItem
+ *
+ * @param int $category ID of a category
+ * @param int $module ID of a module
+ *
+ * @return array array of {@link MultisiteDomain}s
+ */
+
+ function convertConfigItem($config, $withoptions = false, $
+ {
+ global $xoopsDB;
+ $confcat_handler =& xoops_gethandler('configcategory');
+ $confcat =& $confcat_handler->get($config->getVar('conf_catid'));
+
+ if (is_object($confcat))
+ {
+ $domcat_handler =& xoops_getmodulehandler('domaincategory','multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('domcat_name', $confcat->getVar('confcat_name')));
+ $domcat = $domcat_handler->getObjects($criteria);
+ }
+
+ if (is_object($domcat[0]))
+ {
+ $domain_handler =& xoops_getmodulehandler('domain','multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_pid', $this->_domain_id));
+ $criteria->add(new Criteria('dom_modid', $config->getVar('conf_modid')));
+ $criteria->add(new Criteria('dom_name', $config->getVar('conf_name')));
+ $criteria->add(new Criteria('dom_catid', $domcat[0]->getVar('domcat_id')));
+ if ($domain_handler->getDomainCount($criteria)>0) {
+ $domain_obj =$domain_handler->getDomain($criteria);
+ if ($withoptions == true) {
+ $domain_obj[0]->setConfOptions($this->getDomainOptions(new Criteria('conf_id', $domain_obj[0]->getVar('dom_id'))));
+ }
+ if ($
+ $domain_obj[0]->setVar('dom_value', $config->getVar('conf_value'));
+ return $domain_obj[0];
+ } else {
+ $domain = new MultisiteDomainitem();
+ $domain->setVar('dom_modid', $config->getVar('conf_modid'));
+ $domain->setVar('dom_catid', $config->getVar('conf_catid'));
+ $domain->setVar('dom_name', $config->getVar('conf_name'));
+ $domain->setVar('dom_title', $config->getVar('conf_title'));
+ $domain->setVar('dom_value', $config->getVar('conf_value'));
+ $domain->setVar('dom_desc', $config->getVar('conf_desc'));
+ $domain->setVar('dom_formtype', $config->getVar('conf_formtype'));
+ $domain->setVar('dom_valuetype', $config->getVar('conf_valuetype'));
+ $domain->setVar('dom_order', $config->getVar('conf_order'));
+ if ($withoptions == true) {
+ $configOptionHandler = new XoopsConfigOptionHandler($xoopsDB);
+ $domain->setConfOptions($configOptionHandler->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id'))));
+ }
+ $domain->setVar('dom_pid', $this->_domain_id);
+
+ return $domain;
+ }
+ } else {
+ $domain = new MultisiteDomainitem();
+ $domain->setVar('dom_modid', $config->getVar('conf_modid'));
+ $domain->setVar('dom_catid', $config->getVar('conf_catid'));
+ $domain->setVar('dom_name', $config->getVar('conf_name'));
+ $domain->setVar('dom_title', $config->getVar('conf_title'));
+ $domain->setVar('dom_value', $config->getVar('conf_value'));
+ $domain->setVar('dom_desc', $config->getVar('conf_desc'));
+ $domain->setVar('dom_formtype', $config->getVar('conf_formtype'));
+ $domain->setVar('dom_valuetype', $config->getVar('conf_valuetype'));
+ $domain->setVar('dom_order', $config->getVar('conf_order'));
+ if ($withoptions == true) {
+ $configOptionHandler = new XoopsConfigOptionHandler($xoopsDB);
+ $domain->setConfOptions($configOptionHandler->getConfigOptions(new Criteria('conf_id', $config->getVar('conf_id'))));
+ }
+ $domain->setVar('dom_pid', $this->_domain_id);
+
+ return $domain;
+ }
+ }
+
+ /**
* Get domains from a certain category
*
* @param int $category ID of a category
@@ -271,7 +449,7 @@
*
* @return array array of {@link MultisiteDomain}s
*/
- function &getConfigByDomainCat($category, $preset, $module=0)
+ function &getConfigByDomainCat($category, $module=0)
{
@@ -293,7 +471,7 @@
$criteria->add(new Criteria('dom_pid', $this->_domain_id));
$criteria->add(new Criteria('dom_modid', $module));
$criteria->add(new Criteria('dom_catid', $domcat[0]->getVar('domcat_id')));
- if ($domain_handler->getDomainCount($criteria)>0)
+ if ($domain_handler->getDomainCount($criteria)>0) {
if (!empty($domcat[0])&&is_object($domcat[0]))
{
$category = intval($domcat[0]->getVar('domcat_id'));
@@ -308,7 +486,7 @@
if (!empty($category)) {
$criteria->add(new Criteria('dom_catid', intval($category)));
}
- $domains = $this->getdomains($criteria, true);
+ $domains = $this->getDomains($criteria, true);
if (is_array($domains)) {
foreach (array_keys($domains) as $i) {
$ret[$domains[$i]->getVar('dom_name')] = $domains[$i]->getConfValueForOutput();
@@ -318,10 +496,39 @@
return $_cacheddomains[$module][$category];
}
} else {
- return $preset;
+ $config_handler = xoops_gethandler('config');
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('conf_modid', intval($module)));
+ if (! empty($category)) {
+ $criteria->add(new Criteria('conf_catid', intval($category)));
+ }
+ $configs = $config_handler->getConfigs($criteria, true);
+ if (is_array($configs)) {
+ foreach(array_keys($configs) as $i) {
+ $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
+ }
+ }
+ $_cacheddomains[$module][$category] = $ret;
+ return $_cacheddomains[$module][$category];
+
}
- else
- return $preset;
+ } else {
+ $config_handler = xoops_gethandler('config');
+ $ret = array();
+ $criteria = new CriteriaCompo(new Criteria('conf_modid', intval($module)));
+ if (! empty($category)) {
+ $criteria->add(new Criteria('conf_catid', intval($category)));
+ }
+ $configs = $config_handler->getConfigs($criteria, true);
+ if (is_array($configs)) {
+ foreach(array_keys($configs) as $i) {
+ $ret[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
+ }
+ }
+ $_cacheddomains[$module][$category] = $ret;
+ return $_cacheddomains[$module][$category];
+
+ }
}
}
/**
Modified: XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/class/domainitem.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -75,7 +75,7 @@
$this->initVar('dom_catid', XOBJ_DTYPE_INT, null, false);
$this->initVar('dom_name', XOBJ_DTYPE_OTHER);
$this->initVar('dom_title', XOBJ_DTYPE_TXTBOX);
- $this->initVar('dom_value', XOBJ_DTYPE_TXTAREA);
+ $this->initVar('dom_value', XOBJ_DTYPE_OTHER);
$this->initVar('dom_desc', XOBJ_DTYPE_OTHER);
$this->initVar('dom_formtype', XOBJ_DTYPE_OTHER);
$this->initVar('dom_valuetype', XOBJ_DTYPE_OTHER);
Added: XoopsModules/multisite/trunk/modules/multisite/class/formcheckboxdomains.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/class/formcheckboxdomains.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/class/formcheckboxdomains.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -0,0 +1,323 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Xoops Form Class Elements
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package kernel
+ * @subpackage Xoop Forms class
+ * @since 2.0.0
+ * @author Kazumi Ono <on...@xo...>
+ * @author Skalpa Keo <sk...@xo...>
+ * @author Taiwen Jiang <ph...@us...>
+ * @author John Neill <cat...@xo...>
+ * @version $Id: formcheckbox.php 3174 2009-04-18 15:00:48Z catzwolf $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+if (! class_exists('XoopsFormElement')) {
+ xoops_load('xoopsformelement');
+}
+
+/**
+ * XoopsFormCheckBoxDomains
+ *
+ * @author Kazumi Ono <on...@xo...>
+ * @author Skalpa Keo <sk...@xo...>
+ * @author Taiwen Jiang <ph...@us...>
+ * @author John Neill <cat...@xo...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ * @package kernel
+ * @subpackage form
+ * @access public
+ */
+class XoopsFormCheckBoxDomains extends XoopsFormElement
+{
+ /**
+ * Availlable options
+ *
+ * @var array
+ * @access private
+ */
+ var $_options = array();
+
+ /**
+ * pre-selected values in array
+ *
+ * @var array
+ * @access private
+ */
+ var $_value = array();
+
+ /**
+ * HTML to seperate the elements
+ *
+ * @var string
+ * @access private
+ */
+ var $_delimeter;
+
+ /**
+ * Column number for rendering
+ *
+ * @var int
+ * @access public
+ */
+ var $columns;
+
+ /**
+ * Constructor
+ *
+ * @param string $caption
+ * @param string $name
+ * @param mixed $value Either one value as a string or an array of them.
+ */
+ function XoopsFormCheckBoxDomains($caption, $name, $value = null, $delimeter = ' ', $alldomains = true, $justaddr = false, $https = false)
+ {
+ $this->setCaption($caption);
+ $this->setName($name);
+ $this->addOptionDomains($alldomains, $justaddr, $https);
+ if (isset($value)) {
+ $this->setValue($value);
+ }
+ $this->_delimeter = $delimeter;
+ $this->setFormType('checkbox');
+ }
+
+ /**
+ * Add multiple domains
+ *
+ * @param array $options Associative array of value->name pairs
+ */
+ function addOptionDomains($alldomains, $justaddr, $https)
+ {
+
+ $module_handler =& xoops_getmodulehandler('module','multisite');
+ $domains_handler =& xoops_getmodulehandler('domain', 'multisite');
+
+ $critera_z = new CriteriaCompo(new Criteria('dom_catid', XOOPS_DOMAIN));
+ $critera_z->add(new Criteria('dom_name', 'domain')) ;
+ $critera_z->setSort('dom_name');
+ $domains = $domains_handler->getDomains($critera_z);
+ $sprint = str_replace($_SERVER['HTTP_HOST'], '%s', strtolower(XOOPS_URL));
+ $sprint = str_replace(array('http://','https://','HTTP://','HTTPS://'), '%s', $sprint);
+ if($alldomains==true)
+ $domain_list['all'] = _ALL_DOMAINS;
+
+ foreach($domains as $domain)
+ {
+ $critera_y = new CriteriaCompo();
+ $critera_y->add(new Criteria('dom_pid', $domain->getVar('dom_id')));
+ $critera_y->add(new Criteria('dom_name', 'sitename')) ;
+ $critera_y->setSort('dom_name');
+ $domains_y = $domains_handler->getDomains($critera_y);
+
+ if ($justaddr==false)
+ {
+ if (!$domains_handler->getDomainCount($critera_y)){
+ $domain_list[urlencode(sprintf($sprint ,"http://",$domain->getVar('dom_value')))] = sprintf($sprint ,"http://",$domain->getVar('dom_value'));
+ if ($https==true)
+ $domain_list[urlencode(sprintf($sprint ,"https://",$domain->getVar('dom_value')))] = sprintf($sprint ,"https://",$domain->getVar('dom_value'));
+ } else {
+ $domain_list[urlencode(sprintf($sprint ,"http://",$domain->getVar('dom_value')))] = "".$domains_y[0]->getVar('dom_value');
+ if ($https==true)
+ $domain_list[urlencode(sprintf($sprint ,"https://",$domain->getVar('dom_value')))] = "(secure) - ".$domains_y[0]->getVar('dom_value');
+ }
+ } else {
+ if (!$domains_handler->getDomainCount($critera_y)){
+ $domain_list[$domain->getVar('dom_value')] = sprintf($sprint ,"http://",$domain->getVar('dom_value'));
+ if ($https==true)
+ $domain_list[$domain->getVar('dom_value')] = sprintf($sprint ,"https://",$domain->getVar('dom_value'));
+ } else {
+ $domain_list[$domain->getVar('dom_value')] = "".$domains_y[0]->getVar('dom_value');
+ if ($https==true)
+ $domain_list[$domain->getVar('dom_value')] = "(secure) - ".$domains_y[0]->getVar('dom_value');
+ }
+ }
+ }
+
+ if ( is_array($domain_list) ) {
+ foreach ( $domain_list as $k=>$v ) {
+ $this->addOption($k, $v);
+ }
+ }
+ }
+ /**
+ * Get the "value"
+ *
+ * @param bool $encode To sanitizer the text?
+ * @return array
+ */
+ function getValue($encode = false)
+ {
+ if (! $encode) {
+ return $this->_value;
+ }
+ $value = array();
+ foreach($this->_value as $val) {
+ $value[] = $val ? htmlspecialchars($val, ENT_QUOTES) : $val;
+ }
+ return $value;
+ }
+
+ /**
+ * Set the "value"
+ *
+ * @param array $
+ */
+ function setValue($value)
+ {
+ $this->_value = array();
+ if (is_array($value)) {
+ foreach($value as $v) {
+ $this->_value[] = $v;
+ }
+ } else {
+ $this->_value[] = $value;
+ }
+ }
+
+ /**
+ * Add an option
+ *
+ * @param string $value
+ * @param string $name
+ */
+ function addOption($value, $name = '')
+ {
+ if ($name != '') {
+ $this->_options[$value] = $name;
+ } else {
+ $this->_options[$value] = $value;
+ }
+ }
+
+ /**
+ * Add multiple Options at once
+ *
+ * @param array $options Associative array of value->name pairs
+ */
+ function addOptionArray($options)
+ {
+ if (is_array($options)) {
+ foreach($options as $k => $v) {
+ $this->addOption($k, $v);
+ }
+ }
+ }
+
+ /**
+ * Get an array with all the options
+ *
+ * @param int $encode To sanitizer the text? potential values: 0 - skip; 1 - only for value; 2 - for both value and name
+ * @return array Associative array of value->name pairs
+ */
+ function getOptions($encode = false)
+ {
+ if (! $encode) {
+ return $this->_options;
+ }
+ $value = array();
+ foreach($this->_options as $val => $name) {
+ $value[$encode ? htmlspecialchars($val, ENT_QUOTES) : $val] = ($encode > 1) ? htmlspecialchars($name, ENT_QUOTES) : $name;
+ }
+ return $value;
+ }
+
+ /**
+ * Get the delimiter of this group
+ *
+ * @param bool $encode To sanitizer the text?
+ * @return string The delimiter
+ */
+ function getDelimeter($encode = false)
+ {
+ return $encode ? htmlspecialchars(str_replace(' ', ' ', $this->_delimeter)) : $this->_delimeter;
+ }
+
+ /**
+ * prepare HTML for output
+ *
+ * @return string
+ */
+ function render()
+ {
+ $ele_name = $this->getName();
+ $ele_id = $ele_name;
+ $ele_value = $this->getValue();
+ $ele_options = $this->getOptions();
+ $ele_extra = $this->getExtra();
+ $ele_delimeter = empty($this->columns) ? $this->getDelimeter() : '';
+
+ if (count($ele_options) > 1 && substr($ele_name, - 2, 2) != '[]') {
+ $ele_name = $ele_name . '[]';
+ $this->setName($ele_name);
+ }
+ $ret = '';
+ if (! empty($this->columns)) {
+ $ret .= '<table><tr>';
+ }
+ $i = 0;
+ $id_ele = 0;
+ foreach($ele_options as $value => $name) {
+ $id_ele ++;
+ if (! empty($this->columns)) {
+ if ($i % $this->columns == 0) {
+ $ret .= '<tr>';
+ }
+ $ret .= '<td>';
+ }
+ $ret .= "<input type='checkbox' name='{$ele_name}' id='{$ele_id}{$id_ele}' value='" . htmlspecialchars($value, ENT_QUOTES) . "'";
+ if (count($ele_value) > 0 && in_array($value, $ele_value)) {
+ $ret .= ' checked="checked"';
+ }
+ $ret .= $ele_extra . ' />' . $name . $ele_delimeter . NWLINE;
+ if (! empty($this->columns)) {
+ $ret .= '</td>';
+ if (++ $i % $this->columns == 0) {
+ $ret .= '</tr>';
+ }
+ }
+ }
+ if (! empty($this->columns)) {
+ if ($span = $i % $this->columns) {
+ $ret .= '<td colspan="' . ($this->columns - $span) . '"></td></tr>';
+ }
+ $ret .= '</table>';
+ }
+ return $ret;
+ }
+
+ /**
+ * Render custom javascript validation code
+ *
+ * @seealso XoopsForm::renderValidationJS
+ */
+ function renderValidationJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customValidationCode)) {
+ return implode(NWLINE, $this->customValidationCode);
+ // generate validation code if required
+ } elseif ($this->isRequired()) {
+ $eltname = $this->getName();
+ $eltcaption = $this->getCaption();
+ $eltmsg = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
+ $eltmsg = str_replace('"', '\"', stripslashes($eltmsg));
+ return NWLINE . "var hasChecked = false; var checkBox = myform.elements['{$eltname}'];" . "for ( var i = 0; i < checkBox.length; i++ ) { if (checkBox[i].checked == true) { hasChecked = true; break; } }" . "if (!hasChecked) { window.alert(\"{$eltmsg}\"); checkBox[0].focus(); return false; }";
+ }
+ return '';
+ }
+}
+
+?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/constants.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/constants.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/constants.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -31,4 +31,5 @@
define('XOOPS_MULTISITE_MODULE', 3);
define('XOOPS_MULTISITE_DOMAINS', 4);
define('XOOPS_MULTISITE_POLICIES', 5);
+define('XOOPS_MULTISITE_DEFINES', 6);
?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/include/functions.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/include/functions.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/include/functions.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -43,7 +43,7 @@
echo "<table width=\"100%\" border='0'><tr><td>";
echo "<div id='buttontop'>";
echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>";
- echo "<td style=\"width: 45%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "\">" . _PREFERENCES . "</a></td>";
+ echo "<td style=\"width: 45%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><!--<a class=\"nobutton\" href=\"../../modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "\">" . _PREFERENCES . "</a>--></td>";
echo "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $myts->displayTarea($xoopsModule->name()) ."</td>";
echo "</tr></table>";
echo "</div>";
Modified: XoopsModules/multisite/trunk/modules/multisite/include/install.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/include/install.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/include/install.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -31,16 +31,96 @@
function xoops_module_pre_install_multisite(&$module) {
- global $xoopsDB;
+ global $xoopsDB, $module_handler;
+
+ $module_handler = &xoops_gethandler( 'module' );
+ $module_handler->insert($module);
+
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('config')." ADD COLUMN (`conf_did` INT(10) NOT NULL DEFAULT '0')");
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('newblocks')." ADD COLUMN(domains MEDIUMTEXT)");
- $result = $xoopsDB->queryF("UPDATE TABLE ".$xoopsDB->prefix('newblocks')." SET domains='|all'");
+ $result = $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix('newblocks')." SET domains='|all'");
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('modules')." ADD COLUMN (`hasrss` TINYINT(1) NOT NULL DEFAULT '0')");
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('modules')." ADD COLUMN (`hasatom` TINYINT(1) NOT NULL DEFAULT '0')");
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('modules')." ADD COLUMN (`hassitemap` TINYINT(1) NOT NULL DEFAULT '0')");
$result = $xoopsDB->queryF("ALTER TABLE ".$xoopsDB->prefix('modules')." ADD COLUMN(domains MEDIUMTEXT)");
- $result = $xoopsDB->queryF("UPDATE TABLE ".$xoopsDB->prefix('modules')." SET domains='|all'");
+ $result = $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix('modules')." SET domains='|all'");
+ $result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix('domain')." (`dom_id` INT(10) unsigned NOT NULL AUTO_INCREMENT, `dom_pid` INT(10) unsigned NOT NULL DEFAULT '0', `dom_modid` smallint(5) unsigned NOT NULL DEFAULT '0', `dom_catid` smallint(5) unsigned NOT NULL DEFAULT '0', `dom_name` varchar(25) NOT NULL DEFAULT '', `dom_title` varchar(255) NOT NULL DEFAULT '', `dom_value` text, `dom_desc` varchar(255) NOT NULL DEFAULT '', `dom_formtype` varchar(15) NOT NULL DEFAULT '', `dom_valuetype` varchar(10) NOT NULL DEFAULT '', `dom_order` smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`dom_id`), KEY `dom_mod_cat_id` (`dom_modid`,`dom_catid`)) ENGINE=MyISAM");
+ $result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix('domainoption')." (`domop_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `domop_name` varchar(255) NOT NULL DEFAULT '', `domop_value` varchar(255) NOT NULL DEFAULT '', `dom_id` smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`domop_id`), KEY `dom_id` (`dom_id`)) ENGINE=MyISAM");
+$result = $xoopsDB->queryF("CREATE TABLE ".$xoopsDB->prefix('domaincategory')." (`domcat_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `domcat_name` varchar(255) NOT NULL DEFAULT '', `domcat_order` smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`domcat_id`)) ENGINE=MyISAM");
+
+ $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('domain')." (`dom_modid`, `dom_catid`, `dom_name`, `dom_value`, `dom_title`, `dom_desc`, `dom_formtype`, `dom_valuetype`) VALUE('".$module->getVar('mid')."', '1', 'domain', '".strtolower($_SERVER['HTTP_HOST'])."', '_MD_AM_DOMAIN', '_MD_AM_DOMAINDESC', 'textbox', 'text')");
+
+ $result = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix('domaincategory')." values('1','XOOPS_DOMAIN','0')");
+
+ $confcat_handler =& xoops_gethandler('configcategory');
+ $confcat =& $confcat_handler->get(1);
+
+ $domain_handler =& xoops_getmodulehandler('domain','multisite');
+ $domcat_handler =& xoops_getmodulehandler('domaincategory','multisite');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('domcat_name', $confcat->getVar('confcat_name')));
+ $domcat = $domcat_handler->getObjects($criteria);
+ if($domcat_handler->getCount($criteria)!='0') {
+ $domcat = $domcat[0];
+ } else {
+ $domcat = $domcat_handler->create();
+ $domcat->setVar('domcat_name', $confcat->getVar('confcat_name'));
+ $domcat->setVar('domcat_order', $confcat->getVar('confcat_order'));
+ @$domcat_handler->insert($domcat);
+ }
+
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('dom_pid', 1));
+ $criteria->add(new Criteria('dom_catid', $domcat->getVar('domcat_id')));
+ if ($domain_handler->getDomainCount($criteria)==0)
+ {
+
+ $config_handler =& xoops_gethandler('config');
+ $confopt_handler =& xoops_gethandler('configoption');
+
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('conf_modid', 0));
+ $criteria->add(new Criteria('conf_catid', $confcat->getVar('confcat_id')));
+ $configs = $config_handler->getConfigs($criteria);
+ $domain_handler =& xoops_getmodulehandler('domainitem','multisite');
+ $domainoption_handler =& xoops_getmodulehandler('domainoption','multisite');
+ $dom_catid = $domcat->getVar('domcat_id');
+ $dom_pid = 1;
+ foreach ($configs as $config) {
+ $domconf = $domain_handler->create();
+ $domconf->setVar('dom_pid', $dom_pid);
+ $domconf->setVar('dom_modid', $config->getVar('conf_modid'));
+ $domconf->setVar('dom_catid', $dom_catid);
+ $domconf->setVar('dom_name', $config->getVar('conf_name'));
+ $domconf->setVar('dom_title', $config->getVar('conf_title'));
+ $domconf->setVar('dom_value', $config->getConfValueForOutput());
+ $domconf->setVar('dom_desc', $config->getVar('conf_desc'));
+ $domconf->setVar('dom_formtype', $config->getVar('conf_formtype'));
+ $domconf->setVar('dom_valuetype', $config->getVar('conf_valuetype'));
+ $domconf->setVar('dom_order', $config->getVar('conf_order'));
+
+ if(!$domain_handler->insert($domconf))
+{
+ } else {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('conf_id', $config->getVar('conf_id')));
+ $confopts = $confopt_handler->getObjects($criteria);
+ foreach ($confopts as $option)
+ {
+ $doption = $domainoption_handler->create();
+ $doption->setVar('domop_name', $option->getVar('confop_name'));
+ $doption->setVar('domop_value', $option->getVar('confop_value'));
+ $doption->setVar('dom_id', $domconf->getVar('dom_id'));
+ @$domainoption_handler->insert($doption);
+ }
+ }
+
+ }
+
+
+ }
+
return true;
}
Added: XoopsModules/multisite/trunk/modules/multisite/language/english/admin/definesadmin.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/language/english/admin/definesadmin.php (rev 0)
+++ XoopsModules/multisite/trunk/modules/multisite/language/english/admin/definesadmin.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -0,0 +1,13 @@
+<?php
+
+
+ define( '_MD_AM_SITEDEFS_DOMAIN', '<font color="#F3A323">define</font>\'s that are active on this selected url.');
+ define( '_AM_SELECT_DOMAIN', 'Select the Domain to edit define');
+ define( '_AM_SELECT_DEFINENAME', 'Name:');
+ define( '_AM_SELECT_DEFINEVALUE', 'Value:');
+ define ('_AM_SELECT_DEFINENEW', 'New Define');
+ define( '_MD_AM_MODDEFINE', 'Defines on this domain');
+ define( '_MD_AM_DEFADD', 'Add a Define on this domain');
+ define( '_MD_AM_DEFLIST', 'Goto Defines List');
+ define( '_AM_DOMAINS', 'Select Domain');
+?>
\ No newline at end of file
Modified: XoopsModules/multisite/trunk/modules/multisite/language/english/admin/preferences.php
===================================================================
--- XoopsModules/multisite/trunk/modules/multisite/language/english/admin/preferences.php 2009-05-11 00:01:10 UTC (rev 3230)
+++ XoopsModules/multisite/trunk/modules/multisite/language/english/admin/preferences.php 2009-05-11 23:27:54 UTC (rev 3231)
@@ -191,11 +191,49 @@
define("_MD_AM_THEMEOK", "Selectable themes");
define("_MD_AM_THEMEOKDSC", "Choose themes that users can select as the default theme");
+// SOAP Clauses
+define("_MD_AM_SOAP_CLIENT", "SOAP - SOAP API");
+define("_MD_AM_SOAP_CLIENTDESC","This is the address of the soap server.");
+define("_MD_AM_SOAP_PROVISION", "SOAP - Provision");
+define("_MD_AM_SOAP_PROVISIONDESC","If you want the new user provisioned, say 'yes'");
+define("_MD_AM_SOAP_PROVISIONGROUP", "SOAP - Rank to Provision");
+define("_MD_AM_SOAP_PROVISIONGROUPDESC","This is the ranks a new user from the soap server is put in.");
+define("_MD_AM_SOAP_WSDL", "SOAP - SOAP WSDL");
+define("_MD_AM_SOAP_WSDLDESC","If you need a wdsl soap service enable this option.");
+define("_MD_AM_SOAP_USERNAME", "SOAP - SOAP Username");
+define("_MD_AM_SOAP_USERNAMEDESC","This is the username of your account on the soap server.");
+define("_MD_AM_SOAP_PASSWORD", "SOAP - SOAP Password");
+define("_MD_AM_SOAP_PASSWORDDESC","If you need a password with the soap service put it in here.");
+define("_MD_AM_SOAP_KEEPCLIENT", "SOAP - Client Alive");
+define("_MD_AM_SOAP_KEEPCLIENTDESC","Keep The Soap Client Alive.");
+define("_MD_AM_SOAP_FILTERPERSON", "SOAP - Special Accounts");
+define("_MD_AM_SOAP_FILTERPERSONDESC","Special Accounts that use Xoops Authentication.");
+define("_MD_AM_SOAP_CLIENTPROXYHOST", "SOAP - Proxy Hostname");
+define("_MD_AM_SOAP_CLIENTPROXYHOSTDESC","SOAP Servers Proxy Server.");
+define("_MD_AM_SOAP_CLIENTPROXYPORT", "SOAP - Proxy port");
+define("_MD_AM_SOAP_CLIENTPROXYPORTDESC","SOAP Servers Proxy Server Port Number <br>ie: 0 - 65535");
+define("_MD_AM_SOAP_CLIENTPROXYUSERNAME", "SOAP - Proxy Username");
+define("_MD_AM_SOAP_CLIENTPROXYUSERNAMEDESC","SOAP Servers Proxy Server Username");
+define("_MD_AM_SOAP_CLIENTPROXYPASSWORD", "SOAP - Proxy Password");
+define("_MD_AM_SOAP_CLIENTPROXYPASSWORDDESC","SOAP Servers Proxy Server Password.");
+define("_MD_AM_SOAP_SOAP_TIMEOUT", "SOAP - SOAP Timeout");
+define("_MD_AM_SOAP_SOAP_TIMEOUTDESC","Keep The Soap Query Alive for <strong>xx</strong> seconds.");
+define("_MD_AM_SOAP_SOAP_RESPONSETIMEOUT", "SOAP - SOAP Response Timeout");
+define("_MD_AM_SOAP_SOAP_RESPONSETIMEOUTDESC","Keep The Soap Query Alive for <strong>xx</strong> seconds.");
+define("_MD_AM_SOAP_FIELDMAPPING","Xoops-Auth server fields mapping");
+define("_MD_AM_SOAP_FIELDMAPPINGDESC","Describe here the mapping between the Xoops database field and the LDAP Authentication system field." .
+ "<br><br>Format [Xoops Database field]=[Auth system SOAP attribute]" .
+ "<br>for example : email=mail" .
+ "<br>Separate each with a |" .
+ "<br><br>!! For advanced users !!");
+
+
// Xoops Authentication constants
define("_MD_AM_AUTH_CONFOPTION_XOOPS", "XOOPS Database");
define("_MD_AM_AUTH_CONFOPTION_LDAP", "Standard LDAP Directory");
define("_MD_AM_AUTH_CONFOPTION_AD", "Microsoft Active Directory ©");
+define("_MD_AM_AUTH_CON...
[truncated message content] |