|
From: <be...@us...> - 2013-08-08 22:07:13
|
Revision: 11891
http://sourceforge.net/p/xoops/svn/11891
Author: beckmi
Date: 2013-08-08 22:07:07 +0000 (Thu, 08 Aug 2013)
Log Message:
-----------
Updating to 3.07 RC3 (see changelog)
Modified Paths:
--------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/menu.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/photomanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/redothumbs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_tophits.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/comments.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/install.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/blocksadmin.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/onupdate.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/sitemap.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/waiting.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/photo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/xoops_version.php
Added Paths:
-----------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/help.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/index.html
Removed Paths:
-------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/dashboard.php
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -1,75 +1,30 @@
<?php
-// $Id: about.php 5204 2010-09-06 20:10:52Z mageg $
-// ------------------------------------------------------------------------ //
-// 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: XOOPS Foundation //
-// URL: http://www.xoops.org/ //
-// Project: The XOOPS Project //
-// ------------------------------------------------------------------------- //
+/*
+ * 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.
+ */
- include ('admin_header.php');
-
- xoops_cp_header();
- myalbum_adminMenu(basename(__FILE__), 9);
- $paypalitemno='MYALBUMP301';
- $aboutAdmin = new ModuleAdmin();
- $about = $aboutAdmin->renderabout($paypalitemno, false);
-
- $donationform = array( 0 => '<form name="donation" id="donation" action="http://www.chronolabs.coop/modules/xpayment/" method="post" onsubmit="return xoopsFormValidate_donation();">',
- 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">'._AM_ABOUT_MAKEDONATE.'</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">Donation Amount</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 AUD</option><option value="10">10.00 AUD</option><option value="20">20.00 AUD</option><option value="40">40.00 AUD</option><option value="60">60.00 AUD</option><option value="80">80.00 AUD</option><option value="90">90.00 AUD</option><option value="100">100.00 AUD</option><option value="200">200.00 AUD</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="'._SUBMIT.'" title="'._SUBMIT.'" type="submit"></td></tr></tbody></table>',
- 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="AUD" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"><input name="cancel" id="cancel" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"></form>', 'D'=>'',
- 3 => '',
- 4 => '<!-- Start Form Validation JavaScript //-->
-<script type="text/javascript">
-<!--//
-function xoopsFormValidate_donation() { var myform = window.document.donation;
-var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true;
-}
-//--></script>
-<!-- End Form Validation JavaScript //-->');
- $paypalform = array( 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">',
- 1 => '<input name="cmd" value="_s-xclick" type="hidden">',
- 2 => '<input name="hosted_button_id" value="%s" type="hidden">',
- 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">',
- 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">',
- 5 => '</form>');
-
- for($key=0;$key<=4;$key++) {
- switch ($key) {
- case 2:
- $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['myalbumModule']->getVar('dirname')), strtoupper($GLOBALS['myalbumModule']->getVar('dirname')). ' '.$GLOBALS['myalbumModule']->getVar('name'));
- break;
- }
- }
-
- $istart = strpos($about, ($paypalform[0]), 1);
- $iend = strpos($about, ($paypalform[5]), $istart+1)+strlen($paypalform[5])-1;
- echo (substr($about, 0, $istart-1));
- echo implode("\n", $donationform);
- echo (substr($about, $iend+1, strlen($about)-$iend-1));
- myalbum_footer_adminMenu();
- xoops_cp_footer();
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
-?>
\ No newline at end of file
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include_once 'admin_footer.php';
\ No newline at end of file
Added: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -0,0 +1,30 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+global $pathIcon32;
+
+echo "<div class='adminfooter'>\n"
+ ." <div style='text-align: center;'>\n"
+ ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ ." </div>\n"
+ ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
+ ."</div>";
+
+xoops_cp_footer();
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -1,5 +1,6 @@
<?php
- require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php');
+require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/mainfile.php');
+require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php');
require_once (dirname(dirname(__FILE__))).'/include/functions.php';
require_once (dirname(dirname(__FILE__))).'/include/read_configs.php';
@@ -55,6 +56,10 @@
xoops_loadLanguage('user');
xoops_loadLanguage('admin', $mydirname);
xoops_loadLanguage('main', $mydirname);
+
+$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
include_once(XOOPS_ROOT_PATH."/class/template.php");
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -44,7 +44,9 @@
}
}
xoops_cp_header();
-myalbum_adminMenu(basename(__FILE__), 3);
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('admission.php');
+//myalbum_adminMenu(basename(__FILE__), 3);
$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_ADMISSION,$xoopsModule->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
@@ -65,6 +67,5 @@
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
// check $xoopsModule
-myalbum_footer_adminMenu();
-xoops_cp_footer();
-?>
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -121,7 +121,9 @@
}
xoops_cp_header();
-myalbum_adminMenu(basename(__FILE__), 4);
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('batch.php');
+//myalbum_adminMenu(basename(__FILE__), 4);
$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_BATCHREGISTER,$GLOBALS['myalbumModule']->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
@@ -133,7 +135,5 @@
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_batch.html');
// check $GLOBALS['myalbumModule']
-myalbum_footer_adminMenu();
-xoops_cp_footer();
-
-?>
\ No newline at end of file
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Deleted: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/dashboard.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/dashboard.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/dashboard.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -1,169 +0,0 @@
-<?php
- include ('admin_header.php');
- xoops_loadLanguage('admin');
-
- xoops_cp_header();
-
- myalbum_adminMenu(basename(__FILE__), 0);
- $indexAdmin = new ModuleAdmin();
-
- $cat_handler = xoops_getmodulehandler('cat');
- $comments_handler = xoops_getmodulehandler('comments');
- $photos_handler = xoops_getmodulehandler('photos');
- $text_handler = xoops_getmodulehandler('text');
- $votedata_handler = xoops_getmodulehandler('votedata');
- $group_handler = xoops_gethandler('group');
-
- $netpbm_pipes = array( "jpegtopnm" , "giftopnm" , "pngtopnm" ,
- "pnmtojpeg" , "pnmtopng" , "ppmquant" , "ppmtogif" ,
- "pnmscale" , "pnmflip" ) ;
-
- // PATH_SEPARATOR
- if( ! defined( 'PATH_SEPARATOR' ) ) {
- if( DIRECTORY_SEPARATOR == '/' ) define( 'PATH_SEPARATOR' , ':' ) ;
- else define( 'PATH_SEPARATOR' , ';' ) ;
- }
-
- // Check the path to binaries of imaging packages
- if( trim( $myalbum_imagickpath ) != '' && substr( $myalbum_imagickpath , -1 ) != DIRECTORY_SEPARATOR ) {
- $myalbum_imagickpath .= DIRECTORY_SEPARATOR ;
- }
- if( trim( $myalbum_netpbmpath ) != '' && substr( $myalbum_netpbmpath , -1 ) != DIRECTORY_SEPARATOR ) {
- $myalbum_netpbmpath .= DIRECTORY_SEPARATOR ;
- }
-
- // Environmental
- $indexAdmin = new ModuleAdmin();
- $title = _AM_MB_PHPDIRECTIVE.' : '._AM_H4_ENVIRONMENT;
- $indexAdmin->addInfoBox($title);
- // Safe Mode
- $safe_mode_flag = ini_get( "safe_mode" ) ;
- $indexAdmin->addInfoBoxLine($title, "<label>'safe_mode' ("._AM_MB_BOTHOK."): %s</label>", (!$safe_mode_flag?_AM_LABEL_OFF:_AM_LABEL_ON), (!$safe_mode_flag?'Red':'Green'));
- // File Uploads
- $rs = ini_get( "file_uploads" );
- $indexAdmin->addInfoBoxLine($title, "<label>'file_uploads' ("._AM_MB_NEEDON."): %s</label>", (!$rs?_AM_LABEL_OFF:_AM_LABEL_ON), (!$rs?'Red':'Green'));
- // Register Globals
- $rs = ini_get( "register_globals" );
- $indexAdmin->addInfoBoxLine($title, "<label>'register_globals' ("._AM_MB_BOTHOK."): %s</label>", (!$rs?_AM_LABEL_OFF:_AM_LABEL_ON), (!$rs?'Red':'Green'));
- // File Uploads
- $rs = ini_get( "upload_max_filesize" );
- $indexAdmin->addInfoBoxLine($title, "<label>'upload_max_filesize': %s bytes</label>", $rs, (!$rs?'Red':'Green'));
- // File Uploads
- $rs = ini_get( "post_max_size" );
- $indexAdmin->addInfoBoxLine($title, "<label>'post_max_size': %s bytes</label>", $rs, (!$rs?'Red':'Green'));
- // File Uploads
- $rs = ini_get( "open_basedir" );
- $indexAdmin->addInfoBoxLine($title, "<label>'open_basedir': %s</label>", (!$rs?_AM_LABEL_NOTHING:$rs), (!$rs?'Red':'Green'));
- // File Uploads
- $rs = ini_get( "file_uploads" );
- $tmp_dirs = explode( PATH_SEPARATOR , ini_get( "upload_tmp_dir" ) ) ;
- $error_upload_tmp_dir = false;
- foreach( $tmp_dirs as $dir ) {
- if( $dir != "" && ( ! is_writable( $dir ) || ! is_readable( $dir ) ) && $error_upload_tmp_dir == false) {
- $indexAdmin->addInfoBoxLine($title, "<label>'upload_tmp_dir': %s</label>", "Error: upload_tmp_dir ($dir) is not writable nor readable", 'Red');
- $error_upload_tmp_dir = true ;
- }
- }
- if( $error_upload_tmp_dir == false ) {
- $indexAdmin->addInfoBoxLine($title, "<label>'upload_tmp_dir': %s</label>", "ok - ".ini_get("upload_tmp_dir"), 'Green');
- }
-
- // Tables
- $title = _AM_H4_TABLE;
- $indexAdmin->addInfoBox($title);
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s photos</label>", $photos_handler->getCount(new Criteria('`status`', '0', '>')), 'Purple');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s dead photos</label>", $photos_handler->getCountDeadPhotos(), 'Red');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s dead thumbs</label>", $photos_handler->getCountDeadThumbs(), 'Red');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DESCRIPTIONTABLE.": ".$GLOBALS['table_text']. ": %s descriptions</label>", $text_handler->getCount(), 'Purple');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DESCRIPTIONTABLE.": ".$GLOBALS['table_text']. ": %s bytes</label>", $text_handler->getBytes(), 'Orange');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_CATEGORIESTABLE.": ".$GLOBALS['table_cat']. ": %s categories</label>", $cat_handler->getCount(), 'Purple');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_VOTEDATATABLE.": ".$GLOBALS['table_votedata']. ": %s votes</label>", $votedata_handler->getCount(), 'Purple');
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_COMMENTSTABLE.": ".$GLOBALS['table_comments']. ": %s comments</label>", $comments_handler->getCount(new Criteria('`com_modid`', $GLOBALS['myalbumModule']->getVar('mid'), '=')), 'Purple');
-
- // Config
- $title = _AM_H4_CONFIG;
- $indexAdmin->addInfoBox($title);
- if( $myalbum_imagingpipe == PIPEID_IMAGICK ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "Path: $myalbum_imagickpath", 'Brown');
- exec( "{$myalbum_imagickpath}convert --help" , $ret_array ) ;
- if( count( $ret_array ) < 1 )
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "Error: {$myalbum_imagickpath}convert can't be executed", 'Red');
- else
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "{$ret_array[0]} Ok", 'Green');
- } else if( $myalbum_imagingpipe == PIPEID_NETPBM ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "Path: $myalbum_netpbmpath", 'Brown');
- foreach( $netpbm_pipes as $pipe ) {
- $ret_array = array() ;
- exec( "{$myalbum_netpbmpath}$pipe --version 2>&1" , $ret_array ) ;
- if( count( $ret_array ) < 1 )
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "Error: {$myalbum_netpbmpath}{$pipe} can't be executed", 'Red');
- else
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "{$pipe} : {$ret_array[0]} Ok", 'Green');
- }
- } else {
- if( function_exists( 'gd_info' ) ) {
- $gd_info = gd_info() ;
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD : %s</label>", "GD Version: {$gd_info['GD Version']}", 'Brown');
- }
- if( function_exists( 'imagecreatetruecolor' ) ) {
- if( imagecreatetruecolor(200,200) ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", _AM_MB_GD2SUCCESS, 'Green');
- } else {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", 'Failed', 'Red');
- }
- } else {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", 'Failed', 'Red');
- }
- }
-
- $title = _AM_H4_DIRECTORIES;
- $indexAdmin->addInfoBox($title);
-
- if( substr( $myalbum_photospath , -1 ) == '/' ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_LASTCHAR, 'Red');
- } else if( ord( $myalbum_photospath ) != 0x2f ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_FIRSTCHAR, 'Red');
- } else if( ! is_dir( $GLOBALS['photos_dir'] ) ) {
- if( $safe_mode_flag ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_PERMISSION, 'Red');
- } else {
- $rs = mkdir( $GLOBALS['photos_dir'] , 0777 ) ;
- if( ! $rs )
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_NOTDIRECTORY, 'Red');
- else
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", 'Ok', 'Green');
- }
- } else if( ! is_writable( $GLOBALS['photos_dir'] ) || ! is_readable( $GLOBALS['photos_dir'] ) ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_READORWRITE, 'Red');
- } else {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", 'Ok', 'Green');
- }
-
- // thumbs
- if( $myalbum_makethumb ) {
- if( substr( $myalbum_thumbspath , -1 ) == '/' ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_LASTCHAR, 'Red');
- } else if( ord( $myalbum_thumbspath ) != 0x2f ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_FIRSTCHAR, 'Red');
- } else if( ! is_dir( $GLOBALS['thumbs_dir'] ) ) {
- if( $safe_mode_flag ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_PERMISSION, 'Red');
- } else {
- $rs = mkdir( $GLOBALS['thumbs_dir'] , 0777 ) ;
- if( ! $rs )
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_NOTDIRECTORY, 'Red');
- else
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", 'Ok', 'Green');
- }
- } else if( ! is_writable( $GLOBALS['thumbs_dir'] ) || ! is_readable( $GLOBALS['thumbs_dir'] ) ) {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_READORWRITE, 'Red');
- } else {
- $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", 'Ok', 'Green');
- }
- }
-
- echo $indexAdmin->renderIndex();
- myalbum_footer_adminMenu();
- xoops_cp_footer();
-
-?>
\ No newline at end of file
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -75,7 +75,9 @@
$sysperm_handler =& xoops_gethandler('groupperm');
if( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
xoops_cp_header();
- myalbum_adminMenu(basename(__FILE__), 7);
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation('export.php');
+// myalbum_adminMenu(basename(__FILE__), 7);
$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_EXPORTTO,$GLOBALS['myalbumModule']->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
@@ -85,8 +87,9 @@
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
// check $GLOBALS['myalbumModule']
- myalbum_footer_adminMenu();
- xoops_cp_footer();
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
+
} else {
redirect_header('dashboard.php', 5, _NOPERM);
}
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -10,7 +10,9 @@
}
xoops_cp_header();
-myalbum_adminMenu(basename(__FILE__), 8);
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('groupperm_global.php');
+//myalbum_adminMenu(basename(__FILE__), 8);
$GLOBALS['xoopsTpl']->assign('admin_title', $GLOBALS['myalbumModule']->name());
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
@@ -21,8 +23,5 @@
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
-myalbum_footer_adminMenu();
-xoops_cp_footer();
-
-
-?>
\ No newline at end of file
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -154,7 +154,9 @@
include_once('../include/myalbum.forms.php');
xoops_cp_header();
-myalbum_adminMenu(basename(__FILE__), 6);
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('import.php');
+//myalbum_adminMenu(basename(__FILE__), 6);
$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_IMPORTTO,$xoopsModule->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
@@ -164,7 +166,5 @@
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_import.html');
-myalbum_footer_adminMenu();
-xoops_cp_footer();
-
-?>
\ No newline at end of file
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -1,198 +1,169 @@
-<?php
-// ------------------------------------------------------------------------- //
-// myAlbum-P - XOOPS photo album //
-// <http://www.peak.ne.jp/> //
-// ------------------------------------------------------------------------- //
-
-
-include("admin_header.php");
-
-$catHandler = xoops_getmodulehandler('cat', $GLOBALS['mydirname']);
-$photosHandler = xoops_getmodulehandler('photos', $GLOBALS['mydirname']);
-
-// GPCS vars
-$action = isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '' ;
-$disp = isset( $_GET[ 'disp' ] ) ? $_GET[ 'disp' ] : '' ;
-$cid = isset( $_GET[ 'cid' ] ) ? intval( $_GET[ 'cid' ] ) : 0 ;
-
-if( $action == "insert" ) {
-
- // anti-CSRF (Double Check)
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- // newly insert
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET " ;
- $cols = array( "pid" => "I:N:0" ,"title" => "50:E:1" ,"imgurl" => "150:E:0" ) ;
- $sql .= mysql_get_sql_set( $cols ) ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB Error: insert category" ) ;
-
- // Check if cid == pid
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
- if( $cid == intval( $_POST['pid'] ) ) {
- $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET pid='0' WHERE cid='$cid'" ) ;
- }
-
- redirect_header( "index.php" , 1 , _AM_CAT_INSERTED ) ;
- exit ;
-
-} else if( $action == "update" && ! empty( $_POST['cid'] ) ) {
-
- // anti-CSRF (Double Check)
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- $cid = intval( $_POST['cid'] ) ;
- $pid = intval( $_POST['pid'] ) ;
-
- // Check if new pid was a child of cid
- if( $pid != 0 ) {
- foreach($cattree->getAllChild( $cid ) as $child)
- $children[$child->getVar('cid')] = $child->getVar('cid') ;
- foreach( $children as $child ) {
- if( $child == $pid ) die( "category looping has occurred" ) ;
- }
- }
-
- // update
- $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET " ;
- $cols = array( "pid" => "I:N:0" ,"title" => "50:E:1" ,"imgurl" => "150:E:0" ) ;
- $sql .= mysql_get_sql_set( $cols ) . " WHERE cid='$cid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB Error: update category" ) ;
- redirect_header( "index.php" , 1 , _AM_CAT_UPDATED ) ;
- exit ;
-
-} else if( ! empty( $_POST['delcat'] ) ) {
-
- // anti-CSRF (Double Check)
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- // Delete
- $cid = intval( $_POST['delcat'] ) ;
-
- $children[0] = 0;
- //get all categories under the specified category
- foreach($GLOBALS['cattree']->getAllChild( $cid ) as $child)
- $children[$child->getVar('cid')] = $child->getVar('cid') ;
- $whr = "cid IN (" ;
- foreach( $children as $child ) {
- $whr .= "$child," ;
- xoops_notification_deletebyitem( $myalbum_mid , 'category' , $child ) ;
- }
- $whr .= "$cid)" ;
- xoops_notification_deletebyitem( $myalbum_mid , 'category' , $cid ) ;
- $criteria = new Criteria('`cid`', '('.implode(',', $children).')', 'IN' );
- myalbum_delete_photos( $criteria ) ;
- $GLOBALS['xoopsDB']->query( "DELETE FROM ".$GLOBALS['xoopsDB']->prefix( $table_cat )." WHERE $whr" ) or die( "DB error: DELETE cat table" ) ;
- redirect_header( 'index.php' , 2 , _ALBM_CATDELETED ) ;
- exit ;
-
-} else if( ! empty( $_POST['batch_update'] ) ) {
-
-}
-
-//
-// Form Part
-//
-xoops_cp_header();
-myalbum_adminMenu(basename(__FILE__), 1);
-
-// check $xoopsModule
-if( ! is_object( $xoopsModule ) ) redirect_header( "$mod_url/" , 1 , _NOPERM ) ;
-echo "<h3 style='text-align:left;'>".sprintf( _AM_H3_FMT_CATEGORIES , $xoopsModule->name() )."</h3>\n" ;
-
-if( $disp == "edit" && $cid > 0 ) {
-
- // Editing
- $sql = "SELECT cid,pid,title,imgurl FROM ".$GLOBALS['xoopsDB']->prefix( $table_cat )." WHERE cid='$cid'" ;
- $crs = $GLOBALS['xoopsDB']->query( $sql ) ;
- $cat_array = $GLOBALS['xoopsDB']->fetchArray( $crs ) ;
- echo myalbum_admin_form_display_edit( $cat_array , _AM_CAT_MENU_EDIT , 'update' ) ;
-
-} else if( $disp == "new" ) {
-
- // New
- $cat_array = array( 'cid' => 0 , 'pid' => $cid , 'title' => '' , 'imgurl' => 'http://' ) ;
- echo myalbum_admin_form_display_edit( $cat_array , _AM_CAT_MENU_NEW , 'insert' ) ;
-
-} else {
-
- // Listing
- $live_cids = array(0=>0);
- foreach($cattree->getAllChild( $cid, array() ) as $child) {
- $cat_tree_array[$child->getVar('cid')] = $child->toArray() ;
- $live_cids[$child->getVar('cid')] = $child->getVar('cid');
- }
- $criteria = new CriteriaCompo(new Criteria('`pid`', '('.implode(',', $live_cids).')', 'NOT IN'));
- if( $catHandler->getCount($criteria) != false ) {
- $GLOBALS['xoopsDB']->queryF( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET pid='0' " . $criteria->renderWhere() ) ;
- redirect_header( 'dashboard.php' , 0 , 'A Ghost Category found.' ) ;
- exit ;
- }
-
- // Waiting Admission
- $criteria = new Criteria('`status`', '0');
- $waiting = $photosHandler->getCount( $criteria ) ;
- $link_admission = $waiting > 0 ? sprintf( _AM_CAT_FMT_NEEDADMISSION , $waiting ) : '' ;
-
- // Top links
- echo "<p><a href='?disp=new&cid=0'>"._AM_CAT_LINK_MAKETOPCAT."<img src='../images/cat_add.gif' width='18' height='15' alt='"._AM_CAT_LINK_MAKETOPCAT."' title='"._AM_CAT_LINK_MAKETOPCAT."' /></a> <a href='admission.php' style='color:red;'>$link_admission</a></p>\n" ;
-
- // TH
- echo "
- <form name='MainForm' action='' method='post' style='margin:10px;'>
- <input type='hidden' name='delcat' value='' />
- <table width='75%' class='outer' cellpadding='4' cellspacing='1'>
- <tr valign='middle'>
- <th>"._AM_CAT_TH_TITLE."</th>
- <th>"._AM_CAT_TH_PHOTOS."</th>
- <th>"._AM_CAT_TH_OPERATION."</th>
- <th nowrap='nowrap'>"._AM_CAT_TH_IMAGE."</th>
- </tr>
- " ;
-
- // TD
- $oddeven = 'odd' ;
- if (isset($cat_tree_array))
- foreach( $cat_tree_array as $cid => $cat_node ) {
- $oddeven = $oddeven == 'odd' ? 'even' : 'odd' ;
- extract( $cat_node ) ;
- $prefix = '';
- $prefix = str_repeat(' --', $catHandler->prefixDepth($cid, 0) ) ;
- $cid = intval( $cid ) ;
- $del_confirm = 'confirm("' . sprintf( _AM_CAT_FMT_CATDELCONFIRM , $title ) . '")' ;
- $criteria = new Criteria('`cid`', $cid);
- $photos_num = $photosHandler->getCount( $criteria ) ;
- if( $imgurl && $imgurl != 'http://' ) $imgsrc4show = $GLOBALS['myts']->htmlSpecialChars( $imgurl ) ;
- else $imgsrc4show = '../images/pixel_trans.gif' ;
-
- echo "
- <tr>
- <td class='$oddeven' width='100%'><a href='photomanager.php?cid=$cid'>$prefix ".$GLOBALS['myts']->htmlSpecialChars($title)."</a></td>
- <td class='$oddeven' nowrap='nowrap' align='right'>
- <a href='photomanager.php?cid=$cid'>$photos_num</a>
- <a href='../submit.php?cid=$cid'><img src='../images/pictadd.gif' width='18' height='15' alt='"._AM_CAT_LINK_ADDPHOTOS."' title='"._AM_CAT_LINK_ADDPHOTOS."' /></a></td>
- <td class='$oddeven' align='center' nowrap='nowrap'>
-
- <a href='?disp=edit&cid=$cid'><img src='../images/cat_edit.gif' width='18' height='15' alt='"._AM_CAT_LINK_EDIT."' title='"._AM_CAT_LINK_EDIT."' /></a>
-
- <a href='?disp=new&cid=$cid'><img src='../images/cat_add.gif' width='18' height='15' alt='"._AM_CAT_LINK_MAKESUBCAT."' title='"._AM_CAT_LINK_MAKESUBCAT."' /></a>
-
- <input type='button' value='"._DELETE."' onclick='if($del_confirm){document.MainForm.delcat.value=\"$cid\"; submit();}' />
- </td>
- <td class='$oddeven' align='center'><img src='$imgsrc4show' height='16' /></td>
- </tr>\n" ;
- }
-
- // Table footer
- echo "
- <!-- <tr>
- <td colspan='4' align='right' class='foot'><input type='submit' name='batch_update' value='"._AM_CAT_BTN_BATCH."' /></td>
- </tr> -->
- </table>
- </form>
- " ;
-}
-
-
-myalbum_footer_adminMenu();
-xoops_cp_footer();
-?>
+<?php
+ include ('admin_header.php');
+ xoops_loadLanguage('admin');
+
+ xoops_cp_header();
+
+// myalbum_adminMenu(basename(__FILE__), 0);
+ $indexAdmin = new ModuleAdmin();
+
+echo $indexAdmin->addNavigation('index.php');
+
+ $cat_handler = xoops_getmodulehandler('cat');
+ $comments_handler = xoops_getmodulehandler('comments');
+ $photos_handler = xoops_getmodulehandler('photos');
+ $text_handler = xoops_getmodulehandler('text');
+ $votedata_handler = xoops_getmodulehandler('votedata');
+ $group_handler = xoops_gethandler('group');
+
+ $netpbm_pipes = array( "jpegtopnm" , "giftopnm" , "pngtopnm" ,
+ "pnmtojpeg" , "pnmtopng" , "ppmquant" , "ppmtogif" ,
+ "pnmscale" , "pnmflip" ) ;
+
+ // PATH_SEPARATOR
+ if( ! defined( 'PATH_SEPARATOR' ) ) {
+ if( DIRECTORY_SEPARATOR == '/' ) define( 'PATH_SEPARATOR' , ':' ) ;
+ else define( 'PATH_SEPARATOR' , ';' ) ;
+ }
+
+ // Check the path to binaries of imaging packages
+ if( trim( $myalbum_imagickpath ) != '' && substr( $myalbum_imagickpath , -1 ) != DIRECTORY_SEPARATOR ) {
+ $myalbum_imagickpath .= DIRECTORY_SEPARATOR ;
+ }
+ if( trim( $myalbum_netpbmpath ) != '' && substr( $myalbum_netpbmpath , -1 ) != DIRECTORY_SEPARATOR ) {
+ $myalbum_netpbmpath .= DIRECTORY_SEPARATOR ;
+ }
+
+ // Environmental
+ $indexAdmin = new ModuleAdmin();
+ $title = _AM_MB_PHPDIRECTIVE.' : '._AM_H4_ENVIRONMENT;
+ $indexAdmin->addInfoBox($title);
+ // Safe Mode
+ $safe_mode_flag = ini_get( "safe_mode" ) ;
+ $indexAdmin->addInfoBoxLine($title, "<label>'safe_mode' ("._AM_MB_BOTHOK."): %s</label>", (!$safe_mode_flag?_AM_LABEL_OFF:_AM_LABEL_ON), (!$safe_mode_flag?'Red':'Green'));
+ // File Uploads
+ $rs = ini_get( "file_uploads" );
+ $indexAdmin->addInfoBoxLine($title, "<label>'file_uploads' ("._AM_MB_NEEDON."): %s</label>", (!$rs?_AM_LABEL_OFF:_AM_LABEL_ON), (!$rs?'Red':'Green'));
+ // Register Globals
+ $rs = ini_get( "register_globals" );
+ $indexAdmin->addInfoBoxLine($title, "<label>'register_globals' ("._AM_MB_BOTHOK."): %s</label>", (!$rs?_AM_LABEL_OFF:_AM_LABEL_ON), (!$rs?'Red':'Green'));
+ // File Uploads
+ $rs = ini_get( "upload_max_filesize" );
+ $indexAdmin->addInfoBoxLine($title, "<label>'upload_max_filesize': %s bytes</label>", $rs, (!$rs?'Red':'Green'));
+ // File Uploads
+ $rs = ini_get( "post_max_size" );
+ $indexAdmin->addInfoBoxLine($title, "<label>'post_max_size': %s bytes</label>", $rs, (!$rs?'Red':'Green'));
+ // File Uploads
+ $rs = ini_get( "open_basedir" );
+ $indexAdmin->addInfoBoxLine($title, "<label>'open_basedir': %s</label>", (!$rs?_AM_LABEL_NOTHING:$rs), (!$rs?'Red':'Green'));
+ // File Uploads
+ $rs = ini_get( "file_uploads" );
+ $tmp_dirs = explode( PATH_SEPARATOR , ini_get( "upload_tmp_dir" ) ) ;
+ $error_upload_tmp_dir = false;
+ foreach( $tmp_dirs as $dir ) {
+ if( $dir != "" && ( ! is_writable( $dir ) || ! is_readable( $dir ) ) && $error_upload_tmp_dir == false) {
+ $indexAdmin->addInfoBoxLine($title, "<label>'upload_tmp_dir': %s</label>", "Error: upload_tmp_dir ($dir) is not writable nor readable", 'Red');
+ $error_upload_tmp_dir = true ;
+ }
+ }
+ if( $error_upload_tmp_dir == false ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>'upload_tmp_dir': %s</label>", "ok - ".ini_get("upload_tmp_dir"), 'Green');
+ }
+
+ // Tables
+ $title = _AM_H4_TABLE;
+ $indexAdmin->addInfoBox($title);
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s photos</label>", $photos_handler->getCount(new Criteria('`status`', '0', '>')), 'Purple');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s dead photos</label>", $photos_handler->getCountDeadPhotos(), 'Red');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PHOTOSTABLE.": ".$GLOBALS['table_photos']. ": %s dead thumbs</label>", $photos_handler->getCountDeadThumbs(), 'Red');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DESCRIPTIONTABLE.": ".$GLOBALS['table_text']. ": %s descriptions</label>", $text_handler->getCount(), 'Purple');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DESCRIPTIONTABLE.": ".$GLOBALS['table_text']. ": %s bytes</label>", $text_handler->getBytes(), 'Orange');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_CATEGORIESTABLE.": ".$GLOBALS['table_cat']. ": %s categories</label>", $cat_handler->getCount(), 'Purple');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_VOTEDATATABLE.": ".$GLOBALS['table_votedata']. ": %s votes</label>", $votedata_handler->getCount(), 'Purple');
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_COMMENTSTABLE.": ".$GLOBALS['table_comments']. ": %s comments</label>", $comments_handler->getCount(new Criteria('`com_modid`', $GLOBALS['myalbumModule']->getVar('mid'), '=')), 'Purple');
+
+ // Config
+ $title = _AM_H4_CONFIG;
+ $indexAdmin->addInfoBox($title);
+ if( $myalbum_imagingpipe == PIPEID_IMAGICK ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "Path: $myalbum_imagickpath", 'Brown');
+ exec( "{$myalbum_imagickpath}convert --help" , $ret_array ) ;
+ if( count( $ret_array ) < 1 )
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "Error: {$myalbum_imagickpath}convert can't be executed", 'Red');
+ else
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": ImageMagick : %s</label>", "{$ret_array[0]} Ok", 'Green');
+ } else if( $myalbum_imagingpipe == PIPEID_NETPBM ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "Path: $myalbum_netpbmpath", 'Brown');
+ foreach( $netpbm_pipes as $pipe ) {
+ $ret_array = array() ;
+ exec( "{$myalbum_netpbmpath}$pipe --version 2>&1" , $ret_array ) ;
+ if( count( $ret_array ) < 1 )
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "Error: {$myalbum_netpbmpath}{$pipe} can't be executed", 'Red');
+ else
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": NetPBM : %s</label>", "{$pipe} : {$ret_array[0]} Ok", 'Green');
+ }
+ } else {
+ if( function_exists( 'gd_info' ) ) {
+ $gd_info = gd_info() ;
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD : %s</label>", "GD Version: {$gd_info['GD Version']}", 'Brown');
+ }
+ if( function_exists( 'imagecreatetruecolor' ) ) {
+ if( imagecreatetruecolor(200,200) ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", _AM_MB_GD2SUCCESS, 'Green');
+ } else {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", 'Failed', 'Red');
+ }
+ } else {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_PIPEFORIMAGES.": GD2 : %s</label>", 'Failed', 'Red');
+ }
+ }
+
+ $title = _AM_H4_DIRECTORIES;
+ $indexAdmin->addInfoBox($title);
+
+ if( substr( $myalbum_photospath , -1 ) == '/' ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_LASTCHAR, 'Red');
+ } else if( ord( $myalbum_photospath ) != 0x2f ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_FIRSTCHAR, 'Red');
+ } else if( ! is_dir( $GLOBALS['photos_dir'] ) ) {
+ if( $safe_mode_flag ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_PERMISSION, 'Red');
+ } else {
+ $rs = mkdir( $GLOBALS['photos_dir'] , 0777 ) ;
+ if( ! $rs )
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_NOTDIRECTORY, 'Red');
+ else
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", 'Ok', 'Green');
+ }
+ } else if( ! is_writable( $GLOBALS['photos_dir'] ) || ! is_readable( $GLOBALS['photos_dir'] ) ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", _AM_ERR_READORWRITE, 'Red');
+ } else {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_photospath %s</label>", 'Ok', 'Green');
+ }
+
+ // thumbs
+ if( $myalbum_makethumb ) {
+ if( substr( $myalbum_thumbspath , -1 ) == '/' ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_LASTCHAR, 'Red');
+ } else if( ord( $myalbum_thumbspath ) != 0x2f ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_FIRSTCHAR, 'Red');
+ } else if( ! is_dir( $GLOBALS['thumbs_dir'] ) ) {
+ if( $safe_mode_flag ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_PERMISSION, 'Red');
+ } else {
+ $rs = mkdir( $GLOBALS['thumbs_dir'] , 0777 ) ;
+ if( ! $rs )
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_NOTDIRECTORY, 'Red');
+ else
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", 'Ok', 'Green');
+ }
+ } else if( ! is_writable( $GLOBALS['thumbs_dir'] ) || ! is_readable( $GLOBALS['thumbs_dir'] ) ) {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", _AM_ERR_READORWRITE, 'Red');
+ } else {
+ $indexAdmin->addInfoBoxLine($title, "<label>"._AM_MB_DIRECTORYFORPHOTOS.": ".XOOPS_ROOT_PATH."$myalbum_thumbspath %s</label>", 'Ok', 'Green');
+ }
+ }
+
+ echo $indexAdmin->renderIndex();
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Added: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php (rev 0)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -0,0 +1,204 @@
+<?php
+// ------------------------------------------------------------------------- //
+// myAlbum-P - XOOPS photo album //
+// <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+
+
+include("admin_header.php");
+
+$catHandler = xoops_getmodulehandler('cat', $GLOBALS['mydirname']);
+$photosHandler = xoops_getmodulehandler('photos', $GLOBALS['mydirname']);
+global $pathIcon16;
+
+// GPCS vars
+$action = isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '' ;
+$disp = isset( $_GET[ 'disp' ] ) ? $_GET[ 'disp' ] : '' ;
+$cid = isset( $_GET[ 'cid' ] ) ? intval( $_GET[ 'cid' ] ) : 0 ;
+
+if( $action == "insert" ) {
+
+ // anti-CSRF (Double Check)
+ if( ! xoopsSecurity::checkReferer() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ // newly insert
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET " ;
+ $cols = array( "pid" => "I:N:0" ,"title" => "50:E:1" ,"imgurl" => "150:E:0" ) ;
+ $sql .= mysql_get_sql_set( $cols ) ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB Error: insert category" ) ;
+
+ // Check if cid == pid
+ $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ if( $cid == intval( $_POST['pid'] ) ) {
+ $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET pid='0' WHERE cid='$cid'" ) ;
+ }
+
+ redirect_header( "main.php" , 1 , _AM_CAT_INSERTED ) ;
+ exit ;
+
+} else if( $action == "update" && ! empty( $_POST['cid'] ) ) {
+
+ // anti-CSRF (Double Check)
+ if( ! xoopsSecurity::checkReferer() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ $cid = intval( $_POST['cid'] ) ;
+ $pid = intval( $_POST['pid'] ) ;
+
+ // Check if new pid was a child of cid
+ if( $pid != 0 ) {
+ foreach($cattree->getAllChild( $cid ) as $child)
+ $children[$child->getVar('cid')] = $child->getVar('cid') ;
+ foreach( $children as $child ) {
+ if( $child == $pid ) die( "category looping has occurred" ) ;
+ }
+ }
+
+ // update
+ $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET " ;
+ $cols = array( "pid" => "I:N:0" ,"title" => "50:E:1" ,"imgurl" => "150:E:0" ) ;
+ $sql .= mysql_get_sql_set( $cols ) . " WHERE cid='$cid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB Error: update category" ) ;
+ redirect_header( "main.php" , 1 , _AM_CAT_UPDATED ) ;
+ exit ;
+
+} else if( ! empty( $_POST['delcat'] ) ) {
+
+ // anti-CSRF (Double Check)
+ if( ! xoopsSecurity::checkReferer() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ // Delete
+ $cid = intval( $_POST['delcat'] ) ;
+
+ $children[0] = 0;
+ //get all categories under the specified category
+ foreach($GLOBALS['cattree']->getAllChild( $cid ) as $child)
+ $children[$child->getVar('cid')] = $child->getVar('cid') ;
+ $whr = "cid IN (" ;
+ foreach( $children as $child ) {
+ $whr .= "$child," ;
+ xoops_notification_deletebyitem( $myalbum_mid , 'category' , $child ) ;
+ }
+ $whr .= "$cid)" ;
+ xoops_notification_deletebyitem( $myalbum_mid , 'category' , $cid ) ;
+ $criteria = new Criteria('`cid`', '('.implode(',', $children).')', 'IN' );
+ myalbum_delete_photos( $criteria ) ;
+ $GLOBALS['xoopsDB']->query( "DELETE FROM ".$GLOBALS['xoopsDB']->prefix( $table_cat )." WHERE $whr" ) or die( "DB error: DELETE cat table" ) ;
+ redirect_header( 'main.php' , 2 , _ALBM_CATDELETED ) ;
+ exit ;
+
+} else if( ! empty( $_POST['batch_update'] ) ) {
+
+}
+
+//
+// Form Part
+//
+xoops_cp_header();
+// myalbum_adminMenu(basename(__FILE__), 1);
+
+// check $xoopsModule
+if( ! is_object( $xoopsModule ) ) redirect_header( "$mod_url/" , 1 , _NOPERM ) ;
+//echo "<h3 style='text-align:left;'>".sprintf( _AM_H3_FMT_CATEGORIES , $xoopsModule->name() )."</h3>\n" ;
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('main.php');
+
+if( $disp == "edit" && $cid > 0 ) {
+
+ // Editing
+ $sql = "SELECT cid,pid,title,imgurl FROM ".$GLOBALS['xoopsDB']->prefix( $table_cat )." WHERE cid='$cid'" ;
+ $crs = $GLOBALS['xoopsDB']->query( $sql ) ;
+ $cat_array = $GLOBALS['xoopsDB']->fetchArray( $crs ) ;
+ echo myalbum_admin_form_display_edit( $cat_array , _AM_CAT_MENU_EDIT , 'update' ) ;
+
+} else if( $disp == "new" ) {
+
+ // New
+ $cat_array = array( 'cid' => 0 , 'pid' => $cid , 'title' => '' , 'imgurl' => 'http://' ) ;
+ echo myalbum_admin_form_display_edit( $cat_array , _AM_CAT_MENU_NEW , 'insert' ) ;
+
+} else {
+
+ // Listing
+ $live_cids = array(0=>0);
+ foreach($cattree->getAllChild( $cid, array() ) as $child) {
+ $cat_tree_array[$child->getVar('cid')] = $child->toArray() ;
+ $live_cids[$child->getVar('cid')] = $child->getVar('cid');
+ }
+ $criteria = new CriteriaCompo(new Criteria('`pid`', '('.implode(',', $live_cids).')', 'NOT IN'));
+ if( $catHandler->getCount($criteria) != false ) {
+ $GLOBALS['xoopsDB']->queryF( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_cat )." SET pid='0' " . $criteria->renderWhere() ) ;
+ redirect_header( 'dashboard.php' , 0 , 'A Ghost Category found.' ) ;
+ exit ;
+ }
+
+ // Waiting Admission
+ $criteria = new Criteria('`status`', '0');
+ $waiting = $photosHandler->getCount( $criteria ) ;
+ $link_admission = $waiting > 0 ? sprintf( _AM_CAT_FMT_NEEDADMISSION , $waiting ) : '' ;
+
+ // Top links
+// echo "<p><a href='?disp=new&cid=0'>"._AM_CAT_LINK_MAKETOPCAT."<img src='../images/cat_add.gif' width='18' height='15' alt='"._AM_CAT_LINK_MAKETOPCAT."' title='"._AM_CAT_LINK_MAKETOPCAT."' /></a> <a href='admission.php' style='color:red;'>$link_admission</a></p>\n" ;
+ $indexAdmin->addItemButton(_AM_CAT_LINK_MAKETOPCAT, '?disp=new&cid=0', 'add' , '');
+ echo $indexAdmin->renderButton('left', '');
+
+
+ // TH
+ echo "
+ <form name='MainForm' action='' method='post' style='margin:10px;'>
+ <input type='hidden' name='delcat' value='' />
+ <table width='75%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'>
+ <th>"._AM_CAT_TH_TITLE."</th>
+ <th>"._AM_CAT_TH_PHOTOS."</th>
+ <th>"._AM_CAT_TH_OPERATION."</th>
+ <th nowrap='nowrap'>"._AM_CAT_TH_IMAGE."</th>
+ </tr>
+ " ;
+
+ // TD
+ $oddeven = 'odd' ;
+ if (isset($cat_tree_array))
+ foreach( $cat_tree_array as $cid => $cat_node ) {
+ $oddeven = $oddeven == 'odd' ? 'even' : 'odd' ;
+ extract( $cat_node ) ;
+ $prefix = '';
+ $prefix = str_repeat(' --', $catHandler->prefixDepth($cid, 0) ) ;
+ $cid = intval( $cid ) ;
+ $del_confirm = 'confirm("' . sprintf( _AM_CAT_FMT_CATDELCONFIRM , $title ) . '")' ;
+ $criteria = new Criteria('`cid`', $cid);
+ $photos_num = $photosHandler->getCount( $criteria ) ;
+ if( $imgurl && $imgurl != 'http://' ) $imgsrc4show = $GLOBALS['myts']->htmlSpecialChars( $imgurl ) ;
+ else $imgsrc4show = '../images/pixel_trans.gif' ;
+
+ echo "
+ <tr>
+ <td class='$oddeven' width='100%'><a href='photomanager.php?cid=$cid'>$prefix ".$GLOBALS['myts']->htmlSpecialChars($title)."</a></td>
+ <td class='$oddeven' nowrap='nowrap' align='right'>
+ <a href='photomanager.php?cid=$cid'>$photos_num</a>
+ <a href='../submit.php?cid=$cid'><img src='" . $pathIcon16."/add.png' width='16' height='16' alt='"._AM_CAT_LINK_ADDPHOTOS."' title='"._AM_CAT_LINK_ADDPHOTOS."' /></a></td>
+ <td class='$oddeven' align='center' nowrap='nowrap'>
+
+ <a href='?disp=edit&cid=$cid'><img src='" . $pathIcon16."/edit.png' width='16' height='16' alt='"._AM_CAT_LINK_EDIT."' title='"._AM_CAT_LINK_EDIT."' /></a>
+
+ <a href='?disp=new&cid=$cid'><img src='" . $pathIcon16."/folder_add.png' width='16' height='16' alt='"._AM_CAT_LINK_MAKESUBCAT."' title='"._AM_CAT_LINK_MAKESUBCAT."' /></a>
+
+ <input type='button' value='"._DELETE."' onclick='if($del_confirm){document.MainForm.delcat.value=\"$cid\"; submit();}' />
+ </td>
+ <td class='$oddeven' align='center'><img src='$imgsrc4show' height='16' /></td>
+ </tr>\n" ;
+ }
+
+ // Table footer
+ echo "
+ <!-- <tr>
+ <td colspan='4' align='right' class='foot'><input type='submit' name='batch_update' value='"._AM_CAT_BTN_BATCH."' /></td>
+ </tr> -->
+ </table>
+ </form>
+ " ;
+}
+
+
+//myalbum_footer_adminMenu();
+//xoops_cp_footer();
+include_once "admin_footer.php";
\ No newline at end of file
Property changes on: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/menu.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/menu.php 2013-08-08 06:30:41 UTC (rev 11890)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/menu.php 2013-08-08 22:07:07 UTC (rev 11891)
@@ -2,44 +2,73 @@
$GLOBALS['mydirname'] = basename( dirname( dirname( __FILE__ ) ) ) ;
$module_handler = xoops_gethandler('module');
$GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
+
+
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+include_once $path . '/mainfile.php';
+
+$dirname = basename(dirname(dirname(__FILE__)));
+$module_handler = xoops_gethandler('module');
+$module = $module_handler->getByDirname($dirname);
+$pathIcon32 = $module->getInfo('icons32');
+$pathModuleAdmin = $module->getInfo('dirmoduleadmin');
+$pathLanguage = $path . $pathModuleAdmin;
+
+
+if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) {
+ $fileinc = $pathLanguage . '/language/english/main.php';
+}
+
$adminmenu = array();
-$adminmenu[0]['title'] = _ALBM_MYALBUM_ADMENU_DASHBOARD;
-$adminmenu[0]['icon'] = '../../'.$GLOBALS['myalbumModule']->getInfo('icons32').'/home.png';
-$adminmenu[0]['image'] = '../../'.$GLOBALS['myalbumModule']->getInfo('icons32').'/home.png';
-$adminmenu[0]['link'] = "admin/dashboard.php";
-$adminmenu[1]['title'] = _ALBM_MYALBUM_ADMENU2;
-$adminmenu[1]['icon'] = '/icons/32/myalbum.index.png';
-$adminmenu[1]['image'] = '/icons/32/myalbum.index.png';
-$adminmenu[1]['link'] = "admin/index.php";
-$adminmenu[2]['title'] = _ALBM_MYALBUM_ADMENU1;
-$adminmenu[2]['icon'] = '/icons/32/myalbum.photomanager.png';
-$adminmenu[2]['image'] = '/icons/32/myalbum.photomanager.png';
-$adminmenu[2]['link'] = "admin/photomanager.php";
-$adminmenu[3]['title'] = _ALBM_MYALBUM_ADMENU0;
-$adminmenu[3]['icon'] = '/icons/32/myalbum.admission.png';
-$adminmenu[3]['image'] = '/icons/32/myalbum.admission.png';
-$adminmenu[3]['link'] = "admin/admission.php";
-$adminmenu[4]['title'] = _ALBM_MYALBUM_ADMENU4;
-$adminmenu[4]['icon'] = '/icons/32/myalbum.batch.png';
-$adminmenu[4]['image'] = '/icons/32/myalbum.batch.png';
-$adminmenu[4]['link'] = "admin/batch.php";
-$adminmenu[5]['title'] = _ALBM_MYALBUM_ADMENU5;
-$adminmenu[5]['icon'] = '/icons/32/myalbum.redothumbs.png';
-$adminmenu[5]['image'] = '/icons/32/myalbum.redothumbs.png';
-$adminmenu[5]['link'] = "admin/redothumbs.php";
-$adminmenu[6]['title'] = _ALBM_MYALBUM_ADMENU_IMPORT;
-$adminmenu[6]['icon'] = '/icons/32/myalbum.import.png';
-$adminmenu[6]['image'] = '/icons/32/myalbum.import.png';
-$adminmenu[6]['link'] = "admin/import.php";
-$adminmenu[7]['title'] = _ALBM_MYALBUM_ADMENU_EXPORT;
-$adminmenu[7]['icon'] = '/icons/32/myalbum.export.png';
-$...
[truncated message content] |