From: <txm...@us...> - 2012-02-02 12:32:16
|
Revision: 8869 http://xoops.svn.sourceforge.net/xoops/?rev=8869&view=rev Author: txmodxoops Date: 2012-02-02 12:32:01 +0000 (Thu, 02 Feb 2012) Log Message: ----------- Added buttons, deleted links in category, fields and steps Added Paths: ----------- XoopsModules/profile/branches/timgno/ XoopsModules/profile/branches/timgno/Frameworks/ XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/ XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/ XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/ XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/about.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/category.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/fields.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/help.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/home.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/permissions.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/stats.png XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/users.png XoopsModules/profile/branches/timgno/class/ XoopsModules/profile/branches/timgno/class/captcha/ XoopsModules/profile/branches/timgno/class/captcha/config.recaptcha.php XoopsModules/profile/branches/timgno/modules/ XoopsModules/profile/branches/timgno/modules/profile/ XoopsModules/profile/branches/timgno/modules/profile/activate.php XoopsModules/profile/branches/timgno/modules/profile/admin/ XoopsModules/profile/branches/timgno/modules/profile/admin/about.php XoopsModules/profile/branches/timgno/modules/profile/admin/admin_footer.php XoopsModules/profile/branches/timgno/modules/profile/admin/admin_header.php XoopsModules/profile/branches/timgno/modules/profile/admin/category.php XoopsModules/profile/branches/timgno/modules/profile/admin/deactivate.php XoopsModules/profile/branches/timgno/modules/profile/admin/directory.php XoopsModules/profile/branches/timgno/modules/profile/admin/field.php XoopsModules/profile/branches/timgno/modules/profile/admin/header.php XoopsModules/profile/branches/timgno/modules/profile/admin/index.html XoopsModules/profile/branches/timgno/modules/profile/admin/index.php XoopsModules/profile/branches/timgno/modules/profile/admin/menu.php XoopsModules/profile/branches/timgno/modules/profile/admin/permissions.php XoopsModules/profile/branches/timgno/modules/profile/admin/step.php XoopsModules/profile/branches/timgno/modules/profile/admin/user.php XoopsModules/profile/branches/timgno/modules/profile/admin/validation.php XoopsModules/profile/branches/timgno/modules/profile/admin/visibility.php XoopsModules/profile/branches/timgno/modules/profile/changelog.txt XoopsModules/profile/branches/timgno/modules/profile/changemail.php XoopsModules/profile/branches/timgno/modules/profile/changepass.php XoopsModules/profile/branches/timgno/modules/profile/class/ XoopsModules/profile/branches/timgno/modules/profile/class/category.php XoopsModules/profile/branches/timgno/modules/profile/class/field.php XoopsModules/profile/branches/timgno/modules/profile/class/index.html XoopsModules/profile/branches/timgno/modules/profile/class/profile.php XoopsModules/profile/branches/timgno/modules/profile/class/regstep.php XoopsModules/profile/branches/timgno/modules/profile/class/validation.php XoopsModules/profile/branches/timgno/modules/profile/class/visibility.php XoopsModules/profile/branches/timgno/modules/profile/comment_delete.php XoopsModules/profile/branches/timgno/modules/profile/comment_edit.php XoopsModules/profile/branches/timgno/modules/profile/comment_new.php XoopsModules/profile/branches/timgno/modules/profile/comment_post.php XoopsModules/profile/branches/timgno/modules/profile/comment_reply.php XoopsModules/profile/branches/timgno/modules/profile/directory.php XoopsModules/profile/branches/timgno/modules/profile/docs/ XoopsModules/profile/branches/timgno/modules/profile/docs/changelog.txt XoopsModules/profile/branches/timgno/modules/profile/docs/credits.txt XoopsModules/profile/branches/timgno/modules/profile/docs/index.html XoopsModules/profile/branches/timgno/modules/profile/docs/install.txt XoopsModules/profile/branches/timgno/modules/profile/docs/lang_diff.txt XoopsModules/profile/branches/timgno/modules/profile/docs/licence.txt XoopsModules/profile/branches/timgno/modules/profile/docs/readme.txt XoopsModules/profile/branches/timgno/modules/profile/dojsonvalidate.php XoopsModules/profile/branches/timgno/modules/profile/edituser.php XoopsModules/profile/branches/timgno/modules/profile/footer.php XoopsModules/profile/branches/timgno/modules/profile/header.php XoopsModules/profile/branches/timgno/modules/profile/images/ XoopsModules/profile/branches/timgno/modules/profile/images/index.html XoopsModules/profile/branches/timgno/modules/profile/images/left_both.gif XoopsModules/profile/branches/timgno/modules/profile/images/logo.png XoopsModules/profile/branches/timgno/modules/profile/images/modadminbg.gif XoopsModules/profile/branches/timgno/modules/profile/images/no.png XoopsModules/profile/branches/timgno/modules/profile/images/right_both.gif XoopsModules/profile/branches/timgno/modules/profile/images/yes.png XoopsModules/profile/branches/timgno/modules/profile/include/ XoopsModules/profile/branches/timgno/modules/profile/include/forms.php XoopsModules/profile/branches/timgno/modules/profile/include/index.html XoopsModules/profile/branches/timgno/modules/profile/include/install.php XoopsModules/profile/branches/timgno/modules/profile/include/update.php XoopsModules/profile/branches/timgno/modules/profile/index.php XoopsModules/profile/branches/timgno/modules/profile/js/ XoopsModules/profile/branches/timgno/modules/profile/js/index.html XoopsModules/profile/branches/timgno/modules/profile/js/jquery.json.validation.js XoopsModules/profile/branches/timgno/modules/profile/language/ XoopsModules/profile/branches/timgno/modules/profile/language/english/ XoopsModules/profile/branches/timgno/modules/profile/language/english/admin.php XoopsModules/profile/branches/timgno/modules/profile/language/english/help/ XoopsModules/profile/branches/timgno/modules/profile/language/english/help/help.html XoopsModules/profile/branches/timgno/modules/profile/language/english/help/index.html XoopsModules/profile/branches/timgno/modules/profile/language/english/index.html XoopsModules/profile/branches/timgno/modules/profile/language/english/mail_template/ XoopsModules/profile/branches/timgno/modules/profile/language/english/mail_template/emailchanged.tpl XoopsModules/profile/branches/timgno/modules/profile/language/english/mail_template/index.html XoopsModules/profile/branches/timgno/modules/profile/language/english/main.php XoopsModules/profile/branches/timgno/modules/profile/language/english/modinfo.php XoopsModules/profile/branches/timgno/modules/profile/language/index.html XoopsModules/profile/branches/timgno/modules/profile/language/italian/ XoopsModules/profile/branches/timgno/modules/profile/language/italian/admin.php XoopsModules/profile/branches/timgno/modules/profile/language/italian/help/ XoopsModules/profile/branches/timgno/modules/profile/language/italian/help/help.html XoopsModules/profile/branches/timgno/modules/profile/language/italian/help/index.html XoopsModules/profile/branches/timgno/modules/profile/language/italian/index.html XoopsModules/profile/branches/timgno/modules/profile/language/italian/mail_template/ XoopsModules/profile/branches/timgno/modules/profile/language/italian/mail_template/emailchanged.tpl XoopsModules/profile/branches/timgno/modules/profile/language/italian/mail_template/index.html XoopsModules/profile/branches/timgno/modules/profile/language/italian/main.php XoopsModules/profile/branches/timgno/modules/profile/language/italian/modinfo.php XoopsModules/profile/branches/timgno/modules/profile/lostpass.php XoopsModules/profile/branches/timgno/modules/profile/preloads/ XoopsModules/profile/branches/timgno/modules/profile/preloads/core.php XoopsModules/profile/branches/timgno/modules/profile/preloads/index.html XoopsModules/profile/branches/timgno/modules/profile/register.php XoopsModules/profile/branches/timgno/modules/profile/search.php XoopsModules/profile/branches/timgno/modules/profile/sql/ XoopsModules/profile/branches/timgno/modules/profile/sql/index.html XoopsModules/profile/branches/timgno/modules/profile/sql/mysql.sql XoopsModules/profile/branches/timgno/modules/profile/templates/ XoopsModules/profile/branches/timgno/modules/profile/templates/index.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_admin_categorylist.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_admin_fieldlist.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_admin_steplist.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_admin_visibility.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_avatar.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_breadcrumbs.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_changepass.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_directory_catlist.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_directory_index.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_directory_search.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_editprofile.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_email.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_form.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_register.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_results.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_search.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_userform.html XoopsModules/profile/branches/timgno/modules/profile/templates/profile_userinfo.html XoopsModules/profile/branches/timgno/modules/profile/templates/style.css XoopsModules/profile/branches/timgno/modules/profile/user.php XoopsModules/profile/branches/timgno/modules/profile/userinfo.php XoopsModules/profile/branches/timgno/modules/profile/xoops_version.php Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/about.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/category.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/category.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/fields.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/fields.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/help.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/help.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/home.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/home.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/permissions.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/permissions.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/stats.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/stats.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/users.png =================================================================== (Binary files differ) Property changes on: XoopsModules/profile/branches/timgno/Frameworks/moduleclasses/icons/32/users.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/profile/branches/timgno/class/captcha/config.recaptcha.php =================================================================== --- XoopsModules/profile/branches/timgno/class/captcha/config.recaptcha.php (rev 0) +++ XoopsModules/profile/branches/timgno/class/captcha/config.recaptcha.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,29 @@ +<?php +/** + * CAPTCHA configurations for Recaptcha mode + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package class + * @subpackage CAPTCHA + * @since 2.5.2 + * @author trabis <lus...@gm...> + * @version $Id: config.recaptcha.php 8066 2011-11-06 05:09:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +return $config = array( + 'private_key' => $GLOBALS['xoopsModuleConfig']['profile_privateapikey'], //'YourPrivateApiKey' + 'public_key' => $GLOBALS['xoopsModuleConfig']['profile_publicapikey'], //'YourPublicApiKey', + 'theme' => 'clean', // 'red' | 'white' | 'blackglass' | 'clean' | 'custom' + 'lang' => _LANGCODE + ); +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/activate.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/activate.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/activate.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,110 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package profile + * @since 2.3.0 + * @author Jan Pedersen + * @author Taiwen Jiang <ph...@us...> + * @version $Id: activate.php 8066 2011-11-06 05:09:33Z beckmi $ + */ + +$xoopsOption['pagetype'] = "user"; +include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'header.php'; + +include $GLOBALS['xoops']->path('header.php'); +if (!empty($_GET['id']) && !empty($_GET['actkey'])) { + $id = intval($_GET['id']); + $actkey = trim($_GET['actkey']); + if (empty($id)) { + redirect_header(XOOPS_URL, 1, ''); + exit(); + } + $member_handler =& xoops_gethandler('member'); + $thisuser =& $member_handler->getUser($id); + if (!is_object($thisuser)) { + redirect_header(XOOPS_URL, 1, ''); + exit(); + } + if ($thisuser->getVar('actkey') != $actkey) { + redirect_header(XOOPS_URL . '/', 5, _US_ACTKEYNOT); + } else { + if ($thisuser->getVar('level') > 0) { + redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n'). '/index.php', 5, _US_ACONTACT, false); + } else { + if (false != $member_handler->activateUser($thisuser)) { + $config_handler =& xoops_gethandler('config'); + $GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER); + if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) { + $myts =& MyTextSanitizer::getInstance(); + $xoopsMailer = xoops_getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate('activated.tpl'); + $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']); + $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']); + $xoopsMailer->assign('SITEURL', XOOPS_URL . "/"); + $xoopsMailer->setToUsers($thisuser); + $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']); + $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']); + $xoopsMailer->setSubject(sprintf(_US_YOURACCOUNT, $GLOBALS['xoopsConfig']['sitename']) ); + include $GLOBALS['xoops']->path('header.php'); + if (!$xoopsMailer->send()) { + printf(_US_ACTVMAILNG, $thisuser->getVar('uname') ); + } else { + printf(_US_ACTVMAILOK, $thisuser->getVar('uname') ); + } + include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; + } else { + redirect_header(XOOPS_URL . '/user.php', 5, _US_ACTLOGIN, false); + } + } else { + redirect_header(XOOPS_URL . '/index.php', 5, 'Activation failed!'); + } + } + } +// Not implemented yet: re-send activiation code +} else if (!empty($_REQUEST['email']) && $xoopsConfigUser['activation_type'] != 0) { + $myts =& MyTextSanitizer::getInstance(); + $member_handler =& xoops_gethandler('member'); + $getuser =& $member_handler->getUsers(new Criteria('email', $myts->addSlashes(trim($_REQUEST['email'])))); + if (count($getuser) == 0) { + redirect_header(XOOPS_URL, 2, _US_SORRYNOTFOUND); + } + if ($getuser[0]->isActive()) { + redirect_header(XOOPS_URL, 2, sprintf(_US_USERALREADYACTIVE, $getuser[0]->getVar('email'))); + } + $xoopsMailer =& xoops_getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate('register.tpl'); + $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']); + $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']); + $xoopsMailer->assign('SITEURL', XOOPS_URL . "/"); + $xoopsMailer->setToUsers($getuser[0]); + $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']); + $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']); + $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $getuser[0]->getVar('uname') )); + if (!$xoopsMailer->send()) { + echo _US_YOURREGMAILNG; + } else { + echo _US_YOURREGISTERED; + } +} else { + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $form = new XoopsThemeForm('', 'form', 'activate.php'); + $form->addElement(new XoopsFormText(_US_EMAIL, 'email', 25, 255) ); + $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit') ); + $form->display(); +} + +$xoBreadcrumbs[] = array('title' => _PROFILE_MA_REGISTER); +include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/about.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/about.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/about.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,31 @@ +<?php +/** + * XOOPS Profile module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) + * @package xoopsPoll + * @since 2.5.0 + * @author Mage, Mamba + * @version $Id $ + **/ + +include '../../../include/cp_header.php'; +include 'admin_header.php'; +xoops_cp_header(); + +$module_info =& $module_handler->get($xoopsModule->getVar("mid")); + +$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/profile/branches/timgno/modules/profile/admin/admin_footer.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/admin_footer.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/admin_footer.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,22 @@ +<?php +/** + * xSitemMap module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package xSitemMap + * @since 2.5.0 + * @author XOOPS Module Team + * @version $Id $ +**/ +echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src=" . XOOPS_URL ."/". $moduleInfo->getInfo("icons32")."/xoopsmicrobutton.gif"." alt=\"XOOPS\" title=\"XOOPS\"></a></div>"; +echo "<div class='center smallsmall italic pad5'><strong>" . $xoopsModule->getVar("name") . "</strong> is maintained by the <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"; + +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/admin_header.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/admin_header.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/admin_header.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,55 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package profile + * @since 2.3.0 + * @author Taiwen Jiang <ph...@us...> + * @version $Id: admin_header.php 8067 2011-12-06 20:13:21Z timgno $ + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; + +if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); + //return true; + }else{ + xoops_cp_header(); + echo xoops_error(_PROFILE_AM_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'); + +$myts =& MyTextSanitizer::getInstance(); + +if ( !isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl']) ) { + include_once $GLOBALS['xoops']->path( "/class/template.php" ); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); +} +//xoops_cp_header(); +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('user'); +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/category.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/category.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/category.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,106 @@ +<?php +// $Id: category.php 8066 2011-11-06 05:09:33Z beckmi $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: XOOPS Foundation // +// URL: http://www.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // +include 'admin_header.php'; +xoops_cp_header(); +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('category.php'); + +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list'); + +$handler =& xoops_getmodulehandler('category'); +switch($op ) { +default: +case "list": + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight'); + $criteria->setOrder('ASC'); + $GLOBALS['xoopsTpl']->assign('categories', $handler->getObjects($criteria, true, false) ); + $indexAdmin->addItemButton(_ADD.' '._PROFILE_AM_CATEGORY, 'category.php?op=new', 'add'); + $GLOBALS['xoopsTpl']->assign('addcategory', $indexAdmin->renderButton() ); + $template_main = "profile_admin_categorylist.html"; + break; + +case "new": + include_once '../include/forms.php'; + $obj =& $handler->create(); + $form = $obj->getForm(); + $form->display(); + break; + +case "edit": + include_once '../include/forms.php'; + $obj = $handler->get($_REQUEST['id']); + $form = $obj->getForm(); + $form->display(); + break; + +case "save": + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + } + if ( isset($_REQUEST['id']) ) { + $obj =& $handler->get($_REQUEST['id']); + } else { + $obj =& $handler->create(); + } + $obj->setVar('cat_title', $_REQUEST['cat_title']); + $obj->setVar('cat_description', $_REQUEST['cat_description']); + $obj->setVar('cat_weight', $_REQUEST['cat_weight']); + if ( $handler->insert($obj) ) { + redirect_header('category.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_CATEGORY) ); + } + include_once '../include/forms.php'; + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + +case "delete": + $obj =& $handler->get($_REQUEST['id']); + if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + } + if ( $handler->delete($obj) ) { + redirect_header('category.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_CATEGORY) ); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('cat_title') )); + } + break; +} +if ( isset($template_main) ) { + $GLOBALS['xoopsTpl']->display("db:{$template_main}"); +} +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/deactivate.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/deactivate.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/deactivate.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,32 @@ +<?php +include 'header.php'; +xoops_cp_header(); + +if ( !isset($_REQUEST['uid']) ) { + redirect_header("index.php", 2, _PROFILE_AM_NOSELECTION); +} +$member_handler = xoops_gethandler('member'); +$user = $member_handler->getUser($_REQUEST['uid']); +if ( !$user || $user->isNew() ) { + redirect_header("index.php", 2, _PROFILE_AM_USERDONEXIT); +} + +if ( in_array(XOOPS_GROUP_ADMIN, $user->getGroups() ) ) { + redirect_header("index.php", 2, _PROFILE_AM_CANNOTDEACTIVATEWEBMASTERS); +} +$user->setVar('level', $_REQUEST['level']); +if ( $member_handler->insertUser($user) ) { + if ( $_REQUEST['level'] == 1 ) { + $message = _PROFILE_AM_USER_ACTIVATED; + } else { + $message = _PROFILE_AM_USER_DEACTIVATED; + } +} else { + if ( $_REQUEST['level'] == 1 ) { + $message = _PROFILE_AM_USER_NOT_ACTIVATED; + } else { + $message = _PROFILE_AM_USER_NOT_DEACTIVATED; + } +} +redirect_header("../userinfo.php?uid=" . $user->getVar('uid'), 3, $message); +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/directory.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/directory.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/directory.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,71 @@ +<?php +// $Id: directory.php 5204 2010-09-06 20:10:52Z mageg $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: XOOPS Foundation // +// URL: http://www.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + + include ('header.php'); + xoops_loadLanguage('admin', 'profile'); + + switch ($_REQUEST['op']){ + case 'reset': + XoopsCache::delete($GLOBALS['xoopsModule']->getVar('dirname').'_fields', $fields, 8000); + XoopsCache::delete($GLOBALS['xoopsModule']->getVar('dirname').'_fields_cache', $fields, 8000*1000); + redirect_header('directory.php?op='.'order'.'&fct='.'fields', 5, _PROFILE_AM_MSG_FIELDORDER_RESET); + exit(0); + case 'save': + switch($_REQUEST['fct']) { + case 'fields': + $weights = $_POST['weight']; + $fields = array(); + foreach($weights as $field => $weight){ + $fields[] = array('field' => $field, 'weight' => $weight); + } + $fields = profile_orderfields($fields, false); + + XoopsCache::delete($GLOBALS['xoopsModule']->getVar('dirname').'_fields', $fields, 8000); + XoopsCache::delete($GLOBALS['xoopsModule']->getVar('dirname').'_fields_cache', $fields, 8000*1000); + XoopsCache::write($GLOBALS['xoopsModule']->getVar('dirname').'_fields', $fields, 8000); + XoopsCache::write($GLOBALS['xoopsModule']->getVar('dirname').'_fields_cache', $fields, 8000*1000); + redirect_header('directory.php?op='.'order'.'&fct='.'fields', 5, _PROFILE_AM_MSG_FIELDORDERSAVED); + exit(0); + } + default: + case 'order': + switch($_REQUEST['fct']) { + default: + case 'fields': + xoops_cp_header(); + echo profile_directory_listorder(); + xoops_cp_footer(); + break; + } + break; + + } +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/field.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/field.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/field.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,308 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package profile + * @since 2.3.0 + * @author Jan Pedersen + * @author Taiwen Jiang <ph...@us...> + * @version $Id: field.php 8066 2011-11-06 05:09:33Z beckmi $ + */ +include 'admin_header.php'; +xoops_cp_header(); +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('field.php'); + +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list'); + +$profilefield_handler =& xoops_getmodulehandler('field'); + +switch($op ) { +default: +case "list": + $fields = $profilefield_handler->getObjects(null, true, false); + + $module_handler =& xoops_gethandler('module'); + $modules = $module_handler->getObjects(null, true); + + $cat_handler =& xoops_getmodulehandler('category'); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight'); + $cats = $cat_handler->getObjects($criteria, true); + unset($criteria); + + $categories[0] = _PROFILE_AM_DEFAULT; + 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 => _PROFILE_AM_ARRAY, + XOBJ_DTYPE_EMAIL => _PROFILE_AM_EMAIL, + XOBJ_DTYPE_INT => _PROFILE_AM_INT, + XOBJ_DTYPE_TXTAREA => _PROFILE_AM_TXTAREA, + XOBJ_DTYPE_TXTBOX => _PROFILE_AM_TXTBOX, + XOBJ_DTYPE_URL => _PROFILE_AM_URL, + XOBJ_DTYPE_OTHER => _PROFILE_AM_OTHER, + XOBJ_DTYPE_MTIME => _PROFILE_AM_DATE); + + $fieldtypes = array('checkbox' => _PROFILE_AM_CHECKBOX, + 'group' => _PROFILE_AM_GROUP, + 'group_multi' => _PROFILE_AM_GROUPMULTI, + 'language' => _PROFILE_AM_LANGUAGE, + 'radio' => _PROFILE_AM_RADIO, + 'select' => _PROFILE_AM_SELECT, + 'select_multi' => _PROFILE_AM_SELECTMULTI, + 'textarea' => _PROFILE_AM_TEXTAREA, + 'dhtml' => _PROFILE_AM_DHTMLTEXTAREA, + 'textbox' => _PROFILE_AM_TEXTBOX, + 'timezone' => _PROFILE_AM_TIMEZONE, + 'yesno' => _PROFILE_AM_YESNO, + 'date' => _PROFILE_AM_DATE, + 'datetime' => _PROFILE_AM_DATETIME, + 'longdate' => _PROFILE_AM_LONGDATE, + 'theme' => _PROFILE_AM_THEME, + 'autotext' => _PROFILE_AM_AUTOTEXT, + 'rank' => _PROFILE_AM_RANK); + + foreach (array_keys($fields) as $i ) { + $fields[$i]['canEdit'] = $fields[$i]['field_config'] || $fields[$i]['field_show'] || $fields[$i]['field_edit']; + $fields[$i]['canDelete'] = $fields[$i]['field_config']; + $fields[$i]['fieldtype'] = $fieldtypes[$fields[$i]['field_type']]; + $fields[$i]['valuetype'] = $valuetypes[$fields[$i]['field_valuetype']]; + $categories[$fields[$i]['cat_id']][] = $fields[$i]; + $weights[$fields[$i]['cat_id']][] = $fields[$i]['field_weight']; + } + //sort fields order in categories + foreach (array_keys($categories) as $i ) { + array_multisort($weights[$i], SORT_ASC, array_keys($categories[$i]), SORT_ASC, $categories[$i]); + } + ksort($categories); + $GLOBALS['xoopsTpl']->assign('fieldcategories', $categories); + $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); + $indexAdmin->addItemButton(_ADD.' '._PROFILE_AM_FIELD, 'field.php?op=new', 'add'); + $GLOBALS['xoopsTpl']->assign('addfield', $indexAdmin->renderButton() ); + $template_main = "profile_admin_fieldlist.html"; + break; + +case "new": + include_once('../include/forms.php'); + $obj =& $profilefield_handler->create(); + $form = profile_getFieldForm($obj); + $form->display(); + break; + +case "edit": + $obj =& $profilefield_handler->get($_REQUEST['id']); + if ( !$obj->getVar('field_config') && !$obj->getVar('field_show') && !$obj->getVar('field_edit') ) { //If no configs exist + redirect_header('field.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); + } + include_once('../include/forms.php'); + $form = profile_getFieldForm($obj); + $form->display(); + break; + +case "reorder": + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('field.php', 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 + $field_handler =& xoops_getmodulehandler('field'); + $fields = $field_handler->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 ( !$field_handler->insert($fields[$i]) ) { + $errors = array_merge($errors, $fields[$i]->getErrors() ); + } + } + if ( count($errors) == 0 ) { + //no errors + redirect_header('field.php', 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELDS) ); + } else { + redirect_header('field.php', 3, implode('<br />', $errors) ); + } + } + } + break; + +case "save": + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + } + $redirect_to_edit = false; + if ( isset($_REQUEST['id']) ) { + $obj =& $profilefield_handler->get($_REQUEST['id']); + if ( !$obj->getVar('field_config') && !$obj->getVar('field_show') && !$obj->getVar('field_edit') ) { //If no configs exist + redirect_header('admin.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); + } + } else { + $obj =& $profilefield_handler->create(); + $obj->setVar('field_name', $_REQUEST['field_name']); + $obj->setVar('field_moduleid', $GLOBALS['xoopsModule']->getVar('mid') ); + $obj->setVar('field_show', 1); + $obj->setVar('field_edit', 1); + $obj->setVar('field_config', 1); + $redirect_to_edit = true; + } + $obj->setVar('field_title', $_REQUEST['field_title']); + $obj->setVar('field_description', $_REQUEST['field_description']); + if ( $obj->getVar('field_config') ) { + $obj->setVar('field_type', $_REQUEST['field_type']); + if ( isset($_REQUEST['field_valuetype']) ) { + $obj->setVar('field_valuetype', $_REQUEST['field_valuetype']); + } + $options = $obj->getVar('field_options'); + + if ( isset($_REQUEST['removeOptions']) && is_array($_REQUEST['removeOptions']) ) { + foreach ($_REQUEST['removeOptions'] as $index ) { + unset($options[$index]); + } + $redirect_to_edit = true; + } + + if ( !empty($_REQUEST['addOption']) ) { + foreach ($_REQUEST['addOption'] as $option ) { + if ( empty($option['value']) ) continue; + $options[$option['key']] = $option['value']; + $redirect_to_edit = true; + } + } + $obj->setVar('field_options', $options); + } + if ( $obj->getVar('field_edit') ) { + $required = isset($_REQUEST['field_required']) ? $_REQUEST['field_required'] : 0; + $obj->setVar('field_required', $required); //0 = no, 1 = yes + if ( isset($_REQUEST['field_maxlength']) ) { + $obj->setVar('field_maxlength', $_REQUEST['field_maxlength']); + } + if ( isset($_REQUEST['field_default']) ) { + $field_default = $obj->getValueForSave($_REQUEST['field_default']); + //Check for multiple selections + if ( is_array($field_default) ) { + $obj->setVar('field_default', serialize($field_default) ); + } else { + $obj->setVar('field_default', $field_default); + } + } + } + + if ( $obj->getVar('field_show') ) { + $obj->setVar('field_weight', $_REQUEST['field_weight']); + $obj->setVar('cat_id', $_REQUEST['field_category']); + } + if ( /*$obj->getVar('field_edit') && */isset($_REQUEST['step_id']) ) { + $obj->setVar('step_id', $_REQUEST['step_id']); + } + if ( $profilefield_handler->insert($obj) ) { + $groupperm_handler =& xoops_gethandler('groupperm'); + + $perm_arr = array(); + if ( $obj->getVar('field_show') ) { + $perm_arr[] = 'profile_show'; + $perm_arr[] = 'profile_visible'; + } + if ( $obj->getVar('field_edit') ) { + $perm_arr[] = 'profile_edit'; + } + if ( $obj->getVar('field_edit') || $obj->getVar('field_show') ) { + $perm_arr[] = 'profile_search'; + } + if ( count($perm_arr) > 0 ) { + foreach ($perm_arr as $perm ) { + $criteria = new CriteriaCompo(new Criteria('gperm_name', $perm) ); + $criteria->add(new Criteria('gperm_itemid', intval($obj->getVar('field_id') )) ); + $criteria->add(new Criteria('gperm_modid', intval($GLOBALS['xoopsModule']->getVar('mid') )) ); + if ( isset($_REQUEST[$perm]) && is_array($_REQUEST[$perm]) ) { + $perms = $groupperm_handler->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 = intval($groupid); + if ( !isset($groups[$groupid]) ) { + $perm_obj =& $groupperm_handler->create(); + $perm_obj->setVar('gperm_name', $perm); + $perm_obj->setVar('gperm_itemid', intval($obj->getVar('field_id') )); + $perm_obj->setVar('gperm_modid', $GLOBALS['xoopsModule']->getVar('mid') ); + $perm_obj->setVar('gperm_groupid', $groupid); + $groupperm_handler->insert($perm_obj); + unset($perm_obj); + } + } + $removed_groups = array_diff(array_keys($groups), $_REQUEST[$perm]); + if ( count($removed_groups) > 0 ) { + $criteria->add(new Criteria('gperm_groupid', "(".implode(',', $removed_groups).")", "IN") ); + $groupperm_handler->deleteAll($criteria); + } + unset($groups); + + } else { + $groupperm_handler->deleteAll($criteria); + } + unset($criteria); + } + } + $url = $redirect_to_edit ? 'field.php?op=edit&id=' . $obj->getVar('field_id') : 'field.php'; + redirect_header($url, 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELD) ); + } + include_once('../include/forms.php'); + echo $obj->getHtmlErrors(); + $form = profile_getFieldForm($obj); + $form->display(); + break; + +case "delete": + $obj =& $profilefield_handler->get($_REQUEST['id']); + if ( !$obj->getVar('field_config') ) { + redirect_header('index.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); + } + if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + } + if ( $profilefield_handler->delete($obj) ) { + redirect_header('field.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_FIELD) ); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('field_title') )); + } + break; +} + +if ( isset($template_main) ) { + $GLOBALS['xoopsTpl']->display("db:{$template_main}"); +} +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/header.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/header.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/header.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,27 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package profile + * @since 2.3.0 + * @author Taiwen Jiang <ph...@us...> + * @version $Id: header.php 5204 2010-09-06 20:10:52Z mageg $ + */ + +require_once "../../../include/cp_header.php"; + +xoops_loadLanguage('user'); +if ( !isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl']) ) { + include_once $GLOBALS['xoops']->path( "/class/template.php" ); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); +} +?> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/index.html =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/index.html (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/index.html 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/index.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/index.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/index.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,53 @@ +<?php +// $Id: index.php 8066 2011-11-06 05:09:33Z beckmi $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Raul Recio (AKA UNFOR) // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +include_once 'admin_header.php'; +xoops_cp_header(); + +$indexAdmin = new ModuleAdmin(); +//----------------------- +// $xpPartnerHandler =& xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname')); + +// $totalPartners = $xpPartnerHandler->getCount(); +// $totalNonActivePartners = $xpPartnerHandler->getCount(new Criteria('status', 0, '=')); +// $totalActivePartners = $totalPartners - $totalNonActivePartners; + +// $indexAdmin->addInfoBox(_MD_XPARTNERS_DASHBOARD); + +// $indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALACTIVE. "</infolabel>", $totalActivePartners, 'Green'); +// $indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALNONACTIVE. "</infolabel>", $totalNonActivePartners, 'Red'); +// $indexAdmin->addInfoBoxLine(_MD_XPARTNERS_DASHBOARD, "<infolabel>" ._MD_XPARTNERS_TOTALPARTNERS. "</infolabel><infotext>", $totalPartners."</infotext>"); +//---------------------------- + +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); + +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/profile/branches/timgno/modules/profile/admin/menu.php =================================================================== --- XoopsModules/profile/branches/timgno/modules/profile/admin/menu.php (rev 0) +++ XoopsModules/profile/branches/timgno/modules/profile/admin/menu.php 2012-02-02 12:32:01 UTC (rev 8869) @@ -0,0 +1,55 @@ +<?php +/** + * Extended User Profile + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package profile + * @since 2.3.0 + * @author Jan Pedersen + * @author Taiwen Jiang <ph...@us...> + * @version $Id: menu.php 8066 2011-11-06 05:09:33Z beckmi $ + */ + +$module_handler =& xoops_gethandler('module'); +$xoopsModule =& XoopsModule::getByDirname('profile'); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathIcon32 = $moduleInfo->getInfo('icons32'); + +$adminmenu = array(); + +$i = 1; +$adminmenu[$i]['title'] = _PROFILE_MI_HOME; +$adminmenu[$i]['link'] = "admin/index.php"; +$adminmenu[$i]['icon'] = '../../'.$pathIcon32.'/home.png' ; +$i++; +$adminmenu[$i]['title'] = _PROFILE_MI_USERS; +$adminmenu[$i]['link'] = "... [truncated message content] |