|
From: <be...@us...> - 2013-10-04 11:06:57
|
Revision: 12123
http://sourceforge.net/p/xoops/svn/12123
Author: beckmi
Date: 2013-10-04 11:06:51 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
fix: sorting in the category view (walkero/mamba)
Modified Paths:
--------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.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/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygroupperm.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygrouppermform.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/myalbum0_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum1_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum2_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_rphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_tophits.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_topnews.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/cat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/comments.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myalbum.textsanitizer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myuploader.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/photos.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/text.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/votedata.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/close.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_delete.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_edit.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_new.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_post.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_reply.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/readme.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/editphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/imagemanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/assign_globals.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/blocksadmin.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/comment_functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/draw_functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/get_perms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/gtickets.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/myalbum.forms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/notification.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/oninstall.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/onupdate.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/photo_orders.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/preferences.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/read_configs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/search.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/sitemap.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/updateblock.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/waiting.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/admin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/blocks.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/help.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/modinfo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/myalbum_constants.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/list.tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/notification_update.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/photo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/ratephoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/rss.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/submit.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/test.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/topten.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/view.tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/viewcat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/xoops_version.php
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -27,4 +27,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include_once 'admin_footer.php';
\ No newline at end of file
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -27,4 +27,4 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,86 +1,83 @@
<?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';
-
-
- if (!defined('_CHARSET'))
- define ("_CHARSET","UTF-8");
- if (!defined('_CHARSET_ISO'))
- define ("_CHARSET_ISO","ISO-8859-1");
-
- $GLOBALS['myts'] = MyTextSanitizer::getInstance();
-
- $module_handler = xoops_gethandler('module');
- $config_handler = xoops_gethandler('config');
- $GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
- $GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
- $GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
- $GLOBALS['photos_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
- $GLOBALS['photos_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
-
- xoops_load('pagenav');
- xoops_load('xoopslists');
- xoops_load('xoopsformloader');
-
- include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php');
- include_once $GLOBALS['xoops']->path('class'.DS.'tree.php');
+ require_once (dirname(dirname(__FILE__))).'/include/functions.php';
+ require_once (dirname(dirname(__FILE__))).'/include/read_configs.php';
- $cat_handler = xoops_getmodulehandler('cat');
- $cats = $cat_handler->getObjects(NULL, true);
- $GLOBALS['cattree'] = new XoopsObjectTree( $cats , 'cid' , 'pid', 0 ) ;
-
- if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
+ if (!defined('_CHARSET'))
+ define ("_CHARSET","UTF-8");
+ if (!defined('_CHARSET_ISO'))
+ define ("_CHARSET_ISO","ISO-8859-1");
+
+ $GLOBALS['myts'] = MyTextSanitizer::getInstance();
+
+ $module_handler = xoops_gethandler('module');
+ $config_handler = xoops_gethandler('config');
+ $GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
+ $GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
+ $GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
+ $GLOBALS['photos_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+ $GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+ $GLOBALS['photos_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+ $GLOBALS['thumbs_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+
+ xoops_load('pagenav');
+ xoops_load('xoopslists');
+ xoops_load('xoopsformloader');
+
+ include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php');
+ include_once $GLOBALS['xoops']->path('class'.DS.'tree.php');
+
+ $cat_handler = xoops_getmodulehandler('cat');
+ $cats = $cat_handler->getObjects(NULL, true);
+ $GLOBALS['cattree'] = new XoopsObjectTree( $cats , 'cid' , 'pid', 0 ) ;
+
+ if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
- }else{
+ } else {
echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
}
-
- $GLOBALS['myalbumImageIcon'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons16');
- $GLOBALS['myalbumImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons32');
-
- if ($GLOBALS['xoopsUser']) {
- $moduleperm_handler =& xoops_gethandler('groupperm');
- if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) {
- redirect_header(XOOPS_URL, 1, _NOPERM);
- exit();
- }
- } else {
- redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
- exit();
- }
- xoops_loadLanguage('user');
- xoops_loadLanguage('admin', $mydirname);
- xoops_loadLanguage('main', $mydirname);
+ $GLOBALS['myalbumImageIcon'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons16');
+ $GLOBALS['myalbumImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons32');
+ if ($GLOBALS['xoopsUser']) {
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) {
+ redirect_header(XOOPS_URL, 1, _NOPERM);
+ exit();
+ }
+ } else {
+ redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
+ exit();
+ }
+
+ 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");
- $GLOBALS['xoopsTpl'] = new XoopsTpl();
- }
-
- $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
- $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
- if( isset( $_GET['lid'] ) ) {
- $lid = intval( $_GET['lid' ] ) ;
- $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid",0);
- list( $submitter ) = $GLOBALS['xoopsDB']->fetchRow( $result ) ;
- } else {
- $submitter = $GLOBALS['xoopsUser']->getVar('uid') ;
- }
+ if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $GLOBALS['xoopsTpl'] = new XoopsTpl();
+ }
- if ($GLOBALS['myalbumModuleConfig']['tag']) {
- include_once $GLOBALS['xoops']->path('modules'.DS.'tag'.DS.'include'.DS.'formtag.php');
- }
-
- extract($GLOBALS['myalbumModuleConfig']);
-
-?>
\ No newline at end of file
+ $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
+ $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
+
+ if ( isset( $_GET['lid'] ) ) {
+ $lid = intval( $_GET['lid' ] ) ;
+ $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid",0);
+ list( $submitter ) = $GLOBALS['xoopsDB']->fetchRow( $result ) ;
+ } else {
+ $submitter = $GLOBALS['xoopsUser']->getVar('uid') ;
+ }
+
+ if ($GLOBALS['myalbumModuleConfig']['tag']) {
+ include_once $GLOBALS['xoops']->path('modules'.DS.'tag'.DS.'include'.DS.'formtag.php');
+ }
+
+ extract($GLOBALS['myalbumModuleConfig']);
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,78 +1,77 @@
-<?php
-// ------------------------------------------------------------------------- //
-// myAlbum-P - XOOPS photo album //
-// <http://www.peak.ne.jp/> //
-// ------------------------------------------------------------------------- //
-
-include( "admin_header.php" ) ;
-
-// GET vars
-$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ;
-$num = empty( $_GET[ 'num' ] ) ? 10 : intval( $_GET[ 'num' ] ) ;
-$txt = empty( $_GET[ 'txt' ] ) ? '' : $GLOBALS['myts']->stripSlashesGPC( trim( $_GET[ 'txt' ] ) ) ;
-
-
-if( ! empty( $_POST['action'] ) && $_POST['action'] == 'admit' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
-
- $photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->setStatus($_POST[ 'ids' ], 1);
- redirect_header( 'admission.php' , 2 , _ALBM_AM_ADMITTING ) ;
- exit ;
-
-} else if( ! empty( $_POST['action'] ) && $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
-
- // remove records
-
- // Double check for anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- $photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->deletePhotos($_POST[ 'ids' ]);
-
- redirect_header( "admission.php" , 2 , _ALBM_DELETINGPHOTO ) ;
- exit ;
-}
-
-$photosHandler = xoops_getmodulehandler('photos');
-
-// extracting by free word
-$criteria = new CriteriaCompo(new Criteria('`status`', '0', '<='));
-if( $txt != "" ) {
- $keywords = explode( " " , $txt ) ;
- foreach( $keywords as $keyword ) {
- $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%'.$keyword.'%', 'LIKE'), "AND");
- }
-}
-xoops_cp_header();
-$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']);
-$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
-$GLOBALS['xoopsTpl']->assign('txt', $txt);
-$GLOBALS['xoopsTpl']->assign('num', $num);
-$GLOBALS['xoopsTpl']->assign('pos', $pos);
-
-// query for listing count
-$numrows = $photosHandler->getCount($criteria);
-
-// Page Navigation
-$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num&txt=" . urlencode($txt) ) ;
-$nav_html = $nav->renderNav( 10 ) ;
-$GLOBALS['xoopsTpl']->assign('nav_html', $nav_html);
-
-$criteria = new Criteria('`status`', '0', '<=');
-$criteria->setStart($pos);
-$criteria->setLimit($num);
-
-foreach( $photosHandler->getObjects($criteria, true) as $lid => $photo) {
- $GLOBALS['xoopsTpl']->append('photos', $photo->toArray());
-}
-
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
-
-// check $xoopsModule
-// myalbum_footer_adminMenu();
-include_once 'admin_footer.php';
+<?php
+// ------------------------------------------------------------------------- //
+// myAlbum-P - XOOPS photo album //
+// <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+
+include 'admin_header.php' ;
+
+// GET vars
+$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ;
+$num = empty( $_GET[ 'num' ] ) ? 10 : intval( $_GET[ 'num' ] ) ;
+$txt = empty( $_GET[ 'txt' ] ) ? '' : $GLOBALS['myts']->stripSlashesGPC( trim( $_GET[ 'txt' ] ) ) ;
+
+if ( ! empty( $_POST['action'] ) && $_POST['action'] == 'admit' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+
+ $photosHandler = xoops_getmodulehandler('photos');
+ @$photosHandler->setStatus($_POST[ 'ids' ], 1);
+ redirect_header( 'admission.php' , 2 , _ALBM_AM_ADMITTING ) ;
+ exit ;
+
+} elseif ( ! empty( $_POST['action'] ) && $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+
+ // remove records
+
+ // Double check for anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ $photosHandler = xoops_getmodulehandler('photos');
+ @$photosHandler->deletePhotos($_POST[ 'ids' ]);
+
+ redirect_header( "admission.php" , 2 , _ALBM_DELETINGPHOTO ) ;
+ exit ;
+}
+
+$photosHandler = xoops_getmodulehandler('photos');
+
+// extracting by free word
+$criteria = new CriteriaCompo(new Criteria('`status`', '0', '<='));
+if ($txt != "") {
+ $keywords = explode( " " , $txt ) ;
+ foreach ($keywords as $keyword) {
+ $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%'.$keyword.'%', 'LIKE'), "AND");
+ }
+}
+xoops_cp_header();
+$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']);
+$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+$GLOBALS['xoopsTpl']->assign('txt', $txt);
+$GLOBALS['xoopsTpl']->assign('num', $num);
+$GLOBALS['xoopsTpl']->assign('pos', $pos);
+
+// query for listing count
+$numrows = $photosHandler->getCount($criteria);
+
+// Page Navigation
+$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num&txt=" . urlencode($txt) ) ;
+$nav_html = $nav->renderNav( 10 ) ;
+$GLOBALS['xoopsTpl']->assign('nav_html', $nav_html);
+
+$criteria = new Criteria('`status`', '0', '<=');
+$criteria->setStart($pos);
+$criteria->setLimit($num);
+
+foreach ( $photosHandler->getObjects($criteria, true) as $lid => $photo) {
+ $GLOBALS['xoopsTpl']->append('photos', $photo->toArray());
+}
+
+$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
+
+// check $xoopsModule
+// 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-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -4,7 +4,7 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include( "admin_header.php" ) ;
+include 'admin_header.php' ;
// GPCS vars
$GLOBALS['submitter'] = empty( $_POST['submitter'] ) ? $my_uid : intval( $_POST['submitter'] ) ;
@@ -15,109 +15,107 @@
$GLOBALS['title4edit'] = isset( $_POST['title'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) : '' ;
$GLOBALS['desc4edit'] = isset( $_POST['desc'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['desc'] ) : '' ;
-
// reject Not Admin
-if( ! $isadmin ) {
- redirect_header( $mod_url , 2 , _ALBM_MUSTREGFIRST ) ;
- exit ;
+if (! $isadmin) {
+ redirect_header( $mod_url , 2 , _ALBM_MUSTREGFIRST ) ;
+ exit ;
}
-
$catHandler = xoops_getmodulehandler('cat');
// check Categories exist
$count = $catHandler->getCount();
-if( $count < 1 ) {
- redirect_header(XOOPS_URL."/modules/$mydirname/",2,_ALBM_MUSTADDCATFIRST);
- exit();
+if ($count < 1) {
+ redirect_header(XOOPS_URL."/modules/$mydirname/",2,_ALBM_MUSTADDCATFIRST);
+ exit();
}
$photosHandler = xoops_getmodulehandler('photos');
$textHandler = xoops_getmodulehandler('text');
-if( isset( $_POST['submit'] ) && $_POST['submit'] != "" ) {
- ob_start() ;
+if ( isset( $_POST['submit'] ) && $_POST['submit'] != "" ) {
+ ob_start() ;
- // Check Directory
- $dir = $GLOBALS['myts']->stripSlashesGPC( $_POST['dir'] ) ;
- if( empty( $dir ) || ! is_dir( $dir ) ) {
- if( ord( $dir ) != 0x2f ) $dir = "/$dir" ;
- $prefix = XOOPS_ROOT_PATH ;
- while( strlen( $prefix ) > 0 ) {
- if( is_dir( "$prefix$dir" ) ) {
- $dir = "$prefix$dir" ;
- break ;
- }
- $prefix = substr( $prefix , 0 , strrpos( $prefix , '/' ) ) ;
- }
- if( ! is_dir( $dir ) ) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
- }
- }
- if( substr( $dir , -1 ) == '/' ) $dir = substr( $dir , 0 , -1 ) ;
+ // Check Directory
+ $dir = $GLOBALS['myts']->stripSlashesGPC( $_POST['dir'] ) ;
+ if ( empty( $dir ) || ! is_dir( $dir ) ) {
+ if( ord( $dir ) != 0x2f ) $dir = "/$dir" ;
+ $prefix = XOOPS_ROOT_PATH ;
+ while ( strlen( $prefix ) > 0 ) {
+ if ( is_dir( "$prefix$dir" ) ) {
+ $dir = "$prefix$dir" ;
+ break ;
+ }
+ $prefix = substr( $prefix , 0 , strrpos( $prefix , '/' ) ) ;
+ }
+ if ( ! is_dir( $dir ) ) {
+ redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
+ exit ;
+ }
+ }
+ if( substr( $dir , -1 ) == '/' ) $dir = substr( $dir , 0 , -1 ) ;
- $title4save = $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) ;
- $desc4save = $GLOBALS['myts']->makeTareaData4Save( $_POST['desc'] ) ;
+ $title4save = $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) ;
+ $desc4save = $GLOBALS['myts']->makeTareaData4Save( $_POST['desc'] ) ;
- $date = strtotime( $_POST['post_date'] ) ;
- if( $date == -1 ) $date = time() ;
+ $date = strtotime( $_POST['post_date'] ) ;
+ if( $date == -1 ) $date = time() ;
- $dir_h = opendir( $dir ) ;
- if( $dir_h === false ) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
- }
- $filecount = 1 ;
- while( $file_name = readdir( $dir_h ) ) {
+ $dir_h = opendir( $dir ) ;
+ if ($dir_h === false) {
+ redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
+ exit ;
+ }
+ $filecount = 1 ;
+ while ( $file_name = readdir( $dir_h ) ) {
- // Skip '.' , '..' and hidden file
- if( substr( $file_name , 0 , 1 ) == '.' ) continue ;
+ // Skip '.' , '..' and hidden file
+ if( substr( $file_name , 0 , 1 ) == '.' ) continue ;
- $ext = substr( strrchr( $file_name , '.' ) , 1 ) ;
- $node = substr( $file_name , 0 , - strlen( $ext ) - 1 ) ;
- $file_path = "$dir/$node.$ext" ;
+ $ext = substr( strrchr( $file_name , '.' ) , 1 ) ;
+ $node = substr( $file_name , 0 , - strlen( $ext ) - 1 ) ;
+ $file_path = "$dir/$node.$ext" ;
- $title = empty( $_POST['title'] ) ? addslashes( $node ) : "$title4save $filecount" ;
+ $title = empty( $_POST['title'] ) ? addslashes( $node ) : "$title4save $filecount" ;
- if( is_readable( $file_path ) && in_array( strtolower( $ext ) , $array_allowed_exts ) ) {
- if( ! in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- list( $w , $h ) = getimagesize( $file_path ) ;
- } else {
- list( $w , $h ) = array( 0 , 0 ) ;
- }
- $photo = $photosHandler->create();
- $photo->setVar('cid', $cid);
- $photo->setVar('title', $title);
- $photo->setVar('ext', $ext);
- $photo->setVar('res_x', $w);
- $photo->setVar('res_y', $h);
- $photo->setVar('submitter', $submitter);
- $photo->setVar('date', $date);
- $photo->setVar('status', 1);
- if( $lid = $photosHandler->insert($photo) ) {
- print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n" ;
- copy( $file_path , $GLOBALS['photos_dir'].DS."$lid.$ext" ) ;
- myalbum_create_thumb( $GLOBALS['photos_dir'].DS."$lid.$ext" , $lid , $ext ) ;
- $text = $textHandler->create();
- $text->setVar('lid', $lid);
- $text->setVar('description', $desc4save);
- $textHandler->insert($text);
- echo _AM_MB_FINISHED."<br />\n" ;
- }
+ if ( is_readable( $file_path ) && in_array( strtolower( $ext ) , $array_allowed_exts ) ) {
+ if ( ! in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
+ list( $w , $h ) = getimagesize( $file_path ) ;
+ } else {
+ list( $w , $h ) = array( 0 , 0 ) ;
+ }
+ $photo = $photosHandler->create();
+ $photo->setVar('cid', $cid);
+ $photo->setVar('title', $title);
+ $photo->setVar('ext', $ext);
+ $photo->setVar('res_x', $w);
+ $photo->setVar('res_y', $h);
+ $photo->setVar('submitter', $submitter);
+ $photo->setVar('date', $date);
+ $photo->setVar('status', 1);
+ if ( $lid = $photosHandler->insert($photo) ) {
+ print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n" ;
+ copy( $file_path , $GLOBALS['photos_dir'].DS."$lid.$ext" ) ;
+ myalbum_create_thumb( $GLOBALS['photos_dir'].DS."$lid.$ext" , $lid , $ext ) ;
+ $text = $textHandler->create();
+ $text->setVar('lid', $lid);
+ $text->setVar('description', $desc4save);
+ $textHandler->insert($text);
+ echo _AM_MB_FINISHED."<br />\n" ;
+ }
- $filecount ++ ;
- }
- }
- closedir( $dir_h ) ;
+ $filecount ++ ;
+ }
+ }
+ closedir( $dir_h ) ;
- if( $filecount <= 1 ) {
- echo "<p>$dir4edit : "._ALBM_MES_BATCHNONE."</p>" ;
- } else {
- printf( "<p>"._ALBM_MES_BATCHDONE."</p>" , $filecount - 1 ) ;
- }
+ if ($filecount <= 1) {
+ echo "<p>$dir4edit : "._ALBM_MES_BATCHNONE."</p>" ;
+ } else {
+ printf( "<p>"._ALBM_MES_BATCHDONE."</p>" , $filecount - 1 ) ;
+ }
- $result_str = ob_get_contents() ;
- ob_end_clean() ;
+ $result_str = ob_get_contents() ;
+ ob_end_clean() ;
}
xoops_cp_header();
@@ -130,7 +128,7 @@
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_admission());
if (isset($result_str))
- $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+ $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_batch.html');
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,97 +1,94 @@
<?php
- // ------------------------------------------------------------------------- //
- // myAlbum-P - XOOPS photo album //
- // <http://www.peak.ne.jp/> //
- // ------------------------------------------------------------------------- //
- include( "admin_header.php" ) ;
- include_once( XOOPS_ROOT_PATH . '/modules/system/constants.php' ) ;
-
- // To imagemanager
- if( ! empty( $_POST['imagemanager_export'] ) && ! empty( $_POST['imgcat_id'] ) && ! empty( $_POST['cid'] ) ) {
-
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) exit ;
-
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- // get dst information
- $dst_cid = intval( $_POST['imgcat_id'] ) ;
- $dst_table_photos = $xoopsDB->prefix( "image" ) ;
- $dst_table_cat = $xoopsDB->prefix( "imagecategory" ) ;
-
- // get src information
- $src_cid = intval( $_POST['cid'] ) ;
- $src_table_photos = $xoopsDB->prefix($table_photos) ;
- $src_table_cat = $xoopsDB->prefix($table_cat);
-
- // get storetype of the imgcat
- $crs = $xoopsDB->query( "SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'" ) or die( 'Invalid imgcat_id.' ) ;
- list( $imgcat_storetype,$imgcat_maxsize ) = $xoopsDB->fetchRow( $crs ) ;
-
- // mime type look up
- $mime_types = array( 'gif' => 'image/gif' , 'png' => 'image/png' , 'jpg' => 'image/jpeg' , 'jpeg' => 'image/jpeg' ) ;
-
- // INSERT loop
- $srs = $xoopsDB->query( "SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $export_count = 0 ;
- while( list( $lid,$ext,$title,$date,$status ) = $xoopsDB->fetchRow( $srs ) ) {
-
- $dst_node = uniqid( 'img' ) ;
- $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}" ;
- $src_file = empty( $_POST['use_thumb'] ) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}" ;
-
- if( $imgcat_storetype == 'db' ) {
- $fp = fopen( $src_file , "rb" ) ;
- if( $fp == false ) continue ;
- $body = addslashes( fread( $fp , filesize( $src_file ) ) ) ;
- fclose( $fp ) ;
- } else {
- if( ! copy( $src_file , $dst_file ) ) continue ;
- $body = '' ;
- }
-
- // insert into image table
- $image_display = $status ? 1 : 0 ;
- $xoopsDB->query( "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='".addslashes($title)."',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'" ) or die( "DB error: INSERT image table" ) ;
- if( $body ) {
- $image_id = $xoopsDB->getInsertId() ;
- $xoopsDB->query( "INSERT INTO ".$xoopsDB->prefix("imagebody")." SET image_id='$image_id',image_body='$body'" ) ;
- }
-
- $export_count ++ ;
- }
-
- redirect_header( 'export.php' , 2 , sprintf( _AM_FMT_EXPORTSUCCESS , $export_count ) ) ;
- exit ;
- }
+ // ------------------------------------------------------------------------- //
+ // myAlbum-P - XOOPS photo album //
+ // <http://www.peak.ne.jp/> //
+ // ------------------------------------------------------------------------- //
+ include 'admin_header.php' ;
+ include_once( XOOPS_ROOT_PATH . '/modules/system/constants.php' ) ;
- //
- // Form Part
- //
-
-
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
- xoops_cp_header();
+ // To imagemanager
+ if ( ! empty( $_POST['imagemanager_export'] ) && ! empty( $_POST['imgcat_id'] ) && ! empty( $_POST['cid'] ) ) {
+
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) exit ;
+
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ // get dst information
+ $dst_cid = intval( $_POST['imgcat_id'] ) ;
+ $dst_table_photos = $xoopsDB->prefix( "image" ) ;
+ $dst_table_cat = $xoopsDB->prefix( "imagecategory" ) ;
+
+ // get src information
+ $src_cid = intval( $_POST['cid'] ) ;
+ $src_table_photos = $xoopsDB->prefix($table_photos) ;
+ $src_table_cat = $xoopsDB->prefix($table_cat);
+
+ // get storetype of the imgcat
+ $crs = $xoopsDB->query( "SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'" ) or die( 'Invalid imgcat_id.' ) ;
+ list( $imgcat_storetype,$imgcat_maxsize ) = $xoopsDB->fetchRow( $crs ) ;
+
+ // mime type look up
+ $mime_types = array( 'gif' => 'image/gif' , 'png' => 'image/png' , 'jpg' => 'image/jpeg' , 'jpeg' => 'image/jpeg' ) ;
+
+ // INSERT loop
+ $srs = $xoopsDB->query( "SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'" ) ;
+ $export_count = 0 ;
+ while ( list( $lid,$ext,$title,$date,$status ) = $xoopsDB->fetchRow( $srs ) ) {
+
+ $dst_node = uniqid( 'img' ) ;
+ $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}" ;
+ $src_file = empty( $_POST['use_thumb'] ) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}" ;
+
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen( $src_file , "rb" ) ;
+ if( $fp == false ) continue ;
+ $body = addslashes( fread( $fp , filesize( $src_file ) ) ) ;
+ fclose( $fp ) ;
+ } else {
+ if( ! copy( $src_file , $dst_file ) ) continue ;
+ $body = '' ;
+ }
+
+ // insert into image table
+ $image_display = $status ? 1 : 0 ;
+ $xoopsDB->query( "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='".addslashes($title)."',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'" ) or die( "DB error: INSERT image table" ) ;
+ if ($body) {
+ $image_id = $xoopsDB->getInsertId() ;
+ $xoopsDB->query( "INSERT INTO ".$xoopsDB->prefix("imagebody")." SET image_id='$image_id',image_body='$body'" ) ;
+ }
+
+ $export_count ++ ;
+ }
+
+ redirect_header( 'export.php' , 2 , sprintf( _AM_FMT_EXPORTSUCCESS , $export_count ) ) ;
+ exit ;
+ }
+
+ //
+ // Form Part
+ //
+
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if ( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
+ xoops_cp_header();
$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']);
- $GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
- $GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_export());
-
- $GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
-
- // check $GLOBALS['myalbumModule']
+ $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']);
+ $GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+ $GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_export());
+
+ $GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
+
+ // check $GLOBALS['myalbumModule']
// myalbum_footer_adminMenu();
include_once 'admin_footer.php';
- } else {
- redirect_header('dashboard.php', 5, _NOPERM);
- }
-
-?>
\ No newline at end of file
+ } 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-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,27 +1,27 @@
-<?php
-include_once( 'admin_header.php' ) ;
-include_once( 'mygrouppermform.php' ) ;
-
-xoops_loadLanguage('admin', 'system');
-
-if( ! empty( $_POST['submit'] ) ) {
- include( "mygroupperm.php" ) ;
- redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/groupperm_global.php" , 1 , _AM_ALBM_GPERMUPDATED );
-}
-
-xoops_cp_header();
-$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']);
-$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
-$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_groups());
-if (isset($result_str))
- $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
-
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
-
-// myalbum_footer_adminMenu();
-include_once 'admin_footer.php';
+<?php
+include_once 'admin_header.php' ;
+include_once 'mygrouppermform.php' ;
+
+xoops_loadLanguage('admin', 'system');
+
+if ( ! empty( $_POST['submit'] ) ) {
+ include 'mygroupperm.php' ;
+ redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/groupperm_global.php" , 1 , _AM_ALBM_GPERMUPDATED );
+}
+
+xoops_cp_header();
+$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']);
+$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_groups());
+if (isset($result_str))
+ $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+
+$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
+
+// 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-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -4,155 +4,154 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include( "admin_header.php" ) ;
+include 'admin_header.php' ;
// From myalbum*
-if( ! empty( $_POST['myalbum_import'] ) && ! empty( $_POST['cid'] ) ) {
+if ( ! empty( $_POST['myalbum_import'] ) && ! empty( $_POST['cid'] ) ) {
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
- // get src module
- $src_cid = intval( $_POST['cid'] ) ;
- $src_dirname = empty( $_POST['src_dirname'] ) ? '' : $_POST['src_dirname'] ;
- if( $mydirname == $src_dirname ) die( "source dirname is same as dest dirname: " . htmlspecialchars( $src_dirname ) ) ;
- if( ! preg_match( '/^myalbum(\d*)$/' , $src_dirname , $regs ) ) die( "invalid dirname of myalbum: " . htmlspecialchars( $src_dirname ) ) ;
- $module =& $module_handler->getByDirname( $src_dirname ) ;
- if( ! is_object( $module ) ) die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) ) ;
- $src_mid = $module->getvar( 'mid' ) ;
+ // get src module
+ $src_cid = intval( $_POST['cid'] ) ;
+ $src_dirname = empty( $_POST['src_dirname'] ) ? '' : $_POST['src_dirname'] ;
+ if( $mydirname == $src_dirname ) die( "source dirname is same as dest dirname: " . htmlspecialchars( $src_dirname ) ) ;
+ if( ! preg_match( '/^myalbum(\d*)$/' , $src_dirname , $regs ) ) die( "invalid dirname of myalbum: " . htmlspecialchars( $src_dirname ) ) ;
+ $module =& $module_handler->getByDirname( $src_dirname ) ;
+ if( ! is_object( $module ) ) die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) ) ;
+ $src_mid = $module->getvar( 'mid' ) ;
- // authority check
- if( ! $GLOBALS['xoopsUser']->isAdmin( $src_mid ) ) exit ;
+ // authority check
+ if( ! $GLOBALS['xoopsUser']->isAdmin( $src_mid ) ) exit ;
- // read configs from xoops_config directly
- $rs = $GLOBALS['xoopsDB']->query( "SELECT conf_name,conf_value FROM ".$GLOBALS['xoopsDB']->prefix('config')." WHERE conf_modid='$src_mid'" ) ;
- while( list( $key , $val ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- $src_configs[ $key ] = $val ;
- }
- $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'] ;
- $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'] ;
- // src table names
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_photos" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_cat" ) ;
- $src_table_text = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_text" ) ;
- $src_table_votedata = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_votedata" ) ;
+ // read configs from xoops_config directly
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT conf_name,conf_value FROM ".$GLOBALS['xoopsDB']->prefix('config')." WHERE conf_modid='$src_mid'" ) ;
+ while ( list( $key , $val ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ $src_configs[ $key ] = $val ;
+ }
+ $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'] ;
+ $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'] ;
+ // src table names
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_photos" ) ;
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_cat" ) ;
+ $src_table_text = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_text" ) ;
+ $src_table_votedata = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_votedata" ) ;
- if( isset( $_POST['copyormove'] ) && $_POST['copyormove'] == 'move' ) $move_mode = true ;
- else $move_mode = false ;
+ if( isset( $_POST['copyormove'] ) && $_POST['copyormove'] == 'move' ) $move_mode = true ;
+ else $move_mode = false ;
- // create category
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'") or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // create category
+ $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'") or die( "DB error: INSERT cat table" ) ;
+ $cid = $GLOBALS['xoopsDB']->getInsertId() ;
- // INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $import_count = 0 ;
- while( list( $src_lid , $ext ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ // INSERT loop
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'" ) ;
+ $import_count = 0 ;
+ while ( list( $src_lid , $ext ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- // photos table
- $set_comments = $move_mode ? 'comments' : "'0'" ;
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // photos table
+ $set_comments = $move_mode ? 'comments' : "'0'" ;
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
+ $lid = $GLOBALS['xoopsDB']->getInsertId() ;
- // text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // text table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- // votedata table
- $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix( $table_votedata ) . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // votedata table
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix( $table_votedata ) . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- @copy( "$src_photos_dir/{$src_lid}.{$ext}" , "$photos_dir/{$lid}.{$ext}" ) ;
- if( in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- @copy( "$src_thumbs_dir/{$src_lid}.{$ext}" , "$thumbs_dir/{$lid}.{$ext}" ) ;
- } else {
- @copy( "$src_photos_dir/{$src_lid}.gif" , "$photos_dir/{$lid}.gif" ) ;
- @copy( "$src_thumbs_dir/{$src_lid}.gif" , "$thumbs_dir/{$lid}.gif" ) ; }
+ @copy( "$src_photos_dir/{$src_lid}.{$ext}" , "$photos_dir/{$lid}.{$ext}" ) ;
+ if ( in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
+ @copy( "$src_thumbs_dir/{$src_lid}.{$ext}" , "$thumbs_dir/{$lid}.{$ext}" ) ;
+ } else {
+ @copy( "$src_photos_dir/{$src_lid}.gif" , "$photos_dir/{$lid}.gif" ) ;
+ @copy( "$src_thumbs_dir/{$src_lid}.gif" , "$thumbs_dir/{$lid}.gif" ) ; }
- // exec only moving mode
- if( $move_mode ) {
- // moving comments
- $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('xoopscomments')." SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // exec only moving mode
+ if ($move_mode) {
+ // moving comments
+ $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('xoopscomments')." SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- // delete source photos
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text , $table_votedata , $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) = array( $src_photos_dir , $src_thumbs_dir , $src_mid , $src_table_photos , $src_table_text , $src_table_votedata , $photos_dir , $thumbs_dir , $myalbum_mid , $GLOBALS['xoopsDB']->prefix( $table_photos ), $GLOBALS['xoopsDB']->prefix( $table_text ) , $GLOBALS['xoopsDB']->prefix( $table_votedata ) ) ;
- myalbum_delete_photos( "lid='$src_lid'" ) ;
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text ,$table_votedata ) = array( $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) ; }
+ // delete source photos
+ list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text , $table_votedata , $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) = array( $src_photos_dir , $src_thumbs_dir , $src_mid , $src_table_photos , $src_table_text , $src_table_votedata , $photos_dir , $thumbs_dir , $myalbum_mid , $GLOBALS['xoopsDB']->prefix( $table_photos ), $GLOBALS['xoopsDB']->prefix( $table_text ) , $GLOBALS['xoopsDB']->prefix( $table_votedata ) ) ;
+ myalbum_delete_photos( "lid='$src_lid'" ) ;
+ list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text ,$table_votedata ) = array( $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) ; }
- $import_count ++ ;
- }
+ $import_count ++ ;
+ }
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
+ redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
+ exit ;
}
-
// From imagemanager
-else if( ! empty( $_POST['imagemanager_import'] ) && ! empty( $_POST['imgcat_id'] ) ) {
+else if ( ! empty( $_POST['imagemanager_import'] ) && ! empty( $_POST['imgcat_id'] ) ) {
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups() ) ) exit ;
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups() ) ) exit ;
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
- // get src information
- $src_cid = intval( $_POST['imgcat_id'] ) ;
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "image" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "imagecategory" ) ;
+ // get src information
+ $src_cid = intval( $_POST['imgcat_id'] ) ;
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix( "image" ) ;
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix( "imagecategory" ) ;
- // create category
- $crs = $GLOBALS['xoopsDB']->query( "SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'" ) ;
- list( $imgcat_name , $imgcat_storetype ) = $GLOBALS['xoopsDB']->fetchRow( $crs ) ;
+ // create category
+ $crs = $GLOBALS['xoopsDB']->query( "SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'" ) ;
+ list( $imgcat_name , $imgcat_storetype ) = $GLOBALS['xoopsDB']->fetchRow( $crs ) ;
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."SET pid=0,title='".addslashes($imgcat_name)."'" ) or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."SET pid=0,title='".addslashes($imgcat_name)."'" ) or die( "DB error: INSERT cat table" ) ;
+ $cid = $GLOBALS['xoopsDB']->getInsertId() ;
- // INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'" ) ;
- $import_count = 0 ;
- while( list( $image_id,$image_name,$image_nicename,$image_created,$image_display ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ // INSERT loop
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'" ) ;
+ $import_count = 0 ;
+ while ( list( $image_id,$image_name,$image_nicename,$image_created,$image_display ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- $src_file = XOOPS_UPLOAD_PATH . "/$image_name" ;
- $ext = substr( strrchr( $image_name , '.' ) , 1 ) ;
+ $src_file = XOOPS_UPLOAD_PATH . "/$image_name" ;
+ $ext = substr( strrchr( $image_name , '.' ) , 1 ) ;
- // photos table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET cid='$cid',title='".addslashes($image_nicename)."',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // photos table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET cid='$cid',title='".addslashes($image_nicename)."',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
+ $lid = $GLOBALS['xoopsDB']->getInsertId() ;
- // text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." SET lid='$lid',description=''" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // text table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." SET lid='$lid',description=''" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- $dst_file = "$photos_dir/{$lid}.{$ext}" ;
- if( $imgcat_storetype == 'db' ) {
- $fp = fopen( $dst_file , "wb" ) ;
- if( $fp == false ) continue ;
- $brs = $GLOBALS['xoopsDB']->query( "SELECT image_body FROM ".$GLOBALS['xoopsDB']->prefix("imagebody")." WHERE image_id='$image_id'" ) ;
- list( $body ) = $GLOBALS['xoopsDB']->fetchRow( $brs ) ;
- fwrite( $fp , $body ) ;
- fclose( $fp ) ;
- myalbum_create_thumb( $dst_file , $lid , $ext ) ;
- } else {
- @copy( $src_file , $dst_file ) ;
- myalbum_create_thumb( $src_file , $lid , $ext ) ;
- }
+ $dst_file = "$photos_dir/{$lid}.{$ext}" ;
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen( $dst_file , "wb" ) ;
+ if( $fp == false ) continue ;
+ $brs = $GLOBALS['xoopsDB']->query( "SELECT image_body FROM ".$GLOBALS['xoopsDB']->prefix("imagebody")." WHERE image_id='$image_id'" ) ;
+ list( $body ) = $GLOBALS['xoopsDB']->fetchRow( $brs ) ;
+ fwrite( $fp , $body ) ;
+ fclose( $fp ) ;
+ myalbum_create_thumb( $dst_file , $lid , $ext ) ;
+ } else {
+ @copy( $src_file , $dst_file ) ;
+ myalbum_create_thumb( $src_file , $lid , $ext ) ;
+ }
- list( $width , $height , $type ) = getimagesize( $dst_file ) ;
- $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET res_x='$width',res_y='$height' WHERE lid='$lid'" ) ;
+ list( $width , $height , $type ) = getimagesize( $dst_file ) ;
+ $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET res_x='$width',res_y='$height' WHERE lid='$lid'" ) ;
- $import_count ++ ;
- }
+ $import_count ++ ;
+ }
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
+ redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
+ exit ;
}
-include_once('../include/myalbum.forms.php');
+include_once '../include/myalbum.forms.php';
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('import.php');
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,42 +1,42 @@
<?php
- include ('admin_header.php');
- xoops_loadLanguage('admin');
-
- xoops_cp_header();
+ include 'admin_header.php';
+ xoops_loadLanguage('admin');
+ xoops_cp_header();
+
// myalbum_adminMenu(basename(__FILE__), 0);
- $indexAdmin = new ModuleAdmin();
+ $indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('index.php');
-
- $cat_handler = xoops_getmodulehandler('cat');
+
+ $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" ) ;
+ $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;
+ // 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_...
[truncated message content] |