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-----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-----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] |