From: <luc...@us...> - 2012-07-24 21:19:29
|
Revision: 9918 http://xoops.svn.sourceforge.net/xoops/?rev=9918&view=rev Author: luciorota Date: 2012-07-24 21:18:59 +0000 (Tue, 24 Jul 2012) Log Message: ----------- change directory structure & update to 2.5.x admin gui Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/import.php XoopsModules/xaddresses/trunk/xaddresses/admin/index.php XoopsModules/xaddresses/trunk/xaddresses/admin/location.php XoopsModules/xaddresses/trunk/xaddresses/admin/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/menu.php XoopsModules/xaddresses/trunk/xaddresses/admin/modified.php XoopsModules/xaddresses/trunk/xaddresses/admin/permissions.php XoopsModules/xaddresses/trunk/xaddresses/class/broken.php XoopsModules/xaddresses/trunk/xaddresses/class/field.php XoopsModules/xaddresses/trunk/xaddresses/class/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/class/formfilemanager.php XoopsModules/xaddresses/trunk/xaddresses/class/formgooglemap.php XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor.php XoopsModules/xaddresses/trunk/xaddresses/class/formmultiplexoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/class/marker.php XoopsModules/xaddresses/trunk/xaddresses/class/modify.php XoopsModules/xaddresses/trunk/xaddresses/class/votedata.php XoopsModules/xaddresses/trunk/xaddresses/docs/credits.txt XoopsModules/xaddresses/trunk/xaddresses/docs/install.txt XoopsModules/xaddresses/trunk/xaddresses/docs/lang_diff.txt XoopsModules/xaddresses/trunk/xaddresses/docs/licence.txt XoopsModules/xaddresses/trunk/xaddresses/docs/readme.txt XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/include/functions.php XoopsModules/xaddresses/trunk/xaddresses/include/install_function.php XoopsModules/xaddresses/trunk/xaddresses/index.php XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php XoopsModules/xaddresses/trunk/xaddresses/language/english/main.php XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php XoopsModules/xaddresses/trunk/xaddresses/language/lang_diff.txt XoopsModules/xaddresses/trunk/xaddresses/locationbroken.php XoopsModules/xaddresses/trunk/xaddresses/locationcategoryview.php XoopsModules/xaddresses/trunk/xaddresses/locationedit.php XoopsModules/xaddresses/trunk/xaddresses/locationmodify.php XoopsModules/xaddresses/trunk/xaddresses/locationrate.php XoopsModules/xaddresses/trunk/xaddresses/locationview.php XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldcategorylist.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_locationbrokenlist.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_locationcategorylist.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_locationlist.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_index.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationbroken.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationcategoryview.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationedit.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationmodify.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationrate.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationsearch.html XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_locationview.html XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Added Paths: ----------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.new.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/ XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/ XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/bar.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/blue-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/blue.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/dd-end.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/dd-start.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/down-arrow.gif XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/golfer.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/green-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/green.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/lodging.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/markerA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_blackA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_brownA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_greenA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_greyA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_orangeA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_purpleA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_whiteA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/marker_yellowA.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_black.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_blue.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_brown.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_gray.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_green.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_orange.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_purple.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_red.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_white.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/mm_20_yellow.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/orange-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/orange.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/plane.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/purple-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/purple.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/red-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/red.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/restaurant.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/sportvenue.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/square.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/yellow-dot.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/images/yellow.png XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/kmleditor.css XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/kmleditor.js XoopsModules/xaddresses/trunk/xaddresses/class/formkmleditor/kmleditor.php XoopsModules/xaddresses/trunk/xaddresses/class/language/ XoopsModules/xaddresses/trunk/xaddresses/class/language/english/ XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formfilemanager.php XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formgooglemap.php XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formkmleditor.php XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formmultiplefilemanager.php XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formmultiplexoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/class/language/english/formxoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/css/ XoopsModules/xaddresses/trunk/xaddresses/css/index.html XoopsModules/xaddresses/trunk/xaddresses/css/style.css XoopsModules/xaddresses/trunk/xaddresses/docs/changelog.txt XoopsModules/xaddresses/trunk/xaddresses/extra/ XoopsModules/xaddresses/trunk/xaddresses/extra/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/sitemap/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/sitemap/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/sitemap/xaddresses.php XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/tag/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/tag/xaddresses.php XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/waiting/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/waiting/xaddresses.php XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/whatsnew/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/whatsnew/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/whatsnew/xaddresses/ XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/whatsnew/xaddresses/data.inc.php XoopsModules/xaddresses/trunk/xaddresses/extra/plugins/whatsnew/xaddresses/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/ XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/ XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/tdmdownloads_block_new.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/tdmdownloads_block_random.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/tdmdownloads_block_rating.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/blocks/tdmdownloads_block_top.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_brokenfile.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_download.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_index.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_liste.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_modfile.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_ratefile.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_singlefile.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_submit.html XoopsModules/xaddresses/trunk/xaddresses/extra/templates_rtf/tdmdownloads_viewcat.html XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extension/ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extension/xaddresses/ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extension/xaddresses/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extension/xaddresses/xaddresses.php XoopsModules/xaddresses/trunk/xaddresses/images/bookmarks/ XoopsModules/xaddresses/trunk/xaddresses/images/bookmarks/index.html XoopsModules/xaddresses/trunk/xaddresses/images/icons/16x16/index.html XoopsModules/xaddresses/trunk/xaddresses/images/icons/arrow.gif XoopsModules/xaddresses/trunk/xaddresses/images/icons/index.html XoopsModules/xaddresses/trunk/xaddresses/images/icons/off.png XoopsModules/xaddresses/trunk/xaddresses/images/icons/on.png XoopsModules/xaddresses/trunk/xaddresses/images/menu/ XoopsModules/xaddresses/trunk/xaddresses/images/menu/bg.png XoopsModules/xaddresses/trunk/xaddresses/images/menu/index.html XoopsModules/xaddresses/trunk/xaddresses/images/menu/left_both.png XoopsModules/xaddresses/trunk/xaddresses/images/menu/right_both.png XoopsModules/xaddresses/trunk/xaddresses/images/xoopsmicrobutton.gif XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/js/ XoopsModules/xaddresses/trunk/xaddresses/js/index.html XoopsModules/xaddresses/trunk/xaddresses/js/script.js XoopsModules/xaddresses/trunk/xaddresses/kml/js_parser_Kml.js.html XoopsModules/xaddresses/trunk/xaddresses/language/english/changelog.org.txt XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_locationmodifylist.html Added: XoopsModules/xaddresses/trunk/xaddresses/admin/about.new.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.new.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.new.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * @license GPL see LICENSE + * @package xaddresses + * @author Rota Lucio ( luc...@gm... ) + * + * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +$aboutAdmin = new ModuleAdmin(); +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); +include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/about.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -10,10 +10,6 @@ // render start here xoops_cp_header(); -// main admin menu -include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); -echo moduleAdminTabMenu($adminmenu, $currentFile); - echo " <style type=\"text/css\"> label,text { @@ -36,27 +32,27 @@ echo "<div style='padding: 8px;'>"; echo "<img src='" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/" . $versionInfo->getInfo('image') . "' alt='' hspace='10' vspace='0' /></a>\n"; echo "<div style='padding: 5px;'><strong>" . $versionInfo->getInfo('name') . " version " . $versionInfo->getInfo('version') . "</strong></div>\n"; -echo "<label>" . _XADDRESSES_AM_ABOUT_RELEASEDATE . ":</label><text>" . date(_SHORTDATESTRING, $versionInfo->getInfo('release')) . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_CREDITS . ":</label><text>" . $versionInfo->getInfo('credits') . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_LICENSE . ":</label><text><a href=\"".$versionInfo->getInfo('license_file')."\" target=\"_blank\" >" . $versionInfo->getInfo('license') . "</a></text>\n"; +echo "<label>" . _AM_XADDRESSES_ABOUT_RELEASEDATE . ":</label><text>" . date(_SHORTDATESTRING, strtotime($versionInfo->getInfo('release_date'))) . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_CREDITS . ":</label><text>" . $versionInfo->getInfo('credits') . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_LICENSE . ":</label><text><a href=\"".$versionInfo->getInfo('license_file')."\" target=\"_blank\" >" . $versionInfo->getInfo('license') . "</a></text>\n"; echo "</div>"; echo "</fieldset>"; echo "<br clear=\"all\" />"; -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _XADDRESSES_AM_ABOUT_MODULEINFOS . "</legend>"; +echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_MODULEINFOS . "</legend>"; echo "<div style='padding: 8px;'>"; -echo "<label>" . _XADDRESSES_AM_ABOUT_STATUS . ":</label><text>" . $versionInfo->getInfo('module_status') . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_MODULEWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('support_site_url') . "' target='_blank'>" . $versionInfo->getInfo('support_site_name') . "</a>" . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_STATUS . ":</label><text>" . $versionInfo->getInfo('module_status') . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_MODULEWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('support_site_url') . "' target='_blank'>" . $versionInfo->getInfo('support_site_name') . "</a>" . "</text><br />"; echo "</div>"; echo "</fieldset>"; echo "<br clear=\"all\" />"; -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _XADDRESSES_AM_ABOUT_AUTHORINFOS . "</legend>"; +echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_AUTHORINFOS . "</legend>"; echo "<div style='padding: 8px;'>"; -echo "<label>" . _XADDRESSES_AM_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_AUTHORWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('author_website_url') . "' target='_blank'>" . $versionInfo->getInfo('author_website_name') . "</a>" . "</text><br />"; -echo "<label>" . _XADDRESSES_AM_ABOUT_AUTHOREMAIL . ":</label><text>" . "<a href='emailto:" . $versionInfo->getInfo('author_mail') . "' target='_blank'>" . $versionInfo->getInfo('author_mail') . "</a>" . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHORWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('author_website_url') . "' target='_blank'>" . $versionInfo->getInfo('author_website_name') . "</a>" . "</text><br />"; +echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOREMAIL . ":</label><text>" . "<a href='emailto:" . $versionInfo->getInfo('author_mail') . "' target='_blank'>" . $versionInfo->getInfo('author_mail') . "</a>" . "</text><br />"; echo "</div>"; echo "<br />"; @@ -83,7 +79,7 @@ $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/description.html"; } if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _XADDRESSES_AM_ABOUT_DESCRIPTION . "</legend>"; + echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_DESCRIPTION . "</legend>"; echo "<div style='padding: 8px;'>"; echo "<div>". implode('', file($file)) . "</div>"; echo "</div>"; @@ -98,7 +94,7 @@ $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/changelog.txt"; } if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _XADDRESSES_AM_ABOUT_CHANGELOG . "</legend>"; + echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_CHANGELOG . "</legend>"; echo "<div style='padding: 8px;'>"; echo "<div>" . utf8_encode(implode('<br />', file($file))) . "</div>"; echo "</div>"; @@ -106,5 +102,5 @@ echo "<br clear=\"all\" />"; } -xoops_cp_footer(); +include "admin_footer.php"; ?> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * @license GPL see LICENSE + * @package xaddresses + * @author Rota Lucio ( luc...@gm... ) + * + * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ + * **************************************************************************** + */ + +global $pathImageAdmin; +echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center small italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XADDRESSES_MAINTAINEDBY." + <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; +xoops_cp_footer(); Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -17,11 +17,11 @@ $adminTabCss = " <style type='text/css'> #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . $moduleLink . "images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . $moduleLink . "images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . $moduleLink . "images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . $moduleLink . "images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + #buttonbar a { float:left; background:url('" . $moduleLink . "images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url('" . $moduleLink . "images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #buttonbar a span {float:none;} /* End IE5-Mac hack */ @@ -79,7 +79,7 @@ function moduleAdminSubmenu ($submenuItems) { - echo "<div class='head'>"; + echo "<div class='xo-buttons'>"; echo implode($submenuItems, ' | '); echo "</div>"; } @@ -99,11 +99,11 @@ echo " <style type='text/css'> #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/xaddresses/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } + #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/xaddresses/images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/xaddresses/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/xaddresses/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } + #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } + #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #buttonbar a span {float:none;} /* End IE5-Mac hack */ @@ -136,11 +136,11 @@ echo "<div id='buttonbar'>"; echo "<ul>"; - echo "<li id='" . $tblColors[0] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/index.php\"><span>" . _XADDRESSES_MI_ADMENU1 . "</span></a></li>"; - echo "<li id='" . $tblColors[1] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/category.php\"><span>" . _XADDRESSES_MI_ADMENU2 . "</span></a></li>"; - echo "<li id='" . $tblColors[2] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/addresses.php\"><span>" . _XADDRESSES_MI_ADMENU3 . "</span></a></li>"; - echo "<li id='" . $tblColors[3] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/champs.php\"><span>" . _XADDRESSES_MI_ADMENU6 . "</span></a></li>"; - echo "<li id='" . $tblColors[4] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/permissions.php\"><span>" . _XADDRESSES_MI_ADMENU7 . "</span></a></li>"; + echo "<li id='" . $tblColors[0] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/index.php\"><span>" . _MI_XADDRESSES_ADMENU1 . "</span></a></li>"; + echo "<li id='" . $tblColors[1] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/category.php\"><span>" . _MI_XADDRESSES_ADMENU2 . "</span></a></li>"; + echo "<li id='" . $tblColors[2] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/addresses.php\"><span>" . _MI_XADDRESSES_ADMENU3 . "</span></a></li>"; + echo "<li id='" . $tblColors[3] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/champs.php\"><span>" . _MI_XADDRESSES_ADMENU6 . "</span></a></li>"; + echo "<li id='" . $tblColors[4] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/permissions.php\"><span>" . _MI_XADDRESSES_ADMENU7 . "</span></a></li>"; echo "</ul></div> "; } Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -1,50 +1,98 @@ -<?php -// include Xoops admin header -include '../../../include/cp_header.php'; +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * @license GPL see LICENSE + * @package xaddresses + * @author Rota Lucio ( luc...@gm... ) + * + * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ + * **************************************************************************** + */ -include_once XOOPS_ROOT_PATH . '/class/xoopsmodule.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopstopic.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +include_once '../include/config.php'; +include_once '../include/functions.php'; -$myts =& MyTextSanitizer::getInstance(); + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + include_once XOOPS_ROOT_PATH . '/class/tree.php'; + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load ('XoopsUserUtility'); -// Only Xoops or Module administrators can access admin area -if ( $GLOBALS['xoopsUser'] ) { - if ( !$GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) { - redirect_header(XOOPS_URL . '/', 3, _NOPERM); - exit(); - } +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globlang = $GLOBALS['xoopsConfig']['language']; + +if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ + include_once $pathDir.'/language/'.$globlang.'/main.php'; } else { - redirect_header(XOOPS_URL . '/', 3, _NOPERM); - exit(); + include_once $pathDir.'/language/english/main.php'; } + +if ( file_exists($pathDir.'/moduleadmin.php')){ + include_once $pathDir.'/moduleadmin.php'; + //return true; +}else{ + xoops_cp_header(); + echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; +} +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; + +$myts =& MyTextSanitizer::getInstance(); + // Get user groups $groupPermHandler =& xoops_gethandler('groupperm'); -if (is_object($GLOBALS['xoopsUser'])) { - $groups = $GLOBALS['xoopsUser']->getGroups(); +if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } } else { - $groups = XOOPS_GROUP_ANONYMOUS; + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); } -if ( !isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl']) ) { - include_once $GLOBALS['xoops']->path( '/class/template.php' ); - $GLOBALS['xoopsTpl'] = new XoopsTpl(); +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); } -// Include language files -xoops_loadLanguage('admin', 'system'); -xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); -xoops_loadLanguage('admin', $GLOBALS['xoopsModule']->getVar('dirname')); -xoops_loadLanguage('main', $GLOBALS['xoopsModule']->getVar('dirname')); +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +//xoops_cp_header(); +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); + // Include module functions include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/functions.php'; include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/admin/admin_functions.php'; // admin functions include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/forms.php'; -?> \ No newline at end of file Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -14,13 +14,10 @@ case 'list_fields': // render start here xoops_cp_header(); - // main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _XADDRESSES_AM_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _XADDRESSES_AM_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _XADDRESSES_AM_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _XADDRESSES_AM_FIELD_LIST . '</a>'); + $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); // get fields categories @@ -28,7 +25,7 @@ $criteria->setSort('cat_weight'); $cats = $fieldCategoryHandler->getObjects($criteria, true); unset($criteria); - $categories[0] = _XADDRESSES_AM_FIELD_CATEGORY_DEFAULT; + $categories[0] = _AM_XADDRESSES_FIELD_CATEGORY_NONE; if ( count($cats) > 0 ) { foreach (array_keys($cats) as $i ) { $categories[$cats[$i]->getVar('cat_id')] = $cats[$i]->getVar('cat_title'); @@ -38,39 +35,39 @@ unset($categories); $valuetypes = array( - XOBJ_DTYPE_ARRAY => _XADDRESSES_AM_FIELD_ARRAY, - XOBJ_DTYPE_EMAIL => _XADDRESSES_AM_FIELD_EMAIL, - XOBJ_DTYPE_INT => _XADDRESSES_AM_FIELD_INT, - XOBJ_DTYPE_TXTAREA => _XADDRESSES_AM_FIELD_TXTAREA, - XOBJ_DTYPE_TXTBOX => _XADDRESSES_AM_FIELD_TXTBOX, - XOBJ_DTYPE_URL => _XADDRESSES_AM_FIELD_URL, - XOBJ_DTYPE_OTHER => _XADDRESSES_AM_FIELD_OTHER, - XOBJ_DTYPE_MTIME => _XADDRESSES_AM_FIELD_DATE + XOBJ_DTYPE_ARRAY => _AM_XADDRESSES_FIELD_ARRAY, + XOBJ_DTYPE_EMAIL => _AM_XADDRESSES_FIELD_EMAIL, + XOBJ_DTYPE_INT => _AM_XADDRESSES_FIELD_INT, + XOBJ_DTYPE_TXTAREA => _AM_XADDRESSES_FIELD_TXTAREA, + XOBJ_DTYPE_TXTBOX => _AM_XADDRESSES_FIELD_TXTBOX, + XOBJ_DTYPE_URL => _AM_XADDRESSES_FIELD_URL, + XOBJ_DTYPE_OTHER => _AM_XADDRESSES_FIELD_OTHER, + XOBJ_DTYPE_MTIME => _AM_XADDRESSES_FIELD_DATE ); $fieldtypes = array( - 'checkbox' => _XADDRESSES_AM_FIELD_CHECKBOX, - 'group' => _XADDRESSES_AM_FIELD_GROUP, - 'group_multi' => _XADDRESSES_AM_FIELD_GROUPMULTI, - 'language' => _XADDRESSES_AM_FIELD_LANGUAGE, - 'radio' => _XADDRESSES_AM_FIELD_RADIO, - 'select' => _XADDRESSES_AM_FIELD_SELECT, - 'select_multi' => _XADDRESSES_AM_FIELD_SELECTMULTI, - 'textarea' => _XADDRESSES_AM_FIELD_TEXTAREA, - 'dhtml' => _XADDRESSES_AM_FIELD_DHTMLTEXTAREA, - 'textbox' => _XADDRESSES_AM_FIELD_TEXTBOX, - 'timezone' => _XADDRESSES_AM_FIELD_TIMEZONE, - 'yesno' => _XADDRESSES_AM_FIELD_YESNO, - 'date' => _XADDRESSES_AM_FIELD_DATE, - 'datetime' => _XADDRESSES_AM_FIELD_DATETIME, - 'longdate' => _XADDRESSES_AM_FIELD_LONGDATE, - 'theme' => _XADDRESSES_AM_FIELD_THEME, - 'autotext' => _XADDRESSES_AM_FIELD_AUTOTEXT, - 'rank' => _XADDRESSES_AM_FIELD_RANK, - 'image' => _XADDRESSES_AM_FIELD_XOOPSIMAGE, - 'multipleimage' => _XADDRESSES_AM_FIELD_MULTIPLEXOOPSIMAGE, - 'file' => _XADDRESSES_AM_FIELD_FILE, - 'multiplefile' => _XADDRESSES_AM_FIELD_MULTIPLEFILE, - 'kmlmap' => _XADDRESSES_AM_FIELD_KMLMAP + 'checkbox' => _AM_XADDRESSES_FIELD_CHECKBOX, + 'group' => _AM_XADDRESSES_FIELD_GROUP, + 'group_multi' => _AM_XADDRESSES_FIELD_GROUPMULTI, + 'language' => _AM_XADDRESSES_FIELD_LANGUAGE, + 'radio' => _AM_XADDRESSES_FIELD_RADIO, + 'select' => _AM_XADDRESSES_FIELD_SELECT, + 'select_multi' => _AM_XADDRESSES_FIELD_SELECTMULTI, + 'textarea' => _AM_XADDRESSES_FIELD_TEXTAREA, + 'dhtml' => _AM_XADDRESSES_FIELD_DHTMLTEXTAREA, + 'textbox' => _AM_XADDRESSES_FIELD_TEXTBOX, + 'timezone' => _AM_XADDRESSES_FIELD_TIMEZONE, + 'yesno' => _AM_XADDRESSES_FIELD_YESNO, + 'date' => _AM_XADDRESSES_FIELD_DATE, + 'datetime' => _AM_XADDRESSES_FIELD_DATETIME, + 'longdate' => _AM_XADDRESSES_FIELD_LONGDATE, + 'theme' => _AM_XADDRESSES_FIELD_THEME, + 'autotext' => _AM_XADDRESSES_FIELD_AUTOTEXT, + 'rank' => _AM_XADDRESSES_FIELD_RANK, + 'image' => _AM_XADDRESSES_FIELD_XOOPSIMAGE, + 'multipleimage' => _AM_XADDRESSES_FIELD_MULTIPLEXOOPSIMAGE, + 'file' => _AM_XADDRESSES_FIELD_FILE, + 'multiplefile' => _AM_XADDRESSES_FIELD_MULTIPLEFILE, + //'kmlmap' => _AM_XADDRESSES_FIELD_KMLMAP ); // get fields @@ -94,9 +91,9 @@ $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); $GLOBALS['xoopsTpl']->display("db:xaddresses_admin_fieldlist.html"); } else { - echo '<div class="errorMsg">' . _XADDRESSES_AM_ERROR_NO_FIELDS . '</div>'; + echo '<div class="errorMsg">' . _AM_XADDRESSES_ERROR_NO_FIELDS . '</div>'; } - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -104,13 +101,10 @@ case 'new_field': // render start here xoops_cp_header(); - // main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _XADDRESSES_AM_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _XADDRESSES_AM_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _XADDRESSES_AM_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _XADDRESSES_AM_FIELD_LIST . '</a>'); + $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once('../include/forms.php'); @@ -118,7 +112,7 @@ $form = xaddresses_getFieldForm($field); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -126,24 +120,21 @@ case 'edit_field': $field =& $fieldHandler->get($_REQUEST['field_id']); if ( !$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit') ) { //If no configs exist - redirect_header($currentFile, 2, _XADDRESSES_AM_FIELDNOTCONFIGURABLE); + redirect_header($currentFile, 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); } // render start here xoops_cp_header(); - // main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _XADDRESSES_AM_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _XADDRESSES_AM_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _XADDRESSES_AM_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _XADDRESSES_AM_FIELD_LIST . '</a>'); + $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once('../include/forms.php'); $form = xaddresses_getFieldForm($field); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -177,7 +168,7 @@ } if ( count($errors) == 0 ) { //no errors - redirect_header($currentFile, 2, sprintf(_XADDRESSES_AM_SAVEDSUCCESS, _XADDRESSES_AM_FIELDS) ); + redirect_header($currentFile, 2, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELDS) ); } else { redirect_header($currentFile, 3, implode('<br />', $errors) ); } @@ -197,7 +188,7 @@ $field =& $fieldHandler->get($_REQUEST['field_id']); // if no configs exist if (!$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit')) { - redirect_header('admin.php', 2, _XADDRESSES_AM_FIELDNOTCONFIGURABLE); + redirect_header('admin.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); } } else { // if is a new field @@ -363,21 +354,18 @@ } } if ($redirectToEdit) { - redirect_header($currentFile . '?op=edit_field&field_id=' . $field->getVar('field_id'), 3, sprintf("//IN PROGRESS " . _XADDRESSES_AM_NEXT_STEP, _XADDRESSES_AM_FIELD)); + redirect_header($currentFile . '?op=edit_field&field_id=' . $field->getVar('field_id'), 3, _AM_XADDRESSES_FIELD_NEXT_STEP); } else { - redirect_header($currentFile, 3, sprintf(_XADDRESSES_AM_SAVEDSUCCESS, _XADDRESSES_AM_FIELD)); + redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELD)); } } // render start here xoops_cp_header(); - // main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _XADDRESSES_AM_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _XADDRESSES_AM_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _XADDRESSES_AM_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _XADDRESSES_AM_FIELD_LIST . '</a>'); + $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once('../include/forms.php'); @@ -385,7 +373,7 @@ $form = xaddresses_getFieldForm($field); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -393,21 +381,21 @@ case 'delete_field': $field =& $fieldHandler->get($_REQUEST['field_id']); if ( !$field->getVar('field_config') ) { - redirect_header('index.php', 2, _XADDRESSES_AM_FIELDNOTCONFIGURABLE); + redirect_header('index.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); } if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { if ( !$GLOBALS['xoopsSecurity']->check() ) { redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); } if ( $fieldHandler->delete($field) ) { - redirect_header($currentFile, 3, sprintf(_XADDRESSES_AM_DELETEDSUCCESS, _XADDRESSES_AM_FIELD) ); + redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_DELETEDSUCCESS, _AM_XADDRESSES_FIELD) ); } else { echo $field->getHtmlErrors(); } } else { // render start here xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'field_id' => $_REQUEST['field_id'], 'op' => 'delete_field'), $_SERVER['REQUEST_URI'], sprintf(_XADDRESSES_AM_RUSUREDEL, $field->getVar('field_title') )); + xoops_confirm(array('ok' => 1, 'field_id' => $_REQUEST['field_id'], 'op' => 'delete_field'), $_SERVER['REQUEST_URI'], sprintf(_AM_XADDRESSES_RUSUREDEL, $field->getVar('field_title') )); xoops_cp_footer(); } break; Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -16,13 +16,10 @@ case 'list_fieldcategories': // render start here xoops_cp_header(); - // render main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // render submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_fieldcategory' ? _XADDRESSES_AM_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _XADDRESSES_AM_FIELDCAT_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fieldcategories' ? _XADDRESSES_AM_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _XADDRESSES_AM_FIELDCAT_LIST . '</a>'); + $submenuItem[] = ($op == 'new_fieldcategory' ? _AM_XADDRESSES_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _AM_XADDRESSES_FIELDCAT_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fieldcategories' ? _AM_XADDRESSES_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _AM_XADDRESSES_FIELDCAT_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); $criteria = new CriteriaCompo(); @@ -37,7 +34,7 @@ $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); $GLOBALS['xoopsTpl']->display("db:xaddresses_admin_fieldcategorylist.html"); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -68,7 +65,7 @@ } if (count($errors) == 0) { //no errors - redirect_header($currentFile, 2, sprintf(_XADDRESSES_AM_SAVEDSUCCESS, _XADDRESSES_AM_CATEGORIES)); + redirect_header($currentFile, 2, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_CATEGORIES)); } else { redirect_header($currentFile, 3, implode('<br />', $errors)); } @@ -81,13 +78,10 @@ case 'new_fieldcategory': // render start here xoops_cp_header(); - // render main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // render submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_fieldcategory' ? _XADDRESSES_AM_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _XADDRESSES_AM_FIELDCAT_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fieldcategories' ? _XADDRESSES_AM_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _XADDRESSES_AM_FIELDCAT_LIST . '</a>'); + $submenuItem[] = ($op == 'new_fieldcategory' ? _AM_XADDRESSES_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _AM_XADDRESSES_FIELDCAT_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fieldcategories' ? _AM_XADDRESSES_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _AM_XADDRESSES_FIELDCAT_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once '../include/forms.php'; @@ -95,7 +89,7 @@ $form = $obj->getForm(); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -103,13 +97,10 @@ case 'edit_fieldcategory': // render start here xoops_cp_header(); - // render main admin menu - include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); - echo moduleAdminTabMenu($adminmenu, $currentFile); // render submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_fieldcategory' ? _XADDRESSES_AM_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _XADDRESSES_AM_FIELDCAT_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fieldcategories' ? _XADDRESSES_AM_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _XADDRESSES_AM_FIELDCAT_LIST . '</a>'); + $submenuItem[] = ($op == 'new_fieldcategory' ? _AM_XADDRESSES_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _AM_XADDRESSES_FIELDCAT_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fieldcategories' ? _AM_XADDRESSES_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _AM_XADDRESSES_FIELDCAT_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once '../include/forms.php'; @@ -117,7 +108,7 @@ $form = $obj->getForm(); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; break; @@ -135,7 +126,7 @@ $obj->setVar('cat_description', $_REQUEST['cat_description']); $obj->setVar('cat_weight', $_REQUEST['cat_weight']); if ( $fieldCategoryHandler->insert($obj) ) { - redirect_header($currentFile, 3, sprintf(_XADDRESSES_AM_SAVEDSUCCESS, _XADDRESSES_AM_CATEGORY) ); + redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_CATEGORY) ); } else { // render start here xoops_cp_header(); @@ -144,8 +135,8 @@ echo moduleAdminTabMenu($adminmenu, $currentFile); // render submenu $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_fieldcategory' ? _XADDRESSES_AM_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _XADDRESSES_AM_FIELDCAT_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fieldcategories' ? _XADDRESSES_AM_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _XADDRESSES_AM_FIELDCAT_LIST . '</a>'); + $submenuItem[] = ($op == 'new_fieldcategory' ? _AM_XADDRESSES_FIELDCAT_NEW : '<a href="' . $currentFile . '?op=new_fieldcategory">' . _AM_XADDRESSES_FIELDCAT_NEW . '</a>'); + $submenuItem[] = ($op == 'list_fieldcategories' ? _AM_XADDRESSES_FIELDCAT_LIST : '<a href="' . $currentFile . '?op=list_fieldcategories">' . _AM_XADDRESSES_FIELDCAT_LIST . '</a>'); xaddressesAdminSubmenu ($submenuItem); include_once '../include/forms.php'; @@ -153,7 +144,7 @@ $form =& $obj->getForm(); $form->display(); - xoops_cp_footer(); + include "admin_footer.php"; } break; @@ -166,14 +157,14 @@ redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); } if ( $fieldCategoryHandler->delete($obj) ) { - redirect_header($currentFile, 3, sprintf(_XADDRESSES_AM_DELETEDSUCCESS, _XADDRESSES_AM_CATEGORY) ); + redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_DELETEDSUCCESS, _AM_XADDRESSES_CATEGORY) ); } else { echo $obj->getHtmlErrors(); } } else { // render start here xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete_fieldcategory'), $_SERVER['REQUEST_URI'], sprintf(_XADDRESSES_AM_RU_SURE_DEL, $obj->getVar('cat_title') )); + xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete_fieldcategory'), $_SERVER['REQUEST_URI'], sprintf(_AM_XADDRESSES_RU_SURE_DEL, $obj->getVar('cat_title') )); xoops_cp_footer(); } break; Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/import.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/import.php 2012-07-24 10:57:29 UTC (rev 9917) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/import.php 2012-07-24 21:18:59 UTC (rev 9918) @@ -1,283 +1,160 @@ <?php $currentFile = basename(__FILE__); + +// include module admin header include_once 'admin_header.php'; +//load classes +$categoryHandler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); +$locationHandler =& xoops_getModuleHandler('location', 'xaddresses'); +$fieldHandler =& xoops_getModuleHandler('field', 'xaddresses'); +$memberHandler =& xoops_gethandler('member'); + +// count location categories +$countCategories = $categoryHandler->getCount(); +// redirection if no categories +if ($categoryHandler->getCount() == 0) { + //redirect_header('index.php', 2, _AM_XADDRESSES_PERM_NOCAT); +} + +// get/check parameters/post +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'import'; + +// render start here xoops_cp_header(); -// main admin menu -include (XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->dirname() . '/admin/menu.php'); -echo moduleAdminTabMenu($adminmenu, $currentFile); -//Action dans switch -if (isset($_REQUEST['op'])) { - $op = $_REQUEST['op']; -} else { - $op = 'index'; -} -// import depuis mydownloads -function Import_mydownloads($path='', $imgurl='') -{ - $ok = isset($_POST['ok']) ? intval($_POST['ok']) : 0; - global $xoopsDB; - if ( $ok == 1 ){ - //param\xE8tres: - // pour les images des cat\xE9gories: - $uploaddir = XOOPS_ROOT_PATH . '/uploads/xaddresses/images/cats/'; - // pour les fichiers - $uploaddir_downloads = XOOPS_ROOT_PATH . '/uploads/xaddresses/downloads/'; - //Vider les tables - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_broken")); - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_categories")); - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_addresses")); - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_fielddata")); - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_modfielddata")); - $query = $xoopsDB->queryF("truncate table ".$xoopsDB->prefix("xaddresses_votedata")); - //Inserer les donn\xE9es des cat\xE9gories - $query_topic = $xoopsDB->query("SELECT cid, pid, title, imgurl FROM ".$xoopsDB->prefix("xaddresses_categories")); - while ($donnees = $xoopsDB->fetchArray($query_topic)) - { - if ( $donnees['imgurl'] == "" ) - { - $img = "blank.gif"; - } else { - $img = substr_replace($donnees['imgurl'],'',0,strlen($imgurl)); - copy($path . $img, XOOPS_ROOT_PATH . "/uploads/TDMDownloads/images/cats/" . $img); - } - - $title = $donnees['title']; - $insert = $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix("tdmdownloads_cat")." (cid, pid, title, imgurl, description_main, weight ) VALUES ('".$donnees['cid']."', '".$donnees['pid']."', '".$title."', '".$img."', '', '0')"); - if (!$insert) { - echo "<font color='red'>" . _XADDRESSES_AM_IMPORT_ERROR_DATA .": </font> " . $donnees['title'] . "<br />"; - } - echo sprintf(_XADDRESSES_AM_IMPORT_CAT_IMP . '<br/>', $donnees['t... [truncated message content] |
From: <luc...@us...> - 2012-07-24 21:20:43
|
Revision: 9919 http://xoops.svn.sourceforge.net/xoops/?rev=9919&view=rev Author: luciorota Date: 2012-07-24 21:20:35 +0000 (Tue, 24 Jul 2012) Log Message: ----------- delete changed files/directories Removed Paths: ------------- XoopsModules/xaddresses/trunk/xaddresses/admin/ XoopsModules/xaddresses/trunk/xaddresses/class/ XoopsModules/xaddresses/trunk/xaddresses/images/ XoopsModules/xaddresses/trunk/xaddresses/include/ XoopsModules/xaddresses/trunk/xaddresses/index.php XoopsModules/xaddresses/trunk/xaddresses/install/ XoopsModules/xaddresses/trunk/xaddresses/kmleditor/ XoopsModules/xaddresses/trunk/xaddresses/language/ XoopsModules/xaddresses/trunk/xaddresses/templates/ XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Deleted: XoopsModules/xaddresses/trunk/xaddresses/index.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/index.php 2012-07-24 21:18:59 UTC (rev 9918) +++ XoopsModules/xaddresses/trunk/xaddresses/index.php 2012-07-24 21:20:35 UTC (rev 9919) @@ -1,300 +0,0 @@ -<?php -$currentFile = basename(__FILE__); -// include module header -include_once 'header.php'; - -// load classes -$categoryHandler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); -$locationHandler =& xoops_getModuleHandler('location', 'xaddresses'); -//$locations_votedata_handler =& xoops_getModuleHandler('votedata', 'xaddresses'); -//$locations_field_handler =& xoops_getModuleHandler('field', 'xaddresses'); -//$locations_fielddata_handler =& xoops_getModuleHandler('fielddata', 'xaddresses'); -//$locations_broken_handler =& xoops_getModuleHandler('broken', 'xaddresses'); -//load classes -//$memberHandler =& xoops_gethandler('member'); -// IN PROGRESS -//$brokenHandler =& xoops_getModuleHandler('broken', 'xaddresses'); -// TO DO -//$votedataHandler =& xoops_getModuleHandler('votedata', 'xaddresses'); -/*$criteria = new CriteriaCompo(); -$criteria->add(new Criteria('cat_pid', 0)); -$criteria->setSort('cat_weight ASC, cat_title'); -$criteria->setOrder('ASC'); -$mainCategories = $categoryHandler->getAll($criteria); - -$viewableCategoriesIds = xaddresses_getMyItemIds(); -//print_r($myCategories); -//affichage des cat\xE9gories: -$criteria = new CriteriaCompo(); -$criteria->setSort('cat_weight ASC, cat_title'); -$criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); -$myCategories = $categoryHandler->getall($criteria); -//print_r($myCategories_array); -$myTree = new XoopsObjectTree($myCategories, 'cat_id', 'cat_pid'); - -$prefix = ''; -$sufix = ''; - -// get all categories sorted by tree structure -$categoriesList = array(); -foreach ($mainCategories as $mainCategory) { - $categoriesList[] = array('prefix' => $prefix, 'sufix' => $sufix, 'category' => $mainCategory); - $mySubCategories = $myTree->getFirstChild($mainCategory->getVar('cat_id')); - //print_r($mySubCategories_array); - foreach ($mySubCategories as $mySubCategory) - $categoriesList[] = array('prefix' => '->', 'sufix' => $sufix, 'category' => $mySubCategory); -} -*/ - -$viewableCategoriesIds = xaddresses_getMyItemIds('in_category_view'); - -$criteria = new CriteriaCompo(); -$criteria->add(new Criteria('cat_pid', 0)); -$criteria->setSort('cat_weight ASC, cat_title'); -$criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); -$mainCategories = $categoryHandler->getAll($criteria); -$mainCategoriesAsArray = $categoryHandler->getAll($criteria, null, false); // get categories as array - -$prefix = ''; -$sufix = ''; -$order = 'cat_weight ASC, cat_title'; - -// get all categories sorted by tree structure -$categoriesAsArrayList = array(); -foreach ($mainCategoriesAsArray as $mainCategoryAsArray) { - $categoriesAsArrayList[] = array('prefix' => $prefix, 'sufix' => $sufix, 'category' => $mainCategoryAsArray); - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('cat_pid', $mainCategoryAsArray['cat_id'])); - $criteria->setSort('cat_weight ASC, cat_title'); - $criteria->setOrder('ASC'); - $criteria->add(new Criteria('cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); - $subCategories = $categoryHandler->getAll($criteria); - $subCategoriesAsArray = $categoryHandler->getAll($criteria, null, false); // get subcategories as array - if (count($subCategories) != 0) { - $subcategoriesList = xaddresses_getChildrenTree($mainCategoryAsArray['cat_id'], $subCategories, $prefix, $sufix, $order); - $subcategoriesAsArrayList = array(); - foreach($subcategoriesList as $subcategoryList) { - $subcategoriesAsArrayList[] = array('prefix' => $subcategoryList['prefix'], 'sufix' => $subcategoryList['sufix'], 'category' => $subcategoryList['category']->toArray()); - } - $categoriesAsArrayList = array_merge ($categoriesAsArrayList, $subcategoriesAsArrayList); - } -} - -// render start here -// Load template -$xoopsOption['template_main'] = 'xaddresses_index.html'; -include_once XOOPS_ROOT_PATH . '/header.php'; - -// Breadcrumb -$breadcrumb = array(); -if ($xoopsModuleConfig['show_home_in_breadcrumb']) { - $crumb['title'] = _MA_XADDRESSES_BREADCRUMB_HOME; - $crumb['url'] = 'index.php'; - $breadcrumb[] = $crumb; -} -// Set breadcrumb array for tamplate -$breadcrumb = array_reverse($breadcrumb); -$xoopsTpl->assign('breadcrumb', $breadcrumb); -unset($breadcrumb, $crumb); - -$GLOBALS['xoopsTpl']->assign('categoriesList', $categoriesAsArrayList); - - - -/* -// pour les permissions -//affichage des cat\xE9gories: -$criteria = new CriteriaCompo(); -$criteria->setSort('weight ASC, cat_title'); -$criteria->setOrder('ASC'); -$criteria->add(new Criteria('loc_cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); -$downloadscat_arr = $categoryHandler->getall($criteria); -$mytree = new XoopsObjectTree($downloadscat_arr, 'cat_id', 'cat_pid'); - -$criteria = new CriteriaCompo(); -$criteria->setSort('cat_weight ASC, cat_title'); -$criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_pid', 0)); -$criteria->add(new Criteria('cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); -$downloadscat_arr = $categoryHandler->getall($criteria); - -$count = 1; -$keywords = ''; -foreach (array_keys($downloadscat_arr) as $i) { - $totaldownloads = nombreEntree($downloadscat_arr[$i]->getVar('loc_cat_id'), '1'); - $subcategories_arr = $mytree->getFirstChild($downloadscat_arr[$i]->getVar('loc_cat_id')); - $chcount = 0; - $subcategories = ''; - //pour les mots clef - $keywords .= $downloadscat_arr[$i]->getVar('title') . ','; - foreach (array_keys($subcategories_arr) as $j) { - if ($chcount>=$xoopsModuleConfig['nbsouscat']){ - $subcategories .= '<li>[<a href='' . XOOPS_URL . '/modules/xaddresses/viewcat.php?cat_id=' . $downloadscat_arr[$i]->getVar('loc_cat_id') . ''>+</a>]</li>'; - break; - } - $subcategories .= '<li><a href='' . XOOPS_URL . '/modules/xaddresses/viewcat.php?loc_cat_id=' . $subcategories_arr[$j]->getVar('loc_cat_id') . ''>' . $subcategories_arr[$j]->getVar('title') . '</a></li>'; - $keywords .= $downloadscat_arr[$i]->getVar('title') . ','; - $chcount++; - } - $xoopsTpl->append('viewableCategoriesId', array('image' => $uploadurl . $downloadscat_arr[$i]->getVar('imgurl'), 'id' => $downloadscat_arr[$i]->getVar('loc_cat_id'), 'title' => $downloadscat_arr[$i]->getVar('title'), 'description_main' => $downloadscat_arr[$i]->getVar('description_main'), 'subcategories' => $subcategories, 'totaldownloads' => $totaldownloads, 'count' => $count)); - $count++; -} -*/ -// Get -// Get more recents locations list -if($xoopsModuleConfig['index_list_recent'] == true) { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('loc_status', 0, '!=')); - $criteria->add(new Criteria('loc_cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); - $criteria->setSort('loc_date'); - $criteria->setOrder('DESC'); - $criteria->setLimit($xoopsModuleConfig['index_list_number']); - $locations = $locationHandler->getall($criteria); - foreach ($locations as $location) { - $title = $location->getVar('loc_title'); - if (strlen($title) >= $xoopsModuleConfig['index_list_titlelenght']) { - $title = substr($title, 0, ($xoopsModuleConfig['index_list_titlelenght'])) . '...'; - } - $date = formatTimestamp($location->getVar('loc_date'), 's'); - $xoopsTpl->append('index_list_recent', array( - 'loc_id' => $location->getVar('loc_id'), - 'loc_cat_id' => $location->getVar('loc_cat_id'), - 'loc_date' => $date, - 'loc_title' => $title - )); - } - unset($locations); -} - -// Get top rated locations list -if($xoopsModuleConfig['index_list_toprated'] == true) { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('loc_status', 0, '!=')); - $criteria->add(new Criteria('loc_cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); - $criteria->setSort('loc_rating'); - $criteria->setOrder('DESC'); - $criteria->setLimit($xoopsModuleConfig['index_list_number']); - $locations = $locationHandler->getall($criteria); - foreach ($locations as $location) { - $title = $location->getVar('loc_title'); - if (strlen($title) >= $xoopsModuleConfig['index_list_titlelenght']) { - $title = substr($title,0,($xoopsModuleConfig['index_list_titlelenght'])) . '...'; - } - $rating = number_format($location->getVar('rating'), 1); - $xoopsTpl->append('index_list_toprated', array( - 'loc_id' => $location->getVar('loc_id'), - 'loc_cat_id' => $location->getVar('loc_cat_id'), - 'loc_rating' => $rating, - 'loc_title' => $title - )); - } - unset($locations); -} - -/* -//plus t\xE9l\xE9charg\xE9s -if($xoopsModuleConfig['blpop']==1){ - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('status', 0, '!=')); - $criteria->add(new Criteria('loc_cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); - $criteria->setSort('hits'); - $criteria->setOrder('DESC'); - $criteria->setLimit($xoopsModuleConfig['index_show_number']); - $downloads_arr = $locationHandler->getall($criteria); - foreach (array_keys($downloads_arr) as $i) { - $title = $downloads_arr[$i]->getVar('title'); - if (strlen($title) >= $xoopsModuleConfig['index_list_titlelenght']) { - $title = substr($title,0,($xoopsModuleConfig['index_list_titlelenght'])) . '...'; - } - $xoopsTpl->append('bl_pop', array( - 'id' => $downloads_arr[$i]->getVar('loc_id'), - 'loc_cat_id' => $downloads_arr[$i]->getVar('loc_cat_id'), - 'hits' => $downloads_arr[$i]->getVar('hits'), - 'title' => $title - )); - } -} - -// affichage des t\xE9l\xE9chargements -//Utilisation d'une copie d'\xE9cran avec la largeur selon les pr\xE9f\xE9rences - -$criteria = new CriteriaCompo(); -$criteria->add(new Criteria('status', 0, '!=')); -$criteria->add(new Criteria('loc_cat_id', '(' . implode(',', $viewableCategoriesIds) . ')','IN')); -$numrows = $locationHandler->getCount($criteria); -$xoopsTpl->assign('lang_thereare', sprintf(_MD_XADDRESSES_INDEX_THEREARE,$numrows)); -$criteria->setLimit($xoopsModuleConfig['newdownloads']); -$tblsort = array(); -$tblsort[1]='date'; -$tblsort[2]='date'; -$tblsort[3]='hits'; -$tblsort[4]='hits'; -$tblsort[5]='rating'; -$tblsort[6]='rating'; -$tblsort[7]='title'; -$tblsort[8]='title'; -$tblorder = array(); -$tblorder[1]='DESC'; -$tblorder[2]='ASC'; -$tblorder[3]='DESC'; -$tblorder[4]='ASC'; -$tblorder[5]='DESC'; -$tblorder[6]='ASC'; -$tblorder[7]='DESC'; -$tblorder[8]='ASC'; -$sort = isset($xoopsModuleConfig['toporder']) ? $xoopsModuleConfig['toporder'] : 1; -$order = isset($xoopsModuleConfig['toporder']) ? $xoopsModuleConfig['toporder'] : 1; -$criteria->setSort($tblsort[$sort]); -$criteria->setOrder($tblorder[$order]); -$downloads_arr = $locationHandler->getall($criteria); - -foreach (array_keys($downloads_arr) as $i) { - $dtitle = $downloads_arr[$i]->getVar('title'); - $url = $downloads_arr[$i]->getVar('url'); - $logourl = $downloads_arr[$i]->getVar('logourl'); - $logourl = $uploadurl_shots . $logourl; - $datetime = formatTimestamp($downloads_arr[$i]->getVar('date'),'s'); - $loc_cat_id = $downloads_arr[$i]->getVar('loc_cat_id'); - $loc_id = $downloads_arr[$i]->getVar('loc_id'); - $submitter = XoopsUser::getUnameFromId($downloads_arr[$i]->getVar('submitter')); - $description = $downloads_arr[$i]->getVar('description'); - // pour r\xE9f\xE9rentiel de module - $description = str_replace('[block]','<h2><u>' . _MD_XADDRESSES_SUP_BLOCS . '</u></h2>',$description); - $description = str_replace('[notes]','<h2><u>' . _MD_XADDRESSES_SUP_NOTES . '</u></h2>',$description); - $description = str_replace('[evolutions]','<h2><u>' . _MD_XADDRESSES_SUP_EVOLUTIONS . '</u></h2>',$description); - $description = str_replace('[infos]','<h2><u>' . _MD_XADDRESSES_SUP_INFOS . '</u></h2>',$description); - $description = str_replace('[changelog]','<h2><u>' . _MD_XADDRESSES_SUP_CHANGELOG . '</u></h2>',$description); - $description = str_replace('[backoffice]','<h2><u>' . _MD_XADDRESSES_SUP_BACKOFFICE . '</u></h2>',$description); - $description = str_replace('[frontoffice]','<h2><u>' . _MD_XADDRESSES_SUP_FRONTOFFICE . '</u></h2>',$description); - //permet d'afficher uniquement la description courte - if (strpos($description,'[pagebreak]')==false){ - $description_short = $description; - } else { - $description_short = substr($description,0,strpos($description,'[pagebreak]')); - } - // pour les vignettes 'new' et 'mis \xE0 jour' - $new = nouveau_image($downloads_arr[$i]->getVar('date'), $downloads_arr[$i]->getVar('status')); - $pop = populaire_image($downloads_arr[$i]->getVar('hits')); - - // D\xE9fini si la personne est un admin - if (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser']->isAdmin($xoopsModule->mid())) { - $adminlink = '<a href='' . XOOPS_URL . '/modules/TDMDownloads/admin/addresses.php?op=view_downloads&downloads_loc_id=' . $loc_id . '' title='' . _MD_XADDRESSES_EDITTHISDL . ''><img src='' . XOOPS_URL . '/modules/TDMDownloads/images/editicon.png' width='16px' height='16px' border='0' alt='' . _MD_XADDRESSES_EDITTHISDL . '' /></a>'; - } else { - $adminlink = ''; - } - $xoopsTpl->append('file', array('id' => $loc_id,'loc_cat_id'=>$loc_cat_id, 'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description_short' => $description_short, - 'adminlink' => $adminlink, 'submitter' => $submitter)); - //pour les mots clef - $keywords .= $dtitle . ','; -} -// r\xE9f\xE9rencement -//description -$xoTheme->addMeta('meta', 'description', strip_tags($xoopsModule->name())); -//keywords -$keywords = substr($keywords,0,-1); -$xoTheme->addMeta('meta', 'keywords', $keywords); -*/ -include XOOPS_ROOT_PATH . '/footer.php'; -?> \ No newline at end of file Deleted: XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-24 21:18:59 UTC (rev 9918) +++ XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-24 21:20:35 UTC (rev 9919) @@ -1,516 +0,0 @@ -<?php -if (!defined('XOOPS_ROOT_PATH')){ exit(); } -$dirname = basename( dirname( __FILE__ ) ) ; - -xoops_load('XoopsLists'); - -$modversion['name'] = _MI_XADDRESSES_NAME; -$modversion['version'] = '1.0'; -$modversion['description'] = _MI_XADDRESSES_DESC; -$modversion['author'] = "Rota Lucio"; -$modversion['author_mail'] = 'luc...@gm...'; -$modversion['author_website_url'] = 'http://luciorota.altervista.org'; -$modversion['author_website_name'] = 'http://luciorota.altervista.org'; -$modversion['credits'] = "XOOPS"; -$modversion['help'] = 'page=help'; -$modversion['license'] = 'GNU GPL 2.0 see Licence'; -$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; - -$modversion['release_info'] = "RC"; -$modversion['release_file'] = XOOPS_URL."/modules/{$dirname}/docs/RC"; -$modversion['release_date'] = "2012/07/23"; // 'Y/m/d' - -$modversion['manual'] = 'Help'; -$modversion['manual_file'] = XOOPS_URL."/modules/{$dirname}/docs/help.html"; -$modversion['min_php'] = '5.2'; -$modversion['min_xoops'] = '2.4.5'; // 'XOOPS 2.5'; -$modversion['min_admin']= '1.1'; -$modversion['min_db']= array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7'); -$modversion['image'] = "images/xaddresses_slogo.png"; -$modversion['dirname'] = "{$dirname}"; -$modversion['official'] = false; - -$modversion['dirmoduleadmin'] = "Frameworks/moduleclasses"; -$modversion['icons16'] = "modules/{$dirname}/images/icons/16x16"; -$modversion['icons32'] = "modules/{$dirname}/images/icons/32x32"; - -//About -$modversion['demo_site_url'] = "IN PROGRESS"; -$modversion['demo_site_name'] = "IN PROGRESS"; -$modversion['forum_site_url'] = "IN PROGRESS"; -$modversion['forum_site_name'] = "IN PROGRESS"; -$modversion['module_website_url'] = "IN PROGRESS"; -$modversion['module_website_name'] = "IN PROGRESS"; -//$modversion['support_site_url'] = "http://www.xoops.org"; -//$modversion['support_site_name'] = "www.xoops.org"; -$modversion['release'] = "release"; -$modversion['module_status'] = 'In progress'; //"Stable"; - -// Admin things -$modversion['hasAdmin'] = true; -// Admin system menu -$modversion['system_menu'] = true; -$modversion['adminindex'] = "admin/index.php"; -$modversion['adminmenu'] = "admin/menu.php"; -// Mysql file -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -// Mysql file -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -// Tables created by sql file (without prefix!) -$modversion['tables'][0] = "xaddresses_locationcategory"; -$modversion['tables'][1] = "xaddresses_location"; - -$modversion['tables'][2] = "xaddresses_fieldcategory"; -$modversion['tables'][3] = "xaddresses_field"; -// IN PROGRESS -$modversion['tables'][4] = "xaddresses_broken"; -$modversion['tables'][5] = "xaddresses_modify"; -$modversion['tables'][6] = "xaddresses_votedata"; -// TO DO -$modversion['tables'][7] = "xaddresses_marker"; - -// Scripts to run upon installation or update -$modversion['onInstall'] = 'include/install_function.php'; -//$modversion['onUpdate'] = 'include/update_function.php'; -$modversion['onUninstall'] = 'include/uninstall_function.php'; - -// Menu -$modversion['hasMain'] = true; -if (is_object($GLOBALS['xoopsModule']) && $GLOBALS['xoopsModule']->getVar('dirname') == $modversion['dirname']) { - $i = 0; - $isAdmin = false; - if (!empty($GLOBALS['xoopsUser'])) { - //$modversion['sub'][0]['name'] = _MI_XADDRESSES_TODO; - //$modversion['sub'][0]['url'] = "public-useralbum.php?id=".$GLOBALS['xoopsUser']->uid(); - // Check if xoopsUser is a module administrator - $isAdmin = ($GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid'))); - } - // Add the Submit new item button - if ($isAdmin || (isset($GLOBALS['xoopsModuleConfig']['allowsubmit']) && - $GLOBALS['xoopsModuleConfig']['allowsubmit'] == true && - (is_object($GLOBALS['xoopsUser']) || - (isset($GLOBALS['xoopsModuleConfig']['anonpost']) && $GLOBALS['xoopsModuleConfig']['anonpost'] == 1)))) { - $i++; - $modversion['sub'][$i]['name'] = _MI_XADDRESSES_SUBMIT; - $modversion['sub'][$i]['url'] = "locationedit.php?op=new_location"; - } - $i++; - $modversion['sub'][$i]['name'] = _MI_XADDRESSES_SEARCH; - $modversion['sub'][$i]['url'] = "locationsearch.php"; - if ($isAdmin) { - $i++; - $modversion['sub'][$i]['name'] = _MI_XADDRESSES_ADMIN; - $modversion['sub'][$i]['url'] = "admin/index.php"; - } -} - -// Pour les blocs -$modversion['blocks'][1]['file'] = "xaddresses_top.php"; -$modversion['blocks'][1]['name'] = _MI_XADDRESSES_BNAME1; -$modversion['blocks'][1]['description'] = _MI_XADDRESSES_BNAMEDSC1; -$modversion['blocks'][1]['show_func'] = "b_xaddresses_top_show"; -$modversion['blocks'][1]['edit_func'] = "b_xaddresses_top_edit"; -$modversion['blocks'][1]['options'] = "date|10|19|0"; -$modversion['blocks'][1]['template'] = 'xaddresses_block_new.html'; - -$modversion['blocks'][2]['file'] = "xaddresses_top.php"; -$modversion['blocks'][2]['name'] = _MI_XADDRESSES_BNAME2; -$modversion['blocks'][2]['description'] = _MI_XADDRESSES_BNAMEDSC2; -$modversion['blocks'][2]['show_func'] = "b_xaddresses_top_show"; -$modversion['blocks'][2]['edit_func'] = "b_xaddresses_top_edit"; -$modversion['blocks'][2]['options'] = "hits|10|19|0"; -$modversion['blocks'][2]['template'] = 'xaddresses_block_top.html'; - -$modversion['blocks'][3]['file'] = "xaddresses_top.php"; -$modversion['blocks'][3]['name'] = _MI_XADDRESSES_BNAME3; -$modversion['blocks'][3]['description'] = _MI_XADDRESSES_BNAMEDSC3; -$modversion['blocks'][3]['show_func'] = "b_xaddresses_top_show"; -$modversion['blocks'][3]['edit_func'] = "b_xaddresses_top_edit"; -$modversion['blocks'][3]['options'] = "rating|10|19|0"; -$modversion['blocks'][3]['template'] = 'xaddresses_block_rating.html'; - -$modversion['blocks'][4]['file'] = "xaddresses_top.php"; -$modversion['blocks'][4]['name'] = _MI_XADDRESSES_BNAME4; -$modversion['blocks'][4]['description'] = _MI_XADDRESSES_BNAMEDSC4; -$modversion['blocks'][4]['show_func'] = "b_xaddresses_top_show"; -$modversion['blocks'][4]['edit_func'] = "b_xaddresses_top_edit"; -$modversion['blocks'][4]['options'] = "random|10|19|0"; -$modversion['blocks'][4]['template'] = 'xaddresses_block_random.html'; - - - -// Search -$modversion['hasSearch'] = true; -$modversion['search']['file'] = "include/search_functions.php"; -$modversion['search']['func'] = "xaddresses_search"; - - - -// Comments -$modversion['hasComments'] = true; -$modversion['comments']['itemName'] = 'loc_id'; -$modversion['comments']['pageName'] = 'locationview.php'; -$modversion['comments']['extraParams'] = array('loc_cat_id'); -// Comment callback functions -$modversion['comments']['callbackFile'] = 'include/comment_functions.php'; -$modversion['comments']['callback']['approve'] = 'xaddresses_com_approve'; -$modversion['comments']['callback']['update'] = 'xaddresses_com_update'; - - - -// Templates -$i = 0; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_index.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationcategoryview.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationview.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationedit.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationbroken.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationrate.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationmodify.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationsearch.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_locationsearchresults.html'; -$modversion['templates'][$i]['description'] = ''; - -// Admin Templates -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationcategorylist.html'; -$modversion['templates'][$i]['description'] = ''; -//$modversion['templates'][$i]['type'] = 'admin'; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationlist.html'; -$modversion['templates'][$i]['description'] = ''; -//$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationbrokenlist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationmodifylist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_admin_fieldcategorylist.html'; -$modversion['templates'][$i]['description'] = ''; -//$modversion['templates'][$i]['type'] = 'admin'; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_admin_fieldlist.html'; -$modversion['templates'][$i]['description'] = ''; -//$modversion['templates'][$i]['type'] = 'admin'; - -// Image Manager Templates -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_imagemanager.html'; -$modversion['templates'][$i]['description'] = ''; -$i++; -$modversion['templates'][$i]['file'] = 'xaddresses_imagemanager2.html'; -$modversion['templates'][$i]['description'] = ''; - - - -// Preferences -// FOR FUTURE XOOPS VERSIONS -/* -$i = 0; -$i++; -$modversion['config']['category'][$i]['name'] = 'global'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_GLOBAL_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_GLOBAL_CONFIG_DESC; -$i++; -$modversion['config']['category'][$i]['name'] = 'category'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_CATEGORY_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_CATEGORY_CONFIG_DESC; -$i++; -$modversion['config']['category'][$i]['name'] = 'location'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_LOCATION_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_LOCATION_CONFIG_DESC; -*/ - -$i = 0; -$i++; - $modversion['config'][$i]['name'] = 'google_apikey'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'text'; - $modversion['config'][$i]['default'] = ''; - $modversion["config"][$i]["category"] = "global"; -$i++; - $modversion['config'][$i]['name'] = 'popular'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_POPULAR'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_POPULAR_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 100; - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'nbsouscat'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_SUBCATPARENT'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_SUBCATPARENT_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 5; - $modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'index_list_recent'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_RECENT'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_LIST_RECENT_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 1; // true -$modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'blpop'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_BLPOP'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_BLPOP_DESC'; - $modversion['config'][$i]['formtype'] = 'yesno'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 1; // true - $modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'index_list_toprated'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_TOPRATED'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_LIST_TOPRATED_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 1; // true -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'index_list_number'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_NUMBER'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_LIST_NUMBER_DESC'; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 5; -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'index_list_titlelenght'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_TITLELENGHT'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_LIST_TITLELENGHT_DESC'; -$modversion['config'][$i]['formtype'] = 'textbox'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 20; -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'show_home_in_breadcrumb'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_SHOWHOMEINBREADCRUMB'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_SHOWHOMEINBREADCRUMB_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 1; // true/yes -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'usetellafriend'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETELLAFRIEND'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_USETELLAFRIEND_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'usetag'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETAG'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_USETAG_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; -$i++; -$modversion['config'][$i]['name'] = 'useajaxfilemanager'; -$modversion['config'][$i]['title'] = '_MI_XADDRESSES_USEAJAXFILEMANAGER'; -$modversion['config'][$i]['description'] = '_MI_XADDRESSES_USAJAXFILEMANAGER_DESC'; -$modversion['config'][$i]['formtype'] = 'yesno'; -$modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'autoapprove'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_AUTOAPPROVE'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_AUTOAPPROVE_DESC'; - $modversion['config'][$i]['formtype'] = 'yesno'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 0; - $modversion["config"][$i]["category"] = "global"; -$i++; -$modversion["config"][$i]["name"] = "editor"; -$modversion["config"][$i]["title"] = "_MI_XADDRESSES_FORM_OPTIONS"; -$modversion["config"][$i]["description"] = "_MI_XADDRESSES_FORM_OPTIONS_DESC"; -$modversion["config"][$i]["formtype"] = "select"; -$modversion["config"][$i]["valuetype"] = "text"; -$modversion["config"][$i]["default"] = "dhtmltextarea"; -$modversion["config"][$i]["options"] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor"); -$modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'toporder'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_TOPORDER'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_TOPORDER_DESC'; - $modversion['config'][$i]['formtype'] = 'select'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 1; - $modversion['config'][$i]['options'] = array('_MI_XADDRESSES_TOPORDER1' => 1, '_MI_XADDRESSES_TOPORDER2' => 2, '_MI_XADDRESSES_TOPORDER3' => 3, '_MI_XADDRESSES_TOPORDER4' => 4, '_MI_XADDRESSES_TOPORDER5' => 5, '_MI_XADDRESSES_TOPORDER6' => 6, '_MI_XADDRESSES_TOPORDER7' => 7, '_MI_XADDRESSES_TOPORDER8' => 8); - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'newdownloads'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_NEWDLS'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_NEWDLS_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 10; - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'searchorder'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_SEARCHORDER'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_SEARCHORDER_DESC'; - $modversion['config'][$i]['formtype'] = 'select'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 8; - $modversion['config'][$i]['options'] = array('_MI_XADDRESSES_TOPORDER1' => 1, '_MI_XADDRESSES_TOPORDER2' => 2, '_MI_XADDRESSES_TOPORDER3' => 3, '_MI_XADDRESSES_TOPORDER4' => 4, '_MI_XADDRESSES_TOPORDER5' => 5, '_MI_XADDRESSES_TOPORDER6' => 6, '_MI_XADDRESSES_TOPORDER7' => 7, '_MI_XADDRESSES_TOPORDER8' => 8); - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'perpageliste'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_PERPAGELISTE'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_PERPAGELISTE_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 15; - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'perpage'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_PERPAGE'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_PERPAGE_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 10; - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'perpageadmin'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_PERPAGEADMIN'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_PERPAGEADMIN_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 15; - $modversion["config"][$i]["category"] = "global"; - $i++; - $modversion['config'][$i]['name'] = 'showupdated'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_SHOW_UPDATED'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_SHOW_UPDATED_DESC'; - $modversion['config'][$i]['formtype'] = 'yesno'; - $modversion['config'][$i]['valuetype'] = 'int'; - $modversion['config'][$i]['default'] = 1; - $modversion["config"][$i]["category"] = "global"; - - - -// Notifications -$modversion['hasNotification'] = true; -$modversion['notification']['lookup_file'] = 'include/notification_functions.php'; -$modversion['notification']['lookup_func'] = 'xaddresses_notify_iteminfo'; - -$i = 0; -$i++; -$modversion['notification']['category'][$i]['name'] = 'global'; -$modversion['notification']['category'][$i]['title'] = _MI_XADDRESSES_GLOBAL_NOTIFY; -$modversion['notification']['category'][$i]['description'] = _MI_XADDRESSES_GLOBAL_NOTIFYDESC; -$modversion['notification']['category'][$i]['subscribe_from'] = array('index.php', 'locationcategoryview.php', 'locationview.php'); -$i++; -$modversion['notification']['category'][$i]['name'] = 'category'; -$modversion['notification']['category'][$i]['title'] = _MI_XADDRESSES_CATEGORY_NOTIFY; -$modversion['notification']['category'][$i]['description'] = _MI_XADDRESSES_CATEGORY_NOTIFYDESC; -$modversion['notification']['category'][$i]['subscribe_from'] = array('locationcategoryview.php', 'locationview.php'); -$modversion['notification']['category'][$i]['item_name'] = 'cat_id'; -$modversion['notification']['category'][$i]['allow_bookmark'] = true; -$i++; -$modversion['notification']['category'][$i]['name'] = 'location'; -$modversion['notification']['category'][$i]['title'] = _MI_XADDRESSES_LOCATION_NOTIFY; -$modversion['notification']['category'][$i]['description'] = _MI_XADDRESSES_LOCATION_NOTIFYDESC; -$modversion['notification']['category'][$i]['subscribe_from'] = 'locationview.php'; -$modversion['notification']['category'][$i]['item_name'] = 'loc_id'; -$modversion['notification']['category'][$i]['allow_bookmark'] = true; - -$i = 0; -$i++; -$modversion['notification']['event'][$i]['name'] = 'new_category'; -$modversion['notification']['event'][$i]['category'] = 'global'; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_GLOBAL_NEWCATEGORY_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_GLOBAL_NEWCATEGORY_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_GLOBAL_NEWCATEGORY_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'global_newcategory_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_GLOBAL_NEWCATEGORY_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'location_modify'; -$modversion['notification']['event'][$i]['category'] = 'global'; -$modversion['notification']['event'][$i]['admin_only'] = true; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_GLOBAL_LOCATIONMODIFY_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_GLOBAL_LOCATIONMODIFY_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_GLOBAL_LOCATIONMODIFY_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'global_locationmodify_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_GLOBAL_LOCATIONMODIFY_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'location_broken'; -$modversion['notification']['event'][$i]['category'] = 'global'; -$modversion['notification']['event'][$i]['admin_only'] = true; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_GLOBAL_LOCATIONBROKEN_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_GLOBAL_LOCATIONBROKEN_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_GLOBAL_LOCATIONBROKEN_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'global_locationbroken_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_GLOBAL_LOCATIONBROKEN_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'location_submit'; -$modversion['notification']['event'][$i]['category'] = 'global'; -$modversion['notification']['event'][$i]['admin_only'] = true; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_GLOBAL_LOCATIONSUBMIT_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_GLOBAL_LOCATIONSUBMIT_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_GLOBAL_LOCATIONSUBMIT_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'global_locationsubmit_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_GLOBAL_LOCATIONSUBMIT_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'new_location'; -$modversion['notification']['event'][$i]['category'] = 'global'; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_GLOBAL_NEWLOCATION_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_GLOBAL_NEWLOCATION_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_GLOBAL_NEWLOCATION_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'global_newlocation_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_GLOBAL_NEWLOCATION_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'location_submit'; -$modversion['notification']['event'][$i]['category'] = 'category'; -$modversion['notification']['event'][$i]['admin_only'] = true; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_CATEGORY_LOCATIONSUBMIT_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_CATEGORY_LOCATIONSUBMIT_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_CATEGORY_LOCATIONSUBMIT_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'category_locationsubmit_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_CATEGORY_LOCATIONSUBMIT_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'new_location'; -$modversion['notification']['event'][$i]['category'] = 'category'; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_CATEGORY_NEWLOCATION_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_CATEGORY_NEWLOCATION_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_CATEGORY_NEWLOCATION_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'category_newlocation_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_CATEGORY_NEWLOCATION_NOTIFYSBJ; -$i++; -$modversion['notification']['event'][$i]['name'] = 'approve'; -$modversion['notification']['event'][$i]['category'] = 'location'; -$modversion['notification']['event'][$i]['invisible'] = true; -$modversion['notification']['event'][$i]['title'] = _MI_XADDRESSES_LOCATION_APPROVE_NOTIFY; -$modversion['notification']['event'][$i]['caption'] = _MI_XADDRESSES_LOCATION_APPROVE_NOTIFYCAP; -$modversion['notification']['event'][$i]['description'] = _MI_XADDRESSES_LOCATION_APPROVE_NOTIFYDESC; -$modversion['notification']['event'][$i]['mail_template'] = 'location_approve_notify'; -$modversion['notification']['event'][$i]['mail_subject'] = _MI_XADDRESSES_LOCATION_APPROVE_NOTIFYSBJ; -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luc...@us...> - 2012-07-28 06:13:24
|
Revision: 9932 http://xoops.svn.sourceforge.net/xoops/?rev=9932&view=rev Author: luciorota Date: 2012-07-28 06:13:16 +0000 (Sat, 28 Jul 2012) Log Message: ----------- fixed errors added some descriptions Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/class/field.php XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -27,28 +27,36 @@ */ include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; + +// Include xoops admin header +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once XOOPS_ROOT_PATH . '/include/config.php'; +include_once XOOPS_ROOT_PATH . '/include/functions.php'; + +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +xoops_load ('XoopsUserUtility'); + +// Include module functions include_once '../include/config.php'; include_once '../include/functions.php'; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - include_once XOOPS_ROOT_PATH . '/class/tree.php'; - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - xoops_load ('XoopsUserUtility'); + $pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globlang = $GLOBALS['xoopsConfig']['language']; +$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ - include_once $pathDir.'/language/'.$globlang.'/main.php'; +if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ + include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; } else { - include_once $pathDir.'/language/english/main.php'; + include_once $pathDir . '/language/english/main.php'; } -if ( file_exists($pathDir.'/moduleadmin.php')){ - include_once $pathDir.'/moduleadmin.php'; +if ( file_exists($pathDir . '/moduleadmin.php')){ + include_once $pathDir . '/moduleadmin.php'; //return true; -}else{ +} else { xoops_cp_header(); echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); xoops_cp_footer(); @@ -87,7 +95,7 @@ $xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); //xoops_cp_header(); -//Load languages +//Load module languages xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -241,22 +241,6 @@ } else { $field->setVar('field_options', array()); } - - // field_extras - $fieldTypesWithExtras = array(); // IN PROGRESS - if (in_array($field->getVar('field_type'), $fieldTypesWithExtras)) { - $extras = $field->getVar('field_extras'); - if (!empty($_REQUEST['addExtra'])) { - foreach ($_REQUEST['addExtra'] as $extra) { - if ( empty($extra['value'])) continue; - $extras[$extra['key']] = $extra['value']; - $redirectToEdit = true; - } - } - $field->setVar('field_extras', $extras); - } else { - $field->setVar('field_extras', array()); - } } if ($field->getVar('field_edit')) { @@ -282,16 +266,12 @@ $field->setVar('field_default', $field_default); } } - + // field_extras - if (isset($_REQUEST['field_extras'])) { - $field_extras = $field->getValueForSave($_REQUEST['field_extras']); - //Check for multiple selections - if (is_array($field_extras)) { - $field->setVar('field_extras', serialize($field_extras)); - } else { - $field->setVar('field_extras', $field_extras); - } + if (!empty($_REQUEST['field_extras'])) { + $field->setVar('field_extras', $_REQUEST['field_extras']); + } else { + $field->setVar('field_extras', array()); } } Modified: XoopsModules/xaddresses/trunk/xaddresses/class/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/field.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/field.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -40,7 +40,7 @@ * Tricky solution */ function setVar($key, $value, $not_gpc = false) - { + {error_log(print_r($value),true); if ($key == 'field_options' && is_array($value)) { foreach (array_keys($value) as $idx) { $value[$idx] = base64_encode($value[$idx]); @@ -69,6 +69,8 @@ **/ function getEditElement($location) { + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $value = $location->getVar($this->getVar('field_name'), 'e'); if (is_null($value)) { $value = $this->getVar('field_default'); @@ -86,7 +88,16 @@ $options[$optkey] = $optval; } } - include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $extras = $this->getVar('field_extras'); + if (is_array($extras)) { + //asort($extras); + foreach (array_keys($extras) as $key) { + $extval = defined($extras[$key]) ? constant($extras[$key]) : $extras[$key]; + $extkey = defined($key) ? constant($key) : $key; + unset($extras[$key]); + $extras[$extkey] = $extval; + } + } switch ($this->getVar('field_type')) { default: case "autotext": @@ -97,10 +108,12 @@ $element = new XoopsFormText($caption, $name, $this->getVar('field_length'), $this->getVar('field_maxlength'), $value); break; case "textarea": - $element = new XoopsFormTextArea($caption, $name, $value, 4, 30); + //$element = new XoopsFormTextArea($caption, $name, $value, 4, 30); + $element = new XoopsFormTextArea($caption, $name, $value, $extras['rows'], $extras['cols']); break; case "dhtml": - $element = new XoopsFormDhtmlTextArea($caption, $name, $value, 10, 30); + //$element = new XoopsFormDhtmlTextArea($caption, $name, $value, 10, 30); + $element = new XoopsFormDhtmlTextArea($caption, $name, $value, $extras['rows'], $extras['cols']); break; case "select": $element = new XoopsFormSelect($caption, $name, $value); @@ -157,9 +170,8 @@ $element->setExtra("style='width: 280px;'"); break; case "rank": + include_once $GLOBALS['xoops']->path('class/xoopslists.php'); $element = new XoopsFormSelect($caption, $name, $value); - - include_once $GLOBALS['xoops']->path('class/xoopslists.php'); $ranks = XoopsLists::getUserRankList(); $element->addOption(0, "--------------"); $element->addOptionArray($ranks); @@ -428,96 +440,96 @@ /** * save an location field in the database * - * @param object $obj reference to the object + * @param object $field reference to the object * @param bool $force whether to force the query execution despite security settings * @param bool $checkObject check if the object is dirty and clean the attributes * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - function insert(&$obj, $force = false) + function insert(&$field, $force = false) { $locationHandler =& xoops_getmodulehandler('location', 'xaddresses'); - $obj->setVar('field_name', str_replace(' ', '_', $obj->getVar('field_name'))); - $obj->cleanVars(); + $field->setVar('field_name', str_replace(' ', '_', $field->getVar('field_name'))); + $field->cleanVars(); $defaultstring = ""; - switch ($obj->getVar('field_type')) { + switch ($field->getVar('field_type')) { case "datetime": case "date": - $obj->setVar('field_valuetype', XOBJ_DTYPE_INT); - $obj->setVar('field_maxlength', 10); + $field->setVar('field_valuetype', XOBJ_DTYPE_INT); + $field->setVar('field_maxlength', 10); break; case "longdate": - $obj->setVar('field_valuetype', XOBJ_DTYPE_MTIME); + $field->setVar('field_valuetype', XOBJ_DTYPE_MTIME); break; case "yesno": - $obj->setVar('field_valuetype', XOBJ_DTYPE_INT); - $obj->setVar('field_maxlength', 1); + $field->setVar('field_valuetype', XOBJ_DTYPE_INT); + $field->setVar('field_maxlength', 1); break; case "textbox": - if ($obj->getVar('field_valuetype') != XOBJ_DTYPE_INT) { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + if ($field->getVar('field_valuetype') != XOBJ_DTYPE_INT) { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); } break; case "autotext": - if ($obj->getVar('field_valuetype') != XOBJ_DTYPE_INT) { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + if ($field->getVar('field_valuetype') != XOBJ_DTYPE_INT) { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); } break; case "group_multi": case "select_multi": case "checkbox": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; case "language": case "timezone": case "theme": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; case "image": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; case "file": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); break; // IN_PROGRESS case "multipleimage": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; case "multiplefile": - $obj->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); + $field->setVar('field_valuetype', XOBJ_DTYPE_ARRAY); break; // IN_PROGRESS case "dhtml": case "textarea": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); break; case "kmlmap": - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTAREA); break; } - if ($obj->getVar('field_valuetype') == "") { - $obj->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); + if ($field->getVar('field_valuetype') == "") { + $field->setVar('field_valuetype', XOBJ_DTYPE_TXTBOX); } - if (!in_array($obj->getVar('field_name'), $this->getLocationVars())) { - if ($obj->isNew()) { + if (!in_array($field->getVar('field_name'), $this->getLocationVars())) { + if ($field->isNew()) { //add column to table $changetype = "ADD"; } else { //update column information - $changetype = "CHANGE `" . $obj->getVar('field_name', 'n') . "`"; + $changetype = "CHANGE `" . $field->getVar('field_name', 'n') . "`"; } - $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? "(" . $obj->getVar('field_maxlength') . ")" : ""; - $lengthstring = $obj->getVar('field_length') > 0 ? "(" . $obj->getVar('field_length') . ")" : ""; + $maxlengthstring = $field->getVar('field_maxlength') > 0 ? "(" . $field->getVar('field_maxlength') . ")" : ""; + $lengthstring = $field->getVar('field_length') > 0 ? "(" . $field->getVar('field_length') . ")" : ""; $notnullstring = " NOT NULL"; //set type - switch ($obj->getVar('field_valuetype')) { + switch ($field->getVar('field_valuetype')) { default: case XOBJ_DTYPE_ARRAY: case XOBJ_DTYPE_UNICODE_ARRAY: $type = "mediumtext"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); break; case XOBJ_DTYPE_UNICODE_EMAIL: case XOBJ_DTYPE_UNICODE_TXTBOX: @@ -530,37 +542,37 @@ if (!$lengthstring) { //so set it to max if length is not set - or should it fail? $lengthstring = "(40)"; - $obj->setVar('field_length', 40); + $field->setVar('field_length', 40); } // varchars must have a maxlength if (!$maxlengthstring) { //so set it to max if maxlength is not set - or should it fail? $maxlengthstring = "(255)"; - $obj->setVar('field_maxlength', 255); + $field->setVar('field_maxlength', 255); } - //if ( $obj->getVar('field_default') ) { - $defaultstring = " DEFAULT " . $this->db->quote($obj->cleanVars['field_default']); + //if ( $field->getVar('field_default') ) { + $defaultstring = " DEFAULT " . $this->db->quote($field->cleanVars['field_default']); //} break; case XOBJ_DTYPE_INT: $type = "int"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . intval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', intval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . intval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', intval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_DECIMAL: $type = "decimal(14,6)"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . doubleval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', doubleval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . doubleval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', doubleval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_FLOAT: $type = "float(15,9)"; - if ($obj->getVar('field_default') || $obj->getVar('field_default') !== '') { - $defaultstring = " DEFAULT '" . floatval($obj->cleanVars['field_default']) . "'"; - $obj->setVar('field_default', floatval($obj->cleanVars['field_default'])); + if ($field->getVar('field_default') || $field->getVar('field_default') !== '') { + $defaultstring = " DEFAULT '" . floatval($field->cleanVars['field_default']) . "'"; + $field->setVar('field_default', floatval($field->cleanVars['field_default'])); } break; case XOBJ_DTYPE_OTHER: @@ -568,19 +580,19 @@ case XOBJ_DTYPE_TXTAREA: $type = "text"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); $notnullstring = ""; break; case XOBJ_DTYPE_MTIME: $type = "date"; $maxlengthstring = ""; - $obj->setVar('field_maxlength', null); + $field->setVar('field_maxlength', null); break; } $sql = "ALTER TABLE `" . $locationHandler->table . "`"; $sql.= " " . $changetype; - $sql.= " " . "`" . $obj->cleanVars['field_name'] . "`"; + $sql.= " " . "`" . $field->cleanVars['field_name'] . "`"; $sql.= " " . $type . $maxlengthstring . $notnullstring . $defaultstring; if (!$this->db->query($sql)) { return false; @@ -588,41 +600,41 @@ } //change this to also update the cached field information storage - $obj->setDirty(); - if (!parent::insert($obj, $force)) { + $field->setDirty(); + if (!parent::insert($field, $force)) { return false; } - return $obj->getVar('field_id'); + return $field->getVar('field_id'); } /** * delete a location field from the database * - * @param object $obj reference to the object to delete + * @param object $field reference to the object to delete * @param bool $force * @return bool FALSE if failed. **/ - function delete(&$obj, $force = false) + function delete(&$field, $force = false) { $locationHandler =& xoops_getmodulehandler('location', 'xaddresses'); // remove column from table $sql = "ALTER TABLE " . $locationHandler->table; - $sql.= " DROP `" . $obj->getVar('field_name', 'n') . "`"; + $sql.= " DROP `" . $field->getVar('field_name', 'n') . "`"; if ($this->db->query($sql)) { //change this to update the cached field information storage - if (!parent::delete($obj, $force)) { + if (!parent::delete($field, $force)) { return false; } - if ($obj->getVar('field_show') || $obj->getVar('field_edit')) { + if ($field->getVar('field_show') || $field->getVar('field_edit')) { $moduleHandler =& xoops_gethandler('module'); $module = $moduleHandler->getByDirname('xaddresses'); if (is_object($module)) { // Remove group permissions $groupPermHandler =& xoops_gethandler('groupperm'); $criteria = new CriteriaCompo(new Criteria('gperm_modid', $module->getVar('mid'))); - $criteria->add(new Criteria('gperm_itemid', $obj->getVar('field_id'))); + $criteria->add(new Criteria('gperm_itemid', $field->getVar('field_id'))); return $groupPermHandler->deleteAll($criteria); } } Modified: XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/formxoopsimage.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -107,7 +107,7 @@ { $html = "<div>"; $html.= "<input type='text' name='" . $this->getName() . "' title='" . $this->getTitle() . "' size='" . $this->getSize() ."' maxlength='" . $this->getMaxlength() ."' value='" . $this->getValue() . "' />"; - $html.= "<img src='" . XOOPS_URL . "/images/image.gif' alt='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' title='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' onclick='randomId = Math.random().toString(); this.parentNode.firstChild.id = \"input_\" + randomId; openWithSelfMain("" . XOOPS_URL . "/modules/ajaxfilemanager/imagemanager/imagemanager.php?target=input_" + randomId + "&editor=src","imagemanager",800,600);' onmouseover='style.cursor=\"hand\"'/>"; + $html.= "<img src='" . XOOPS_URL . "/images/image.gif' alt='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' title='" . _FORMXOOPSIMAGE_IMAGEMANAGER . "' onclick='randomId = Math.random().toString(); this.parentNode.firstChild.id = \"input_\" + randomId; openWithSelfMain("" . XOOPS_URL . "/imagemanager.php?target=input_" + randomId + "&editor=src","imagemanager",800,600);' onmouseover='style.cursor=\"hand\"'/>"; $html.= sprintf($this->getPreviewformat(), $this->getSrc()); $html.= "</div>"; return $html; Modified: XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/class/locationcategory.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -2,7 +2,6 @@ defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); xoops_load('formxoopsimage', 'xaddresses'); // load custom form class - class XaddressesLocationcategory extends XoopsObject { function __construct() @@ -11,9 +10,9 @@ $this->initVar('cat_pid', XOBJ_DTYPE_INT, null, false); $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX); $this->initVar('cat_description', XOBJ_DTYPE_TXTAREA); - $this->initVar('cat_dohtml', XOBJ_DTYPE_INT, 1, false); // For html form + $this->initVar('cat_dohtml', XOBJ_DTYPE_INT, true, false); // For html form $this->initVar('cat_imgurl',XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('cat_weight', XOBJ_DTYPE_INT); + $this->initVar('cat_weight', XOBJ_DTYPE_INT, 0); $this->initVar('cat_map_type', XOBJ_DTYPE_TXTBOX); } @@ -32,7 +31,7 @@ */ function getForm($action = false, &$form = null) { - global $xoopsModuleConfig; + global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser; if ($action === false) { $action = $_SERVER['REQUEST_URI']; } @@ -48,42 +47,46 @@ $form->setExtra('enctype="multipart/form-data"'); + // Category title $form->addElement(new XoopsFormText(_AM_XADDRESSES_CAT_TITLE, 'cat_title', 35, 255, $this->getVar('cat_title')), true); + + // Hidden fields if (!$this->isNew()) { //Load groups $form->addElement(new XoopsFormHidden('cat_id', $this->getVar('cat_id'))); $form->addElement(new XoopsFormHidden('cat_modified', true)); } - // Description - $editor_configs = array(); - $editor_configs['name'] = 'cat_description'; - $editor_configs['value'] = $this->getVar('cat_description', 'e'); - $editor_configs['rows'] = 20; - $editor_configs['cols'] = 160; - $editor_configs['width'] = '100%'; - $editor_configs['height'] = '400px'; - $editor_configs['editor'] = $xoopsModuleConfig['editor']; + // Category description + $editor_configs = array(); + $editor_configs['name'] = 'cat_description'; + $editor_configs['value'] = $this->getVar('cat_description', 'e'); + $editor_configs['rows'] = 20; + $editor_configs['cols'] = 160; + $editor_configs['width'] = '100%'; + $editor_configs['height'] = '400px'; + $editor_configs['editor'] = $GLOBALS['xoopsModuleConfig']['text_editor']; $form->addElement( new XoopsFormEditor(_AM_XADDRESSES_CAT_DESCRIPTION, 'cat_description', $editor_configs), false); - //$form->addElement(new XoopsFormTextArea(_AM_XADDRESSES_DESCRIPTION, 'cat_description', $this->getVar('cat_description', 'e'))); - // Image + // Category image $form->addElement(new FormXoopsImage (_AM_XADDRESSES_CAT_IMG, 'cat_imgurl', 40, 255, $this->getVar('cat_imgurl'))); // custom form class // Parent category - $xaddressescat_Handler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight ASC, cat_title'); - $criteria->setOrder('ASC'); - $xaddressescat_arr = $xaddressescat_Handler->getall($criteria); - $mytree = new XoopsObjectTree($xaddressescat_arr, 'cat_id', 'cat_pid'); - $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_CAT_PARENT, $mytree->makeSelBox('cat_pid', 'cat_title','--',$this->getVar('cat_pid'), true))); + $xaddressescat_Handler =& xoops_getModuleHandler('locationcategory', 'xaddresses'); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight ASC, cat_title'); + $criteria->setOrder('ASC'); + $xaddressescat_arr = $xaddressescat_Handler->getall($criteria); + $mytree = new XoopsObjectTree($xaddressescat_arr, 'cat_id', 'cat_pid'); + $categoryCategortSelect = new XoopsFormLabel(_AM_XADDRESSES_CAT_PARENT, $mytree->makeSelBox('cat_pid', 'cat_title','--',$this->getVar('cat_pid'), true)); + $categoryCategortSelect->setDescription(_AM_XADDRESSES_CAT_PARENT_DESC); + $form->addElement($categoryCategortSelect); - // Weight + // Category weight $form->addElement(new XoopsFormText(_AM_XADDRESSES_CAT_WEIGHT, 'cat_weight', 35, 35, $this->getVar('cat_weight', 'e')), true); // Map Setting - $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_MAP_SETTING, _AM_XADDRESSES_CAT_MAP_SETTING, '')); + $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_MAP_SETTING, '<b>' . _AM_XADDRESSES_CAT_MAP_SETTING . '</b>', '')); // Maptype $select_map_type = new XoopsFormSelect (_AM_XADDRESSES_CAT_MAP_TYPE, 'cat_map_type', $this->getVar('cat_map_type'), 1, false); $select_map_type->addOption('ROADMAP', 'ROADMAP'); @@ -93,8 +96,8 @@ $select_map_type->setDescription(_AM_XADDRESSES_CAT_MAP_TYPE_DESC); $form->addElement($select_map_type); - // Permissions - $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_PERMISSIONS, _AM_XADDRESSES_CAT_PERMISSIONS, '')); + // Category permissions + $form->addElement(new XoopsFormLabel (_AM_XADDRESSES_CAT_PERMISSIONS, '<b>' . _AM_XADDRESSES_CAT_PERMISSIONS . '</b>', '')); $memberHandler = & xoops_gethandler('member'); $groupPermHandler =& xoops_gethandler('groupperm'); Modified: XoopsModules/xaddresses/trunk/xaddresses/include/forms.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/include/forms.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/include/forms.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -154,15 +154,14 @@ break; } //field_notnull - //$fiedlnotnullradio = new XoopsFormRadioYN(_AM_XADDRESSES_FIELD_NOTNULL, 'field_notnull', $field->getVar('field_notnull', 'e')); - //$fiedlnotnullradio->setDescription(_AM_XADDRESSES_FIELD_NOTNULL_DESC); - //$form->addElement($fiedlnotnullradio); + //$fieldNotNullRadio = new XoopsFormRadioYN(_AM_XADDRESSES_FIELD_NOTNULL, 'field_notnull', $field->getVar('field_notnull', 'e')); + //$fieldNotNullRadio->setDescription(_AM_XADDRESSES_FIELD_NOTNULL_DESC); + //$form->addElement($fieldNotNullRadio); //field_options - $fieldTypesWithOptions = array('select', 'select-multi', 'radio', 'checkbox'); + $fieldTypesWithOptions = array('select', 'select_multi', 'radio', 'checkbox'); if (in_array($field->getVar('field_type'), $fieldTypesWithOptions)) { $options = $field->getVar('field_options'); -// print_r($options); if (count($options) > 0) { $remove_options = new XoopsFormCheckBox(_AM_XADDRESSES_FIELD_REMOVEOPTIONS, 'removeOptions'); $remove_options->columns = 3; @@ -184,42 +183,55 @@ $option_text .= "</table>"; $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_FIELD_ADDOPTION, $option_text) ); } -/* IN_PROGRESS + } + //field_default & field_maxlength + if ($field->getVar('field_edit')) { //field_extras - $fieldTypeswithextras = array('image'); + $fieldTypeswithextras = array('textarea', 'dhtml'); if (in_array($field->getVar('field_type'), $fieldTypeswithextras)) { $extras = $field->getVar('field_extras'); - if (count($extras) > 0) { - $remove_extras = new XoopsFormCheckBox(_AM_XADDRESSES_REMOVEEXTRAS, 'removeExtras'); - $remove_extras->columns = 3; - asort($extras); - foreach (array_keys($extras) as $key) { - $extras[$key] .= "[{$key}]"; - } - $remove_options->addOptionArray($extras); - $form->addElement($remove_extras); - } - $extra_text = "<table cellspacing='1'><tr><td width='20%'>" . _AM_XADDRESSES_KEY . "</td><td>" . _AM_XADDRESSES_VALUE . "</td></tr>"; - for ($i = 0; $i < 3; $i++) { - $extra_text .= "<tr>"; - $extra_text .= "<td><input type='text' name='addExtra[{$i}][key]' id='addExtra[{$i}][key]' size='15' /></td>"; - $extra_text .= "<td><input type='text' name='addExtra[{$i}][value]' id='addExtra[{$i}][value]' size='35' /></td>"; - $extra_text .= "</tr>"; - $extra_text .= "<tr height='3px'><td colspan='2'> </td></tr>"; - } - $extra_text .= "</table>"; - $form->addElement(new XoopsFormLabel(_AM_XADDRESSES_ADDEXTRA, $extra_text) ); } -*/ - } - //field_default & field_maxlength - if ($field->getVar('field_edit')) { + switch ($field->getVar('field_type')) { case "textbox": + $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 4, 4, $field->getVar('field_length', 'e')); + $fieldLengthText->setDescription(_AM_XADDRESSES_FIELD_LENGTH_DESC); + $form->addElement($fieldLengthText); + $fieldMaxLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_MAXLENGTH, 'field_maxlength', 4, 4, $field->getVar('field_maxlength', 'e')); + $fieldMaxLengthText->setDescription(_AM_XADDRESSES_FIELD_MAXLENGTH_DESC); + $form->addElement($fieldMaxLengthText); + $fieldDefaultTextarea = new XoopsFormTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "textarea": + if (empty($extras['rows'])) {$extras['rows'] = 4;} // default rows value + if (empty($extras['cols'])) {$extras['cols'] = 30;} // default cols value + $fieldTextareaRowsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREAROWS, 'field_extras[rows]', 4, 4, $extras['rows']); + $fieldTextareaRowsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC); + $form->addElement($fieldTextareaRowsText); + $fieldTextareaColsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREACOLS, 'field_extras[cols]', 4, 4, $extras['cols']); + $fieldTextareaColsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC); + $form->addElement($fieldTextareaColsText); + $fieldDefaultTextarea = new XoopsFormTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "dhtml": + if (empty($extras['rows'])) {$extras['rows'] = 4;} // default rows value + if (empty($extras['cols'])) {$extras['cols'] = 30;} // default cols value + $fieldTextareaRowsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREAROWS, 'field_extras[rows]', 4, 4, $extras['rows']); + $fieldTextareaRowsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC); + $form->addElement($fieldTextareaRowsText); + $fieldTextareaColsText = new XoopsFormText(_AM_XADDRESSES_FIELD_TEXTAREACOLS, 'field_extras[cols]', 4, 4, $extras['cols']); + $fieldTextareaColsText->setDescription(_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC); + $form->addElement($fieldTextareaColsText); + $fieldDefaultTextarea = new XoopsFormDhtmlTextArea(_AM_XADDRESSES_FIELD_DEFAULT, 'field_default', $field->getVar('field_default', 'e')); + $fieldDefaultTextarea->setDescription(_AM_XADDRESSES_FIELD_DEFAULT_DESC); + $form->addElement($fieldDefaultTextarea); + break; case "kmlmap": - $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 35, 35, $field->getVar('field_length', 'e')); + $fieldLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_LENGTH, 'field_length', 3, 3, $field->getVar('field_length', 'e')); $fieldLengthText->setDescription(_AM_XADDRESSES_FIELD_LENGTH_DESC); $form->addElement($fieldLengthText); $fieldMaxLengthText = new XoopsFormText(_AM_XADDRESSES_FIELD_MAXLENGTH, 'field_maxlength', 35, 35, $field->getVar('field_maxlength', 'e')); @@ -336,6 +348,7 @@ $form->addElement($fieldRequiredRadio); } + // Permissions @@ -368,6 +381,7 @@ $searchableTypes = array( 'textbox', 'textarea', + 'dhtml', 'select', 'radio', 'yesno', Modified: XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/language/english/admin.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -166,8 +166,10 @@ define("_AM_XADDRESSES_CAT_ID","Id"); define("_AM_XADDRESSES_CAT_TITLE","Title"); define("_AM_XADDRESSES_CAT_DESCRIPTION","Description"); +define("_AM_XADDRESSES_CAT_DESCRIPTION_DESC","Leave empty if category is a main category"); define("_AM_XADDRESSES_CAT_IMG","Category image"); define("_AM_XADDRESSES_CAT_PARENT","In the category"); +define("_AM_XADDRESSES_CAT_PARENT_DESC","Leave empty if category is a main category"); define("_AM_XADDRESSES_CAT_WEIGHT","Weight"); define("_AM_XADDRESSES_CAT_MAP_SETTING","GoogleMaps settings"); @@ -255,8 +257,14 @@ //define("_AM_XADDRESSES_FIELD_ADDEXTRA", "Maximum Length"); //define("_AM_XADDRESSES_FIELD_ADDEXTRA_DESC", "// IN PROGRESS"); + define("_AM_XADDRESSES_FIELD_LENGTH", "Field Length In Form"); define("_AM_XADDRESSES_FIELD_LENGTH_DESC", "// IN PROGRESS"); +define("_AM_XADDRESSES_FIELD_TEXTAREAROWS", "Field rows attribute"); +define("_AM_XADDRESSES_FIELD_TEXTAREAROWS_DESC", "Specifies the visible number of lines in a text area"); +define("_AM_XADDRESSES_FIELD_TEXTAREACOLS", "Field cols attribute"); +define("_AM_XADDRESSES_FIELD_TEXTAREACOLS_DESC", "Specifies the visible width of a text area"); + define("_AM_XADDRESSES_FIELD_MAXLENGTH", "Maximum Field Length"); define("_AM_XADDRESSES_FIELD_MAXLENGTH_DESC", "// IN PROGRESS"); define("_AM_XADDRESSES_FIELD_DEFAULT", "Default"); Modified: XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/language/english/modinfo.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -78,8 +78,8 @@ define('_MI_XADDRESSES_AUTOAPPROVE',"Auto approve new addresses without admin intervention ?"); define('_MI_XADDRESSES_AUTOAPPROVE_DESC', ''); - define("_MI_XADDRESSES_FORM_OPTIONS","Editor"); - define("_MI_XADDRESSES_FORM_OPTIONS_DESC",""); +define("_MI_XADDRESSES_FORM_OPTIONS","[Editor] Choose an editor for categories description"); +define("_MI_XADDRESSES_FORM_OPTIONS_DESC","<ul><li><b>dhtmltextarea:</b> default Xoops editor</li><li><b>textarea:</b> standard html textarea</li><li><b>tinymce:</b> enhanced WYSIWYG editor</li><li>...</li></ul>"); define('_MI_XADDRESSES_TOPORDER','How to display items on the index page?'); define('_MI_XADDRESSES_TOPORDER1','Date (DESC)'); define('_MI_XADDRESSES_TOPORDER2','Date (ASC)'); Modified: XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/sql/mysql.sql 2012-07-28 06:13:16 UTC (rev 9932) @@ -65,7 +65,7 @@ `field_show` tinyint(1) unsigned NOT NULL default '0', `field_config` tinyint(1) unsigned NOT NULL default '0', `field_options` text, - `field_extras` text, + `field_extras` text, PRIMARY KEY (`field_id`), UNIQUE KEY `field_name` (`field_name`) ) ENGINE=MyISAM; Modified: XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/templates/xaddresses_admin_fieldlist.html 2012-07-28 06:13:16 UTC (rev 9932) @@ -16,7 +16,7 @@ <td><{$field.field_title}></td> <td><{$field.field_description}></td> <td><{$field.field_type}></td> - <td>pippo + <td> <select name="category[<{$field.field_id}>]"> <{html_options options=$categories selected=$field.cat_id}> </select> Modified: XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-28 06:09:13 UTC (rev 9931) +++ XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-28 06:13:16 UTC (rev 9932) @@ -1,13 +1,13 @@ <?php if (!defined('XOOPS_ROOT_PATH')){ exit(); } $dirname = basename( dirname( __FILE__ ) ) ; - +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; xoops_load('XoopsLists'); $modversion['name'] = _MI_XADDRESSES_NAME; $modversion['version'] = '1.0'; $modversion['description'] = _MI_XADDRESSES_DESC; -$modversion['author'] = "Rota Lucio"; +$modversion['author'] = 'Rota Lucio'; $modversion['author_mail'] = 'luc...@gm...'; $modversion['author_website_url'] = 'http://luciorota.altervista.org'; $modversion['author_website_name'] = 'http://luciorota.altervista.org'; @@ -17,11 +17,11 @@ $modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; $modversion['release_info'] = "RC"; -$modversion['release_file'] = XOOPS_URL."/modules/{$dirname}/docs/RC"; -$modversion['release_date'] = "2012/07/25"; // 'Y/m/d' +$modversion['release_file'] = XOOPS_URL . "/modules/{$dirname}/docs/RC"; +$modversion['release_date'] = "2012/07/27"; // 'Y/m/d' $modversion['manual'] = 'Help'; -$modversion['manual_file'] = XOOPS_URL."/modules/{$dirname}/docs/help.html"; +$modversion['manual_file'] = XOOPS_URL . "/modules/{$dirname}/docs/help.html"; $modversion['min_php'] = '5.2'; $modversion['min_xoops'] = '2.4.5'; // 'XOOPS 2.5'; $modversion['min_admin']= '1.1'; @@ -34,7 +34,7 @@ $modversion['icons16'] = "modules/{$dirname}/images/icons/16x16"; $modversion['icons32'] = "modules/{$dirname}/images/icons/32x32"; -//About +// About $modversion['demo_site_url'] = "IN PROGRESS"; $modversion['demo_site_name'] = "IN PROGRESS"; $modversion['forum_site_url'] = "IN PROGRESS"; @@ -54,15 +54,13 @@ $modversion['adminmenu'] = "admin/menu.php"; // Mysql file $modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -// Mysql file -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; // Tables created by sql file (without prefix!) $modversion['tables'][0] = "xaddresses_locationcategory"; $modversion['tables'][1] = "xaddresses_location"; $modversion['tables'][2] = "xaddresses_fieldcategory"; $modversion['tables'][3] = "xaddresses_field"; -// IN PROGRESS + $modversion['tables'][4] = "xaddresses_broken"; $modversion['tables'][5] = "xaddresses_modify"; $modversion['tables'][6] = "xaddresses_votedata"; @@ -80,12 +78,10 @@ $i = 0; $isAdmin = false; if (!empty($GLOBALS['xoopsUser'])) { - //$modversion['sub'][0]['name'] = _MI_XADDRESSES_TODO; - //$modversion['sub'][0]['url'] = "public-useralbum.php?id=".$GLOBALS['xoopsUser']->uid(); - // Check if xoopsUser is a module administrator + // check if xoopsUser is a module administrator $isAdmin = ($GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid'))); } - // Add the Submit new item button (if user has right submit permissions) + // add the Submit new item button (if user has right submit permissions) if ($isAdmin || (isset($GLOBALS['xoopsModuleConfig']['allowsubmit']) && $GLOBALS['xoopsModuleConfig']['allowsubmit'] == true && (is_object($GLOBALS['xoopsUser']) || @@ -100,7 +96,7 @@ $i++; $modversion['sub'][$i]['name'] = _MI_XADDRESSES_SEARCH; $modversion['sub'][$i]['url'] = "locationsearch.php"; - // Add the Module Administration button (if user has right permissions) + // add the Module Administration button (if user has right permissions) if ($isAdmin) { $i++; $modversion['sub'][$i]['name'] = _MI_XADDRESSES_ADMIN; @@ -108,7 +104,9 @@ } } -// Pour les blocs + + +// Blocks $modversion['blocks'][1]['file'] = "xaddresses_top.php"; $modversion['blocks'][1]['name'] = _MI_XADDRESSES_BNAME1; $modversion['blocks'][1]['description'] = _MI_XADDRESSES_BNAMEDSC1; @@ -155,7 +153,7 @@ $modversion['comments']['itemName'] = 'loc_id'; $modversion['comments']['pageName'] = 'locationview.php'; $modversion['comments']['extraParams'] = array('loc_cat_id'); -// Comment callback functions +// comment callback functions $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; $modversion['comments']['callback']['approve'] = 'xaddresses_com_approve'; $modversion['comments']['callback']['update'] = 'xaddresses_com_update'; @@ -192,7 +190,7 @@ $modversion['templates'][$i]['file'] = 'xaddresses_locationsearchresults.html'; $modversion['templates'][$i]['description'] = ''; -// Admin Templates +// admin templates $i++; $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationcategorylist.html'; $modversion['templates'][$i]['description'] = ''; @@ -201,15 +199,15 @@ $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationlist.html'; $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationbrokenlist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; - $i++; - $modversion['templates'][$i]['file'] = 'xaddresses_admin_locationmodifylist.html'; - $modversion['templates'][$i]['description'] = ''; - //$modversion['templates'][$i]['type'] = 'admin'; $i++; +$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationbrokenlist.html'; +$modversion['templates'][$i]['description'] = ''; +//$modversion['templates'][$i]['type'] = 'admin'; +$i++; +$modversion['templates'][$i]['file'] = 'xaddresses_admin_locationmodifylist.html'; +$modversion['templates'][$i]['description'] = ''; +//$modversion['templates'][$i]['type'] = 'admin'; +$i++; $modversion['templates'][$i]['file'] = 'xaddresses_admin_fieldcategorylist.html'; $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; @@ -218,7 +216,7 @@ $modversion['templates'][$i]['description'] = ''; //$modversion['templates'][$i]['type'] = 'admin'; -// Image Manager Templates +// image manager templates $i++; $modversion['templates'][$i]['file'] = 'xaddresses_imagemanager.html'; $modversion['templates'][$i]['description'] = ''; @@ -229,7 +227,7 @@ // Preferences -// FOR FUTURE XOOPS VERSIONS +// MAYBE FOR FUTURE XOOPS VERSIONS /* $i = 0; $i++; @@ -245,16 +243,15 @@ $modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_LOCATION_CONFIG; $modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_LOCATION_CONFIG_DESC; */ - $i = 0; $i++; - $modversion['config'][$i]['name'] = 'google_apikey'; - $modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; - $modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; - $modversion['config'][$i]['formtype'] = 'textbox'; - $modversion['config'][$i]['valuetype'] = 'text'; - $modversion['config'][$i]['default'] = ''; - $modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['name'] = 'google_apikey'; +$modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; +$modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = ''; +$modversion["config"][$i]["category"] = "global"; $i++; $modversion['config'][$i]['name'] = 'popular'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_POPULAR'; @@ -302,7 +299,7 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 5; -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'index_list_titlelenght'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_LIST_TITLELENGHT'; @@ -310,7 +307,7 @@ $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 20; -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'show_home_in_breadcrumb'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_SHOWHOMEINBREADCRUMB'; @@ -318,7 +315,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 1; // true/yes -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'usetellafriend'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETELLAFRIEND'; @@ -326,7 +323,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'usetag'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USETAG'; @@ -334,7 +331,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'useajaxfilemanager'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_USEAJAXFILEMANAGER'; @@ -342,7 +339,7 @@ $modversion['config'][$i]['formtype'] = 'yesno'; $modversion['config'][$i]['valuetype'] = 'int'; $modversion['config'][$i]['default'] = 0; // false/no -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'autoapprove'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_AUTOAPPROVE'; @@ -352,14 +349,17 @@ $modversion['config'][$i]['default'] = 0; $modversion["config"][$i]["category"] = "global"; $i++; -$modversion["config"][$i]["name"] = "editor"; -$modversion["config"][$i]["title"] = "_MI_XADDRESSES_FORM_OPTIONS"; -$modversion["config"][$i]["description"] = "_MI_XADDRESSES_FORM_OPTIONS_DESC"; -$modversion["config"][$i]["formtype"] = "select"; -$modversion["config"][$i]["valuetype"] = "text"; -$modversion["config"][$i]["default"] = "dhtmltextarea"; -$modversion["config"][$i]["options"] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor"); -$modversion["config"][$i]["category"] = "global"; +$modversion['config'][$i]['name'] = 'text_editor'; +$modversion['config'][$i]['title'] = '_MI_XADDRESSES_FORM_OPTIONS'; +$modversion['config'][$i]['description'] = '_MI_XADDRESSES_FORM_OPTIONS_DESC'; +$modversion['config'][$i]['formtype'] = 'select'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = 'dhtmltextarea'; +//xoops_load('xoopseditorhandler'); +//$editor_handler = XoopsEditorHandler::getInstance(); +//$modversion['config'][$i]['options'] = array_flip($editor_handler->getList()); +$modversion['config'][$i]['options'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); +$modversion['config'][$i]['category'] = 'global'; $i++; $modversion['config'][$i]['name'] = 'toporder'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_TOPORDER'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luc...@us...> - 2012-07-30 20:23:51
|
Revision: 9949 http://xoops.svn.sourceforge.net/xoops/?rev=9949&view=rev Author: luciorota Date: 2012-07-30 20:23:44 +0000 (Mon, 30 Jul 2012) Log Message: ----------- Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Added Paths: ----------- XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/index.html XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/xaddresses.php Removed Paths: ------------- XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extension/ Modified: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-30 11:25:09 UTC (rev 9948) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-07-30 20:23:44 UTC (rev 9949) @@ -27,32 +27,36 @@ */ include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +$dirname = basename(dirname(dirname( __FILE__ ) )); // Include xoops admin header include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; -include_once XOOPS_ROOT_PATH . '/include/config.php'; -include_once XOOPS_ROOT_PATH . '/include/functions.php'; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/tree.php'; include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; xoops_load ('XoopsUserUtility'); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; + // Include module functions -include_once '../include/config.php'; -include_once '../include/functions.php'; +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; - + +// Check and load moduleadmin classes $pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); $globalLanguage = $GLOBALS['xoopsConfig']['language']; - if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; } else { include_once $pathDir . '/language/english/main.php'; } - if ( file_exists($pathDir . '/moduleadmin.php')){ include_once $pathDir . '/moduleadmin.php'; //return true; @@ -63,14 +67,6 @@ //return false; } -$dirname = basename(dirname(dirname( __FILE__ ) )); -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - $myts =& MyTextSanitizer::getInstance(); // Get user groups Added: XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/index.html =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/index.html (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/index.html 2012-07-30 20:23:44 UTC (rev 9949) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/xaddresses.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/xaddresses.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/extra/textsanitizer.extensions/xaddresses/xaddresses.php 2012-07-30 20:23:44 UTC (rev 9949) @@ -0,0 +1,76 @@ +<?php +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class MytsXaddresses extends MyTextSanitizerExtension +{ + function encode($textarea_id) + { + $code = "<img src='" . XOOPS_URL . "/modules/xaddresses/images/map_button.gif' alt='" . _XOOPS_FORM_ALTMAP . "' onclick='xoopsCodeMap(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMAP, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; + $code.= "<img src='" . XOOPS_URL . "/modules/xaddresses/images/map_button.gif' alt='" . _XOOPS_FORM_ALTLOC . "' onclick='xoopsCodeLoc(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERLOC, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; + $javascript = <<<EOF + function xoopsCodeMap(id, enterMapPhrase) + { + var selection = xoopsGetSelect(id); + if (selection.length > 0) { + var text = selection; + } else { + var text = prompt(enterMapPhrase, ""); + } + var domobj = xoopsGetElementById(id); + if ( text.length > 0 ) { + var result = "[map]" + text + "[/map]"; + xoopsInsertText(domobj, result); + } + domobj.focus(); + } + function xoopsCodeLoc(id, enterLocPhrase) + { + var selection = xoopsGetSelect(id); + if (selection.length > 0) { + var text = selection; + } else { + var text = prompt(enterLocPhrase, ""); + } + var domobj = xoopsGetElementById(id); + if ( text.length > 0 ) { + var result = "[loc]" + text + "[/loc]"; + xoopsInsertText(domobj, result); + } + domobj.focus(); + } +EOF; + + return array( + $code , + $javascript); + } + + function load(&$ts) + { + $ts->patterns[] = "/\[map\](.*?)\[\/map\]/es"; + $ts->replacements[] = __CLASS__ . "::decodemap( '\\1' )"; + + $ts->patterns[] = "/\[mapcat\](.*?)\[\/mapcat\]/es"; + $ts->replacements[] = __CLASS__ . "::decodemapcat( '\\1' )"; + + + $ts->patterns[] = "/\[loc](.*)\[\/loc\]/sU"; + $ts->replacements[] = 'LOCATION \\1'; + $ts->patterns[] = "/\[location](.*)\[\/location\]/sU"; + $ts->replacements[] = 'LOCATION \\1'; + + return true; + } + + function decodemap($id) + { + $rp = "MAP {$id}"; + return $rp; + } + function decodemapcat($id) + { + $rp = "CATEGORY {$id}"; + return $rp; + } +} +?> \ No newline at end of file Modified: XoopsModules/xaddresses/trunk/xaddresses/include/config.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/include/config.php 2012-07-30 11:25:09 UTC (rev 9948) +++ XoopsModules/xaddresses/trunk/xaddresses/include/config.php 2012-07-30 20:23:44 UTC (rev 9949) @@ -27,11 +27,11 @@ */ if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; -define("XADDRESSES_PATH", XOOPS_ROOT_PATH."/modules/xaddresses"); -define("XADDRESSES_URL", XOOPS_URL."/modules/xaddresses"); +define("XADDRESSES_PATH", XOOPS_ROOT_PATH . "/modules/xaddresses"); +define("XADDRESSES_URL", XOOPS_URL . "/modules/xaddresses"); // module information -$mod_img = XADDRESSES_URL."/images/luciorota.altervista.org/xoops_logo.png"; +$mod_img = XADDRESSES_URL . "/images/luciorota.altervista.org/xoops_logo.png"; $mod_copyright = "<a href='http://luciorota.altervista.org/xoops/' title='luciorota.altervista.org/xoops' target='_blank'> - <img src='".$mod_img."' alt='luciorota.altervista.org/xoops' /></a>"; + <img src='" . $mod_img . "' alt='luciorota.altervista.org/xoops' /></a>"; ?> \ No newline at end of file Modified: XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-30 11:25:09 UTC (rev 9948) +++ XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php 2012-07-30 20:23:44 UTC (rev 9949) @@ -16,9 +16,9 @@ $modversion['license'] = 'GNU GPL 2.0 see Licence'; $modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; -$modversion['release_info'] = "RC"; +$modversion['release_info'] = 'in progress'; $modversion['release_file'] = XOOPS_URL . "/modules/{$dirname}/docs/RC"; -$modversion['release_date'] = "2012/07/27"; // 'Y/m/d' +$modversion['release_date'] = "2012/07/30"; // 'Y/m/d' $modversion['manual'] = 'Help'; $modversion['manual_file'] = XOOPS_URL . "/modules/{$dirname}/docs/help.html"; @@ -35,23 +35,28 @@ $modversion['icons32'] = "modules/{$dirname}/images/icons/32x32"; // About -$modversion['demo_site_url'] = "IN PROGRESS"; -$modversion['demo_site_name'] = "IN PROGRESS"; -$modversion['forum_site_url'] = "IN PROGRESS"; -$modversion['forum_site_name'] = "IN PROGRESS"; -$modversion['module_website_url'] = "IN PROGRESS"; -$modversion['module_website_name'] = "IN PROGRESS"; +$modversion['demo_site_url'] = ''; +$modversion['demo_site_name'] = ''; +$modversion['forum_site_url'] = ''; +$modversion['forum_site_name'] = ''; +$modversion['module_website_url'] = ''; +$modversion['module_website_name'] = ''; //$modversion['support_site_url'] = "http://www.xoops.org"; //$modversion['support_site_name'] = "www.xoops.org"; $modversion['release'] = "release"; -$modversion['module_status'] = 'In progress'; //"Stable"; +$modversion['module_status'] = 'in progress'; //"Stable"; + + // Admin things $modversion['hasAdmin'] = true; // Admin system menu $modversion['system_menu'] = true; $modversion['adminindex'] = "admin/index.php"; $modversion['adminmenu'] = "admin/menu.php"; + + + // Mysql file $modversion['sqlfile']['mysql'] = "sql/mysql.sql"; // Tables created by sql file (without prefix!) @@ -67,11 +72,15 @@ // TO DO $modversion['tables'][7] = "xaddresses_marker"; + + // Scripts to run upon installation or update $modversion['onInstall'] = 'include/install_function.php'; //$modversion['onUpdate'] = 'include/update_function.php'; $modversion['onUninstall'] = 'include/uninstall_function.php'; + + // Main menu $modversion['hasMain'] = true; if (is_object($GLOBALS['xoopsModule']) && $GLOBALS['xoopsModule']->getVar('dirname') == $modversion['dirname']) { @@ -226,25 +235,9 @@ -// Preferences -// MAYBE FOR FUTURE XOOPS VERSIONS -/* +// Preferences/Config $i = 0; $i++; -$modversion['config']['category'][$i]['name'] = 'global'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_GLOBAL_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_GLOBAL_CONFIG_DESC; -$i++; -$modversion['config']['category'][$i]['name'] = 'category'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_CATEGORY_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_CATEGORY_CONFIG_DESC; -$i++; -$modversion['config']['category'][$i]['name'] = 'location'; -$modversion['config']['category'][$i]['title'] = _MI_XADDRESSES_LOCATION_CONFIG; -$modversion['config']['category'][$i]['description'] = _MI_XADDRESSES_LOCATION_CONFIG_DESC; -*/ -$i = 0; -$i++; $modversion['config'][$i]['name'] = 'google_apikey'; $modversion['config'][$i]['title'] = '_MI_XADDRESSES_GOOGLE_APIKEY'; $modversion['config'][$i]['description'] = '_MI_XADDRESSES_GOOGLE_APIKEY_DESC'; @@ -355,9 +348,6 @@ $modversion['config'][$i]['formtype'] = 'select'; $modversion['config'][$i]['valuetype'] = 'text'; $modversion['config'][$i]['default'] = 'dhtmltextarea'; -//xoops_load('xoopseditorhandler'); -//$editor_handler = XoopsEditorHandler::getInstance(); -//$modversion['config'][$i]['options'] = array_flip($editor_handler->getList()); $modversion['config'][$i]['options'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); $modversion['config'][$i]['category'] = 'global'; $i++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luc...@us...> - 2012-08-01 22:31:21
|
Revision: 9975 http://xoops.svn.sourceforge.net/xoops/?rev=9975&view=rev Author: luciorota Date: 2012-08-01 22:31:12 +0000 (Wed, 01 Aug 2012) Log Message: ----------- fixed bug but module is not complete ready for testing ;-) Modified Paths: -------------- XoopsModules/xaddresses/trunk/xaddresses/comment_delete.php XoopsModules/xaddresses/trunk/xaddresses/comment_edit.php XoopsModules/xaddresses/trunk/xaddresses/comment_new.php XoopsModules/xaddresses/trunk/xaddresses/comment_post.php XoopsModules/xaddresses/trunk/xaddresses/comment_reply.php XoopsModules/xaddresses/trunk/xaddresses/header.php XoopsModules/xaddresses/trunk/xaddresses/index.php XoopsModules/xaddresses/trunk/xaddresses/locationbroken.php XoopsModules/xaddresses/trunk/xaddresses/locationcategoryview.php XoopsModules/xaddresses/trunk/xaddresses/locationedit.php XoopsModules/xaddresses/trunk/xaddresses/locationmodify.php XoopsModules/xaddresses/trunk/xaddresses/locationrate.php XoopsModules/xaddresses/trunk/xaddresses/locationsearch.php XoopsModules/xaddresses/trunk/xaddresses/locationview.php XoopsModules/xaddresses/trunk/xaddresses/notification_update.php XoopsModules/xaddresses/trunk/xaddresses/xoops_version.php Added Paths: ----------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/import.php XoopsModules/xaddresses/trunk/xaddresses/admin/index.html XoopsModules/xaddresses/trunk/xaddresses/admin/index.php XoopsModules/xaddresses/trunk/xaddresses/admin/location.php XoopsModules/xaddresses/trunk/xaddresses/admin/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/menu.php XoopsModules/xaddresses/trunk/xaddresses/admin/permissions.php XoopsModules/xaddresses/trunk/xaddresses/include/comment_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/include/functions.php XoopsModules/xaddresses/trunk/xaddresses/include/index.html XoopsModules/xaddresses/trunk/xaddresses/include/install_function.php XoopsModules/xaddresses/trunk/xaddresses/include/notification_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/search_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/uninstall_function.php XoopsModules/xaddresses/trunk/xaddresses/include/update_function.php Removed Paths: ------------- XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php XoopsModules/xaddresses/trunk/xaddresses/admin/about.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php XoopsModules/xaddresses/trunk/xaddresses/admin/field.php XoopsModules/xaddresses/trunk/xaddresses/admin/fieldcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/import.php XoopsModules/xaddresses/trunk/xaddresses/admin/index.html XoopsModules/xaddresses/trunk/xaddresses/admin/index.php XoopsModules/xaddresses/trunk/xaddresses/admin/location.php XoopsModules/xaddresses/trunk/xaddresses/admin/locationcategory.php XoopsModules/xaddresses/trunk/xaddresses/admin/menu.php XoopsModules/xaddresses/trunk/xaddresses/admin/modified.php XoopsModules/xaddresses/trunk/xaddresses/admin/permissions.php XoopsModules/xaddresses/trunk/xaddresses/admin/user.demo.php XoopsModules/xaddresses/trunk/xaddresses/include/comment_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/config.php XoopsModules/xaddresses/trunk/xaddresses/include/forms.php XoopsModules/xaddresses/trunk/xaddresses/include/functions.php XoopsModules/xaddresses/trunk/xaddresses/include/index.html XoopsModules/xaddresses/trunk/xaddresses/include/install_function.php XoopsModules/xaddresses/trunk/xaddresses/include/notification_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/search_functions.php XoopsModules/xaddresses/trunk/xaddresses/include/uninstall_function.php XoopsModules/xaddresses/trunk/xaddresses/include/update_function.php Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.old.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,106 +0,0 @@ -<?php -$currentFile = basename(__FILE__); -include 'admin_header.php'; -$versionInfo =& $module_handler->get($GLOBALS['xoopsModule']->getVar('mid')); - -// load classes - -// get/check parameters/post - -// render start here -xoops_cp_header(); - -echo " - <style type=\"text/css\"> - label,text { - display: block; - float: left; - margin-bottom: 2px; - } - label { - text-align: right; - width: 150px; - padding-right: 20px; - } - br { - clear: left; - } - </style> -"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . $GLOBALS['xoopsModule']->getVar('name'). "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<img src='" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/" . $versionInfo->getInfo('image') . "' alt='' hspace='10' vspace='0' /></a>\n"; -echo "<div style='padding: 5px;'><strong>" . $versionInfo->getInfo('name') . " version " . $versionInfo->getInfo('version') . "</strong></div>\n"; -echo "<label>" . _AM_XADDRESSES_ABOUT_RELEASEDATE . ":</label><text>" . date(_SHORTDATESTRING, strtotime($versionInfo->getInfo('release_date'))) . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_CREDITS . ":</label><text>" . $versionInfo->getInfo('credits') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_LICENSE . ":</label><text><a href=\"".$versionInfo->getInfo('license_file')."\" target=\"_blank\" >" . $versionInfo->getInfo('license') . "</a></text>\n"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_MODULEINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_XADDRESSES_ABOUT_STATUS . ":</label><text>" . $versionInfo->getInfo('module_status') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_MODULEWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('support_site_url') . "' target='_blank'>" . $versionInfo->getInfo('support_site_name') . "</a>" . "</text><br />"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_AUTHORINFOS . "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOR . ":</label><text>" . $versionInfo->getInfo('author') . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHORWEBSITE . ":</label><text>" . "<a href='" . $versionInfo->getInfo('author_website_url') . "' target='_blank'>" . $versionInfo->getInfo('author_website_name') . "</a>" . "</text><br />"; -echo "<label>" . _AM_XADDRESSES_ABOUT_AUTHOREMAIL . ":</label><text>" . "<a href='emailto:" . $versionInfo->getInfo('author_mail') . "' target='_blank'>" . $versionInfo->getInfo('author_mail') . "</a>" . "</text><br />"; -echo "</div>"; - -echo "<br />"; - -// DONATE PAYPAL -$donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> -<input type="hidden" name="cmd" value="_s-xclick"> -<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHVwYJKoZIhvcNAQcEoIIHSDCCB0QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBkoWMtP1IHf29Ib6Hf1/sPXwvSVqdFP1CnCjMvV8TRMZpwXzIq9LZzGpMaowhsAaQSKz7DenW6LcoCuouWMHaek/dD1rfGMArEq8hrfHOgzGD3NttnhJyaJUUsZ9Bv2q9x9InedkXVwuOh0nUNKLxyWdt4Tt91qczYffcIlgXttzELMAkGBSsOAwIaBQAwgdQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIBCIjuHY4x36AgbCOOWIyYuCfV/8J1vX3up22RKDQcos/WNi7VC/XRFyKwmCtDfpkSyfFlC/s0NYKnWSELfu/MztQAO7cQ4CCYUaSoa6g324Dyr3Or2L0gLeB9aG8V1YO3bVgnLLaNw45j+X3HRiF1QNZARpp5MBrYrVu98IBHQX61AgJJfdnioLDYzagEBIIyQariajQ6W+MSTJHSP+z0J2bb92SYh/bR7GGGkIPuMviJqH1snU0Eik6MKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDQxMzE1MDEwM1owIwYJKoZIhvcNAQkEMRYEFCWihdPs7xd/vj+wxUAsz8MvsZ4yMA0GCSqGSIb3DQEBAQUABIGAV+hTiFSTJVdOv6RKFIQqdl6QoF4a+hfKz7tY+4pu+7HEXIYDbXCrYveD8793fg/NUmQ4+js196eOTAvocFj30/LpkFRkt94P4d2uAMJwH6nUG8Rdzxmam3WogA8wQ8T8YHs2zBcPZjeGE79IUbeSSozlkdCEWUbxutDSS/ZOfjo=-----END PKCS7----- -"> -<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online."> -<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/it_IT/i/scr/pixel.gif" width="1" height="1"> -</form>'; -echo "<div style='padding: 8px;'>"; -echo $donate; -echo "</div>"; - -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -// get language 'description.html' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/description.html"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/description.html"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_DESCRIPTION . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>". implode('', file($file)) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -// get language 'changelog.txt' file -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt")) { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/" . $xoopsConfig['language'] . "/changelog.txt"; -} else { - $file = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/language/english/changelog.txt"; -} -if (is_readable($file)) { - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XADDRESSES_ABOUT_CHANGELOG . "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>" . utf8_encode(implode('<br />', file($file))) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -include "admin_footer.php"; -?> \ No newline at end of file Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/about.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,34 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -include "admin_header.php"; -xoops_cp_header(); -$aboutAdmin = new ModuleAdmin(); -echo $aboutAdmin->addNavigation("about.php"); -echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); -include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/about.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/about.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/about.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include "admin_header.php"; +xoops_cp_header(); +$aboutAdmin = new ModuleAdmin(); +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); +include "admin_footer.php"; \ No newline at end of file Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,35 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -global $pathImageAdmin; -echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> - <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; -echo "<div class='center small italic pad5'> - <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XADDRESSES_MAINTAINEDBY." - <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; -xoops_cp_footer(); Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_footer.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +global $pathImageAdmin; +echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$pathImageModule."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center small italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XADDRESSES_MAINTAINEDBY." + <a href='IN PROGRESS' title='Visit IN PROGRESS' class='tooltip' rel='external'>IN PROGRESS</a></div>"; +xoops_cp_footer(); Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,154 +0,0 @@ -<?php -function moduleAdminTabMenu($adminmenu = array(), $currentFile = 0, $breadcrumb = " > ") -{ - if (is_int($currentFile)) { - $currentOption = $currentFile; - } else if (is_string($currentFile)) { - foreach($adminmenu as $key=>$adminitem ) { - preg_match( "/.*[\\/]([^\\/]+.php)\?*.*/", $adminitem['link'], $matches); - if ($matches[1] == $currentFile) $currentOption = $key; - } - } else { - return false; - } - - $moduleLink = XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/'; - /* Nice buttons styles */ - $adminTabCss = " - <style type='text/css'> - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . $moduleLink . "images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . $moduleLink . "images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . $moduleLink . "images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar .current a { background-position:0 -150px; border-width:0; } - #buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - div.CPbigTitle{ - font-size: 12px; - color: #606060; - background: no-repeat left top; - font-weight: bold; - height: 30px; - vertical-align: middle; - padding: 10px 0 0 40px; - /*border-bottom: 3px solid #393e41;*/ - border-bottom: none; - } - </style> - "; - - global $xoopsConfig; - xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - - $adminTabHtml = ''; - $adminTabHtml.= "<div id='buttontop'>"; - $adminTabHtml.= "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; - $adminTabHtml.= "<a class='nobutton' href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "'>" . _PREFERENCES . "</a>"; - $adminTabHtml.= " | "; - $adminTabHtml.= "<a href='" . $moduleLink . "index.php'>" . $GLOBALS['xoopsModule']->getVar('name') . "</a>"; - $adminTabHtml.= "</td>"; - $adminTabHtml.= "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $GLOBALS['xoopsModule']->getVar('name') . $breadcrumb . $adminmenu[$currentOption]["title"] . "</b> </td>"; - $adminTabHtml.= "</tr></table>"; - $adminTabHtml.= "</div>"; - - $adminTabHtml.= "<div id='buttonbar'>"; - $adminTabHtml.= "<ul>"; - - foreach(array_keys($adminmenu) as $key ) { - $adminTabHtml.= (($currentOption == $key)? '<li class="current">':'<li>') . '<a href="' . $moduleLink . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>'; - } - - $adminTabHtml.= "</ul></div>"; - $adminTabHtml.= "<br style='clear:both;' >"; - - $adminTabHtml.= '<div class="CPbigTitle" style="background-image: url(../' . $adminmenu[$currentOption]["icon"] .'); background-repeat: no-repeat; background-position: left; padding-left: 48px; height: 48px;">'; - $adminTabHtml.= '<strong>' . $adminmenu[$currentOption]["title"] . '</strong>'; - $adminTabHtml.= '</div>'; - - return $adminTabCss . $adminTabHtml; -} - - - -function moduleAdminSubmenu ($submenuItems) { - echo "<div class='xo-buttons'>"; - echo implode($submenuItems, ' | '); - echo "</div>"; -} - - - - - - - - - - -function xaddressesAdminMenu ($currentoption = 0, $breadcrumb = '') { - - /* Nice buttons styles */ - echo " - <style type='text/css'> - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; } - #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/xaddresses/images/deco/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; } - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/xaddresses/images/deco/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar #current a { background-position:0 -150px; border-width:0; } - #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - </style> - "; - - global $xoopsConfig; - - $tblColors = Array(); - $tblColors[0] = $tblColors[1] = $tblColors[2] = $tblColors[3] = $tblColors[4] = $tblColors[5] = $tblColors[6] = $tblColors[7] = $tblColors[8] = ''; - $tblColors[$currentoption] = 'current'; - xoops_loadLanguage('modinfo', $GLOBALS['xoopsModule']->getVar('dirname')); - - echo "<div id='buttontop'>"; - echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>"; - //echo "<td style=\"width: 45%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "\">" . _AM_SF_OPTS . "</a> | <a href=\"import.php\">" . _AM_SF_IMPORT . "</a> | <a href=\"../index.php\">" . _AM_SF_GOMOD . "</a> | <a href=\"../help/index.html\" target=\"_blank\">" . _AM_SF_HELP . "</a> | <a href=\"about.php\">" . _AM_SF_ABOUT . "</a></td>"; - echo "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; - echo "<a class='nobutton' href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $GLOBALS['xoopsModule']->getVar('mid') . "'>" . _PREFERENCES . "</a>"; - echo " | "; - echo "<a href='" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/index.php'>" . $GLOBALS['xoopsModule']->getVar('name') . "</a>"; - echo "</td>"; - echo "<td style='font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;'><b>" . $GLOBALS['xoopsModule']->getVar('name') . " </b> </td>"; - echo "</tr></table>"; - echo "</div>"; - - echo "<div id='buttonbar'>"; - echo "<ul>"; - echo "<li id='" . $tblColors[0] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/index.php\"><span>" . _MI_XADDRESSES_ADMENU1 . "</span></a></li>"; - echo "<li id='" . $tblColors[1] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/category.php\"><span>" . _MI_XADDRESSES_ADMENU2 . "</span></a></li>"; - echo "<li id='" . $tblColors[2] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/addresses.php\"><span>" . _MI_XADDRESSES_ADMENU3 . "</span></a></li>"; - echo "<li id='" . $tblColors[3] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/champs.php\"><span>" . _MI_XADDRESSES_ADMENU6 . "</span></a></li>"; - echo "<li id='" . $tblColors[4] . "'><a href=\"" . XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname') . "/admin/permissions.php\"><span>" . _MI_XADDRESSES_ADMENU7 . "</span></a></li>"; - echo "</ul></div> "; -} - - - -function xaddressesAdminSubmenu ($submenuItems) { - echo "<div class='head'>"; - echo implode($submenuItems, ' | '); - echo "</div>"; -} -?> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_functions.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,33 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +function xaddressesAdminSubmenu ($submenuItems) { + echo "<div class='head'>"; + echo implode($submenuItems, ' | '); + echo "</div>"; +} Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,102 +0,0 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XADDRESSES - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * - * 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. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xaddresses - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -$dirname = basename(dirname(dirname( __FILE__ ) )); - -// Include xoops admin header -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -xoops_load ('XoopsUserUtility'); - -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - -// Include module functions -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; - - - -// Check and load moduleadmin classes -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ - include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; -} else { - include_once $pathDir . '/language/english/main.php'; -} -if ( file_exists($pathDir . '/moduleadmin.php')){ - include_once $pathDir . '/moduleadmin.php'; - //return true; -} else { - xoops_cp_header(); - echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); - xoops_cp_footer(); - //return false; -} - -$myts =& MyTextSanitizer::getInstance(); - -// Get user groups -$groupPermHandler =& xoops_gethandler('groupperm'); -if ($xoopsUser) { - $moduleperm_handler =& xoops_gethandler('groupperm'); - if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { - redirect_header(XOOPS_URL, 1, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); - exit(); -} - -if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH."/class/template.php"); - $xoopsTpl = new XoopsTpl(); -} - -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); -//xoops_cp_header(); - -//Load module languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); - -// Include module functions -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/functions.php'; -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/admin/admin_functions.php'; // admin functions -include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/forms.php'; Added: XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/admin_header.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,102 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since 1.0 + * @author luciorota <luc...@gm...> + * @version $Id$ + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +$dirname = basename(dirname(dirname( __FILE__ ) )); + +// Include xoops admin header +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +xoops_load ('XoopsUserUtility'); + +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; + +// Include module functions +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; +include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; + + + +// Check and load moduleadmin classes +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globalLanguage = $GLOBALS['xoopsConfig']['language']; +if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ + include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; +} else { + include_once $pathDir . '/language/english/main.php'; +} +if ( file_exists($pathDir . '/moduleadmin.php')){ + include_once $pathDir . '/moduleadmin.php'; + //return true; +} else { + xoops_cp_header(); + echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; +} + +$myts =& MyTextSanitizer::getInstance(); + +// Get user groups +$groupPermHandler =& xoops_gethandler('groupperm'); +if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); +} + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} + +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +//xoops_cp_header(); + +//Load module languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); + +// Include module functions +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/functions.php'; +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/admin/admin_functions.php'; // admin functions +include_once XOOPS_ROOT_PATH . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/include/forms.php'; Deleted: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:03:26 UTC (rev 9974) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -1,383 +0,0 @@ -<?php -$currentFile = basename(__FILE__); -include 'admin_header.php'; -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['field_id']) ? 'edit_field' : 'list_fields'); - -// load classes -$fieldCategoryHandler =& xoops_getmodulehandler('fieldcategory', 'xaddresses'); -$fieldHandler =& xoops_getmodulehandler('field', 'xaddresses'); - - - -switch ($op) { -default: -case 'list_fields': - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - // get fields categories - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight'); - $cats = $fieldCategoryHandler->getObjects($criteria, true); - unset($criteria); - $categories[0] = _AM_XADDRESSES_FIELD_CATEGORY_NONE; - if ( count($cats) > 0 ) { - foreach (array_keys($cats) as $i ) { - $categories[$cats[$i]->getVar('cat_id')] = $cats[$i]->getVar('cat_title'); - } - } - $GLOBALS['xoopsTpl']->assign('categories', $categories); - unset($categories); - - $valuetypes = array( - XOBJ_DTYPE_ARRAY => _AM_XADDRESSES_FIELD_ARRAY, - XOBJ_DTYPE_EMAIL => _AM_XADDRESSES_FIELD_EMAIL, - XOBJ_DTYPE_INT => _AM_XADDRESSES_FIELD_INT, - XOBJ_DTYPE_TXTAREA => _AM_XADDRESSES_FIELD_TXTAREA, - XOBJ_DTYPE_TXTBOX => _AM_XADDRESSES_FIELD_TXTBOX, - XOBJ_DTYPE_URL => _AM_XADDRESSES_FIELD_URL, - XOBJ_DTYPE_OTHER => _AM_XADDRESSES_FIELD_OTHER, - XOBJ_DTYPE_MTIME => _AM_XADDRESSES_FIELD_DATE - ); - $fieldtypes = array( - 'checkbox' => _AM_XADDRESSES_FIELD_CHECKBOX, - 'group' => _AM_XADDRESSES_FIELD_GROUP, - 'group_multi' => _AM_XADDRESSES_FIELD_GROUPMULTI, - 'language' => _AM_XADDRESSES_FIELD_LANGUAGE, - 'radio' => _AM_XADDRESSES_FIELD_RADIO, - 'select' => _AM_XADDRESSES_FIELD_SELECT, - 'select_multi' => _AM_XADDRESSES_FIELD_SELECTMULTI, - 'textarea' => _AM_XADDRESSES_FIELD_TEXTAREA, - 'dhtml' => _AM_XADDRESSES_FIELD_DHTMLTEXTAREA, - 'textbox' => _AM_XADDRESSES_FIELD_TEXTBOX, - 'timezone' => _AM_XADDRESSES_FIELD_TIMEZONE, - 'yesno' => _AM_XADDRESSES_FIELD_YESNO, - 'date' => _AM_XADDRESSES_FIELD_DATE, - 'datetime' => _AM_XADDRESSES_FIELD_DATETIME, - 'longdate' => _AM_XADDRESSES_FIELD_LONGDATE, - 'theme' => _AM_XADDRESSES_FIELD_THEME, - 'autotext' => _AM_XADDRESSES_FIELD_AUTOTEXT, - 'rank' => _AM_XADDRESSES_FIELD_RANK, - 'image' => _AM_XADDRESSES_FIELD_XOOPSIMAGE, - 'multipleimage' => _AM_XADDRESSES_FIELD_MULTIPLEXOOPSIMAGE, - 'file' => _AM_XADDRESSES_FIELD_FILE, - 'multiplefile' => _AM_XADDRESSES_FIELD_MULTIPLEFILE, - //'kmlmap' => _AM_XADDRESSES_FIELD_KMLMAP - ); - - // get fields - $numRows = $fieldHandler->getCount(); - - if ($numRows > 0) { - $fields = $fieldHandler->getObjects(null, true, false); // get an array of arrays - foreach (array_keys($fields) as $i ) { - $fields[$i]['fieldtype'] = $fieldtypes[$fields[$i]['field_type']]; - $fields[$i]['valuetype'] = $valuetypes[$fields[$i]['field_valuetype']]; - $fieldcategories[$fields[$i]['cat_id']][] = $fields[$i]; - $weights[$fields[$i]['cat_id']][] = $fields[$i]['field_weight']; - } - //sort fields order in categories - foreach (array_keys($fieldcategories) as $i ) { - array_multisort($weights[$i], SORT_ASC, array_keys($fieldcategories[$i]), SORT_ASC, $fieldcategories[$i]); - } - ksort($fields); - $GLOBALS['xoopsTpl']->assign('fieldcategories', $fieldcategories); - - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:xaddresses_admin_fieldlist.html"); - } else { - echo '<div class="errorMsg">' . _AM_XADDRESSES_ERROR_NO_FIELDS . '</div>'; - } - include "admin_footer.php"; - break; - - - -case 'new_field': - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - include_once('../include/forms.php'); - $field =& $fieldHandler->create(); - $form = xaddresses_getFieldForm($field); - $form->display(); - - include "admin_footer.php"; - break; - - - -case 'edit_field': - $field =& $fieldHandler->get($_REQUEST['field_id']); - if ( !$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit') ) { //If no configs exist - redirect_header($currentFile, 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - - include_once('../include/forms.php'); - $form = xaddresses_getFieldForm($field); - $form->display(); - - include "admin_footer.php"; - break; - - - -case 'reorder_fields': - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); - } - if (isset($_POST['field_ids']) && count($_POST['field_ids']) > 0) { - $oldweight = $_POST['oldweight']; - $oldcat = $_POST['oldcat']; - $category = $_POST['category']; - $weight = $_POST['weight']; - $ids = array(); - foreach ($_POST['field_ids'] as $field_id) { - if ( $oldweight[$field_id] != $weight[$field_id] || $oldcat[$field_id] != $category[$field_id] ) { - //if field has changed - $ids[] = intval($field_id); - } - } - if ( count($ids) > 0 ) { - $errors = array(); - //if there are changed fields, fetch the fieldcategory objects - $fields = $fieldHandler->getObjects(new Criteria('field_id', "(" . implode(',', $ids) . ")", "IN"), true); - foreach ($ids as $i ) { - $fields[$i]->setVar('field_weight', intval($weight[$i])); - $fields[$i]->setVar('cat_id', intval($category[$i])); - if (!$fieldHandler->insert($fields[$i])) { - $errors = array_merge($errors, $fields[$i]->getErrors()); - } - } - if ( count($errors) == 0 ) { - //no errors - redirect_header($currentFile, 2, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELDS) ); - } else { - redirect_header($currentFile, 3, implode('<br />', $errors) ); - } - } - } - break; - - - -case 'save_field': - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - - $redirectToEdit = false; // true if field editing is not complete - if (isset($_REQUEST['field_id'])) { - $field =& $fieldHandler->get($_REQUEST['field_id']); - // if no configs exist - if (!$field->getVar('field_config') && !$field->getVar('field_show') && !$field->getVar('field_edit')) { - redirect_header('admin.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - } else { - // if is a new field - $field =& $fieldHandler->create(); - $field->setVar('field_name', $_REQUEST['field_name']); - $field->setVar('field_show', true); - $field->setVar('field_edit', true); - $field->setVar('field_config', true); - $redirectToEdit = true; - } - if ($_REQUEST['field_type'] != $field->getVar('field_type')) { - $field->setVar('field_options', array()); - $field->setVar('field_default', ''); - $redirectToEdit = true; - } - - $field->setVar('field_title', $_REQUEST['field_title']); - $field->setVar('field_description', $_REQUEST['field_description']); - - if ($field->getVar('field_config')) { - $field->setVar('field_type', $_REQUEST['field_type']); - if (isset($_REQUEST['field_valuetype'])) { - $field->setVar('field_valuetype', $_REQUEST['field_valuetype']); - } - - // field_options - $fieldTypesWithOptions = array('select', 'select-multi', 'radio', 'checkbox'); - if (in_array($field->getVar('field_type'), $fieldTypesWithOptions)) { - $options = $field->getVar('field_options'); - // if options are removed - if (isset($_REQUEST['removeOptions']) && is_array($_REQUEST['removeOptions'])) { - foreach ($_REQUEST['removeOptions'] as $optionKey) { - unset($options[$optionKey]); - } - $redirectToEdit = true; - } - // if options are added - if (!empty($_REQUEST['addOption'])) { - foreach ($_REQUEST['addOption'] as $option) { - if ( empty($option['value'])) continue; - $options[$option['key']] = $option['value']; - $redirectToEdit = true; - } - } - $field->setVar('field_options', $options); - if (count($options) < 1) { - $redirectToEdit = true; - // SHOW WARNING: PLEASE ENTHER 1 OPTION AT LEAST - } - } else { - $field->setVar('field_options', array()); - } - } - - if ($field->getVar('field_edit')) { - // field_notnull - //$notnull = isset($_REQUEST['field_notnull']) ? $_REQUEST['field_notnull'] : false; - //$field->setVar('field_notnull', $notnull); //0 = no, 1 = yes - // field_required - $required = isset($_REQUEST['field_required']) ? $_REQUEST['field_required'] : false; - $field->setVar('field_required', $required); //0 = no, 1 = yes - - // field_maxlength - if (isset($_REQUEST['field_maxlength'])) { - $field->setVar('field_maxlength', $_REQUEST['field_maxlength']); - } - - // field_default - if (isset($_REQUEST['field_default'])) { - $field_default = $field->getValueForSave($_REQUEST['field_default']); - //Check for multiple selections - if (is_array($field_default)) { - $field->setVar('field_default', serialize($field_default)); - } else { - $field->setVar('field_default', $field_default); - } - } - - // field_extras - if (!empty($_REQUEST['field_extras'])) { - $field->setVar('field_extras', $_REQUEST['field_extras']); - } else { - $field->setVar('field_extras', array()); - } - } - - if ($field->getVar('field_show')) { - $field->setVar('field_weight', $_REQUEST['field_weight']); - $field->setVar('cat_id', $_REQUEST['field_category']); - } - - if ($fieldHandler->insert($field)) { - $groupPermHandler =& xoops_gethandler('groupperm'); - - $permArray = array(); - if ($field->getVar('field_show')) { - $permArray[] = 'field_view'; - //$permArray[] = 'field_visible'; - } - if ($field->getVar('field_edit')) { - $permArray[] = 'field_edit'; - } - if ($field->getVar('field_edit') || $field->getVar('field_show')) { - $permArray[] = 'field_search'; - } - if (count($permArray) > 0) { - foreach ($permArray as $perm) { - $criteria = new CriteriaCompo(new Criteria('gperm_name', $perm)); - $criteria->add(new Criteria('gperm_itemid', (int)$field->getVar('field_id'))); - $criteria->add(new Criteria('gperm_modid', (int)$GLOBALS['xoopsModule']->getVar('mid'))); - if ( isset($_REQUEST[$perm]) && is_array($_REQUEST[$perm])) { - $perms = $groupPermHandler->getObjects($criteria); - if ( count($perms) > 0 ) { - foreach (array_keys($perms) as $i) { - $groups[$perms[$i]->getVar('gperm_groupid')] =& $perms[$i]; - } - } else { - $groups = array(); - } - foreach ($_REQUEST[$perm] as $groupId) { - $groupId = (int)$groupId; - if ( !isset($groups[$groupId])) { - $permObj =& $groupPermHandler->create(); - $permObj->setVar('gperm_name', $perm); - $permObj->setVar('gperm_itemid', (int)$field->getVar('field_id')); - $permObj->setVar('gperm_modid', $GLOBALS['xoopsModule']->getVar('mid')); - $permObj->setVar('gperm_groupid', $groupId); - $groupPermHandler->insert($permObj); - unset($permObj); - } - } - $removedGroups = array_diff(array_keys($groups), $_REQUEST[$perm]); - if ( count($removedGroups) > 0 ) { - $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $removedGroups).")", "IN")); - $groupPermHandler->deleteAll($criteria); - } - unset($groups); - - } else { - $groupPermHandler->deleteAll($criteria); - } - unset($criteria); - } - } - if ($redirectToEdit) { - redirect_header($currentFile . '?op=edit_field&field_id=' . $field->getVar('field_id'), 3, _AM_XADDRESSES_FIELD_NEXT_STEP); - } else { - redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_SAVEDSUCCESS, _AM_XADDRESSES_FIELD)); - } - } - - // render start here - xoops_cp_header(); - // submenu - $status_display = isset($_REQUEST['status_display']) ? $_REQUEST['status_display'] : 1; - $submenuItem[] = ($op == 'new_field' ? _AM_XADDRESSES_FIELD_NEW : '<a href="' . $currentFile . '?op=new_field">' . _AM_XADDRESSES_FIELD_NEW . '</a>'); - $submenuItem[] = ($op == 'list_fields' ? _AM_XADDRESSES_FIELD_LIST : '<a href="' . $currentFile . '?op=list_fields">' . _AM_XADDRESSES_FIELD_LIST . '</a>'); - xaddressesAdminSubmenu ($submenuItem); - include_once('../include/forms.php'); - - echo $field->getHtmlErrors(); - - $form = xaddresses_getFieldForm($field); - $form->display(); - include "admin_footer.php"; - break; - - - -case 'delete_field': - $field =& $fieldHandler->get($_REQUEST['field_id']); - if ( !$field->getVar('field_config') ) { - redirect_header('index.php', 2, _AM_XADDRESSES_FIELDNOTCONFIGURABLE); - } - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); - } - if ( $fieldHandler->delete($field) ) { - redirect_header($currentFile, 3, sprintf(_AM_XADDRESSES_DELETEDSUCCESS, _AM_XADDRESSES_FIELD) ); - } else { - echo $field->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'field_id' => $_REQUEST['field_id'], 'op' => 'delete_field'), $_SERVER['REQUEST_URI'], sprintf(_AM_XADDRESSES_RUSUREDEL, $field->getVar('field_title') )); - xoops_cp_footer(); - } - break; -} -?> \ No newline at end of file Added: XoopsModules/xaddresses/trunk/xaddresses/admin/field.php =================================================================== --- XoopsModules/xaddresses/trunk/xaddresses/admin/field.php (rev 0) +++ XoopsModules/xaddresses/trunk/xaddresses/admin/field.php 2012-08-01 22:31:12 UTC (rev 9975) @@ -0,0 +1,409 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XADDRESSES - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * Rota Lucio ( http://luciorota.altervista.org/xoops/ ) + * + * 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. + * --------------------------------------------------------------------------- + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html& ... public license + * @package xaddresses + * @since ... [truncated message content] |