|
From: <be...@us...> - 2014-04-25 11:35:59
|
Revision: 12475
http://sourceforge.net/p/xoops/svn/12475
Author: beckmi
Date: 2014-04-25 11:35:52 +0000 (Fri, 25 Apr 2014)
Log Message:
-----------
XOOPS 2.5.7 Module Pack update (work in progress): Boox
Modified Paths:
--------------
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/about.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_footer.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_header.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/index.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/main.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/menu.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/class/storage.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/docs/changelog.txt
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/include/functions.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/english/admin.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/english/modinfo.php
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/xoops_version.php
Added Paths:
-----------
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/delete.gif
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/edit.gif
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/index.html
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/index.html
Removed Paths:
-------------
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/images/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/english_ISO/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/french/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/french_ISO/
XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/language/portuguesebr_ISO/
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/about.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/about.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/about.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -1,32 +1,32 @@
-<?php
-/**
- * ****************************************************************************
- * boox - MODULE FOR XOOPS
- * Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright Hervé Thouzard (http://www.herve-thouzard.com)
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
- * @package boox
- * @author Hervé Thouzard (http://www.herve-thouzard.com)
- *
- * Version : $Id:
- * ****************************************************************************
- */
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-
-include 'admin_footer.php';
\ No newline at end of file
+<?php
+/**
+ * ****************************************************************************
+ * boox - MODULE FOR XOOPS
+ * Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright Hervé Thouzard (http://www.herve-thouzard.com)
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package boox
+ * @author Hervé Thouzard (http://www.herve-thouzard.com)
+ *
+ * Version : $Id:
+ * ****************************************************************************
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include 'admin_footer.php';
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_footer.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_footer.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_footer.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -20,8 +20,6 @@
* ****************************************************************************
*/
-
-
echo "<div class='adminfooter'>\n"
." <div style='text-align: center;'>\n"
." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
@@ -29,4 +27,4 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_header.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_header.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/admin_header.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -1,48 +1,47 @@
-<?php
-/**
- * ****************************************************************************
- * boox - MODULE FOR XOOPS
- * Copyright (c) Herv� Thouzard (http://www.herve-thouzard.com)
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright Herv� Thouzard (http://www.herve-thouzard.com)
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
- * @package boox
- * @author Herv� Thouzard (http://www.herve-thouzard.com)
- *
- * Version : $Id:
- * ****************************************************************************
- */
-
-$path = dirname(dirname(dirname(dirname(__FILE__))));
-include_once $path . '/mainfile.php';
-include_once $path . '/include/cp_functions.php';
-require_once $path . '/include/cp_header.php';
-
-global $xoopsModule;
-
-$thisModDir = $GLOBALS['xoopsModule']->getVar('dirname');
-
-require_once dirname(dirname(__FILE__)) . '/include/functions.php';
-
-// Load language files
-xoops_loadLanguage('admin', $thisModDir);
-xoops_loadLanguage('modinfo', $thisModDir);
-xoops_loadLanguage('main', $thisModDir);
-
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
-$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
- }else{
- redirect_header("../../../admin.php", 5, _AM_BOOX_MODULEADMIN_MISSING, false);
- }
-
+<?php
+/**
+ * ****************************************************************************
+ * boox - MODULE FOR XOOPS
+ * Copyright (c) Herv� Thouzard (http://www.herve-thouzard.com)
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright Herv� Thouzard (http://www.herve-thouzard.com)
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package boox
+ * @author Herv� Thouzard (http://www.herve-thouzard.com)
+ *
+ * Version : $Id:
+ * ****************************************************************************
+ */
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+include_once $path . '/mainfile.php';
+include_once $path . '/include/cp_functions.php';
+require_once $path . '/include/cp_header.php';
+
+global $xoopsModule;
+
+$thisModDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+require_once dirname(dirname(__FILE__)) . '/include/functions.php';
+
+// Load language files
+xoops_loadLanguage('admin', $thisModDir);
+xoops_loadLanguage('modinfo', $thisModDir);
+xoops_loadLanguage('main', $thisModDir);
+
+$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) {
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+ } else {
+ redirect_header("../../../admin.php", 5, _AM_BOOX_MODULEADMIN_MISSING, false);
+ }
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/index.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/index.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/index.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -1,34 +1,33 @@
-<?php
-/**
- * ****************************************************************************
- * boox - MODULE FOR XOOPS
- * Copyright (c) Herv\xE9 Thouzard (http://www.herve-thouzard.com)
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright Herv\xE9 Thouzard (http://www.herve-thouzard.com)
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
- * @package boox
- * @author Herv\xE9 Thouzard (http://www.herve-thouzard.com)
- *
- * Version : $Id:
- * ****************************************************************************
- */
-
-
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
- $indexAdmin = new ModuleAdmin();
-
- echo $indexAdmin->addNavigation('index.php');
- echo $indexAdmin->renderIndex();
-
-include "admin_footer.php";
\ No newline at end of file
+<?php
+/**
+ * ****************************************************************************
+ * boox - MODULE FOR XOOPS
+ * Copyright (c) Herv\xE9 Thouzard (http://www.herve-thouzard.com)
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright Herv\xE9 Thouzard (http://www.herve-thouzard.com)
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package boox
+ * @author Herv\xE9 Thouzard (http://www.herve-thouzard.com)
+ *
+ * Version : $Id:
+ * ****************************************************************************
+ */
+
+require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+ $indexAdmin = new ModuleAdmin();
+
+ echo $indexAdmin->addNavigation('index.php');
+ echo $indexAdmin->renderIndex();
+
+include 'admin_footer.php';
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/main.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/main.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/main.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -1,175 +1,174 @@
-<?php
-/**
- * ****************************************************************************
- * boox - MODULE FOR XOOPS
- * Copyright (c) Herv� Thouzard (http://www.herve-thouzard.com)
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright Herv� Thouzard (http://www.herve-thouzard.com)
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
- * @package boox
- * @author Herv� Thouzard (http://www.herve-thouzard.com)
- *
- * Version : $Id:
- * ****************************************************************************
- */
-
-require_once '../../../include/cp_header.php';
-require_once XOOPS_ROOT_PATH.'/modules/boox/include/functions.php';
-require_once XOOPS_ROOT_PATH.'/modules/boox/class/storage.php';
-include_once 'admin_header.php';
-
-$indexAdmin = new ModuleAdmin();
-
-// ********************************************************************************************************************
-// **** Main
-// ********************************************************************************************************************
-$op = 'default';
-if(isset($_POST['op'])) {
- $op=$_POST['op'];
-} elseif(isset($_GET['op'])) {
- $op=$_GET['op'];
-}
-$storage = new boox_storage();
-
-function edit_file_content($content='', $filename='')
-{
- require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
- $sform = new XoopsThemeForm(_AM_BOOX_FILE, 'ffile', XOOPS_URL.'/modules/boox/admin/main.php', 'post');
- if(xoops_trim($filename) != '') {
- $sform->addElement(new XoopsFormHidden('filename', $filename), false);
- } else {
- $sform->addElement(new XoopsFormText(_AM_BOOX_FILENAME, 'filename', 50, 255, $filename), true);
- $sform->addElement(new XoopsFormHidden('newfile', '1'), false);
- }
- $sform->addElement(new XoopsFormHidden('op', 'save'), false);
- $editor = boox_getWysiwygForm(_AM_BOOX_CONTENT, 'file_content', $content, 15, 60, 'content_hidden');
- if($editor) {
- $sform->addElement($editor,false);
- }
- $button_tray = new XoopsFormElementTray('' ,'');
- $submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');
- $button_tray->addElement($submit_btn);
- $sform->addElement($button_tray);
- $sform->display();
-}
-
-
-
-switch ($op) {
- case 'addfile': // Add a new file
- xoops_cp_header();
- echo $indexAdmin->addNavigation('main.php');
- edit_file_content();
- break;
-
- case 'save': // Save a file after it was edited (or created)
- $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
- if(!isset($_POST['filename'])) {
- redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
- }
-
- if(substr($folder_storage,-1,1) != '/') {
- $folder_storage .= '/';
- }
- $filename = $_POST['filename'];
- $content = $_POST['file_content'];
- if (get_magic_quotes_gpc()) {
- $content = stripslashes($content);
- }
- if(boox_getmoduleoption('trimcontent')) {
- $content = xoops_trim($content);
- }
- $fp = fopen($folder_storage.$filename,'w') or die(_AM_BOOX_ERROR1);
- fwrite($fp,$content);
- fclose($fp);
- if(isset($_POST['newfile'])) {
- $storage->getAllFiles();
- $storage->addfiles($filename);
- $storage->store();
- }
- redirect_header('main.php',2,_AM_BOOX_DBUPDATED);
- break;
-
-
- case 'edit':
- xoops_cp_header();
- echo $indexAdmin->addNavigation('main.php');
- if(!isset($_GET['filename'])) {
- redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
- }
- $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
- if(substr($folder_storage,-1,1) != '/') {
- $folder_storage .= '/';
- }
- $filename = $_GET['filename'];
- $fp = fopen($folder_storage.$filename,'r') or die(sprintf(_AM_BOOX_ERROR3,$filename));
- $content = fread($fp, filesize($folder_storage.$filename));
- fclose($fp);
- edit_file_content($content, $filename);
- break;
-
-
- case 'delete': // Delete a file
- if(!isset($_GET['filename'])) {
- redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
- }
- $filename = $_GET['filename'];
- $storage->getAllFiles();
- $storage->delete($filename);
- $storage->store();
- $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
- if(substr($folder_storage,-1,1) != '/') {
- $folder_storage .= '/';
- }
- @unlink($folder_storage.$filename);
- redirect_header('main.php',2,_AM_BOOX_DBUPDATED);
- break;
-
-
- default: // Default action, list existing files
- $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
- if(substr($folder_storage,-1,1) != '/') {
- $folder_storage .= '/';
- }
- xoops_cp_header();
- echo $indexAdmin->addNavigation('main.php');
- $indexAdmin->addItemButton(_ADD, 'main.php?op=addfile', 'add', '');
- echo $indexAdmin->renderButton('right', '');
-
- echo '<h4>'._AM_BOOX_FILES.'</h4>';
- $files = array();
- $files = $storage->getAllFiles();
- echo '<table border="0" align="center" width="95%">';
- echo '<tr>';
- echo '<th align="center">'._AM_BOOX_FILE.'</th>';
- echo '<th align="center">'._AM_BOOX_COMMAND.'</th>';
- echo '<th align="center">'._AM_BOOX_ACTION.'</th>';
- echo '</tr>';
- $class='';
- foreach($files as $file) {
- $class = ($class == 'even') ? 'odd' : 'even';
- $action_edit = '<a title="'._EDIT.'" href="main.php?op=edit&filename='.urlencode($file).'"><img border="0" src="../images/edit.gif" /></a>';
- $action_delete = '<a '.boox_JavascriptLinkConfirm(_AM_BOOX_CONFIRM).' title="'._DELETE.'" href="main.php?op=delete&filename='.urlencode($file).'"><img border="0" src="../images/delete.gif" /></a>';
- $command = "<{php}>include_once '".$folder_storage.$file."';<{/php}>";
- echo "<tr class='".$class."'>";
- echo '<td>'.$file.'</td>';
- echo '<td>'.$command.'</td>';
- echo "<td align='center'>".$action_edit.' '.$action_delete.'</td>';
- echo "</tr>";
- }
- $class = ($class == 'even') ? 'odd' : 'even';
- //echo "<tr class='".$class."'><td colspan='3' align='center'><br /><form method='post' name='fadd' id='fadd' action='main.php'><input type='hidden' name='op' value='addfile' /><input type='submit' name='btngo' value='"._AM_BOOX_ADD."' /></form><br /></td></tr>";
- echo '</table><br/>';
-
- //echo "<br /><div align='center'><a href='http://xoops.instant-zero.com' target='_blank'><img src='../images/instantzero.gif'></a></div>";
- break;
-}
-include "admin_footer.php";
-//xoops_cp_footer();
+<?php
+/**
+ * ****************************************************************************
+ * boox - MODULE FOR XOOPS
+ * Copyright (c) Herv� Thouzard (http://www.herve-thouzard.com)
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright Herv� Thouzard (http://www.herve-thouzard.com)
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package boox
+ * @author Herv� Thouzard (http://www.herve-thouzard.com)
+ *
+ * Version : $Id:
+ * ****************************************************************************
+ */
+
+require_once '../../../include/cp_header.php';
+require_once XOOPS_ROOT_PATH.'/modules/boox/include/functions.php';
+require_once XOOPS_ROOT_PATH.'/modules/boox/class/storage.php';
+include_once 'admin_header.php';
+
+$indexAdmin = new ModuleAdmin();
+
+// ********************************************************************************************************************
+// **** Main
+// ********************************************************************************************************************
+$op = 'default';
+if (isset($_POST['op'])) {
+ $op=$_POST['op'];
+} elseif (isset($_GET['op'])) {
+ $op=$_GET['op'];
+}
+$storage = new boox_storage();
+
+/**
+ * @param string $content
+ * @param string $filename
+ */
+function edit_file_content($content='', $filename='')
+{
+ require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ $sform = new XoopsThemeForm(_AM_BOOX_FILE, 'ffile', XOOPS_URL.'/modules/boox/admin/main.php', 'post');
+ if (xoops_trim($filename) != '') {
+ $sform->addElement(new XoopsFormHidden('filename', $filename), false);
+ } else {
+ $sform->addElement(new XoopsFormText(_AM_BOOX_FILENAME, 'filename', 50, 255, $filename), true);
+ $sform->addElement(new XoopsFormHidden('newfile', '1'), false);
+ }
+ $sform->addElement(new XoopsFormHidden('op', 'save'), false);
+ $editor = boox_getWysiwygForm(_AM_BOOX_CONTENT, 'file_content', $content, 15, 60, 'content_hidden');
+ if ($editor) {
+ $sform->addElement($editor,false);
+ }
+ $button_tray = new XoopsFormElementTray('' ,'');
+ $submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');
+ $button_tray->addElement($submit_btn);
+ $sform->addElement($button_tray);
+ $sform->display();
+}
+
+switch ($op) {
+ case 'addfile': // Add a new file
+ xoops_cp_header();
+ echo $indexAdmin->addNavigation('main.php');
+ edit_file_content();
+ break;
+
+ case 'save': // Save a file after it was edited (or created)
+ $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
+ if (!isset($_POST['filename'])) {
+ redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
+ }
+
+ if (substr($folder_storage,-1,1) != '/') {
+ $folder_storage .= '/';
+ }
+ $filename = $_POST['filename'];
+ $content = $_POST['file_content'];
+ if (get_magic_quotes_gpc()) {
+ $content = stripslashes($content);
+ }
+ if (boox_getmoduleoption('trimcontent')) {
+ $content = xoops_trim($content);
+ }
+ $fp = fopen($folder_storage.$filename,'w') or die(_AM_BOOX_ERROR1);
+ fwrite($fp,$content);
+ fclose($fp);
+ if (isset($_POST['newfile'])) {
+ $storage->getAllFiles();
+ $storage->addfiles($filename);
+ $storage->store();
+ }
+ redirect_header('main.php',2,_AM_BOOX_DBUPDATED);
+ break;
+
+ case 'edit':
+ xoops_cp_header();
+ echo $indexAdmin->addNavigation('main.php');
+ if (!isset($_GET['filename'])) {
+ redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
+ }
+ $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
+ if (substr($folder_storage,-1,1) != '/') {
+ $folder_storage .= '/';
+ }
+ $filename = $_GET['filename'];
+ $fp = fopen($folder_storage.$filename,'r') or die(sprintf(_AM_BOOX_ERROR3,$filename));
+ $content = fread($fp, filesize($folder_storage.$filename));
+ fclose($fp);
+ edit_file_content($content, $filename);
+ break;
+
+ case 'delete': // Delete a file
+ if (!isset($_GET['filename'])) {
+ redirect_header( 'main.php', 3, _AM_BOOX_ERROR1);
+ }
+ $filename = $_GET['filename'];
+ $storage->getAllFiles();
+ $storage->delete($filename);
+ $storage->store();
+ $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
+ if (substr($folder_storage,-1,1) != '/') {
+ $folder_storage .= '/';
+ }
+ @unlink($folder_storage.$filename);
+ redirect_header('main.php',2,_AM_BOOX_DBUPDATED);
+ break;
+
+ default: // Default action, list existing files
+ $folder_storage = xoops_trim(boox_getmoduleoption('foldertosave'));
+ if (substr($folder_storage,-1,1) != '/') {
+ $folder_storage .= '/';
+ }
+ xoops_cp_header();
+ echo $indexAdmin->addNavigation('main.php');
+ $indexAdmin->addItemButton(_AM_BOOX_ADD, 'main.php?op=addfile', 'add', '');
+ echo $indexAdmin->renderButton('left', '');
+
+ echo '<h4>'._AM_BOOX_FILES.'</h4>';
+ $files = array();
+ $files = $storage->getAllFiles();
+ echo '<table border="0" align="center" width="95%">';
+ echo '<tr>';
+ echo '<th align="center">'._AM_BOOX_FILE.'</th>';
+ echo '<th align="center">'._AM_BOOX_COMMAND.'</th>';
+ echo '<th align="center">'._AM_BOOX_ACTION.'</th>';
+ echo '</tr>';
+ $class='';
+ foreach ($files as $file) {
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $action_edit = '<a title="'._EDIT.'" href="main.php?op=edit&filename='.urlencode($file).'"><img border="0" src="../assets/images/edit.gif" /></a>';
+ $action_delete = '<a '.boox_JavascriptLinkConfirm(_AM_BOOX_CONFIRM).' title="'._DELETE.'" href="main.php?op=delete&filename='.urlencode($file).'"><img border="0" src="../assets/images/delete.gif" /></a>';
+ $command = "<{php}>include_once '".$folder_storage.$file."';<{/php}>";
+ echo "<tr class='".$class."'>";
+ echo '<td>'.$file.'</td>';
+ echo '<td>'.$command.'</td>';
+ echo "<td align='center'>".$action_edit.' '.$action_delete.'</td>';
+ echo "</tr>";
+ }
+ $class = ($class == 'even') ? 'odd' : 'even';
+ //echo "<tr class='".$class."'><td colspan='3' align='center'><br /><form method='post' name='fadd' id='fadd' action='main.php'><input type='hidden' name='op' value='addfile' /><input type='submit' name='btngo' value='"._AM_BOOX_ADD."' /></form><br /></td></tr>";
+ echo '</table><br/>';
+
+ //echo "<br /><div align='center'><a href='http://xoops.instant-zero.com' target='_blank'><img src='../assets/images/instantzero.gif'></a></div>";
+ break;
+}
+include 'admin_footer.php';
+//xoops_cp_footer();
Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/menu.php
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/menu.php 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/admin/menu.php 2014-04-25 11:35:52 UTC (rev 12475)
@@ -34,12 +34,12 @@
$adminmenu[$i]["link"] = 'admin/index.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_BOOX_MENU_01;
$adminmenu[$i]["link"] = 'admin/main.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/manage.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_BOOX_ADMIN_ABOUT;
$adminmenu[$i]["link"] = 'admin/about.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png
===================================================================
(Binary files differ)
Index: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png
===================================================================
--- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png 2014-04-25 11:31:21 UTC (rev 12474)
+++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png 2014-04-25 11:35:52 UTC (rev 12475)
Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/boox_logo.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/assets/images/delete.gif
===================================================================
(Binary files differ)
Index: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/boox/a...
[truncated message content] |