From: <tr...@us...> - 2011-11-13 18:55:55
|
Revision: 8284 http://xoops.svn.sourceforge.net/xoops/?rev=8284&view=rev Author: trabis Date: 2011-11-13 18:55:47 +0000 (Sun, 13 Nov 2011) Log Message: ----------- removing xoopsOpion from system files. Now using $xoTheme->header('templatenname'); Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,7 +38,7 @@ exit(); } -xoops_cp_header(); +$xoops->header(); // ###### Output warn messages for security ###### /** * Error warning messages @@ -135,4 +135,4 @@ echo $ret; } } -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -25,6 +25,7 @@ function xoops_cp_header() { $xoops = Xoops::getInstance(); + $xoops->logger->addDeprecated('xoops_cp_header() is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); $xoops->header($xoops->getOption('template_main')); } @@ -35,5 +36,6 @@ function xoops_cp_footer() { $xoops = Xoops::getInstance(); + $xoops->logger->addDeprecated('xoops_cp_footer() is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); $xoops->footer($xoops->getOption('template_main')); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -40,10 +40,8 @@ case 'main': default: - // Define main template - $xoops->option['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -70,17 +68,16 @@ // Assign form $xoops->tpl->assign('form', $form->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'list': // Get Avatar type $type = $system->cleanVars($_GET, 'type', 'c', 'string'); $start = $system->cleanVars($_GET, 'start', 0, 'int'); - // Define main template - $xoops->option['template_main'] = 'system_avatars.html'; + // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -127,14 +124,12 @@ $xoops->tpl->assign('nav_menu', $nav->renderImageNav()); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'edit': - // Define main template - $xoopsOption['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -158,7 +153,7 @@ $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case'save': @@ -204,10 +199,8 @@ } } if (count($err) > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -217,8 +210,7 @@ // Display errors $xoops->error($err); // Call Footer - xoops_cp_footer(); - exit(); + $xoops->footer(); } $xoops->redirect('admin.php?fct=avatars', 2, _AM_SYSTEM_DBUPDATED); break; @@ -241,10 +233,8 @@ break; case 'delete': - // Define main template - $xoopsOption['template_main'] = 'system_avatars.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_avatars.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -269,7 +259,7 @@ $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } // Call footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delete_ok': @@ -287,12 +277,11 @@ } if (!$avatar_handler->delete($avatar)) { // Call Header - xoops_cp_header(); + $xoops->header(); // Display errors $xoops->error(sprintf(_AM_SYSTEM_AVATAR_FAILDEL, $avatar->getVar('avatar_id'))); // Call Footer - xoops_cp_footer(); - exit(); + $xoops->footer(); } $file = $avatar->getVar('avatar_file'); // Delete file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -41,10 +41,8 @@ $banner_client_Handler = $xoops->getHandlerBannerclient(); // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define template -$xoopsOption['template_main'] = 'system_banners.html'; // Call header -xoops_cp_header(); +$xoops->header('system_banners.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -406,6 +404,6 @@ } break; } -xoops_cp_footer(); +$xoops->footer(); ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -66,10 +66,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -173,14 +171,12 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'add': - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -200,7 +196,7 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display': @@ -324,9 +320,9 @@ $block->setVar('content', $content); if (!$newid = $block_handler->insertBlock($block)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($block->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); exit(); } if ($newid != 0) { @@ -341,9 +337,9 @@ $blockmodulelink->setVar('block_id', $newid); $blockmodulelink->setVar('module_id', $mid); if (!$blockmodulelink_handler->insert($blockmodulelink)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($blockmodulelink->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); exit(); } } @@ -379,10 +375,8 @@ // Get avatar id $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -400,7 +394,7 @@ $blockform = $block->getForm(); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } else { $xoops->redirect('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_DBERROR); } @@ -426,16 +420,14 @@ exit(); } } - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Display Question $xoops->confirm(array( 'op' => 'delete_ok', 'fct' => 'blocksadmin', 'bid' => $block->getVar('bid') ), 'admin.php', sprintf(_AM_SYSTEM_BLOCKS_RUSUREDEL, $block->getVar('title'))); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } break; @@ -486,10 +478,8 @@ // Get avatar id $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { - // Define main template - $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_blocks.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -501,7 +491,7 @@ $blockform = $block->getForm('clone'); $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); } else { $xoops->redirect('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_DBERROR); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,9 +38,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_comments.html'; -xoops_cp_header(); +// Call Header +$xoops->header('system_comments.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -315,4 +314,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -36,10 +36,9 @@ // Get groups handler $groups_Handler = $xoops->getModuleHandler("group", "system"); $member_handler = $xoops->getHandlerMember(); -// Define main template -$xoopsOption['template_main'] = 'system_groups.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_groups.html'); $system_breadcrumb->addLink(_AM_SYSTEM_GROUPS_NAV_MANAGER, system_adminVersion('groups', 'adminpath')); switch ($op) { @@ -158,9 +157,9 @@ $group->setVar('group_type', 'Admin'); } if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); + $xoops->header(); $xoops->error($group->getHtmlErrors()); - xoops_cp_footer(); + $xoops->footer(); } else { $groupid = $group->getVar('groupid'); $gperm_handler = $xoops->getHandlerGroupperm(); @@ -230,9 +229,9 @@ } } if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); + $xoops->header(); echo $group->getHtmlErrors(); - xoops_cp_footer(); + $xoops->footer(); } else { $groupid = $group->getVar('groupid'); $gperm_handler = $xoops->getHandlerGroupperm(); @@ -347,4 +346,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -12,6 +12,8 @@ /** * Images Manager * + * @todo this files as some undefined constants, needs fixing + * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -54,12 +56,12 @@ } $gperm_handler = $xoops->getHandlerGroupperm(); -$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; +$groups = $xoops->isUser() ? $xoops->user->getGroups() : XOOPS_GROUP_ANONYMOUS; // check READ right by category before continue if (isset($imgcat_id) && $op == 'listimg') { - $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imgcat_id, $groups, $xoopsModule->mid()); - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imgcat_id, $groups, $xoops->module->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); if (!$imgcat_read && !$imgcat_write) { $xoops->redirect('admin.php?fct=images', 1); } @@ -67,7 +69,7 @@ // check WRITE right by category before continue if (isset($imgcat_id) && ($op == 'addfile' || $op == 'editcat' || $op == 'updatecat' || $op == 'delcatok' || $op == 'delcat')) { - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); if (!$imgcat_write) { $xoops->redirect('admin.php?fct=images', 1); } @@ -81,10 +83,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -104,8 +104,8 @@ $image_handler = $xoops->getHandlerImage(); foreach (array_keys($imagecategorys) as $i) { - $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoopsModule->mid()); - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoopsModule->mid()); + $imgcat_read = $gperm_handler->checkRight('imgcat_read', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoops->module->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imagecategorys[$i]->getVar('imgcat_id'), $groups, $xoops->module->mid()); if ($imgcat_read || $imgcat_write) { $count = $image_handler->getCount(new Criteria('imgcat_id', $imagecategorys[$i]->getVar('imgcat_id'))); @@ -164,7 +164,7 @@ $form->assign($xoopsTpl); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display_cat': @@ -189,7 +189,7 @@ $xoops->redirect('admin.php?fct=images', 1); } // Get rights - $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoopsModule->mid()); + $imgcat_write = $gperm_handler->checkRight('imgcat_write', $imgcat_id, $groups, $xoops->module->mid()); // Get category handler $imgcat_handler = $xoops->getHandlerImagecategory(); @@ -199,10 +199,8 @@ } // Get image handler $image_handler = $xoops->getHandlerImage(); - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -268,7 +266,7 @@ $form->assign($xoopsTpl); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display_img': @@ -287,10 +285,8 @@ break; case 'editimg': - // Define main template - $xoopsOption['template_main'] = 'system_images.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_images.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -333,14 +329,14 @@ $xoops->redirect('admin.php?fct=images', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delfile': // Get image handler $image_handler = $xoops->getHandlerImage(); // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('browse.php?Frameworks/jquery/css/thumbs/thumbs.css'); @@ -360,7 +356,7 @@ $xoops->redirect('admin.php?fct=images', 1, _AM_SYSTEM_DBERROR); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delfileok': @@ -378,9 +374,9 @@ $xoops->redirect('admin.php?fct=images', 1); } if (!$image_handler->deleteImage($image)) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_IMAGES_FAILDEL, $image->getVar('image_id'))); - xoops_cp_footer(); + $xoops->footer(); exit(); } @unlink(XOOPS_UPLOAD_PATH . '/' . $image->getVar('image_name')); @@ -395,7 +391,7 @@ // Get image handler $image_handler = $xoops->getHandlerImage(); // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Get image id @@ -405,14 +401,14 @@ $image->setVars($_POST); if (!$image_handler->insertImage($image)) { echo sprintf(_AM_SYSTEM_IMAGES_FAILSAVE, $avatar->getVar('avatar_name')); - xoops_cp_footer(); + $xoops->footer(); exit; } $xoops->redirect('admin.php?fct=images&op=listimg&imgcat_id=' . $image->getVar('imgcat_id'), 2, _AM_SYSTEM_DBUPDATED); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'addfile': @@ -462,9 +458,9 @@ } } if (count($err) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error($err); - xoops_cp_footer(); + $xoops->footer(); exit(); } $xoops->redirect('admin.php?fct=images&op=listimg&imgcat_id=' . $image->getVar('imgcat_id'), 2, _AM_SYSTEM_DBUPDATED); @@ -550,10 +546,9 @@ $form->addElement(new XoopsFormHidden('op', 'updatecat')); $form->addElement(new XoopsFormHidden('fct', 'images')); $form->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit')); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; + // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('browse.php?Frameworks/jquery/css/thumbs/thumbs.css'); @@ -569,7 +564,7 @@ echo "<br />"; $form->display(); // Call Footer - xoops_cp_footer(); + $xoops->footer(); exit(); case 'updatecat': @@ -633,13 +628,13 @@ case 'delcat': // Call Header - xoops_cp_header(); + $xoops->header(); // Display message $xoops->confirm(array( 'op' => 'delcatok', 'imgcat_id' => $imgcat_id, 'fct' => 'images' ), 'admin.php', _AM_SYSTEM_IMAGES_RUDELIMGCAT); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'delcatok': @@ -656,9 +651,9 @@ $xoops->redirect('admin.php?fct=images', 1); } if ($imagecategory->getVar('imgcat_type') != 'C') { - xoops_cp_header(); + $xoops->header(); $xoops->error(_MD_SCATDELNG); - xoops_cp_footer(); + $xoops->footer(); exit(); } $image_handler = $xoops->getHandlerImagecategory(); @@ -677,13 +672,11 @@ $errors[] = sprintf(_AM_SYSTEM_IMAGES_FAILDELCAT, $imagecategory->getVar('imgcat_name')); } if (count($errors) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error($errors); - xoops_cp_footer(); + $xoops->footer(); exit(); } $xoops->redirect('admin.php?fct=images', 2, _AM_SYSTEM_DBUPDATED); break; -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -38,10 +38,9 @@ $limit = 100; // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_mailusers.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_mailusers.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addScript('media/jquery/jquery.js'); @@ -323,4 +322,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -40,10 +40,9 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_maintenance.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_maintenance.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -203,4 +202,4 @@ break; } -xoops_cp_footer(); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -53,10 +53,8 @@ switch ($op) { case 'list': - // Define main template - $xoopsOption['template_main'] = 'system_modules.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -117,14 +115,12 @@ $xoops->tpl->assign('mods_popup', $listed_mods); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'installlist': - // Define main template - $xoopsOption['template_main'] = 'system_modules.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); @@ -173,7 +169,7 @@ $xoops->tpl->assign('toinstall_mods', $toinstall_mods); $xoops->tpl->assign('mods_popup', $toinstall_mods); // Call Footer - xoops_cp_footer(); + $xoops->footer(); //xoops_module_list(); break; @@ -200,10 +196,8 @@ break; case 'confirm': - // Define main template - $xoopsOption['template_main'] = 'system_modules_confirm.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules_confirm.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -223,7 +217,7 @@ // Display Error $xoops->error($error); // Call Footer - xoops_cp_footer(); + $xoops->footer(); exit(); } $i = 0; @@ -239,7 +233,7 @@ $xoops->tpl->assign('modifs_mods', $modifs_mods); $xoops->tpl->assign('input_security', $xoops->security->getTokenHTML()); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'display': @@ -304,10 +298,8 @@ //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_modules_confirm.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_modules_confirm.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -319,7 +311,7 @@ $xoops->tpl->assign('result', $ret); } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'install': @@ -334,7 +326,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name', 's') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREINS; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -347,7 +339,7 @@ 'module' => $module, 'op' => 'install_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_INSTALL); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'install_ok': @@ -355,10 +347,8 @@ $ret[] = xoops_module_install($module); //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -374,7 +364,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'uninstall': @@ -388,7 +378,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREUNINS; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -401,7 +391,7 @@ 'module' => $module, 'op' => 'uninstall_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_UNINSTALL); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'uninstall_ok': @@ -409,10 +399,8 @@ $ret[] = xoops_module_uninstall($module); //Set active modules in cache folder $xoops->setActiveModules(); - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -428,7 +416,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'update': @@ -442,7 +430,7 @@ } $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name', 's') . '</span><br /><br />' . _AM_SYSTEM_MODULES_RUSUREUPD; // Call Header - xoops_cp_header(); + $xoops->header(); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -455,7 +443,7 @@ 'dirname' => $module, 'op' => 'update_ok', 'fct' => 'modulesadmin' ), 'admin.php', $msgs, _AM_SYSTEM_MODULES_UPDATE); // Call Footer - xoops_cp_footer(); + $xoops->footer(); break; case 'update_ok': @@ -473,10 +461,7 @@ $module->setVar('name', $temp_name); $module->setVar('last_update', time()); // Call Header - // Define main template - $xoopsOption['template_main'] = 'system_header.html'; - // Call Header - xoops_cp_header(); + $xoops->header('system_header.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips @@ -894,7 +879,7 @@ } } // Call Footer - xoops_cp_footer(); + $xoops->footer(); require_once $xoops->path('modules/system/class/maintenance.php'); $maintenance = new SystemMaintenance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,8 @@ $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); // Setting type $confcat_id = $system->cleanVars($_REQUEST, 'confcat_id', 0, 'int'); -// Define main template -$xoopsOption['template_main'] = 'system_preferences.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_preferences.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -559,4 +557,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,8 @@ $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get smilies handler $smilies_Handler = $xoops->getModuleHandler("smilies", "system"); -// Define main template -$xoopsOption['template_main'] = 'system_smilies.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_smilies.html'); $system_breadcrumb->addLink(_AM_SYSTEM_SMILIES_NAV_MANAGER, system_adminVersion('smilies', 'adminpath')); @@ -227,4 +225,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -34,10 +34,8 @@ // Get Action type $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); -// Define main template -$xoopsOption['template_main'] = 'system_templates.html'; // Call Header -xoops_cp_header(); +$xoops->header('system_templates.html'); // Define scripts $xoops->theme->addScript('media/jquery/jquery.js'); $xoops->theme->addScript('media/jquery/ui/jquery.ui.js'); @@ -371,4 +369,4 @@ break; } // Call Footer -xoops_cp_footer(); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -44,10 +44,9 @@ $op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); // Get userrank handler $userrank_Handler = $xoops->getModuleHandler("userrank", "system"); -// Define main template -$xoopsOption['template_main'] = 'system_userrank.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_userrank.html'); switch ($op) { @@ -219,4 +218,4 @@ } // Call Footer -xoops_cp_footer(); +$xoops->footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -41,10 +41,9 @@ $op = $system->cleanVars($_REQUEST, 'op', 'default', 'string'); $member_handler = $xoops->getHandlerMember(); -// Define main template -$xoopsOption['template_main'] = 'system_users.html'; + // Call Header -xoops_cp_header(); +$xoops->header('system_users.html'); $myts = MyTextSanitizer::getInstance(); // Define Stylesheet @@ -154,13 +153,13 @@ $edituser = $member_handler->getUser($uid); if ($edituser->getVar('uname', 'n') != $_REQUEST['username'] && $member_handler->getUserCount(new Criteria('uname', $myts->addSlashes($_REQUEST['username']))) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_USERS_PSEUDO_ERROR, htmlspecialchars($_REQUEST['username']))); - xoops_cp_footer(); + $xoops->footer(); } elseif ($edituser->getVar('email', 'n') != $_REQUEST['email'] && $member_handler->getUserCount(new Criteria('email', $myts->addSlashes($_REQUEST['email']))) > 0) { - xoops_cp_header(); + $xoops->header(); $xoops->error(sprintf(_AM_SYSTEM_USERS_MAIL_ERROR, htmlspecialchars($_REQUEST['email']))); - xoops_cp_footer(); + $xoops->footer(); } else { $edituser->setVar("name", $_REQUEST['name']); $edituser->setVar("uname", $_REQUEST['username']); @@ -190,18 +189,18 @@ $edituser->setVar('user_mailok', $_REQUEST['user_mailok']); if ($_REQUEST['pass2'] != "") { if ($_REQUEST['password'] != $_REQUEST['pass2']) { - xoops_cp_header(); + $xoops->header(); echo " <strong>" . _AM_SYSTEM_USERS_STNPDNM . "</strong>"; - xoops_cp_footer(); + $xoops->footer(); exit(); } $edituser->setVar("pass", md5($_REQUEST['password'])); } if (!$member_handler->insertUser($edituser)) { - xoops_cp_header(); + $xoops->header(); echo $edituser->getHtmlErrors(); - xoops_cp_footer(); + $xoops->footer(); } else { if ($_REQUEST['groups'] != array()) { global $xoopsUser; @@ -257,9 +256,9 @@ $newuser->setVar("user_msnm", $_REQUEST['user_msnm']); if ($_REQUEST['pass2'] != "") { if ($_REQUEST['password'] != $_REQUEST['pass2']) { - xoops_cp_header(); + $xoops->header(); echo "<strong>" . _AM_SYSTEM_USERS_STNPDNM . "</strong>"; - xoops_cp_footer(); + $xoops->footer(); exit(); } $newuser->setVar("pass", md5($_REQUEST['password'])); @@ -892,4 +891,4 @@ break; } // Call Footer -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -96,8 +96,7 @@ exit; } // Define main template - $xoopsOption['template_main'] = 'system_index.html'; - xoops_cp_header(); + $xoops->header('system_index.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define scripts @@ -197,5 +196,5 @@ } } unset($dirlist); - xoops_cp_footer(); + $xoops->footer(); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-11-13 18:18:44 UTC (rev 8283) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-11-13 18:55:47 UTC (rev 8284) @@ -29,8 +29,7 @@ $mid = $system->cleanVars($_REQUEST, 'mid', 0, 'int'); // Define main template -$xoopsOption['template_main'] = 'system_help.html'; -xoops_cp_header(); +$xoops->header('system_help.html'); // Define Stylesheet $xoops->theme->addStylesheet('modules/system/css/admin.css'); $xoops->theme->addStylesheet('modules/system/css/help.css'); @@ -79,20 +78,20 @@ if ($page != '') { // Call template if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); } else { if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'); + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'); } else { - $xoopsTpl->assign('load_error', 1); + $xoops->tpl->assign('load_error', 1); } } $xoops->tpl->assign('helpcontent', $helpcontent); } else { - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html'); + if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html')) { + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html'); } else { $helpcontent = $module->getInfo('description'); $helpcontent = '<div id="non-modhelp">' . $helpcontent . '</div>'; @@ -103,7 +102,7 @@ } } else { - $xoBreadCrumb->render(); + $system_breadcrumb->render(); $criteria = new CriteriaCompo(); $criteria->setOrder('weight'); // Get all installed modules @@ -158,14 +157,14 @@ $i++; $j++; } - $xoopsTpl->assign('list_mods', $listed_mods); + $xoops->tpl->assign('list_mods', $listed_mods); - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html')) { - $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html'); + if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoops->getConfig('language') . '/help/help_center.html')) { + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoops->getConfig('language') . '/help/help_center.html'); } else { $helpcontent = '<div id="non-modhelp">' . _MD_CPANEL_HELPCENTER . '</div>'; } $xoops->tpl->assign('helpcontent', $helpcontent); } -xoops_cp_footer(); \ No newline at end of file +$xoops->footer(); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-16 00:56:59
|
Revision: 8298 http://xoops.svn.sourceforge.net/xoops/?rev=8298&view=rev Author: trabis Date: 2011-11-16 00:56:53 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Improving XoopsCache so we can actually use XoopsCacheModel to save caches on database (if needed) Cache engines can now be chosen during method call. XoopsCache::getInstance()->write($key, $value, $engineName); Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/cachemodel.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -80,7 +80,7 @@ * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param integer $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return boolean True if the data was successfully cached, false on failure * @access public */ public function write($key, &$value, $duration) @@ -104,7 +104,7 @@ * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ public function delete($key) @@ -115,10 +115,11 @@ /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @param boolean $check if true will check expiration, otherwise delete all + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ - public function clear() + public function clear($check) { return apc_clear_cache('user'); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -138,14 +138,14 @@ * Write data for key into cache * * @param string $key Identifier for the data - * @param mixed $data Data to be cached + * @param mixed $value Data to be cached * @param mixed $duration How long to cache the data, in seconds * @return boolean True if the data was succesfully cached, false on failure * @access public */ - public function write($key, $data = null, $duration = null) + public function write($key, &$value, $duration) { - if (!isset($data) || !$this->init) { + if (!isset($value) || !$this->init) { return false; } @@ -166,13 +166,13 @@ $expires = time() + $duration; if (!empty($this->settings['serialize'])) { if ($windows) { - $data = str_replace('\\', '\\\\\\\\', serialize($data)); + $value = str_replace('\\', '\\\\\\\\', serialize($value)); } else { - $data = serialize($data); + $value = serialize($value); } - $contents = $expires . $lineBreak . $data . $lineBreak; + $contents = $expires . $lineBreak . $value . $lineBreak; } else { - $contents = $expires . $lineBreak . "return " . var_export($data, true) . ";" . $lineBreak; + $contents = $expires . $lineBreak . "return " . var_export($value, true) . ";" . $lineBreak; } if ($this->settings['lock']) { @@ -242,7 +242,7 @@ * Delete all values from the cache * * @param boolean $check Optional - only delete expired cache items - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ public function clear($check = true) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -121,7 +121,7 @@ * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param integer $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return boolean True if the data was successfully cached, false on failure * @access public */ public function write($key, &$value, $duration) @@ -145,7 +145,7 @@ * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ public function delete($key) @@ -156,10 +156,11 @@ /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @param boolean $check if true will check expiration, otherwise delete all + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ - public function clear() + public function clear($check) { return $this->memcache->flush(); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -86,10 +86,10 @@ * @return boolean True if the engine has been successfully initialized, false if not * @access public */ - public function init($settings) + public function init($settings = array()) { parent::init($settings); - $defaults = array('fields' => array('data', 'expires')); + $defaults = array('fields' => array('cache_data', 'cache_expires')); $this->settings = array_merge($defaults, $this->settings); $this->fields = $this->settings['fields']; $this->model = Xoops::getInstance()->getHandlerCachemodel(); @@ -105,27 +105,29 @@ */ public function gc() { - return $this->model->deleteAll(new Criteria($this->fields[1], 'time', '<= ')); + return $this->clear(true); } /** * Write data for key into cache * * @param string $key Identifier for the data - * @param mixed $data Data to be cached + * @param mixed $value Data to be cached * @param integer $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return boolean True if the data was successfully cached, false on failure * @access public */ - public function write($key, $data, $duration) + public function write($key, &$value, $duration) { - $data = serialize($data); - if (!$data) { + $value = serialize($value); + if (empty($value)) { return false; } - $cache_obj = $this->model->create(); + if (!$cache_obj = $this->model->get($key)) { + $cache_obj = $this->model->create(); + } $cache_obj->setVar($this->model->keyName, $key); - $cache_obj->setVar($this->fields[0], $data); + $cache_obj->setVar($this->fields[0], $value); $cache_obj->setVar($this->fields[1], time() + $duration); return $this->model->insert($cache_obj); } @@ -140,20 +142,26 @@ public function read($key) { $criteria = new CriteriaCompo(new Criteria($this->model->keyName, $key)); - $criteria->add(new Criteria($this->fields[1], time(), ">")); + //$criteria->add(new Criteria($this->fields[1], time(), ">")); $criteria->setLimit(1); - $data = $this->model->getAll($criteria); + $data = $this->model->getAll($criteria, null, true, false); + if (!$data) { return null; } - return unserialize($data[0]); + //Did cache expired + if ($data[0]->getVar($this->fields[1]) < time()) { + $this->delete($key); + return null; + } + return unserialize($data[0]->getVar($this->fields[0])); } /** * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ public function delete($key) @@ -165,11 +173,15 @@ /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @param boolean $check if true will check expiration, otherwise delete all + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ - public function clear() + public function clear($check) { + if ($check) { + return $this->model->deleteAll(new Criteria($this->fields[1], time(), '<= ')); + } return $this->model->deleteAll(); } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -70,7 +70,7 @@ * @return bool True if the engine has been successfully initialized, false if not * @access public */ - public function init($settings) + public function init($settings = array()) { parent::init($settings); $defaults = array('PHP_AUTH_USER' => 'cake' , 'PHP_AUTH_PW' => 'cake'); @@ -111,7 +111,7 @@ * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ public function delete($key) @@ -122,10 +122,11 @@ /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @param boolean $check if true will check expiration, otherwise delete all + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ - public function clear() + public function clear($check) { $result = true; $this->__auth(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -97,40 +97,29 @@ * @return array (engine, settings) on success, false on failure * @access public */ - public function config($name = 'default', $settings = array()) + public function config($name = 'file', $settings = array()) { $_this = XoopsCache::getInstance(); if (is_array($name)) { extract($name); } - + if (!$name) { + $name = 'file'; + } if (isset($_this->configs[$name])) { $settings = array_merge($_this->configs[$name], $settings); } else { if (!empty($settings)) { $_this->configs[$name] = $settings; - } else { - if ($_this->configs !== null && isset($_this->configs[$_this->name])) { - $name = $_this->name; - $settings = $_this->configs[$_this->name]; - } else { - $name = 'default'; - if (!empty($_this->configs['default'])) { - $settings = $_this->configs['default']; - } else { - $settings = array( - 'engine' => 'file' - ); - } - } } } - $engine = 'file'; + + $engine = $name; if (!empty($settings['engine'])) { $engine = $settings['engine']; } - if ($name !== $_this->name) { + if (!$this->isInitialized($engine)) { if ($_this->engine($engine, $settings) === false) { trigger_error("Cache Engine {$engine} is not set", E_USER_WARNING); return false; @@ -138,7 +127,6 @@ $_this->name = $name; $_this->configs[$name] = $_this->settings($engine); } - $settings = $_this->configs[$name]; return compact('engine', 'settings'); } @@ -292,7 +280,7 @@ * * @param string $key Identifier for the data * @param string $config name of the configuration to use - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ static function delete($key, $config = null) @@ -322,7 +310,7 @@ * * @param boolean $check if true will check expiration, otherwise delete all * @param string $config name of the configuration to use - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ static function clear($check = false, $config = null) @@ -467,7 +455,7 @@ * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed * @access public */ public function delete($key) @@ -478,7 +466,7 @@ * Delete all keys from the cache * * @param boolean $check if true will check expiration, otherwise delete all - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return boolean True if the cache was successfully cleared, false otherwise * @access public */ public function clear($check) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -325,7 +325,7 @@ if ($ret['type'] == 'db') { //For legacy compatibility - $ret['type'] = 'module'; + $ret['type'] = $this->isAdminSide ? 'admin' : 'module'; } $info = explode('|', $tpl_name); @@ -405,7 +405,7 @@ // Tricky solution for setting cache time for homepage } else { if ($this->tpl_name == 'module:system|system_homepage.html') { - $this->theme->contentCacheLifetime = 604800; + $this->theme->contentCacheLifetime = 5/*604800*/; } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -224,8 +224,8 @@ 'xoopsblockmodulelinkhandler' => XOOPS_ROOT_PATH . '/kernel/blockmodulelink.php', 'xoopscache' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscacheengine' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', - 'xoopscachemodelobject' => XOOPS_ROOT_PATH . '/kernel/cache.php', - 'xoopscacheobjecthandler' => XOOPS_ROOT_PATH . '/kernel/cache.php', + 'xoopscachemodelhandler' => XOOPS_ROOT_PATH . '/kernel/cachemodel.php', + 'xoopscachemodelobject' => XOOPS_ROOT_PATH . '/kernel/cachemodel.php', 'xoopscalendar' => XOOPS_ROOT_PATH . '/class/calendar/xoopscalendar.php', 'xoopscaptcha' => XOOPS_ROOT_PATH . '/class/captcha/xoopscaptcha.php', 'xoopscomment' => XOOPS_ROOT_PATH . '/kernel/comment.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -125,7 +125,7 @@ } /** - * Enable Gzip compression, r + * Enable Gzip compression, * Requires configs loaded and should go before any output */ $xoops->gzipCompression(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/cachemodel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/cachemodel.php 2011-11-15 22:42:07 UTC (rev 8297) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/cachemodel.php 2011-11-16 00:56:53 UTC (rev 8298) @@ -31,9 +31,9 @@ */ function __construct() { - $this->initVar('key', XOBJ_DTYPE_TXTBOX); - $this->initVar('data', XOBJ_DTYPE_SOURCE); - $this->initVar('expires', XOBJ_DTYPE_INT); + $this->initVar('cache_key', XOBJ_DTYPE_TXTBOX); + $this->initVar('cache_data', XOBJ_DTYPE_SOURCE); + $this->initVar('cache_expires', XOBJ_DTYPE_INT); } } @@ -51,7 +51,7 @@ */ public function __construct(XoopsDatabase $db = null) { - parent::__construct($db, 'cache_model', 'XoopsCachemodelObject', 'key', 'data'); + parent::__construct($db, 'cache_model', 'XoopsCachemodelObject', 'cache_key', 'cache_data'); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-19 16:27:58
|
Revision: 8312 http://xoops.svn.sourceforge.net/xoops/?rev=8312&view=rev Author: trabis Date: 2011-11-19 16:27:49 +0000 (Sat, 19 Nov 2011) Log Message: ----------- Do some cleaning on @package Adding registry class (borrowed from Zend) so modules can avoid using GLOBALS. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/lostpass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -21,13 +21,6 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -/** - * XoopsDatabaseFactory - * - * @package Kernel - * @author Kazumi Ono <on...@xo...> - * @access public - */ class XoopsDatabaseFactory { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -106,7 +106,7 @@ { foreach ($this->_preloads as $preload) { include_once XOOPS_ROOT_PATH . '/modules/' . $preload['module'] . '/preloads/' . $preload['file']. '.php'; - $class_name = ucfirst($preload['module']) . ucfirst($preload['file']) . 'Preload' ; + $class_name = ucfirst($preload['module']) . ucfirst($preload['file']) . 'Preload'; if (!class_exists($class_name)) { continue; } Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -0,0 +1,210 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Registry + * + * @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 + * @since 2.6.0 + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to li...@ze... so we can send you a copy immediately. + * + * @category Zend + * @package Zend_Registry + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +class XoopsRegistry extends ArrayObject +{ + /** + * Class name of the singleton registry object. + * @var string + */ + private static $_registryClassName = 'XoopsRegistry'; + + /** + * Registry object provides storage for shared objects. + * @var XoopsRegistry + */ + private static $_registry = null; + + /** + * Retrieves the default registry instance. + * + * @return XoopsRegistry + */ + public static function getInstance() + { + if (self::$_registry === null) { + self::init(); + } + + return self::$_registry; + } + + /** + * Set the default registry instance to a specified instance. + * + * @param XoopsRegistry $registry An object instance of type XoopsRegistry, + * or a subclass. + * @return void + * @throws Zend_Exception if registry is already initialized. + */ + public static function setInstance(XoopsRegistry $registry) + { + if (self::$_registry !== null) { + trigger_error('Registry is already initialized'); + } + + self::setClassName(get_class($registry)); + self::$_registry = $registry; + } + + /** + * Initialize the default registry instance. + * + * @return void + */ + protected static function init() + { + self::setInstance(new self::$_registryClassName()); + } + + /** + * Set the class name to use for the default registry instance. + * Does not affect the currently initialized instance, it only applies + * for the next time you instantiate. + * + * @param string $registryClassName + * @return void + * @throws Zend_Exception if the registry is initialized or if the + * class name is not valid. + */ + public static function setClassName($registryClassName = 'XoopsRegistry') + { + if (self::$_registry !== null) { + trigger_error('Registry is already initialized'); + } + + if (!is_string($registryClassName)) { + trigger_error("Argument is not a class name"); + } + + self::$_registryClassName = $registryClassName; + } + + /** + * Unset the default registry instance. + * Primarily used in tearDown() in unit tests. + * @returns void + */ + public static function _unsetInstance() + { + self::$_registry = null; + } + + /** + * getter method, basically same as offsetGet(). + * + * This method can be called from an object of type Zend_Registry, or it + * can be called statically. In the latter case, it uses the default + * static instance stored in the class. + * + * @param string $index - get the value associated with $index + * @return mixed + * @throws Zend_Exception if no entry is registered for $index. + */ + public static function get($index) + { + $instance = self::getInstance(); + + if (!$instance->offsetExists($index)) { + trigger_error("No entry is registered for key '$index'"); + } + + return $instance->offsetGet($index); + } + + /** + * setter method, basically same as offsetSet(). + * + * This method can be called from an object of type Zend_Registry, or it + * can be called statically. In the latter case, it uses the default + * static instance stored in the class. + * + * @param string $index The location in the ArrayObject in which to store + * the value. + * @param mixed $value The object to store in the ArrayObject. + * @return void + */ + public static function set($index, $value) + { + $instance = self::getInstance(); + $instance->offsetSet($index, $value); + } + + /** + * Returns TRUE if the $index is a named value in the registry, + * or FALSE if $index was not found in the registry. + * + * @param string $index + * @return boolean + */ + public static function isRegistered($index) + { + if (self::$_registry === null) { + return false; + } + return self::$_registry->offsetExists($index); + } + + /** + * Constructs a parent ArrayObject with default + * ARRAY_AS_PROPS to allow access as an object + * + * @param array $array data array + * @param integer $flags ArrayObject flags + */ + public function __construct($array = array(), $flags = parent::ARRAY_AS_PROPS) + { + parent::__construct($array, $flags); + } + + /** + * @param string $index + * @return mixed + * + * Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960). + */ + public function offsetExists($index) + { + return array_key_exists($index, $this); + } + +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/registry.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -465,8 +465,7 @@ //Get meta information for cached pages if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId, $this->headersCacheEngine)) { - //print_R($content); - //we need to merge metas set by blocks ) with the module cached meta + //we need to merge metas set by blocks with the module cached meta $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']); foreach ($content['metas'] as $type => $value) { $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); @@ -504,7 +503,6 @@ // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ? $this->template->assign('xoops_module_header', $this->renderMetas(null, true) . "\n" . $header); - if ($canvasTpl) { $this->canvasTemplate = $canvasTpl; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -22,12 +22,6 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -/** - * XoopsUserUtility - * - * @package Kernel - * @author Taiwen Jiang <ph...@us...> - */ class XoopsUserUtility { /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -140,6 +140,15 @@ } /** + * @param string $value + * @return void + */ + public function setAction($value = '') + { + $this->_action = $value; + } + + /** * get the "action" attribute for the <form> tag * * @param bool $encode To sanitizer the text? Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -324,6 +324,7 @@ 'xoopsprivmessagehandler' => XOOPS_ROOT_PATH . '/kernel/privmessage.php', 'xoopsranks' => XOOPS_ROOT_PATH . '/kernel/ranks.php', 'xoopsrankshandler' => XOOPS_ROOT_PATH . '/kernel/ranks.php', + 'xoopsregistry' => XOOPS_ROOT_PATH . '/class/registry.php', 'xoopssecurity' => XOOPS_ROOT_PATH . '/class/xoopssecurity.php', 'xoopssessionhandler' => XOOPS_ROOT_PATH . '/kernel/session.php', 'xoopssimpleform' => XOOPS_ROOT_PATH . '/class/xoopsform/simpleform.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -41,19 +41,14 @@ */ require_once XOOPS_ROOT_PATH . DS . 'class' . DS . 'xoopsload.php'; + /** - * YOU SHOULD BE CAREFUL WITH THE PRELOAD METHODS IN 2.4*, THEY WILL BE DEPRECATED AND IMPLEMENTED IN A DIFFERENT WAY - */ -/** * Create Instance of Preload Object */ $xoopsPreload = XoopsPreload::getInstance(); $xoopsPreload->triggerEvent('core.include.common.start'); /** - * YOU SHOULD BE CAREFUL WITH THE {@Xoops}, MOST METHODS WILL BE DEPRECATED - */ -/** * Create Instance of Xoops Object * Atention, not all methods can be used at this point */ @@ -64,7 +59,7 @@ $xoops->option =& $GLOBALS['xoopsOption']; /** - * Create Instance of xoopsSecurity Object and check Superglobals + * Create Instance of xoopsSecurity Object and check super globals */ $xoops->security = new XoopsSecurity(); $xoops->security->checkSuperglobals(); @@ -239,9 +234,6 @@ } /** - * YOU SHOULD NEVER USE THE FOLLOWING METHOD, IT WILL BE REMOVED - */ -/** * Theme Selection */ $xoops->themeSelect(); @@ -301,9 +293,6 @@ $xoopsUserIsAdmin =& $xoops->userIsAdmin; $xoopsModuleConfig =& $xoops->moduleConfig; -/** - * YOU SHOULD AVOID USING THE FOLLOWING FUNCTION, IT WILL BE REMOVED - */ //Creates 'system_modules_active' cache file if it has been deleted. $xoops->getActiveModules(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -777,9 +777,8 @@ * @author Taiwen Jiang <ph...@us...> * @author Jan Keller Pedersen <mit...@xo...> * @copyright copyright (c) The XOOPS project - * @package Kernel + * @package kernel */ - class XoopsPersistableObjectHandler extends XoopsObjectHandler { /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -20,7 +23,6 @@ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'header.php'; $xoops = Xoops::getInstance(); - $xoops->loadLanguage('admin'); $xoops->header(); @@ -35,28 +37,27 @@ $thisuser = $member_handler->getUser($id); if (!is_object($thisuser)) { $xoops->redirect(XOOPS_URL, 1, ''); - exit(); } if ($thisuser->getVar('actkey') != $actkey) { $xoops->redirect(XOOPS_URL . '/', 5, _US_ACTKEYNOT); } else { if ($thisuser->getVar('level') > 0) { - $xoops->redirect(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n'). '/index.php', 5, _US_ACONTACT, false); + $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php', 5, _US_ACONTACT, false); } else { if (false != $member_handler->activateUser($thisuser)) { - $GLOBALS['xoopsConfigUser'] = $xoops->getConfigs(XOOPS_CONF_USER); - if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) { + $xoops->getConfigs(XOOPS_CONF_USER); + if ($xoops->getConfig('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('SITENAME', $xoops->getConfig('sitename')); + $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('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']) ); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); + $xoopsMailer->setSubject(sprintf(_US_YOURACCOUNT, $xoops->getConfig('sitename'))); $xoops->footer(); if (!$xoopsMailer->send()) { printf(_US_ACTVMAILNG, $thisuser->getVar('uname') ); @@ -73,7 +74,7 @@ } } // Not implemented yet: re-send activiation code -} else if (!empty($_REQUEST['email']) && $xoopsConfigUser['activation_type'] != 0) { +} else if (!empty($_REQUEST['email']) && $xoops->getConfig('activation_type') != 0) { $myts = MyTextSanitizer::getInstance(); $member_handler = $xoops->getHandlerMember(); $getuser = $member_handler->getUsers(new Criteria('email', $myts->addSlashes(trim($_REQUEST['email'])))); @@ -81,17 +82,17 @@ $xoops->redirect(XOOPS_URL, 2, _US_SORRYNOTFOUND); } if ($getuser[0]->isActive()) { - $xoops->redirect(XOOPS_URL, 2, sprintf(_US_USERALREADYACTIVE, $getuser[0]->getVar('email'))); + $xoops->redirect(XOOPS_URL, 2, sprintf(_US_ACONTACT, $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('SITENAME', $xoops->getConfig('sitename')); + $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); $xoopsMailer->assign('SITEURL', XOOPS_URL . "/"); $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']); - $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $getuser[0]->getVar('uname') )); if (!$xoopsMailer->send()) { echo _US_YOURREGMAILNG; @@ -105,6 +106,5 @@ $form->display(); } -$xoBreadcrumbs[] = array('title' => _PROFILE_MA_REGISTER); -include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; -?> \ No newline at end of file +$xoops->appendConfig('profile_breadcrumbs', array('title' => _PROFILE_MA_REGISTER)); +include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -41,7 +41,7 @@ $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight'); $criteria->setOrder('ASC'); - $GLOBALS['xoopsTpl']->assign('categories', $handler->getObjects($criteria, true, false) ); + $xoops->tpl->assign('categories', $handler->getObjects($criteria, true, false) ); $template_main = "profile_admin_categorylist.html"; break; @@ -97,7 +97,7 @@ break; } if ( isset($template_main) ) { - $GLOBALS['xoopsTpl']->display("module:profile|{$template_main}"); + $xoops->tpl->display("module:profile|{$template_main}"); } xoops_cp_footer(); ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -43,7 +43,7 @@ $categories[$cats[$i]->getVar('cat_id')] = $cats[$i]->getVar('cat_title'); } } - $GLOBALS['xoopsTpl']->assign('categories', $categories); + $xoops->tpl->assign('categories', $categories); unset($categories); $valuetypes = array(XOBJ_DTYPE_ARRAY => _PROFILE_AM_ARRAY, XOBJ_DTYPE_EMAIL => _PROFILE_AM_EMAIL, @@ -86,8 +86,8 @@ 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() ); + $xoops->tpl->assign('fieldcategories', $categories); + $xoops->tpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); $template_main = "profile_admin_fieldlist.html"; break; @@ -159,7 +159,7 @@ } else { $obj = $profilefield_handler->create(); $obj->setVar('field_name', $_REQUEST['field_name']); - $obj->setVar('field_moduleid', $GLOBALS['xoopsModule']->getVar('mid') ); + $obj->setVar('field_moduleid', $xoops->module->getVar('mid') ); $obj->setVar('field_show', 1); $obj->setVar('field_edit', 1); $obj->setVar('field_config', 1); @@ -232,7 +232,7 @@ 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') )) ); + $criteria->add(new Criteria('gperm_modid', intval($xoops->module->getVar('mid') )) ); if ( isset($_REQUEST[$perm]) && is_array($_REQUEST[$perm]) ) { $perms = $groupperm_handler->getObjects($criteria); if ( count($perms) > 0 ) { @@ -248,7 +248,7 @@ $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_modid', $xoops->module->getVar('mid') ); $perm_obj->setVar('gperm_groupid', $groupid); $groupperm_handler->insert($perm_obj); unset($perm_obj); @@ -297,7 +297,7 @@ } if ( isset($template_main) ) { - $GLOBALS['xoopsTpl']->display("module:profile|{$template_main}"); + $xoops->tpl->display("module:profile|{$template_main}"); } xoops_cp_footer(); ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -63,7 +63,7 @@ $opform->addElement($op_select); $opform->display(); -$module_id = $GLOBALS['xoopsModule']->getVar('mid'); +$module_id = $xoops->module->getVar('mid'); $form = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, 'admin/permissions.php', $anonymous); if ( $op == "access" ) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -25,7 +25,7 @@ $handler = $xoops->getModuleHandler('regstep'); switch ($op ) { case "list": - $GLOBALS['xoopsTpl']->assign('steps', $handler->getObjects(null, true, false) ); + $xoops->tpl->assign('steps', $handler->getObjects(null, true, false) ); $template_main = "profile_admin_steplist.html"; break; @@ -76,7 +76,7 @@ } if ( !empty($template_main) ) { - $GLOBALS['xoopsTpl']->display("module:profile|{$template_main}"); + $xoops->tpl->display("module:profile|{$template_main}"); } xoops_cp_footer(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -23,36 +23,36 @@ xoops_cp_header(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list'; -if ( $op == "editordelete" ) { +if ($op == "editordelete") { $op = isset($_REQUEST['delete']) ? "delete" : "edit"; } $handler = $xoops->getHandlerMember(); -switch($op ) { +switch ($op) { default: case "list": $form = new XoopsThemeForm(_PROFILE_AM_EDITUSER, 'form', 'user.php'); - $form->addElement(new XoopsFormSelectUser(_PROFILE_AM_SELECTUSER, 'id') ); - $form->addElement(new XoopsFormHidden('op', 'editordelete') ); + $form->addElement(new XoopsFormSelectUser(_PROFILE_AM_SELECTUSER, 'id')); + $form->addElement(new XoopsFormHidden('op', 'editordelete')); $button_tray = new XoopsFormElementTray(''); - $button_tray->addElement(new XoopsFormButton('', 'edit', _EDIT, 'submit') ); - $button_tray->addElement(new XoopsFormButton('', 'delete', _DELETE, 'submit') ); + $button_tray->addElement(new XoopsFormButton('', 'edit', _EDIT, 'submit')); + $button_tray->addElement(new XoopsFormButton('', 'delete', _DELETE, 'submit')); $form->addElement($button_tray); $form->display(); case "new": - $xoops->loadLanguage("main", $GLOBALS['xoopsModule']->getVar('dirname', 'n') ); + $xoops->loadLanguage("main", $xoops->module->getVar('dirname', 'n')); include_once '../include/forms.php'; $obj = $handler->createUser(); - $obj->setGroups(array(XOOPS_GROUP_USERS) ); + $obj->setGroups(array(XOOPS_GROUP_USERS)); $form = profile_getUserForm($obj); $form->display(); break; case "edit": - $xoops->loadLanguage("main", $GLOBALS['xoopsModule']->getVar('dirname', 'n') ); + $xoops->loadLanguage("main", $xoops->module->getVar('dirname', 'n')); $obj = $handler->getUser($_REQUEST['id']); - if ( in_array(XOOPS_GROUP_ADMIN, $obj->getGroups() ) && !in_array(XOOPS_GROUP_ADMIN, $GLOBALS['xoopsUser']->getGroups() ) ) { + if (in_array(XOOPS_GROUP_ADMIN, $obj->getGroups()) && !in_array(XOOPS_GROUP_ADMIN, $xoops->user->getGroups())) { // If not webmaster trying to edit a webmaster - disallow $xoops->redirect("user.php", 3, _US_NOEDITRIGHT); } @@ -62,9 +62,9 @@ break; case "save": - $xoops->loadLanguage("main", $GLOBALS['xoopsModule']->getVar('dirname', 'n') ); - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('user.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors() )); + $xoops->loadLanguage("main", $xoops->module->getVar('dirname', 'n')); + if (!$GLOBALS['xoopsSecurity']->check()) { + $xoops->redirect('user.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); exit; } @@ -75,61 +75,64 @@ $userfields = $profile_handler->getUserVars(); // Get ids of fields that can be edited $gperm_handler = $xoops->getHandlerGroupperm(); - $editable_fields = $gperm_handler->getItemIds('profile_edit', $GLOBALS['xoopsUser']->getGroups(), $GLOBALS['xoopsModule']->getVar('mid') ); + $editable_fields = $gperm_handler->getItemIds('profile_edit', $xoops->user->getGroups(), $xoops->module->getVar('mid')); $uid = empty($_POST['uid']) ? 0 : intval($_POST['uid']); - if ( !empty($uid) ) { + if (!empty($uid)) { $user = $handler->getUser($uid); $profile = $profile_handler->get($uid); - if ( !is_object($profile) ) { + if (!is_object($profile)) { $profile = $profile_handler->create(); $profile->setVar('profile_id', $uid); } } else { $user = $handler->createUser(); $profile = $profile_handler->create(); - if ( count($fields) > 0 ) { - foreach (array_keys($fields) as $i ) { + if (count($fields) > 0) { + foreach (array_keys($fields) as $i) { $fieldname = $fields[$i]->getVar('field_name'); - if ( in_array($fieldname, $userfields) ) { + if (in_array($fieldname, $userfields)) { $default = $fields[$i]->getVar('field_default'); - if ( $default === '' || $default === null) continue; + if ($default === '' || $default === null) { + continue; + } $user->setVar($fieldname, $default); } } } - $user->setVar('user_regdate', time() ); + $user->setVar('user_regdate', time()); $user->setVar('level', 1); } $myts = MyTextSanitizer::getInstance(); $user->setVar('uname', $_POST['uname']); - $user->setVar('email', trim($_POST['email']) ); - if ( isset($_POST['level']) && $user->getVar('level') != intval($_POST['level']) ) { - $user->setVar('level', intval($_POST['level']) ); + $user->setVar('email', trim($_POST['email'])); + if (isset($_POST['level']) && $user->getVar('level') != intval($_POST['level'])) { + $user->setVar('level', intval($_POST['level'])); } $password = $vpass = null; - if ( !empty($_POST['password']) ) { - $password = $myts->stripSlashesGPC(trim($_POST['password']) ); - $vpass = @$myts->stripSlashesGPC(trim($_POST['vpass']) ); - $user->setVar('pass', md5($password) ); - } elseif ( $user->isNew() ) { + if (!empty($_POST['password'])) { + $password = $myts->stripSlashesGPC(trim($_POST['password'])); + $vpass = @$myts->stripSlashesGPC(trim($_POST['vpass'])); + $user->setVar('pass', md5($password)); + } elseif ($user->isNew()) { $password = $vpass = ''; } $stop = XoopsUserUtility::validate($user, $password, $vpass); $errors = array(); - if ( $stop != "" ) { + if ($stop != "") { $errors[] = $stop; } - foreach (array_keys($fields) as $i ) { + foreach (array_keys($fields) as $i) { $fieldname = $fields[$i]->getVar('field_name'); - if ( in_array($fields[$i]->getVar('field_id'), $editable_fields) && isset($_REQUEST[$fieldname]) ) { - if ( in_array($fieldname, $userfields) ) { - $value = $fields[$i]->getValueForSave($_REQUEST[$fieldname], $user->getVar($fieldname, 'n') ); + if (in_array($fields[$i]->getVar('field_id'), $editable_fields) && isset($_REQUEST[$fieldname])) { + if (in_array($fieldname, $userfields)) { + $value = $fields[$i]->getValueForSave($_REQUEST[$fieldname], $user->getVar($fieldname, 'n')); $user->setVar($fieldname, $value); } else { - $value = $fields[$i]->getValueForSave( ( isset($_REQUEST[$fieldname]) ? $_REQUEST[$fieldname] : ""), $profile->getVar($fieldname, 'n') ); + $value = $fields[$i]->getValueForSave((isset($_REQUEST[$fieldname]) ? $_REQUEST[$fieldname] + : ""), $profile->getVar($fieldname, 'n')); $profile->setVar($fieldname, $value); } } @@ -137,37 +140,37 @@ $new_groups = isset($_POST['groups']) ? $_POST['groups'] : array(); - if ( count($errors) == 0 ) { - if ( $handler->insertUser($user) ) { - $profile->setVar('profile_id', $user->getVar('uid') ); + if (count($errors) == 0) { + if ($handler->insertUser($user)) { + $profile->setVar('profile_id', $user->getVar('uid')); $profile_handler->insert($profile); - include_once $GLOBALS['xoops']->path( "/modules/system/constants.php" ); - if ( $gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $GLOBALS['xoopsUser']->getGroups(), 1) ) { + include_once $xoops->path("/modules/system/constants.php"); + if ($gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $xoops->user->getGroups(), 1)) { //Update group memberships $cur_groups = $user->getGroups(); $added_groups = array_diff($new_groups, $cur_groups); $removed_groups = array_diff($cur_groups, $new_groups); - if ( count($added_groups) > 0 ) { - foreach ($added_groups as $groupid ) { - $handler->addUserToGroup($groupid, $user->getVar('uid') ); + if (count($added_groups) > 0) { + foreach ($added_groups as $groupid) { + $handler->addUserToGroup($groupid, $user->getVar('uid')); } } - if ( count($removed_groups) > 0 ) { - foreach ($removed_groups as $groupid ) { - $handler->removeUsersFromGroup($groupid, array($user->getVar('uid') )); + if (count($removed_groups) > 0) { + foreach ($removed_groups as $groupid) { + $handler->removeUsersFromGroup($groupid, array($user->getVar('uid'))); } } } - if ( $user->isNew() ) { + if ($user->isNew()) { $xoops->redirect('user.php', 2, _PROFILE_AM_USERCREATED, false); } else { $xoops->redirect('user.php', 2, _US_PROFUPDATED, false); } } } else { - foreach ($errors as $err ) { + foreach ($errors as $err) { $user->setErrors($err); } } @@ -179,23 +182,23 @@ break; case "delete": - if ( $_REQUEST['id'] == $GLOBALS['xoopsUser']->getVar('uid') ) { + if ($_REQUEST['id'] == $xoops->user->getVar('uid')) { $xoops->redirect('user.php', 2, _PROFILE_AM_CANNOTDELETESELF); } $obj = $handler->getUser($_REQUEST['id']); $groups = $obj->getGroups(); - if ( in_array(XOOPS_GROUP_ADMIN, $groups) ) { + if (in_array(XOOPS_GROUP_ADMIN, $groups)) { $xoops->redirect('user.php', 3, _PROFILE_AM_CANNOTDELETEADMIN, false); } - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('user.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() ), false); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if (!$GLOBALS['xoopsSecurity']->check()) { + $xoops->redirect('user.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()), false); } $profile_handler = $xoops->getModuleHandler('profile'); - $profile = $profile_handler->get($obj->getVar('uid') ); - if ( !$profile || $profile->isNew() || $profile_handler->delete($profile) ) { - if ( $handler->deleteUser($obj) ) { + $profile = $profile_handler->get($obj->getVar('uid')); + if (!$profile || $profile->isNew() || $profile_handler->delete($profile)) { + if ($handler->deleteUser($obj)) { $xoops->redirect('user.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, $obj->getVar('uname') . " (" . $obj->getVar('email') . ")"), false); } else { echo $obj->getHtmlErrors(); @@ -205,7 +208,9 @@ } } else { - $xoops->confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('uname') . " (" . $obj->getVar('email') . ")") ); + $xoops->confirm(array( + 'ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete' + ), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('uname') . " (" . $obj->getVar('email') . ")")); } break; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -72,9 +72,9 @@ $groups[0] = _PROFILE_AM_FIELDVISIBLETOALL; asort($groups); -$GLOBALS['xoopsTpl']->assign('fields', $fields); -$GLOBALS['xoopsTpl']->assign('visibilities', $visibilities); -$GLOBALS['xoopsTpl']->assign('groups', $groups); +$xoops->tpl->assign('fields', $fields); +$xoops->tpl->assign('visibilities', $visibilities); +$xoops->tpl->assign('groups', $groups); $add_form = new XoopsSimpleForm('', 'addform', 'visibility.php'); @@ -93,9 +93,9 @@ $add_form->addElement($sel_pg); $add_form->addElement(new XoopsFormButton('', 'submit', _ADD, 'submit') ); -$add_form->assign($GLOBALS['xoopsTpl']); +$add_form->assign($xoops->tpl); -$GLOBALS['xoopsTpl']->display("module:profile|profile_admin_visibility.html"); +$xoops->tpl->display("module:profile|profile_admin_visibility.html"); xoops_cp_footer(); ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -19,13 +22,12 @@ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'header.php'; $xoops = Xoops::getInstance(); - $xoops->loadLanguage('user'); -$GLOBALS['xoopsConfigUser'] = $xoops->getConfigs(XOOPS_CONF_USER); +$xoops->getConfigs(XOOPS_CONF_USER); -if (!$GLOBALS['xoopsUser'] || $GLOBALS['xoopsConfigUser']['allow_chgmail'] != 1) { - $xoops->redirect(XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . "/", 2, _NOPERM); +if (!$xoops->user || $xoops->getConfig('allow_chgmail') != 1) { + $xoops->redirect(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'n') . "/", 2, _NOPERM); } $xoops->header('profile_email.html'); @@ -36,13 +38,13 @@ $form->addElement(new XoopsFormPassword(_US_PASSWORD, 'passwd', 15, 50), true); $form->addElement(new XoopsFormText(_PROFILE_MA_NEWMAIL, 'newmail', 15, 50), true); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); - $form->assign($GLOBALS['xoopsTpl']); + $form->assign($xoops->tpl); } else { $myts = MyTextSanitizer::getInstance(); $pass = @$myts->stripSlashesGPC(trim($_POST['passwd'])); $email = @$myts->stripSlashesGPC(trim($_POST['newmail'])); $errors = array(); - if (md5($pass) != $GLOBALS['xoopsUser']->getVar('pass', 'n')) { + if (md5($pass) != $xoops->user->getVar('pass', 'n')) { $errors[] = _PROFILE_MA_WRONGPASSWORD; } if (!$xoops->checkEmail($email)) { @@ -53,35 +55,34 @@ $msg = implode('<br />', $errros); } else { //update password - $GLOBALS['xoopsUser']->setVar('email', trim($_POST['newmail'])); + $xoops->user->setVar('email', trim($_POST['newmail'])); $member_handler = $xoops->getHandlerMember(); - if ($member_handler->insertUser($GLOBALS['xoopsUser'])) { + if ($member_handler->insertUser($xoops->user)) { $msg = _PROFILE_MA_EMAILCHANGED; //send email to new email address $xoopsMailer = $xoops->getMailer(); $xoopsMailer->useMail(); - $xoopsMailer->setTemplateDir($GLOBALS['xoopsModule']->getVar('dirname', 'n')); + $xoopsMailer->setTemplateDir($xoops->module->getVar('dirname', 'n')); $xoopsMailer->setTemplate('emailchanged.tpl'); - $xoopsMailer->assign("SITENAME", $GLOBALS['xoopsConfig']['sitename']); - $xoopsMailer->assign("ADMINMAIL", $GLOBALS['xoopsConfig']['adminmail']); + $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); + $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); $xoopsMailer->assign("SITEURL", XOOPS_URL . "/"); $xoopsMailer->assign("NEWEMAIL", $email); $xoopsMailer->setToEmails($email); - $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']); - $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']); - $xoopsMailer->setSubject(sprintf(_PROFILE_MA_NEWEMAIL, $GLOBALS['xoopsConfig']['sitename'])); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); + $xoopsMailer->setSubject(sprintf(_PROFILE_MA_NEWEMAIL, $xoops->getConfig('sitename'))); $xoopsMailer->send(); } else { - $msg = implode('<br />', $GLOBALS['xoopsUser']->getErrors() ); + $msg = implode('<br />', $xoops->user->getErrors() ); } } - $xoops->redirect(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/userinfo.php?uid=' . $GLOBALS['xoopsUser']->getVar('uid'), 2, $msg); + $xoops->redirect(XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/userinfo.php?uid=' . $xoops->user->getVar('uid'), 2, $msg); } -$xoBreadcrumbs[] = array('title' => _PROFILE_MA_CHANGEMAIL); +$xoops->appendConfig('profile_breadcrumbs', array('title' => _PROFILE_MA_CHANGEMAIL)); -include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; -?> \ No newline at end of file +include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -35,9 +38,8 @@ $form->addElement(new XoopsFormPassword(_US_VERIFYPASS, 'vpass', 15, 50), true); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); $form->assign($xoops->tpl); + $xoops->appendConfig('profile_breadcrumbs', array('title' => _PROFILE_MA_CHANGEPASSWORD)); - $xoBreadcrumbs[] = array('title' => _PROFILE_MA_CHANGEPASSWORD); - } else { $xoops->getConfigs(XOOPS_CONF_USER); $myts = MyTextSanitizer::getInstance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/category.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/category.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/category.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -20,13 +23,12 @@ defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); -/** - * @package kernel - * @copyright copyright © 2000 XOOPS.org - */ class ProfileCategory extends XoopsObject { - function __construct() + /** + * Constructor + */ + public function __construct() { $this->initVar('cat_id', XOBJ_DTYPE_INT, null, true); $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX); @@ -34,11 +36,6 @@ $this->initVar('cat_weight', XOBJ_DTYPE_INT); } - function ProfileCategory() - { - $this->__construct(); - } - /** * Get {@link XoopsThemeForm} for adding/editing categories * @@ -46,43 +43,25 @@ * * @return object */ - function getForm($action = false) + public function getForm($action = false) { + $xoops = Xoops::getInstance(); + $form = $xoops->getModuleForm($this, 'category', 'profile'); if ($action === false) { $action = $_SERVER['REQUEST_URI']; } - $title = $this->isNew() ? sprintf(_PROFILE_AM_ADD, _PROFILE_AM_CATEGORY) : sprintf(_PROFILE_AM_EDIT, _PROFILE_AM_CATEGORY); - - $form = new XoopsThemeForm($title, 'form', $action, 'post', true); - $form->addElement(new XoopsFormText(_PROFILE_AM_TITLE, 'cat_title', 35, 255, $this->getVar('cat_title'))); - if (!$this->isNew()) { - //Load groups - $form->addElement(new XoopsFormHidden('id', $this->getVar('cat_id'))); - } - $form->addElement(new XoopsFormTextArea(_PROFILE_AM_DESCRIPTION, 'cat_description', $this->getVar('cat_description', 'e'))); - $form->addElement(new XoopsFormText(_PROFILE_AM_WEIGHT, 'cat_weight', 35, 35, $this->getVar('cat_weight', 'e'))); - - $form->addElement(new XoopsFormHidden('op', 'save') ); - $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); - + $form->setAction($action); return $form; } } -/** - * @package kernel - * @copyright copyright © 2000 XOOPS.org - */ class ProfileCategoryHandler extends XoopsPersistableObjectHandler { - function ProfileCategoryHandler(&$db) + /** + * @param null|XoopsDatabase $db + */ + function __construct(XoopsDatabase $db = null) { - $this->__construct($db); - } - - function __construct(&$db) - { parent::__construct($db, "profile_category", "profilecategory", "cat_id", 'cat_title'); } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php 2011-11-19 16:20:16 UTC (rev 8311) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php 2011-11-19 16:27:49 UTC (rev 8312) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -26,7 +29,10 @@ */ class ProfileField extends XoopsObject { - function __construct() + /** + * Constructor + */ + public function __construct() { $this->initVar('field_id', XOBJ_DTYPE_INT, null); $this->initVar('cat_id', XOBJ_DTYPE_INT, null, true); @@ -43,30 +49,35 @@ $this->initVar('field_edit', XOBJ_DTYPE_INT, 0); $this->initVar('field_show', XOBJ_DTYPE_INT, 0); $this->initVar('field_config', XOBJ_DTYPE_INT, 0); - $this->initVar('field_options', XOBJ_DTYPE_ARRAY, array() ); + $this->initVar('field_options', XOBJ_DTYPE_ARRAY, array()); $this->initVar('step_id', XOBJ_DTYPE_INT, 0); } - function ProfileField() - { - $this->__construct(); - } - /** * Extra treatment dealing with non latin encoding * Tricky solution + * + * @param string $key + * @param mixed $value + * @param bool $not_gpc + * @return void */ - function setVar($key, $value, $not_gpc = false) + public function setVar($key, $value, $not_gpc = false) { if ($key == 'field_options' && is_array($value)) { - foreach (array_keys($value) as $idx ) { + foreach (array_keys($value) as $idx) { $value[$idx] = base64_encode($value[$idx]); } } parent::setVar($key, $value, $not_gpc); } - function getVar($key, $format = 's') + /** + * @param string $key + * @param string $format + * @return array|mixed + */ + public function getVar($key, $format = 's') { $value = parent::getVar($key, $format); if ($key == 'field_options' && !empty($value)) { @@ -78,16 +89,17 @@ } /** - * Returns a {@link XoopsFormElement} for editing the value of this field - * - * @param XoopsUser $user {@link XoopsUser} object to edit the value of - * @param ProfileProfile $profile {@link ProfileProfile} object to edit the value of - * - * @return XoopsFormElement - **/ - function getEditElement($user, $profile) + * Returns a {@link XoopsFormElement} for editing the value of this field + * + * @param XoopsUser $user {@link XoopsUser} object to edit the value of + * @param ProfileProfile $profile {@link ProfileProfile} object to edit the value of + * + * @return XoopsFormElement + **/ + public function getEditElement(XoopsUser $user, ProfileProfile $profile) { - $value = in_array($this->getVar('field_name'), $this->getUserVars() ) ? $user->getVar($this->getVar('field_name'), 'e') : $profile->getVar($this->getVar('field_name'), 'e'); + $value = in_array($this->getVar('field_name'), $this->getUserVars()) + ? $user->getVar($this->getVar('field_name'), 'e') : $profile->getVar($this->getVar('field_name'), 'e'); $caption = $this->getVar('field_title'); $caption = defined($caption) ? constant($caption) : $caption; @@ -103,7 +115,7 @@ $options[$optkey] = $optval; } } - switch ($this->getVar('field_type') ) { + switch ($this->getVar('field_type')) { default: case "autotext": //autotext is not for editing @@ -128,11 +140,9 @@ if (!in_array('', array_keys($options))) { $element->addOption('', _NONE); - $eltmsg = empty($caption) ? sprintf(_FORM_ENTER, $name) : sprintf( _FORM_ENTER, $caption); + $eltmsg = empty($caption) ? sprintf(_FORM_ENTER, $name) : sprintf(_FORM_ENTER, $caption); $eltmsg = str_replace('"', '\"', stripslashes($eltmsg)); - $element->customValidationCode[] = "\nvar hasSelected = false; var selectBox = myform.{$name};" . - "for (i = 0; i < selectBox.options.length; i++ ) { if ( selectBox.options[i].selected == true && selectBox.options[i].value != '' ) { hasSelected = true; break; } }" . - "if ( !hasSelected ) { window.alert(\"{$eltmsg}... [truncated message content] |
From: <tr...@us...> - 2011-11-23 22:06:54
|
Revision: 8336 http://xoops.svn.sourceforge.net/xoops/?rev=8336&view=rev Author: trabis Date: 2011-11-23 22:06:45 +0000 (Wed, 23 Nov 2011) Log Message: ----------- Some refactoring on Profile module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/deactivate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/form/regstep.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/visibility.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_admin_categorylist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_admin_fieldlist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_admin_steplist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/profile_admin_visibility.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -49,7 +49,7 @@ * * @var array */ - protected $vars = array(); + public $vars = array(); /** * variables cleaned for store in DB Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,103 +1,96 @@ <?php -// $Id$ -// ------------------------------------------------------------------------ // -// 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_cp_header(); +/* + 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. +*/ + +/** + * Extended User Profile + * + * @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$ + */ + +include dirname(__FILE__) . '/header.php'; + $xoops = Xoops::getInstance(); +$xoops->header(); + $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list'); +/* @var $handler ProfileCategoryHandler */ +/* @var $obj ProfileCategory */ $handler = $xoops->getModuleHandler('category'); -switch($op ) { -default: -case "list": - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight'); - $criteria->setOrder('ASC'); - $xoops->tpl->assign('categories', $handler->getObjects($criteria, true, false) ); - $template_main = "profile_admin_categorylist.html"; - break; +switch ($op) { + default: + case "list": + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight'); + $criteria->setOrder('ASC'); + $xoops->tpl->assign('categories', $handler->getObjects($criteria, true, false)); + $template_main = "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() ) { - $xoops->redirect('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); - } - if ( isset($_REQUEST['id']) ) { - $obj = $handler->get($_REQUEST['id']); - } else { + case "new": $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) ) { - $xoops->redirect('category.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_CATEGORY) ); - } - include_once '../include/forms.php'; - echo $obj->getHtmlErrors(); - $form = $obj->getForm(); - $form->display(); - break; + $form = $obj->getForm(); + $form->display(); + break; -case "delete": - $obj = $handler->get($_REQUEST['id']); - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('category.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + case "edit": + $handler->get($_REQUEST['id']); + $form = $obj->getForm(); + $form->display(); + break; + + case "save": + if (!$xoops->security->check()) { + $xoops->redirect('category.php', 3, implode(',', $xoops->security->getErrors())); } - if ( $handler->delete($obj) ) { - $xoops->redirect('category.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_CATEGORY) ); + if (isset($_REQUEST['id'])) { + $obj = $handler->get($_REQUEST['id']); } else { - echo $obj->getHtmlErrors(); + $obj = $handler->create(); } - } else { - $xoops->confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('cat_title') )); - } - break; + $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)) { + $xoops->redirect('category.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_CATEGORY)); + } + echo $obj->getHtmlErrors(); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete": + $obj = $handler->get($_REQUEST['id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if (!$xoops->security->check()) { + $xoops->redirect('category.php', 3, implode(',', $xoops->security->getErrors())); + } + if ($handler->delete($obj)) { + $xoops->redirect('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) ) { - $xoops->tpl->display("module:profile|{$template_main}"); +if (isset($template_main)) { + $xoops->tpl->display("admin:profile|{$template_main}"); } -xoops_cp_footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/deactivate.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/deactivate.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/deactivate.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,32 +1,53 @@ <?php -include 'header.php'; -xoops_cp_header(); +/* + 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. -if ( !isset($_REQUEST['uid']) ) { + 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. +*/ + +/** + * Extended User Profile + * + * @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$ + */ + +include dirname(__FILE__) . '/header.php'; +$xoops = Xoops::getInstance(); +$xoops->header(); + +if (!isset($_REQUEST['uid'])) { $xoops->redirect("index.php", 2, _PROFILE_AM_NOSELECTION); } $member_handler = $xoops->getHandlerMember(); $user = $member_handler->getUser($_REQUEST['uid']); -if ( !$user || $user->isNew() ) { +if (!$user || $user->isNew()) { $xoops->redirect("index.php", 2, _PROFILE_AM_USERDONEXIT); } -if ( in_array(XOOPS_GROUP_ADMIN, $user->getGroups() ) ) { +if (in_array(XOOPS_GROUP_ADMIN, $user->getGroups())) { $xoops->redirect("index.php", 2, _PROFILE_AM_CANNOTDEACTIVATEWEBMASTERS); } $user->setVar('level', $_REQUEST['level']); -if ( $member_handler->insertUser($user) ) { - if ( $_REQUEST['level'] == 1 ) { +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 ) { + if ($_REQUEST['level'] == 1) { $message = _PROFILE_AM_USER_NOT_ACTIVATED; } else { $message = _PROFILE_AM_USER_NOT_DEACTIVATED; } } -$xoops->redirect("../userinfo.php?uid=" . $user->getVar('uid'), 3, $message); -?> \ No newline at end of file +$xoops->redirect($xoops->url('modules/profile/userinfo.php?uid=' . $user->getVar('uid')), 3, $message); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,287 +20,282 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ -include 'header.php'; -xoops_cp_header(); + +include dirname(__FILE__) . '/header.php'; + $xoops = Xoops::getInstance(); +$xoops->header(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list'); +/* @var $profilefield_handler ProfileFieldHandler */ $profilefield_handler = $xoops->getModuleHandler('field'); -switch($op ) { -default: -case "list": - $fields = $profilefield_handler->getObjects(null, true, false); - $modules = $xoops->getHandlerModule()->getObjectsArray(null, true); +/* @var $obj ProfileField */ - $cat_handler = $xoops->getModuleHandler('category'); - $criteria = new CriteriaCompo(); - $criteria->setSort('cat_weight'); - $cats = $cat_handler->getObjects($criteria, true); - unset($criteria); +switch ($op) { + default: + case "list": + $fields = $profilefield_handler->getObjects(null, true, false); + $modules = $xoops->getHandlerModule()->getObjectsArray(null, true); - $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'); + $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'); + } } - } - $xoops->tpl->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); + $xoops->tpl->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); + $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 + ); + $categories = array(); + 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); + $xoops->tpl->assign('fieldcategories', $categories); + $xoops->tpl->assign('token', $xoops->security->getTokenHTML()); + $template_main = "fieldlist.html"; + break; - 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); - $xoops->tpl->assign('fieldcategories', $categories); - $xoops->tpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $template_main = "profile_admin_fieldlist.html"; - break; + case "new": + $obj = $profilefield_handler->create(); + $form = $obj->getForm(); + $form->display(); + 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 + $xoops->redirect('field.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); + } + $form = $obj->getForm(); + $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 - $xoops->redirect('field.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); - } - include_once('../include/forms.php'); - $form = profile_getFieldForm($obj); - $form->display(); - break; - -case "reorder": - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('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); - } + case "reorder": + if (!$xoops->security->check()) { + $xoops->redirect('field.php', 3, implode(',', $xoops->security->getErrors())); } - 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 (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($errors) == 0 ) { - //no errors - $xoops->redirect('field.php', 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELDS) ); - } else { - $xoops->redirect('field.php', 3, implode('<br />', $errors) ); + 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 + $xoops->redirect('field.php', 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELDS)); + } else { + $xoops->redirect('field.php', 3, implode('<br />', $errors)); + } } } - } - break; + break; -case "save": - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('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 - $xoops->redirect('admin.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); + case "save": + if (!$xoops->security->check()) { + $xoops->redirect('field.php', 3, implode(',', $xoops->security->getErrors())); } - } else { - $obj = $profilefield_handler->create(); - $obj->setVar('field_name', $_REQUEST['field_name']); - $obj->setVar('field_moduleid', $xoops->module->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 = 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 + $xoops->redirect('admin.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); } + } else { + $obj = $profilefield_handler->create(); + $obj->setVar('field_name', $_REQUEST['field_name']); + $obj->setVar('field_moduleid', $xoops->module->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 ( !empty($_REQUEST['addOption']) ) { - foreach ($_REQUEST['addOption'] as $option ) { - if ( empty($option['value']) ) continue; - $options[$option['key']] = $option['value']; + 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); } - $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_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->getHandlerGroupperm(); - - $perm_arr = array(); - if ( $obj->getVar('field_show') ) { - $perm_arr[] = 'profile_show'; - $perm_arr[] = 'profile_visible'; + if ($obj->getVar('field_show')) { + $obj->setVar('field_weight', $_REQUEST['field_weight']); + $obj->setVar('cat_id', $_REQUEST['field_category']); } - if ( $obj->getVar('field_edit') ) { - $perm_arr[] = 'profile_edit'; + if ( /*$obj->getVar('field_edit') && */ + isset($_REQUEST['step_id']) + ) { + $obj->setVar('step_id', $_REQUEST['step_id']); } - 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($xoops->module->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]; + if ($profilefield_handler->insert($obj)) { + $groupperm_handler = $xoops->getHandlerGroupperm(); + + $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($xoops->module->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(); } - } 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', $xoops->module->getVar('mid') ); - $perm_obj->setVar('gperm_groupid', $groupid); - $groupperm_handler->insert($perm_obj); - unset($perm_obj); + 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', $xoops->module->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") ); + $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($groups); - - } else { - $groupperm_handler->deleteAll($criteria); + unset($criteria); } - unset($criteria); } + $url = $redirect_to_edit ? 'field.php?op=edit&id=' . $obj->getVar('field_id') : 'field.php'; + $xoops->redirect($url, 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELD)); } - $url = $redirect_to_edit ? 'field.php?op=edit&id=' . $obj->getVar('field_id') : 'field.php'; - $xoops->redirect($url, 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_FIELD) ); - } - include_once('../include/forms.php'); - echo $obj->getHtmlErrors(); - $form = profile_getFieldForm($obj); - $form->display(); - break; + echo $obj->getHtmlErrors(); + $form = $obj->getForm(); + $form->display(); + break; -case "delete": - $obj = $profilefield_handler->get($_REQUEST['id']); - if ( !$obj->getVar('field_config') ) { - $xoops->redirect('index.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); - } - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - $xoops->redirect('field.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors() )); + case "delete": + $obj = $profilefield_handler->get($_REQUEST['id']); + if (!$obj->getVar('field_config')) { + $xoops->redirect('index.php', 2, _PROFILE_AM_FIELDNOTCONFIGURABLE); } - if ( $profilefield_handler->delete($obj) ) { - $xoops->redirect('field.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_FIELD) ); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if (!$xoops->security->check()) { + $xoops->redirect('field.php', 3, implode(',', $xoops->security->getErrors())); + } + if ($profilefield_handler->delete($obj)) { + $xoops->redirect('field.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_FIELD)); + } else { + echo $obj->getHtmlErrors(); + } } else { - echo $obj->getHtmlErrors(); + $xoops->confirm(array( + 'ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete' + ), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('field_title'))); } - } else { - $xoops->confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('field_title') )); - } - break; + break; } -if ( isset($template_main) ) { - $xoops->tpl->display("module:profile|{$template_main}"); +if (isset($template_main)) { + $xoops->tpl->display("admin:profile|{$template_main}"); } -xoops_cp_footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/header.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/header.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,10 +20,7 @@ * @version $Id$ */ -require_once "../../../include/cp_header.php"; +require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; $xoops = Xoops::getInstance(); -$xoops->loadLanguage('user'); -if (!$xoops->tpl instanceof XoopsTpl) { - $xoops->tpl = new XoopsTpl(); -} \ No newline at end of file +$xoops->loadLanguage('user'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,6 +20,7 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ + $adminmenu[1]['title'] = _PROFILE_MI_USERS; $adminmenu[1]['link'] = "admin/user.php"; $adminmenu[2]['title'] = _PROFILE_MI_CATEGORIES; @@ -26,6 +30,4 @@ $adminmenu[4]['title'] = _PROFILE_MI_STEPS; $adminmenu[4]['link'] = "admin/step.php"; $adminmenu[5]['title'] = _PROFILE_MI_PERMISSIONS; -$adminmenu[5]['link'] = "admin/permissions.php"; - -?> \ No newline at end of file +$adminmenu[5]['link'] = "admin/permissions.php"; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,9 +20,10 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ -include 'header.php'; -xoops_cp_header(); +include dirname(__FILE__) . '/header.php'; + $xoops = Xoops::getInstance(); +$xoops->header(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : "edit"; @@ -76,6 +80,7 @@ } } else { + /* @var $profile_handler ProfileProfileHandler */ $profile_handler = $xoops->getModuleHandler('profile'); $fields = $profile_handler->loadFields(); @@ -102,5 +107,4 @@ } } $form->display(); -xoops_cp_footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,34 +20,37 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ -include 'header.php'; -xoops_cp_header(); +include dirname(__FILE__) . '/header.php'; + +$xoops = Xoops::getInstance(); +$xoops->header(); + $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list'); +/* @var $handler ProfileRegstepHandler */ $handler = $xoops->getModuleHandler('regstep'); -switch ($op ) { +/* @var $obj ProfileRegstep */ +switch ($op) { case "list": - $xoops->tpl->assign('steps', $handler->getObjects(null, true, false) ); - $template_main = "profile_admin_steplist.html"; + $xoops->tpl->assign('steps', $handler->getObjects(null, true, false)); + $template_main = "steplist.html"; break; case "new": $obj = $handler->create(); - include_once "../include/forms.php"; - $form = profile_getStepForm($obj);; + $form = $obj->getForm(); $form->display(); break; case "edit": $obj = $handler->get($_REQUEST['id']); - include_once "../include/forms.php"; - $form = profile_getStepForm($obj);; + $form = $obj->getForm(); $form->display(); break; case "save": - if ( isset($_REQUEST['id']) ) { + if (isset($_REQUEST['id'])) { $obj = $handler->get($_REQUEST['id']); } else { $obj = $handler->create(); @@ -53,8 +59,8 @@ $obj->setVar('step_order', $_REQUEST['step_order']); $obj->setVar('step_desc', $_REQUEST['step_desc']); $obj->setVar('step_save', $_REQUEST['step_save']); - if ( $handler->insert($obj) ) { - $xoops->redirect('step.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_STEP) ); + if ($handler->insert($obj)) { + $xoops->redirect('step.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_STEP)); } echo $obj->getHtmlErrors(); $form = $obj->getForm(); @@ -63,21 +69,22 @@ case "delete": $obj = $handler->get($_REQUEST['id']); - if ( isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1 ) { - if ( $handler->delete($obj) ) { - $xoops->redirect('step.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_STEP) ); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if ($handler->delete($obj)) { + $xoops->redirect('step.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_STEP)); } else { echo $obj->getHtmlErrors(); } } else { - $xoops->confirm(array('ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('step_name') )); + $xoops->confirm(array( + 'ok' => 1, 'id' => $_REQUEST['id'], 'op' => 'delete' + ), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('step_name'))); } break; } -if ( !empty($template_main) ) { - $xoops->tpl->display("module:profile|{$template_main}"); +if (!empty($template_main)) { + $xoops->tpl->display("admin:profile|{$template_main}"); } -xoops_cp_footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,15 +20,17 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ -include 'header.php'; +include dirname(__FILE__) . '/header.php'; + $xoops = Xoops::getInstance(); -xoops_cp_header(); +$xoops->header(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list'; if ($op == "editordelete") { $op = isset($_REQUEST['delete']) ? "delete" : "edit"; } + $handler = $xoops->getHandlerMember(); switch ($op) { @@ -42,7 +47,7 @@ case "new": $xoops->loadLanguage("main", $xoops->module->getVar('dirname', 'n')); - include_once '../include/forms.php'; + include_once dirname(dirname(__FILE__)) . '/include/forms.php'; $obj = $handler->createUser(); $obj->setGroups(array(XOOPS_GROUP_USERS)); $form = profile_getUserForm($obj); @@ -56,19 +61,20 @@ // If not webmaster trying to edit a webmaster - disallow $xoops->redirect("user.php", 3, _US_NOEDITRIGHT); } - include_once '../include/forms.php'; + include_once dirname(dirname(__FILE__)) . '/include/forms.php'; $form = profile_getUserForm($obj); $form->display(); break; case "save": $xoops->loadLanguage("main", $xoops->module->getVar('dirname', 'n')); - if (!$GLOBALS['xoopsSecurity']->check()) { - $xoops->redirect('user.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + if (!$xoops->security->check()) { + $xoops->redirect('user.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $xoops->security->getErrors())); exit; } // Dynamic fields + /* @var $profile_handler ProfileProfileHandler */ $profile_handler = $xoops->getModuleHandler('profile'); // Get fields $fields = $profile_handler->loadFields(); @@ -175,7 +181,7 @@ } } $user->setGroups($new_groups); - include_once '../include/forms.php'; + include_once dirname(dirname(__FILE__)) . '/include/forms.php'; echo $user->getHtmlErrors(); $form = profile_getUserForm($user, $profile); $form->display(); @@ -192,8 +198,8 @@ } if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if (!$GLOBALS['xoopsSecurity']->check()) { - $xoops->redirect('user.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()), false); + if (!$xoops->security->check()) { + $xoops->redirect('user.php', 3, implode(',', $xoops->security->getErrors()), false); } $profile_handler = $xoops->getModuleHandler('profile'); $profile = $profile_handler->get($obj->getVar('uid')); @@ -215,5 +221,4 @@ break; } -xoops_cp_footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php 2011-11-23 18:46:54 UTC (rev 8335) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php 2011-11-23 22:06:45 UTC (rev 8336) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * 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 @@ -17,15 +20,16 @@ * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ -include 'header.php'; +include dirname(__FILE__) . '/header.php'; + $xoops = Xoops::getInstance(); //there is no way to override current tabs when using system menu //this dirty hack will have to do it $_SERVER['REQUEST_URI'] = "admin/permissions.php"; -xoops_cp_header(); +$xoops->header(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : "visibility"; @@ -33,22 +37,20 @@ $field_handler = $xoops->getModuleHandler('field'); $fields = $field_handler->getList(); -if ( isset($_REQUEST['submit']) ) { +if (isset($_REQUEST['submit'])) { $visibility = $visibility_handler->create(); $visibility->setVar('field_id', $_REQUEST['field_id']); $visibility->setVar('user_group', $_REQUEST['ug']); $visibility->setVar('profile_group', $_REQUEST['pg']); $visibility_handler->insert($visibility, true); - $xoops->redirect("visibility.php", 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_PROF_VISIBLE) ); - exit(); + $xoops->redirect("visibility.php", 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_PROF_VISIBLE)); } -if ( $op == "del" ) { - $criteria = new CriteriaCompo(new Criteria('field_id', intval($_REQUEST['field_id']) )); - $criteria->add(new Criteria('user_group', intval($_REQUEST['ug']) )); - $criteria->add(new Criteria('profile_group', intval($_REQUEST['pg']) )); +if ($op == "del") { + $criteria = new CriteriaCompo(new Criteria('field_id', intval($_REQUEST['field_id']))); + $criteria->add(new Criteria('user_group', intval($_REQUEST['ug']))); + $criteria->add(new Criteria('profile_group', intval($_REQUEST['pg']))); $visibility_handler->deleteAll($criteria, true); - $xoops->redirect("visibility.php", 2, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_PROF_VISIBLE) ); - exit(); + $xoops->redirect("visibility.php", 2, sprintf(_PROFILE_AM_DELETEDSUCCESS, _PROFILE_AM_PROF_VISIBLE)); } $opform = new XoopsSimpleForm('', 'opform', 'permissions.php', "get"); @@ -92,10 +94,9 @@ $sel_pg->addOptionArray($groups); $add_form->addElement($sel_pg); -$add_form->addElement(new XoopsFormButton('', 'submit', _... [truncated message content] |
From: <tr...@us...> - 2011-11-26 18:57:09
|
Revision: 8355 http://xoops.svn.sourceforge.net/xoops/?rev=8355&view=rev Author: trabis Date: 2011-11-26 18:57:02 +0000 (Sat, 26 Nov 2011) Log Message: ----------- More profile refactoring Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -726,7 +726,7 @@ * @param XoopsDatabase $db reference to the {@link XoopsDatabase} object * @access protected */ - function __construct($db) + public function __construct($db) { $this->db = $db; } @@ -736,8 +736,9 @@ * * @abstract */ - function create() + public function create() { + } /** @@ -746,8 +747,9 @@ * @param int $int_id * @abstract */ - function get($int_id) + public function get($int_id) { + } /** @@ -756,7 +758,7 @@ * @param object $object * @abstract */ - function insert($object) + public function insert($object) { } @@ -766,7 +768,7 @@ * @param object $object * @abstract */ - function delete($object) + public function delete($object) { } } @@ -791,7 +793,7 @@ /** * static protected */ - var $handler; + protected $handler; /** * holds reference to predefined extended object handlers: read, stats, joint, write, sync @@ -803,7 +805,7 @@ * * @access private */ - var $handlers = array('read' => null, 'stats' => null, 'joint' => null, 'write' => null, 'sync' => null); + private $handlers = array('read' => null, 'stats' => null, 'joint' => null, 'write' => null, 'sync' => null); /** * Information about the class, the handler is managing @@ -858,7 +860,7 @@ * @param string $keyName Name of the property holding the key * @param string $identifierName Name of the property holding an identifier name (title, name ...), used on getList() */ - function __construct(XoopsDatabase $db = null, $table = '', $className = '', $keyName = '', $identifierName = '') + public function __construct(XoopsDatabase $db = null, $table = '', $className = '', $keyName = '', $identifierName = '') { $db = XoopsDatabaseFactory::getDatabaseConnection(); $table = $db->prefix($table); @@ -881,7 +883,7 @@ * @param string|null $path * @return object|null */ - function setHandler($handler = null, $args = null, $path = null) + public function setHandler($handler = null, $args = null, $path = null) { $this->handler = null; if (is_object($handler)) { @@ -903,7 +905,7 @@ * @param mixed $args args * @return object of handler {@link XoopsObjectAbstract} */ - function loadHandler($name, $args = null) + public function loadHandler($name, $args = null) { static $handlers; if (!isset($handlers[$name])) { @@ -936,7 +938,7 @@ * @param array $args arguments * @return mixed */ - function __call($name, $args) + public function __call($name, $args) { if (is_object($this->handler) && is_callable(array($this->handler, $name))) { return call_user_func_array(array($this->handler, $name), $args); @@ -963,7 +965,7 @@ * @param bool $isNew Flag the new objects as new * @return XoopsObject {@link XoopsObject} */ - function create($isNew = true) + public function create($isNew = true) { /* @var $obj XoopsObject */ $obj = new $this->className(); @@ -981,7 +983,7 @@ * @param array $fields fields to fetch * @return XoopsObject|null {@link XoopsObject} */ - function get($id = null, $fields = null) + public function get($id = null, $fields = null) { $object = null; if (empty($id)) { @@ -1025,7 +1027,7 @@ * @param bool $force flag to force the query execution despite security settings * @return mixed */ - function insert(XoopsObject $object, $force = true) + public function insert(XoopsObject $object, $force = true) { /* @var $handler XoopsModelWrite */ $handler = $this->loadHandler('write'); @@ -1039,7 +1041,7 @@ * @param bool $force * @return bool FALSE if failed. */ - function delete(XoopsObject $object, $force = false) + public function delete(XoopsObject $object, $force = false) { /* @var $handler XoopsModelWrite */ $handler = $this->loadHandler('write'); @@ -1054,7 +1056,7 @@ * @param bool $asObject delete in object way: instantiate all objects and delte one by one * @return bool */ - function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) + public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) { /* @var $handler XoopsModelWrite */ $handler = $this->loadHandler('write'); @@ -1070,7 +1072,7 @@ * @param bool $force force to query * @return bool */ - function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) + public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) { /* @var $handler XoopsModelWrite */ $handler = $this->loadHandler('write'); @@ -1094,7 +1096,7 @@ * @param bool $as_object return an array of objects * @return array */ - function getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true) + public function getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); @@ -1111,7 +1113,7 @@ * @param bool $id_as_key use the ID as key for the array * @return array of objects/array {@link XoopsObject} */ - function getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true) + public function getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); @@ -1127,7 +1129,7 @@ * @param int $start Which record to start at * @return array */ - function getList(CriteriaElement $criteria = null, $limit = 0, $start = 0) + public function getList(CriteriaElement $criteria = null, $limit = 0, $start = 0) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); @@ -1141,7 +1143,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return array of object IDs */ - function getIds(CriteriaElement $criteria = null) + public function getIds(CriteriaElement $criteria = null) { /* @var $handler XoopsModelRead */ $handler = $this->loadHandler('read'); @@ -1163,7 +1165,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return int count of objects */ - function getCount(CriteriaElement $criteria = null) + public function getCount(CriteriaElement $criteria = null) { /* @var $handler XoopsModelStats */ $handler = $this->loadHandler('stats'); @@ -1176,7 +1178,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return array of counts */ - function getCounts(CriteriaElement $criteria = null) + public function getCounts(CriteriaElement $criteria = null) { /* @var $handler XoopsModelStats*/ $handler = $this->loadHandler('stats'); @@ -1201,7 +1203,7 @@ * @param string $field_object field of current object for JOIN * @return array of objects {@link XoopsObject} */ - function getByLink(CriteriaElement $criteria = null, $fields = null, $asObject = true, $field_link = null, $field_object = null) + public function getByLink(CriteriaElement $criteria = null, $fields = null, $asObject = true, $field_link = null, $field_object = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1215,7 +1217,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return int count of objects */ - function getCountByLink(CriteriaElement $criteria = null) + public function getCountByLink(CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1229,7 +1231,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return int count of objects */ - function getCountsByLink(CriteriaElement $criteria = null) + public function getCountsByLink(CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1244,7 +1246,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return int count of objects */ - function updateByLink($data, CriteriaElement $criteria = null) + public function updateByLink($data, CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1258,7 +1260,7 @@ * @param CriteriaElement|null $criteria {@link CriteriaElement} to match * @return int count of objects */ - function deleteByLink(CriteriaElement $criteria = null) + public function deleteByLink(CriteriaElement $criteria = null) { /* @var $handler XoopsModelJoint */ $handler = $this->loadHandler('joint'); @@ -1282,7 +1284,7 @@ * @param string $field_object field of current object for JOIN * @return bool true on success */ - function cleanOrphan($table_link = '', $field_link = '', $field_object = '') + public function cleanOrphan($table_link = '', $field_link = '', $field_object = '') { /* @var $handler XoopsModelSync */ $handler = $this->loadHandler('sync'); @@ -1295,7 +1297,7 @@ * * @return bool true on success */ - function synchronization() + public function synchronization() { $retval = $this->cleanOrphan(); return $retval; @@ -1303,6 +1305,4 @@ /** * *#@- */ -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -86,7 +86,7 @@ $uid = empty($_POST['uid']) ? 0 : intval($_POST['uid']); if (!empty($uid)) { $user = $handler->getUser($uid); - $profile = $profile_handler->get($uid); + $profile = $profile_handler->getProfile($uid); if (!is_object($profile)) { $profile = $profile_handler->create(); $profile->setVar('profile_id', $uid); @@ -202,7 +202,7 @@ $xoops->redirect('user.php', 3, implode(',', $xoops->security->getErrors()), false); } $profile_handler = $xoops->getModuleHandler('profile'); - $profile = $profile_handler->get($obj->getVar('uid')); + $profile = $profile_handler->getProfile($obj->getVar('uid')); if (!$profile || $profile->isNew() || $profile_handler->delete($profile)) { if ($handler->deleteUser($obj)) { $xoops->redirect('user.php', 3, sprintf(_PROFILE_AM_DELETEDSUCCESS, $obj->getVar('uname') . " (" . $obj->getVar('email') . ")"), false); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -473,11 +473,11 @@ /** * save a profile field in the database * - * @param ProfileField $obj reference to the object + * @param XoopsObject|ProfileField $obj reference to the object * @param bool $force whether to force the query execution despite security settings * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - public function insert(ProfileField &$obj, $force = false) + public function insert(XoopsObject $obj, $force = false) { $xoops = Xoops::getInstance(); $profile_handler = $xoops->getModuleHandler('profile', 'profile'); @@ -601,11 +601,11 @@ /** * delete a profile field from the database * - * @param ProfileField $obj reference to the object to delete + * @param XoopsObject|ProfileField $obj reference to the object to delete * @param bool $force * @return bool FALSE if failed. **/ - public function delete(ProfileField &$obj, $force = false) + public function delete(XoopsObject $obj, $force = false) { $xoops = Xoops::getInstance(); $profile_handler = $xoops->getModuleHandler('profile', 'profile'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -97,7 +97,7 @@ * @param bool $createOnFailure create a new {@link ProfileProfile} if none is fetched * @return null|ProfileProfile|XoopsObject */ - public function get($uid, $createOnFailure = true) + public function getProfile($uid, $createOnFailure = true) { $obj = parent::get($uid); if (!is_object($obj) && $createOnFailure) { @@ -230,13 +230,12 @@ /** * insert a new object in the database * - * @param ProfileProfile $obj reference to the object + * @param XoopsObject|ProfileProfile $obj reference to the object * @param bool $force whether to force the query execution despite security settings - * @param bool $checkObject check if the object is dirty and clean the attributes * * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - public function insert(ProfileProfile &$obj, $force = false, $checkObject = true) + public function insert(XoopsObject $obj, $force = false) { $uservars = $this->getUserVars(); foreach ($uservars as $var) { @@ -245,7 +244,7 @@ if (count($obj->vars) == 0) { return true; } - return parent::insert($obj, $force, $checkObject); + return parent::insert($obj, $force); } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -67,12 +67,12 @@ * Delete an object from the database * @see XoopsPersistableObjectHandler * - * @param ProfileRegstep $obj + * @param XoopsObject|ProfileRegstep $obj * @param bool $force * * @return bool */ - public function delete(ProfileRegstep $obj, $force = false) + public function delete(XoopsObject $obj, $force = false) { if (parent::delete($obj, $force)) { $xoops = Xoops::getInstance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -60,7 +60,7 @@ $gperm_handler = $xoops->getHandlerGroupperm(); $editable_fields = $gperm_handler->getItemIds('profile_edit', $xoops->user->getGroups(), $xoops->module->getVar('mid')); - if (!$profile = $profile_handler->get($edituser->getVar('uid'))) { + if (!$profile = $profile_handler->getProfile($edituser->getVar('uid'))) { $profile = $profile_handler->create(); $profile->setVar('profile_id', $edituser->getVar('uid')); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -142,7 +142,7 @@ $profile_handler = $xoops->getModuleHandler('profile'); // Dynamic fields if (!$profile) { - $profile = $profile_handler->get($user->getVar('uid')); + $profile = $profile_handler->getProfile($user->getVar('uid')); } // Get fields $fields = $profile_handler->loadFields(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -105,7 +105,7 @@ } else { // We already have a user? Just load it! Security is handled by token so there is no fake uid here. $newuser = $member_handler->getUser($uid); - $profile = $profile_handler->get($uid); + $profile = $profile_handler->getProfile($uid); } // Lets merge current $_POST with $_SESSION['profile_post'] so we can have access to info submited in previous steps Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2011-11-26 09:34:44 UTC (rev 8354) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2011-11-26 18:57:02 UTC (rev 8355) @@ -158,7 +158,7 @@ $categories[$i] = $cats[$i]; } -$profile = $profile_handler->get($thisUser->getVar('uid')); +$profile = $profile_handler->getProfile($thisUser->getVar('uid')); // Add dynamic fields foreach (array_keys($fields) as $i) { //If field is not visible, skip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-26 22:30:20
|
Revision: 8359 http://xoops.svn.sourceforge.net/xoops/?rev=8359&view=rev Author: trabis Date: 2011-11-26 22:30:11 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Adding some of 254 changes Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/advisory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/prefix_manager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin_menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/class/protector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/version.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -83,7 +83,12 @@ exit(); } -//Output now +// Output now +// seconds, minutes, hours, days +$expires = 60*60*24*15; +header("Pragma: public"); +header("Cache-Control: maxage=" . $expires); +header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); header('Content-type: ' . $types[$ext]); $handle = fopen($file, "rb"); while (!feof($handle)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -7,6 +7,6 @@ $mydirpath = dirname( dirname( __FILE__ ) ) ; require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname -require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin.php' ; +require XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/admin/index.php' ; ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -12,6 +12,9 @@ /** * XOOPS User * + * See the enclosed file license.txt for licensing information. + * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html + * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) * @package core @@ -21,6 +24,8 @@ */ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; +$xoopsPreload =& XoopsPreload::getInstance(); +$xoopsPreload->triggerEvent('core.user.start'); $xoops = Xoops::getInstance(); $xoops->preload->triggerEvent('core.user.start'); @@ -76,15 +81,15 @@ exit(); } } - header('Location: ' . XOOPS_URL . '/userinfo.php?uid=' . $xoops->user->getVar('uid')); + header('Location: ' . XOOPS_URL . '/userinfo.php?uid=' . $xoopsUser->getVar('uid')); exit(); } if ($op == 'logout') { $message = ''; - $_SESSION = array(); // Regenerate a new session id and destroy old session - session_regenerate_id(true); + $xoops->sess_handler->regenerate_id(true); + $SESSION = array(); setcookie($xoops->getConfig('usercookie'), 0, -1, '/', XOOPS_COOKIE_DOMAIN, 0); setcookie($xoops->getConfig('usercookie'), 0, -1, '/'); // clear entry from online users table Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/advisory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/advisory.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/advisory.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,6 +1,6 @@ <?php -$db = XoopsDatabaseFactory::getDatabaseConnection(); +$db =& XoopsDatabaseFactory::getDatabaseConnection(); // beggining of Output xoops_cp_header(); @@ -21,58 +21,59 @@ // the path of XOOPS_TRUST_PATH accessible check echo "<dl><dt>'XOOPS_TRUST_PATH' : " ; echo "<img src='".XOOPS_URL.'/'.htmlspecialchars($relative_path)."/modules/protector/public_check.png' width='40' height='20' alt='' style='border:1px solid black;' /><br /><a href='".XOOPS_URL.'/'.htmlspecialchars($relative_path)."/modules/protector/public_check.php'>"._AM_ADV_TRUSTPATHPUBLICLINK."</a></dt>\n" ; -echo "<dd>"._AM_ADV_TRUSTPATHPUBLIC."</dd></dl>" ; +echo "<dd>"._AM_ADV_TRUSTPATHPUBLIC."</b><br /><br /></dd></dl>" ; // register_globals echo "<dl><dt>'register_globals' : " ; $safe = ! ini_get( "register_globals" ) ; if( $safe ) { - echo "off <span style='color:green;font-weight:bold;'>ok</span></dt>\n" ; + echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n" ; } else { echo "on <span style='color:red;font-weight:bold;'>"._AM_ADV_NOTSECURE."</span></dt>\n" ; - echo "<dd>"._AM_ADV_REGISTERGLOBALS."<br /><br /> + echo "<dd><br /><br />"._AM_ADV_REGISTERGLOBALS."<br /><br /> ".XOOPS_ROOT_PATH."/.htaccess<br /><br /> - <b>php_flag register_globals off</b> + "._AM_ADV_REGISTERGLOBALS2."<br /><br /> + <b>php_flag register_globals off </dd>" ; } -echo "</dl>\n" ; +echo "</b><br /><br /></dl>\n" ; // allow_url_fopen echo "<dl><dt>'allow_url_fopen' : " ; $safe = ! ini_get( "allow_url_fopen" ) ; if( $safe ) { - echo "off <span style='color:green;font-weight:bold;'>ok</span></dt>\n" ; + echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n" ; } else { echo "on <span style='color:red;font-weight:bold;'>"._AM_ADV_NOTSECURE."</span></dt>\n" ; echo "<dd>"._AM_ADV_ALLOWURLFOPEN."</dd>" ; } -echo "</dl>\n" ; +echo "</b><br /><br /></dl>\n" ; // session.use_trans_sid echo "<dl><dt>'session.use_trans_sid' : " ; $safe = ! ini_get( "session.use_trans_sid" ) ; if( $safe ) { - echo "off <span style='color:green;font-weight:bold;'>ok</span></dt>\n" ; + echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n" ; } else { echo "on <span style='color:red;font-weight:bold;'>"._AM_ADV_NOTSECURE."</span></dt>\n" ; echo "<dd>"._AM_ADV_USETRANSSID."</dd>" ; } -echo "</dl>\n" ; +echo "</b><br /><br /></dl>\n" ; // XOOPS_DB_PREFIX echo "<dl><dt>'XOOPS_DB_PREFIX' : " ; $safe = strtolower( XOOPS_DB_PREFIX ) != 'xoops' ; if( $safe ) { - echo XOOPS_DB_PREFIX." <span style='color:green;font-weight:bold;'>ok</span></dt>\n<dd>" ; + echo XOOPS_DB_PREFIX." <span style='color:green;font-weight:bold;'>OK</span></dt>\n<dd>" ; } else { echo XOOPS_DB_PREFIX." <span style='color:red;font-weight:bold;'>"._AM_ADV_NOTSECURE."</span></dt>\n" ; echo "<dd>"._AM_ADV_DBPREFIX."<br />\n" ; } echo "<a href='index.php?page=prefix_manager'>"._AM_ADV_LINK_TO_PREFIXMAN."</a></dd>" ; -echo "</dl>\n" ; +echo "</b><br /><br /></dl>\n" ; // patch to mainfile.php @@ -84,17 +85,17 @@ echo "missing postcheck <span style='color:red;font-weight:bold;'>"._AM_ADV_NOTSECURE."</span></dt>\n" ; echo "<dd>"._AM_ADV_MAINUNPATCHED."</dd>" ; } else { - echo "patched <span style='color:green;font-weight:bold;'>ok</span></dt>\n" ; + echo "patched <span style='color:green;font-weight:bold;'>OK</span></dt>\n" ; } -echo "</dl>\n" ; +echo "</b><br /><br /></dl>\n" ; // patch to databasefactory.php echo "<dl><dt>'databasefactory.php' : " ; -$db = XoopsDatabaseFactory::getDatabaseConnection(); -if( strtolower( get_class( $db ) ) != 'protectormysqldatabase' ) { +$db =& XoopsDatabaseFactory::getDatabaseConnection(); +if(substr(@XOOPS_VERSION , 6 , 3) < 2.4 && strtolower( get_class( $db ) ) != 'protectormysqldatabase' ) { echo "<span style='color:red;font-weight:bold;'>"._AM_ADV_DBFACTORYUNPATCHED."</span></dt>\n" ; } else { - echo _AM_ADV_DBFACTORYPATCHED."<span style='color:green;font-weight:bold;'>ok</span></dt>\n" ; + echo _AM_ADV_DBFACTORYPATCHED."<span style='color:green;font-weight:bold;'> OK</span></dt>\n" ; } echo "</dl>\n" ; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/index.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/index.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,281 +1,40 @@ <?php +// $Id$ +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // -require_once XOOPS_ROOT_PATH.'/class/pagenav.php' ; -require_once dirname(dirname(__FILE__)).'/class/gtickets.php' ; -$myts = MyTextSanitizer::getInstance() ; -$db = XoopsDatabaseFactory::getDatabaseConnection(); - -// GET vars -$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ; -$num = empty( $_GET[ 'num' ] ) ? 20 : intval( $_GET[ 'num' ] ) ; - -// Table Name -$log_table = $db->prefix( $mydirname."_log" ) ; - -// Protector object -require_once dirname(dirname(__FILE__)).'/class/protector.php' ; -$db = XoopsDatabaseFactory::getDatabaseConnection(); -$protector = Protector::getInstance( $db->conn ) ; -$conf = $protector->getConf() ; - - -// -// transaction stage -// - -if( ! empty( $_POST['action'] ) ) { - - // Ticket check - if ( ! $xoopsGTicket->check( true , 'protector_admin' ) ) { - $xoops->redirect(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); - } - - if( $_POST['action'] == 'update_ips' ) { - $error_msg = '' ; - - $lines = empty( $_POST['bad_ips'] ) ? array() : explode( "\n" , trim( $_POST['bad_ips'] ) ) ; - $bad_ips = array() ; - foreach( $lines as $line ) { - @list( $bad_ip , $jailed_time ) = explode( ':' , $line , 2 ) ; - $bad_ips[ trim( $bad_ip ) ] = empty( $jailed_time ) ? 0x7fffffff : intval( $jailed_time ) ; - } - if( ! $protector->write_file_badips( $bad_ips ) ) { - $error_msg .= _AM_MSG_BADIPSCANTOPEN ; - } - - $group1_ips = empty( $_POST['group1_ips'] ) ? array() : explode( "\n" , trim( $_POST['group1_ips'] ) ) ; - foreach( array_keys( $group1_ips ) as $i ) { - $group1_ips[$i] = trim( $group1_ips[$i] ) ; - } - $fp = @fopen( $protector->get_filepath4group1ips() , 'w' ) ; - if( $fp ) { - @flock( $fp , LOCK_EX ) ; - fwrite( $fp , serialize( array_unique( $group1_ips ) ) . "\n" ) ; - @flock( $fp , LOCK_UN ) ; - fclose( $fp ) ; - } else { - $error_msg .= _AM_MSG_GROUP1IPSCANTOPEN ; - } - - $redirect_msg = $error_msg ? $error_msg : _AM_MSG_IPFILESUPDATED ; - $xoops->redirect( "index.php" , 2 , $redirect_msg ) ; - exit ; - - } else if( $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) { - // remove selected records - foreach( $_POST['ids'] as $lid ) { - $lid = intval( $lid ) ; - $db->query( "DELETE FROM $log_table WHERE lid='$lid'" ) ; - } - $xoops->redirect( "index.php" , 2 , _AM_MSG_REMOVED ) ; - exit ; - - } else if( $_POST['action'] == 'deleteall' ) { - // remove all records - $db->query( "DELETE FROM $log_table" ) ; - $xoops->redirect( "index.php" , 2 , _AM_MSG_REMOVED ) ; - exit ; - - } else if( $_POST['action'] == 'compactlog' ) { - // compactize records (removing duplicated records (ip,type) - $result = $db->query( "SELECT `lid`,`ip`,`type` FROM $log_table ORDER BY lid DESC" ) ; - $buf = array() ; - $ids = array() ; - while( list( $lid , $ip , $type ) = $db->fetchRow( $result ) ) { - if( isset( $buf[ $ip . $type ] ) ) { - $ids[] = $lid ; - } else { - $buf[ $ip . $type ] = true ; - } - } - $db->query( "DELETE FROM $log_table WHERE lid IN (".implode(',',$ids).")" ) ; - $xoops->redirect( "index.php" , 2 , _AM_MSG_REMOVED ) ; - exit ; - } -} - - -// -// display stage -// - -// query for listing -$rs = $db->query( "SELECT count(lid) FROM $log_table" ) ; -list( $numrows ) = $db->fetchRow( $rs ) ; -$prs = $db->query( "SELECT l.lid, l.uid, l.ip, l.agent, l.type, l.description, UNIX_TIMESTAMP(l.timestamp), u.uname FROM $log_table l LEFT JOIN ".$db->prefix("users")." u ON l.uid=u.uid ORDER BY timestamp DESC LIMIT $pos,$num" ) ; - -// Page Navigation -$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num" ) ; -$nav_html = $nav->renderNav( 10 ) ; - -// Number selection -$num_options = '' ; -$num_array = array( 20 , 100 , 500 , 2000 ) ; -foreach( $num_array as $n ) { - if( $n == $num ) { - $num_options .= "<option value='$n' selected='selected'>$n</option>\n" ; - } else { - $num_options .= "<option value='$n'>$n</option>\n" ; - } -} - -// beggining of Output +include_once 'admin_header.php'; xoops_cp_header(); -include dirname(__FILE__).'/mymenu.php' ; -// title -echo "<h3 style='text-align:left;'>".$xoopsModule->name()."</h3>\n" ; +$indexAdmin = new ModuleAdmin(); -// configs writable check -if( ! is_writable( dirname(dirname(__FILE__)).'/configs' ) ) { - printf( "<p style='color:red;font-weight:bold;'>"._AM_FMT_CONFIGSNOTWRITABLE."</p>\n" , dirname(dirname(__FILE__)).'/configs' ) ; -} +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); -// bad_ips -$bad_ips = $protector->get_bad_ips( true ) ; -uksort( $bad_ips , 'protector_ip_cmp' ) ; -$bad_ips4disp = '' ; -foreach( $bad_ips as $bad_ip => $jailed_time ) { - $line = $jailed_time ? $bad_ip . ':' . $jailed_time : $bad_ip ; - $line = str_replace( ':2147483647' , '' , $line ) ; // remove :0x7fffffff - $bad_ips4disp .= htmlspecialchars( $line , ENT_QUOTES ) . "\n" ; -} - -// group1_ips -$group1_ips = $protector->get_group1_ips() ; -usort( $group1_ips , 'protector_ip_cmp' ) ; -$group1_ips4disp = htmlspecialchars(implode("\n",$group1_ips),ENT_QUOTES) ; - -// edit configs about IP ban and IPs for group=1 -echo " -<form name='ConfigForm' action='' method='POST'> -".$xoopsGTicket->getTicketHtml(__LINE__,1800,'protector_admin')." -<input type='hidden' name='action' value='update_ips' /> -<table width='95%' class='outer' cellpadding='4' cellspacing='1'> - <tr valign='top' align='left'> - <td class='head'> - "._AM_TH_BADIPS." - </td> - <td class='even'> - <textarea name='bad_ips' id='bad_ips' style='width:200px;height:60px;'>$bad_ips4disp</textarea> - <br /> - ".htmlspecialchars($protector->get_filepath4badips())." - </td> - </tr> - <tr valign='top' align='left'> - <td class='head'> - "._AM_TH_GROUP1IPS." - </td> - <td class='even'> - <textarea name='group1_ips' id='group1_ips' style='width:200px;height:60px;'>$group1_ips4disp</textarea> - <br /> - ".htmlspecialchars($protector->get_filepath4group1ips())." - </td> - </tr> - <tr valign='top' align='left'> - <td class='head'> - </td> - <td class='even'> - <input type='submit' value='"._GO."' /> - </td> - </tr> -</table> -</form> -" ; - - -// header of log listing -echo " -<table width='95%' border='0' cellpadding='4' cellspacing='0'><tr><td> -<form action='' method='GET' style='margin-bottom:0px;'> - <table width='95%' border='0' cellpadding='4' cellspacing='0'> - <tr> - <td align='left'> - <select name='num' onchange='submit();'>$num_options</select> - <input type='submit' value='"._SUBMIT."'> - </td> - <td align='right'> - $nav_html - </td> - </tr> - </table> -</form> -<form name='MainForm' action='' method='POST' style='margin-top:0px;'> -".$xoopsGTicket->getTicketHtml(__LINE__,1800,'protector_admin')." -<input type='hidden' name='action' value='' /> -<table width='95%' class='outer' cellpadding='4' cellspacing='1'> - <tr valign='middle'> - <th width='5'><input type='checkbox' name='dummy' onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=this.checked;}}}\" /></th> - <th>"._AM_TH_DATETIME."</th> - <th>"._AM_TH_USER."</th> - <th>"._AM_TH_IP."<br />"._AM_TH_AGENT."</th> - <th>"._AM_TH_TYPE."</th> - <th>"._AM_TH_DESCRIPTION."</th> - </tr> -" ; - -// body of log listing -$oddeven = 'odd' ; -while( list( $lid , $uid , $ip , $agent , $type , $description , $timestamp , $uname ) = $db->fetchRow( $prs ) ) { - $oddeven = ( $oddeven == 'odd' ? 'even' : 'odd' ) ; - - $ip = htmlspecialchars( $ip , ENT_QUOTES ) ; - $type = htmlspecialchars( $type , ENT_QUOTES ) ; - $description = htmlspecialchars( $description , ENT_QUOTES ) ; - $uname = htmlspecialchars( ( $uid ? $uname : _GUESTS ) , ENT_QUOTES ) ; - - // make agents shorter - if( preg_match( '/MSIE\s+([0-9.]+)/' , $agent , $regs ) ) { - $agent_short = 'IE ' . $regs[1] ; - } else if( stristr( $agent , 'Gecko' ) !== false ) { - $agent_short = strrchr( $agent , ' ' ) ; - } else { - $agent_short = substr( $agent , 0 , strpos( $agent , ' ' ) ) ; - } - $agent4disp = htmlspecialchars( $agent , ENT_QUOTES ) ; - $agent_desc = $agent == $agent_short ? $agent4disp : htmlspecialchars( $agent_short , ENT_QUOTES ) . "<img src='../images/dotdotdot.gif' alt='$agent4disp' title='$agent4disp' />" ; - - echo " - <tr> - <td class='$oddeven'><input type='checkbox' name='ids[]' value='$lid' /></td> - <td class='$oddeven'>".XoopsLocal::formatTimestamp($timestamp)."</td> - <td class='$oddeven'>$uname</td> - <td class='$oddeven'>$ip<br />$agent_desc</td> - <td class='$oddeven'>$type</td> - <td class='$oddeven' width='100%'>$description</td> - </tr>\n" ; -} - -// footer of log listing -echo " - <tr> - <td colspan='8' align='left'>"._AM_LABEL_REMOVE."<input type='button' value='"._AM_BUTTON_REMOVE."' onclick='if(confirm(\""._AM_JS_REMOVECONFIRM."\")){document.MainForm.action.value=\"delete\"; submit();}' /></td> - </tr> -</table> -<div align='right'> - $nav_html -</div> -<div style='clear:both;'><br /><br /></div> -<div align='right'> -"._AM_LABEL_COMPACTLOG."<input type='button' value='"._AM_BUTTON_COMPACTLOG."' onclick='if(confirm(\""._AM_JS_COMPACTLOGCONFIRM."\")){document.MainForm.action.value=\"compactlog\"; submit();}' /> - -"._AM_LABEL_REMOVEALL."<input type='button' value='"._AM_BUTTON_REMOVEALL."' onclick='if(confirm(\""._AM_JS_REMOVEALLCONFIRM."\")){document.MainForm.action.value=\"deleteall\"; submit();}' /> -</div> -</form> -</td></tr></table> -" ; - -xoops_cp_footer(); - - -function protector_ip_cmp( $a , $b ) -{ - $as = explode( '.' , $a ) ; - $aval = @$as[0] * 167777216 + @$as[1] * 65536 + @$as[2] * 256 + @$as[3] ; - $bs = explode( '.' , $b ) ; - $bval = @$bs[0] * 167777216 + @$bs[1] * 65536 + @$bs[2] * 256 + @$bs[3] ; - - return $aval > $bval ? 1 : -1 ; -} - -?> +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/prefix_manager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/prefix_manager.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin/prefix_manager.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,7 +1,7 @@ <?php require_once dirname(dirname(__FILE__)).'/class/gtickets.php' ; -$db = XoopsDatabaseFactory::getDatabaseConnection(); +$db =& XoopsDatabaseFactory::getDatabaseConnection(); // COPY TABLES if( ! empty( $_POST['copy'] ) && ! empty( $_POST['old_prefix'] ) ) { @@ -10,7 +10,7 @@ // Ticket check if ( ! $xoopsGTicket->check( true , 'protector_admin' ) ) { - $xoops->redirect(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); } $new_prefix = empty( $_POST['new_prefix'] ) ? 'x' . substr( md5( time() ) , -5 ) : $_POST['new_prefix'] ; @@ -50,9 +50,9 @@ } - $_SESSION['protector_logger'] = $xoopsLogger->dumpQueries() ; + $_SESSION['protector_logger'] = $xoopsLogger->dump('queries') ; - $xoops->redirect( 'index.php?page=prefix_manager' , 1 , _AM_MSG_DBUPDATED ) ; + redirect_header( 'index.php?page=prefix_manager' , 1 , _AM_MSG_DBUPDATED ) ; exit ; // DUMP INTO A LOCAL FILE @@ -62,7 +62,7 @@ // Ticket check if ( ! $xoopsGTicket->check( true , 'protector_admin' ) ) { - $xoops->redirect(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); } $prefix = $_POST['prefix'] ; @@ -141,7 +141,7 @@ // Ticket check if ( ! $xoopsGTicket->check( true , 'protector_admin' ) ) { - $xoops->redirect(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); } $prefix = $_POST['prefix'] ; @@ -163,9 +163,9 @@ $drs = $db->queryF( "DROP TABLE `$table`" ) ; } - $_SESSION['protector_logger'] = $xoopsLogger->dumpQueries() ; + $_SESSION['protector_logger'] = $xoopsLogger->dump('queries') ; - $xoops->redirect( 'index.php?page=prefix_manager' , 1 , _AM_MSG_DBUPDATED ) ; + redirect_header( 'index.php?page=prefix_manager' , 1 , _AM_MSG_DBUPDATED ) ; exit ; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,92 +1,81 @@ <?php // start hack by Trabis -if (!class_exists('ProtectorRegistry')) { - exit('Registry not found'); -} +if (!class_exists('ProtectorRegistry')) exit('Registry not found'); -$xoops = Xoops::getInstance(); -$registry = ProtectorRegistry::getInstance(); -$mydirname = $registry->getEntry('mydirname'); -$mydirpath = $registry->getEntry('mydirpath'); -$language = $registry->getEntry('language'); +$registry =& ProtectorRegistry::getInstance(); +$mydirname = $registry->getEntry('mydirname'); +$mydirpath = $registry->getEntry('mydirpath'); +$language = $registry->getEntry('language'); // end hack by Trabis -$mytrustdirname = basename(dirname(__FILE__)); -$mytrustdirpath = dirname(__FILE__); +$mytrustdirname = basename( dirname( __FILE__ ) ) ; +$mytrustdirpath = dirname( __FILE__ ) ; // environment -$module_handler = xoops_gethandler('module'); -$xoopsModule = $module_handler->getByDirname($mydirname); -$config_handler = xoops_gethandler('config'); -$xoopsModuleConfig = $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid')); +require_once XOOPS_ROOT_PATH.'/class/template.php' ; +$module_handler =& xoops_gethandler( 'module' ) ; +$xoopsModule =& $module_handler->getByDirname( $mydirname ) ; +$config_handler =& xoops_gethandler( 'config' ) ; +$xoopsModuleConfig =& $config_handler->getConfigsByCat( 0 , $xoopsModule->getVar( 'mid' ) ) ; // check permission of 'module_admin' of this module -$moduleperm_handler = xoops_gethandler('groupperm'); -if (!is_object(@$xoopsUser) || !$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) { - die('only admin can access this area'); -} +$moduleperm_handler =& xoops_gethandler( 'groupperm' ) ; +if( ! is_object( @$xoopsUser ) || ! $moduleperm_handler->checkRight( 'module_admin' , $xoopsModule->getVar( 'mid' ) , $xoopsUser->getGroups() ) ) die( 'only admin can access this area' ) ; -$xoops->loadLanguage('admin'); -require XOOPS_ROOT_PATH . '/include/cp_functions.php'; +$xoopsOption['pagetype'] = 'admin' ; +require XOOPS_ROOT_PATH.'/include/cp_functions.php' ; // language files (admin.php) //$language = empty( $xoopsConfig['language'] ) ? 'english' : $xoopsConfig['language'] ; //hack by Trabis -if (file_exists("$mydirpath/language/$language/admin.php")) { - // user customized language file - include_once "$mydirpath/language/$language/admin.php"; +if( file_exists( "$mydirpath/language/$language/admin.php" ) ) { + // user customized language file + include_once "$mydirpath/language/$language/admin.php" ; +} else if( file_exists( "$mytrustdirpath/language/$language/admin.php" ) ) { + // default language file + include_once "$mytrustdirpath/language/$language/admin.php" ; } else { - if (file_exists("$mytrustdirpath/language/$language/admin.php")) { - // default language file - include_once "$mytrustdirpath/language/$language/admin.php"; - } else { - // fallback english - include_once "$mytrustdirpath/language/english/admin.php"; - } + // fallback english + include_once "$mytrustdirpath/language/english/admin.php" ; } // language files (main.php) //$language = empty( $xoopsConfig['language'] ) ? 'english' : $xoopsConfig['language'] ; //hack by Trabis -if (file_exists("$mydirpath/language/$language/main.php")) { - // user customized language file - include_once "$mydirpath/language/$language/main.php"; +if( file_exists( "$mydirpath/language/$language/main.php" ) ) { + // user customized language file + include_once "$mydirpath/language/$language/main.php" ; +} else if( file_exists( "$mytrustdirpath/language/$language/main.php" ) ) { + // default language file + include_once "$mytrustdirpath/language/$language/main.php" ; } else { - if (file_exists("$mytrustdirpath/language/$language/main.php")) { - // default language file - include_once "$mytrustdirpath/language/$language/main.php"; - } else { - // fallback english - include_once "$mytrustdirpath/language/english/main.php"; - } + // fallback english + include_once "$mytrustdirpath/language/english/main.php" ; } -if (!empty($_GET['lib'])) { - // common libs (eg. altsys) - $lib = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['lib']); - $page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); - if (file_exists(XOOPS_TRUST_PATH . '/libs/' . $lib . '/' . $page . '.php')) { - include XOOPS_TRUST_PATH . '/libs/' . $lib . '/' . $page . '.php'; - } else { - if (file_exists(XOOPS_TRUST_PATH . '/libs/' . $lib . '/index.php')) { - include XOOPS_TRUST_PATH . '/libs/' . $lib . '/index.php'; - } else { - die('wrong request'); - } - } +if( ! empty( $_GET['lib'] ) ) { + // common libs (eg. altsys) + $lib = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , $_GET['lib'] ) ; + $page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ; + + if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) { + include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ; + } else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) { + include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ; + } else { + die( 'wrong request' ) ; + } } else { - // fork each pages of this module - $page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); + // fork each pages of this module + $page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ; - if (file_exists("$mytrustdirpath/admin/$page.php")) { - include "$mytrustdirpath/admin/$page.php"; - } else { - if (file_exists("$mytrustdirpath/admin/index.php")) { - include "$mytrustdirpath/admin/index.php"; - } else { - die('wrong request'); - } - } + if( file_exists( "$mytrustdirpath/admin/$page.php" ) ) { + include "$mytrustdirpath/admin/$page.php" ; + } else if( file_exists( "$mytrustdirpath/admin/index.php" ) ) { + include "$mytrustdirpath/admin/index.php" ; + } else { + die( 'wrong request' ) ; + } } ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin_menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin_menu.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/admin_menu.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -2,37 +2,55 @@ // start hack by Trabis if (!class_exists('ProtectorRegistry')) exit('Registry not found'); -$registry = ProtectorRegistry::getInstance(); +$registry =& ProtectorRegistry::getInstance(); $mydirname = $registry->getEntry('mydirname'); $mydirpath = $registry->getEntry('mydirpath'); $language = $registry->getEntry('language'); // end hack by Trabis +$module_handler =& xoops_gethandler('module'); +$xoopsModule =& XoopsModule::getByDirname($mydirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathIcon32 = $moduleInfo->getInfo('icons32'); + $constpref = '_MI_' . strtoupper( $mydirname ) ; $adminmenu = array( array( - 'title' => constant( $constpref.'_ADMININDEX' ) , + 'title' => constant( $constpref.'_ADMINHOME' ) , 'link' => 'admin/index.php' , + 'icon' => '../../'.$pathIcon32.'/home.png', ) , array( + 'title' => constant( $constpref.'_ADMININDEX' ) , + 'link' => 'admin/center.php?page=center' , + 'icon' => '../../'.$pathIcon32.'/firewall.png', + ) , + array( 'title' => constant( $constpref.'_ADVISORY' ) , - 'link' => 'admin/index.php?page=advisory' , + 'link' => 'admin/center.php?page=advisory' , + 'icon' => '../../'.$pathIcon32.'/security.png', ) , array( 'title' => constant( $constpref.'_PREFIXMANAGER' ) , - 'link' => 'admin/index.php?page=prefix_manager' , + 'link' => 'admin/center.php?page=prefix_manager' , + 'icon' => '../../'.$pathIcon32.'/manage.png', ) , + array( + 'title' => constant( $constpref.'_ADMINABOUT' ) , + 'link' => 'admin/about.php' , + 'icon' => '../../'.$pathIcon32.'/about.png', + ) , ) ; $adminmenu4altsys = array( array( 'title' => constant( $constpref.'_ADMENU_MYBLOCKSADMIN' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' , + 'link' => 'admin/main.php?mode=admin&lib=altsys&page=myblocksadmin' , ) , array( 'title' => _PREFERENCES , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' , + 'link' => 'admin/main.php?mode=admin&lib=altsys&page=mypreferences' , ) , ) ; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/class/protector.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/class/protector.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/class/protector.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -113,7 +113,7 @@ } -function getInstance() +function &getInstance() { static $instance ; if( ! isset( $instance ) ) { @@ -618,12 +618,12 @@ } -function get_ref_from_base64index( &$current , $indexes ) +function &get_ref_from_base64index( &$current , $indexes ) { foreach( $indexes as $index ) { $index = base64_decode( $index ) ; if( ! is_array( $current ) ) return false ; - $current = $current[ $index ] ; + $current =& $current[ $index ] ; } return $current ; } @@ -639,22 +639,22 @@ switch( $base_array ) { case 'G' : - $main_ref = $this->get_ref_from_base64index( $_GET , $indexes ) ; - $legacy_ref = $this->get_ref_from_base64index( $HTTP_GET_VARS , $indexes ) ; + $main_ref =& $this->get_ref_from_base64index( $_GET , $indexes ) ; + $legacy_ref =& $this->get_ref_from_base64index( $HTTP_GET_VARS , $indexes ) ; break ; case 'P' : - $main_ref = $this->get_ref_from_base64index( $_POST , $indexes ) ; - $legacy_ref = $this->get_ref_from_base64index( $HTTP_POST_VARS , $indexes ) ; + $main_ref =& $this->get_ref_from_base64index( $_POST , $indexes ) ; + $legacy_ref =& $this->get_ref_from_base64index( $HTTP_POST_VARS , $indexes ) ; break ; case 'C' : - $main_ref = $this->get_ref_from_base64index( $_COOKIE , $indexes ) ; - $legacy_ref = $this->get_ref_from_base64index( $HTTP_COOKIE_VARS , $indexes ) ; + $main_ref =& $this->get_ref_from_base64index( $_COOKIE , $indexes ) ; + $legacy_ref =& $this->get_ref_from_base64index( $HTTP_COOKIE_VARS , $indexes ) ; break ; default : exit ; } if( ! isset( $main_ref ) ) exit ; - $request_ref = $this->get_ref_from_base64index( $_REQUEST , $indexes ) ; + $request_ref =& $this->get_ref_from_base64index( $_REQUEST , $indexes ) ; if( $request_ref !== false && $main_ref == $request_ref ) { $request_ref = $val ; } @@ -850,7 +850,7 @@ // gargage collection $result = $xoopsDB->queryF( "DELETE FROM ".$xoopsDB->prefix($this->mydirname."_access")." WHERE expire < UNIX_TIMESTAMP()" ) ; - // for older versions before updating this module + // for older versions before updating this module if( $result === false ) { $this->_done_dos = true ; return true ; @@ -959,7 +959,7 @@ } -// +// function check_brute_force() { global $xoopsDB ; @@ -1077,20 +1077,20 @@ $this->output_log( 'misc debug' ) ; exit ; } - + // zx 2004/12/13 misc.php smilies if( substr( @$_SERVER['SCRIPT_NAME'] , -8 ) == 'misc.php' && ( $_GET['type'] == 'smilies' || $_POST['type'] == 'smilies' ) && ! preg_match( '/^[0-9a-z_]*$/i' , $_GET['target'] ) ) { $this->output_log( 'misc smilies' ) ; exit ; } - + // zx 2005/1/5 edituser.php avatarchoose if( substr( @$_SERVER['SCRIPT_NAME'] , -12 ) == 'edituser.php' && $_POST['op'] == 'avatarchoose' && strstr( $_POST['user_avatar'] , '..' ) ) { $this->output_log( 'edituser avatarchoose' ) ; exit ; } } - + // zx 2005/1/4 findusers if( substr( @$_SERVER['SCRIPT_NAME'] , -24 ) == 'modules/system/admin.php' && ( $_GET['fct'] == 'findusers' || $_POST['fct'] == 'findusers' ) ) { foreach( $_POST as $key => $val ) { @@ -1100,8 +1100,8 @@ } } } - - // preview CSRF zx 2004/12/14 + + // preview CSRF zx 2004/12/14 // news submit.php if( substr( @$_SERVER['SCRIPT_NAME'] , -23 ) == 'modules/news/submit.php' && isset( $_POST['preview'] ) && strpos( @$_SERVER['HTTP_REFERER'] , XOOPS_URL.'/modules/news/submit.php' ) !== 0 ) { $HTTP_POST_VARS['nohtml'] = $_POST['nohtml'] = 1 ; @@ -1136,7 +1136,7 @@ function call_filter( $type , $dying_message = '' ) { require_once dirname(__FILE__).'/ProtectorFilter.php' ; - $filter_handler = ProtectorFilterHandler::getInstance() ; + $filter_handler =& ProtectorFilterHandler::getInstance() ; $ret = $filter_handler->execute( $type ) ; if( $ret == false && $dying_message ) { die( $dying_message ) ; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck_functions.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck_functions.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -4,12 +4,10 @@ { global $xoopsUser , $xoopsModule ; - // patch for 2.2.x from xoops.org (I know this is not so beautiful...) if( substr( @XOOPS_VERSION , 6 , 3 ) > 2.0 && stristr( @$_SERVER['REQUEST_URI'] , 'modules/system/admin.php?fct=preferences' ) ) { - /* @var $module_handler XoopsModuleHandler */ - $module_handler = xoops_gethandler( 'module' ) ; - $module = $module_handler->getById( intval( @$_GET['mod'] ) ) ; + $module_handler =& xoops_gethandler( 'module' ) ; + $module =& $module_handler->get( intval( @$_GET['mod'] ) ) ; if( is_object( $module ) ) { $module->getInfo() ; } @@ -22,8 +20,8 @@ // Protector object require_once dirname(dirname(__FILE__)).'/class/protector.php' ; - $db = XoopsDatabaseFactory::getDatabaseConnection(); - $protector = Protector::getInstance() ; + $db =& XoopsDatabaseFactory::getDatabaseConnection(); + $protector =& Protector::getInstance() ; $protector->setConn( $db->conn ) ; $protector->updateConfFromDb() ; $conf = $protector->getConf() ; @@ -32,8 +30,8 @@ // phpmailer vulnerability // http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/ if( in_array( substr( XOOPS_VERSION , 0 , 12 ) , array( 'XOOPS 2.0.16' , 'XOOPS 2.0.13' , 'XOOPS 2.2.4' ) ) ) { - $config_handler = xoops_gethandler('config'); - $xoopsMailerConfig = $config_handler->getConfigsByCat(XOOPS_CONF_MAILER); + $config_handler =& xoops_gethandler('config'); + $xoopsMailerConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_MAILER); if( $xoopsMailerConfig['mailmethod'] == 'sendmail' && md5_file( XOOPS_ROOT_PATH.'/class/mail/phpmailer/class.phpmailer.php' ) == 'ee1c09a8e579631f0511972f929fe36a' ) { echo '<strong>phpmailer security hole! Change the preferences of mail from "sendmail" to another, or upgrade the core right now! (message by protector)</strong>' ; } @@ -50,6 +48,7 @@ if( empty( $group1_allow ) ) die( 'This account is disabled for your IP by Protector.<br />Clear cookie if you want to access this site as a guest.' ) ; } } + // reliable ips $reliable_ips = @unserialize( @$conf['reliable_ips'] ) ; if( is_array( $reliable_ips ) ) foreach( $reliable_ips as $reliable_ip ) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/version.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/version.txt 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/version.txt 2011-11-26 22:30:11 UTC (rev 8359) @@ -1 +1 @@ -3.5 \ No newline at end of file +3.51 \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/admin.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/admin.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -43,12 +43,12 @@ // advisory.php define("_AM_ADV_NOTSECURE","Not secure"); -define("_AM_ADV_TRUSTPATHPUBLIC","If you can look an image -NG- or the link returns normal page, your XOOPS_TRUST_PATH is not placed properly. The best place for XOOPS_TRUST_PATH is outside of DocumentRoot. If you cannot do that, you have to put .htaccess (DENY FROM ALL) just under XOOPS_TRUST_PATH as the second best way."); -define("_AM_ADV_TRUSTPATHPUBLICLINK","Check php files inside TRUST_PATH are private (it must be 404,403 or 500 error"); -define("_AM_ADV_REGISTERGLOBALS","This setting invites a variety of injecting attacks.<br />If you can put .htaccess, edit or create..."); -define("_AM_ADV_ALLOWURLFOPEN","This setting allows attackers to execute arbitrary scripts on remote servers.<br />Only administrator can change this option.<br />If you are an admin, edit php.ini or httpd.conf.<br /><b>Sample of httpd.conf:<br /> php_admin_flag allow_url_fopen off</b><br />Else, claim it to your administrators."); -define("_AM_ADV_USETRANSSID","Your Session ID will be diplayed in anchor tags etc.<br />For preventing from session hi-jacking, add a line into .htaccess in XOOPS_ROOT_PATH.<br /><b>php_flag session.use_trans_sid off</b>"); -define("_AM_ADV_DBPREFIX","This setting invites 'SQL Injections'.<br />Don't forget turning 'Force sanitizing *' on in this module's preferences."); +define("_AM_ADV_TRUSTPATHPUBLIC","If you can see an image -NG- or the link returns normal page, your XOOPS_TRUST_PATH is not placed properly. The best place for XOOPS_TRUST_PATH is outside of DocumentRoot. If you cannot do that, you have to put .htaccess (DENY FROM ALL) just under XOOPS_TRUST_PATH as the second best way."); +define("_AM_ADV_TRUSTPATHPUBLICLINK","Check that PHP files inside TRUST_PATH are set to read-only (it must be 404,403 or 500 error)"); +define("_AM_ADV_REGISTERGLOBALS","If 'ON', this setting invites a variety of injecting attacks. If you can, set 'register_globals off' in php.ini, or if not possible, create or edit .htaccess in your XOOPS directory:"); +define("_AM_ADV_ALLOWURLFOPEN","If 'ON', this setting allows attackers to execute arbitrary scripts on remote servers.<br />Only administrator can change this option.<br />If you are an admin, edit php.ini or httpd.conf.<br /><b>Sample of httpd.conf:<br /> php_admin_flag allow_url_fopen off</b><br />Else, claim it to your administrators."); +define("_AM_ADV_USETRANSSID","If 'ON', your Session ID will be displayed in anchor tags etc.<br />To prevent session hi-jacking, add a line into .htaccess in XOOPS_ROOT_PATH.<br /><b>php_flag session.use_trans_sid off</b>"); +define("_AM_ADV_DBPREFIX","This setting invites 'SQL Injections'.<br />Don't forget turning 'Force sanitizing *' ON in this module's preferences."); define("_AM_ADV_LINK_TO_PREFIXMAN","Go to prefix manager"); define("_AM_ADV_MAINUNPATCHED","You should edit your mainfile.php like written in README."); define("_AM_ADV_DBFACTORYPATCHED","Your databasefactory is ready for DBLayer Trapping anti-SQL-Injection"); @@ -58,6 +58,7 @@ define("_AM_ADV_CHECKCONTAMI","Contaminations"); define("_AM_ADV_CHECKISOCOM","Isolated Comments"); +//XOOPS 2.5.4 +define("_AM_ADV_REGISTERGLOBALS2","and place in it the line below:"); - ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/modinfo.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/language/english/modinfo.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -114,10 +114,11 @@ define($constpref.'_SPAMURI4G','anti-SPAM: URLs for guests'); define($constpref.'_SPAMURI4GDSC','If this number of URLs are found in POST data from guests, the POST is considered as SPAM. 0 means disabling this feature.'); +//3.40b +define($constpref."_ADMINHOME","Home"); +define($constpref."_ADMINABOUT","About"); +//3.50 define($constpref.'_STOPFORUMSPAM_ACTION','Stop Forum Spam'); define($constpref.'_STOPFORUMSPAM_ACTIONDSC','Checks POST data against spammers registered on www.stopforumspam.com database. Requires php CURL lib.'); - } - -?> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/notification.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/notification.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/notification.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -2,7 +2,7 @@ // start hack by Trabis if (!class_exists('ProtectorRegistry')) exit('Registry not found'); -$registry = ProtectorRegistry::getInstance(); +$registry =& ProtectorRegistry::getInstance(); $mydirname = $registry->getEntry('mydirname'); $mydirpath = $registry->getEntry('mydirpath'); $language = $registry->getEntry('language'); @@ -21,10 +21,10 @@ { include_once dirname(__FILE__).'/include/common_functions.php' ; - $db = XoopsDatabaseFactory::getDatabaseConnection(); + $db =& XoopsDatabaseFactory::getDatabaseConnection(); - $module_handler = xoops_gethandler( 'module' ) ; - $module = $module_handler->getByDirname( $mydirname ) ; + $module_handler =& xoops_gethandler( 'module' ) ; + $module =& $module_handler->getByDirname( $mydirname ) ; if( $category == 'global' ) { $item['name'] = ''; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,131 +1,128 @@ <?php // start hack by Trabis -if (!class_exists('ProtectorRegistry')) { - exit('Registry not found'); -} +if (!class_exists('ProtectorRegistry')) exit('Registry not found'); -$registry = ProtectorRegistry::getInstance(); -$mydirname = $registry->getEntry('mydirname'); -$mydirpath = $registry->getEntry('mydirpath'); -$language = $registry->getEntry('language'); +$registry =& ProtectorRegistry::getInstance(); +$mydirname = $registry->getEntry('mydirname'); +$mydirpath = $registry->getEntry('mydirpath'); +$language = $registry->getEntry('language'); // end hack by Trabis -eval(' function xoops_module_install_' . $mydirname . '( $module ) { return protector_oninstall_base( $module , "' . $mydirname . '" ) ; } '); +eval( ' function xoops_module_install_'.$mydirname.'( $module ) { return protector_oninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ; -if (!function_exists('protector_oninstall_base')) { +if( ! function_exists( 'protector_oninstall_base' ) ) { - function protector_oninstall_base($module, $mydirname) - { - // transations on module install +function protector_oninstall_base( $module , $mydirname ) +{ + // transations on module install - global $ret; // TODO :-D - $xoops = Xoops::getInstance(); + global $ret ; // TODO :-D - // for Cube 2.1 - if (defined('XOOPS_CUBE_LEGACY')) { - $root = XCube_Root::getSingleton(); - $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success', 'protector_message_append_oninstall'); - $ret = array(); - } else { - if (!is_array($ret)) { - $ret = array(); - } - } + // for Cube 2.1 + if( defined( 'XOOPS_CUBE_LEGACY' ) ) { + $root =& XCube_Root::getSingleton(); + $root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success' , 'protector_message_append_oninstall' ) ; + $ret = array() ; + } else { + if( ! is_array( $ret ) ) $ret = array() ; + } - $db = XoopsDatabaseFactory::getDatabaseConnection(); - $mid = $module->getVar('mid'); + $db =& XoopsDatabaseFactory::getDatabaseConnection(); + $mid = $module->getVar('mid') ; - // TABLES (loading mysql.sql) - $sql_file_path = dirname(__FILE__) . '/sql/mysql.sql'; - $prefix_mod = $db->prefix() . '_' . $mydirname; - if (file_exists($sql_file_path)) { - $ret[] = "SQL file found at <b>" . htmlspecialchars($sql_file_path) . "</b>.<br /> Creating tables..."; + // TABLES (loading mysql.sql) + $sql_file_path = dirname(__FILE__).'/sql/mysql.sql' ; + $prefix_mod = $db->prefix() . '_' . $mydirname ; + if( file_exists( $sql_file_path ) ) { + $ret[] = "SQL file found at <b>".htmlspecialchars($sql_file_path)."</b>.<br /> Creating tables..."; - if (file_exists(XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php')) { - include_once XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php'; - $sqlutil = new OldSqlUtility; //old code is -> $sqlutil = new OldSqlUtility ; //hack by Trabis - } else { - include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php'; - $sqlutil = new SqlUtility; //old code is -> $sqlutil = new SqlUtility ; //hack by Trabis - } + if( file_exists( XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ) ) { + include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php' ; + $sqlutil = new OldSqlUtility ; //old code is -> $sqlutil =& new OldSqlUtility ; //hack by Trabis + } else { + include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php' ; + $sqlutil = new SqlUtility ; //old code is -> $sqlutil =& new SqlUtility ; //hack by Trabis + } - $sql_query = trim(file_get_contents($sql_file_path)); - $sqlutil->splitMySqlFile($pieces, $sql_query); - $created_tables = array(); - foreach ($pieces as $piece) { - $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod); - if (!$prefixed_query) { - $ret[] = "Invalid SQL <b>" . htmlspecialchars($piece) . "</b><br />"; - return false; - } - if (!$db->query($prefixed_query[0])) { - $ret[] = '<b>' . htmlspecialchars($db->error()) . '</b><br />'; - //var_dump( $db->error() ) ; - return false; - } else { - if (!in_array($prefixed_query[4], $created_tables)) { - $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4]) . '</b> created.<br />'; - $created_tables[] = $prefixed_query[4]; - } else { - $ret[] = 'Data inserted to table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4]) . '</b>.</br />'; - } - } - } - } + $sql_query = trim( file_get_contents( $sql_file_path ) ) ; + $sqlutil->splitMySqlFile( $pieces , $sql_query ) ; + $created_tables = array() ; + foreach( $pieces as $piece ) { + $prefixed_query = $sqlutil->prefixQuery( $piece , $prefix_mod ) ; + if( ! $prefixed_query ) { + $ret[] = "Invalid SQL <b>".htmlspecialchars($piece)."</b><br />"; + return false ; + } + if( ! $db->query( $prefixed_query[0] ) ) { + $ret[] = '<b>'.htmlspecialchars( $db->error() ).'</b><br />' ; + //var_dump( $db->error() ) ; + return false ; + } else { + if( ! in_array( $prefixed_query[4] , $created_tables ) ) { + $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4]).'</b> created.<br />'; + $created_tables[] = $prefixed_query[4]; + } else { + $ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4]).'</b>.</br />'; + } + } + } + } - // TEMPLATES - $tplfile_handler = $xoops->getHandlerTplfile(); - $tpl_path = dirname(__FILE__) . '/templates'; - if ($handler = @opendir($tpl_path . '/')) { - while (($file = readdir($handler)) !== false) { - if (substr($file, 0, 1) == '.') { - continue; - } - $file_path = $tpl_path . '/' . $file; - if (is_file($file_path) && in_array(strrchr($file, '.'), array('.html', '.css', '.js'))) { - $mtime = intval(@filemtime($file_path)); - $tplfile = $tplfile_handler->create(); - $tplfile->setVar('tpl_source', file_get_contents($file_path), true); - $tplfile->setVar('tpl_refid', $mid); - $tplfile->setVar('tpl_tplset', 'default'); - $tplfile->setVar('tpl_file', $mydirname . '_' . $file); - $tplfile->setVar('tpl_desc', '', true); - $tplfile->setVar('tpl_module', $mydirname); - $tplfile->setVar('tpl_lastmodified', $mtime); - $tplfile->setVar('tpl_lastimported', 0); - $tplfile->setVar('tpl_type', 'module'); - if (!$tplfile_handler->insertTpl($tplfile)) { - $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b> to the database.</span><br />'; - } else { - $tplid = $tplfile->getVar('tpl_id'); - $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br />'; - // generate compiled file - if (!$xoops->templateTouch($tplid)) { - $ret[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b>.</span><br />'; - } else { - $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b> compiled.</span><br />'; - } - } - } - } - closedir($handler); - } - $xoops->templateClearModuleCache($mid); + // TEMPLATES + $tplfile_handler =& xoops_gethandler( 'tplfile' ) ; + $tpl_path = dirname(__FILE__).'/templates' ; + if( $handler = @opendir( $tpl_path . '/' ) ) { + while( ( $file = readdir( $handler ) ) !== false ) { + if( substr( $file , 0 , 1 ) == '.' ) continue ; + $file_path = $tpl_path . '/' . $file ; + if( is_file( $file_path ) && in_array( strrchr( $file , '.' ) , array( '.html' , '.css' , '.js' ) ) ) { + $mtime = intval( @filemtime( $file_path ) ) ; + $tplfile =& $tplfile_handler->create() ; + $tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ; + $tplfile->setVar( 'tpl_refid' , $mid ) ; + $tplfile->setVar( 'tpl_tplset' , 'default' ) ; + $tplfile->setVar( 'tpl_file' , $mydirname . '_' . $file ) ; + $tplfile->setVar( 'tpl_desc' , '' , true ) ; + $tplfile->setVar( 'tpl_module' , $mydirname ) ; + $tplfile->setVar( 'tpl_lastmodified' , $mtime ) ; + $tplfile->setVar( 'tpl_lastimported' , 0 ) ; + $tplfile->setVar( 'tpl_type' , 'module' ) ; + if( ! $tplfile_handler->insert( $tplfile ) ) { + $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> to the database.</span><br />'; + } else { + $tplid = $tplfile->getVar( 'tpl_id' ) ; + $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />'; + // generate compiled file + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; + include_once XOOPS_ROOT_PATH.'/class/template.php' ; + if( ! xoops_template_touch( $tplid ) ) { + $ret[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b>.</span><br />'; + } else { + $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file).'</b> compiled.</span><br />'; + } + } + } + } + closedir( $handler ) ; + } + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; + include_once XOOPS_ROOT_PATH.'/class/template.php' ; + xoops_template_clear_module_cache( $mid ) ; - return true; - } + return true ; +} - function protector_message_append_oninstall(&$module_obj, &$log) - { - if (is_array(@$GLOBALS['ret'])) { - foreach ($GLOBALS['ret'] as $message) { - $log->add(strip_tags($message)); - } - } +function protector_message_append_oninstall( &$module_obj , &$log ) +{ + if( is_array( @$GLOBALS['ret'] ) ) { + foreach( $GLOBALS['ret'] as $message ) { + $log->add( strip_tags( $message ) ) ; + } + } - // use mLog->addWarning() or mLog->addError() if necessary - } + // use mLog->addWarning() or mLog->addError() if necessary +} } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php 2011-11-26 22:09:58 UTC (rev 8358) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php 2011-11-26 22:30:11 UTC (rev 8359) @@ -1,88 +1,84 @@ <?php // start hack by Trabis -if (!class_exists('ProtectorRegistry')) { - exit('Registry not found'); -} +if (!class_exists('ProtectorRegistry')) exit('Registry not found'); -$registry = ProtectorRegistry::getInstance(); -$mydirname = $registry->getEntry('mydirname'); -$mydirpath = $registry->getEntry('mydirpath'); -$language = $registry->getEntry('language'); +$registry =& ProtectorRegistry::getInstance(); +$mydirname = $registry->getEntry('mydirname'); +$mydirpath = $registry->getEntry('mydirpath'); +$language = $registry->getEntry('language'); // end hack by Trabis -eval(' function xoops_module_uninstall_' . $mydirname . '( $module ) { return protector_onuninstall_base( $module , "' . $mydirname . '" ) ; } '); +eval( ' function xoops_module_uninstall_'.$mydirname.'( $module ) { return protector_onuninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ; -if (!function_exists('protector_onuninstall_base')) { +if( ! function_exists( 'protector_onuninstall_base' ) ) { - function protector_onuninstall_base($module, $mydirname) - { - // transations on module uninstall +function protector_onuninstall_base( $module , $mydirname ) +{ + // transations on module uninstall - global $ret; // TODO :-D + global $ret ; // TODO :-D - // for Cube 2.1 - if (defined('XOOPS_CUBE_LEGACY')) { - $root = XCube_Root::getSingleton(); - $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success', 'protector_message_append_onuninstall'); - $ret = array(); - } else { - if (!is_array($ret)) { - $ret = array(); - } - } + // for Cube 2.1 + if( defined( 'XOOPS_CUBE_LEGACY' ) ) { + $root =& XCube_Root::getSingleton(); + $root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '... [truncated message content] |
From: <tr...@us...> - 2011-11-27 00:22:44
|
Revision: 8361 http://xoops.svn.sourceforge.net/xoops/?rev=8361&view=rev Author: trabis Date: 2011-11-27 00:22:33 +0000 (Sun, 27 Nov 2011) Log Message: ----------- Merging some more 2.5.4 changes Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.cache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/ChangeLog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/README XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.phpmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.pop3.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.smtp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-ar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-br.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-ca.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-cz.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-de.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-dk.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-es.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-et.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-fi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-fo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-fr.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-hu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-it.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-ja.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-nl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-no.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-pl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-ro.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-ru.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-se.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/language/phpmailer.lang-tr.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/calendar.js XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/session.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/calendar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/comment.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/countries.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/findusers.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/formdhtmltextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/activated.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/adminactivate.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/lostpass1.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/lostpass2.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/register.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/mail_template/welcome.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/pmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/uploader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/user.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.cache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.cache.php 2011-11-26 23:47:20 UTC (rev 8360) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.cache.php 2011-11-27 00:22:33 UTC (rev 8361) @@ -145,14 +145,15 @@ $pattern = ($dirname) ? "{$dirname}_{$name}.*\.php" : "[^_]+_{$name}.*\.php"; if ($handle = opendir($root_path)) { while (false !== ($file = readdir($handle))) { - if (is_file($root_path . '/' . $file) && preg_match("/^{$pattern}$/", $file)) { + if (is_file($root_path . '/' . $file) && preg_match("/{$pattern}$/", $file)) { @unlink($root_path . '/' . $file); } } closedir($handle); } } else { - foreach (glob($root_path . "/{$dirname}_{$name}*.php") as $file) { + $files = (array)glob($root_path . "/*{$dirname}_{$name}*.php"); + foreach ($files as $file) { @unlink($file); } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-11-26 23:47:20 UTC (rev 8360) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-11-27 00:22:33 UTC (rev 8361) @@ -285,7 +285,7 @@ */ static function delete($key, $config = null) { - $key .= '_' . urlencode(XOOPS_URL); + $key .= substr(md5(XOOPS_URL), 0, 8) . '_' . urlencode(XOOPS_URL); $_this = XoopsCache::getInstance(); $config = $_this->config($config); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/ChangeLog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/ChangeLog.txt 2011-11-26 23:47:20 UTC (rev 8360) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/ChangeLog.txt 2011-11-27 00:22:33 UTC (rev 8361) @@ -1,12 +1,168 @@ ChangeLog -Version 2.0.0 (Sun, Dec 02 2007) +NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5/PHP6. + IT WILL NOT WORK WITH PHP4. + +Version 5.1 (October 20, 2009) +* fixed filename issue with AddStringAttachment (thanks to Tony) +* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in + addition to PHP mail() +* added DKIM digital signing functionality + New properties: + - DKIM_domain (sets the domain name) + - DKIM_private (holds DKIM private key) + - DKIM_passphrase (holds your DKIM passphrase) + - DKIM_selector (holds the DKIM "selector") + - DKIM_identity (holds the identifying email address) +* added callback function support + - callback function parameters include: + result, to, cc, bcc, subject and body + * see the test/test_callback.php file for usage. +* added "auto" identity functionality + - can automatically add: + - Return-path (if Sender not set) + - Reply-To (if ReplyTo not set) + - can be disabled: + - $mail->SetFrom('you...@yo...','First Last',false); + - or by adding the $mail->Sender and/or $mail->ReplyTo properties + Note: "auto" identity added to help with emails ending up in spam + or junk boxes because of missing headers + +Version 5.0.2 (May 24, 2009) +* Fix for missing attachments when inline graphics are present +* Fix for missing Cc in header when using SMTP (mail was sent, + but not displayed in header -- Cc receiver only saw email To: + line and no Cc line, but did get the email (To receiver + saw same) + +Version 5.0.1 (April 05, 2009) +* Temporary fix for missing attachments + +Version 5.0.0 (April 02, 2009) + +* With the release of this version, we are initiating a new version numbering + system to differentiate from the PHP4 version of PHPMailer. +* Most notable in this release is fully object oriented code. +class.smtp.php: +* Refactored class.smtp.php to support new exception handling + code size reduced from 29.2 Kb to 25.6 Kb +* Removed unnecessary functions from class.smtp.php: + public function Expand($name) { + public function Help($keyword="") { + public function Noop() { + public function Send($from) { + public function SendOrMail($from) { + public function Verify($name) { +class.phpmailer.php: +* Refactored class.phpmailer.php with new exception handling +* Changed processing functionality of Sendmail and Qmail so they cannot be + inadvertently used +* removed getFile() function, just became a simple wrapper for + file_get_contents() +* added check for PHP version (will gracefully exit if not at least PHP 5.0) +class.phpmailer.php enhancements +* enhanced code to check if an attachment source is the same as an embedded or + inline graphic source to eliminate duplicate attachments +New /test_script +* We have written a test script you can use to test the script as part of your + installation. Once you press submit, the test script will send a multi-mime + email with either the message you type in or an HTML email with an inline + graphic. Two attachments are included in the email (one of the attachments + is also the inline graphic so you can see that only one copy of the graphic + is sent in the email). The test script will also display the functional + script that you can copy/paste to your editor to duplicate the functionality. +New examples +* All new examples in both basic and advanced modes. Advanced examples show + Exception handling. +PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0 +* all new documentation + +Please note: the website has been updated to reflect the changes in PHPMailer +version 5.0.0. http://phpmailer.codeworxtech.com/ + +Version 2.3 (November 06, 2008) + +* added Arabic language (many thanks to Bahjat Al Mostafa) +* removed English language from language files and made it a default within + class.phpmailer.php - if no language is found, it will default to use + the english language translation +* fixed public/private declarations +* corrected line 1728, $basedir to $directory +* added $sign_cert_file to avoid improper duplicate use of $sign_key_file +* corrected $this->Hello on line 612 to $this->Helo +* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user + if default is not acceptable +* removed trim() from return results in EncodeQP +* /test and three files it contained are removed from version 2.3 +* fixed phpunit.php for compliance with PHP5 +* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); +* We have removed the /phpdoc from the downloads. All documentation is now on + the http://phpmailer.codeworxtech.com website. + +Version 2.2.1 () July 19 2008 + +* fixed line 1092 in class.smtp.php (my apologies, error on my part) + +Version 2.2 () July 15 2008 + +* Fixed redirect issue (display of UTF-8 in thank you redirect) +* fixed error in getResponse function declaration (class.pop3.php) +* PHPMailer now PHP6 compliant +* fixed line 1092 in class.smtp.php (endless loop from missing = sign) + +Version 2.1 (Wed, June 04 2008) + +** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. + IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE + APPRECIATED. + +* added S/MIME functionality (ability to digitally sign emails) + BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. + The "Signed Emails" functionality adds the Sign method to pass the private key + filename and the password to read it, and then email will be sent with + content-type multipart/signed and with the digital signature attached. +* fully compatible with E_STRICT error level + - Please note: + In about half the test environments this development version was subjected + to, an error was thrown for the date() functions used (line 1565 and 1569). + This is NOT a PHPMailer error, it is the result of an incorrectly configured + PHP5 installation. The fix is to modify your 'php.ini' file and include the + date.timezone = America/New York + directive, to your own server timezone + - If you do get this error, and are unable to access your php.ini file: + In your PHP script, add + date_default_timezone_set('America/Toronto'); + - do not try to use + $myVar = date_default_timezone_get(); + as a test, it will throw an error. +* added ability to define path (mainly for embedded images) + function MsgHTML($message,$basedir='') ... where: + $basedir is the fully qualified path +* fixed MsgHTML() function: + - Embedded Images where images are specified by <protocol>:// will not be altered or embedded +* fixed the return value of SMTP exit code ( pclose ) +* addressed issue of multibyte characters in subject line and truncating +* added ability to have user specified Message ID + (default is still that PHPMailer create a unique Message ID) +* corrected unidentified message type to 'application/octet-stream' +* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al). +* added check for added attachments +* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny") + +Version 2.1.0beta2 (Sun, Dec 02 2007) * implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon) * finished all testing, all known bugs corrected, enhancements tested -- note: designed for PHP4, but will work with PHP5 (not compatible with - E_STRICT) ... full PHP5 version of PHPMailer released separately. - PHP5 version will NOT work with PHP4. +- note: will NOT work with PHP4. +please note, this is BETA software +** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS +INTENDED STRICTLY FOR TESTING + +Version 2.1.0beta1 +please note, this is BETA software +** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS +INTENDED STRICTLY FOR TESTING + Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release * implements new property to control VERP in class.smtp.php example (requires instantiating class.smtp.php): @@ -19,9 +175,9 @@ ****************** A note on sending bulk emails: -If the email you are sending is not personalized, consider using the +If the email you are sending is not personalized, consider using the "undisclosed-recipient:;" strategy. That is, put all of your recipients -in the Bcc field and set the To field to "undisclosed-recipients:;". +in the Bcc field and set the To field to "undisclosed-recipients:;". It's a lot faster (only one send) and saves quite a bit on resources. Contrary to some opinions, this will not get you listed in spam engines - it's a legitimate way for you to send emails. @@ -58,11 +214,11 @@ * added TLS/SSL SMTP support example of use: $mail = new PHPMailer(); - $mail->Mailer = "smtp"; - $mail->Host = "smtp.example.com"; - $mail->SMTPSecure = "tls"; // option - //$mail->SMTPSecure = "ssl"; // option - ... + $mail->Mailer = "smtp"; + $mail->Host = "smtp.example.com"; + $mail->SMTPSecure = "tls"; // option + //$mail->SMTPSecure = "ssl"; // option + ... $mail->Send(); * PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7) * Works with PHP installed as a module or as CGI-PHP @@ -75,7 +231,7 @@ Version 1.72 (Wed, May 25 2004) * Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. -* Received: Removed this method because spam filter programs like +* Received: Removed this method because spam filter programs like SpamAssassin reject this header. * Fixed error count bug. * SetLanguage default is now "language/". Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/README =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/README 2011-11-26 23:47:20 UTC (rev 8360) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/README 2011-11-27 00:22:33 UTC (rev 8361) @@ -1,3 +1,10 @@ +/******************************************************************* +* The http://phpmailer.codeworxtech.com/ website now carries a few * +* advertisements through the Google Adsense network. Please visit * +* the advertiser sites and help us offset some of our costs. * +* Thanks .... * +********************************************************************/ + PHPMailer Full Featured Email Transfer Class for PHP ========================================== @@ -2,2 +9,92 @@ +Version 5.0.0 (April 02, 2009) + +With the release of this version, we are initiating a new version numbering +system to differentiate from the PHP4 version of PHPMailer. + +Most notable in this release is fully object oriented code. + +We now have available the PHPDocumentor (phpdocs) documentation. This is +separate from the regular download to keep file sizes down. Please see the +download area of http://phpmailer.codeworxtech.com. + +We also have created a new test script (see /test_script) that you can use +right out of the box. Copy the /test_script folder directly to your server (in +the same structure ... with class.phpmailer.php and class.smtp.php in the +folder above it. Then launch the test script with: +http://www.yourdomain.com/phpmailer/test_script/index.php +from this one script, you can test your server settings for mail(), sendmail (or +qmail), and SMTP. This will email you a sample email (using contents.html for +the email body) and two attachments. One of the attachments is used as an inline +image to demonstrate how PHPMailer will automatically detect if attachments are +the same source as inline graphics and only include one version. Once you click +the Submit button, the results will be displayed including any SMTP debug +information and send status. We will also display a version of the script that +you can cut and paste to include in your projects. Enjoy! + +Version 2.3 (November 08, 2008) + +We have removed the /phpdoc from the downloads. All documentation is now on +the http://phpmailer.codeworxtech.com website. + +The phpunit.php has been updated to support PHP5. + +For all other changes and notes, please see the changelog. + +Donations are accepted at PayPal with our id "pa...@wo...". + +Version 2.2 (July 15 2008) + +- see the changelog. + +Version 2.1 (June 04 2008) + +With this release, we are announcing that the development of PHPMailer for PHP5 +will be our focus from this date on. We have implemented all the enhancements +and fixes from the latest release of PHPMailer for PHP4. + +Far more important, though, is that this release of PHPMailer (v2.1) is +fully tested with E_STRICT error checking enabled. + +** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. + IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE + APPRECIATED. + +We have now added S/MIME functionality (ability to digitally sign emails). +BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. +The "Signed Emails" functionality adds the Sign method to pass the private key +filename and the password to read it, and then email will be sent with +content-type multipart/signed and with the digital signature attached. + +A quick note on E_STRICT: + +- In about half the test environments the development version was subjected + to, an error was thrown for the date() functions (used at line 1565 and 1569). + This is NOT a PHPMailer error, it is the result of an incorrectly configured + PHP5 installation. The fix is to modify your 'php.ini' file and include the + date.timezone = America/New York + directive, (for your own server timezone) +- If you do get this error, and are unable to access your php.ini file, there is + a workaround. In your PHP script, add + date_default_timezone_set('America/Toronto'); + + * do NOT try to use + $myVar = date_default_timezone_get(); + as a test, it will throw an error. + +We have also included more example files to show the use of "sendmail", "mail()", +"smtp", and "gmail". + +We are also looking for more programmers to join the volunteer development team. +If you have an interest in this, please let us know. + +Enjoy! + + +Version 2.1.0beta1 & beta2 + +please note, this is BETA software +** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS +INTENDED STRICTLY FOR TESTING + ** NOTE: @@ -16,7 +113,7 @@ good documentation and examples, and retain backward compatibility to level 1.7.3 standards. -If you are interested in helping out, visit http://sourceforge.net/phpmailer +If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer and indicate your interest. ** @@ -47,7 +144,7 @@ programs are COM components only available on Windows. They are also a little pricey for smaller projects. -Since I do Linux development I\x92ve missed these tools for my PHP coding. +Since I do Linux development I�ve missed these tools for my PHP coding. So I built a version myself that implements the same methods (object calls) that the Windows-based components do. It is open source and the LGPL license allows you to place the class in your proprietary PHP @@ -58,14 +155,14 @@ Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call +In the language directory you will find several files like +phpmailer.lang-en.php. If you look right before the .php extension +that there are two letters. These represent the language type of the +translation file. For instance "en" is the English file and "br" is +the Portuguese file. Chose the file that best fits with your language +and place it in the PHP include path. If your language is English +then you have nothing more to do. If it is a different language then +you must point PHPMailer to the correct translation. To do this, call the PHPMailer SetLanguage method like so: // To load the Portuguese version Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.phpmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.phpmailer.php 2011-11-26 23:47:20 UTC (rev 8360) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/phpmailer/class.phpmailer.php 2011-11-27 00:22:33 UTC (rev 8361) @@ -2,14 +2,16 @@ /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | -| Version: 2.0.0 rc3 | -| Contact: via sourceforge.net support pages (also www.codeworxtech.com) | +| Version: 5.1 | +| Contact: via sourceforge.net support pages (also www.worxware.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | | ------------------------------------------------------------------------- | -| Author: Andy Prevost (project admininistrator) | -| Author: Brent R. Matzelle (original founder) | -| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. | +| Admin: Andy Prevost (project admininistrator) | +| Authors: Andy Prevost (codeworxtech) cod...@us... | +| : Marcus Bointon (coolbru) co...@us... | +| Founder: Brent R. Matzelle (original founder) | +| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. | | Copyright (c) 2001-2003, Brent R. Matzelle | | ------------------------------------------------------------------------- | | License: Distributed under the Lesser General Public License (LGPL) | @@ -18,19 +20,26 @@ | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | | FITNESS FOR A PARTICULAR PURPOSE. | | ------------------------------------------------------------------------- | -| We offer a number of paid services (www.codeworxtech.com): | +| We offer a number of paid services (www.worxware.com): | | - Web Hosting on highly optimized fast and secure servers | | - Technology Consulting | | - Oursourcing (highly qualified programmers and graphic designers) | '---------------------------------------------------------------------------' +*/ /** * PHPMailer - PHP email transport class + * NOTE: Requires PHP version 5 or later * @package PHPMailer * @author Andy Prevost - * @copyright 2004 - 2007 Andy Prevost + * @author Marcus Bointon + * @copyright 2004 - 2009 Andy Prevost + * @version $Id$ + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ +if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n"); + class PHPMailer { ///////////////////////////////////////////////// @@ -41,64 +50,64 @@ * Email priority (1 = High, 3 = Normal, 5 = low). * @var int */ - var $Priority = 3; + public $Priority = 3; /** * Sets the CharSet of the message. * @var string */ - var $CharSet = 'iso-8859-1'; + public $CharSet = 'iso-8859-1'; /** * Sets the Content-type of the message. * @var string */ - var $ContentType = 'text/plain'; + public $ContentType = 'text/plain'; /** - * Sets the Encoding of the message. Options for this are "8bit", - * "7bit", "binary", "base64", and "quoted-printable". + * Sets the Encoding of the message. Options for this are + * "8bit", "7bit", "binary", "base64", and "quoted-printable". * @var string */ - var $Encoding = '8bit'; + public $Encoding = '8bit'; /** * Holds the most recent mailer error message. * @var string */ - var $ErrorInfo = ''; + public $ErrorInfo = ''; /** * Sets the From email address for the message. * @var string */ - var $From = 'root@localhost'; + public $From = 'root@localhost'; /** * Sets the From name of the message. * @var string */ - var $FromName = 'Root User'; + public $FromName = 'Root User'; /** * Sets the Sender email (Return-Path) of the message. If not empty, * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. * @var string */ - var $Sender = ''; + public $Sender = ''; /** * Sets the Subject of the message. * @var string */ - var $Subject = ''; + public $Subject = ''; /** * Sets the Body of the message. This can be either an HTML or text body. * If HTML then run IsHTML(true). * @var string */ - var $Body = ''; + public $Body = ''; /** * Sets the text-only body of the message. This automatically sets the @@ -107,45 +116,39 @@ * that can read HTML will view the normal Body. * @var string */ - var $AltBody = ''; + public $AltBody = ''; /** * Sets word wrapping on the body of the message to a given number of * characters. * @var int */ - var $WordWrap = 0; + public $WordWrap = 0; /** * Method to send mail: ("mail", "sendmail", or "smtp"). * @var string */ - var $Mailer = 'mail'; + public $Mailer = 'mail'; /** * Sets the path of the sendmail program. * @var string */ - var $Sendmail = '/usr/sbin/sendmail'; + public $Sendmail = '/usr/sbin/sendmail'; /** - * Path to PHPMailer plugins. This is now only useful if the SMTP class + * Path to PHPMailer plugins. Useful if the SMTP class * is in a different directory than the PHP include path. * @var string */ - var $PluginDir = ''; + public $PluginDir = ''; /** - * Holds PHPMailer version. - * @var string - */ - var $Version = "2.0.0 rc3"; - - /** * Sets the email address that a reading confirmation will be sent. * @var string */ - var $ConfirmReadingTo = ''; + public $ConfirmReadingTo = ''; /** * Sets the hostname to use in Message-Id and Received headers @@ -153,8 +156,15 @@ * by SERVER_NAME is used or 'localhost.localdomain'. * @var string */ - var $Hostname = ''; + public $Hostname = ''; + /** + * Sets the message ID to be used in the Message-Id header. + * If empty, a unique id will be generated. + * @var string + */ + public $MessageID = ''; + ///////////////////////////////////////////////// // PROPERTIES FOR SMTP ///////////////////////////////////////////////// @@ -167,57 +177,57 @@ * Hosts will be tried in order. * @var string */ - var $Host = 'localhost'; + public $Host = 'localhost'; /** * Sets the default SMTP server port. * @var int */ - var $Port = 25; + public $Port = 25; /** * Sets the SMTP HELO of the message (Default is $Hostname). * @var string */ - var $Helo = ''; + public $Helo = ''; /** * Sets connection prefix. * Options are "", "ssl" or "tls" * @var string */ - var $SMTPSecure = ""; + public $SMTPSecure = ''; /** * Sets SMTP authentication. Utilizes the Username and Password variables. * @var bool */ - var $SMTPAuth = false; + public $SMTPAuth = false; /** * Sets SMTP username. * @var string */ - var $Username = ''; + public $Username = ''; /** * Sets SMTP password. * @var string */ - var $Password = ''; + public $Password = ''; /** - * Sets the SMTP server timeout in seconds. This function will not - * work with the win32 version. + * Sets the SMTP server timeout in seconds. + * This function will not work with the win32 version. * @var int */ - var $Timeout = 10; + public $Timeout = 10; /** * Sets SMTP class debugging on or off. * @var bool */ - var $SMTPDebug = false; + public $SMTPDebug = false; /** * Prevents the SMTP connection from being closed after each mail @@ -225,43 +235,123 @@ * requires an explicit call to SmtpClose(). * @var bool */ - var $SMTPKeepAlive = false; + public $SMTPKeepAlive = false; /** * Provides the ability to have the TO field process individual * emails, instead of sending to entire TO addresses * @var bool */ - var $SingleTo = false; + public $SingleTo = false; + /** + * If SingleTo is true, this provides the array to hold the email addresses + * @var bool + */ + public $SingleToArray = array(); + + /** + * Provides the ability to change the line ending + * @var string + */ + public $LE = "\n"; + + /** + * Used with DKIM DNS Resource Record + * @var string + */ + public $DKIM_selector = 'phpmailer'; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'yo...@yo...' + * @var string + */ + public $DKIM_identity = ''; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'yo...@yo...' + * @var string + */ + public $DKIM_domain = ''; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'yo...@yo...' + * @var string + */ + public $DKIM_private = ''; + + /** + * Callback Action function name + * the function that handles the result of the send email action. Parameters: + * bool $result result of the send action + * string $to email address of the recipient + * string $cc cc email addresses + * string $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * @var string + */ + public $action_function = ''; //'callbackAction'; + + /** + * Sets the PHPMailer Version number + * @var string + */ + public $Version = '5.1'; + ///////////////////////////////////////////////// - // PROPERTIES, PRIVATE + // PROPERTIES, PRIVATE AND PROTECTED ///////////////////////////////////////////////// + /** + * @var SMTP + */ + protected $smtp = NULL; + protected $to = array(); + protected $cc = array(); + protected $bcc = array(); + private $ReplyTo = array(); + private $all_recipients = array(); + private $attachment = array(); + private $CustomHeader = array(); + private $message_type = ''; + private $boundary = array(); + protected $language = array(); + private $error_count = 0; + private $sign_cert_file = ""; + private $sign_key_file = ""; + private $sign_key_pass = ""; + private $exceptions = false; - var $smtp = NULL; - var $to = array(); - var $cc = array(); - var $bcc = array(); - var $ReplyTo = array(); - var $attachment = array(); - var $CustomHeader = array(); - var $message_type = ''; - var $boundary = array(); - var $language = array(); - var $error_count = 0; - var $LE = "\n"; + ///////////////////////////////////////////////// + // CONSTANTS + ///////////////////////////////////////////////// + const STOP_MESSAGE = 0; // message only, continue processing + const STOP_CONTINUE = 1; // message?, likely ok to continue processing + const STOP_CRITICAL = 2; // message, plus full stop, critical error reached + ///////////////////////////////////////////////// // METHODS, VARIABLES ///////////////////////////////////////////////// /** + * Constructor + * @param boolean $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = false) { + $this->exceptions = ($exceptions == true); + } + + /** * Sets message type to HTML. - * @param bool $bool + * @param bool $ishtml * @return void */ - function IsHTML($bool) { - if($bool == true) { + public function IsHTML($ishtml = true) { + if ($ishtml) { $this->ContentType = 'text/html'; } else { $this->ContentType = 'text/plain'; @@ -272,7 +362,7 @@ * Sets Mailer to send message using SMTP. * @return void */ - function IsSMTP() { + public function IsSMTP() { $this->Mailer = 'smtp'; } @@ -280,7 +370,7 @@ * Sets Mailer to send message using PHP mail() function. * @return void */ - function IsMail() { + public function IsMail() { $this->Mailer = 'mail'; } @@ -288,7 +378,10 @@ * Sets Mailer to send message using the $Sendmail program. * @return void */ - function IsSendmail() { + public function IsSendmail() { + if (!stristr(ini_get('sendmail_path'), 'sendmail')) { + $this->Sendmail = '/var/qmail/bin/sendmail'; + } $this->Mailer = 'sendmail'; } @@ -296,8 +389,10 @@ * Sets Mailer to send message using the qmail MTA. * @return void */ - function IsQmail() { - $this->Sendmail = '/var/qmail/bin/sendmail'; + public function IsQmail() { + if (stristr(ini_get('sendmail_path'), 'qmail')) { + $this->Sendmail = '/var/qmail/bin/sendmail'; + } $this->Mailer = 'sendmail'; } @@ -309,54 +404,136 @@ * Adds a "To" address. * @param string $address * @param string $name - * @return void + * @return boolean true on success, false if address already used */ - function AddAddress($address, $name = '') { - $cur = count($this->to); - $this->to[$cur][0] = trim($address); - $this->to[$cur][1] = $name; + public function AddAddress($address, $name = '') { + return $this->AddAnAddress('to', $address, $name); } /** - * Adds a "Cc" address. Note: this function works - * with the SMTP mailer on win32, not with the "mail" - * mailer. + * Adds a "Cc" address. + * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. * @param string $address * @param string $name - * @return void + * @return boolean true on success, false if address already used */ - function AddCC($address, $name = '') { - $cur = count($this->cc); - $this->cc[$cur][0] = trim($address); - $this->cc[$cur][1] = $name; + public function AddCC($address, $name = '') { + return $this->AddAnAddress('cc', $address, $name); } /** - * Adds a "Bcc" address. Note: this function works - * with the SMTP mailer on win32, not with the "mail" - * mailer. + * Adds a "Bcc" address. + * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. * @param string $address * @param string $name - * @return void + * @return boolean true on success, false if address already used */ - function AddBCC($address, $name = '') { - $cur = count($this->bcc); - $this->bcc[$cur][0] = trim($address); - $this->bcc[$cur][1] = $name; + public function AddBCC($address, $name = '') { + return $this->AddAnAddress('bcc', $address, $name); } /** - * Adds a "Reply-To" address. + * Adds a "Reply-to" address. * @param string $address * @param string $name - * @return void + * @return boolean */ - function AddReplyTo($address, $name = '') { - $cur = count($this->ReplyTo); - $this->ReplyTo[$cur][0] = trim($address); - $this->ReplyTo[$cur][1] = $name; + public function AddReplyTo($address, $name = '') { + return $this->AddAnAddress('ReplyTo', $address, $name); } + /** + * Adds an address to one of the recipient arrays + * Addresses that have been added already return false, but do not throw exceptions + * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + * @access private + */ + private function AddAnAddress($kind, $address, $name = '') { + if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) { + echo 'Invalid recipient array: ' . $kind; + return false; + } + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!self::ValidateAddress($address)) { + $this->SetError($this->Lang('invalid_address').': '. $address); + if ($this->exceptions) { + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + echo $this->Lang('invalid_address').': '.$address; + return false; + } + if ($kind != 'ReplyTo') { + if (!isset($this->all_recipients[strtolower($address)])) { + array_push($this->$kind, array($address, $name)); + $this->all_recipients[strtolower($address)] = true; + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = array($address, $name); + return true; + } + } + return false; +} + +/** + * Set the From and FromName properties + * @param string $address + * @param string $name + * @return boolean + */ + public function SetFrom($address, $name = '',$auto=1) { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!self::ValidateAddress($address)) { + $this->SetError($this->Lang('invalid_address').': '. $address); + if ($this->exceptions) { + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + echo $this->Lang('invalid_address').': '.$address; + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->ReplyTo)) { + $this->AddAnAddress('ReplyTo', $address, $name); + } + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + return true; + } + + /** + * Check that a string looks roughly like an email address should + * Static so it can be used without instantiation + * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator + * Conforms approximately to RFC2822 + * @link http://www.hexillion.com/samples/#Regex Original pattern found here + * @param string $address The email address to check + * @return boolean + * @static + * @access public + */ + public static function ValidateAddress($address) { + if (function_exists('filter_var')) { //Introduced in PHP 5.2 + if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) { + return false; + } else { + return true; + } + } else { + return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address); + } + } + ///////////////////////////////////////////////// // METHODS, MAIL SENDING ///////////////////////////////////////////////// @@ -367,255 +544,297 @@ * variable to view description of the error. * @return bool */ - function Send() { - $header = ''; - $body = ''; - $result = true; + public function Send() { + try { + if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL); + } - if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - $this->SetError($this->Lang('provide_address')); - return false; - } + // Set whether the message is multipart/alternative + if(!empty($this->AltBody)) { + $this->ContentType = 'multipart/alternative'; + } - /* Set whether the message is multipart/alternative */ - if(!empty($this->AltBody)) { - $this->ContentType = 'multipart/alternative'; - } + $this->error_count = 0; // reset errors + $this->SetMessageType(); + $header = $this->CreateHeader(); + $body = $this->CreateBody(); - $this->error_count = 0; // reset errors - $this->SetMessageType(); - $header .= $this->CreateHeader(); - $body = $this->CreateBody(); + if (empty($this->Body)) { + throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL); + } - if($body == '') { + // digitally sign with DKIM if enabled + if ($this->DKIM_domain && $this->DKIM_private) { + $header_dkim = $this->DKIM_Add($header,$this->Subject,$body); + $header = str_replace("\r\n","\n",$header_dkim) . $header; + } + + // Choose the mailer and send through it + switch($this->Mailer) { + case 'sendmail': + return $this->SendmailSend($header, $body); + case 'smtp': + return $this->SmtpSend($header, $body); + default: + return $this->MailSend($header, $body); + } + + } catch (phpmailerException $e) { + $this->SetError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + echo $e->getMessage()."\n"; return false; } - - /* Choose the mailer */ - switch($this->Mailer) { - case 'sendmail': - $result = $this->SendmailSend($header, $body); - break; - case 'smtp': - $result = $this->SmtpSend($header, $body); - break; - case 'mail': - $result = $this->MailSend($header, $body); - break; - default: - $result = $this->MailSend($header, $body); - break; - //$this->SetError($this->Mailer . $this->Lang('mailer_not_supported')); - //$result = false; - //break; - } - - return $result; } /** * Sends mail using the $Sendmail program. - * @access private + * @param string $header The message headers + * @param string $body The message body + * @access protected * @return bool */ - function SendmailSend($header, $body) { + protected function SendmailSend($header, $body) { if ($this->Sender != '') { $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); } else { $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); } - - if(!@$mail = popen($sendmail, 'w')) { - $this->SetError($this->Lang('execute') . $this->Sendmail); - return false; + if ($this->SingleTo === true) { + foreach ($this->SingleToArray as $key => $val) { + if(!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, "To: " . $val . "\n"); + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); + if($result != 0) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + if(!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent,$this->to,$this->cc,$this->bcc,$this->Subject,$body); + if($result != 0) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } } - - fputs($mail, $header); - fputs($mail, $body); - - $result = pclose($mail) >> 8 & 0xFF; - if($result != 0) { - $this->SetError($this->Lang('execute') . $this->Sendmail); - return false; - } - return true; } /** * Sends mail using the PHP mail() function. - * @access private + * @param string $header The message headers + * @param string $body The message body + * @access protected * @return bool */ - function MailSend($header, $body) { - - $to = ''; - for($i = 0; $i < count($this->to); $i++) { - if($i != 0) { $to .= ', '; } - $to .= $this->AddrFormat($this->to[$i]); + protected function MailSend($header, $body) { + $toArr = array(); + foreach($this->to as $t) { + $toArr[] = $this->AddrFormat($t); } + $to = implode(', ', $toArr); - $toArr = split(',', $to); - + $params = sprintf("-oi -f %s", $this->Sender); if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) { $old_from = ini_get('sendmail_from'); ini_set('sendmail_from', $this->Sender); - $params = sprintf("-oi -f %s", $this->Sender); if ($this->SingleTo === true && count($toArr) > 1) { foreach ($toArr as $key => $val) { $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); } } else { $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); } } else { if ($this->SingleTo === true && count($toArr) > 1) { foreach ($toArr as $key => $val) { $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); } } else { $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); } } - if (isset($old_from)) { ini_set('sendmail_from', $old_from); } - if(!$rt) { - $this->SetError($this->Lang('instantiate')); - return false; + throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL); } - return true; } /** - * Sends mail via SMTP using PhpSMTP (Author: - * Chris Ryan). Returns bool. Returns false if there is a - * bad MAIL FROM, RCPT, or DATA input. - * @access private + * Sends mail via SMTP using PhpSMTP + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * @param string $header The message headers + * @param string $body The message body + * @uses SMTP + * @access protected * @return bool */ - function SmtpSend($header, $body) { - include_once($this->PluginDir . 'class.smtp.php'); - $error = ''; + protected function SmtpSend($header, $body) { + require_once $this->PluginDir . 'class.smtp.php'; $bad_rcpt = array(); if(!$this->SmtpConnect()) { - return false; + throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL); } - $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; if(!$this->smtp->Mail($smtp_from)) { - $error = $this->Lang('from_failed') . $smtp_from; - $this->SetError($error); - $this->smtp->Reset(); - return false; + throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL); } - /* Attempt to send attach all recipients */ - for($i = 0; $i < count($this->to); $i++) { - if(!$this->smtp->Recipient($this->to[$i][0])) { - $bad_rcpt[] = $this->to[$i][0]; + // Attempt to send attach all recipients + foreach($this->to as $to) { + if (!$this->smtp->Recipient($to[0])) { + $bad_rcpt[] = $to[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); } } - for($i = 0; $i < count($this->cc); $i++) { - if(!$this->smtp->Recipient($this->cc[$i][0])) { - $bad_rcpt[] = $this->cc[$i][0]; + foreach($this->cc as $cc) { + if (!$this->smtp->Recipient($cc[0])) { + $bad_rcpt[] = $cc[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); } } - for($i = 0; $i < count($this->bcc); $i++) { - if(!$this->smtp->Recipient($this->bcc[$i][0])) { - $bad_rcpt[] = $this->bcc[$i][0]; + foreach($this->bcc as $bcc) { + if (!$this->smtp->Recipient($bcc[0])) { + $bad_rcpt[] = $bcc[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); } } - if(count($bad_rcpt) > 0) { // Create error message - for($i = 0; $i < count($bad_rcpt); $i++) { - if($i != 0) { - $error .= ', '; - } - $error .= $bad_rcpt[$i]; - } - $error = $this->Lang('recipients_failed') . $error; - $this->SetError($error); - $this->smtp->Reset(); - return false; + + if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses + $badaddresses = implode(', ', $bad_rcpt); + throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses); } - if(!$this->smtp->Data($header . $body)) { - $this->SetError($this->Lang('data_not_accepted')); - $this->smtp->Reset(); - return false; + throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL); } if($this->SMTPKeepAlive == true) { $this->smtp->Reset(); - } else { - $this->SmtpClose(); } - return true; } /** - * Initiates a connection to an SMTP server. Returns false if the - * operation failed. - * @access private + * Initiates a connection to an SMTP server. + * Returns false if the operation failed. + * @uses SMTP + * @access public * @return bool */ - function SmtpConnect() { - if($this->smtp == NULL) { + public function SmtpConnect() { + if(is_null($this->smtp)) { $this->smtp = new SMTP(); } $this->smtp->do_debug = $this->SMTPDebug; $hosts = explode(';', $this->Host); $index = 0; - $connection = ($this->smtp->Connected()); + $connection = $this->smtp->Connected(); - /* Retry while there is no connection */ - while($index < count($hosts) && $connection == false) { - $hostinfo = array(); - if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) { - $host = $hostinfo[1]; - $port = $hostinfo[2]; - } else { - $host = $hosts[$index]; - $port = $this->Port; - } - - if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':'').$host, $port, $this->Timeout)) { - if ($this->Helo != '') { - $this->smtp->Hello($this->Helo); + // Retry while there is no connection + try { + while($index < count($hosts) && !$connection) { + $hostinfo = array(); + if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) { + $host = $hostinfo[1]; + $port = $hostinfo[2]; } else { - $this->smtp->Hello($this->ServerHostname()); + $host = $hosts[$index]; + $port = $this->Port; } - $connection = true; - if($this->SMTPAuth) { - if(!$this->smtp->Authenticate($this->Username, $this->Password)) { - $this->SetError($this->Lang('authenticate')); - $this->smtp->Reset(); - $connection = false; + $tls = ($this->SMTPSecure == 'tls'); + $ssl = ($this->SMTPSecure == 'ssl'); + + if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { + + $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); + $this->smtp->Hello($hello); + + if ($tls) { + if (!$this->smtp->StartTLS()) { + throw new phpmailerException($this->Lang('tls')); + } + + //We must resend HELO after tls negotiation + $this->smtp->Hello($hello); } + + $connection = true; + if ($this->SMTPAuth) { + if (!$this->smtp->Authenticate($this->Username, $this->Password)) { + throw new phpmailerException($this->Lang('authenticate')); + } + } } + $index++; + if (!$connection) { + throw new phpmailerException($this->Lang('connect_host')); + } } - $index++; + } catch (phpmailerException $e) { + $this->smtp->Reset(); + throw $e; } - if(!$connection) { - $this->SetError($this->Lang('connect_host')); - } - - return $connection; + return true; } /** * Closes the active SMTP session if one exists. * @return void */ - function SmtpClose() { - if($this->smtp != NULL) { + public function SmtpClose() { + if(!is_null($this->smtp)) { if($this->smtp->Connected()) { $this->smtp->Quit(); $this->smtp->Close(); @@ -624,26 +843,48 @@ } /** - * Sets the language for all class error messages. Returns false - * if it cannot load the language file. The default language type - * is English. - * @param string $lang_type Type of language (e.g. Portuguese: "br") - * @param string $lang_path Path to the language file directory - * @access public - * @return bool - */ - function SetLanguage($lang_type, $lang_path = 'language/') { - if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php')) { - include($lang_path.'phpmailer.lang-'.$lang_type.'.php'); - } elseif (file_exists($lang_path.'phpmailer.lang-en.php')) { - include($lang_path.'phpmailer.lang-en.php'); - } else { - $this->SetError('Could not load language file'); - return false; + * Sets the language for all class error messages. + * Returns false if it cannot load the language file. The default language is English. + * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + */ + function SetLanguage($langcode = 'en', $lang_path = 'language/') { + //Define full set of translatable strings + $PHPMAILER_LANG = array( + 'provide_address' => 'You must provide at least one recipient email address.', + 'mailer_not_supported' => ' mailer is not supported.', + 'execute' => 'Could not execute: ', + 'instantiate' => 'Could not instantiate mail function.', + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'from_failed' => 'The following From address failed: ', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'data_not_accepted' => 'SMTP Error: Data not accepted.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'encoding' => 'Unknown encoding: ', + 'signing' => 'Signing Error: ', + 'smtp_error' => 'SMTP server error: ', + 'empty_message' => 'Message body empty', + 'invalid_address' => 'Invalid address', + 'variable_set' => 'Cannot set or reset variable: ' + ); + //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"! + $l = true; + if ($langcode != 'en') { //There is no English translation file + $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php'; } $this->language = $PHPMAILER_L... [truncated message content] |
From: <for...@us...> - 2011-11-27 21:54:07
|
Revision: 8372 http://xoops.svn.sourceforge.net/xoops/?rev=8372&view=rev Author: forxoops Date: 2011-11-27 21:54:00 +0000 (Sun, 27 Nov 2011) Log Message: ----------- Refactore system module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/xoops_version.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-27 18:19:52 UTC (rev 8371) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-27 21:54:00 UTC (rev 8372) @@ -897,7 +897,7 @@ * @param string $module_dir * @return XoopsForm|bool */ - public function getModuleForm(XoopsObject $obj, $name, $module_dir = null) + public function getModuleForm($obj, $name, $module_dir = null) { if (empty($name)) { return false; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2011-11-27 18:19:52 UTC (rev 8371) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php 2011-11-27 21:54:00 UTC (rev 8372) @@ -63,7 +63,13 @@ $system_breadcrumb->addHelp(system_adminVersion('users', 'help') . '#edit'); $system_breadcrumb->addLink(_AM_SYSTEM_USERS_NAV_EDIT_USER); $system_breadcrumb->render(); - form_user(false, $uid); + + $uid = $system->cleanVars($_GET, 'uid', 0); + + $member_handler = $xoops->getHandlerMember(); + $user = $member_handler->getUser($uid); + $form = $xoops->getModuleForm($user, 'user'); + $form->display(); break; // Add user @@ -72,7 +78,11 @@ $system_breadcrumb->addHelp(system_adminVersion('users', 'help') . '#add'); $system_breadcrumb->addLink(_AM_SYSTEM_USERS_NAV_ADD_USER); $system_breadcrumb->render(); - form_user(true); + + $member_handler = $xoops->getHandlerMember(); + $user = $member_handler->createUser(); + $form = $xoops->getModuleForm($user, 'user'); + $form->display(); break; // Delete user Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php 2011-11-27 18:19:52 UTC (rev 8371) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php 2011-11-27 21:54:00 UTC (rev 8372) @@ -37,182 +37,7 @@ /*********************************************************/ /* Users Functions */ /*********************************************************/ - /** - * Display form add or edit - * - * @param $add_or_edit true = add and false = edit - * @param string $user - * @return void - */ -function form_user($add_or_edit, $user = '') -{ - $xoops = Xoops::getInstance(); - $system = System::getInstance(); - $uid = $system->cleanVars($_REQUEST, 'uid', 0); - - //RMV-NOTIFY - $xoops->loadLanguage('notification'); - include_once $xoops->path('include/notification_constants.php'); - - if ($add_or_edit == true) { - //Add user - $uid_value = ""; - $uname_value = ""; - $name_value = ""; - $email_value = ""; - $email_cbox_value = 0; - $url_value = ""; - $timezone_value = $xoops->getConfig('default_TZ'); - $icq_value = ""; - $aim_value = ""; - $yim_value = ""; - $msnm_value = ""; - $location_value = ""; - $occ_value = ""; - $interest_value = ""; - $sig_value = ""; - $sig_cbox_value = 0; - $umode_value = $xoops->getConfig('com_mode'); - $uorder_value = $xoops->getConfig('com_order'); - // RMV-NOTIFY - $notify_method_value = XOOPS_NOTIFICATION_METHOD_PM; - $notify_mode_value = XOOPS_NOTIFICATION_MODE_SENDALWAYS; - $bio_value = ""; - $rank_value = 0; - $mailok_value = 0; - $form_title = _AM_SYSTEM_USERS_ADDUSER; - $form_isedit = false; - $groups = array(XOOPS_GROUP_USERS); - } else { - //Edit user - $member_handler = $xoops->getHandlerMember(); - $user = $member_handler->getUser($uid); - if (is_object($user)) { - $uid_value = $uid; - $uname_value = $user->getVar("uname", "E"); - $name_value = $user->getVar("name", "E"); - $email_value = $user->getVar("email", "E"); - $email_cbox_value = $user->getVar("user_viewemail") ? 1 : 0; - $url_value = $user->getVar("url", "E"); - $timezone_value = $user->getVar("timezone_offset"); - $icq_value = $user->getVar("user_icq", "E"); - $aim_value = $user->getVar("user_aim", "E"); - $yim_value = $user->getVar("user_yim", "E"); - $msnm_value = $user->getVar("user_msnm", "E"); - $location_value = $user->getVar("user_from", "E"); - $occ_value = $user->getVar("user_occ", "E"); - $interest_value = $user->getVar("user_intrest", "E"); - $sig_value = $user->getVar("user_sig", "E"); - $sig_cbox_value = ($user->getVar("attachsig") == 1) ? 1 : 0; - $umode_value = $user->getVar("umode"); - $uorder_value = $user->getVar("uorder"); - // RMV-NOTIFY - $notify_method_value = $user->getVar("notify_method"); - $notify_mode_value = $user->getVar("notify_mode"); - $bio_value = $user->getVar("bio", "E"); - $rank_value = $user->rank(false); - $mailok_value = $user->getVar('user_mailok', 'E'); - $form_title = _AM_SYSTEM_USERS_UPDATEUSER . ": " . $user->getVar("uname"); - $form_isedit = true; - $groups = array_values($user->getGroups()); - } - } - - //Affichage du formulaire - $form = new XoopsThemeForm($form_title, "form_user", "admin.php", "post", true); - - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_NICKNAME, "username", 25, 25, $uname_value), true); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_NAME, "name", 30, 60, $name_value)); - $email_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_EMAIL, "<br />"); - $email_text = new XoopsFormText("", "email", 30, 60, $email_value); - $email_tray->addElement($email_text, true); - $email_cbox = new XoopsFormCheckBox("", "user_viewemail", $email_cbox_value); - $email_cbox->addOption(1, _AM_SYSTEM_USERS_AOUTVTEAD); - $email_tray->addElement($email_cbox); - $form->addElement($email_tray, true); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_URL, "url", 30, 100, $url_value)); - $form->addElement(new XoopsFormSelectTimezone(_AM_SYSTEM_USERS_TIMEZONE, "timezone_offset", $timezone_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_ICQ, "user_icq", 15, 15, $icq_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_AIM, "user_aim", 18, 18, $aim_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_YIM, "user_yim", 25, 25, $yim_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_MSNM, "user_msnm", 30, 100, $msnm_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_LOCATION, "user_from", 30, 100, $location_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_OCCUPATION, "user_occ", 30, 100, $occ_value)); - $form->addElement(new XoopsFormText(_AM_SYSTEM_USERS_INTEREST, "user_intrest", 30, 150, $interest_value)); - $sig_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_SIGNATURE, "<br />"); - $sig_tarea = new XoopsFormTextArea("", "user_sig", $sig_value); - $sig_tray->addElement($sig_tarea); - $sig_cbox = new XoopsFormCheckBox("", "attachsig", $sig_cbox_value); - $sig_cbox->addOption(1, _AM_SYSTEM_USERS_SHOWSIG); - $sig_tray->addElement($sig_cbox); - $form->addElement($sig_tray); - $umode_select = new XoopsFormSelect(_AM_SYSTEM_USERS_CDISPLAYMODE, "umode", $umode_value); - $umode_select->addOptionArray(array("nest" => _NESTED, "flat" => _FLAT, "thread" => _THREADED)); - $form->addElement($umode_select); - $uorder_select = new XoopsFormSelect(_AM_SYSTEM_USERS_CSORTORDER, "uorder", $uorder_value); - $uorder_select->addOptionArray(array("0" => _OLDESTFIRST, "1" => _NEWESTFIRST)); - $form->addElement($uorder_select); - // RMV-NOTIFY - $notify_method_select = new XoopsFormSelect(_NOT_NOTIFYMETHOD, 'notify_method', $notify_method_value); - $notify_method_select->addOptionArray(array( - XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, - XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL - )); - $form->addElement($notify_method_select); - $notify_mode_select = new XoopsFormSelect(_NOT_NOTIFYMODE, 'notify_mode', $notify_mode_value); - $notify_mode_select->addOptionArray(array( - XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, - XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, - XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN - )); - $form->addElement($notify_mode_select); - $form->addElement(new XoopsFormTextArea(_AM_SYSTEM_USERS_EXTRAINFO, "bio", $bio_value)); - $rank_select = new XoopsFormSelect(_AM_SYSTEM_USERS_RANK, "rank", $rank_value); - $ranklist = XoopsLists::getUserRankList(); - $rank_select->addOption(0, "--------------"); - if (count($ranklist) > 0) { - $rank_select->addOptionArray($ranklist); - } - $form->addElement($rank_select); - // adding a new user requires password fields - if (!$form_isedit) { - $form->addElement(new XoopsFormPassword(_AM_SYSTEM_USERS_PASSWORD, "password", 10, 32), true); - $form->addElement(new XoopsFormPassword(_AM_SYSTEM_USERS_RETYPEPD, "pass2", 10, 32), true); - } else { - $form->addElement(new XoopsFormPassword(_AM_SYSTEM_USERS_PASSWORD, "password", 10, 32)); - $form->addElement(new XoopsFormPassword(_AM_SYSTEM_USERS_RETYPEPD, "pass2", 10, 32)); - } - $form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_USERS_MAILOK, 'user_mailok', $mailok_value)); - - //Groups administration addition XOOPS 2.0.9: Mith - $gperm_handler = $xoops->getHandlerGroupperm(); - //If user has admin rights on groups - if ($gperm_handler->checkRight("system_admin", XOOPS_SYSTEM_GROUP, $xoops->user->getGroups(), 1)) { - //add group selection - $group_select[] = new XoopsFormSelectGroup(_AM_SYSTEM_USERS_GROUPS, 'groups', false, $groups, 5, true); - } else { - //add each user groups - foreach ($groups as $key => $group) { - $group_select[] = new XoopsFormHidden('groups[' . $key . ']', $group); - } - } - foreach ($group_select as $group) { - $form->addElement($group); - unset($group); - } - - $form->addElement(new XoopsFormHidden("fct", "users")); - $form->addElement(new XoopsFormHidden("op", "users_save")); - $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); - - if (!empty($uid_value)) { - $form->addElement(new XoopsFormHidden("uid", $uid_value)); - } - $form->display(); -} - -/** * @param int $uid * @param string $type * @return void Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/xoops_version.php 2011-11-27 18:19:52 UTC (rev 8371) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/xoops_version.php 2011-11-27 21:54:00 UTC (rev 8372) @@ -12,11 +12,12 @@ /** * Users Manager * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @author Kazumi Ono (AKA onokazu) - * @package system - * @version $Id$ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Kazumi Ono (AKA onokazu) + * @package system + * @subpackage users + * @version $Id$ */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-12-02 22:32:48
|
Revision: 8391 http://xoops.svn.sourceforge.net/xoops/?rev=8391&view=rev Author: trabis Date: 2011-12-02 22:32:34 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Initial refactoring of protector module: - moving protector to public folder - removing unused files/folders - removing code related with xoops forks - removing code related with easy cloning Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/advisory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorMysqlDatabase.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/gtickets.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/protector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/docs/documentation_protector-3-10_french.pdf XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/bruteforce_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/crawler_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/f5attack_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4everyone.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4guest.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_need_multibyte.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_register_moratorium.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_register_insert_js_check.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_errorlog.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_redirection.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_errorlog.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/prepurge_exit_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/spamcheck_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/precommon_badip_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/images/module_icon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/images/module_icon_old.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/install_extramodcheck.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/postcheck_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/precheck.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/precheck_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/include/version.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/arabic/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/arabic/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/arabic/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/arabic/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/arabic/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/de_utf8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/de_utf8/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/de_utf8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/de_utf8/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/de_utf8/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/fr_utf8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/fr_utf8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/french/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/french/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/french/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/german/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/german/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/german/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/german/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/german/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/italian/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/italian/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/italian/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/italian/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/italian/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ja_utf8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ja_utf8/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ja_utf8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ja_utf8/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/ja_utf8/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/japanese/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/japanese/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/japanese/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/japanese/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/japanese/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/nederlands/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/nederlands/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/nederlands/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/nederlands/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/nederlands/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/persian/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/persian/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/polish/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/polish/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/polish/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/polish/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/polish/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/portuguesebr/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/portuguesebr/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/portuguesebr/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/russian/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/russian/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/russian/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/russian/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/russian/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/schinese_utf8/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/schinese_utf8/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/schinese_utf8/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/schinese_utf8/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/schinese_utf8/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/spanish/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/spanish/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/spanish/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/spanish/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/spanish/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/CREDITS XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrCollections.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Background.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Border.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Color.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Composite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Filter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Font.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/FontFamily.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Length.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/ListStyle.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Multiple.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Number.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/Percentage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/URI.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/CSS.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/Enum.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Bool.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Color.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/ID.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Length.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/MultiLength.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Nmtokens.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/Pixels.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/HTML/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/Integer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/Lang.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/Switch.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/Text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/Email/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/Email/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/Email.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/Host.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/IPv4.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/IPv6.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/URI.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrDef.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Background.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/BdoDir.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/BgColor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/BoolToCSS.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Border.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/EnumToCSS.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/ImgRequired.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/ImgSpace.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Input.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Lang.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Length.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Name.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/NameSync.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/SafeEmbed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/SafeObject.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/SafeParam.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/ScriptRequired.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/Textarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTransform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrTypes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/AttrValidator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Bootstrap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/CSSDefinition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Chameleon.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Custom.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Empty.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Optional.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Required.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/StrictBlockquote.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/Table.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ChildDef.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef/Directive.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef/DirectiveAlias.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef/Namespace.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigDef.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Builder/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Builder/Xml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Builder/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Exception.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Interchange/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Interchange/Id.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Interchange/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Interchange.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/Validator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema/info.ini XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema/schema.ser XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ConfigSchema.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ContentSets.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Context.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Definition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator/Memory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Decorator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Null.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/CSS/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/CSS/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/HTML/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/HTML/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/README XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/Test/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/Test/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/URI/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/URI/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/Serializer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DefinitionCacheFactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Doctype.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/DoctypeRegistry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ElementDef.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Encoder.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/EntityLookup/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/EntityLookup/entities.ser XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/EntityLookup/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/EntityLookup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/EntityParser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Error.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ErrorCollector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/ErrorStruct.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Exception.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Filter/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Filter/ExtractStyleBlocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Filter/YouTube.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Filter/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Filter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Generator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLDefinition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Bdo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/CommonAttributes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Edit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Hypertext.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Legacy.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/List.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Name.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Presentation.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Proprietary.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Ruby.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/SafeEmbed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/SafeObject.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Scripting.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/StyleAttribute.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tables.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Target.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/Name.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/Proprietary.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/Strict.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/Transitional.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/XHTML.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/XHTMLStrict.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/Tidy.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/XMLCommonAttributes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModule.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/HTMLModuleManager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/IDAccumulator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/AutoParagraph.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/DisplayLinkURI.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/Linkify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/PurifierLinkify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/RemoveEmpty.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/SafeObject.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Injector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/classes/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/classes/en-x-test.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/classes/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/messages/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/messages/en-x-test.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/messages/en-x-testmini.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/messages/en.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language/messages/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Language.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/LanguageFactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Length.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/DOMLex.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/DirectLex.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/PEARSax3.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/PH5P.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Lexer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/PercentEncoder.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/CSSDefinition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/ConfigForm.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/ConfigForm.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/ConfigForm.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/HTMLDefinition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Printer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/PropertyList.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/PropertyListIterator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/Composite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/Core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/FixNesting.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/MakeWellFormed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/RemoveForeignElements.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/ValidateAttributes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Strategy.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/StringHash.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/StringHashParser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TagTransform/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TagTransform/Font.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TagTransform/Simple.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TagTransform/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TagTransform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/Comment.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/Empty.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/End.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/Start.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/Tag.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/Text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/Token.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/TokenFactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URI.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIDefinition.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/DisableExternal.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/DisableExternalResources.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/HostBlacklist.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/MakeAbsolute.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/Munge.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIFilter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIParser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/ftp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/http.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/https.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/mailto.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/news.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme/nntp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URIScheme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/URISchemeRegistry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/UnitConverter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParser/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParser/Flexible.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParser/Native.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParser/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/VarParserException.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.auto.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.autoload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.func.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.includes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.kses.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.path.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/HTMLPurifier.safe-includes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/INSTALL XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/LICENSE XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/NEWS XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/sql/mysql.sql Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/admin_menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/index.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/module_icon.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/mytrustdirname.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/notification_update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/oninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/onuninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/onupdate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/preload/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php 2011-12-02 06:19:36 UTC (rev 8390) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php 2011-12-02 22:32:34 UTC (rev 8391) @@ -27,13 +27,20 @@ * Abstract base class for Database access classes * * @abstract - * @author Kazumi Ono <on...@xo...> - * @package kernel + * @author Kazumi Ono <on...@xo...> + * @package kernel * @subpackage database */ abstract class XoopsDatabase { /** + * Database connection + * + * @var resource + */ + public $conn; + + /** * Prefix for tables in the database * * @var string @@ -56,6 +63,7 @@ * assign a {@link XoopsLogger} object to the database * * @see XoopsLogger + * * @param XoopsLogger $logger reference to a {@link XoopsLogger} object */ public function setLogger(XoopsLogger $logger) @@ -75,10 +83,10 @@ /** * attach the prefix.'_' to a given tablename - * * if tablename is empty, only prefix will be returned * * @param string $tablename tablename + * * @return string prefixed tablename, just prefix if tablename is empty */ public function prefix($tablename = '') @@ -92,25 +100,30 @@ /** * @abstract + * * @param bool $selectdb + * * @return void */ abstract function connect($selectdb = true); /** * @param $sequence + * * @abstract */ abstract function genId($sequence); /** * @param $result + * * @abstract */ abstract function fetchRow($result); /** * @param $result + * * @return array * @abstract */ @@ -118,12 +131,14 @@ /** * @param $result + * * @abstract */ abstract function fetchBoth($result); /** * @param $result + * * @abstract */ abstract function fetchObject($result); @@ -135,6 +150,7 @@ /** * @param $result + * * @abstract */ abstract function getRowsNum($result); @@ -151,6 +167,7 @@ /** * @param $result + * * @abstract */ abstract function freeRecordSet($result); @@ -167,34 +184,39 @@ /** * @param $str + * * @abstract */ abstract function quoteString($str); /** * @param $string + * * @abstract */ abstract function quote($string); /** - * @param $sql + * @param $sql * @param int $limit * @param int $start + * * @abstract */ abstract function queryF($sql, $limit = 0, $start = 0); /** - * @param $sql + * @param $sql * @param int $limit * @param int $start + * * @abstract */ abstract function query($sql, $limit = 0, $start = 0); /** * @param $file + * * @abstract */ abstract function queryFromFile($file); @@ -202,6 +224,7 @@ /** * @param $result * @param $offset + * * @abstract */ abstract function getFieldName($result, $offset); @@ -209,12 +232,14 @@ /** * @param $result * @param $offset + * * @abstract */ abstract function getFieldType($result, $offset); /** * @param $re... [truncated message content] |
From: <tr...@us...> - 2011-12-03 19:40:20
|
Revision: 8402 http://xoops.svn.sourceforge.net/xoops/?rev=8402&view=rev Author: trabis Date: 2011-12-03 19:40:12 +0000 (Sat, 03 Dec 2011) Log Message: ----------- Moving HTMLPurifier to private folder, removing some unused files Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/bruteforce_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/crawler_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/f5attack_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4everyone.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4guest.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_need_multibyte.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_register_moratorium.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_register_insert_js_check.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_errorlog.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_redirection.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_errorlog.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/prepurge_exit_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/spamcheck_overrun_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/precommon_badip_message.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/HTMLPurifier/ Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/configs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_message.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/images/module_icon_old.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/library/ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/ProtectorFilter.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -24,6 +24,7 @@ // Abstract of each filter classes class ProtectorFilterAbstract { var $protector = null ; + var $errors = array(); function ProtectorFilterAbstract() { Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/registry.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/registry.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/registry.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,82 +0,0 @@ -<?php -// Author: Trabis -// URL: http://www.xuups.com -// E-Mail: lus...@gm... - -if (!defined("XOOPS_ROOT_PATH")) { - die("XOOPS root path not defined"); -} - -class ProtectorRegistry -{ - var $_entries; - var $_locks; - - function ProtectorRegistry() - { - $this->_entries = array(); - $this->_locks = array(); - } - - function getInstance() - { - static $instance = false; - if (!$instance) { - $instance = new ProtectorRegistry(); - } - return $instance; - } - - function setEntry($key, $item) - { - if ($this->isLocked($key) == true) { - trigger_error('Unable to set entry `' . $key . '`. Entry is locked.', E_USER_WARNING); - return false; - } - - $this->_entries[$key] = $item; - return true; - } - - function unsetEntry($key) - { - unset($this->_entries[$key]); - } - - function getEntry($key) - { - if (isset($this->_entries[$key]) == false) { - return null; - } - - return $this->_entries[$key]; - } - - function isEntry($key) - { - return ($this->getEntry($key) !== null); - } - - function lockEntry($key) - { - $this->_locks[$key] = true; - return true; - } - - function unlockEntry($key) - { - unset($this->_locks[$key]); - } - - function isLocked($key) - { - return (isset($this->_locks[$key]) == true); - } - - function unsetAll() - { - $this->_entries = array(); - $this->_locks = array(); - } -} -?> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/bruteforce_overrun_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/bruteforce_overrun_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/bruteforce_overrun_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,14 +1,30 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_bruteforce_overrun_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // header( 'Location: http://google.com/' ) ; // redirect somewhere - echo 'You have tried too many wrong loggin in' ; // write any message as you like - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_bruteforce_overrun_message extends ProtectorFilterAbstract +{ + public function execute() + { + // header( 'Location: http://google.com/' ) ; // redirect somewhere + echo 'You have failed to login too many times!'; // write any message as you like + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/crawler_overrun_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/crawler_overrun_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/crawler_overrun_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,14 +1,30 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_crawler_overrun_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // header( 'Location: http://google.com/' ) ; // redirect somewhere - echo 'You have accessed too many times while short term' ; // write any message as you like - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_crawler_overrun_message extends ProtectorFilterAbstract +{ + public function execute() + { + // header( 'Location: http://google.com/' ) ; // redirect somewhere + echo 'You have accessed too many times while short term'; // write any message as you like + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/f5attack_overrun_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/f5attack_overrun_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/f5attack_overrun_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,14 +1,30 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_f5attack_overrun_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // header( 'Location: http://google.com/' ) ; // redirect somewhere - echo 'You have reloaded a page too many times' ; // write any message as you like - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_f5attack_overrun_message extends ProtectorFilterAbstract +{ + function execute() + { + // header( 'Location: http://google.com/' ) ; // redirect somewhere + echo 'You have reloaded a page too many times'; // write any message as you like + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/index.html 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/index.html 2011-12-03 19:40:12 UTC (rev 8402) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,36 +1,51 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ + // get your 12-character access key from http://www.projecthoneypot.org/ -define( 'PROTECTOR_HTTPBL_KEY' , '............' ) ; +define('PROTECTOR_HTTPBL_KEY', '............'); -class protector_postcommon_post_deny_by_httpbl extends ProtectorFilterAbstract { +class protector_postcommon_post_deny_by_httpbl extends ProtectorFilterAbstract +{ + function execute() + { + $xoops = Xoops::getInstance(); - function execute() - { - // http:bl servers (don't enable too many servers) - $rbls = array( - 'http:BL' => PROTECTOR_HTTPBL_KEY.'.%s.dnsbl.httpbl.org' , - ) ; - - global $xoopsUser ; - - $rev_ip = implode( '.' , array_reverse( explode( '.' , @$_SERVER['REMOTE_ADDR'] ) ) ) ; - // test - // $rev_ip = '162.142.248.125' ; + // http:bl servers (don't enable too many servers) + $rbls = array( + 'http:BL' => PROTECTOR_HTTPBL_KEY . '.%s.dnsbl.httpbl.org', + ); - foreach( $rbls as $rbl_name => $rbl_fmt ) { - $host = sprintf( $rbl_fmt , $rev_ip ) ; - if( gethostbyname( $host ) != $host ) { - $this->protector->message .= "DENY by $rbl_name\n" ; - $uid = is_object( $xoopsUser ) ? $xoopsUser->getVar('uid') : 0 ; - $this->protector->output_log( 'RBL SPAM' , $uid , false , 128 ) ; - die( _MD_PROTECTOR_DENYBYRBL ) ; - } - } - - return true ; - } + $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR']))); + // test + // $rev_ip = '162.142.248.125' ; -} - -?> \ No newline at end of file + foreach ($rbls as $rbl_name => $rbl_fmt) { + $host = sprintf($rbl_fmt, $rev_ip); + if (gethostbyname($host) != $host) { + $this->protector->message .= "DENY by $rbl_name\n"; + $uid = $xoops->isUser() ? $xoops->user->getVar('uid') : 0; + $this->protector->output_log('RBL SPAM', $uid, false, 128); + die(_MD_PROTECTOR_DENYBYRBL); + } + } + return true; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_deny_by_rbl.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,38 +1,54 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_postcommon_post_deny_by_rbl extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // RBL servers (don't enable too many servers) - $rbls = array( - 'sbl-xbl.spamhaus.org' , -# 'niku.2ch.net' , -# 'list.dsbl.org' , -# 'bl.spamcop.net' , -# 'all.rbl.jp' , -# 'opm.blitzed.org' , -# 'bsb.empty.us' , -# 'bsb.spamlookup.net' , - ) ; - - global $xoopsUser ; - - $rev_ip = implode( '.' , array_reverse( explode( '.' , @$_SERVER['REMOTE_ADDR'] ) ) ) ; - - foreach( $rbls as $rbl ) { - $host = $rev_ip . '.' . $rbl ; - if( gethostbyname( $host ) != $host ) { - $this->protector->message .= "DENY by $rbl\n" ; - $uid = is_object( $xoopsUser ) ? $xoopsUser->getVar('uid') : 0 ; - $this->protector->output_log( 'RBL SPAM' , $uid , false , 128 ) ; - die( _MD_PROTECTOR_DENYBYRBL ) ; - } - } - - return true ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} +class protector_postcommon_post_deny_by_rbl extends ProtectorFilterAbstract +{ + function execute() + { + // RBL servers (don't enable too many servers) + $rbls = array( + 'sbl-xbl.spamhaus.org', + # 'niku.2ch.net' , + # 'list.dsbl.org' , + # 'bl.spamcop.net' , + # 'all.rbl.jp' , + # 'opm.blitzed.org' , + # 'bsb.empty.us' , + # 'bsb.spamlookup.net' , + ); -?> \ No newline at end of file + global $xoopsUser; + + $rev_ip = implode('.', array_reverse(explode('.', @$_SERVER['REMOTE_ADDR']))); + + foreach ($rbls as $rbl) { + $host = $rev_ip . '.' . $rbl; + if (gethostbyname($host) != $host) { + $this->protector->message .= "DENY by $rbl\n"; + $uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0; + $this->protector->output_log('RBL SPAM', $uid, false, 128); + die(_MD_PROTECTOR_DENYBYRBL); + } + } + + return true; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4everyone.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4everyone.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4everyone.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,50 +1,50 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_postcommon_post_htmlpurify4everyone extends ProtectorFilterAbstract { - var $purifier ; - var $method ; + 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. +*/ - function execute() - { - // HTMLPurifier runs with PHP5 only - if( version_compare( PHP_VERSION , '5.0.0' ) < 0 ) { - die( 'Turn postcommon_post_htmlpurify4everyone.php off because this filter cannot run with PHP4' ) ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - if( file_exists( XOOPS_ROOT_PATH.'/class/icms.htmlpurifier.php' ) ) { - // use HTMLPurifier inside ImpressCMS - if( ! class_exists( 'icms_HTMLPurifier' ) ) { - require_once ICMS_ROOT_PATH.'/class/icms.htmlpurifier.php' ; - } -// $pure = icms_HTMLPurifier::getPurifierInstance() ; -// $_POST = $pure->icms_html_purifier( $_POST , 'protector' ) ; - $this->purifier = icms_HTMLPurifier::getPurifierInstance() ; - $this->method = 'icms_html_purifier' ; +class protector_postcommon_post_htmlpurify4everyone extends ProtectorFilterAbstract +{ + var $purifier; - } else { - // use HTMLPurifier inside Protector - require_once dirname(dirname(__FILE__)).'/library/HTMLPurifier.auto.php' ; - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache', 'SerializerPath', XOOPS_TRUST_PATH.'/modules/protector/configs'); - $config->set('Core', 'Encoding', _CHARSET); - //$config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); - $this->purifier = new HTMLPurifier($config); - $this->method = 'purify' ; - } + var $method; - $_POST = $this->purify_recursive( $_POST ) ; - } + function execute() + { + $xoops = Xoops::getInstance(); + // use HTMLPurifier inside Protector + require_once $xoops->path('lib/HTMLPurifier/HTMLPurifier.auto.php'); + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache', 'SerializerPath', XOOPS_PATH); + $config->set('Core', 'Encoding', _CHARSET); + //$config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); + $this->purifier = new HTMLPurifier($config); + $this->method = 'purify'; + $_POST = $this->purify_recursive($_POST); + } - - function purify_recursive( $data ) - { - if( is_array( $data ) ) { - return array_map( array( $this , 'purify_recursive' ) , $data ) ; - } else { - return strlen( $data ) > 32 ? call_user_func( array( $this->purifier , $this->method ) , $data ) : $data ; - } - } - -} - -?> \ No newline at end of file + function purify_recursive($data) + { + if (is_array($data)) { + return array_map(array($this, 'purify_recursive'), $data); + } else { + return strlen($data) > 32 ? call_user_func(array($this->purifier, $this->method), $data) : $data; + } + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4guest.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4guest.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_htmlpurify4guest.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,56 +1,57 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_postcommon_post_htmlpurify4guest extends ProtectorFilterAbstract { - var $purifier ; - var $method ; + 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. +*/ - function execute() - { - global $xoopsUser ; +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - // HTMLPurifier runs with PHP5 only - if( version_compare( PHP_VERSION , '5.0.0' ) < 0 ) { - die( 'Turn postcommon_post_htmlpurify4guest.php off because this filter cannot run with PHP4' ) ; - } +class protector_postcommon_post_htmlpurify4guest extends ProtectorFilterAbstract +{ + var $purifier; - if( is_object( $xoopsUser ) ) { - return true ; - } + var $method; - if( file_exists( XOOPS_ROOT_PATH.'/class/icms.htmlpurifier.php' ) ) { - // use HTMLPurifier inside ImpressCMS - if( ! class_exists( 'icms_HTMLPurifier' ) ) { - require_once ICMS_ROOT_PATH.'/class/icms.htmlpurifier.php' ; - } -// $pure = icms_HTMLPurifier::getPurifierInstance() ; -// $_POST = $pure->icms_html_purifier( $_POST , 'protector' ) ; - $this->purifier = icms_HTMLPurifier::getPurifierInstance() ; - $this->method = 'icms_html_purifier' ; + function execute() + { + $xoops = Xoops::getInstance(); - } else { - // use HTMLPurifier inside Protector - require_once dirname(dirname(__FILE__)).'/library/HTMLPurifier.auto.php' ; - $config = HTMLPurifier_Config::createDefault(); - $config->set('Cache', 'SerializerPath', XOOPS_TRUST_PATH.'/modules/protector/configs'); - $config->set('Core', 'Encoding', _CHARSET); - //$config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); - $this->purifier = new HTMLPurifier($config); - $this->method = 'purify' ; - } + if ($xoops->isUser()) { + return true; + } - $_POST = $this->purify_recursive( $_POST ) ; - } + // use HTMLPurifier inside Protector + require_once $xoops->path('lib/HTMLPurifier/HTMLPurifier.auto.php'); + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache', 'SerializerPath', XOOPS_PATH); + $config->set('Core', 'Encoding', _CHARSET); + //$config->set('HTML', 'Doctype', 'HTML 4.01 Transitional'); + $this->purifier = new HTMLPurifier($config); + $this->method = 'purify'; + $_POST = $this->purify_recursive($_POST); + return true; + } - function purify_recursive( $data ) - { - if( is_array( $data ) ) { - return array_map( array( $this , 'purify_recursive' ) , $data ) ; - } else { - return strlen( $data ) > 32 ? call_user_func( array( $this->purifier , $this->method ) , $data ) : $data ; - } - } - -} - -?> \ No newline at end of file + function purify_recursive($data) + { + if (is_array($data)) { + return array_map(array($this, 'purify_recursive'), $data); + } else { + return strlen($data) > 32 ? call_user_func(array($this->purifier, $this->method), $data) : $data; + } + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_need_multibyte.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_need_multibyte.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_need_multibyte.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,43 +1,65 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ + // Don't enable this for site using single-byte // Perhaps, japanese, schinese, tchinese, and korean can use it -class protector_postcommon_post_need_multibyte extends ProtectorFilterAbstract { +class protector_postcommon_post_need_multibyte extends ProtectorFilterAbstract +{ + function execute() + { + $xoops = Xoops::getInstance(); - function execute() - { - global $xoopsUser ; - - if( ! function_exists( 'mb_strlen' ) ) return true ; - - // registered users always pass this plugin - if( is_object( $xoopsUser ) ) return true ; - - $lengths = array( - 0 => 100 , // default value - 'message' => 2 , - 'com_text' => 2 , - 'excerpt' => 2 , - ) ; - - foreach( $_POST as $key => $data ) { - // dare to ignore arrays/objects - if( ! is_string( $data ) ) continue ; - - $check_length = isset( $lengths[ $key ] ) ? $lengths[ $key ] : $lengths[ 0 ] ; - if( strlen( $data ) > $check_length ) { - if( strlen( $data ) == mb_strlen( $data ) ) { - $this->protector->message .= "No multibyte character was found ($data)\n" ; - $this->protector->output_log( 'Singlebyte SPAM' , 0 , false , 128 ) ; - die( 'Protector rejects your post, because your post looks like SPAM' ) ; - } - } - } - - return true ; - } + if (!function_exists('mb_strlen')) { + return true; + } -} + // registered users always pass this plugin + if ($xoops->isUser()) { + return true; + } -?> \ No newline at end of file + $lengths = array( + 0 => 100, // default value + 'message' => 2, + 'com_text' => 2, + 'excerpt' => 2, + ); + + foreach ($_POST as $key => $data) { + // dare to ignore arrays/objects + if (!is_string($data)) { + continue; + } + + $check_length = isset($lengths[$key]) ? $lengths[$key] : $lengths[0]; + if (strlen($data) > $check_length) { + if (strlen($data) == mb_strlen($data)) { + $this->protector->message .= "No multibyte character was found ($data)\n"; + $this->protector->output_log('Singlebyte SPAM', 0, false, 128); + die('Protector rejects your post, because your post looks like SPAM'); + } + } + } + + return true; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_register_moratorium.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_register_moratorium.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_post_register_moratorium.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,26 +1,43 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -define( 'PROTECTOR_POSTCOMMON_POST_REGISTER_MORATORIUM' , 60 ) ; // minutes + 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. +*/ -class protector_postcommon_post_register_moratorium extends ProtectorFilterAbstract { +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - function execute() - { - global $xoopsUser ; +define('PROTECTOR_POSTCOMMON_POST_REGISTER_MORATORIUM', 60); // minutes - if( ! is_object( $xoopsUser ) ) { - return true ; - } +class protector_postcommon_post_register_moratorium extends ProtectorFilterAbstract +{ + function execute() + { + $xoops = Xoops::getInstance(); - $moratorium_result = intval( ( $xoopsUser->getVar('user_regdate') + PROTECTOR_POSTCOMMON_POST_REGISTER_MORATORIUM * 60 - time() ) / 60 ) ; - if( $moratorium_result > 0 ) { - if( preg_match( '#(https?\:|\[\/url\]|www\.)#' , serialize( $_POST ) ) ) { - printf( _MD_PROTECTOR_FMT_REGISTER_MORATORIUM , $moratorium_result ) ; - exit ; - } - } - } + if (!$xoops->isUser()) { + return true; + } + $moratorium_result = intval(($xoops->user->getVar('user_regdate') + PROTECTOR_POSTCOMMON_POST_REGISTER_MORATORIUM * 60 - time()) / 60); + if ($moratorium_result > 0) { + if (preg_match('#(https?\:|\[\/url\]|www\.)#', serialize($_POST))) { + printf(_MD_PROTECTOR_FMT_REGISTER_MORATORIUM, $moratorium_result); + exit; + } + } + return true; + } } - -?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_register_insert_js_check.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_register_insert_js_check.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/postcommon_register_insert_js_check.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,76 +1,97 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_postcommon_register_insert_js_check extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - ob_start( array( $this , 'ob_filter' ) ) ; +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - if( ! empty( $_POST ) ) { - if( ! $this->checkValidate() ) { - die( _MD_PROTECTOR_TURNJAVASCRIPTON ) ; - } - } +class protector_postcommon_register_insert_js_check extends ProtectorFilterAbstract +{ + function execute() + { + ob_start(array($this, 'ob_filter')); - return true ; - } + if (!empty($_POST)) { + if (!$this->checkValidate()) { + die(_MD_PROTECTOR_TURNJAVASCRIPTON); + } + } - // insert javascript into the registering form - function ob_filter( $s ) - { - $antispam_htmls = $this->getHtml4Assign() ; + return true; + } - return preg_replace( '/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i' , '$0'."\n".$antispam_htmls['html_in_form']."\n".$antispam_htmls['js_global'] , $s , 1 ) ; - } + // insert javascript into the registering form + function ob_filter($s) + { + $antispam_htmls = $this->getHtml4Assign(); + return preg_replace('/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i', '$0' . "\n" . $antispam_htmls['html_in_form'] . "\n" . $antispam_htmls['js_global'], $s, 1); + } - // import from D3forumAntispamDefault.clas.php - function getMd5( $time = null ) - { - if( empty( $time ) ) $time = time() ; - return md5( gmdate( 'YmdH' , $time ) . XOOPS_DB_PREFIX . XOOPS_DB_NAME ) ; - } + // import from D3forumAntispamDefault.clas.php + function getMd5($time = null) + { + if (empty($time)) { + $time = time(); + } + return md5(gmdate('YmdH', $time) . XOOPS_DB_PREFIX . XOOPS_DB_NAME); + } - function getHtml4Assign() - { - $as_md5 = $this->getMd5() ; - $as_md5array = preg_split( '//' , $as_md5 , -1 , PREG_SPLIT_NO_EMPTY ) ; - $as_md5shuffle = array() ; - foreach( $as_md5array as $key => $val ) { - $as_md5shuffle[] = array( 'key' => $key , 'val' => $val ) ; - } - shuffle( $as_md5shuffle ) ; - $js_in_validate_function = "antispam_md5s=new Array(32);\n" ; - foreach( $as_md5shuffle as $item ) { - $key = $item['key'] ; - $val = $item['val'] ; - $js_in_validate_function .= "antispam_md5s[$key]='$val';\n" ; - } - $js_in_validate_function .= " + function getHtml4Assign() + { + $as_md5 = $this->getMd5(); + $as_md5array = preg_split('//', $as_md5, -1, PREG_SPLIT_NO_EMPTY); + $as_md5shuffle = array(); + foreach ($as_md5array as $key => $val) { + $as_md5shuffle[] = array( + 'key' => $key, + 'val' => $val + ); + } + shuffle($as_md5shuffle); + $js_in_validate_function = "antispam_md5s=new Array(32);\n"; + foreach ($as_md5shuffle as $item) { + $key = $item['key']; + $val = $item['val']; + $js_in_validate_function .= "antispam_md5s[$key]='$val';\n"; + } + $js_in_validate_function .= " antispam_md5 = '' ; for( i = 0 ; i < 32 ; i ++ ) { antispam_md5 += antispam_md5s[i] ; } xoopsGetElementById('antispam_md5').value = antispam_md5 ; - " ; - - return array( - 'html_in_form' => '<input type="hidden" name="antispam_md5" id="antispam_md5" value="" />' , - 'js_global' => '<script type="text/javascript"><!--//'."\n".$js_in_validate_function."\n".'//--></script><noscript><div class="errorMsg">'._MD_PROTECTOR_TURNJAVASCRIPTON.'</div></noscript>' , - ) ; - } + "; - function checkValidate() - { - $user_md5 = trim( @$_POST['antispam_md5'] ) ; - - // 2-3 hour margin - if( $user_md5 != $this->getMd5() && $user_md5 != $this->getMd5( time() - 3600 ) && $user_md5 != $this->getMd5( time() - 7200 ) ) { - $this->errors[] = _MD_PROTECTOR_TURNJAVASCRIPTON ; - return false ; - } - return true ; - } -} + return array( + 'html_in_form' => '<input type="hidden" name="antispam_md5" id="antispam_md5" value="" />', + 'js_global' => '<script type="text/javascript"><!--//' . "\n" . $js_in_validate_function . "\n" . '//--></script><noscript><div class="errorMsg">' . _MD_PROTECTOR_TURNJAVASCRIPTON . '</div></noscript>', + ); + } -?> \ No newline at end of file + function checkValidate() + { + $user_md5 = trim(@$_POST['antispam_md5']); + + // 2-3 hour margin + if ($user_md5 != $this->getMd5() && $user_md5 != $this->getMd5(time() - 3600) && $user_md5 != $this->getMd5(time() - 7200)) { + $this->errors[] = _MD_PROTECTOR_TURNJAVASCRIPTON; + return false; + } + return true; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_errorlog.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_errorlog.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_errorlog.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,18 +1,34 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_precommon_badip_errorlog extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - echo _MD_PROTECTOR_YOUAREBADIP ; - $protector = Protector::getInstance() ; - if( $protector->ip_matched_info ) { - printf( _MD_PROTECTOR_FMT_JAILINFO , date( _MD_PROTECTOR_FMT_JAILTIME , $protector->ip_matched_info ) ) ; - } - error_log( 'Protector: badip '.@$_SERVER['REMOTE_ADDR'] , 0 ) ; - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_precommon_badip_errorlog extends ProtectorFilterAbstract +{ + function execute() + { + echo _MD_PROTECTOR_YOUAREBADIP; + $protector = Protector::getInstance(); + if ($protector->ip_matched_info) { + printf(_MD_PROTECTOR_FMT_JAILINFO, date(_MD_PROTECTOR_FMT_JAILTIME, $protector->ip_matched_info)); + } + error_log('Protector: badip ' . @$_SERVER['REMOTE_ADDR'], 0); + exit; + } +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,13 +0,0 @@ -<?php - -class protector_precommon_badip_message extends ProtectorFilterAbstract { - - function execute() - { - echo _MD_PROTECTOR_YOUAREBADIP ; - exit ; - } - -} - -?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_redirection.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_redirection.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_badip_redirection.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,17 +1,33 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -// define it as you like :-) + 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. +*/ -define( 'PROTECTOR_BADIP_REDIRECTION_URI' , 'http://yahoo.com/' ) ; +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -class protector_precommon_badip_redirection extends ProtectorFilterAbstract { +// define it as you like :-) - function execute() - { - header( 'Location: '.PROTECTOR_BADIP_REDIRECTION_URI ) ; - exit ; - } +define('PROTECTOR_BADIP_REDIRECTION_URI', 'http://yahoo.com/'); -} - -?> \ No newline at end of file +class protector_precommon_badip_redirection extends ProtectorFilterAbstract +{ + function execute() + { + header('Location: ' . PROTECTOR_BADIP_REDIRECTION_URI); + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_errorlog.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_errorlog.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_errorlog.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,17 +1,33 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_precommon_bwlimit_errorlog extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - header( 'HTTP/1.0 503 Service unavailable' ) ; - header( 'Retry-After: 600' ) ; +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - echo _MD_PROTECTOR_BANDWIDTHLIMITED ; - error_log( 'Protector: bwlimit '.@$_SERVER['REMOTE_ADDR'] , 0 ) ; - exit ; - } +class protector_precommon_bwlimit_errorlog extends ProtectorFilterAbstract +{ + function execute() + { + header('HTTP/1.0 503 Service unavailable'); + header('Retry-After: 600'); -} - -?> \ No newline at end of file + echo _MD_PROTECTOR_BANDWIDTHLIMITED; + error_log('Protector: bwlimit ' . @$_SERVER['REMOTE_ADDR'], 0); + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/precommon_bwlimit_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,16 +1,32 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_precommon_bwlimit_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - header( 'HTTP/1.0 503 Service unavailable' ) ; - header( 'Retry-After: 600' ) ; +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ - echo _MD_PROTECTOR_BANDWIDTHLIMITED ; - exit ; - } +class protector_precommon_bwlimit_message extends ProtectorFilterAbstract +{ + function execute() + { + header('HTTP/1.0 503 Service unavailable'); + header('Retry-After: 600'); -} - -?> \ No newline at end of file + echo _MD_PROTECTOR_BANDWIDTHLIMITED; + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/prepurge_exit_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/prepurge_exit_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/prepurge_exit_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,14 +1,30 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_prepurge_exit_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // header( 'Location: http://google.com/' ) ; // redirect somewhere - echo 'Protector detects attacking actions' ; // write any message as you like - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_prepurge_exit_message extends ProtectorFilterAbstract +{ + function execute() + { + // header( 'Location: http://google.com/' ) ; // redirect somewhere + echo 'Protector detected attacking actions'; // write any message as you like + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/spamcheck_overrun_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/spamcheck_overrun_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_disabled/spamcheck_overrun_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,14 +1,30 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_spamcheck_overrun_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - // header( 'Location: http://google.com/' ) ; // redirect somewhere - echo 'Your post looks like SPAM' ; // write any message as you like - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_spamcheck_overrun_message extends ProtectorFilterAbstract +{ + function execute() + { + // header( 'Location: http://google.com/' ) ; // redirect somewhere + echo 'Your post looks like SPAM'; // write any message as you like + exit; + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/precommon_badip_message.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/precommon_badip_message.php 2011-12-03 19:02:00 UTC (rev 8401) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/filters_enabled/precommon_badip_message.php 2011-12-03 19:40:12 UTC (rev 8402) @@ -1,17 +1,33 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -class protector_precommon_badip_message extends ProtectorFilterAbstract { + 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. +*/ - function execute() - { - echo _MD_PROTECTOR_YOUAREBADIP ; - $protector = Protector::getInstance() ; - if( $protector->ip_matched_info ) { - printf( _MD_PROTECTOR_FMT_JAILINFO , date( _MD_PROTECTOR_FMT_JAILTIME , $protector->ip_matched_info ) ) ; - } - exit ; - } +/** + * Protector + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package protector + * @author trabis <lus...@gm...> + * @version $Id$ + */ -} - -?> \ No newline at end of file +class protector_precommon_badip_message extends ProtectorFilterAbstract +{ + public function execute() + { + echo _MD_PROTECTOR_YOUAREBADIP; + $protector = Protector::getInstance(); + if ($protector->ip_matched_info) { + printf(_MD_PROTECTOR_FMT_JAILINFO, date(_MD_PROTECTOR_FMT_JAILTIME, $protector->ip_matched_info)); + } + exit; + } +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/images/module_icon_old.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-12-04 20:26:22
|
Revision: 8407 http://xoops.svn.sourceforge.net/xoops/?rev=8407&view=rev Author: mageg Date: 2011-12-04 20:26:13 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Integration of moduleadmin class in xoops Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/bg_button.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/1day.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/ASC.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/DESC.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/attach.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/close12.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/delete.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/download.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/edit.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcopy.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcut.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editpaste.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/film.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/forum.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green_off.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/inserttable.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_delete.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_forward.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_generic.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_new.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_replay.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/off.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/on.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/open12.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pdf.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pixel.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/printer.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red_off.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/rss.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/search.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/topic.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/up.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/about.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/add.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/addlink.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/administration.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/album.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/alert.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/attach.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/bg_button.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/block.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/brokenlink.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/button_ok.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/calculator.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/cart_add.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/cash_stack.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/category.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/compfile.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/content.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/delete.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/delivery.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/digest.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/discount.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/download.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/event.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/exec.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/export.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/extention.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/faq.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/fileshare.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/firewall.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/folder1_html.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/folder_txt.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/forums.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/globe.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/groupmod.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/help.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/highlight.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/home.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/identity.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/index.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/insert_table_row.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/languages.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/list.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/mail_country.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/mail_foward.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/manage.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/marquee.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/metagen.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/modifiedlink.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/newsletter.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/permissions.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/photo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/poll.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/prune.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/security.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/slideshow.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/smilies.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/stats.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/submittedlink.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/synchronized.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/type.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/update.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/user-icon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/users.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/view_detailed.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/view_text.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/watermark.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/xoopsmicrobutton.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/balatarin.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/blinklist.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/delicious.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/designfloat.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/diggman.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/facebook_share_icon.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/fark.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/furl.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/google-icon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/google-reader-icon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/google_buzz_icon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/mixx.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/myspace.jpg XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/newsvine.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/reddit.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/scriptandstyle.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/sel.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/simpy.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/spurl.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/stumbleupon.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/technorati.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/twitter_share_icon.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/xnewsvine.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/bookmarks/yahoomyweb.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/index.html Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2011-12-04 20:26:13 UTC (rev 8407) @@ -0,0 +1,456 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Xoops Moduleadmin Classes + * + * @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 + * @since 2.6.0 + * @author Mage Grégory (AKA Mage) + * @version $Id$ + */ + +class XoopsModuleAdmin +{ + + var $_itemButton = array(); + var $_itemInfoBox = array(); + var $_itemInfoBoxLine = array(); + var $_itemConfigBoxLine = array(); + var $_obj = array(); + + /** + * Constructor + */ + function __construct() + { + global $xoopsModule; + $this->_obj =& $xoopsModule; + echo "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/media/xoops/css/moduladmin.css\";</style>"; + } + + function getInfo() + { + $infoArray = array(); + if (!isset($infoArray) or empty($infoArray)) { + $infoArray = array(); + $infoArray['methods'] = $this->getClassMethods(); + } + return $infoArray; + } + + /** + * Return the available methods for the class + * + * @return array methods supported by this class + */ + function getClassMethods() + { + $myMethods = get_class_methods(__CLASS__); + return $myMethods; + } + + //****************************************************************************************************************** + // renderMenuIndex + //****************************************************************************************************************** + // Creating a menu icon in the index + //****************************************************************************************************************** + function renderMenuIndex() + { + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $pathsystem = XOOPS_URL . "/modules/system/"; + $this->_obj->loadAdminMenu(); + $ret = "<div class=\"rmmenuicon\">\n"; + foreach (array_keys( $this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php'){ + $ret .= "<a href=\"../" . $this->_obj->adminmenu[$i]['link'] . "\" title=\"" . $this->_obj->adminmenu[$i]['title'] . "\">"; + $ret .= "<img src=\"" . $path . $this->_obj->adminmenu[$i]['icon']. "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />"; + $ret .= "<span>" . $this->_obj->adminmenu[$i]['title'] . "</span>"; + $ret .= "</a>"; + } + } + if ($this->_obj->getInfo('help')) { + if (substr(XOOPS_VERSION, 0, 9) >= 'XOOPS 2.5'){ + $ret .= "<a href=\"" . $pathsystem . "help.php?mid=" . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help') . "\" title=\"" . _AM_SYSTEM_HELP . "\">"; + $ret .= "<img width=\"32px\" src=\"" . XOOPS_URL . "/media/xoops/images/icons/32/help.png\" alt=\"" . _AM_SYSTEM_HELP . "\" /> "; + $ret .= "<span>" . _AM_SYSTEM_HELP . "</span>"; + $ret .= "</a>"; + } + } + $ret .= "</div>\n<div style=\"clear: both;\"></div>\n"; + return $ret; + } + //****************************************************************************************************************** + // renderButton + //****************************************************************************************************************** + // Creating button + //****************************************************************************************************************** + function renderButton($position = "right", $delimeter = " ") + { + $path = XOOPS_URL . "/media/xoops/images/icons/32/"; + switch ($position) + { + default: + case "right": + $ret = "<div class=\"floatright\">\n"; + break; + + case "left": + $ret = "<div class=\"floatleft\">\n"; + break; + + case "center": + $ret = "<div class=\"aligncenter\">\n"; + } + $ret .= "<div class=\"xo-buttons\">\n"; + foreach (array_keys( $this -> _itemButton) as $i) { + $ret .= "<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[$i]['link'] . "' title='" . $this -> _itemButton[$i]['title'] . "'>"; + $ret .= "<img src='" . $path . $this -> _itemButton[$i]['icon'] . "' title='" . $this -> _itemButton[$i]['title'] . "' />" . $this -> _itemButton[$i]['title'] . ' ' . $this -> _itemButton[$i]['extra']; + $ret .= "</a>\n"; + $ret .= $delimeter; + } + $ret .= "</div>\n</div>\n"; + $ret .= "<br /> <br /><br />"; + return $ret; + } + + function addItemButton($title, $link, $icon = 'add', $extra = '') + { + $ret['title'] = $title; + $ret['link'] = $link; + $ret['icon'] = $icon . '.png'; + $ret['extra'] = $extra; + $this -> _itemButton[] = $ret; + return true; + + } + //****************************************************************************************************************** + // addConfigBoxLine + //****************************************************************************************************************** + // $value: value + // $type: type of config: 1- "default": Just a line with value. + // 2- "folder": check if this is an folder. + // 3- "chmod": check if this is the good chmod. + // For this type ("chmod"), the value is an array: array(path, chmod) + //****************************************************************************************************************** + function addConfigBoxLine($value = '', $type = 'default') + { + $line = ""; + $path = XOOPS_URL . "/media/xoops/images/icons/16/"; + switch ($type) + { + default: + case "default": + $line .= "<span>" . $value . "</span>"; + break; + + case "folder": + if (!is_dir($value)){ + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "off.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value); + $line .= "</span>\n"; + }else{ + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "on.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value); + $line .= "</span>\n"; + } + break; + + case "chmod": + if (is_dir($value[0])){ + if (substr(decoct(fileperms($value[0])),2) != $value[1]) { + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "off.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); + $line .= "</span>\n"; + }else{ + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "on.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); + $line .= "</span>\n"; + } + } + break; + } + $this -> _itemConfigBoxLine[] = $line; + return true; + } + //****************************************************************************************************************** + // renderIndex + //****************************************************************************************************************** + // Creating an index + //****************************************************************************************************************** + function renderIndex() + { + $ret = "<table>\n<tr>\n"; + $ret .= "<td width=\"40%\">\n"; + $ret .= $this -> renderMenuIndex(); + $ret .= "</td>\n"; + $ret .= "<td width=\"60%\">\n"; + $ret .= $this -> renderInfoBox(); + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + // If you use a config label + if ($this->_obj->getInfo('min_php') || $this->_obj->getInfo('min_xoops') || !empty($this -> _itemConfigBoxLine)){ + $ret .= "<tr>\n"; + $ret .= "<td colspan=\"2\">\n"; + $ret .= "<fieldset><legend class=\"label\">"; + $ret .= _AM_MODULEADMIN_CONFIG; + $ret .= "</legend>\n"; + + // php version + $path = XOOPS_URL . "/media/xoops/images/icons/16/"; + if ($this->_obj->getInfo('min_php')){ + if (phpversion() < $this->_obj->getInfo('min_php')){ + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; + }else{ + $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; + } + $ret .= "<br />"; + } + + // Database version + $path = XOOPS_URL . "/media/xoops/images/icons/16/"; + $dbarray=$this->_obj->getInfo('min_db'); + if ($dbarray[XOOPS_DB_TYPE]) { + switch (XOOPS_DB_TYPE) { + case "mysql": + $dbCurrentVersion= mysql_get_server_info(); + break; + case "mysqli": + $dbCurrentVersion = mysqli_get_server_info(); + break; + case "pdo": + global $xoopsDB; + $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION); + break; + default: + $dbCurrentVersion = '0'; + break; + } + $currentVerParts = explode('.', (string)$dbCurrentVersion); + $iCurrentVerParts = array_map('intval', $currentVerParts); + $dbRequiredVersion = $dbarray[XOOPS_DB_TYPE]; + $reqVerParts = explode('.', (string)$dbRequiredVersion); + $iReqVerParts = array_map('intval', $reqVerParts); + $icount = $j = count($iReqVerParts); + $reqVer = $curVer = 0; + for ($i=0; $i<$icount; $i++) { + $j--; + $reqVer += $iReqVerParts[$i] * pow(10, $j); + if (isset($iCurrentVerParts[$i])) { + $curVer += $iCurrentVerParts[$i] * pow(10, $j); + } else { + $curVer = $curVer * pow(10, $j); + } + } + if ($reqVer > $curVer) { + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(XOOPS_DB_TYPE.' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + } else { + $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + } + } + + // xoops version + if ($this->_obj->getInfo('min_xoops')){ + if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6) < $this->_obj->getInfo('min_xoops')){ + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; + }else{ + $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; + } + $ret .= "<br />"; + } + if (!empty($this -> _itemConfigBoxLine)){ + foreach (array_keys( $this -> _itemConfigBoxLine) as $i) { + $ret .= $this -> _itemConfigBoxLine[$i]; + $ret .= "<br />"; + } + } + $ret .= "</fieldset>\n"; + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + } + $ret .= "</table>\n"; + return $ret; + } + //****************************************************************************************************************** + // addInfoBox + //****************************************************************************************************************** + // $title: title of an InfoBox + //****************************************************************************************************************** + function addInfoBox($title) + { + $ret['title'] = $title; + $this -> _itemInfoBox[] = $ret; + return true; + } + //****************************************************************************************************************** + // addInfoBoxLine + //****************************************************************************************************************** + // $label: title of InfoBox Line + // $text: + // $type: type of config: 1- "default": Just a line with value. + // 2- "information": check if this is an folder. + // 3- "chmod": check if this is the good chmod. + // For this type ("chmod"), the value is an array: array(path, chmod) + //****************************************************************************************************************** + function addInfoBoxLine($label, $text, $value = '', $color = 'inherit', $type = 'default') + { + $ret['label'] = $label; + $line = ""; + switch ($type) + { + default: + case "default": + $line .= sprintf($text, "<span style='color : " . $color . "; font-weight : bold;'>" . $value . "</span>"); + break; + + case "information": + $line .= $text; + break; + } + $ret['line'] = $line; + $this -> _itemInfoBoxLine[] = $ret; + return true; + } + function renderInfoBox() + { + $ret = ""; + foreach (array_keys( $this -> _itemInfoBox) as $i) { + $ret .= "<fieldset><legend class=\"label\">"; + $ret .= $this -> _itemInfoBox[$i]['title']; + $ret .= "</legend>\n"; + foreach (array_keys( $this -> _itemInfoBoxLine) as $k) { + if ($this -> _itemInfoBoxLine[$k]['label'] == $this -> _itemInfoBox[$i]['title']){ + $ret .= $this -> _itemInfoBoxLine[$k]['line']; + $ret .= "<br />"; + } + } + $ret .= "</fieldset>\n"; + $ret .= "<br/>\n"; + } + return $ret; + } + + + function renderAbout($paypal = '', $logo_xoops = true) + { + $path = XOOPS_URL . "/media/xoops/images/icons/32/"; + + $ret = "<table>\n<tr>\n"; + $ret .= "<td width=\"50%\">\n"; + $date = explode('/',$this->_obj->getInfo('release_date')); + $author = explode(',',$this->_obj->getInfo('author')); + $nickname = explode(',',$this->_obj->getInfo('nickname')); + $release_date = XoopsLocal::formatTimestamp(mktime(0, 0, 0, $date[1], $date[2], $date[0]), 's'); + $module_info = '<div id="about"><label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"),"m") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_MODULESTATUS . '</label><text>' . $this->_obj->getInfo("module_status") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="'. $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> + ' . $this->_obj->getInfo("module_website_name") . '</a></text></div>'; + $ret .= "<table>\n<tr>\n<td width=\"100px\">\n"; + $ret .= "<img src='" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->getInfo('image') . "' alt='" . $this->_obj->getVar('name') . "' style='float: left; margin-right: 10px;' />\n"; + $ret .= "</td><td>\n"; + $ret .= "<div style='margin-top: 1px; margin-bottom: 4px; font-size: 18px; line-height: 18px; color: #2F5376; font-weight: bold;'>\n"; + $ret .= $this->_obj->getInfo('name') . " " . $this->_obj->getInfo('version') . " " . $this->_obj->getInfo('module_status') . " (" . $release_date . ")\n"; + $ret .= "<br />\n"; + $ret .= "</div>\n"; + $ret .= "<div style='line-height: 16px; font-weight: bold;'>\n"; + $ret .= "by "; + foreach (array_keys($author) as $i) { + $ret .= $author[$i]; + if (isset($nickname[$i]) && $nickname[$i] !='') { + $ret .= " (" . $nickname[$i] . "), "; + }else{ + $ret .= ", "; + } + } + $ret = substr($ret,0,-2); + $ret .= "</div>\n"; + $ret .= "<div style='line-height: 16px;'>\n"; + $ret.= "<a href=\"http://" . $this->_obj->getInfo('license_url'). "\" target=\"_blank\" >" . $this->_obj->getInfo('license'). "</a>\n"; + $ret .= "<br />\n"; + $ret .= "<a href=\"http://" . $this->_obj->getInfo('website') . "\" target=\"_blank\" >" . $this->_obj->getInfo('website') . "</a>\n"; + $ret .= "<br />\n"; + $ret .= "<br />\n"; + if ($paypal != ''){ + $ret .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_s-xclick"> + <input type="hidden" name="hosted_button_id" value="' . $paypal . '"> + <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> + <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> + </form>'; + } + $ret .= "</div>\n"; + $ret .= "</td>\n</tr>\n</table>\n"; + $this -> addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO); + $this -> addInfoBoxLine(_AM_MODULEADMIN_ABOUT_MODULEINFO, $module_info, '', '', 'information'); + $ret .= $this -> renderInfoBox(); + $ret .= "</td>\n"; + $ret .= "<td width=\"50%\">\n"; + $ret .= "<fieldset><legend class=\"label\">\n"; + $ret .= _AM_MODULEADMIN_ABOUT_CHANGELOG; + $ret .= "</legend><br/>\n"; + $ret .= "<div class=\"txtchangelog\">\n"; + $language = $GLOBALS['xoopsConfig']['language']; + if ( !is_file( XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt" ) ){ + $language = 'english'; + } + $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; + $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; + if ( is_readable( $file ) ){ + $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; + }else{ + $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/docs/changelog.txt"; + if ( is_readable( $file ) ){ + $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; + } + } + $ret .= "</div>\n"; + $ret .= "</fieldset>\n"; + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + $ret .= "</table>\n"; + if ($logo_xoops == true){ + $ret .= "<div align=\"center\">"; + $ret .= "<a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . $path . "xoopsmicrobutton.gif\" alt=\"XOOPS\" title=\"XOOPS\"></a>"; + $ret .= "</div>"; + } + return $ret; + } + + function addNavigation($menu = '') + { + $ret = ""; + $navigation = ""; + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $this->_obj->loadAdminMenu(); + foreach (array_keys( $this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu){ + $navigation .= $this->_obj->adminmenu[$i]['title'] . " | "; + $ret = "<div class=\"CPbigTitle\" style=\"background-image: url(" . $path . $this->_obj->adminmenu[$i]['icon'] . "); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> + <strong>" . $this->_obj->adminmenu[$i]['title'] . "</strong></div><br />"; + }else{ + $navigation .= "<a href = '../" . $this->_obj->adminmenu[$i]['link'] . "'>" . $this->_obj->adminmenu[$i]['title'] . "</a> | "; + } + } + if (substr(XOOPS_VERSION, 0, 9) < 'XOOPS 2.5'){ + $navigation .= "<a href = '../../system/admin.php?fct=preferences&op=showmod&mod=" . $this->_obj->getVar('mid') . "'>" . _MI_SYSTEM_ADMENU6 . "</a>"; + $ret = $navigation . "<br /><br />" . $ret; + } + return $ret; + } +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-12-04 20:20:19 UTC (rev 8406) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-12-04 20:26:13 UTC (rev 8407) @@ -310,6 +310,7 @@ 'xoopsmembership' => XOOPS_ROOT_PATH . '/kernel/membership.php', 'xoopsmembershiphandler' => XOOPS_ROOT_PATH . '/kernel/membership.php', 'xoopsmodelfactory' => XOOPS_ROOT_PATH . '/class/model/xoopsmodel.php', + 'xoopsmoduleadmin' => XOOPS_ROOT_PATH . '/class/moduleadmin.php', 'xoopsmodules' => XOOPS_ROOT_PATH . '/kernel/module.php', 'xoopsmodulehandler' => XOOPS_ROOT_PATH . '/kernel/module.php', 'xoopsmultimailer' => XOOPS_ROOT_PATH . '/class/mail/xoopsmultimailer.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2011-12-04 20:20:19 UTC (rev 8406) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2011-12-04 20:26:13 UTC (rev 8407) @@ -20,4 +20,20 @@ define('_AD_WARNINGNOTWRITEABLE', 'WARNING: Folder %s is not writeable by the server. <br />Please change the permission of this folder.<br /> in Unix (777), in Win32 (writable)'); define('_AD_WARNINGXOOPSLIBINSIDE', 'WARNING: Folder %s is inside DocumentRoot! <br />For security considerations it is highly suggested to move it out of DocumentRoot.'); +//since 2-6 +// Info +define('_AM_MODULEADMIN_CONFIG','Configuration Check'); +define('_AM_MODULEADMIN_CONFIG_CHMOD',"The folder '%s' must be with a chmod '%s' (it's now set on %s).'"); +define('_AM_MODULEADMIN_CONFIG_FOLDERKO',"The folder '%s' does not exist"); +define('_AM_MODULEADMIN_CONFIG_FOLDEROK',"The folder '%s' exists"); +define('_AM_MODULEADMIN_CONFIG_PHP','Minimum PHP required: %s (your version is %s)'); +define('_AM_MODULEADMIN_CONFIG_XOOPS','Minimum XOOPS required: %s (your version is %s)'); +define('_AM_MODULEADMIN_CONFIG_DB','minimum version required: %s (your version is %s)'); +// About +define('_AM_MODULEADMIN_ABOUT_CHANGELOG','Change log'); +define('_AM_MODULEADMIN_ABOUT_DESCRIPTION','Description'); +define('_AM_MODULEADMIN_ABOUT_MODULEINFO','Module Info'); +define('_AM_MODULEADMIN_ABOUT_MODULESTATUS','Status:'); +define('_AM_MODULEADMIN_ABOUT_UPDATEDATE','Update date:'); +define('_AM_MODULEADMIN_ABOUT_WEBSITE','Website:'); ?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/index.html 2011-12-04 20:26:13 UTC (rev 8407) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2011-12-04 20:26:13 UTC (rev 8407) @@ -0,0 +1,197 @@ +/* Buttons style */ +.xo-buttons a, .xo-buttons button { + display: block-inline; + margin: 0 5px 0 0; + background: #e4e4e5 url('../images/bg_button.gif') repeat-x; + border: 1px solid #d6d6d6; + border-top: 1px solid #dedede; + border-left: 1px solid #dedede; + font-family: "Lucida Grande", Tahoma, Arial, Verdana, sans-serif; + font-size: 100%; + line-height: 110%; + text-decoration: none; + font-weight: bold; + color: #454545; + cursor: pointer; + padding: 3px 8px 4px 5px; /* Links */ +} + +.xo-buttons a:hover, .xo-buttons button:hover { + border: 1px solid #ccc; + border-top: 1px solid #d6d6d6; + border-left: 1px solid #d6d6d6; +} + +.xo-buttons button { + width: auto; + overflow: visible; + padding: 3px 8px 4px 5px; /* IE6 */ +} + +.xo-buttons button[type] { + padding: 3px 5px 4px 5px; /* Firefox */ + line-height: 15px; /* Safari */ +} + +*:first-child+html button[type] { + padding: 3px 8px 4px 5px; /* IE7 */ +} + +.xo-buttons button img, .xo-buttons a img { + margin: 0 3px -3px 0 !important; + padding: 0; + border: none; + width: 16px; + height: 16px; +} + +.ui-corner-all { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +/* Buttons style */ + +/* align */ +.floatright { + float: right; + margin: 0; + padding: 2px; + border: 0; +} + +.floatleft { + float: left; + margin: 0; + padding: 2px; + border: 0; +} + +.aligncenter { + text-align: center; + margin: 0; + padding: 2px; + border: 0; +} + +/* align */ + +/* label */ +.label { + + color: #2F5376; + font-weight: bold; +} + + +/* label */ + +/* about */ +#about label, #about text { + display: block; + float: left; + margin-bottom: 12px; +} + + +#about label { + text-align: right; + width: 200px; + padding-right: 20px; +} + + br { + clear: left; + } + +#about br { + clear: both; +} + +/* InfoBox for Tag, XoopsPartners module +TODO Needs to be merged into the normal label/text */ + + infolabel,infotext { + display: block; + float: left; + margin-bottom: 2px; + } + infolabel { + text-align: right; + width: 150px; + padding-right: 20px; + /* font-weight: bold;*/ + } + br { + clear: left; + } + + + +/* menu */ +div.rmmenuicon { + margin: 3px; + font-family: Tahoma, Arial, Helvetica; + text-align: center; +} + +div.rmmenuicon a { + display: block; + float: left; + height: 75px !important; + height: 75px; + width: 75px !important; + width: 75px; + vertical-align: middle; + text-decoration: none; + border: 1px solid #CCCCCC; + padding: 2px 5px 1px 5px; + margin: 3px; + color: #666666; + + background-color: #f0f0f0; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + -khtml-border-radius: 6px; + border-radius: 6px; + +} + +div.rmmenuicon img { + margin-top: 8px; + margin-bottom: 8px; +} + +div.rmmenuicon a span { + font-size: 11px; + font-weight: bold; + display: block; +} + +div.rmmenuicon a:hover { + background-color: #FFF6C1; + border: 1px solid #FF9900; + color: #1E90FF; +} + +div.rmmenuicon a:hover span { + text-decoration: none; +} + +div.CPbigTitle { + font-size: 12px; + color: #606060; + background: no-repeat left top; + font-weight: bold; + height: 30px; + vertical-align: middle; + padding: 5px 0 0 40px; + border-bottom: 1px solid #393e41; +} + +/* menu */ + +.txtchangelog { + height: 350px; + overflow: auto; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/bg_button.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/bg_button.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16 ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/1day.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/1day.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/ASC.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/ASC.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/DESC.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/DESC.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/attach.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/attach.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/close12.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/close12.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/delete.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/delete.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/down.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/download.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/download.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/edit.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/edit.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcopy.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcopy.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcut.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editcut.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editpaste.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/editpaste.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/film.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/film.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/forum.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/forum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green_off.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/green_off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/index.html 2011-12-04 20:26:13 UTC (rev 8407) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/inserttable.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/inserttable.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_delete.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_delete.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_forward.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_forward.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_generic.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_generic.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_new.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_new.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_replay.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/mail_replay.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/off.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/off.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/on.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/on.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/open12.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/open12.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pdf.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pdf.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pixel.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/pixel.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/printer.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/printer.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red_off.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/red_off.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/rss.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/rss.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/search.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/search.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/topic.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/topic.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/up.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/up.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32 ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/about.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/about.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/add.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/add.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/addlink.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/addlink.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/administration.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/administration.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/album.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/album.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/alert.png =======================================================... [truncated message content] |
From: <ma...@us...> - 2011-12-05 15:46:01
|
Revision: 8426 http://xoops.svn.sourceforge.net/xoops/?rev=8426&view=rev Author: mageg Date: 2011-12-05 15:45:51 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Logo for module banner Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/images/logo.png Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/banners.png Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/banners.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/banners.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/images/logo.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2011-12-07 09:38:19
|
Revision: 8443 http://xoops.svn.sourceforge.net/xoops/?rev=8443&view=rev Author: beckmi Date: 2011-12-07 09:38:13 +0000 (Wed, 07 Dec 2011) Log Message: ----------- Updating some countries Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/countries.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2011-12-07 09:34:51 UTC (rev 8442) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2011-12-07 09:38:13 UTC (rev 8443) @@ -326,7 +326,7 @@ "TL" => _COUNTRY_TL, "TM" => _COUNTRY_TM, "TN" => _COUNTRY_TN, "TO" => _COUNTRY_TO, "TP" => _COUNTRY_TP, // Not listed in ISO 3166 "TR" => _COUNTRY_TR, "TT" => _COUNTRY_TT, "TV" => _COUNTRY_TV, "TW" => _COUNTRY_TW, "TZ" => _COUNTRY_TZ, - "UA" => _COUNTRY_UA, "UG" => _COUNTRY_UG, "UK" => _COUNTRY_UK, // Not listed in ISO 3166 + "UA" => _COUNTRY_UA, "UG" => _COUNTRY_UG, // "UK" => _COUNTRY_UK, // Not listed in ISO 3166 "UM" => _COUNTRY_UM, "US" => _COUNTRY_US, "UY" => _COUNTRY_UY, "UZ" => _COUNTRY_UZ, "VA" => _COUNTRY_VA, "VC" => _COUNTRY_VC, "VE" => _COUNTRY_VE, "VG" => _COUNTRY_VG, "VI" => _COUNTRY_VI, "VN" => _COUNTRY_VN, "VU" => _COUNTRY_VU, "WF" => _COUNTRY_WF, "WS" => _COUNTRY_WS, "YE" => _COUNTRY_YE, "YT" => _COUNTRY_YT, Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/countries.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/countries.php 2011-12-07 09:34:51 UTC (rev 8442) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/countries.php 2011-12-07 09:38:13 UTC (rev 8443) @@ -58,7 +58,7 @@ define('_COUNTRY_CN', 'China'); define('_COUNTRY_CO', 'Colombia'); define('_COUNTRY_CR', 'Costa Rica'); -define('_COUNTRY_CS', 'Czechoslovakia (former)'); // Not listed in ISO 3166 +define('_COUNTRY_CS', 'Serbia & Montenegro (former)'); // Not listed in ISO 3166 define('_COUNTRY_CU', 'Cuba'); define('_COUNTRY_CV', 'Cape Verde'); define('_COUNTRY_CX', 'Christmas Island'); @@ -232,7 +232,7 @@ define('_COUNTRY_TM', 'Turkmenistan'); define('_COUNTRY_TN', 'Tunisia'); define('_COUNTRY_TO', 'Tonga'); -define('_COUNTRY_TP', 'East Timor'); // Not listed in ISO 3166 +define('_COUNTRY_TP', 'East Timor'); // Not listed in ISO 3166, changed to TL define('_COUNTRY_TR', 'Turkey'); define('_COUNTRY_TT', 'Trinidad and Tobago'); define('_COUNTRY_TV', 'Tuvalu'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2011-12-11 14:32:56
|
Revision: 8457 http://xoops.svn.sourceforge.net/xoops/?rev=8457&view=rev Author: forxoops Date: 2011-12-11 14:32:48 +0000 (Sun, 11 Dec 2011) Log Message: ----------- Refactor module class (first draft) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/menu.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/default.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/info.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/tips.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/spinner.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/xoops.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_navigation.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2011-12-11 14:16:42 UTC (rev 8456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2011-12-11 14:32:48 UTC (rev 8457) @@ -22,219 +22,211 @@ class XoopsModuleAdmin { + /** + * @var string + */ + public $_tplModule = 'system'; - var $_itemButton = array(); - var $_itemInfoBox = array(); - var $_itemInfoBoxLine = array(); + /** + * @var array + */ + public $_tplTips = array('index' => 'admin_index.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); + + /** + * @var string + */ + private $_tips = ''; + + /** + * @var array + */ + private $_itemButton = array(); + + /** + * @var array + */ + private $_itemInfoBox = array(); + + /** + * @var array + */ + private $_itemInfoBoxLine = array(); + var $_itemConfigBoxLine = array(); var $_obj = array(); - + /** * Constructor */ - function __construct() + public function __construct() { - global $xoopsModule; - $this->_obj =& $xoopsModule; - echo "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/media/xoops/css/moduladmin.css\";</style>"; + $xoops = Xoops::getInstance(); + $this->_obj = $xoops->module; + $xoops->theme->addStylesheet('media/xoops/css/moduladmin.css'); } - - function getInfo() + + /** + * @param $title + * @return bool + */ + function addInfoBox($title, $type = 'default') { - $infoArray = array(); - if (!isset($infoArray) or empty($infoArray)) { - $infoArray = array(); - $infoArray['methods'] = $this->getClassMethods(); - } - return $infoArray; + $ret['title'] = $title; + $ret['type'] = $type; + //$ret['line'] = array(); + $this->_itemInfoBox[] = $ret; + return true; } - + /** - * Return the available methods for the class - * - * @return array methods supported by this class + * Add a button + * @param $title + * @param $link + * @param string $icon + * @param string $extra + * @return bool */ - function getClassMethods() + public function addItemButton($title, $link, $icon = 'add', $extra = '') { - $myMethods = get_class_methods(__CLASS__); - return $myMethods; + $ret['title'] = $title; + $ret['link'] = $link; + $ret['icon'] = XOOPS_URL . '/media/xoops/images/icons/32/' . $icon . '.png'; + $ret['extra'] = $extra; + $this->_itemButton[] = $ret; + return true; } - - //****************************************************************************************************************** - // renderMenuIndex - //****************************************************************************************************************** - // Creating a menu icon in the index - //****************************************************************************************************************** - function renderMenuIndex() + + /** + * @param string $text + * @param string $type + * @param string $color + * @return bool + */ + public function addInfoBoxLine($text = '', $type = 'default', $color = 'inherit') { - $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; - $pathsystem = XOOPS_URL . "/modules/system/"; - $this->_obj->loadAdminMenu(); - $ret = "<div class=\"rmmenuicon\">\n"; - foreach (array_keys( $this->_obj->adminmenu) as $i) { - if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php'){ - $ret .= "<a href=\"../" . $this->_obj->adminmenu[$i]['link'] . "\" title=\"" . $this->_obj->adminmenu[$i]['title'] . "\">"; - $ret .= "<img src=\"" . $path . $this->_obj->adminmenu[$i]['icon']. "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />"; - $ret .= "<span>" . $this->_obj->adminmenu[$i]['title'] . "</span>"; - $ret .= "</a>"; + $ret = array(); + $ret['text'] = $text; + $ret['color'] = $color; + + foreach (array_keys($this->_itemInfoBox) as $i) { + if ($this->_itemInfoBox[$i]['type'] == $type) { + $this->_itemInfoBox[$i]['line'][] = $ret; + unset($ret); } - } - if ($this->_obj->getInfo('help')) { - if (substr(XOOPS_VERSION, 0, 9) >= 'XOOPS 2.5'){ - $ret .= "<a href=\"" . $pathsystem . "help.php?mid=" . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help') . "\" title=\"" . _AM_SYSTEM_HELP . "\">"; - $ret .= "<img width=\"32px\" src=\"" . XOOPS_URL . "/media/xoops/images/icons/32/help.png\" alt=\"" . _AM_SYSTEM_HELP . "\" /> "; - $ret .= "<span>" . _AM_SYSTEM_HELP . "</span>"; - $ret .= "</a>"; - } - } - $ret .= "</div>\n<div style=\"clear: both;\"></div>\n"; - return $ret; - } - //****************************************************************************************************************** - // renderButton - //****************************************************************************************************************** - // Creating button - //****************************************************************************************************************** - function renderButton($position = "right", $delimeter = " ") - { - $path = XOOPS_URL . "/media/xoops/images/icons/32/"; - switch ($position) - { - default: - case "right": - $ret = "<div class=\"floatright\">\n"; - break; - case "left": - $ret = "<div class=\"floatleft\">\n"; - break; - - case "center": - $ret = "<div class=\"aligncenter\">\n"; } - $ret .= "<div class=\"xo-buttons\">\n"; - foreach (array_keys( $this -> _itemButton) as $i) { - $ret .= "<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[$i]['link'] . "' title='" . $this -> _itemButton[$i]['title'] . "'>"; - $ret .= "<img src='" . $path . $this -> _itemButton[$i]['icon'] . "' title='" . $this -> _itemButton[$i]['title'] . "' />" . $this -> _itemButton[$i]['title'] . ' ' . $this -> _itemButton[$i]['extra']; - $ret .= "</a>\n"; - $ret .= $delimeter; - } - $ret .= "</div>\n</div>\n"; - $ret .= "<br /> <br /><br />"; - return $ret; + return true; } - - function addItemButton($title, $link, $icon = 'add', $extra = '') + + /** + * @param string $text + */ + public function addTips($text = '') { - $ret['title'] = $title; - $ret['link'] = $link; - $ret['icon'] = $icon . '.png'; - $ret['extra'] = $extra; - $this -> _itemButton[] = $ret; - return true; + $this->_tips = $text; + } + /** + * @param string $type + * @return string + */ + private function getTplPath($type = '') + { + return 'admin:' . $this->_tplModule . '|' . $this->_tplTips[$type]; } - //****************************************************************************************************************** - // addConfigBoxLine - //****************************************************************************************************************** - // $value: value - // $type: type of config: 1- "default": Just a line with value. - // 2- "folder": check if this is an folder. - // 3- "chmod": check if this is the good chmod. - // For this type ("chmod"), the value is an array: array(path, chmod) - //****************************************************************************************************************** - function addConfigBoxLine($value = '', $type = 'default') + + /** + * Create a button + * @param string $position + * @param string $delimeter + * @return string + */ + public function renderButton($position = "floatright", $delimeter = " ") { - $line = ""; - $path = XOOPS_URL . "/media/xoops/images/icons/16/"; - switch ($type) - { - default: - case "default": - $line .= "<span>" . $value . "</span>"; - break; + $xoops = Xoops::getInstance(); - case "folder": - if (!is_dir($value)){ - $line .= "<span style='color : red; font-weight : bold;'>"; - $line .= "<img src='" . $path . "off.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value); - $line .= "</span>\n"; - }else{ - $line .= "<span style='color : green;'>"; - $line .= "<img src='" . $path . "on.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value); - $line .= "</span>\n"; - } - break; - - case "chmod": - if (is_dir($value[0])){ - if (substr(decoct(fileperms($value[0])),2) != $value[1]) { - $line .= "<span style='color : red; font-weight : bold;'>"; - $line .= "<img src='" . $path . "off.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); - $line .= "</span>\n"; - }else{ - $line .= "<span style='color : green;'>"; - $line .= "<img src='" . $path . "on.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); - $line .= "</span>\n"; - } - } - break; + $xoops->tpl->assign('xo_admin_buttons_position', $position); + $xoops->tpl->assign('xo_admin_buttons_delim', $delimeter); + $xoops->tpl->assign('xo_admin_buttons', $this->_itemButton); + if ($xoops->tpl_name == '') { + $xoops->tpl->display($this->getTplPath('button')); } - $this -> _itemConfigBoxLine[] = $line; - return true; } - //****************************************************************************************************************** - // renderIndex - //****************************************************************************************************************** - // Creating an index - //****************************************************************************************************************** - function renderIndex() + + /** + * @return string + * TOTO change for use template + */ + function renderInfoBox() { - $ret = "<table>\n<tr>\n"; - $ret .= "<td width=\"40%\">\n"; - $ret .= $this -> renderMenuIndex(); - $ret .= "</td>\n"; - $ret .= "<td width=\"60%\">\n"; - $ret .= $this -> renderInfoBox(); - $ret .= "</td>\n"; - $ret .= "</tr>\n"; - // If you use a config label - if ($this->_obj->getInfo('min_php') || $this->_obj->getInfo('min_xoops') || !empty($this -> _itemConfigBoxLine)){ - $ret .= "<tr>\n"; - $ret .= "<td colspan=\"2\">\n"; + $ret = ""; + foreach (array_keys($this->_itemInfoBox) as $i) { $ret .= "<fieldset><legend class=\"label\">"; - $ret .= _AM_MODULEADMIN_CONFIG; + $ret .= $this->_itemInfoBox[$i]['title']; $ret .= "</legend>\n"; - - // php version - $path = XOOPS_URL . "/media/xoops/images/icons/16/"; - if ($this->_obj->getInfo('min_php')){ - if (phpversion() < $this->_obj->getInfo('min_php')){ - $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; - }else{ - $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; + foreach (array_keys($this->_itemInfoBoxLine) as $k) { + if ($this->_itemInfoBoxLine[$k]['label'] == $this->_itemInfoBox[$i]['title']) { + $ret .= $this->_itemInfoBoxLine[$k]['line']; + $ret .= "<br />"; } - $ret .= "<br />"; } + $ret .= "</fieldset>\n"; + $ret .= "<br/>\n"; + } + return $ret; + } + /** + * Display an index page for admin + */ + public function renderIndex() + { + $xoops = Xoops::getInstance(); + $this->_obj->loadAdminMenu(); + foreach (array_keys($this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php') { + $this->_obj->adminmenu[$i]['icon'] = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->adminmenu[$i]['icon']; + $xoops->tpl->append('xo_admin_index_menu', $this->_obj->adminmenu[$i]); + } + } + if ($this->_obj->getInfo('help')) { + $help = array(); + $help['link'] = 'modules/system/help.php?mid=' . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help'); + $help['icon'] = XOOPS_URL . "/media/xoops/images/icons/32/help.png"; + $help['title'] = _AM_SYSTEM_HELP; + $xoops->tpl->append('xo_admin_index_menu', $help); + } + $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); + $xoops->tpl->assign('xo_admin_box_line', $this->_itemInfoBoxLine); + //$ret .= $this->renderInfoBox(); + + $config = array(); + // If you use a config label + if ($this->_obj->getInfo('min_php') || $this->_obj->getInfo('min_xoops') || !empty($this->_itemConfigBoxLine)) { + $i = 0; + // PHP version + if ($this->_obj->getInfo('min_php')) { + if (phpversion() < $this->_obj->getInfo('min_php')) { + $config[$i]['type'] = 'error'; + $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()); + } else { + $config[$i]['type'] = 'accept'; + $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()); + } + } // Database version - $path = XOOPS_URL . "/media/xoops/images/icons/16/"; - $dbarray=$this->_obj->getInfo('min_db'); + $dbarray = $this->_obj->getInfo('min_db'); if ($dbarray[XOOPS_DB_TYPE]) { switch (XOOPS_DB_TYPE) { case "mysql": - $dbCurrentVersion= mysql_get_server_info(); + $dbCurrentVersion = mysql_get_server_info(); break; case "mysqli": $dbCurrentVersion = mysqli_get_server_info(); break; case "pdo": global $xoopsDB; - $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION); + $dbCurrentVersion = $xoops->db->getAttribute(PDO::ATTR_SERVER_VERSION); break; default: $dbCurrentVersion = '0'; @@ -247,7 +239,7 @@ $iReqVerParts = array_map('intval', $reqVerParts); $icount = $j = count($iReqVerParts); $reqVer = $curVer = 0; - for ($i=0; $i<$icount; $i++) { + for ($i = 0; $i < $icount; $i++) { $j--; $reqVer += $iReqVerParts[$i] * pow(10, $j); if (isset($iCurrentVerParts[$i])) { @@ -256,109 +248,135 @@ $curVer = $curVer * pow(10, $j); } } + $i++; if ($reqVer > $curVer) { - $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(XOOPS_DB_TYPE.' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + $config[$i]['type'] = 'error'; + $config[$i]['text'] = sprintf(XOOPS_DB_TYPE . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion); } else { - $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + $config[$i]['type'] = 'accept'; + $config[$i]['text'] = sprintf(strtoupper(XOOPS_DB_TYPE) . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion); } } // xoops version - if ($this->_obj->getInfo('min_xoops')){ - if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6) < $this->_obj->getInfo('min_xoops')){ - $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; - }else{ - $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; + if ($this->_obj->getInfo('min_xoops')) { + $i++; + if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6) < $this->_obj->getInfo('min_xoops')) { + $config[$i]['type'] = 'error'; + $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)); + } else { + $config[$i]['type'] = 'accept'; + $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)); } - $ret .= "<br />"; } - if (!empty($this -> _itemConfigBoxLine)){ - foreach (array_keys( $this -> _itemConfigBoxLine) as $i) { - $ret .= $this -> _itemConfigBoxLine[$i]; - $ret .= "<br />"; + } + $xoops->tpl->assign('xo_admin_index_config', $config); + $xoops->tpl->display($this->getTplPath('index')); + } + + /** + * @param string $menu + */ + function renderNavigation($menu = '') + { + $xoops = Xoops::getInstance(); + + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $this->_obj->loadAdminMenu(); + foreach (array_keys($this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu) { + $this->_obj->adminmenu[$i]['icon'] = $path . $this->_obj->adminmenu[$i]['icon']; + $xoops->tpl->assign('xo_sys_navigation', $this->_obj->adminmenu[$i]); + if ($xoops->tpl_name == '') { + $xoops->tpl->display($this->getTplPath('nav')); } - } - $ret .= "</fieldset>\n"; - $ret .= "</td>\n"; - $ret .= "</tr>\n"; + } } - $ret .= "</table>\n"; - return $ret; } - //****************************************************************************************************************** - // addInfoBox - //****************************************************************************************************************** - // $title: title of an InfoBox - //****************************************************************************************************************** - function addInfoBox($title) + + /** + * Render tips to admin template + */ + public function renderTips() { - $ret['title'] = $title; - $this -> _itemInfoBox[] = $ret; - return true; + $xoops = Xoops::getInstance(); + + $xoops->tpl->assign('xo_admin_tips', $this->_tips); + if ($xoops->tpl_name == '') { + $xoops->tpl->display($this->getTplPath('tips')); + } } + + //****************************************************************************************************************** - // addInfoBoxLine + // addConfigBoxLine //****************************************************************************************************************** - // $label: title of InfoBox Line - // $text: + // $value: value // $type: type of config: 1- "default": Just a line with value. - // 2- "information": check if this is an folder. + // 2- "folder": check if this is an folder. // 3- "chmod": check if this is the good chmod. // For this type ("chmod"), the value is an array: array(path, chmod) + // TODO change this method //****************************************************************************************************************** - function addInfoBoxLine($label, $text, $value = '', $color = 'inherit', $type = 'default') + function addConfigBoxLine($value = '', $type = 'default') { - $ret['label'] = $label; $line = ""; + $path = XOOPS_URL . "/media/xoops/images/icons/16/"; switch ($type) { default: case "default": - $line .= sprintf($text, "<span style='color : " . $color . "; font-weight : bold;'>" . $value . "</span>"); - break; + $line .= "<span>" . $value . "</span>"; + break; - case "information": - $line .= $text; + case "folder": + if (!is_dir($value)) { + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "off.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value); + $line .= "</span>\n"; + } else { + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "on.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value); + $line .= "</span>\n"; + } break; + + case "chmod": + if (is_dir($value[0])) { + if (substr(decoct(fileperms($value[0])), 2) != $value[1]) { + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "off.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)); + $line .= "</span>\n"; + } else { + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "on.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)); + $line .= "</span>\n"; + } + } + break; } - $ret['line'] = $line; - $this -> _itemInfoBoxLine[] = $ret; + $this->_itemConfigBoxLine[] = $line; return true; } - function renderInfoBox() - { - $ret = ""; - foreach (array_keys( $this -> _itemInfoBox) as $i) { - $ret .= "<fieldset><legend class=\"label\">"; - $ret .= $this -> _itemInfoBox[$i]['title']; - $ret .= "</legend>\n"; - foreach (array_keys( $this -> _itemInfoBoxLine) as $k) { - if ($this -> _itemInfoBoxLine[$k]['label'] == $this -> _itemInfoBox[$i]['title']){ - $ret .= $this -> _itemInfoBoxLine[$k]['line']; - $ret .= "<br />"; - } - } - $ret .= "</fieldset>\n"; - $ret .= "<br/>\n"; - } - return $ret; - } - - + function renderAbout($paypal = '', $logo_xoops = true) { $path = XOOPS_URL . "/media/xoops/images/icons/32/"; $ret = "<table>\n<tr>\n"; - $ret .= "<td width=\"50%\">\n"; - $date = explode('/',$this->_obj->getInfo('release_date')); - $author = explode(',',$this->_obj->getInfo('author')); - $nickname = explode(',',$this->_obj->getInfo('nickname')); + $ret .= "<td width=\"50%\">\n"; + $date = explode('/', $this->_obj->getInfo('release_date')); + $author = explode(',', $this->_obj->getInfo('author')); + $nickname = explode(',', $this->_obj->getInfo('nickname')); $release_date = XoopsLocal::formatTimestamp(mktime(0, 0, 0, $date[1], $date[2], $date[0]), 's'); $module_info = '<div id="about"><label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br /> - <label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"),"m") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"), "m") . '</text><br /> <label>' . _AM_MODULEADMIN_ABOUT_MODULESTATUS . '</label><text>' . $this->_obj->getInfo("module_status") . '</text><br /> - <label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="'. $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> + <label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="' . $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> ' . $this->_obj->getInfo("module_website_name") . '</a></text></div>'; $ret .= "<table>\n<tr>\n<td width=\"100px\">\n"; $ret .= "<img src='" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->getInfo('image') . "' alt='" . $this->_obj->getVar('name') . "' style='float: left; margin-right: 10px;' />\n"; @@ -371,21 +389,21 @@ $ret .= "by "; foreach (array_keys($author) as $i) { $ret .= $author[$i]; - if (isset($nickname[$i]) && $nickname[$i] !='') { + if (isset($nickname[$i]) && $nickname[$i] != '') { $ret .= " (" . $nickname[$i] . "), "; - }else{ + } else { $ret .= ", "; - } + } } - $ret = substr($ret,0,-2); + $ret = substr($ret, 0, -2); $ret .= "</div>\n"; $ret .= "<div style='line-height: 16px;'>\n"; - $ret.= "<a href=\"http://" . $this->_obj->getInfo('license_url'). "\" target=\"_blank\" >" . $this->_obj->getInfo('license'). "</a>\n"; + $ret .= "<a href=\"http://" . $this->_obj->getInfo('license_url') . "\" target=\"_blank\" >" . $this->_obj->getInfo('license') . "</a>\n"; $ret .= "<br />\n"; $ret .= "<a href=\"http://" . $this->_obj->getInfo('website') . "\" target=\"_blank\" >" . $this->_obj->getInfo('website') . "</a>\n"; $ret .= "<br />\n"; $ret .= "<br />\n"; - if ($paypal != ''){ + if ($paypal != '') { $ret .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="' . $paypal . '"> @@ -394,10 +412,10 @@ </form>'; } $ret .= "</div>\n"; - $ret .= "</td>\n</tr>\n</table>\n"; - $this -> addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO); - $this -> addInfoBoxLine(_AM_MODULEADMIN_ABOUT_MODULEINFO, $module_info, '', '', 'information'); - $ret .= $this -> renderInfoBox(); + $ret .= "</td>\n</tr>\n</table>\n"; + $this->addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO); + $this->addInfoBoxLine(_AM_MODULEADMIN_ABOUT_MODULEINFO, $module_info, '', '', 'information'); + $ret .= $this->renderInfoBox(); $ret .= "</td>\n"; $ret .= "<td width=\"50%\">\n"; $ret .= "<fieldset><legend class=\"label\">\n"; @@ -405,52 +423,29 @@ $ret .= "</legend><br/>\n"; $ret .= "<div class=\"txtchangelog\">\n"; $language = $GLOBALS['xoopsConfig']['language']; - if ( !is_file( XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt" ) ){ + if (!is_file(XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt")) { $language = 'english'; } $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; - $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; - if ( is_readable( $file ) ){ - $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; - }else{ - $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/docs/changelog.txt"; - if ( is_readable( $file ) ){ - $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; + $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; + if (is_readable($file)) { + $ret .= utf8_encode(implode("<br />", file($file))) . "\n"; + } else { + $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/docs/changelog.txt"; + if (is_readable($file)) { + $ret .= utf8_encode(implode("<br />", file($file))) . "\n"; } - } + } $ret .= "</div>\n"; $ret .= "</fieldset>\n"; $ret .= "</td>\n"; $ret .= "</tr>\n"; $ret .= "</table>\n"; - if ($logo_xoops == true){ + if ($logo_xoops == true) { $ret .= "<div align=\"center\">"; $ret .= "<a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . $path . "xoopsmicrobutton.gif\" alt=\"XOOPS\" title=\"XOOPS\"></a>"; $ret .= "</div>"; } return $ret; } - - function addNavigation($menu = '') - { - $ret = ""; - $navigation = ""; - $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; - $this->_obj->loadAdminMenu(); - foreach (array_keys( $this->_obj->adminmenu) as $i) { - if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu){ - $navigation .= $this->_obj->adminmenu[$i]['title'] . " | "; - $ret = "<div class=\"CPbigTitle\" style=\"background-image: url(" . $path . $this->_obj->adminmenu[$i]['icon'] . "); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> - <strong>" . $this->_obj->adminmenu[$i]['title'] . "</strong></div><br />"; - }else{ - $navigation .= "<a href = '../" . $this->_obj->adminmenu[$i]['link'] . "'>" . $this->_obj->adminmenu[$i]['title'] . "</a> | "; - } - } - if (substr(XOOPS_VERSION, 0, 9) < 'XOOPS 2.5'){ - $navigation .= "<a href = '../../system/admin.php?fct=preferences&op=showmod&mod=" . $this->_obj->getVar('mid') . "'>" . _MI_SYSTEM_ADMENU6 . "</a>"; - $ret = $navigation . "<br /><br />" . $ret; - } - return $ret; - } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2011-12-11 14:16:42 UTC (rev 8456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2011-12-11 14:32:48 UTC (rev 8457) @@ -45,13 +45,32 @@ height: 16px; } +.xo-actions button img, .xo-actions a img, .xo-actions img { + padding:0 2px; + border:none; + width:16px; + height:16px; + cursor:pointer; +} .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; } - /* Buttons style */ +/* Help */ +.tips{ + color:#000; + border:1px solid #00cc00; + padding:8px; + margin:15px 10px; +} + +.tips img { + width:22px; + height:22px; +} + /* align */ .floatright { float: right; @@ -189,6 +208,22 @@ border-bottom: 1px solid #393e41; } +/* Navigation */ +div.xo-nav-ttile { + font-size: 12px; + color: #606060; + background-repeat: no-repeat; + background-position: left; + height: 30px; + vertical-align: middle; + padding: 5px 0 0 40px; + margin-bottom: 10px; + border-bottom: 1px solid #666; +} +div.xo-nav-ttile span { + font-weight: bold; + margin-top: 15px; +} /* menu */ .txtchangelog { Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/default.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/default.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/info.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/info.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/tips.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/tips.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/spinner.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/spinner.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/xoops.js =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/xoops.js (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/xoops.js 2011-12-11 14:32:48 UTC (rev 8457) @@ -0,0 +1,87 @@ +/* + 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. + */ + +/** + * Xoops Javascript class + * + * @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 media + * @since 2.6.0 + * @author Andricq Nicolas (AKA MusS) + * @version $Id$ + */ + +var Xoops = { + + ImgAccept:'', + ImgCancel:'', + TextAccept:'', + TextCancel:'', + + /** + * Function for send an ajax request and change status icon and text + * @param post + * @param data + * @param id + */ + changeStatus:function (post, data, id) { + $.post(post, data, + function (reponse, textStatus) { + if (textStatus == 'success') { + $('img#' + id).hide(); + $('#loading_' + id).show(); + setTimeout(function () { + $('#loading_' + id).hide(); + $('img#' + id).fadeIn('fast'); + // Change image attribute + if ($('img#' + id).attr("src") == Xoops.ImgAccept) { + $('img#' + id).attr("src", Xoops.ImgCancel); + $('img#' + id).attr("alt", Xoops.TextCancel); + $('img#' + id).attr("title", Xoops.TextCancel); + } else { + $('img#' + id).attr("src", Xoops.ImgAccept); + $('img#' + id).attr("alt", Xoops.TextAccept); + $('img#' + id).attr("title", Xoops.TextAccept); + } + }, 500); + + } + }); + }, + + /** + * Define image status URL + * @param type + * @param url + */ + setStatusImg:function (type, url) { + switch (type) { + case 'accept': + this.ImgAccept = url; + break; + case 'cancel': + this.ImgCancel = url; + break; + } + }, + + setStatusText:function (type, url) { + switch (type) { + case 'accept': + this.TextAccept = url; + break; + case 'cancel': + this.TextCancel = url; + break; + } + } + +}; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/menu.php 2011-12-11 14:16:42 UTC (rev 8456) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/menu.php 2011-12-11 14:32:48 UTC (rev 8457) @@ -141,8 +141,8 @@ $breadcrumb = $menuItems[$currentoption]; $menuItems[$currentoption] = 'current'; //Not the best method of adding CSS but the only method available at the moment since xoops is shitty with the backend - $menu = "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/css/menu.css\";</style>"; - $menu .= "<div id='buttontop_mod'>"; + //$menu = "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/css/menu.css\";</style>"; + $menu = "<div id='buttontop_mod'>"; $menu .= "<table style='width: 100%; padding: 0;' cellspacing='0'>\n<tr>"; $menu .= "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; foreach ($this->_menutop as $k => $v) { Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html 2011-12-11 14:32:48 UTC (rev 8457) @@ -0,0 +1,13 @@ +<{if $$xo_admin_buttons}> +<div class="<{$xo_admin_buttons_position}>"> + <{foreach item=button from=$xo_admin_buttons}> + <div class="xo-buttons"> + <a class="ui-corner-all tooltip" href="<{$button.link}>" title="<{$button.title}>"> + <img src="<{$button.icon}>" alt="<{$button.title}>" /> + <{$button.title}> + </a> + </div> + <{/foreach}> +</div> +<br /> <br /> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2011-12-11 14:32:48 UTC (rev 8457) @@ -0,0 +1,45 @@ + +<table> + <tr> + <td class="width40"> + <div class="rmmenuicon"> + <{foreach item=menu from=$xo_admin_index_menu}> + <a href="../<{$menu.link}>" title="<{$menu.title}>"> + <img src="<{$menu.icon}>" alt="<{$menu.title}>" /> + <span><{$menu.title}></span> + </a> + <{/foreach}> + </div> + </td> + <td class="width60"> + <{foreach item=box from=$xo_admin_box}> + <fieldset> + <legend class="label"><img src="<{$xoops_url}>/media/xoops/images/icons/16/<{$box.type}>.png" alt="" /> <{$box.title}></legend> + <{foreach item=line from=$box.line}> + <div class="<{$line.color}> spacer"> + <{$line.text}> + </div> + <{/foreach}> + </fieldset> + <{/foreach}> + </td> + </tr> + <tr> + <td colspan="2"> + <fieldset> + <legend class="label"><{$smarty.const._AM_MODULEADMIN_CONFIG}></legend> + <{foreach item=config from=$xo_admin_index_config}> + <{if $config.type == 'error'}> + <div class="bold red"> + <img src="<{$xoops_url}>/media/xoops/images/icons/16/off.png" /><{$config.text}> + </div> + <{else}> + <div class="bold green"> + <img src="<{$xoops_url}>/media/xoops/images/icons/16/on.png" /><{$config.text}> + </div> + <{/if}> + <{/foreach}> + </fieldset> + </td> + </tr> +</table> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_navigation.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_navigation.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_navigation.html 2011-12-11 14:32:48 UTC (rev 8457) @@ -0,0 +1,5 @@ +<{if $xo_sys_navigation}> +<div class="xo-nav-ttile" style="background-image: url('<{$xo_sys_navigation.icon}>');"> + <span><{$xo_sys_navigation.title}></span> +</div> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html 2011-12-11 14:32:48 UTC (rev 8457) @@ -0,0 +1,7 @@ +<{if $xo_admin_tips}> +<div class="tips ui-corner-all"> + <img class="floatleft tooltip" src="<{xoAdminIcons tips.png}>" alt="<{$smarty.const._AM_SYSTEM_TIPS}>" title="<{$smarty.const._AM_SYSTEM_TIPS}>" /> + <div class="floatleft"><{$xo_admin_tips}></div> + <div class="clear"> </div> +</div> +<{/if}> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2011-12-12 13:04:15
|
Revision: 8466 http://xoops.svn.sourceforge.net/xoops/?rev=8466&view=rev Author: forxoops Date: 2011-12-12 13:04:03 +0000 (Mon, 12 Dec 2011) Log Message: ----------- Refactor module class and adapt modules Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/about.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/userrank.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/xoopsmicrobutton.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_infobox.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/images/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/language/english/help/index.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/xoopsmicrobutton.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/images/spinner.gif Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -30,7 +30,7 @@ /** * @var array */ - public $_tplTips = array('index' => 'admin_index.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); + public $_tplTips = array('index' => 'admin_index.html', 'about' => 'admin_about.html', 'infobox' => 'admin_infobox.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); /** * @var string @@ -52,10 +52,17 @@ */ private $_itemInfoBoxLine = array(); - var $_itemConfigBoxLine = array(); - var $_obj = array(); + /** + * @var array + */ + private $_itemConfigBoxLine = array(); /** + * @var #P#M#C\Xoops.getInstance.module|array|? + */ + private $_obj = array(); + + /** * Constructor */ public function __construct() @@ -66,20 +73,59 @@ } /** + * Add config line + * @param string $value + * @param string $type + * @return bool + */ + public function addConfigBoxLine($value = '', $type = 'default') + { + switch ($type) + { + default: + case "default": + $this->_itemConfigBoxLine[] = array('type' => $type, 'text' => $value); + break; + + case "folder": + if (!is_dir($value)) { + $this->_itemConfigBoxLine[] = array('type' => 'error', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value)); + } else { + $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value)); + } + break; + + case "chmod": + if (is_dir($value[0])) { + if (substr(decoct(fileperms($value[0])), 2) != $value[1]) { + $this->_itemConfigBoxLine[] = array('type' => 'error', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2))); + } else { + $this->_itemConfigBoxLine[] = array('type' => 'accept', 'text' => sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2))); + } + } + break; + } + return true; + } + + /** + * Add an info box * @param $title + * @param string $type + * @param string $extra * @return bool */ - function addInfoBox($title, $type = 'default') + public function addInfoBox($title, $type = 'default', $extra='') { $ret['title'] = $title; $ret['type'] = $type; - //$ret['line'] = array(); + $ret['extra'] = $extra; $this->_itemInfoBox[] = $ret; return true; } /** - * Add a button + * Add an item button * @param $title * @param $link * @param string $icon @@ -97,6 +143,7 @@ } /** + * Add line to the info box * @param string $text * @param string $type * @param string $color @@ -119,6 +166,7 @@ } /** + * Add a tips * @param string $text */ public function addTips($text = '') @@ -127,6 +175,7 @@ } /** + * Construct template path * @param string $type * @return string */ @@ -136,7 +185,7 @@ } /** - * Create a button + * Render all items buttons * @param string $position * @param string $delimeter * @return string @@ -159,25 +208,15 @@ */ function renderInfoBox() { - $ret = ""; - foreach (array_keys($this->_itemInfoBox) as $i) { - $ret .= "<fieldset><legend class=\"label\">"; - $ret .= $this->_itemInfoBox[$i]['title']; - $ret .= "</legend>\n"; - foreach (array_keys($this->_itemInfoBoxLine) as $k) { - if ($this->_itemInfoBoxLine[$k]['label'] == $this->_itemInfoBox[$i]['title']) { - $ret .= $this->_itemInfoBoxLine[$k]['line']; - $ret .= "<br />"; - } - } - $ret .= "</fieldset>\n"; - $ret .= "<br/>\n"; + $xoops = Xoops::getInstance(); + $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); + if ($xoops->tpl_name == '') { + $xoops->tpl->display($this->getTplPath('infobox')); } - return $ret; } /** - * Display an index page for admin + * Render index page for admin */ public function renderIndex() { @@ -197,21 +236,15 @@ $xoops->tpl->append('xo_admin_index_menu', $help); } $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); - $xoops->tpl->assign('xo_admin_box_line', $this->_itemInfoBoxLine); - //$ret .= $this->renderInfoBox(); - $config = array(); // If you use a config label if ($this->_obj->getInfo('min_php') || $this->_obj->getInfo('min_xoops') || !empty($this->_itemConfigBoxLine)) { - $i = 0; // PHP version if ($this->_obj->getInfo('min_php')) { if (phpversion() < $this->_obj->getInfo('min_php')) { - $config[$i]['type'] = 'error'; - $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()); + $this->addConfigBoxLine(sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()), 'error'); } else { - $config[$i]['type'] = 'accept'; - $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()); + $this->addConfigBoxLine(sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()), 'accept'); } } // Database version @@ -248,33 +281,28 @@ $curVer = $curVer * pow(10, $j); } } - $i++; if ($reqVer > $curVer) { - $config[$i]['type'] = 'error'; - $config[$i]['text'] = sprintf(XOOPS_DB_TYPE . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion); + $this->addConfigBoxLine(sprintf(strtoupper(XOOPS_DB_TYPE) . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion), 'error'); } else { - $config[$i]['type'] = 'accept'; - $config[$i]['text'] = sprintf(strtoupper(XOOPS_DB_TYPE) . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion); + $this->addConfigBoxLine(sprintf(strtoupper(XOOPS_DB_TYPE) . ' ' . _AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion), 'accept'); } } // xoops version if ($this->_obj->getInfo('min_xoops')) { - $i++; if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6) < $this->_obj->getInfo('min_xoops')) { - $config[$i]['type'] = 'error'; - $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)); + $this->addConfigBoxLine(sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)), 'error'); } else { - $config[$i]['type'] = 'accept'; - $config[$i]['text'] = sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)); + $this->addConfigBoxLine(sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION) - 6)), 'accept'); } } + $xoops->tpl->assign('xo_admin_index_config', $this->_itemConfigBoxLine); } - $xoops->tpl->assign('xo_admin_index_config', $config); $xoops->tpl->display($this->getTplPath('index')); } /** + * Render navigation to admin page * @param string $menu */ function renderNavigation($menu = '') @@ -295,7 +323,7 @@ } /** - * Render tips to admin template + * Render tips to admin page */ public function renderTips() { @@ -307,121 +335,30 @@ } } - - //****************************************************************************************************************** - // addConfigBoxLine - //****************************************************************************************************************** - // $value: value - // $type: type of config: 1- "default": Just a line with value. - // 2- "folder": check if this is an folder. - // 3- "chmod": check if this is the good chmod. - // For this type ("chmod"), the value is an array: array(path, chmod) - // TODO change this method - //****************************************************************************************************************** - function addConfigBoxLine($value = '', $type = 'default') + /** + * render about page + * @param string $paypal + * @param bool $logo_xoops + */ + public function renderAbout($paypal = '', $logo_xoops = true) { - $line = ""; - $path = XOOPS_URL . "/media/xoops/images/icons/16/"; - switch ($type) - { - default: - case "default": - $line .= "<span>" . $value . "</span>"; - break; + $xoops = Xoops::getInstance(); - case "folder": - if (!is_dir($value)) { - $line .= "<span style='color : red; font-weight : bold;'>"; - $line .= "<img src='" . $path . "off.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value); - $line .= "</span>\n"; - } else { - $line .= "<span style='color : green;'>"; - $line .= "<img src='" . $path . "on.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value); - $line .= "</span>\n"; - } - break; - - case "chmod": - if (is_dir($value[0])) { - if (substr(decoct(fileperms($value[0])), 2) != $value[1]) { - $line .= "<span style='color : red; font-weight : bold;'>"; - $line .= "<img src='" . $path . "off.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)); - $line .= "</span>\n"; - } else { - $line .= "<span style='color : green;'>"; - $line .= "<img src='" . $path . "on.png' >"; - $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])), 2)); - $line .= "</span>\n"; - } - } - break; - } - $this->_itemConfigBoxLine[] = $line; - return true; - } - - function renderAbout($paypal = '', $logo_xoops = true) - { - $path = XOOPS_URL . "/media/xoops/images/icons/32/"; - - $ret = "<table>\n<tr>\n"; - $ret .= "<td width=\"50%\">\n"; $date = explode('/', $this->_obj->getInfo('release_date')); $author = explode(',', $this->_obj->getInfo('author')); $nickname = explode(',', $this->_obj->getInfo('nickname')); $release_date = XoopsLocal::formatTimestamp(mktime(0, 0, 0, $date[1], $date[2], $date[0]), 's'); - $module_info = '<div id="about"><label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br /> - <label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"), "m") . '</text><br /> - <label>' . _AM_MODULEADMIN_ABOUT_MODULESTATUS . '</label><text>' . $this->_obj->getInfo("module_status") . '</text><br /> - <label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="' . $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> - ' . $this->_obj->getInfo("module_website_name") . '</a></text></div>'; - $ret .= "<table>\n<tr>\n<td width=\"100px\">\n"; - $ret .= "<img src='" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->getInfo('image') . "' alt='" . $this->_obj->getVar('name') . "' style='float: left; margin-right: 10px;' />\n"; - $ret .= "</td><td>\n"; - $ret .= "<div style='margin-top: 1px; margin-bottom: 4px; font-size: 18px; line-height: 18px; color: #2F5376; font-weight: bold;'>\n"; - $ret .= $this->_obj->getInfo('name') . " " . $this->_obj->getInfo('version') . " " . $this->_obj->getInfo('module_status') . " (" . $release_date . ")\n"; - $ret .= "<br />\n"; - $ret .= "</div>\n"; - $ret .= "<div style='line-height: 16px; font-weight: bold;'>\n"; - $ret .= "by "; + + $author_list = ''; foreach (array_keys($author) as $i) { - $ret .= $author[$i]; + $author_list .= $author[$i]; if (isset($nickname[$i]) && $nickname[$i] != '') { - $ret .= " (" . $nickname[$i] . "), "; + $author_list .= " (" . $nickname[$i] . "), "; } else { - $ret .= ", "; + $author_list .= ", "; } } - $ret = substr($ret, 0, -2); - $ret .= "</div>\n"; - $ret .= "<div style='line-height: 16px;'>\n"; - $ret .= "<a href=\"http://" . $this->_obj->getInfo('license_url') . "\" target=\"_blank\" >" . $this->_obj->getInfo('license') . "</a>\n"; - $ret .= "<br />\n"; - $ret .= "<a href=\"http://" . $this->_obj->getInfo('website') . "\" target=\"_blank\" >" . $this->_obj->getInfo('website') . "</a>\n"; - $ret .= "<br />\n"; - $ret .= "<br />\n"; - if ($paypal != '') { - $ret .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> - <input type="hidden" name="cmd" value="_s-xclick"> - <input type="hidden" name="hosted_button_id" value="' . $paypal . '"> - <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> - <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> - </form>'; - } - $ret .= "</div>\n"; - $ret .= "</td>\n</tr>\n</table>\n"; - $this->addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO); - $this->addInfoBoxLine(_AM_MODULEADMIN_ABOUT_MODULEINFO, $module_info, '', '', 'information'); - $ret .= $this->renderInfoBox(); - $ret .= "</td>\n"; - $ret .= "<td width=\"50%\">\n"; - $ret .= "<fieldset><legend class=\"label\">\n"; - $ret .= _AM_MODULEADMIN_ABOUT_CHANGELOG; - $ret .= "</legend><br/>\n"; - $ret .= "<div class=\"txtchangelog\">\n"; + $changelog = ''; $language = $GLOBALS['xoopsConfig']['language']; if (!is_file(XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt")) { $language = 'english'; @@ -429,23 +366,29 @@ $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; if (is_readable($file)) { - $ret .= utf8_encode(implode("<br />", file($file))) . "\n"; + $changelog = utf8_encode(implode("<br />", file($file))) . "\n"; } else { $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/docs/changelog.txt"; if (is_readable($file)) { - $ret .= utf8_encode(implode("<br />", file($file))) . "\n"; + $changelog = utf8_encode(implode("<br />", file($file))) . "\n"; } } - $ret .= "</div>\n"; - $ret .= "</fieldset>\n"; - $ret .= "</td>\n"; - $ret .= "</tr>\n"; - $ret .= "</table>\n"; - if ($logo_xoops == true) { - $ret .= "<div align=\"center\">"; - $ret .= "<a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . $path . "xoopsmicrobutton.gif\" alt=\"XOOPS\" title=\"XOOPS\"></a>"; - $ret .= "</div>"; - } - return $ret; + $author_list = substr($author_list, 0, -2); + + $this->_obj->setInfo('release_date', $release_date); + $this->_obj->setInfo('author_list', $author_list); + $this->_obj->setInfo('paypal', $paypal); + $this->_obj->setInfo('changelog', $changelog); + $xoops->tpl->assign('module', $this->_obj); + + $this->addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO, 'info', 'id="xo-about"'); + $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br />', 'info'); + $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . XoopsLocal::formatTimestamp($this->_obj->getVar("last_update"), "m") . '</text><br />', 'info'); + $this->addInfoBoxLine('<label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="' . $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> + ' . $this->_obj->getInfo("module_website_name") . '</a></text>', 'info'); + + $xoops->tpl->assign('xoops_logo', $logo_xoops); + $xoops->tpl->assign('xo_admin_box', $this->_itemInfoBox); + $xoops->tpl->display($this->getTplPath('about')); } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/admin.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -31,7 +31,7 @@ define('_AM_MODULEADMIN_CONFIG_DB','minimum version required: %s (your version is %s)'); // About define('_AM_MODULEADMIN_ABOUT_CHANGELOG','Change log'); -define('_AM_MODULEADMIN_ABOUT_DESCRIPTION','Description'); +define('_AM_MODULEADMIN_ABOUT_DESCRIPTION','Description:'); define('_AM_MODULEADMIN_ABOUT_MODULEINFO','Module Info'); define('_AM_MODULEADMIN_ABOUT_MODULESTATUS','Status:'); define('_AM_MODULEADMIN_ABOUT_UPDATEDATE','Update date:'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css 2011-12-12 13:04:03 UTC (rev 8466) @@ -93,37 +93,38 @@ border: 0; } -/* align */ - /* label */ .label { - color: #2F5376; font-weight: bold; } - -/* label */ - /* about */ -#about label, #about text { +.xo-module-img { + width: 100px; +} +.xo-module-name { + margin-top: 1px; + margin-bottom: 4px; + font-size: 18px; + line-height: 18px; + color: #2F5376; + font-weight: bold; +} + +#xo-about label, #about text { display: block; float: left; - margin-bottom: 12px; + margin-bottom: 8px; } - -#about label { +#xo-about label { text-align: right; width: 200px; padding-right: 20px; } - br { - clear: left; - } - -#about br { +#xo-about br { clear: both; } @@ -197,16 +198,6 @@ text-decoration: none; } -div.CPbigTitle { - font-size: 12px; - color: #606060; - background: no-repeat left top; - font-weight: bold; - height: 30px; - vertical-align: middle; - padding: 5px 0 0 40px; - border-bottom: 1px solid #393e41; -} /* Navigation */ div.xo-nav-ttile { @@ -224,6 +215,7 @@ font-weight: bold; margin-top: 15px; } + /* menu */ .txtchangelog { Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/xoopsmicrobutton.gif =================================================================== (Binary files differ) Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/xoopsmicrobutton.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/xoopsmicrobutton.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/index.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -38,6 +38,8 @@ $folder_path = XOOPS_ROOT_PATH . '/uploads/smilies'; $admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('index.php'); +$admin_page->addItemButton(_AM_SMILIES_ADD, 'smilies.php?op=new_smilie', 'add'); $admin_page->addInfoBox(_MI_SMILIES_SMILIES, 'default'); $admin_page->addInfoBoxLine(sprintf(_AM_SMILIES_NBTOTAL, $smilies_total), 'default'); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/changelog.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,3 @@ +Version 0.1 +------------------- +Create smilies plugin \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/credits.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,3 @@ +Credits +------------------- + Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/index.html 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/install.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,6 @@ +INSTALL/UNISTALL +------------------- + +No special measures necessary, follow the standard installation process extract the module folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual (http://goo.gl/adT2i) \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/lang_diff.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,7 @@ +LANGUAGE DIFFERENCES +------------------- + +Below are language differences from a version to next version. + +Release xxx +------------------- Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/licence.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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. + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/docs/readme.txt 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,34 @@ +Read Me First +------------------- + +Description +------------ +The UserRank Module is for managing all ranks. + + Requirements + _____________________________________________________________________ + +- PHP version >= 5.3 +- XOOPS 2.6.0+ + +Install/uninstall +------------------ +No special measures necessary, follow the standard installation process � extract the xoopspartners folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual (http://goo.gl/adT2i) + +Operating instructions +------------------------ +To set up this module you need to: + +i) Enter your partner�s details � including a URL for their website and (optionally) logo plus a short description (see �Adding a partner�) + +ii) Configure your preferences for the module (see �Preferences�) and optionally the Partners block if you intend to use it (see �Blocks�) + +iii) Check that you have given your user groups the necessary module and block access rights to use this module. Group permissions are set through the Administration Menu -> System -> Groups. + +Detailed instructions on configuring the access rights for user groups are available in the XOOPS Operations Manual (http://goo.gl/adT2i) + +Tutorial +----------- +Tutorial coming soon. \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo.png =================================================================== (Binary files differ) Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo_small.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/images/logo_small.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/xoops_version.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -23,7 +23,7 @@ $modversion['name'] = _MI_SMILIES_NAME; $modversion['description'] = _MI_SMILIES_DESC; $modversion['version'] = 0.1; -$modversion['author'] = 'Mage'; +$modversion['author'] = 'Mage Gregory'; $modversion['nickname'] = 'Mage'; $modversion['credits'] = 'The XOOPS Project'; $modversion['license'] = 'GNU GPL 2.0'; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,47 @@ +<table> + <tr> + <td class="width50"> + <table> + <tr> + <td class="xo-module-img"> + <img src="<{$xoops_url}>/modules/<{$module->getVar('dirname')}>/<{$module->getInfo('image')}>" alt="<{$module->getVar('name')}>" title="<{$module->getVar('name')}>" /> + </td> + <td> + <div class="spacer xo-module-name"><{$module->getVar('name')}><{$module->getInfo('version')}> <{$module->getInfo('module_status')}> (<{$module->getInfo('release_date')}>)</div> + <div class="spacer marg5 bold"><{$module->getInfo('author_list')}></div> + <{if $module->getInfo('license_url')}> + <div class="spacer marg5"><a href="http://<{$module->getInfo('license_url')}>" target="_blank"><{$module->getInfo('license')}></a></div> + <{/if}> + <{if $module->getInfo('website')}> + <div class="spacer marg5"><a href="http://<{$module->getInfo('website')}>" target="_blank"><{$module->getInfo('website')}></a></div> + <{/if}> + <{if $module->getInfo('paypal')}> + <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_s-xclick"> + <input type="hidden" name="hosted_button_id" value="<{$module->getInfo('paypal')}>"> + <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> + <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> + </form> + <{/if}> + <{includeq file="admin:system|admin_infobox.html"}> + </td> + </tr> + </table> + </td> + <td class="width50"> + <fieldset> + <legend class="label"><{$smarty.const._AM_MODULEADMIN_ABOUT_CHANGELOG}></legend> + <div class="txtchangelog"> + <{$module->getInfo('changelog')}> + </div> + </fieldset> + </td> + </tr> +</table> +<{if $xoops_logo}> +<div align="center"> + <a href="http://www.xoops.org" target="_blank"> + <img src="<{$xoops_url}>/media/xoops/images/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"> + </a> +</div> +<{/if}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html 2011-12-12 13:04:03 UTC (rev 8466) @@ -1,7 +1,7 @@ <{if $$xo_admin_buttons}> <div class="<{$xo_admin_buttons_position}>"> <{foreach item=button from=$xo_admin_buttons}> - <div class="xo-buttons"> + <div class="xo-buttons <{$xo_admin_buttons_position}>"> <a class="ui-corner-all tooltip" href="<{$button.link}>" title="<{$button.title}>"> <img src="<{$button.icon}>" alt="<{$button.title}>" /> <{$button.title}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2011-12-12 13:04:03 UTC (rev 8466) @@ -12,16 +12,7 @@ </div> </td> <td class="width60"> - <{foreach item=box from=$xo_admin_box}> - <fieldset> - <legend class="label"><img src="<{$xoops_url}>/media/xoops/images/icons/16/<{$box.type}>.png" alt="" /> <{$box.title}></legend> - <{foreach item=line from=$box.line}> - <div class="<{$line.color}> spacer"> - <{$line.text}> - </div> - <{/foreach}> - </fieldset> - <{/foreach}> + <{includeq file="admin:system|admin_infobox.html"}> </td> </tr> <tr> Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_infobox.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_infobox.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_infobox.html 2011-12-12 13:04:03 UTC (rev 8466) @@ -0,0 +1,8 @@ +<{foreach item=box from=$xo_admin_box}> +<fieldset <{$box.extra}>> + <legend class="label" title="<{$box.title}>"><img src="<{$xoops_url}>/media/xoops/images/icons/16/<{$box.type}>.png" alt="<{$box.title}>" /> <{$box.title}></legend> + <{foreach item=line from=$box.line}> + <div class="<{$line.color}> bold spacer"><{$line.text}></div> + <{/foreach}> +</fieldset> +<{/foreach}> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/about.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/about.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/about.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -20,13 +20,15 @@ * @version $Id$ */ -include dirname(__FILE__) . '/header.php'; +include 'header.php'; +// Get main instance $xoops = Xoops::getInstance(); + $xoops->header(); -$aboutAdmin = new XoopsModuleAdmin(); -echo $aboutAdmin->renderNavigation('about.php'); -echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('about.php'); +$admin_page->renderAbout('6KJ7RW5DR3VTJ', true); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/index.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/index.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -31,14 +31,19 @@ $admin_page->renderNavigation('index.php'); $admin_page->addItemButton(_AM_USERRANK_ADD, './userrank.php?op=userrank_new', 'add'); -$admin_page->addInfoBox('Mon info'); -$admin_page->addInfoBoxLine('mon text'); -$admin_page->addInfoBoxLine('mon text autre', 'default', 'red'); +$userrank_handler = $xoops->getHandlerRanks(); -$admin_page->addInfoBox('Mon autre', 'info'); -$admin_page->addInfoBoxLine('mon text info', 'info'); -$admin_page->addInfoBoxLine('mon text info autre', 'info', 'green'); +$admin_page->addInfoBox(_USERRANK_MI_USERRANK); +$count_all = $userrank_handler->getCount(); +$admin_page->addInfoBoxLine(sprintf(_AM_USERRANK_NBTOTAL, '<span class="red">'.$count_all.'</span>')); + +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('rank_special', 1)); +$count_special = $userrank_handler->getCount($criteria); + +$admin_page->addInfoBoxLine(sprintf(_AM_USERRANK_NBSPECIAL, '<span class="red">'.$count_special.'</span>')); + $admin_page->renderButton(); $admin_page->renderIndex(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/userrank.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/userrank.php 2011-12-12 13:03:30 UTC (rev 8465) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/admin/userrank.php 2011-12-12 13:04:03 UTC (rev 8466) @@ -93,8 +93,6 @@ // New userrank case 'userrank_new': - // Define Stylesheet - $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->addTips(sprintf(_AM_USERRANK_TIPS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_USERRANK_TIPS_FORM2, $upload_size / 1000)); @@ -109,8 +107,6 @@ // Edit userrank case 'userrank_edit': - // Define Stylesheet - $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->addTips(sprintf(_AM_USERRANK_TIPS_FORM1, implode(', ', $mimetypes)) . sprintf(_AM_USERRANK_TIPS_FORM2, $upload_size / 1000)); @@ -179,8 +175,6 @@ $xoops->error($obj->getHtmlErrors()); } } else { - // Define Stylesheet - $xoops->theme->addStylesheet('modules/system/css/admin.css'); // Define Breadcrumb and tips $admin_page = new XoopsModuleAdmin(); $admin_page->renderNavigation('userrank.php'); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userrank/docs ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0... [truncated message content] |
From: <wis...@us...> - 2011-12-15 04:48:11
|
Revision: 8493 http://xoops.svn.sourceforge.net/xoops/?rev=8493&view=rev Author: wishcraft Date: 2011-12-15 04:48:00 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Xortify 3.02 Stable - Cloud Security for XOOPS 2.6 - bundle (node xortify.com to be moved to hosted at xoops.org) Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlxml_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_json.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_json_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_soap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_soap_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetserialised_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetxml_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/authfactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curlserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curlxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/json.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/log.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/soap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/wgetserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/wgetxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/serverup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/accessdenied.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/left_both.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/right_both.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/xortify_slogo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/JSON.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/forms.objects.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/forms.xortify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.header.addmeta.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.header.endcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.loader.mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/pre.loader.mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/ban.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/projecthoneypot.org.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/protector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/spiders.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/stopforumspam.com.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/xortify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/projecthoneypot.org/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/projecthoneypot.org/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/footer.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/header.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/providers.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/spiders/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/spiders/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/stopforumspam.com/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/stopforumspam.com/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/footer.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/header.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/mysql.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_bans.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_log.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_form.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_nocommunication.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/xortify_banning_notice.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/xoops_version.php Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32 ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,10 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Untitled Document</title> +</head> + +<body> +</body> +</html> Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,444 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + + include(dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php'); + + $xoops = Xoops::getInstance(); + + if (!defined('_CHARSET')) + define ("_CHARSET","UTF-8"); + if (!defined('_CHARSET_ISO')) + define ("_CHARSET_ISO","ISO-8859-1"); + + $GLOBALS['myts'] = MyTextSanitizer::getInstance(); + + $module_handler = $xoops->getHandler('module'); + $config_handler = $xoops->getHandler('config'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); + + XoopsLoad::load('pagenav'); + XoopsLoad::load('xoopslists'); + XoopsLoad::load('xoopsformloader'); + + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopstree.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'functions.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'forms.xortify.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'forms.objects.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'class'.DS.'auth'.DS.'authfactory.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{ + echo $xoops->error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); + //return false; + } + $GLOBALS['xortifyImageIcon'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons16'); + $GLOBALS['xortifyImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons32'); + + $myts =& MyTextSanitizer::getInstance(); + + if ($GLOBALS['xoopsUser']) { + $moduleperm_handler =& $xoops->getHandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['xortifyModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) { + $xoops->redirect(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + $xoops->redirect(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + $xoops->loadLanguage('admin', 'xortify'); + $xoops->loadLanguage('modinfo', 'xortify'); + + $xoops->header(); + $xoops->tpl->assign('pathImageIcon', $GLOBALS['xortifyImageIcon']); + $xoops->tpl->assign('pathImageAdmin', $GLOBALS['xortifyImageAdin']); + + $op = isset($_REQUEST['op'])?$_REQUEST['op']:"dashboard"; + $fct = isset($_REQUEST['fct'])?$_REQUEST['fct']:""; + + switch($op) { + case "signup": + + switch ($fct) + { + case "save": + + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $myts =& MyTextSanitizer::getInstance(); + $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : ''; + $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; + $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : ''; + $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; + $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : ''; + $agree = (isset($_POST['agree']) && intval($_POST['agree'])) ? 1 : 0; + + if ($agree != 1) { + $stop .= _US_UNEEDAGREE . '<br />'; + } + + $validate = $xortifyAuth->validate($uname, $email, $pass, $vpass); + + if ($validate!=false) + $stop .= "User details didn't validate with Xortify.com<br/>$validate"; + + XoopsLoad::load("captcha"); + $xoopsCaptcha = XoopsCaptcha::getInstance(); + if (! $xoopsCaptcha->verify() ) { + $stop .= $xoopsCaptcha->getMessage(); + } + + if ($stop!='') { + + echo xortify_adminMenu(2); + echo "<p align='center' style='font-size: 15px; color: #FF0000;'>$stop</p>"; + $GLOBALS['xoops'] = Xoops::getInstance(); + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts =& MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('url',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $xoops->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + } else { + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $xoops->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + } + } else { + @$xortifyAuth->create_user( $_POST['viewemail'], $uname, $email, $url, $actkey, + $pass, $_POST['timezone'], $_POST['mailok'], $xortifyAuth->check_siteinfo(array())); + + $moduleHandler =& $xoops->getHandler('module'); + $configHandler =& $xoops->getHandler('config'); + $GLOBALS['xortifyModule'] = $moduleHandler->getByDirname('xortify'); + $configs = $configHandler->getConfigs(new Criteria('conf_modid', $GLOBALS['xortifyModule']->mid()) ); + foreach($configs as $id => $config) + switch($config->getVar('conf_name')) { + case 'xortify_username': + $config->setVar('conf_value', $uname); + @$configHandler->insertConfig($config); + break; + case 'xortify_password': + $config->setVar('conf_value', $pass); + @$configHandler->insertConfig($config); + break; + } + + $xoops->redirect("index.php", 4, _XOR_USERCREATED_PLEASEACTIVATE); + exit(0); + } + break; + default: + case "signup": + echo xortify_adminMenu(4); + $GLOBALS['xoops'] = Xoops::getInstance(); + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts =& MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('url',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $xoops->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + } else { + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $xoops->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + } + break; + } + break; + case "log": + echo xortify_adminMenu(3); + + include_once $GLOBALS['xoops']->path( "/class/pagenav.php" ); + + $log_handler =& $xoops->getModuleHandler('log', 'xortify'); + + $ttl = $log_handler->getCount(NULL); + $limit = !empty($_POST['limit'])?intval($_POST['limit']):30; + $start = !empty($_POST['start'])?intval($_POST['start']):0; + $order = !empty($_POST['order'])?$_POST['order']:'DESC'; + $sort = !empty($_POST['sort'])?''.$_POST['sort'].'':'date'; + + $pagenav = new XoopsPageNav($ttl, $limit, $start, 'start', 'limit='.$limit.'&sort='.$sort.'&order='.$order.'&op='.$op); + $xoops->tpl->assign('pagenav', $pagenav->renderNav()); + + foreach (array( 'action','provider','date','uname','email','ip4','ip6','proxy-ip4', + 'proxy-ip6','network-addy','agent') as $id => $key) { + $xoops->tpl->assign(strtolower(str_replace('-','_',$key).'_th'), '<a href="'.$_SERVER['PHP_SELF'].'?start='.$start.'&limit='.$limit.'&sort='.str_replace('_','-',$key).'&order='.((str_replace('_','-',$key)==$sort)?($order=='DESC'?'ASC':'DESC'):$order).'&op='.$op.'">'.(defined('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key)))?constant('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))):'_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))).'</a>'); + } + + $criteria = new Criteria('1','1'); + $criteria->setStart($start); + $criteria->setLimit($limit); + $criteria->setSort('`'.$sort.'`'); + $criteria->setOrder($order); + + $logs = $log_handler->getObjects($criteria, true); + foreach($logs as $id => $log) { + $xoops->tpl->append('log', $log->toArray()); + } + $xoops->tpl->display('admin:xortify|xortify_cpanel_log.html'); + + break; + case "list": + + echo xortify_adminMenu(2); + + XoopsLoad::load("xoopscache"); + if (!class_exists('XoopsCache')) + XoopsLoad::load("cache"); + XoopsLoad::load("pagenav"); + + if (!$bans = XoopsCache::read('xortify_bans_cache')) { + + require_once( XOOPS_ROOT_PATH.'/modules/xortify/class/'.$GLOBALS['xortifyModuleConfig']['protocol'].'.php' ); + + $func = strtoupper($GLOBALS['xortifyModuleConfig']['protocol']).'XortifyExchange'; + + ob_start(); + $soapExchg = new $func; + $bans = $soapExchg->retrieveBans(); + ob_end_flush(); + + XoopsCache::delete('xortify_bans_cache'); + XoopsCache::delete('xortify_bans_cache_backup'); + XoopsCache::write('xortify_bans_cache', $bans, $GLOBALS['xortifyModuleConfig']['xortify_seconds']); + XoopsCache::write('xortify_bans_cache_backup', $bans, ($GLOBALS['xortifyModuleConfig']['xortify_seconds'] * 1.45)); + } + + if ($bans['bans']==0) { + + echo _XS_AM_NOCACHEMSG; + } else { + + $limit = !empty($_REQUEST['limit'])?intval($_REQUEST['limit']):30; + $start = !empty($_REQUEST['start'])?intval($_REQUEST['start']):0; + + $pagenav = new XoopsPageNav($bans['bans'], $limit, $start, 'start', 'limit='.$limit.'&op='.$op); + $xoops->tpl->assign('pagenav', $pagenav->renderNav()); + $i=0; + $num=0; + foreach($bans['data'] as $key => $data) { + $i++; + if ($i>=$start&&$num<=$limit) { + $num++; + if (strlen($data['ip4'])>0) { + $ipaddy = $data['ip4']; + $iptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['ip6'])>0) { + $ipaddy = $data['ip6']; + $iptype = _XS_IPTYPE_IP6; + } else { + $ipaddy = ''; + $iptype = _XS_IPTYPE_EMPTY; + } + + if (strlen($data['proxy-ip4'])>0) { + $proxyip = $data['proxy-ip4']; + $proxyiptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['proxy-ip6'])>0) { + $proxyip = $data['proxy-ip6']; + $proxyiptype = _XS_IPTYPE_IP6; + } else { + $proxyip = ''; + $proxyiptype = ''; + } + + $xoops->tpl->append('bans', array('iptype' => $iptype, 'ipaddy' => $ipaddy, + 'proxyiptype' => $proxyiptype, 'ip' => $proxyip, + 'netaddy' => $data['network-addy']?$data['network-addy']:' ', + 'macaddy' => $data['mac-addy']?$data['mac-addy']:' ', + 'long' => $data['long']?$data['long']:' ')); + } + } + $xoops->tpl->display('admin:xortify|xortify_cpanel_bans.html'); + } + + + break; + case "dashboard": + default: + + echo xortify_adminMenu(1); + + $log_handler = $xoops->getModuleHandler('log', 'xortify'); + + $indexAdmin = new ModuleAdmin(); + + $indexAdmin->addInfoBox(_XOR_ADMIN_COUNTS); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_BANNED."</label>", $log_handler->getCountByField('action','banned'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_BLOCKED."</label>", $log_handler->getCountByField('action','blocked'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_MONITORED."</label>", $log_handler->getCountByField('action','monitored'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_PROJECTHONEYPOTORG."</label>", $log_handler->getCountByField('provider','projecthoneypot.org'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_PROTECTOR."</label>", $log_handler->getCountByField('provider','protector'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_SPIDERS."</label>", $log_handler->getCountByField('provider','spiders'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_STOPFORUMSPAMCOM."</label>", $log_handler->getCountByField('provider','stopforumspam.com'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_XORTIFY."</label>", $log_handler->getCountByField('provider','xortify'), 'Green'); + + XoopsLoad::load('xoopscache'); + if (!class_exists('XoopsCache')) { + // XOOPS 2.4 Compliance + XoopsLoad::load('cache'); + if (!class_exists('XoopsCache')) { + include_once XOOPS_ROOT_PATH.DS.'class'.DS.'cache'.DS.'xoopscache.php'; + } + } + + if ($bans = XoopsCache::read('xortify_bans_cache')) { + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_CLOUDEDBANS."</label>", count($bans), 'Green'); + } + + echo $indexAdmin->renderIndex(); + + break; + case "about": + + echo xortify_adminMenu(5); + + $paypalitemno='XORTIFY302'; + $aboutAdmin = new ModuleAdmin(); + $about = $aboutAdmin->renderabout($paypalitemno, false); + + $donationform = array( 0 => '<form name="donation" id="donation" action="http://www.chronolabs.coop/modules/xpayment/" method="post" onsubmit="return xoopsFormValidate_donation();">', + 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">'._XOR_ADMIN_MAKEDONATE.'</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">Donation Amount</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 AUD</option><option value="10">10.00 AUD</option><option value="20">20.00 AUD</option><option value="40">40.00 AUD</option><option value="60">60.00 AUD</option><option value="80">80.00 AUD</option><option value="90">90.00 AUD</option><option value="100">100.00 AUD</option><option value="200">200.00 AUD</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="'._SUBMIT.'" title="'._SUBMIT.'" type="submit"></td></tr></tbody></table>', + 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="AUD" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"><input name="cancel" id="cancel" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"></form>', + 3 => '', + 4 => '<!-- Start Form Validation JavaScript //--> +<script type="text/javascript"> +<!--// +function xoopsFormValidate_donation() { var myform = window.document.donation; +var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true; +} +//--></script> +<!-- End Form Validation JavaScript //-->'); + + $paypalform = array( 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', + 1 => '<input name="cmd" value="_s-xclick" type="hidden">', + 2 => '<input name="hosted_button_id" value="%s" type="hidden">', + 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">', + 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">', + 5 => '</form>'); + + for($key=0;$key<=4;$key++) { + switch ($key) { + case 2: + $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xortifyModule']->getVar('dirname')), strtoupper($GLOBALS['xortifyModule']->getVar('dirname')). ' '.$GLOBALS['xortifyModule']->getVar('name')); + break; + } + } + + $istart = strpos($about, ($paypalform[0]), 1); + $iend = strpos($about, ($paypalform[5]), $istart+1)+strlen($paypalform[5])-1; + echo (substr($about, 0, $istart-1)); + echo implode("\n", $donationform); + echo (substr($about, $iend+1, strlen($about)-$iend-1)); + break; + } + + xortify_footer_adminMenu(); + $xoops->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,37 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ +$xoops = Xoops::getInstance(); +$module_handler =& $xoops->getHandler('module'); +$GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); +$GLOBALS['xortifyImageAdmin'] = $GLOBALS['xortifyModule']->getInfo('icons32'); + +global $adminmenu; +$adminmenu = array(); +$adminmenu[1]['title'] = _XOR_ADMENU4; +$adminmenu[1]['icon'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/home.png'; +$adminmenu[1]['image'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/home.png'; +$adminmenu[1]['link'] = "admin/index.php?op=dashboard"; +$adminmenu[2]['title'] = _XOR_ADMENU1; +$adminmenu[2]['icon'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/current.bans.png'; +$adminmenu[2]['image'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/current.bans.png'; +$adminmenu[2]['link'] = "admin/index.php?op=list&fct=bans"; +$adminmenu[3]['title'] = _XOR_ADMENU3; +$adminmenu[3]['icon'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/xortify.log.png'; +$adminmenu[3]['image'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/xortify.log.png'; +$adminmenu[3]['link'] = "admin/index.php?op=log"; +$adminmenu[4]['title'] = _XOR_ADMENU2; +$adminmenu[4]['icon'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/access.list.png'; +$adminmenu[4]['image'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/access.list.png'; +$adminmenu[4]['link'] = "admin/index.php?op=signup&fct=signup"; +$adminmenu[5]['title'] = _XOR_ADMENU5; +$adminmenu[5]['icon'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/about.png'; +$adminmenu[5]['image'] = '../../'.$GLOBALS['xortifyImageAdmin'].'/about.png'; +$adminmenu[5]['link'] = "admin/index.php?op=about"; +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,118 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuth { + + var $_dao; + + var $_errors; + /** + * Authentication Service constructor + */ + function XortifyAuth (&$dao){ + $this->_dao = $dao; + } + + /** + * @abstract need to be write in the dervied class + */ + function authenticate() { + $authenticated = false; + + return $authenticated; + } + + /** + * add an error + * + * @param string $value error to add + * @access public + */ + function setErrors($err_no, $err_str) + { + $this->_errors[$err_no] = trim($err_str); + } + + /** + * return the errors for this object as an array + * + * @return array an array of errors + * @access public + */ + function getErrors() + { + return $this->_errors; + } + + /** + * return the errors for this object as html + * + * @return string html listing the errors + * @access public + */ + function getHtmlErrors() + { + global $xoopsConfig; + $ret = '<br>'; + if ( $xoopsConfig['debug_mode'] == 1 || $xoopsConfig['debug_mode'] == 2 ) + { + if (!empty($this->_errors)) { + foreach ($this->_errors as $errno => $errstr) { + $ret .= $errstr . '<br/>'; + } + } else { + $ret .= _NONE.'<br />'; + } + $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); + } + else { + $ret .= _US_INCORRECTLOGIN; + } + return $ret; + } + + /** + * checks for variables require in siteinfo package in the auth library + * + * @param array $siteinfo + * + * @return array $siteinfo + * @access public + */ + function check_siteinfo($siteinfo){ + + global $xoopsConfig; + if (!isset($siteinfo)||empty($siteinfo)||!is_array($siteinfo)){ + $siteinfo = array(); + $siteinfo['sitename'] = $xoopsConfig['sitename']; + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + $siteinfo['systemkey'] = XOOPS_LICENSE_KEY; + $siteinfo['xoops_url'] = XOOPS_URL; + } + + if (!isset($siteinfo['sitename'])||empty($siteinfo['sitename'])) + $siteinfo['sitename'] = $xoopsConfig['sitename']; + + if (!isset($siteinfo['adminmail'])||empty($siteinfo['adminmail'])) + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + + if (!isset($siteinfo['xoops_url'])||empty($siteinfo['xoops_url'])) + $siteinfo['xoops_url'] = XOOPS_URL; + + if (!isset($siteinfo['systemkey'])||empty($siteinfo['systemkey'])) + $siteinfo['systemkey'] = $xoopsConfig['systemkey']; + + return $siteinfo; + } +} + + +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,184 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + +if (!function_exists('json_encode')){ + function json_encode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->encode($data); + } +} + +if (!function_exists('json_decode')){ + function json_decode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->decode($data); + } +} + + +define('XORTIFY_CURL_API', $GLOBALS['xoopsModuleConfig']['xortify_uricurl']); +define('XORTIFY_USER_AGENT', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) XOOPS/20100101 XoopsAuth/1.xx (php)'); +include_once XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_curl_provisionning.php'; + +class XortifyAuthCurl extends XortifyAuth { + + var $curl_client; + var $curl_xoops_username = ''; + var $curl_xoops_password = ''; + var $_dao; + var $_json = ''; + /** + * Authentication Service constructor + */ + function XortifyAuthCurl (&$dao) { + if (!$ch = curl_init(XORTIFY_CURL_API)) { + trigger_error('Could not intialise CURL file: '.XORTIFY_CURL_API); + return false; + } + $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURL_API).'.cookie'; + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT); + $this->curl_client =& $ch; + } + + + /** + * Authenticate user again curl directory (Bind) + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + + if (!$this->curl_client) { + $this->setErrors(0, _AUTH_CURL_EXTENSION_NOT_LOAD); + return $authenticated; + } + + + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_authentication' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + return $result["RESULT"]; + } + + + /** + * validate a user via curl + * + * @param string $uname + * @param string $email + * @param string $pass + * @param string $vpass + * + * @return string + */ + function validate($uname, $email, $pass, $vpass){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_user_validate' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + + /** + * get the xoops site disclaimer via curl + * + * @return string + */ + function network_disclaimer(){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_network_disclaimer' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password)))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + /** + * create a user + * + * @param bool $user_viewemail + * @param string $uname + * @param string $email + * @param string $url + * @param string $actkey + * @param string $pass + * @param integer $timezone_offset + * @param bool $user_mailok + * @param array $siteinfo + * + * @return array + */ + function create_user($user_viewemail, $uname, $email, $url, $actkey, + $pass, $timezone_offset, $user_mailok, $siteinfo){ + + $siteinfo = $this->check_siteinfo($siteinfo); + + $rnd = rand(-100000, 100000000); + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'xoops_create_user='.json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + } + + function obj2array($objects) { + $ret = array(); + foreach($objects as $key => $value) { + if (is_a($value, 'stdClass')) { + $ret[$key] = (array)$value; + } elseif (is_array($value)) { + $ret[$key] = $this->obj2array($value); + } else { + $ret[$key] = $value; + } + } + return $ret; + } + +} +// end class + + +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,190 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuthCurlProvisionning { + + var $_auth_instance; + + function &getInstance(&$auth_instance) + { + static $provis_instance; + if (!isset($provis_instance)) { + $provis_instance = new XortifyAuthCurlProvisionning($auth_instance); + } + return $provis_instance; + } + + /** + * Authentication Service constructor + */ + function XortifyAuthCurlProvisionning (&$auth_instance) { + $this->_auth_instance = &$auth_instance; + $config_handler =& xoops_gethandler('config'); + $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + foreach ($config as $key => $val) { + $this->$key = $val; + } + $config_gen =& $config_handler->getConfigsByCat(XOOPS_CONF); + $this->default_TZ = $config_gen['default_TZ']; + $this->theme_set = $config_gen['theme_set']; + $this->com_mode = $config_gen['com_mode']; + $this->com_order = $config_gen['com_order']; + } + + /** + * Return a Xortify User Object + * + * @return XortifyUser or false + */ + function getXortifyUser($uname) { + $member_handler =& xoops_gethandler('member'); + $criteria = new Criteria('uname', $uname); + $getuser = $member_handler->getUsers($criteria); + if (count($getuser) == 1) + return $getuser[0]; + else return false; + } + + /** + * Launch the synchronisation process + * + * @return bool + */ + function sync($datas, $uname, $pwd = null) { + $xoopsUser = $this->getXortifyUser($uname); + if (!$xoopsUser) { // Xortify User Database not exists + if ($this->curl_provisionning) { + $xoopsUser = $this->add($datas, $uname, $pwd); + } else $this->_auth_instance->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); + } else { // Xortify User Database exists + + } + return $xoopsUser; + } + + /** + * Add a new user to the system + * + * @return bool + */ + function add($datas, $uname, $pwd = null) { + $ret = false; + $member_handler =& xoops_gethandler('member'); + // Create XOOPS Database User + $newuser = $member_handler->createUser(); + $newuser->setVar('uname', $uname); + $newuser->setVar('pass', md5(stripslashes($pwd))); + $newuser->setVar('email', $datas['email']); + $newuser->setVar('rank', 0); + $newuser->setVar('level', 1); + $newuser->setVar('timezone_offset', $this->default_TZ); + $newuser->setVar('theme', $this->theme_set); + $newuser->setVar('umode', $this->com_mode); + $newuser->setVar('uorder', $this->com_order); + if ($this->curl_provisionning) + $tab_mapping = explode('|', $this->curl_field_mapping); + else + $tab_mapping = explode('|', $this->ldap_field_mapping); + + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $newuser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])])); + } + if ($member_handler->insertUser($newuser)) { + } + if ($member_handler->insertUser($newuser)) { + foreach ($this->curl_provisionning_group as $groupid) + $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); + $newuser->unsetNew(); + return $newuser; + } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + + $newuser->unsetNew(); + return $newuser; + //else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + return $ret; + } + + /** + * Modify user information + * + * @return bool + */ + function change(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler =& xoops_gethandler('member'); + $xoopsUser->setVar('pass', md5(stripslashes($pwd))); + $tab_mapping = explode('|', $this->ldap_field_mapping); + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0])); + } + if ($member_handler->insertUser($xoopsUser)) { + return $xoopsUser; + } else redirect_header(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors()); + return $ret; + } + + function change_curl(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler =& xoops_gethandler('member'); + $xoopsUser->setVar('pass', md5(stripslashes($pwd))); + $tab_mapping = explode('|', $this->curl_field_mapping); + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0])); + } + if ($member_handler->insertUser($xoopsUser)) { + return $xoopsUser; + } else redirect_header(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors()); + return $ret; + } + + /** + * Modify a user + * + * @return bool + */ + function delete() { + } + + /** + * Suspend a user + * + * @return bool + */ + function suspend() { + } + + /** + * Restore a user + * + * @return bool + */ + function restore() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function resetpwd() { + } + + +} +// end class + +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised.php 2011-12-15 04:48:00 UTC (rev 8493) @@ -0,0 +1,165 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +define('XORTIFY_CURLSERIAL_API', $GLOBALS['xoopsModuleConfig']['xortify_uriserial']); +define('XORTIFY_USER_AGENT', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) XOOPS/20100101 XoopsAuth/1.xx (php)'); +include_once XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_curlserilaised_provisionning.php'; + +class XortifyAuthCurlserialised extends XortifyAuth { + + var $curl_client; + var $curl_xoops_username = ''; + var $curl_xoops_password = ''; + var $_dao; + /** + * Authentication Service constructor + */ + function XortifyAuthCurlserialised (&$dao) { + + if (!$ch = curl_init(XORTIFY_CURLSERIAL_API)) { + trigger_error('Could not intialise CURL file: '.$url); + return false; + } + $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURLSERIAL_API).'.cookie'; + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT); + $this->curl_client =& $ch; + } + + + /** + * Authenticate user again curl directory (Bind) + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + + if (!$this->curl_client) { + $this->setErrors(0, _AUTH_CURL_EXTENSION_NOT_LOAD); + return $authenticated; + } + + + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_authentication' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + return $result["RESULT"]; + } + + + /** + * validate a user via curl + * + * @param string $uname + * @param string $email + * @param string $pass + * @param string $vpass + * + * @return string + */ + function validate($uname, $email, $pass, $vpass){ + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_user_validate' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + + /** + * get the xoops site disclaimer via curl + * + * @return string + */ + function network_disclaimer(){ + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_network_disclaimer' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password)))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + /** + * create a user + * + * @param bool $user_viewemail + * @param string $uname + * @param string $email + * @param string $url + * @par... [truncated message content] |
From: <ma...@us...> - 2011-12-18 17:18:54
|
Revision: 8517 http://xoops.svn.sourceforge.net/xoops/?rev=8517&view=rev Author: mageg Date: 2011-12-18 17:18:48 +0000 (Sun, 18 Dec 2011) Log Message: ----------- move images/banners to uploads/banners (TODO Do not forget to make changes in the package update) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/ XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/banner.swf XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/blank.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_banner_2.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_flashbanner2.swf Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/images/banners/ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php 2011-12-17 19:47:55 UTC (rev 8516) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php 2011-12-18 17:18:48 UTC (rev 8517) @@ -54,7 +54,7 @@ // Writable files and directories $configs['writable'] = - array('uploads/', 'uploads/avatars/', 'uploads/images/', 'uploads/ranks/', 'uploads/smilies/', 'mainfile.php'); + array('uploads/', 'uploads/avatars/', 'uploads/images/', 'uploads/ranks/', 'uploads/smilies/', 'uploads/banners/', 'mainfile.php'); // Modules to be installed by default $configs['modules'] = array(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2011-12-17 19:47:55 UTC (rev 8516) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2011-12-18 17:18:48 UTC (rev 8517) @@ -73,9 +73,9 @@ $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); // data for table 'banner' - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/banner.swf', 'http://www.xoops.org/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', 1008813250, '')"); // default theme $time = time(); $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ")"); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/banner.swf =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/banner.swf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/blank.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/blank.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/index.html 2011-12-18 17:18:48 UTC (rev 8517) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_banner_2.gif =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_banner_2.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_flashbanner2.swf =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/xoops_flashbanner2.swf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2011-12-18 18:04:01
|
Revision: 8518 http://xoops.svn.sourceforge.net/xoops/?rev=8518&view=rev Author: wishcraft Date: 2011-12-18 18:03:50 +0000 (Sun, 18 Dec 2011) Log Message: ----------- Xortify 3.03 (Stable) - Strict Mode Obeyed, Tested on SVN Copy of 2.6.0 - Client for Xortify Security Cloud - Spam, Harvesting and Hacking Prevention from pre-aware honey-pots. Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/access.list.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/current.bans.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/xortify.log.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlserialised_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curlxml_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_json.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_json_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_soap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_soap_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetserialised_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_wgetxml_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/authfactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curlserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/curlxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/json.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/log.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/soap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/wgetserialised.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/wgetxml.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/cron/serverup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/changelog.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/credits.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/install.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/licence.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/docs/readme.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/accessdenied.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/left_both.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/right_both.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/images/xortify_slogo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/JSON.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/forms.objects.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/forms.xortify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.header.addmeta.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.header.endcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/post.loader.mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/pre.loader.mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/ban.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/help/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/language/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/projecthoneypot.org.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/protector.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/spiders.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/stopforumspam.com.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/plugin/xortify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/preloads/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/projecthoneypot.org/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/projecthoneypot.org/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/footer.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/header.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/protector/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/providers.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/spiders/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/spiders/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/stopforumspam.com/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/stopforumspam.com/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/footer.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/header.post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/providers/xortify/post.loader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/sql/mysql.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_bans.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_log.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_form.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_nocommunication.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/templates/xortify_banning_notice.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/xoops_version.php Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16 ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/access.list.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/access.list.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/current.bans.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/current.bans.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/xortify.log.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/16/xortify.log.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32 ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/access.list.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/current.bans.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/icons/32/xortify.log.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,55 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Nexoork Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @author Richardo Costa TRABIS + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SystemXortifyPreload extends XoopsPreloadItem +{ + + static function init() { + $xoops = Xoops::getInstance(); + $module_handler = $xoops->getHandler('module'); + $config_handler = $xoops->getHandler('config'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + if (is_object($GLOBALS['xortifyModule'])) { + $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); + } else { + $GLOBALS['xortifyModuleConfig']['fault_delay'] = 600; + } + XoopsLoad::load('xoopscache'); + } + + + static function eventCoreIncludeCommonEnd($args) + { + SystemXortifyPreload::init(); + $result = XoopsCache::read('xortify_core_include_common_end_cron'); + if ((isset($result['time'])?(float)$result['time']:0)<=microtime(true)) { + XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['fault_delay']), $GLOBALS['xortifyModuleConfig']['fault_delay']); + switch ($GLOBALS['xortifyModuleConfig']['crontype']) { + case 'preloader': + $read = XoopsCache::read('xortify_pause_preload'); + if ((isset($read['time'])?(float)$read['time']:0)<=microtime(true)) { + XoopsCache::write('xortify_pause_preload', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['croninterval'])); + $GLOBALS['xortify_preloader']=true; + ob_start(); + include(XOOPS_ROOT_PATH.'/modules/xortify/cron/serverup.php'); + ob_end_clean(); + } + break; + } + XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)), -1); + } + + } +} + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.html 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,10 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Untitled Document</title> +</head> + +<body> +</body> +</html> Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,455 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + + include(dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php'); + + $GLOBALS['xoops'] = Xoops::getInstance(); + + if (!defined('_CHARSET')) + define ("_CHARSET","UTF-8"); + if (!defined('_CHARSET_ISO')) + define ("_CHARSET_ISO","ISO-8859-1"); + + $GLOBALS['myts'] = MyTextSanitizer::getInstance(); + + $module_handler = $GLOBALS['xoops']->getHandler('module'); + $config_handler = $GLOBALS['xoops']->getHandler('config'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); + + include_once $GLOBALS['xoops']->path('class'.DS.'cache'.DS.'xoopscache.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'pagenav.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopslists.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'tree.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsformloader.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'class'.DS.'auth'.DS.'authfactory.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'functions.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'forms.xortify.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{ + echo $GLOBALS['xoops']->error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); + //return false; + } + $GLOBALS['xortifyImageIcon'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons16'); + $GLOBALS['xortifyImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons32'); + + $myts = MyTextSanitizer::getInstance(); + + if ($GLOBALS['xoopsUser']) { + $moduleperm_handler = $GLOBALS['xoops']->getHandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['xortifyModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) { + $GLOBALS['xoops']->redirect(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + $GLOBALS['xoops']->redirect(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + $GLOBALS['xoops']->loadLanguage('admin', 'xortify'); + $GLOBALS['xoops']->loadLanguage('modinfo', 'xortify'); + + $GLOBALS['xoops']->header(); + $GLOBALS['xoops']->tpl->assign('pathImageIcon', $GLOBALS['xortifyImageIcon']); + $GLOBALS['xoops']->tpl->assign('pathImageAdmin', $GLOBALS['xortifyImageAdmin']); + + $op = isset($_REQUEST['op'])?$_REQUEST['op']:"dashboard"; + $fct = isset($_REQUEST['fct'])?$_REQUEST['fct']:""; + + switch($op) { + case "signup": + + switch ($fct) + { + case "save": + + $xortifyAuth = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $myts = MyTextSanitizer::getInstance(); + $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : ''; + $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; + $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : ''; + $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; + $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : ''; + $agree = (isset($_POST['agree']) && intval($_POST['agree'])) ? 1 : 0; + + if ($agree != 1) { + $stop .= _US_UNEEDAGREE . '<br />'; + } + + $validate = $xortifyAuth->validate($uname, $email, $pass, $vpass); + + if ($validate!=false) + $stop .= "User details didn't validate with Xortify.com<br/>$validate"; + + XoopsLoad::load("captcha"); + $xoopsCaptcha = XoopsCaptcha::getInstance(); + if (! $xoopsCaptcha->verify() ) { + $stop .= $xoopsCaptcha->getMessage(); + } + + if ($stop!='') { + + echo xortify_adminMenu(2); + echo "<p align='center' style='font-size: 15px; color: #FF0000;'>$stop</p>"; + $GLOBALS['xoops'] = Xoops::getInstance(); + $xortifyAuth = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts = MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('yoururl',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); + exit; + } else { + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + } + } else { + @$xortifyAuth->create_user( $_POST['viewemail'], $uname, $email, $url, $actkey, + $pass, $_POST['timezone'], $_POST['mailok'], $xortifyAuth->check_siteinfo(array())); + + $moduleHandler = $GLOBALS['xoops']->getHandler('module'); + $configHandler = $GLOBALS['xoops']->getHandler('config'); + $GLOBALS['xortifyModule'] = $moduleHandler->getByDirname('xortify'); + $configs = $configHandler->getConfigs(new Criteria('conf_modid', $GLOBALS['xortifyModule']->mid()) ); + foreach($configs as $id => $config) + switch($config->getVar('conf_name')) { + case 'xortify_username': + $config->setVar('conf_value', $uname); + @$configHandler->insertConfig($config); + break; + case 'xortify_password': + $config->setVar('conf_value', $pass); + @$configHandler->insertConfig($config); + break; + } + + $GLOBALS['xoops']->redirect("index.php", 4, _XOR_USERCREATED_PLEASEACTIVATE); + exit(0); + } + break; + default: + case "signup": + + echo xortify_adminMenu(4); + $GLOBALS['xoops'] = Xoops::getInstance(); + + $disclaimer = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol'])->network_disclaimer(); + + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "yoururl", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts = MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('yoururl',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); + exit; + } else { + + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + + } + break; + } + break; + case "log": + echo xortify_adminMenu(3); + + include_once $GLOBALS['xoops']->path( "/class/pagenav.php" ); + + $log_handler = $GLOBALS['xoops']->getModuleHandler('log', 'xortify'); + + $ttl = $log_handler->getCount(NULL); + $limit = !empty($_POST['limit'])?intval($_POST['limit']):30; + $start = !empty($_POST['start'])?intval($_POST['start']):0; + $order = !empty($_POST['order'])?$_POST['order']:'DESC'; + $sort = !empty($_POST['sort'])?''.$_POST['sort'].'':'date'; + + $pagenav = new XoopsPageNav($ttl, $limit, $start, 'start', 'limit='.$limit.'&sort='.$sort.'&order='.$order.'&op='.$op); + $GLOBALS['xoops']->tpl->assign('pagenav', $pagenav->renderNav()); + + foreach (array( 'action','provider','date','uname','email','ip4','ip6','proxy-ip4', + 'proxy-ip6','network-addy','agent') as $id => $key) { + $GLOBALS['xoops']->tpl->assign(strtolower(str_replace('-','_',$key).'_th'), '<a href="'.$_SERVER['PHP_SELF'].'?start='.$start.'&limit='.$limit.'&sort='.str_replace('_','-',$key).'&order='.((str_replace('_','-',$key)==$sort)?($order=='DESC'?'ASC':'DESC'):$order).'&op='.$op.'">'.(defined('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key)))?constant('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))):'_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))).'</a>'); + } + + $criteria = new Criteria('1','1'); + $criteria->setStart($start); + $criteria->setLimit($limit); + $criteria->setSort('`'.$sort.'`'); + $criteria->setOrder($order); + + $logs = $log_handler->getObjects($criteria, true); + foreach($logs as $id => $log) { + $GLOBALS['xoops']->tpl->append('log', $log->toArray()); + } + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_log.html'); + + break; + case "list": + + echo xortify_adminMenu(2); + + XoopsLoad::load("xoopscache"); + if (!class_exists('XoopsCache')) + XoopsLoad::load("cache"); + XoopsLoad::load("pagenav"); + + if (!$bans = XoopsCache::read('xortify_bans_cache')) { + + require_once( XOOPS_ROOT_PATH.'/modules/xortify/class/'.$GLOBALS['xortifyModuleConfig']['protocol'].'.php' ); + + $func = strtoupper($GLOBALS['xortifyModuleConfig']['protocol']).'XortifyExchange'; + + ob_start(); + $soapExchg = new $func; + $bans = $soapExchg->retrieveBans(); + ob_end_flush(); + + XoopsCache::delete('xortify_bans_cache'); + XoopsCache::delete('xortify_bans_cache_backup'); + XoopsCache::write('xortify_bans_cache', $bans, $GLOBALS['xortifyModuleConfig']['xortify_seconds']); + XoopsCache::write('xortify_bans_cache_backup', $bans, ($GLOBALS['xortifyModuleConfig']['xortify_seconds'] * 1.45)); + } + + if ($bans['bans']==0) { + + echo _XS_AM_NOCACHEMSG; + } else { + + $limit = !empty($_REQUEST['limit'])?intval($_REQUEST['limit']):30; + $start = !empty($_REQUEST['start'])?intval($_REQUEST['start']):0; + + $pagenav = new XoopsPageNav($bans['bans'], $limit, $start, 'start', 'limit='.$limit.'&op='.$op); + $GLOBALS['xoops']->tpl->assign('pagenav', $pagenav->renderNav()); + $i=0; + $num=0; + foreach($bans['data'] as $key => $data) { + $i++; + if ($i>=$start&&$num<=$limit) { + $num++; + if (strlen($data['ip4'])>0) { + $ipaddy = $data['ip4']; + $iptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['ip6'])>0) { + $ipaddy = $data['ip6']; + $iptype = _XS_IPTYPE_IP6; + } else { + $ipaddy = ''; + $iptype = _XS_IPTYPE_EMPTY; + } + + if (strlen($data['proxy-ip4'])>0) { + $proxyip = $data['proxy-ip4']; + $proxyiptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['proxy-ip6'])>0) { + $proxyip = $data['proxy-ip6']; + $proxyiptype = _XS_IPTYPE_IP6; + } else { + $proxyip = ''; + $proxyiptype = ''; + } + + $GLOBALS['xoops']->tpl->append('bans', array('iptype' => $iptype, 'ipaddy' => $ipaddy, + 'proxyiptype' => $proxyiptype, 'ip' => $proxyip, + 'netaddy' => $data['network-addy']?$data['network-addy']:' ', + 'macaddy' => $data['mac-addy']?$data['mac-addy']:' ', + 'long' => $data['long']?$data['long']:' ')); + } + } + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_bans.html'); + } + + + break; + case "dashboard": + default: + + echo xortify_adminMenu(1); + + $log_handler = $GLOBALS['xoops']->getModuleHandler('log', 'xortify'); + + $indexAdmin = new ModuleAdmin(); + + $indexAdmin->addInfoBox(_XOR_ADMIN_COUNTS); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_BANNED."</label>", $log_handler->getCountByField('action','banned'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_BLOCKED."</label>", $log_handler->getCountByField('action','blocked'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_MONITORED."</label>", $log_handler->getCountByField('action','monitored'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_PROJECTHONEYPOTORG."</label>", $log_handler->getCountByField('provider','projecthoneypot.org'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_PROTECTOR."</label>", $log_handler->getCountByField('provider','protector'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_SPIDERS."</label>", $log_handler->getCountByField('provider','spiders'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_STOPFORUMSPAMCOM."</label>", $log_handler->getCountByField('provider','stopforumspam.com'), 'Green'); + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_XORTIFY."</label>", $log_handler->getCountByField('provider','xortify'), 'Green'); + + XoopsLoad::load('xoopscache'); + if (!class_exists('XoopsCache')) { + // XOOPS 2.4 Compliance + XoopsLoad::load('cache'); + if (!class_exists('XoopsCache')) { + include_once XOOPS_ROOT_PATH.DS.'class'.DS.'cache'.DS.'xoopscache.php'; + } + } + + if ($bans = XoopsCache::read('xortify_bans_cache')) { + $indexAdmin->addInfoBoxLine(_XOR_ADMIN_COUNTS, "<label>"._XOR_ADMIN_THEREARE_CLOUDEDBANS."</label>", count($bans), 'Green'); + } + + echo $indexAdmin->renderIndex(); + + break; + case "about": + + echo xortify_adminMenu(5); + + $paypalitemno='XORTIFY302'; + $aboutAdmin = new ModuleAdmin(); + $about = $aboutAdmin->renderabout($paypalitemno, false); + + $donationform = array( 0 => '<form name="donation" id="donation" action="http://www.chronolabs.coop/modules/xpayment/" method="post" onsubmit="return xoopsFormValidate_donation();">', + 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">'._XOR_ADMIN_MAKEDONATE.'</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">Donation Amount</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 AUD</option><option value="10">10.00 AUD</option><option value="20">20.00 AUD</option><option value="40">40.00 AUD</option><option value="60">60.00 AUD</option><option value="80">80.00 AUD</option><option value="90">90.00 AUD</option><option value="100">100.00 AUD</option><option value="200">200.00 AUD</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="'._SUBMIT.'" title="'._SUBMIT.'" type="submit"></td></tr></tbody></table>', + 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="AUD" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"><input name="cancel" id="cancel" value="http://www.chronolabs.coop/modules/donations/success.php" type="hidden"></form>', + 3 => '', + 4 => '<!-- Start Form Validation JavaScript //--> +<script type="text/javascript"> +<!--// +function xoopsFormValidate_donation() { var myform = window.document.donation; +var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true; +} +//--></script> +<!-- End Form Validation JavaScript //-->'); + + $paypalform = array( 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', + 1 => '<input name="cmd" value="_s-xclick" type="hidden">', + 2 => '<input name="hosted_button_id" value="%s" type="hidden">', + 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">', + 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">', + 5 => '</form>'); + + for($key=0;$key<=4;$key++) { + switch ($key) { + case 2: + $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xortifyModule']->getVar('dirname')), strtoupper($GLOBALS['xortifyModule']->getVar('dirname')). ' '.$GLOBALS['xortifyModule']->getVar('name')); + break; + } + } + + $istart = strpos($about, ($paypalform[0]), 1); + $iend = strpos($about, ($paypalform[5]), $istart+1)+strlen($paypalform[5])-1; + echo (substr($about, 0, $istart-1)); + echo implode("\n", $donationform); + echo (substr($about, $iend+1, strlen($about)-$iend-1)); + break; + } + + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,39 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ +global $xortifyModule, $xortifyImageAdmin; +$xoops = Xoops::getInstance(); +$module_handler = $xoops->getHandler('module'); +$xortifyModule = $module_handler->getByDirname('xortify'); +global $adminmenu; +$adminmenu = array(); +if (is_object($GLOBALS['xortifyModule'])) { + $xortifyImageAdmin = $xortifyModule->getInfo('icons32'); + $adminmenu[1]['title'] = _XOR_ADMENU4; + $adminmenu[1]['icon'] = '../../'.$xortifyImageAdmin.'/home.png'; + $adminmenu[1]['image'] = '../../'.$xortifyImageAdmin.'/home.png'; + $adminmenu[1]['link'] = "admin/index.php?op=dashboard"; + $adminmenu[2]['title'] = _XOR_ADMENU1; + $adminmenu[2]['icon'] = '../../'.$xortifyImageAdmin.'/current.bans.png'; + $adminmenu[2]['image'] = '../../'.$xortifyImageAdmin.'/current.bans.png'; + $adminmenu[2]['link'] = "admin/index.php?op=list&fct=bans"; + $adminmenu[3]['title'] = _XOR_ADMENU3; + $adminmenu[3]['icon'] = '../../'.$xortifyImageAdmin.'/xortify.log.png'; + $adminmenu[3]['image'] = '../../'.$xortifyImageAdmin.'/xortify.log.png'; + $adminmenu[3]['link'] = "admin/index.php?op=log"; + $adminmenu[4]['title'] = _XOR_ADMENU2; + $adminmenu[4]['icon'] = '../../'.$xortifyImageAdmin.'/access.list.png'; + $adminmenu[4]['image'] = '../../'.$xortifyImageAdmin.'/access.list.png'; + $adminmenu[4]['link'] = "admin/index.php?op=signup&fct=signup"; + $adminmenu[5]['title'] = _XOR_ADMENU5; + $adminmenu[5]['icon'] = '../../'.$xortifyImageAdmin.'/about.png'; + $adminmenu[5]['image'] = '../../'.$xortifyImageAdmin.'/about.png'; + $adminmenu[5]['link'] = "admin/index.php?op=about"; +} +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/menu.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,118 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuth { + + var $_dao; + + var $_errors; + /** + * Authentication Service constructor + */ + function XortifyAuth (&$dao){ + $this->_dao = $dao; + } + + /** + * @abstract need to be write in the dervied class + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + + return $authenticated; + } + + /** + * add an error + * + * @param string $value error to add + * @access protected + */ + function setErrors($err_no, $err_str) + { + $this->_errors[$err_no] = trim($err_str); + } + + /** + * return the errors for this object as an array + * + * @return array an array of errors + * @access protected + */ + function getErrors() + { + return $this->_errors; + } + + /** + * return the errors for this object as html + * + * @return string html listing the errors + * @access protected + */ + function getHtmlErrors() + { + global $xoopsConfig; + $ret = '<br>'; + if ( $xoopsConfig['debug_mode'] == 1 || $xoopsConfig['debug_mode'] == 2 ) + { + if (!empty($this->_errors)) { + foreach ($this->_errors as $errno => $errstr) { + $ret .= $errstr . '<br/>'; + } + } else { + $ret .= _NONE.'<br />'; + } + $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); + } + else { + $ret .= _US_INCORRECTLOGIN; + } + return $ret; + } + + /** + * checks for variables require in siteinfo package in the auth library + * + * @param array $siteinfo + * + * @return array $siteinfo + * @access protected + */ + function check_siteinfo($siteinfo){ + + global $xoopsConfig; + if (!isset($siteinfo)||empty($siteinfo)||!is_array($siteinfo)){ + $siteinfo = array(); + $siteinfo['sitename'] = $xoopsConfig['sitename']; + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + $siteinfo['systemkey'] = XOOPS_LICENSE_KEY; + $siteinfo['xoops_url'] = XOOPS_URL; + } + + if (!isset($siteinfo['sitename'])||empty($siteinfo['sitename'])) + $siteinfo['sitename'] = $xoopsConfig['sitename']; + + if (!isset($siteinfo['adminmail'])||empty($siteinfo['adminmail'])) + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + + if (!isset($siteinfo['xoops_url'])||empty($siteinfo['xoops_url'])) + $siteinfo['xoops_url'] = XOOPS_URL; + + if (!isset($siteinfo['systemkey'])||empty($siteinfo['systemkey'])) + $siteinfo['systemkey'] = $xoopsConfig['systemkey']; + + return $siteinfo; + } +} + + +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,186 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + +if (!function_exists('json_encode')){ + function json_encode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->encode($data); + } +} + +if (!function_exists('json_decode')){ + function json_decode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->decode($data); + } +} + + +define('XORTIFY_CURL_API', $GLOBALS['xortifyModuleConfig']['xortify_uricurl']); +define('XORTIFY_USER_AGENT', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) XOOPS/20100101 XoopsAuth/1.xx (php)'); +include_once XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_curl_provisionning.php'; + +class XortifyAuthCurl extends XortifyAuth { + + var $curl_client; + var $curl_xoops_username = ''; + var $curl_xoops_password = ''; + var $_dao; + var $_json = ''; + /** + * Authentication Service constructor + */ + function XortifyAuthCurl (&$dao) { + if (!$ch = curl_init(XORTIFY_CURL_API)) { + trigger_error('Could not intialise CURL file: '.XORTIFY_CURL_API); + return false; + } + $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURL_API).'.cookie'; + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_connecttimeout']*2); + curl_setopt($ch, CURLOPT_TIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_timeout']*2); + curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT); + $this->curl_client = $ch; + } + + + /** + * Authenticate user again curl directory (Bind) + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + + if (!$this->curl_client) { + $this->setErrors(0, _AUTH_CURL_EXTENSION_NOT_LOAD); + return $authenticated; + } + + + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_authentication' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + return $result["RESULT"]; + } + + + /** + * validate a user via curl + * + * @param string $uname + * @param string $email + * @param string $pass + * @param string $vpass + * + * @return string + */ + function validate($uname, $email, $pass, $vpass){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_user_validate' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + + /** + * get the xoops site disclaimer via curl + * + * @return string + */ + function network_disclaimer(){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_network_disclaimer' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password)))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + /** + * create a user + * + * @param bool $user_viewemail + * @param string $uname + * @param string $email + * @param string $url + * @param string $actkey + * @param string $pass + * @param integer $timezone_offset + * @param bool $user_mailok + * @param array $siteinfo + * + * @return array + */ + function create_user($user_viewemail, $uname, $email, $url, $actkey, + $pass, $timezone_offset, $user_mailok, $siteinfo){ + + $siteinfo = $this->check_siteinfo($siteinfo); + + $rnd = rand(-100000, 100000000); + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'xoops_create_user='.json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + } + + function obj2array($objects) { + $ret = array(); + foreach($objects as $key => $value) { + if (is_a($value, 'stdClass')) { + $ret[$key] = (array)$value; + } elseif (is_array($value)) { + $ret[$key] = $this->obj2array($value); + } else { + $ret[$key] = $value; + } + } + return $ret; + } + +} +// end class + + +?> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php 2011-12-18 18:03:50 UTC (rev 8518) @@ -0,0 +1,190 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuthCurlProvisionning { + + var $_auth_instance; + + function &getInstance(&$auth_instance) + { + static $provis_instance; + if (!isset($provis_instance)) { + $provis_instance = new XortifyAuthCurlProvisionning($auth_instance); + } + return $provis_instance; + } + + /** + * Authentication Service constructor + */ + function XortifyAuthCurlProvisionning (&$auth_instance) { + $this->_auth_instance = &$auth_instance; + $config_handler = $GLOBALS['xoops']->getHandler('config'); + $config = $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + foreach ($config as $key => $val) { + $this->$key = $val; + } + $config_gen = $config_handler->getConfigsByCat(XOOPS_CONF); + $this->default_TZ = $config_gen['default_TZ']; + $this->theme_set = $config_gen['theme_set']; + $this->com_mode = $config_gen['com_mode']; + $this->com_order = $config_gen['com_order']; + } + + /** + * Return a Xortify User Object + * + * @return XortifyUser or false + */ + function getXortifyUser($uname) { + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $criteria = new Criteria('uname', $uname); + $getuser = $member_handler->getUsers($criteria); + if (count($getuser) == 1) + return $getuser[0]; + else return false; + } + + /** + * Launch the synchronisation process + * + * @return bool + */ + function sync($datas, $uname, $pwd = null) { + $xoopsUser = $this->getXortifyUser($uname); + if (!$xoopsUser) { // Xortify User Database not exists + if ($this->curl_provisionning) { + $xoopsUser = $this->add($datas, $uname, $pwd); + } else $this->_auth_instance->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); + } else { // Xortify User Database exists + + } + return $xoopsUser; + } + + /** + * Add a new user to the system + * + * @return bool + */ + function add($datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + // Create XOOPS Database User + $newuser = $member_handler->createUser(); + $newuser->setVar('uname', $uname); + $newuser->setVar('pass', md5(stripslashes($pwd))); + $newuser->setVar('email', $datas['email']); + $newuser->setVar('rank', 0); + $newuser->setVar('level', 1); + $newuser->setVar('timezone_offset', $this->default_TZ); + $newuser->setVar('theme', $this->theme_set); + $newuser->setVar('umode', $this->com_mode); + $newuser->setVar('uorder', $this->com_order); + if ($this->curl_provisionning) + $tab_mapping = explode('|', $this->curl_field_mapping); + else + $tab_mapping = explode('|', $this->ldap_field_mapping); + + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $newuser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])])); + } + if ($member_handler->insertUser($newuser)) { + } + if ($member_handler->insertUser($newuser)) { + foreach ($this->curl_provisionning_group as $groupid) + $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); + $newuser->unsetNew(); + return $newuser; + } else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + + $newuser->unsetNew(); + return $newuser; + //else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + return $ret; + } + + /** + * Modify user information + * + * @return bool + */ + function change(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $xoopsUser->setVar('pass', md5(stripslashes($pwd))); + $tab_mapping = explode('|', $this->ldap_field_mapping); + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0])); + } + if ($member_handler->insertUser($xoopsUser)) { + return $xoopsUser; + } else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors()); + return $ret; + } + + function change_curl(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $xoopsU... [truncated message content] |
From: <be...@us...> - 2011-12-21 08:28:34
|
Revision: 8528 http://xoops.svn.sourceforge.net/xoops/?rev=8528&view=rev Author: beckmi Date: 2011-12-21 08:28:26 +0000 (Wed, 21 Dec 2011) Log Message: ----------- reverting Xortify Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php 2011-12-19 15:54:31 UTC (rev 8527) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/preloads/xortify.php 2011-12-21 08:28:26 UTC (rev 8528) @@ -1,55 +0,0 @@ -<?php -/** - * @package xortify - * @subpackage module - * @description Sector Nexoork Security Drone - * @author Simon Roberts WISHCRAFT <si...@ch...> - * @author Richardo Costa TRABIS - * @copyright copyright (c) 2010-2013 XOOPS.org - * @licence GPL 2.0 - see docs/LICENCE.txt - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -class SystemXortifyPreload extends XoopsPreloadItem -{ - - static function init() { - $xoops = Xoops::getInstance(); - $module_handler = $xoops->getHandler('module'); - $config_handler = $xoops->getHandler('config'); - $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); - if (is_object($GLOBALS['xortifyModule'])) { - $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); - } else { - $GLOBALS['xortifyModuleConfig']['fault_delay'] = 600; - } - XoopsLoad::load('xoopscache'); - } - - - static function eventCoreIncludeCommonEnd($args) - { - SystemXortifyPreload::init(); - $result = XoopsCache::read('xortify_core_include_common_end_cron'); - if ((isset($result['time'])?(float)$result['time']:0)<=microtime(true)) { - XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['fault_delay']), $GLOBALS['xortifyModuleConfig']['fault_delay']); - switch ($GLOBALS['xortifyModuleConfig']['crontype']) { - case 'preloader': - $read = XoopsCache::read('xortify_pause_preload'); - if ((isset($read['time'])?(float)$read['time']:0)<=microtime(true)) { - XoopsCache::write('xortify_pause_preload', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['croninterval'])); - $GLOBALS['xortify_preloader']=true; - ob_start(); - include(XOOPS_ROOT_PATH.'/modules/xortify/cron/serverup.php'); - ob_end_clean(); - } - break; - } - XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)), -1); - } - - } -} - -?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php 2011-12-19 15:54:31 UTC (rev 8527) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xortify/admin/index.php 2011-12-21 08:28:26 UTC (rev 8528) @@ -437,7 +437,7 @@ for($key=0;$key<=4;$key++) { switch ($key) { case 2: - $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), '', strtoupper($GLOBALS['xortifyModule']->getVar('dirname')), strtoupper($GLOBALS['xortifyModule']->getVar('dirname')). ' '.$GLOBALS['xortifyModule']->getVar('name')); + $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'] . ' - ' . (strlen($GLOBALS['xoopsUser']->getVar('name'))>0?$GLOBALS['xoopsUser']->getVar('name'). ' ['.$GLOBALS['xoopsUser']->getVar('uname').']':$GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xortifyModule']->getVar('dirname')), strtoupper($GLOBALS['xortifyModule']->getVar('dirname')). ' '.$GLOBALS['xortifyModule']->getVar('name')); break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-01-02 23:04:40
|
Revision: 8629 http://xoops.svn.sourceforge.net/xoops/?rev=8629&view=rev Author: mageg Date: 2012-01-02 23:04:32 +0000 (Mon, 02 Jan 2012) Log Message: ----------- Changes for the new banners module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/uploads/banners/blank.gif Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -1,404 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * XOOPS banner management - * - * @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 core - * @since 2.0.0 - * @author Kazumi Ono <web...@my...> - * @author Taiwen Jiang <ph...@us...> - * @author DuGris aka L. Jen <http://www.dugris.info> - * @author Kris <kr...@fr...> - * @version $Id$ - */ - -include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; - -$xoops = Xoops::getInstance(); -$xoops->loadLanguage('banners'); - -/** - * Function to let your client login to see the stats - * - * @return void - */ -function clientlogin() -{ - $xoops = Xoops::getInstance(); - $xoops->header(); - $xoops->theme->addStylesheet(null, null, ' - #login_window { - max-width: 480px; - margin: 1em auto; - background-color: #f8f8f8; - color: inherit; - border: 1px solid #000; - } - - #login_window h2 { - margin: .5em; - padding: 130px 0 0; - background: url(images/password.png) no-repeat center top; - text-align: center; - } - .login_form.credentials { - margin: .5em 1em; - padding: 1em; - background-color: #ccc; - color: inherit; - } - .login_form.credentials label { - display: inline-block; - width: 33 %; - margin: 1px; - } - .login_form . credentials input { - width:50%; - margin: 1px; - padding: 1px; - border: 1px solid #000; - } - .login_form.credentials input:focus { - border: 1px solid #2266cc; - } - .login_form.actions { - padding: 1.5em .5em .5em; - text-align: center; - } - .login_info { - margin: .5em 1em; - text-align: center; - } - .content_title { - font-size: 1.2em; - } - '); - echo "<div id='login_window'> - <h2 class='content_title'>" . _BANNERS_LOGIN_TITLE . "</h2> - <form method='post' action='banners.php' class='login_form'> - <div class='credentials'> - <label for='login_form-login'>" . _BANNERS_LOGIN_LOGIN . "</label> - <input type='text' name='login' id='login_form-login' value='' /><br /> - <label for='login_form-password'>" . _BANNERS_LOGIN_PASS . "</label> - <input type='password' name='pass' id='login_form-password' value='' /><br /> - </div> - <div class='actions'><input type='hidden' name='op' value='Ok' /><button type='submit'>" . _BANNERS_LOGIN_OK . "</button></div> - <div class='login_info'>" . _BANNERS_LOGIN_INFO . "</div>" . $xoops->security->getTokenHTML("BANNER_LOGIN") . " - </form></div>"; - $xoops->footer(); -} - -/** - * Function to display the banners stats for each client - * - * @return void - */ -function bannerstats() -{ - $xoops = Xoops::getInstance(); - if ($_SESSION['banner_login'] == "" || $_SESSION['banner_pass'] == "") { - $xoops->redirect("banners.php", 2, _BANNERS_NO_LOGIN_DATA); - exit(); - } - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client) { - $xoops->header(); - $xoops->theme->addStylesheet(null, null, ' - #bannerstats {} - #bannerstats td {text-align: center;} - '); - - echo "<div id='bannerstats'> - <h4 class='content_title'>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</h4><hr /> - <table summary=''> - <caption>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</caption> - <thead><tr> - <td>ID</td> - <td>" . _BANNERS_IMP_MADE . "</td> - <td>" . _BANNERS_IMP_TOTAL . "</td> - <td>" . _BANNERS_IMP_LEFT . "</td> - <td>" . _BANNERS_CLICKS . "</td> - <td>" . _BANNERS_PER_CLICKS . "</td> - <td>" . _BANNERS_FUNCTIONS . "</td></tr></thead> - <tfoot><tr><td colspan='7'></td></tr></tfoot>"; - - $criteria = new Criteria('cid', $client->getVar('cid')); - $banners = $xoops->getHandlerBanner()->getObjects($criteria); - $i = 0; - /* @var $banner XoopsBanner */ - foreach ($banners as $banner) { - if ($banner->getvar('impmade') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impmade'), 0, 5); - } - if ($banner->getvar('imptotal') == 0) { - $left = _BANNERS_UNLIMITED; - } else { - $left = $banner->getvar('imptotal') - $banner->getvar('impmade'); - } - $class = ($i % 2 == 0) ? 'even' : 'odd'; - echo "<tbody><tr class='{$class}'> - <td>" . $banner->getvar('bid') . "</td> - <td>" . $banner->getvar('impmade') . "</td> - <td>" . $banner->getvar('imptotal') . "</td> - <td>{$left}</td> - <td>" . $banner->getvar('clicks') . "</td> - <td>{$percent}%</td> - <td><a href='banners.php?op=EmailStats&cid=" . $banner->getvar('cid') . "&bid=" . $banner->getvar('bid') . "' title='" . _BANNERS_STATS . "'>" . _BANNERS_STATS . "</a></td></tr></tbody>"; - $i++; - } - echo "</table> - <br /><br /> - <h4 class='content_title'>" . _BANNERS_FOW_IN . htmlspecialchars($xoops->getConfig('sitename')) . "</h4><hr />"; - - /* @var $banner XoopsBanner */ - $numrows = count($banners); - foreach ($banners as $banner) { - if ($numrows > 1) { - echo "<br />"; - } - if ($banner->getVar('htmlbanner') && $banner->getVar('htmlcode')) { - $myts = MyTextSanitizer::getInstance(); - echo $myts->displayTarea($banner->getVar('htmlcode')); - } else { - if (strtolower(substr($banner->getVar('imageurl'), strrpos($banner->getVar('imageurl'), "."))) == ".swf") { - echo "<object type='application / x - shockwave - flash' width='468' height='60' data='" . $banner->getVar('imageurl') . "'>"; - echo "<param name='movie' value='" . $banner->getVar('imageurl') . "' />"; - echo "<param name='quality' value='high' />"; - echo "</object>"; - } else { - echo "<img src='" . $banner->getVar('imageurl') . "' alt='' />"; - } - } - echo "<br /><strong>" . _BANNERS_ID . $banner->getVar('bid') . "</strong><br />" . sprintf(_BANNERS_SEND_STATS, 'banners.php?op=EmailStats&cid = ' . $banner->getVar('cid') . '&bid=' . $banner->getVar('bid')) . "<br />"; - if (!$banner->getVar('htmlbanner')) { - echo sprintf(_BANNERS_POINTS, $banner->getVar('clickurl', 'e')) . "<br /> - <form action='banners.php' method='post'>" . _BANNERS_URL . " - <input type='text' name='url' size='50' maxlength='200' value='" . $banner->getVar('clickurl', 'e') . "' /> - <input type='hidden' name='bid' value='" . $banner->getVar('bid') . "' /> - <input type='hidden' name='cid' value='" . $banner->getVar('cid') . "' /> - <input type='submit' name='op' value='" . _BANNERS_CHANGE . "' />" . $xoops->security->getTokenHTML("BANNER_EDIT") . "</form>"; - } - } - - /* Finnished Banners */ - echo "<br />"; - $criteria = new Criteria('cid', $client->getVar('cid')); - $banners = $xoops->getHandlerBannerfinish()->getObjects($criteria); - - if (count($banners) > 0) { - echo "<h4 class='content_title'>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</h4><hr /> - <table summary=''> - <caption>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</caption> - <thead><tr> - <td>ID</td> - <td>" . _BANNERS_IMP_MADE . "</td> - <td>" . _BANNERS_CLICKS . "</td> - <td>" . _BANNERS_PER_CLICKS . "</td> - <td>" . _BANNERS_STARTED . "</td> - <td>" . _BANNERS_ENDED . "</td></tr></thead> - <tfoot><tr><td colspan='6'></td></tr></tfoot>"; - - $i = 0; - /* @var $banner XoopsBanner */ - foreach ($banners as $banner) { - if ($banner->getvar('impressions') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impressions'), 0, 5); - } - $class = ($i % 2 == 0) ? 'even' : 'odd'; - echo "<tbody><tr class='{$class}'> - <td>" . $banner->getvar('bid') . "</td> - <td>" . $banner->getvar('impressions') . "</td> - <td>" . $banner->getvar('clicks') . "</td> - <td>{$percent}%</td> - <td>" . XoopsLocal::formatTimestamp($banner->getvar('datestart')) . "</td> - <td>" . XoopsLocal::formatTimestamp($banner->getvar('dateend')) . "</td></tr></tbody>"; - } - echo "</table></div>"; - } - $xoops->footer(); - } else { - $xoops->redirect("banners.php", 2, _BANNERS_INVALID_LOGIN_DATA); - } -} - -/** - * Function to let the client E-mail his banner Stats - * - * @param int $cid - * @param int $bid - * @return void - */ -function EmailStats($cid, $bid) -{ - $xoops = Xoops::getInstance(); - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client) { - $cid = intval($cid); - $bid = intval($bid); - if ($client->getVar('email', 'n') == "") { - $xoops->redirect("banners.php", 3, sprintf(_BANNERS_MAIL_ERROR, $client->getVar('name'))); - } else { - $banner = $xoops->getHandlerBanner()->get($bid); - //make sure that the client is the banner owner - if ($banner && $banner->getVar('cid') == $cid) { - if ($banner->getVar('impmade') == 0) { - $percent = 0; - } else { - $percent = substr(100 * $banner->getVar('clicks') / $banner->getVar('impmade'), 0, 5); - } - if ($banner->getVar('imptotal') == 0) { - $left = _BANNERS_UNLIMITED; - $banner->setVar('imptotal', _BANNERS_UNLIMITED); - } else { - $left = $banner->getVar('imptotal') - $banner->getVar('impmade'); - } - $date = date("F jS Y, h:iA."); - $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->getConfig('sitename')); - $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->getConfig('sitename'), $client->getVar('name'), $bid, $banner->getVar('imageurl'), $banner->getVar('clickurl'), $banner->getVar('imptotal'), $banner->getVar('impmade'), $left, $banner->getVar('clicks'), $percent, $date); - $xoopsMailer = $xoops->getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($client->getVar('email', 'n')); - $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); - $xoopsMailer->setFromName($xoops->getConfig('sitename')); - $xoopsMailer->setSubject($subject); - $xoopsMailer->setBody($message); - - if (!$xoopsMailer->send()) { - $xoops->redirect("banners.php?op=Ok", 3, sprintf(_MAIL_SENDMAILNG, $client->getVar('email', 'n'))); - } - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_MAIL_OK); - } - } - } - $xoops->redirect("banners.php", 2); -} - -/** - * Function to let the client to change the url for his banner - * - * @param int $cid - * @param int $bid - * @param string $url - * @return void - */ -function change_banner_url_by_client($cid, $bid, $url) -{ - $xoops = Xoops::getInstance(); - $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); - if ($client && $client->getVar('cid') == $cid && $url != "") { - $cid = intval($cid); - $bid = intval($bid); - $banner = $xoops->getHandlerBanner()->get($bid); - //make sure that the client is the banner owner - if ($banner->getVar('cid') == $cid) { - $banner->setVar('clickurl', $url); - if ($xoops->getHandlerBanner()->insert($banner)) { - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_DBUPDATED); - } - } - } - $xoops->redirect("banners.php", 2); -} - -/** - * @param int $bid - * @return void - */ -function clickbanner($bid) -{ - $xoops = Xoops::getInstance(); - $bid = intval($bid); - if ($bid > 0) { - $banner = $xoops->getHandlerBanner()->get($bid); - if ($banner) { - if ($xoops->security->checkReferer()) { - $banner->setVar('clicks', $banner->getVar('clicks') + 1); - $xoops->getHandlerBanner()->insert($banner); - header('Location: ' . $banner->getVar('clickurl')); - exit(); - } else { - //No valid referer found so some javascript error or direct access found - echo _BANNERS_NO_REFERER; - } - } - } - $xoops->redirect(XOOPS_URL, 3, _BANNERS_NO_ID); -} - -$op = ''; -if (!empty($_POST['op'])) { - $op = $_POST['op']; -} else { - if (!empty($_GET['op'])) { - $op = $_GET['op']; - } -} - -$myts = MyTextSanitizer::getInstance(); -switch ($op) { - case "click": - $bid = 0; - if (!empty($_GET['bid'])) { - $bid = intval($_GET['bid']); - } - clickbanner($bid); - break; - case "Ok": - if ($_SERVER['REQUEST_METHOD'] == 'POST') { - if (!$xoops->security->check(true, false, "BANNER_LOGIN")) { - $xoops->redirect("banners.php", 3, implode('<br />', $xoops->security->getErrors())); - exit(); - } - - $_SESSION['banner_login'] = $myts->stripslashesGPC(trim($_POST['login'])); - $_SESSION['banner_pass'] = $myts->stripslashesGPC(trim($_POST['pass'])); - } - bannerstats(); - break; - case _BANNERS_CHANGE: - if (!$xoops->security->check(true, false, "BANNER_EDIT")) { - $xoops->redirect("banners.php", 3, implode('<br />', $xoops->security->getErrors())); - exit(); - } - $bid = $cid = 0; - if (!empty($_POST['url'])) { - $url = $myts->stripslashesGPC(trim($_POST['url'])); - } - if (!empty($_POST['bid'])) { - $bid = intval($_POST['bid']); - } - if (!empty($_POST['cid'])) { - $cid = intval($_POST['cid']); - } - change_banner_url_by_client($cid, $bid, $url); - break; - case "EmailStats": - $bid = $cid = 0; - if (!empty($_GET['bid'])) { - $bid = intval($_GET['bid']); - } - if (!empty($_GET['cid'])) { - $cid = intval($_GET['cid']); - } - EmailStats($cid, $bid); - break; - case "login": - default: - clientlogin(); - break; -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -307,7 +307,7 @@ 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), 'xoops_dirname' => $xoops->moduleDirname, - 'xoops_banner' => ($xoops->getConfig('banners') && $this->renderBanner) ? $xoops->getBanner() : ' ', + 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) )); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -599,16 +599,6 @@ /** * @param mixed $optional * - * @return XoopsBannerfinishHandler - */ - public function getHandlerBannerfinish($optional = false) - { - return $this->getHandler('bannerfinish', $optional); - } - - /** - * @param mixed $optional - * * @return XoopsBlockHandler */ public function getHandlerBlock($optional = false) @@ -1310,48 +1300,56 @@ */ public function getBanner() { - $bresult = $this->db->query('SELECT COUNT(*) FROM ' . $this->db->prefix('banner')); - list ($numrows) = $this->db->fetchRow($bresult); - if ($numrows > 1) { - $numrows = $numrows - 1; - $bannum = mt_rand(0, $numrows); - } else { - $bannum = 0; - } - if ($numrows > 0) { - $bresult = $this->db->query('SELECT * FROM ' . $this->db->prefix('banner'), 1, $bannum); - list ($bid, $cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date, $htmlbanner, $htmlcode) = $this->db->fetchRow($bresult); - if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { - // EMPTY - } else { - $impmade = $impmade + 1; - $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); - /** - * Check if this impression is the last one - */ - if ($imptotal > 0 && $impmade >= $imptotal) { - $newid = $this->db->genId($this->db->prefix('bannerfinish') . '_bid_seq'); - $sql = sprintf('INSERT INTO %s (bid, cid, impressions, clicks, datestart, dateend) VALUES (%u, %u, %u, %u, %u, %u)', $this->db->prefix('bannerfinish'), $newid, $cid, $impmade, $clicks, $date, time()); - $this->db->queryF($sql); - $this->db->queryF(sprintf('DELETE FROM %s WHERE bid = %u', $this->db->prefix('banner'), $bid)); + if ($this->getConfig('banners')) { + // Get banners handler + $banner_Handler = $this->getHandlerBanner(); + // Display banner + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('status', 0, '!=')); + $criteria->setSort('RAND()'); + $criteria->setStart(0); + $criteria->setLimit(1); + $banner_arr = $banner_Handler->getall($criteria); + $numrows = count($banner_arr); + if ($numrows > 0) { + foreach (array_keys($banner_arr) as $i) { + $imptotal = $banner_arr[$i]->getVar("imptotal"); + $impmade = $banner_arr[$i]->getVar("impmade"); + $htmlbanner = $banner_arr[$i]->getVar("htmlbanner"); + $htmlcode = $banner_arr[$i]->getVar("htmlcode"); + $imageurl = $banner_arr[$i]->getVar("imageurl"); + $bid = $banner_arr[$i]->getVar("bid"); + $clickurl = $banner_arr[$i]->getVar("clickurl"); } - } - /** - * Print the banner - */ - if ($htmlbanner) { - $bannerobject = $htmlcode; - } else { - $bannerobject = '<div id="xo-bannerfix">'; - if (stristr($imageurl, '.swf')) { - $bannerobject = $bannerobject . '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { + // EMPTY } else { - $bannerobject = $bannerobject . '<a href="' . XOOPS_URL . '/banners.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + /** + * Check if this impression is the last one + */ + $impmade = $impmade + 1; + if ($imptotal > 0 && $impmade >= $imptotal) { + $this->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); + }else{ + $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); + } } - - $bannerobject = $bannerobject . '</div>'; + /** + * Print the banner + */ + if ($htmlbanner) { + $bannerobject = $htmlcode; + } else { + $bannerobject = '<div id="xo-bannerfix">'; + if (stristr($imageurl, '.swf')) { + $bannerobject .= '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + } else { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + } + $bannerobject .= '</div>'; + } + return $bannerobject; } - return $bannerobject; } return ''; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-02 23:04:32 UTC (rev 8629) @@ -73,9 +73,9 @@ $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0," . $gruops['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); // data for table 'banner' - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, '')"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (1, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_flashbanner2.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (2, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/xoops_banner_2.gif', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, datestart, dateend, htmlbanner, htmlcode, status) VALUES (3, 1, 0, 1, 0, '" . XOOPS_URL . "/uploads/banners/banner.swf', 'http://www.xoops.org/', " . time() . ", 0, 0, '', 1)"); // default theme $time = time(); $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ")"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.data.sql 2012-01-02 23:04:32 UTC (rev 8629) @@ -13,14 +13,9 @@ # Dumping data for table `bannerclient` # -INSERT INTO bannerclient VALUES (0, 'XOOPS', 'XOOPS Dev Team', 'web...@xo...', '', '', ''); +INSERT INTO bannerclient VALUES (1,0, 'XOOPS', 'XOOPS Dev Team'); # -# Dumping data for table `bannerfinish` -# - - -# # Dumping data for table `comments` # Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-01-02 23:01:51 UTC (rev 8628) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/sql/mysql.structure.sql 2012-01-02 23:04:32 UTC (rev 8629) @@ -1,579 +1,562 @@ -# -# Table structure for table `avatar` -# - -CREATE TABLE avatar ( - avatar_id mediumint(8) unsigned NOT NULL auto_increment, - avatar_file varchar(30) NOT NULL default '', - avatar_name varchar(100) NOT NULL default '', - avatar_mimetype varchar(30) NOT NULL default '', - avatar_created int(10) NOT NULL default '0', - avatar_display tinyint(1) unsigned NOT NULL default '0', - avatar_weight smallint(5) unsigned NOT NULL default '0', - avatar_type char(1) NOT NULL default '', - PRIMARY KEY (avatar_id), - KEY avatar_type (avatar_type, avatar_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `avatar_user_link` -# - -CREATE TABLE avatar_user_link ( - avatar_id mediumint(8) unsigned NOT NULL default '0', - user_id mediumint(8) unsigned NOT NULL default '0', - KEY avatar_user_id (avatar_id,user_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `banner` -# - -CREATE TABLE banner ( - bid smallint(5) unsigned NOT NULL auto_increment, - cid tinyint(3) unsigned NOT NULL default '0', - imptotal mediumint(8) unsigned NOT NULL default '0', - impmade mediumint(8) unsigned NOT NULL default '0', - clicks mediumint(8) unsigned NOT NULL default '0', - imageurl varchar(255) NOT NULL default '', - clickurl varchar(255) NOT NULL default '', - date int(10) NOT NULL default '0', - htmlbanner tinyint(1) NOT NULL default '0', - htmlcode text, - PRIMARY KEY (bid), - KEY idxbannercid (cid), - KEY idxbannerbidcid (bid,cid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `bannerclient` -# - -CREATE TABLE bannerclient ( - cid smallint(5) unsigned NOT NULL auto_increment, - name varchar(60) NOT NULL default '', - contact varchar(60) NOT NULL default '', - email varchar(60) NOT NULL default '', - login varchar(10) NOT NULL default '', - passwd varchar(10) NOT NULL default '', - extrainfo text, - PRIMARY KEY (cid), - KEY login (login) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `bannerfinish` -# - -CREATE TABLE bannerfinish ( - bid smallint(5) unsigned NOT NULL auto_increment, - cid smallint(5) unsigned NOT NULL default '0', - impressions mediumint(8) unsigned NOT NULL default '0', - clicks mediumint(8) unsigned NOT NULL default '0', - datestart int(10) unsigned NOT NULL default '0', - dateend int(10) unsigned NOT NULL default '0', - PRIMARY KEY (bid), - KEY cid (cid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `block_module_link` -# - -CREATE TABLE block_module_link ( - block_id mediumint(8) unsigned NOT NULL default '0', - module_id smallint(5) NOT NULL default '0', - PRIMARY KEY (`module_id`, `block_id`) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `comments` -# - -CREATE TABLE xoopscomments ( - com_id mediumint(8) unsigned NOT NULL auto_increment, - com_pid mediumint(8) unsigned NOT NULL default '0', - com_rootid mediumint(8) unsigned NOT NULL default '0', - com_modid smallint(5) unsigned NOT NULL default '0', - com_itemid mediumint(8) unsigned NOT NULL default '0', - com_icon varchar(25) NOT NULL default '', - com_created int(10) unsigned NOT NULL default '0', - com_modified int(10) unsigned NOT NULL default '0', - com_uid mediumint(8) unsigned NOT NULL default '0', - com_ip varchar(15) NOT NULL default '', - com_title varchar(255) NOT NULL default '', - com_text text, - com_sig tinyint(1) unsigned NOT NULL default '0', - com_status tinyint(1) unsigned NOT NULL default '0', - com_exparams varchar(255) NOT NULL default '', - dohtml tinyint(1) unsigned NOT NULL default '0', - dosmiley tinyint(1) unsigned NOT NULL default '0', - doxcode tinyint(1) unsigned NOT NULL default '0', - doimage tinyint(1) unsigned NOT NULL default '0', - dobr tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (com_id), - KEY com_pid (com_pid), - KEY com_itemid (com_itemid), - KEY com_uid (com_uid), - KEY com_title (com_title(40)), - KEY com_status (com_status) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# RMV-NOTIFY -# Table structure for table `notifications` -# - -CREATE TABLE xoopsnotifications ( - not_id mediumint(8) unsigned NOT NULL auto_increment, - not_modid smallint(5) unsigned NOT NULL default '0', - not_itemid mediumint(8) unsigned NOT NULL default '0', - not_category varchar(30) NOT NULL default '', - not_event varchar(30) NOT NULL default '', - not_uid mediumint(8) unsigned NOT NULL default '0', - not_mode tinyint(1) NOT NULL default 0, - PRIMARY KEY (not_id), - KEY not_modid (not_modid), - KEY not_itemid (not_itemid), - KEY not_class (not_category), - KEY not_uid (not_uid), - KEY not_event (not_event) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `config` -# - -CREATE TABLE config ( - conf_id smallint(5) unsigned NOT NULL auto_increment, - conf_modid smallint(5) unsigned NOT NULL default '0', - conf_catid smallint(5) unsigned NOT NULL default '0', - conf_name varchar(25) NOT NULL default '', - conf_title varchar(255) NOT NULL default '', - conf_value text, - conf_desc varchar(255) NOT NULL default '', - conf_formtype varchar(15) NOT NULL default '', - conf_valuetype varchar(10) NOT NULL default '', - conf_order smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (conf_id), - KEY conf_mod_cat_id (conf_modid, conf_catid), - KEY conf_order (conf_order) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `configcategory` -# - -CREATE TABLE configcategory ( - confcat_id smallint(5) unsigned NOT NULL auto_increment, - confcat_name varchar(255) NOT NULL default '', - confcat_order smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (confcat_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `configoption` -# - -CREATE TABLE configoption ( - confop_id mediumint(8) unsigned NOT NULL auto_increment, - confop_name varchar(255) NOT NULL default '', - confop_value varchar(255) NOT NULL default '', - conf_id smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (confop_id), - KEY conf_id (conf_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `groups` -# - -CREATE TABLE groups ( - groupid smallint(5) unsigned NOT NULL auto_increment, - name varchar(50) NOT NULL default '', - description text, - group_type varchar(10) NOT NULL default '', - - PRIMARY KEY (groupid), - KEY group_type (group_type) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `group_permission` -# - -CREATE TABLE group_permission ( - gperm_id int(10) unsigned NOT NULL auto_increment, - gperm_groupid smallint(5) unsigned NOT NULL default '0', - gperm_itemid mediumint(8) unsigned NOT NULL default '0', - gperm_modid mediumint(5) unsigned NOT NULL default '0', - gperm_name varchar(50) NOT NULL default '', - PRIMARY KEY (gperm_id), - KEY groupid (gperm_groupid), - KEY itemid (gperm_itemid), - KEY gperm_modid (gperm_modid,gperm_name(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - - -# -# Table structure for table `groups_users_link` -# - -CREATE TABLE groups_users_link ( - linkid mediumint(8) unsigned NOT NULL auto_increment, - groupid smallint(5) unsigned NOT NULL default '0', - uid mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (linkid), - KEY groupid_uid (groupid,uid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `image` -# - -CREATE TABLE image ( - image_id mediumint(8) unsigned NOT NULL auto_increment, - image_name varchar(30) NOT NULL default '', - image_nicename varchar(255) NOT NULL default '', - image_mimetype varchar(30) NOT NULL default '', - image_created int(10) unsigned NOT NULL default '0', - image_display tinyint(1) unsigned NOT NULL default '0', - image_weight smallint(5) unsigned NOT NULL default '0', - imgcat_id smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (image_id), - KEY imgcat_id (imgcat_id), - KEY image_display (image_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imagebody` -# - -CREATE TABLE imagebody ( - image_id mediumint(8) unsigned NOT NULL default '0', - image_body mediumblob, - KEY image_id (image_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imagecategory` -# - -CREATE TABLE imagecategory ( - imgcat_id smallint(5) unsigned NOT NULL auto_increment, - imgcat_name varchar(100) NOT NULL default '', - imgcat_maxsize int(8) unsigned NOT NULL default '0', - imgcat_maxwidth smallint(3) unsigned NOT NULL default '0', - imgcat_maxheight smallint(3) unsigned NOT NULL default '0', - imgcat_display tinyint(1) unsigned NOT NULL default '0', - imgcat_weight smallint(3) unsigned NOT NULL default '0', - imgcat_type char(1) NOT NULL default '', - imgcat_storetype varchar(5) NOT NULL default '', - PRIMARY KEY (imgcat_id), - KEY imgcat_display (imgcat_display) -) ENGINE=MyISAM; -# -------------------------------------------------------- - - -# -# Table structure for table `imgset` -# - -CREATE TABLE imgset ( - imgset_id smallint(5) unsigned NOT NULL auto_increment, - imgset_name varchar(50) NOT NULL default '', - imgset_refid mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (imgset_id), - KEY imgset_refid (imgset_refid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imgset_tplset_link` -# - -CREATE TABLE imgset_tplset_link ( - imgset_id smallint(5) unsigned NOT NULL default '0', - tplset_name varchar(50) NOT NULL default '', - KEY tplset_name (tplset_name(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `imgsetimg` -# - -CREATE TABLE imgsetimg ( - imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment, - imgsetimg_file varchar(50) NOT NULL default '', - imgsetimg_body blob, - imgsetimg_imgset smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (imgsetimg_id), - KEY imgsetimg_imgset (imgsetimg_imgset) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `modules` -# - -CREATE TABLE modules ( - mid smallint(5) unsigned NOT NULL auto_increment, - name varchar(150) NOT NULL default '', - version smallint(5) unsigned NOT NULL default '100', - last_update int(10) unsigned NOT NULL default '0', - weight smallint(3) unsigned NOT NULL default '0', - isactive tinyint(1) unsigned NOT NULL default '0', - dirname varchar(25) NOT NULL default '', - hasmain tinyint(1) unsigned NOT NULL default '0', - hasadmin tinyint(1) unsigned NOT NULL default '0', - hassearch tinyint(1) unsigned NOT NULL default '0', - hasconfig tinyint(1) unsigned NOT NULL default '0', - hascomments tinyint(1) unsigned NOT NULL default '0', - hasnotification tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (mid), - KEY hasmain (hasmain), - KEY hasadmin (hasadmin), - KEY hassearch (hassearch), - KEY hasnotification (hasnotification), - KEY dirname (dirname), - KEY name (name(15)), - KEY isactive (isactive), - KEY weight (weight), - KEY hascomments (hascomments) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `newblocks` -# - -CREATE TABLE newblocks ( - bid mediumint(8) unsigned NOT NULL auto_increment, - mid smallint(5) unsigned NOT NULL default '0', - func_num tinyint(3) unsigned NOT NULL default '0', - options varchar(255) NOT NULL default '', - name varchar(150) NOT NULL default '', - title varchar(255) NOT NULL default '', - content text, - side tinyint(1) unsigned NOT NULL default '0', - weight smallint(5) unsigned NOT NULL default '0', - visible tinyint(1) unsigned NOT NULL default '0', - block_type char(1) NOT NULL default '', - c_type char(1) NOT NULL default '', - isactive tinyint(1) unsigned NOT NULL default '0', - dirname varchar(50) NOT NULL default '', - func_file varchar(50) NOT NULL default '', - show_func varchar(50) NOT NULL default '', - edit_func varchar(50) NOT NULL default '', - template varchar(50) NOT NULL default '', - bcachetime int(10) unsigned NOT NULL default '0', - last_modified int(10) unsigned NOT NULL default '0', - PRIMARY KEY (bid), - KEY mid (mid), - KEY visible (visible), - KEY isactive_visible_mid (isactive,visible,mid), - KEY mid_funcnum (mid,func_num) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `online` -# - -CREATE TABLE online ( - online_uid mediumint(8) unsigned NOT NULL default '0', - online_uname varchar(25) NOT NULL default '', - online_updated int(10) unsigned NOT NULL default '0', - online_module smallint(5) unsigned NOT NULL default '0', - online_ip varchar(15) NOT NULL default '', - KEY online_module (online_module), - KEY online_updated (online_updated), - KEY online_uid (online_uid) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `priv_msgs` -# - -CREATE TABLE priv_msgs ( - msg_id mediumint(8) unsigned NOT NULL auto_increment, - msg_image varchar(100) default NULL, - subject varchar(255) NOT NULL default '', - from_userid mediumint(8) unsigned NOT NULL default '0', - to_userid mediumint(8) unsigned NOT NULL default '0', - msg_time int(10) unsigned NOT NULL default '0', - msg_text text, - read_msg tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (msg_id), - KEY to_userid (to_userid), - KEY touseridreadmsg (to_userid,read_msg), - KEY msgidfromuserid (from_userid, msg_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `ranks` -# - -CREATE TABLE ranks ( - rank_id smallint(5) unsigned NOT NULL auto_increment, - rank_title varchar(50) NOT NULL default '', - rank_min mediumint(8) unsigned NOT NULL default '0', - rank_max mediumint(8) unsigned NOT NULL default '0', - rank_special tinyint(1) unsigned NOT NULL default '0', - rank_image varchar(255) default NULL, - PRIMARY KEY (rank_id), - KEY rank_min (rank_min), - KEY rank_max (rank_max), - KEY rankminrankmaxranspecial (rank_min,rank_max,rank_special), - KEY rankspecial (rank_special) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `session` -# - -CREATE TABLE session ( - sess_id varchar(32) NOT NULL default '', - sess_updated int(10) unsigned NOT NULL default '0', - sess_ip varchar(15) NOT NULL default '', - sess_data text, - PRIMARY KEY (sess_id), - KEY updated (sess_updated) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `smiles` -# - -CREATE TABLE smiles ( - id smallint(5) unsigned NOT NULL auto_increment, - code varchar(50) NOT NULL default '', - smile_url varchar(100) NOT NULL default '', - emotion varchar(75) NOT NULL default '', - display tinyint(1) NOT NULL default '0', - PRIMARY KEY (id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplset` -# - -CREATE TABLE tplset ( - tplset_id int(7) unsigned NOT NULL auto_increment, - tplset_name varchar(50) NOT NULL default '', - tplset_desc varchar(255) NOT NULL default '', - tplset_credits text, - tplset_created int(10) unsigned NOT NULL default '0', - PRIMARY KEY (tplset_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplfile` -# - -CREATE TABLE tplfile ( - tpl_id mediumint(7) unsigned NOT NULL auto_increment, - tpl_refid smallint(5) unsigned NOT NULL default '0', - tpl_module varchar(25) NOT NULL default '', - tpl_tplset varchar(50) NOT NULL default '', - tpl_file varchar(50) NOT NULL default '', - tpl_desc varchar(255) NOT NULL default '', - tpl_lastmodified int(10) unsigned NOT NULL default '0', - tpl_lastimported int(10) unsigned NOT NULL default '0', - tpl_type varchar(20) NOT NULL default '', - PRIMARY KEY (tpl_id), - KEY tpl_refid (tpl_refid,tpl_type), - KEY tpl_tplset (tpl_tplset,tpl_file(10)) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `tplsource` -# - -CREATE TABLE tplsource ( - tpl_id mediumint(7) unsigned NOT NULL default '0', - tpl_source mediumtext, - KEY tpl_id (tpl_id) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# Table structure for table `users` -# - -CREATE TABLE users ( - uid mediumint(8) unsigned NOT NULL auto_increment, - name varchar(60) NOT NULL default '', - uname varchar(25) NOT NULL default '', - email varchar(60) NOT NULL default '', - url varchar(100) NOT NULL default '', - user_avatar varchar(30) NOT NULL default 'blank.gif', - user_regdate int(10) unsigned NOT NULL default '0', - user_icq varchar(15) NOT NULL default '', - user_from varchar(100) NOT NULL default '', - user_sig tinytext, - user_viewemail tinyint(1) unsigned NOT NULL default '0', - actkey varchar(8) NOT NULL default '', - user_aim varchar(18) NOT NULL default '', - user_yim varchar(25) NOT NULL default '', - user_msnm varchar(100) NOT NULL default '', - pass varchar(32) NOT NULL default '', - posts mediumint(8) unsigned NOT NULL default '0', - attachsig tinyint(1) unsigned NOT NULL default '0', - rank smallint(5) unsigned NOT NULL default '0', - level tinyint(3) unsigned NOT NULL default '1', - theme varchar(100) NOT NULL default '', - timezone_offset float(3,1) NOT NULL default '0.0', - last_login int(10) unsigned NOT NULL default '0', - umode varchar(10) NOT NULL default '', - uorder tinyint(1) unsigned NOT NULL default '0', - notify_method tinyint(1) NOT NULL default '1', - notify_mode tinyint(1) NOT NULL default '0', - user_occ varchar(100) NOT NULL default '', - bio tinytext, - user_intrest varchar(150) NOT NULL default '', - user_mailok tinyint(1) unsigned NOT NULL default '1', - PRIMARY KEY (uid), - KEY uname (uname), - KEY email (email), - KEY uiduname (uid,uname), - KEY unamepass (uname,pass), - KEY level (level) -) ENGINE=MyISAM; -# -------------------------------------------------------- - -# -# Table structure for table `cache_model` -# - -CREATE TABLE cache_model ( - `cache_key` varchar(64) NOT NULL default '', - `cache_expires` int(10) unsigned NOT NULL default '0', - `cache_data` text, - - PRIMARY KEY (`cache_key`), - KEY `cache_expires` (`cache_expires`) -) ENGINE=MyISAM; -# -------------------------------------------------------- +# +# Table structure for table `avatar` +# + +CREATE TABLE avatar ( + avatar_id mediumint(8) unsigned NOT NULL auto_increment, + avatar_file varchar(30) NOT NULL default '', + avatar_name varchar(100) NOT NULL default '', + avatar_mimetype varchar(30) NOT NULL default '', + avatar_created int(10) NOT NULL default '0', + avatar_display tinyint(1) unsigned NOT NULL default '0', + avatar_weight smallint(5) unsigned NOT NULL default '0', + avatar_type char(1) NOT NULL default '', + PRIMARY KEY (avatar_id), + KEY avatar_type (avatar_type, avatar_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `avatar_user_link` +# + +CREATE TABLE avatar_user_link ( + avatar_id mediumint(8) unsigned NOT NULL default '0', + user_id mediumint(8) unsigned NOT NULL default '0', + KEY avatar_user_id (avatar_id,user_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `banner` +# + +CREATE TABLE banner ( + bid smallint(5) unsigned NOT NULL auto_increment, + cid tinyint(3) unsigned NOT NULL default '0', + imptotal mediumint(8) unsigned NOT NULL default '0', + impmade mediumint(8) unsigned NOT NULL default '0', + clicks mediumint(8) unsigned NOT NULL default '0', + imageurl varchar(255) NOT NULL default '', + clickurl varchar(255) NOT NULL default '', + datestart int(10) NOT NULL default '0', + dateend int(10) NOT NULL default '0', + htmlbanner tinyint(1) NOT NULL default '0', + htmlcode text, + status tinyint(1) NOT NULL default '0', + PRIMARY KEY (bid), + KEY idxbannercid (cid), + KEY idxbannerbidcid (bid,cid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `bannerclient` +# + +CREATE TABLE bannerclient ( + cid smallint(5) unsigned NOT NULL auto_increment, + uid mediumint(8) unsigned NOT NULL default '0', + name varchar(60) NOT NULL default '', + extrainfo text, + PRIMARY KEY (cid), + KEY name (name) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `block_module_link` +# + +CREATE TABLE block_module_link ( + block_id mediumint(8) unsigned NOT NULL default '0', + module_id smallint(5) NOT NULL default '0', + PRIMARY KEY (`module_id`, `block_id`) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `comments` +# + +CREATE TABLE xoopscomments ( + com_id mediumint(8) unsigned NOT NULL auto_increment, + com_pid mediumint(8) unsigned NOT NULL default '0', + com_rootid mediumint(8) unsigned NOT NULL default '0', + com_modid smallint(5) unsigned NOT NULL default '0', + com_itemid mediumint(8) unsigned NOT NULL default '0', + com_icon varchar(25) NOT NULL default '', + com_created int(10) unsigned NOT NULL default '0', + com_modified int(10) unsigned NOT NULL default '0', + com_uid mediumint(8) unsigned NOT NULL default '0', + com_ip varchar(15) NOT NULL default '', + com_title varchar(255) NOT NULL default '', + com_text text, + com_sig tinyint(1) unsigned NOT NULL default '0', + com_status tinyint(1) unsigned NOT NULL default '0', + com_exparams varchar(255) NOT NULL default '', + dohtml tinyint(1) unsigned NOT NULL default '0', + dosmiley tinyint(1) unsigned NOT NULL default '0', + doxcode tinyint(1) unsigned NOT NULL default '0', + doimage tinyint(1) unsigned NOT NULL default '0', + dobr tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (com_id), + KEY com_pid (com_pid), + KEY com_itemid (com_itemid), + KEY com_uid (com_uid), + KEY com_title (com_title(40)), + KEY com_status (com_status) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# RMV-NOTIFY +# Table structure for table `notifications` +# + +CREATE TABLE xoopsnotifications ( + not_id mediumint(8) unsigned NOT NULL auto_increment, + not_modid smallint(5) unsigned NOT NULL default '0', + not_itemid mediumint(8) unsigned NOT NULL default '0', + not_category varchar(30) NOT NULL default '', + not_event varchar(30) NOT NULL default '', + not_uid mediumint(8) unsigned NOT NULL default '0', + not_mode tinyint(1) NOT NULL default 0, + PRIMARY KEY (not_id), + KEY not_modid (not_modid), + KEY not_itemid (not_itemid), + KEY not_class (not_category), + KEY not_uid (not_uid), + KEY not_event (not_event) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `config` +# + +CREATE TABLE config ( + conf_id smallint(5) unsigned NOT NULL auto_increment, + conf_modid smallint(5) unsigned NOT NULL default '0', + conf_catid smallint(5) unsigned NOT NULL default '0', + conf_name varchar(25) NOT NULL default '', + conf_title varchar(255) NOT NULL default '', + conf_value text, + conf_desc varchar(255) NOT NULL default '', + conf_formtype varchar(15) NOT NULL default '', + conf_valuetype varchar(10) NOT NULL default '', + conf_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (conf_id), + KEY conf_mod_cat_id (conf_modid, conf_catid), + KEY conf_order (conf_order) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configcategory` +# + +CREATE TABLE configcategory ( + confcat_id smallint(5) unsigned NOT NULL auto_increment, + confcat_name varchar(255) NOT NULL default '', + confcat_order smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confcat_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `configoption` +# + +CREATE TABLE configoption ( + confop_id mediumint(8) unsigned NOT NULL auto_increment, + confop_name varchar(255) NOT NULL default '', + confop_value varchar(255) NOT NULL default '', + conf_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (confop_id), + KEY conf_id (conf_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `groups` +# + +CREATE TABLE groups ( + groupid smallint(5) unsigned NOT NULL auto_increment, + name varchar(50) NOT NULL default '', + description text, + group_type varchar(10) NOT NULL default '', + + PRIMARY KEY (groupid), + KEY group_type (group_type) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `group_permission` +# + +CREATE TABLE group_permission ( + gperm_id int(10) unsigned NOT NULL auto_increment, + gperm_groupid smallint(5) unsigned NOT NULL default '0', + gperm_itemid mediumint(8) unsigned NOT NULL default '0', + gperm_modid mediumint(5) unsigned NOT NULL default '0', + gperm_name varchar(50) NOT NULL default '', + PRIMARY KEY (gperm_id), + KEY groupid (gperm_groupid), + KEY itemid (gperm_itemid), + KEY gperm_modid (gperm_modid,gperm_name(10)) +) ENGINE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `groups_users_link` +# + +CREATE TABLE groups_users_link ( + linkid mediumint(8) unsigned NOT NULL auto_increment, + groupid smallint(5) unsigned NOT NULL default '0', + uid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (linkid), + KEY groupid_uid (groupid,uid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `image` +# + +CREATE TABLE image ( + image_id mediumint(8) unsigned NOT NULL auto_increment, + image_name varchar(30) NOT NULL default '', + image_nicename varchar(255) NOT NULL default '', + image_mimetype varchar(30) NOT NULL default '', + image_created int(10) unsigned NOT NULL default '0', + image_display tinyint(1) unsigned NOT NULL default '0', + image_weight smallint(5) unsigned NOT NULL default '0', + imgcat_id smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (image_id), + KEY imgcat_id (imgcat_id), + KEY image_display (image_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagebody` +# + +CREATE TABLE imagebody ( + image_id mediumint(8) unsigned NOT NULL default '0', + image_body mediumblob, + KEY image_id (image_id) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imagecategory` +# + +CREATE TABLE imagecategory ( + imgcat_id smallint(5) unsigned NOT NULL auto_increment, + imgcat_name varchar(100) NOT NULL default '', + imgcat_maxsize int(8) unsigned NOT NULL default '0', + imgcat_maxwidth smallint(3) unsigned NOT NULL default '0', + imgcat_maxheight smallint(3) unsigned NOT NULL default '0', + imgcat_display tinyint(1) unsigned NOT NULL default '0', + imgcat_weight smallint(3) unsigned NOT NULL default '0', + imgcat_type char(1) NOT NULL default '', + imgcat_storetype varchar(5) NOT NULL default '', + PRIMARY KEY (imgcat_id), + KEY imgcat_display (imgcat_display) +) ENGINE=MyISAM; +# -------------------------------------------------------- + + +# +# Table structure for table `imgset` +# + +CREATE TABLE imgset ( + imgset_id smallint(5) unsigned NOT NULL auto_increment, + imgset_name varchar(50) NOT NULL default '', + imgset_refid mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (imgset_id), + KEY imgset_refid (imgset_refid) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgset_tplset_link` +# + +CREATE TABLE imgset_tplset_link ( + imgset_id smallint(5) unsigned NOT NULL default '0', + tplset_name varchar(50) NOT NULL default '', + KEY tplset_name (tplset_name(10)) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `imgsetimg` +# + +CREATE TABLE imgsetimg ( + imgsetimg_id mediumint(8) unsigned NOT NULL auto_increment, + imgsetimg_file varchar(50) NOT NULL default '', + imgsetimg_body blob, + imgsetimg_imgset smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (imgsetimg_id), + KEY imgsetimg_imgset (imgsetimg_imgset) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `modules` +# + +CREATE TABLE modules ( + mid smallint(5) unsigned NOT NULL auto_increment, + name varchar(150) NOT NULL default '', + version smallint(5) unsigned NOT NULL default '100', + last_update int(10) unsigned NOT NULL default '0', + weight smallint(3) unsigned NOT NULL default '0', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(25) NOT NULL default '', + hasmain tinyint(1) unsigned NOT NULL default '0', + hasadmin tinyint(1) unsigned NOT NULL default '0', + hassearch tinyint(1) unsigned NOT NULL default '0', + hasconfig tinyint(1) unsigned NOT NULL default '0', + hascomments tinyint(1) unsigned NOT NULL default '0', + hasnotification tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (mid), + KEY hasmain (hasmain), + KEY hasadmin (hasadmin), + KEY hassearch (hassearch), + KEY hasnotification (hasnotification), + KEY dirname (dirname), + KEY name (name(15)), + KEY isactive (isactive), + KEY weight (weight), + KEY hascomments (hascomments) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `newblocks` +# + +CREATE TABLE newblocks ( + bid mediumint(8) unsigned NOT NULL auto_increment, + mid smallint(5) unsigned NOT NULL default '0', + func_num tinyint(3) unsigned NOT NULL default '0', + options varchar(255) NOT NULL default '', + name varchar(150) NOT NULL default '', + title varchar(255) NOT NULL default '', + content text, + side tinyint(1) unsigned NOT NULL default '0', + weight smallint(5) unsigned NOT NULL default '0', + visible tinyint(1) unsigned NOT NULL default '0', + block_type char(1) NOT NULL default '', + c_type char(1) NOT NULL default '', + isactive tinyint(1) unsigned NOT NULL default '0', + dirname varchar(50) NOT NULL default '', + func_file varchar(50) NOT NULL default '', + show_func varchar(50) NOT NULL default '', + edit_func varchar(50) NOT NULL default '', + template varchar(50) NOT NULL default '', + bcachetime int(10) unsigned NOT NULL default '0', + last_modified int(10) unsigned NOT NULL default '0', + PRIMARY KEY (bid), + KEY mid (mid), + KEY visible (visible), + KEY isactive_visible_mid (isactive,visible,mid), + KEY mid_funcnum (mid,func_num) +) ENGINE=MyISAM; +# -------------------------------------------------------- + +# +# Table structure for table `online` +# + +CREATE TABLE online ( + online_uid mediumint(8) unsigned NOT NULL default '0', + online_uname varchar(25) NOT NULL default '', + online_updated int(10) unsigned NOT NULL default '0', + online_module smallint(5) unsigned NOT NULL default '0', + online_ip varchar(15) NOT NULL default '', + KEY online_module (online_module), + KEY online_updated (online_updated), + ... [truncated message content] |
From: <be...@us...> - 2012-01-03 22:47:21
|
Revision: 8630 http://xoops.svn.sourceforge.net/xoops/?rev=8630&view=rev Author: beckmi Date: 2012-01-03 22:47:14 +0000 (Tue, 03 Jan 2012) Log Message: ----------- - adjusting message icons links - fixing Smarty Plugins with links to Icon folders Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/pmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/pmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/pmsg.php 2012-01-02 23:04:32 UTC (rev 8629) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/pmsg.php 2012-01-03 22:47:14 UTC (rev 8630) @@ -42,5 +42,5 @@ define('_PM_ONLINE', 'Online'); //XOOPS 2.5.2 define('_PM_SURE_TO_DELETE',"Are you sure you want to delete these message(s)?"); - -?> \ No newline at end of file +//XOOPS 2.5.5 +define('_PM_READ', 'Already Read'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php 2012-01-02 23:04:32 UTC (rev 8629) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php 2012-01-03 22:47:14 UTC (rev 8630) @@ -71,13 +71,14 @@ } else { $display = 1; } + for ($i = 0; $i < $total_messages; $i++) { $class = ($i % 2 == 0) ? 'even' : 'odd'; echo "<tr class='$class txtleft'><td class='aligntop width2 txtcenter'><input type='checkbox' id='msg_id[]' name='msg_id[]' value='" . $pm_arr[$i]->getVar("msg_id") . "' /></td>\n"; if ($pm_arr[$i]->getVar('read_msg') == 1) { - echo "<td class='aligntop width5 txtcenter'><img src='images/email_read.png' alt='" . _PM_READ . "' title='" . _PM_READ . "' /></td>\n"; + echo "<td class='aligntop width5 txtcenter'><img src= media/xoops/images/icons/16/mail_read.png alt='" . _PM_READ . "' title='" . _PM_READ . "' /></td>\n"; } else { - echo "<td class='aligntop width5 txtcenter'><img src='images/email_notread.png' alt='" . _PM_NOTREAD . "' title='" . _PM_NOTREAD . "' /></td>\n"; + echo "<td class='aligntop width5 txtcenter'><img src= media/xoops/images/icons/16/mail_notread.png alt='" . _PM_NOTREAD . "' title='" . _PM_NOTREAD . "' /></td>\n"; } $iconName = $pm_arr[$i]->getVar("msg_image", "E"); if ($iconName != '') { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php 2012-01-02 23:04:32 UTC (rev 8629) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php 2012-01-03 22:47:14 UTC (rev 8630) @@ -23,13 +23,13 @@ $xoops = Xoops::getInstance(); - if (file_exists($xoops->path('Frameworks/moduleclasses/icons/16/index.html'))) { - $url = $xoops->url('Frameworks/moduleclasses/icons/16/' . $argStr); + if (file_exists($xoops->path('media/xoops/images/icons/16/index.html'))) { + $url = $xoops->url('media/xoops/images/icons/16/' . $argStr); } else { if (file_exists($xoops->path('modules/system/images/icons/default/' . $argStr))) { $url = $xoops->url('modules/system/images/icons/default/' . $argStr); } else { - $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png'); + $url = $xoops->url('modules/system/images/icons/default/xoops/xoops2.png'); } } return "\necho '" . addslashes($url) . "';"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php 2012-01-02 23:04:32 UTC (rev 8629) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php 2012-01-03 22:47:14 UTC (rev 8630) @@ -24,8 +24,8 @@ $icons = $xoops->getModuleConfig('typeicons', 'system'); if ( $icons == '' ) $icons = 'default'; - if ( file_exists( $xoops->path('Frameworks/moduleclasses/icons/32/' . $icons . '/index.html'))) { - $url = $xoops->url( 'Frameworks/moduleclasses/icons/32/' . $icons . '/' . $argStr ); + if ( file_exists( $xoops->path('media/xoops/images/icons/32/' . $icons . '/index.html'))) { + $url = $xoops->url( 'media/xoops/images/icons/32/' . $icons . '/' . $argStr ); } else { if ( file_exists( $xoops->path('modules/system/images/icons/default/' . $argStr ))) { $url = $xoops->url( 'modules/system/images/icons/default/' . $argStr ); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php 2012-01-02 23:04:32 UTC (rev 8629) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php 2012-01-03 22:47:14 UTC (rev 8630) @@ -22,8 +22,8 @@ { $xoops = Xoops::getInstance(); - if (file_exists($xoops->path('Frameworks/moduleclasses/icons/bookmarks/index.html'))) { - $url = $xoops->url('Frameworks/moduleclasses/icons/bookmarks/' . $argStr); + if (file_exists($xoops->path('media/xoops/images/icons/bookmarks/index.html'))) { + $url = $xoops->url('media/xoops/images/icons/bookmarks/' . $argStr); } else { if (file_exists($xoops->path('modules/system/images/icons/default/' . $argStr))) { $url = $xoops->url('modules/system/images/icons/default/' . $argStr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-01-05 21:37:52
|
Revision: 8643 http://xoops.svn.sourceforge.net/xoops/?rev=8643&view=rev Author: mageg Date: 2012-01-05 21:37:45 +0000 (Thu, 05 Jan 2012) Log Message: ----------- Final version of the banners module with modification of the xoops core Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_id.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_random.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/index.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/functions.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -1296,21 +1296,36 @@ /** * Function to get banner html tags for use in templates * + * @param int $nb_banner + * @param string $align + * @param array $client + * @param string $ids + * * @return string */ - public function getBanner() + public function getBanner($nb_banner = 1, $align = 'H', $client = array(), $ids = '') { - if ($this->getConfig('banners')) { + if ($this->isActiveModule('banners')) { // Get banners handler $banner_Handler = $this->getHandlerBanner(); // Display banner $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0, '!=')); $criteria->setSort('RAND()'); - $criteria->setStart(0); - $criteria->setLimit(1); + if (!empty($client)) { + if (!in_array(0,$client)) { + $criteria->add(new Criteria('cid', '(' . implode(',', $client) . ')','IN')); + } + } + if ($ids == '') { + $criteria->setLimit($nb_banner); + $criteria->setStart(0); + } else { + $criteria->add(new Criteria('bid', '(' . $ids . ')','IN')); + } $banner_arr = $banner_Handler->getall($criteria); $numrows = count($banner_arr); + $bannerobject = ''; if ($numrows > 0) { foreach (array_keys($banner_arr) as $i) { $imptotal = $banner_arr[$i]->getVar("imptotal"); @@ -1320,33 +1335,36 @@ $imageurl = $banner_arr[$i]->getVar("imageurl"); $bid = $banner_arr[$i]->getVar("bid"); $clickurl = $banner_arr[$i]->getVar("clickurl"); - } - if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { - // EMPTY - } else { /** - * Check if this impression is the last one + * Print the banner */ - $impmade = $impmade + 1; - if ($imptotal > 0 && $impmade >= $imptotal) { - $this->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); - }else{ - $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); + if ($htmlbanner) { + $bannerobject .= $htmlcode; + } else { + if (stristr($imageurl, '.swf')) { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + } else { + $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + } } - } - /** - * Print the banner - */ - if ($htmlbanner) { - $bannerobject = $htmlcode; - } else { - $bannerobject = '<div id="xo-bannerfix">'; - if (stristr($imageurl, '.swf')) { - $bannerobject .= '<div id ="xo-fixbanner">' . '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"></a></div>' . '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; + if ($align == 'V') { + $bannerobject .= '<br /><br />'; } else { - $bannerobject .= '<a href="' . XOOPS_URL . '/modules/banners/index.php?op=click&bid=' . $bid . '" rel="external" title="' . $clickurl . '"><img src="' . $imageurl . '" alt="' . $clickurl . '" /></a>'; + $bannerobject .= ' '; } - $bannerobject .= '</div>'; + if ($this->getModuleConfig('banners_myip', 'banners') == $this->getEnv('REMOTE_ADDR')) { + // EMPTY + } else { + /** + * Check if this impression is the last one + */ + $impmade = $impmade + 1; + if ($imptotal > 0 && $impmade >= $imptotal) { + $this->db->queryF(sprintf('UPDATE %s SET status = %u, dateend = %u WHERE bid = %u', $this->db->prefix('banner'), 0, time(), $bid)); + }else{ + $this->db->queryF(sprintf('UPDATE %s SET impmade = %u WHERE bid = %u', $this->db->prefix('banner'), $impmade, $bid)); + } + } } return $bannerobject; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -163,9 +163,7 @@ $dbm->insert('config', " VALUES (9, 0, 1, 'gzip_compression', '_MD_AM_USEGZIP', '0', '_MD_AM_USEGZIPDSC', 'yesno', 'int', 16)"); $dbm->insert('config', " VALUES (10, 0, 1, 'usercookie', '_MD_AM_USERCOOKIE', 'xoops_user', '_MD_AM_USERCOOKIEDSC', 'textbox', 'text', 18)"); $dbm->insert('config', " VALUES (11, 0, 1, 'session_expire', '_MD_AM_SESSEXPIRE', '15', '_MD_AM_SESSEXPIREDSC', 'textbox', 'int', 22)"); - $dbm->insert('config', " VALUES (12, 0, 1, 'banners', '_MD_AM_BANNERS', '1', '_MD_AM_BANNERSDSC', 'yesno', 'int', 26)"); $dbm->insert('config', " VALUES (13, 0, 1, 'debug_mode', '_MD_AM_DEBUGMODE', '0', '_MD_AM_DEBUGMODEDSC', 'select', 'int', 24)"); - $dbm->insert('config', " VALUES (14, 0, 1, 'my_ip', '_MD_AM_MYIP', '127.0.0.1', '_MD_AM_MYIPDSC', 'textbox', 'text', 29)"); $dbm->insert('config', " VALUES (15, 0, 1, 'use_ssl', '_MD_AM_USESSL', '0', '_MD_AM_USESSLDSC', 'yesno', 'int', 30)"); $dbm->insert('config', " VALUES (16, 0, 1, 'session_name', '_MD_AM_SESSNAME', 'xoops_session', '_MD_AM_SESSNAMEDSC', 'textbox', 'text', 20)"); $dbm->insert('config', " VALUES (17, 0, 2, 'minpass', '_MD_AM_MINPASS', '5', '_MD_AM_MINPASSDSC', 'textbox', 'int', 1)"); Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1,104 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @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 banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ +function banners_blocks_show($options) { + $block = array(); + $xoops = Xoops::getInstance(); + //echo $options[3] . ' - ' . $options[3]; + switch ($options[0]) { + case 'random': + $nb_display = $options[1]; + $align = $options[2]; + array_shift($options); + array_shift($options); + array_shift($options); + $client = $options; + $block['banners'] = $xoops->getBanner($nb_display, $align, $client); + break; + + case 'id': + $ids = $options[1]; + $align = $options[2]; + $block['banners'] = $xoops->getBanner(1, $align, 0, $ids); + break; + } + return $block; +} + +function banners_blocks_edit($options) { + $form = ''; + switch ($options[0]) { + + case 'random': + $form .= _MB_BANNERS_DISP . " \n"; + $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"" . $options[0] . "\" />\n"; + $form .= "<input name=\"options[1]\" size=\"5\" maxlength=\"255\" value=\"" . $options[1] . "\" type=\"text\" /> " . _MB_BANNERS . "<br />\n"; + switch ($options[2]){ + case 'H': + $checked_H = 'checked="checked"'; + $checked_V = ''; + break; + + case 'V': + $checked_H = ''; + $checked_V = 'checked="checked"'; + break; + } + $form .= _MB_BANNERS_ALIGNEMENT . " : <input name=\"options[2]\" value=\"H\" type=\"radio\" " . $checked_H . "/>" . _MB_BANNERS_ALIGNEMENT_H . " \n"; + $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" " . $checked_V . "/>" . _MB_BANNERS_ALIGNEMENT_V . "<br />\n"; + array_shift($options); + array_shift($options); + array_shift($options); + $form .= _MB_BANNERS_CLIENTSTODISPLAY . "<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">\n"; + $xoops = Xoops::getInstance(); + $client_Handler = $xoops->getHandlerBannerclient(); + $criteria = new CriteriaCompo(); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + $client_arr = $client_Handler->getall($criteria); + $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? '' : 'selected="selected"') . ">" . _MB_BANNERS_ALLCLIENTS . "</option>\n"; + foreach (array_keys($client_arr) as $i) { + $form .= "<option value=\"" . $client_arr[$i]->getVar('cid') . "\" " . (array_search($client_arr[$i]->getVar('cid'), $options) === false ? '' : 'selected="selected"') . ">" . $client_arr[$i]->getVar('name')."</option>\n"; + } + $form .= "</select>\n"; + break; + + case 'id': + $form .= _MB_BANNERS_IDDISPLAY . " \n"; + $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"" . $options[0] . "\" />\n"; + $form .= "<input name=\"options[1]\" size=\"20\" maxlength=\"255\" value=\"" . $options[1] . "\" type=\"text\" /> " . _MB_BANNERS_SEP . "<br />\n"; + switch ($options[2]){ + case 'H': + $checked_H = 'checked="checked"'; + $checked_V = ''; + break; + + case 'V': + $checked_H = ''; + $checked_V = 'checked="checked"'; + break; + } + $form .= _MB_BANNERS_ALIGNEMENT . " : <input name=\"options[2]\" value=\"H\" type=\"radio\" " . $checked_H . "/>" . _MB_BANNERS_ALIGNEMENT_H . " \n"; + $form .= "<input name=\"options[2]\" value=\"V\" type=\"radio\" " . $checked_V . "/>" . _MB_BANNERS_ALIGNEMENT_V . "<br />\n"; + break; + } + return $form; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/banners_blocks.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/blocks/index.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/functions.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/functions.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -1,26 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/** - * banners module - * - * @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 banners - * @since 2.6.0 - * @author Mage Gr\xE9gory (AKA Mage) - * @version $Id$ - */ - -function banner_stats() -{ - echo 'prout'; -} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/include/install.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -62,6 +62,12 @@ } $sql = "DROP TABLE " . $xoops->db->prefix("bannerfinish"); $xoops->db->queryF($sql); - } + } + + // delete banners and my_ip + $sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'banners'"; + $xoops->db->queryF($sql); + $sql = "DELETE FROM " . $xoops->db->prefix("config") . " WHERE `conf_name` = 'my_ip'"; + $xoops->db->queryF($sql); return true; } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/index.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -24,8 +24,6 @@ $xoops = Xoops::getInstance(); XoopsLoad::load('system', 'system'); -$xoops->loadLanguage('admin'); -include dirname(__FILE__) . '/include/functions.php'; // Get main instance $system = System::getInstance(); // Get banners handler @@ -42,19 +40,32 @@ case 'list': default: - $uid = $xoops->user->getVar('uid'); + $access = false; + $admin = false; + if (is_object($xoops->user)) { + $uid = $xoops->user->getVar('uid'); + } else { + $uid = 0; + } if ($uid == 0) { - $xoops->redirect(XOOPS_URL, 2, _NOPERM); + $access = false; } $criteria = new CriteriaCompo(); $criteria->add(new Criteria('uid', $uid)); $client_count = $client_Handler->getCount($criteria); - if ($client_count == 0) { + if ($client_count != 0) { + $access = true; + } + if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + $access = true; + $admin = true; + } + if ($access == false) { $xoops->redirect(XOOPS_URL, 2, _NOPERM); } // Get start pager $start = $system->cleanVars($_REQUEST, 'start', 0, 'int'); - $startF = $system->cleanVars($_REQUEST, 'startF', 0, 'int'); + $startF = $system->cleanVars($_REQUEST, 'startF', 0, 'int'); // Call header $xoops->header('banners_client.html'); // Define Stylesheet @@ -64,17 +75,21 @@ $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); $xoops->theme->addScript($xoops->url('/media/jquery/plugins/jquery.ui.js')); $xoops->theme->addScript('modules/system/js/admin.js'); - + // Display banner - $client_arr = $client_Handler->getall($criteria); - foreach (array_keys($client_arr) as $i) { - $cid[] = $client_arr[$i]->getVar("cid"); + if ($admin == false) { + $client_arr = $client_Handler->getall($criteria); + foreach (array_keys($client_arr) as $i) { + $cid[] = $client_arr[$i]->getVar("cid"); + } } - + // Display banner $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0, '!=')); - $criteria->add(new Criteria('cid', '(' . implode(',', $cid) . ')','IN')); + if ($admin == false) { + $criteria->add(new Criteria('cid', '(' . implode(',', $cid) . ')','IN')); + } $criteria->setSort("cid"); $criteria->setOrder("ASC"); $criteria->setStart($start); @@ -93,12 +108,14 @@ $clicks = $banner_arr[$i]->getVar("clicks"); $htmlbanner = $banner_arr[$i]->getVar("htmlbanner"); $htmlcode = $banner_arr[$i]->getVar("htmlcode"); - $name_client = $client_Handler->get($banner_arr[$i]->getVar("cid")); - $name = ''; - if (is_object($name_client)) { - $name = $name_client->getVar("name"); + $client = $client_Handler->get($banner_arr[$i]->getVar("cid")); + if (is_object($client)) { + $client_name = $client->getVar("name"); + $client_uid = $client->getVar("uid"); + } else { + $client_name = ''; + $client_uid = 0; } - if ($impmade == 0) { $percent = 0; } else { @@ -113,13 +130,12 @@ if ($htmlbanner) { $img .= html_entity_decode($htmlcode); } else { - $img = '<div id="xo-bannerfix">'; + $img = ''; if (stristr($imageurl, '.swf')) { $img .= '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; } else { $img .= '<img src="' . $imageurl . '" alt="" />'; } - $img .= '</div>'; } $banner['bid'] = $banner_arr[$i]->getVar("bid"); @@ -128,7 +144,8 @@ $banner['left'] = $left; $banner['percent'] = $percent; $banner['imageurl'] = $img; - $banner['name'] = $name; + $banner['name'] = $client_name; + $banner['uid'] = $client_uid; $banner['clickurl'] = $banner_arr[$i]->getVar("clickurl"); $xoops->tpl->append_by_ref('banner', $banner); $xoops->tpl->append_by_ref('popup_banner', $banner); @@ -144,7 +161,9 @@ // Criteria $criteria = new CriteriaCompo(); $criteria->add(new Criteria('status', 0)); - $criteria->add(new Criteria('cid', '(' . implode(',', $cid) . ')','IN')); + if ($admin == false) { + $criteria->add(new Criteria('cid', '(' . implode(',', $cid) . ')','IN')); + } $criteria->setSort("datestart"); $criteria->setOrder("DESC"); $criteria->setStart($startF); @@ -163,6 +182,14 @@ $htmlcode = $banner_finish_arr[$i]->getVar("htmlcode"); $impressions = $banner_finish_arr[$i]->getVar("impmade"); $clicks = $banner_finish_arr[$i]->getVar("clicks"); + $client = $client_Handler->get($banner_finish_arr[$i]->getVar("cid")); + if (is_object($client)) { + $client_name = $client->getVar("name"); + $client_uid = $client->getVar("uid"); + } else { + $client_name = ''; + $client_uid = 0; + } if ($impressions != 0) { $percent = substr(100 * $clicks / $impressions, 0, 5); } else { @@ -189,12 +216,8 @@ $banner_finish['datestart'] = XoopsLocal::formatTimestamp($banner_finish_arr[$i]->getVar("datestart"), "m"); $banner_finish['dateend'] = XoopsLocal::formatTimestamp($banner_finish_arr[$i]->getVar("dateend"), "m"); $banner_finish['clickurl'] = $banner_finish_arr[$i]->getVar("clickurl"); - $name_client = $client_Handler->get($banner_finish_arr[$i]->getVar("cid")); - $name = ''; - if (is_object($name_client)) { - $name = $name_client->getVar("name"); - } - $banner_finish['name'] = $name; + $banner_finish['name'] = $client_name; + $banner_finish['uid'] = $client_uid; $xoops->tpl->append_by_ref('banner_finish', $banner_finish); $xoops->tpl->append_by_ref('popup_banner_finish', $banner_finish); unset($banner_finish); @@ -209,14 +232,27 @@ break; case 'edit': - $uid = $xoops->user->getVar('uid'); + $access = false; + $admin = false; + if (is_object($xoops->user)) { + $uid = $xoops->user->getVar('uid'); + } else { + $uid = 0; + } if ($uid == 0) { - $xoops->redirect(XOOPS_URL, 2, _NOPERM); + $access = false; } $criteria = new CriteriaCompo(); $criteria->add(new Criteria('uid', $uid)); $client_count = $client_Handler->getCount($criteria); - if ($client_count == 0) { + if ($client_count != 0) { + $access = true; + } + if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + $access = true; + $admin = true; + } + if ($access == false) { $xoops->redirect(XOOPS_URL, 2, _NOPERM); } $bid = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); @@ -237,8 +273,21 @@ break; case 'save': - $uid = $xoops->user->getVar('uid'); + $access = true; + $admin = false; + if (is_object($xoops->user)) { + $uid = $xoops->user->getVar('uid'); + } else { + $uid = 0; + } if ($uid == 0) { + $access = false; + } + if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + $access = true; + $admin = true; + } + if ($access == false) { $xoops->redirect(XOOPS_URL, 2, _NOPERM); } if (!$xoops->security->check()) { @@ -251,8 +300,10 @@ $criteria->add(new Criteria('cid', $obj->getVar("cid"))); $client_arr = $client_Handler->getall($criteria); foreach (array_keys($client_arr) as $i) { - if ($client_arr[$i]->getVar("uid") != $uid){ - $xoops->redirect(XOOPS_URL, 2, _NOPERM); + if ($admin == false) { + if ($client_arr[$i]->getVar("uid") != $uid){ + $xoops->redirect(XOOPS_URL, 2, _NOPERM); + } } } $obj->setVar("clickurl", $_POST["clickurl"]); @@ -261,13 +312,26 @@ } $xoops->error($obj->getHtmlErrors()); } else { - $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_DBERROR); + $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_NO_ID); } break; - + case 'EmailStats': - $uid = $xoops->user->getVar('uid'); + $access = true; + $admin = false; + if (is_object($xoops->user)) { + $uid = $xoops->user->getVar('uid'); + } else { + $uid = 0; + } if ($uid == 0) { + $access = false; + } + if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + $access = true; + $admin = true; + } + if ($access == false) { $xoops->redirect(XOOPS_URL, 2, _NOPERM); } $bid = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); @@ -277,42 +341,47 @@ $criteria->add(new Criteria('cid', $banner->getVar("cid"))); $client_arr = $client_Handler->getall($criteria); foreach (array_keys($client_arr) as $i) { - if ($client_arr[$i]->getVar("uid") != $uid){ - $xoops->redirect(XOOPS_URL, 2, _NOPERM); + if ($admin == false) { + if ($client_arr[$i]->getVar("uid") != $uid){ + $xoops->redirect(XOOPS_URL, 2, _NOPERM); + } } $client_uid = $client_arr[$i]->getVar("uid"); $client_name = $client_arr[$i]->getVar("name"); } $user = $member_handler->getUser($client_arr[$i]->getVar("uid")); $email = $user->getVar("email", 'n'); - if ($banner->getVar('impmade') == 0) { - $percent = 0; + if ($email != ''){ + if ($banner->getVar('impmade') == 0) { + $percent = 0; + } else { + $percent = substr(100 * $banner->getVar('clicks') / $banner->getVar('impmade'), 0, 5); + } + if ($banner->getVar('imptotal') == 0) { + $left = _AM_BANNERS_BANNERS_UNLIMIT; + $banner->setVar('imptotal', _AM_BANNERS_BANNERS_UNLIMIT); + } else { + $left = $banner->getVar('imptotal') - $banner->getVar('impmade'); + } + $date = date("F jS Y, h:iA."); + $subject = sprintf(_MD_BANNERS_INDEX_MAIL_SUBJECT, $xoops->getConfig('sitename')); + $message = sprintf(_MD_BANNERS_INDEX_MAIL_MESSAGE, $xoops->getConfig('sitename'), $client_name, $bid, $banner->getVar('imageurl'), $banner->getVar('clickurl'), $banner->getVar('imptotal'), $banner->getVar('impmade'), $left, $banner->getVar('clicks'), $percent, $date); + $xoopsMailer = $xoops->getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setToEmails($email); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); + $xoopsMailer->setSubject($subject); + $xoopsMailer->setBody($message); + if (!$xoopsMailer->send()) { + $xoops->redirect("index.php", 2, sprintf(_MAIL_SENDMAILNG, $email)); + } + $xoops->redirect("index.php", 2, _MD_BANNERS_INDEX_MAIL_OK); } else { - $percent = substr(100 * $banner->getVar('clicks') / $banner->getVar('impmade'), 0, 5); + $xoops->redirect("index.php", 2, _MD_BANNERS_INDEX_NOMAIL); } - if ($banner->getVar('imptotal') == 0) { - $left = _AM_BANNERS_BANNERS_UNLIMIT; - $banner->setVar('imptotal', _AM_BANNERS_BANNERS_UNLIMIT); - } else { - $left = $banner->getVar('imptotal') - $banner->getVar('impmade'); - } - $date = date("F jS Y, h:iA."); - $subject = sprintf(_MD_BANNERS_INDEX_MAIL_SUBJECT, $xoops->getConfig('sitename')); - $message = sprintf(_MD_BANNERS_INDEX_MAIL_MESSAGE, $xoops->getConfig('sitename'), $client_name, $bid, $banner->getVar('imageurl'), $banner->getVar('clickurl'), $banner->getVar('imptotal'), $banner->getVar('impmade'), $left, $banner->getVar('clicks'), $percent, $date); - $xoopsMailer = $xoops->getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($email); - $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); - $xoopsMailer->setFromName($xoops->getConfig('sitename')); - $xoopsMailer->setSubject($subject); - $xoopsMailer->setBody($message); - - if (!$xoopsMailer->send()) { - $xoops->redirect("index.php", 2, sprintf(_MAIL_SENDMAILNG, $email)); - } - $xoops->redirect("index.php", 2, _MD_BANNERS_INDEX_MAIL_OK); } else { - $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_DBERROR); + $xoops->redirect(XOOPS_URL, 1, _MD_BANNERS_INDEX_NO_ID); } break; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/blocks.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/blocks.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1,30 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * banners module + * + * @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 banners + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ +define("_MB_BANNERS_DISP","Display"); +define("_MB_BANNERS","banners"); +define("_MB_BANNERS_ALIGNEMENT","Alignement"); +define("_MB_BANNERS_ALIGNEMENT_H","horizontal"); +define("_MB_BANNERS_ALIGNEMENT_V","vertical"); +define("_MB_BANNERS_ALLCLIENTS","All clients"); +define("_MB_BANNERS_CLIENTSTODISPLAY","Select displayed clients"); +define("_MB_BANNERS_IDDISPLAY","Indicate the id of the banners to be displayed"); +define("_MB_BANNERS_SEP","separated with ','."); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/blocks.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/main.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/main.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -38,4 +38,5 @@ Report Generated on: %s"); define("_MD_BANNERS_INDEX_MAIL_OK", "Available Banner statistics for the selected banner have been sent to your account email address."); define("_MD_BANNERS_INDEX_MAIL_SUBJECT", "Your Banner Statistics at %s"); +define("_MD_BANNERS_INDEX_NOMAIL", "Failed to send: E-Mail address does not exist."); include_once('admin.php'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/modinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/modinfo.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/modinfo.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -28,6 +28,13 @@ define("_MI_BANNERS_CLIENTS", "Clients"); define("_MI_BANNERS_BANNERS", "Banners manager"); define("_MI_BANNERS_ABOUT", "About"); +// Blocks +define("_MI_BANNERS_BLOCKS_RANDOM", "Random Banners"); +define("_MI_BANNERS_BLOCKS_RANDOMDSC", "Display banners randomly"); +define("_MI_BANNERS_BLOCKS_ID", "Id Banners"); +define("_MI_BANNERS_BLOCKS_IDDSC", "Display banners by id"); // Preferences +define("_MI_BANNERS_PREFERENCE_MYIP", "Your IP address"); +define("_MI_BANNERS_PREFERENCE_MYIPDSC", "This IP will not count as an impression for banners"); define("_MI_BANNERS_PREFERENCE_PAGER", "Number of banners to display per page"); define("_MI_BANNERS_PREFERENCE_CLIENTSPAGER", "Number of clients to display per page"); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/banners_client.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -28,9 +28,11 @@ <a class="tooltip" href="index.php?op=edit&bid=<{$banner.bid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_BANNERS_EDIT}>" /> </a> + <{if $banner.uid != 0}> <a class="tooltip" href="index.php?op=EmailStats&bid=<{$banner.bid}>" title="<{$smarty.const._MD_BANNERS_INDEX_EMAIL}>"> <img src="<{xoAdminIcons mail_send.png}>" alt="<{$smarty.const._MD_BANNERS_INDEX_EMAIL}>" /> </a> + <{/if}> </td> </tr> <{/foreach}> @@ -82,9 +84,11 @@ <a class="tooltip" href="index.php?op=edit&bid=<{$banner_finish.bid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_BANNERS_EDIT}>" /> </a> + <{if $banner_finish.uid != 0}> <a class="tooltip" href="index.php?op=EmailStats&bid=<{$banner_finish.bid}>" title="<{$smarty.const._MD_BANNERS_INDEX_EMAIL}>"> <img src="<{xoAdminIcons mail_send.png}>" alt="<{$smarty.const._MD_BANNERS_INDEX_EMAIL}>" /> </a> + <{/if}> </td> </tr> <{/foreach}> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_id.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_id.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_id.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1 @@ +<{$block.banners}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_random.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_random.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/banners_blocks_random.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1 @@ +<{$block.banners}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/blocks/index.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/xoops_version.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -64,10 +64,35 @@ // Admin Templates $modversion['templates'][] = array('file' => 'banners_admin_banners.html', 'description' => '', 'type' => 'admin'); -$modversion['templates'][] = array('file' => 'banners_admin_clients.html', 'description' => '', 'type' => 'admin'); +$modversion['templates'][] = array('file' => 'banners_admin_clients.html', 'description' => '', 'type' => 'admin'); +// blocks +$i = 0; +$modversion['blocks'][$i]['file'] = 'banners_blocks.php'; +$modversion['blocks'][$i]['name'] = _MI_BANNERS_BLOCKS_RANDOM; +$modversion['blocks'][$i]['description'] = _MI_BANNERS_BLOCKS_RANDOMDSC; +$modversion['blocks'][$i]['show_func'] = 'banners_blocks_show'; +$modversion['blocks'][$i]['edit_func'] = 'banners_blocks_edit'; +$modversion['blocks'][$i]['options'] = 'random|1|H|0'; +$modversion['blocks'][$i]['template'] = 'banners_blocks_random.html'; +$i++; +$modversion['blocks'][$i]['file'] = 'banners_blocks.php'; +$modversion['blocks'][$i]['name'] = _MI_BANNERS_BLOCKS_ID; +$modversion['blocks'][$i]['description'] = _MI_BANNERS_BLOCKS_IDDSC; +$modversion['blocks'][$i]['show_func'] = 'banners_blocks_show'; +$modversion['blocks'][$i]['edit_func'] = 'banners_blocks_edit'; +$modversion['blocks'][$i]['options'] = 'id||H'; +$modversion['blocks'][$i]['template'] = 'banners_blocks_id.html'; + // Preferences $i = 0; +$modversion['config'][$i]['name'] = 'banners_myip'; +$modversion['config'][$i]['title'] = '_MI_BANNERS_PREFERENCE_MYIP'; +$modversion['config'][$i]['description'] = '_MI_BANNERS_PREFERENCE_MYIPDSC'; +$modversion['config'][$i]['formtype'] = 'textbox'; +$modversion['config'][$i]['valuetype'] = 'text'; +$modversion['config'][$i]['default'] = '127.0.0.1'; +$i++; $modversion['config'][$i]['name'] = 'banners_pager'; $modversion['config'][$i]['title'] = '_MI_BANNERS_PREFERENCE_PAGER'; $modversion['config'][$i]['description'] = ''; @@ -80,4 +105,4 @@ $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'int'; -$modversion['config'][$i]['default'] = 10; \ No newline at end of file +$modversion['config'][$i]['default'] = 15; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-01-05 21:37:45 UTC (rev 8643) @@ -6,7 +6,7 @@ * _CHARSET UTF-8 * @version $Id$ */ - + // dont change define("_AM_DBUPDATED",_AM_SYSTEM_DBUPDATED); @@ -77,10 +77,6 @@ define("_MD_AM_SESSNAMEDSC", "The name of session (Valid only when 'use custom session' is enabled)"); define("_MD_AM_SESSEXPIRE", "Session expiration"); define("_MD_AM_SESSEXPIREDSC", "Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled.)"); -define("_MD_AM_BANNERS", "Activate banner ads?"); -define("_MD_AM_BANNERSDSC", ""); -define("_MD_AM_MYIP", "Your IP address"); -define("_MD_AM_MYIPDSC", "This IP will not count as an impression for banners"); define("_MD_AM_ALWDHTML", "HTML tags allowed in all posts."); define("_MD_AM_INVLDMINPASS", "Invalid value for minimum length of password."); define("_MD_AM_INVLDUCOOK", "Invalid value for usercookie name."); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-01-05 19:55:19 UTC (rev 8642) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/theme.html 2012-01-05 21:37:45 UTC (rev 8643) @@ -39,7 +39,7 @@ <table cellspacing="0"> <tr id="header"> <td id="headerlogo"><a href="<{xoAppUrl /}>" title="<{$xoops_sitename}>"><img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" /></a></td> - <td id="headerbanner"><{$xoops_banner}></td> + <td id="headerbanner"><div id="xo-bannerfix"><{$xoops_banner}></div></td> </tr> <tr> <td id="headerbar" colspan="2"> </td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2012-01-22 20:14:58
|
Revision: 8782 http://xoops.svn.sourceforge.net/xoops/?rev=8782&view=rev Author: forxoops Date: 2012-01-22 20:14:47 +0000 (Sun, 22 Jan 2012) Log Message: ----------- Add bootstrap CSS framework Change default theme Change module admin parts Add plugin manager Add CSS sprites in media Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/moduladmin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/xoops.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/visibility.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/blocks/system_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/system.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/help.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/menu.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/js/admin.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/js/module.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/modulesadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/modinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_about.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_buttons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_infobox.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_navigation.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tips.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_header.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/modules.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/LICENSE XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/Makefile XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/README.md XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/bootstrap.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/bootstrap.min.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-alerts.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-buttons.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-dropdown.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-modal.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-popover.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-scrollspy.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-tabs.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/bootstrap-twipsy.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-alerts.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-buttons.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-dropdown.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-modal.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-popover.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-scrollspy.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-tabs.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/unit/bootstrap-twipsy.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/vendor/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/vendor/qunit.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/js/tests/vendor/qunit.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/bootstrap.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/forms.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/mixins.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/patterns.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/reset.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/scaffolding.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/tables.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/type.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/lib/variables.less XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.jeditable.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/icons.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/bgw.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/down.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/module-available.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/module.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/icons-disabled.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/icons.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/icons/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/icons/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/icons/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/icons/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/plugins/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/module.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/plugin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/docs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/docs/lang_diff.txt XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/images/edit_mini.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/images/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/images/logo_large.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/images/logo_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/plugins.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_breadcrumb.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_tabs.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_available.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_card.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_logger.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_menu.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_table.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_plugins.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/menu.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/plugins.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/plugins_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/down.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/logo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/right.gif XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/js/ddsmoothmenu.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/head.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/icons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/topbar.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/images/system_slogo.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/smilies.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/userrank.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_modules_confirm.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/buttonbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/choosestyle.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/content.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/dark.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/dashboard.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/footer.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/forms.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/globalnav.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/icons.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/logger.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/orange.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/pagenav.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/reset.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/silver.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/tablesorter.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/toolbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/banners.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/icons/banners_small.png XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/dark/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/orange/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/img/silver/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_accordion.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_footer.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_globalnav.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_head.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_icons.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_metas.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_modules.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_page.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_scripts.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_tabs.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_toolbar.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/xo_uptop.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -44,39 +44,35 @@ * Error warning messages */ if ($xoops->getConfig('admin_warnings_enable')) { + + $error_msg = array(); if (is_dir(XOOPS_ROOT_PATH . '/install/')) { - $xoops->error(sprintf(_AD_WARNINGINSTALL, XOOPS_ROOT_PATH . '/install/')); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGINSTALL, XOOPS_ROOT_PATH . '/install/'); } if (is_writable(XOOPS_ROOT_PATH . '/mainfile.php')) { - $xoops->error(sprintf(_AD_WARNINGWRITEABLE, XOOPS_ROOT_PATH . '/mainfile.php')); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGWRITEABLE, XOOPS_ROOT_PATH . '/mainfile.php'); } // ###### Output warn messages for correct functionality ###### if (!is_writable(XOOPS_CACHE_PATH)) { - $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_CACHE_PATH)); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_CACHE_PATH); } if (!is_writable(XOOPS_UPLOAD_PATH)) { - $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_UPLOAD_PATH)); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_UPLOAD_PATH); } if (!is_writable(XOOPS_COMPILE_PATH)) { - $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_COMPILE_PATH)); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_COMPILE_PATH); } //www fits inside www_private, lets add a trailing slash to make sure it doesn't if (strpos(XOOPS_PATH . '/', XOOPS_ROOT_PATH . '/') !== false || strpos(XOOPS_PATH . '/', $_SERVER['DOCUMENT_ROOT'] . '/') !== false) { - $xoops->error(sprintf(_AD_WARNINGXOOPSLIBINSIDE, XOOPS_PATH)); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGXOOPSLIBINSIDE, XOOPS_PATH); } if (strpos(XOOPS_VAR_PATH . '/', XOOPS_ROOT_PATH . '/') !== false || strpos(XOOPS_VAR_PATH . '/', $_SERVER['DOCUMENT_ROOT'] . '/') !== false) { - $xoops->error(sprintf(_AD_WARNINGXOOPSLIBINSIDE, XOOPS_VAR_PATH)); - echo '<br />'; + $error_msg[] = sprintf(_AD_WARNINGXOOPSLIBINSIDE, XOOPS_VAR_PATH); } + $xoops->tpl->assign('error_msg', $error_msg); } if (!empty($_GET['xoopsorgnews'])) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -32,7 +32,7 @@ * Template call for each render parts * @var array */ - public $_tplFile = array('index' => 'admin_index.html', 'about' => 'admin_about.html', 'infobox' => 'admin_infobox.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); + public $_tplFile = array('index' => 'admin_index.html', 'about' => 'admin_about.html', 'infobox' => 'admin_infobox.html', 'bread' => 'admin_breadcrumb.html', 'button' => 'admin_buttons.html', 'tips' => 'admin_tips.html', 'nav' => 'admin_navigation.html'); /** * Tips to display in admin page @@ -59,6 +59,12 @@ private $_itemConfigBoxLine = array(); /** + * Breadcrumb data + * @var array + */ + private $_bread = array(); + + /** * Current module object * @var #P#M#C\Xoops.getInstance.module|array|? */ @@ -75,6 +81,23 @@ } /** + * Add breadcrumb menu + * @param string $title + * @param string $link + * @param bool $home + */ + public function addBreadLink($title = '', $link = '', $home = false) + { + if ($title != '') { + $this->_bread[] = array( + 'link' => $link, + 'title' => $title, + 'home' => $home + ); + } + } + + /** * Add config line * @param string $value * @param string $type @@ -117,7 +140,7 @@ * @param string $extra * @return bool */ - public function addInfoBox($title, $type = 'default', $extra='') + public function addInfoBox($title, $type = 'default', $extra = '') { $ret['title'] = $title; $ret['type'] = $type; @@ -186,6 +209,17 @@ return 'admin:' . $this->_tplModule . '|' . $this->_tplFile[$type]; } + public function renderBreadcrumb() + { + $xoops = Xoops::getInstance(); + + $xoops->tpl->assign('xo_admin_breadcrumb', $this->_bread); + //$xoops->tpl->assign('xo_admin_help', $this->_help); + if ($xoops->tpl_name == '') { + $xoops->tpl->display($this->getTplPath('bread')); + } + } + /** * Render all items buttons * @param string $position Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -1098,7 +1098,7 @@ */ public function error($msg, $title = '') { - echo '<div class="errorMsg">'; + echo '<div class="errorMsg alert-message error">'; if ($title != '') { echo '<strong>' . $title . '</strong><br /><br />'; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -26,6 +26,8 @@ class XoopsFormButton extends XoopsFormElement { + protected $_class; + /** * Type of the button. This could be either "button", "submit", or "reset" * @var string @@ -40,14 +42,20 @@ * @param string $value * @param string $type Type of the button. Potential values: "button", "submit", or "reset" */ - public function __construct($caption, $name, $value = "", $type = "button") + public function __construct($caption, $name, $value = "", $type = "button", $class="formButton") { $this->setCaption($caption); $this->setName($name); $this->_type = $type; $this->setValue($value); + $this->_class = $class; } + public function getClass() + { + return $this->_class; + } + /** * Get the type * @@ -65,6 +73,6 @@ */ public function render() { - return "<input type='" . $this->getType() . "' class='formButton' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' title='" . $this->getValue() . "'" . $this->getExtra() . " />"; + return "<input type='" . $this->getType() . "' class='" . $this->getClass() . "' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' title='" . $this->getValue() . "'" . $this->getExtra() . " />"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -60,7 +60,10 @@ $ele_name = $this->getName(); $ret = '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '> <table width="100%" class="outer" cellspacing="1"> + <thead> <tr><th colspan="2">' . $this->getTitle() . '</th></tr> + </thead> + <tbody> '; $hidden = ''; $class = 'even'; @@ -86,7 +89,7 @@ $hidden .= $ele->render(); } } - $ret .= '</table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE; + $ret .= '</tbody></table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE; $ret .= $this->renderValidationJS(true); return $ret; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -46,4 +46,5 @@ // include the default language file for the admin interface $xoops->loadLanguage('admin', $xoops->module->getVar('dirname')); +$xoops->moduleDirname = $xoops->module->getVar('dirname'); $xoops->isAdminSide = true; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2012-01-22 19:58:05 UTC (rev 8781) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2012-01-22 20:14:47 UTC (rev 8782) @@ -40,7 +40,7 @@ * * @var array */ - private $_msg; + private $_msg = array(); /** * Constructor @@ -192,9 +192,9 @@ */ public function loadAdminMenu() { - if ($this->getInfo('adminmenu') && $this->getInfo('adminmenu') != '' && file_exists(XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/' . $this->getInfo('adminmenu'))) { + if ($this->getInfo('adminmenu') && $this->getInfo('adminmenu') != '' && file_exists(XOOPS_ROOT_PATH . '/modules/' . $this->getInfo('dirname') . '/' . $this->getInfo('adminmenu'))) { $adminmenu = array(); - include XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/' . $this->getInfo('adminmenu'); + include XOOPS_ROOT_PATH . '/modules/' . $this->getInfo('dirname') . '/' . $this->getInfo('adminmenu'); $this->adminmenu = $adminmenu; } } Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/LICENSE =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/LICENSE (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/LICENSE 2012-01-22 20:14:47 UTC (rev 8782) @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/Makefile =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/Makefile (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/Makefile 2012-01-22 20:14:47 UTC (rev 8782) @@ -0,0 +1,47 @@ +VERSION=1.4.0 +DATE=$(shell DATE) +BOOTSTRAP = ./bootstrap.css +BOOTSTRAP_MIN = ./bootstrap.min.css +BOOTSTRAP_LESS = ./lib/bootstrap.less +LESS_COMPRESSOR ?= `which lessc` +UGLIFY_JS ?= `which uglifyjs` +WATCHR ?= `which watchr` + +build: + @@if test ! -z ${LESS_COMPRESSOR}; then \ + sed -e 's/@VERSION/'"v${VERSION}"'/' -e 's/@DATE/'"${DATE}"'/' <${BOOTSTRAP_LESS} >${BOOTSTRAP_LESS}.tmp; \ + lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP}; \ + lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP_MIN} --compress; \ + rm -f ${BOOTSTRAP_LESS}.tmp; \ + echo "Bootstrap successfully built! - `date`"; \ + else \ + echo "You must have the LESS compiler installed in order to build Bootstrap."; \ + echo "You can install it by running: npm install less -g"; \ + fi + +js/min: + @@if test ! -z ${UGLIFY_JS}; then \ + mkdir -p js/min; \ + uglifyjs -o js/min/bootstrap-alerts.min.js js/bootstrap-alerts.js;\ + uglifyjs -o js/min/bootstrap-buttons.min.js js/bootstrap-buttons.js;\ + uglifyjs -o js/min/bootstrap-dropdown.min.js js/bootstrap-dropdown.js;\ + uglifyjs -o js/min/bootstrap-modal.min.js js/bootstrap-modal.js;\ + uglifyjs -o js/min/bootstrap-popover.min.js js/bootstrap-popover.js;\ + uglifyjs -o js/min/bootstrap-scrollspy.min.js js/bootstrap-scrollspy.js;\ + uglifyjs -o js/min/bootstrap-tabs.min.js js/bootstrap-tabs.js;\ + uglifyjs -o js/min/bootstrap-twipsy.min.js js/bootstrap-twipsy.js;\ + else \ + echo "You must have the UGLIFYJS minifier installed in order to minify Bootstrap's js."; \ + echo "You can install it by running: npm install uglify-js -g"; \ + fi + +watch: + @@if test ! -z ${WATCHR}; then \ + echo "Watching less files..."; \ + watchr -e "watch('lib/.*\.less') { system 'make' }"; \ + else \ + echo "You must have the watchr installed in order to watch Bootstrap less files."; \ + echo "You can install it by running: gem install watchr"; \ + fi + +.PHONY: build watch \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/README.md =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/README.md (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/README.md 2012-01-22 20:14:47 UTC (rev 8782) @@ -0,0 +1,105 @@ +TWITTER BOOTSTRAP +================= + +Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more. + +To get started -- checkout http://twitter.github.com/bootstrap! + + +Usage +----- + +You can use Twitter Bootstrap in one of two ways: just drop the compiled CSS into any new project and start cranking, or run LESS on your site and compile on the fly like a boss. + +Here's what the LESS version looks like: + +``` html +<link rel="stylesheet/less" type="text/css" href="lib/bootstrap.less"> +<script src="less.js" type="text/javascript"></script> +``` + +Or if you prefer, the standard css way: + +``` html +<link rel="stylesheet" type="text/css" href="bootstrap.css"> +``` + +For more info, refer to the docs! + + +Versioning +---------- + +For transparency and insight into our release cycle, and for striving to maintain backwards compatibility, Bootstrap will be maintained under the Semantic Versioning guidelines as much as possible. + +Releases will be numbered with the follow format: + +`<major>.<minor>.<patch>` + +And constructed with the following guidelines: + +* Breaking backwards compatibility bumps the major +* New additions without breaking backwards compatibility bumps the minor +* Bug fixes and misc changes bump the patch + +For more information on SemVer, please visit http://semver.org/. + + +Bug tracker +----------- + +Have a bug? Please create an issue here on GitHub! + +https://github.com/twitter/bootstrap/issues + + +Twitter account +--------------- + +Keep up to date on announcements and more by following Bootstrap on Twitter, <a href="http://twitter.com/TwBootstrap">@TwBootstrap</a>. + + +Mailing list +------------ + +Have a question? Ask on our mailing list! + +tw...@go... + +http://groups.google.com/group/twitter-bootstrap + + +Developers +---------- + +We have included a makefile with convenience methods for working with the bootstrap library. + ++ **build** - `make build` +This will run the less compiler on the bootstrap lib and generate a bootstrap.css and bootstrap.min.css file. +The lessc compiler is required for this command to run. + ++ **watch** - `make watch` +This is a convenience method for watching your less files and automatically building them whenever you save. +Watchr is required for this command to run. + + +Authors +------- + +**Mark Otto** + ++ http://twitter.com/mdo ++ http://github.com/markdotto + +**Jacob Thornton** + ++ http://twitter.com/fat ++ http://github.com/fat + + +License +--------------------- + +Copyright 2011 Twitter, Inc. + +Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/bootstrap.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/bootstrap.css (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/bootstrap/bootstrap.css 2012-01-22 20:14:47 UTC (rev 8782) @@ -0,0 +1,2470 @@ +/*! + * Bootstrap v1.4.0 + * + * Copyright 2011 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: Sun Dec 25 20:18:31 PST 2011 + */ +/* Reset.less + * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). + * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ +html, body { + margin: 0; + padding: 0; +} +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +cite, +code, +del, +dfn, +em, +img, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +dd, +dl, +dt, +li, +ol, +ul, +fieldset, +form, +label, +legend, +button, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td { + margin: 0; + padding: 0; + border: 0; + font-weight: normal; + font-style: normal; + font-size: 100%; + line-height: 1; + font-family: inherit; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +ol, ul { + list-style: none; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +html { + overflow-y: scroll; + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: none; +} +a:hover, a:active { + outline: none; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, canvas, video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; + -ms-interpolation-mode: bicubic; +} +button, +input, +select, +textarea { + font-size: 100%; + margin: 0; + vertical-align: baseline; + *vertical-align: middle; +} +button, input { + line-height: normal; + *overflow: visible; +} +button::-moz-focus-inner, input::-moz-focus-inner { + border: 0; + padding: 0; +} +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +/* Variables.less + * Variables to customize the look and feel of Bootstrap + * ----------------------------------------------------- */ +/* Mixins.less + * Snippets of reusable CSS to develop faster and keep code readable + * ----------------------------------------------------------------- */ +/* + * Scaffolding + * Basic and global styles for generating a grid system, structural layout, and page templates + * ------------------------------------------------------------------------------------------- */ +body { + background-color: #ffffff; + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 18px; + color: #404040; +} +.container { + width: 940px; + margin-left: auto; + margin-right: auto; + zoom: 1; +} +.container:before, .container:after { + display: table; + content: ""; + zoom: 1; +} +.container:after { + clear: both; +} +.container-fluid { + position: relative; + min-width: 940px; + padding-left: 20px; + padding-right: 20px; + zoom: 1; +} +.container-fluid:before, .container-fluid:after { + display: table; + content: ""; + zoom: 1; +} +.container-fluid:after { + clear: both; +} +.container-fluid > .sidebar { + position: absolute; + top: 0; + left: 20px; + width: 220px; +} +.container-fluid > .content { + margin-left: 240px; +} +a { + color: #0069d6; + text-decoration: none; + line-height: inherit; + font-weight: inherit; +} +a:hover { + color: #00438a; + text-decoration: underline; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.row { + zoom: 1; + margin-left: -20px; +} +.row:before, .row:after { + display: table; + content: ""; + zoom: 1; +} +.row:after { + clear: both; +} +.row > [class*="span"] { + display: inline; + float: left; + margin-left: 20px; +} +.span1 { + width: 40px; +} +.span2 { + width: 100px; +} +.span3 { + width: 160px; +} +.span4 { + width: 220px; +} +.span5 { + width: 280px; +} +.span6 { + width: 340px; +} +.span7 { + width: 400px; +} +.span8 { + width: 460px; +} +.span9 { + width: 520px; +} +.span10 { + width: 580px; +} +.span11 { + width: 640px; +} +.span12 { + width: 700px; +} +.span13 { + width: 760px; +} +.span14 { + width: 820px; +} +.span15 { + width: 880px; +} +.span16 { + width: 940px; +} +.span17 { + width: 1000px; +} +.span18 { + width: 1060px; +} +.span19 { + width: 1120px; +} +.span20 { + width: 1180px; +} +.span21 { + width: 1240px; +} +.span22 { + width: 1300px; +} +.span23 { + width: 1360px; +} +.span24 { + width: 1420px; +} +.row > .offset1 { + margin-left: 80px; +} +.row > .offset2 { + margin-left: 140px; +} +.row > .offset3 { + margin-left: 200px; +} +.row > .offset4 { + margin-left: 260px; +} +.row > .offset5 { + margin-left: 320px; +} +.row > .offset6 { + margin-left: 380px; +} +.row > .offset7 { + margin-left: 440px; +} +.row > .offset8 { + margin-left: 500px; +} +.row > .offset9 { + margin-left: 560px; +} +.row > .offset10 { + margin-left: 620px; +} +.row > .offset11 { + margin-left: 680px; +} +.row > .offset12 { + margin-left: 740px; +} +.span-one-third { + width: 300px; +} +.span-two-thirds { + width: 620px; +} +.row > .offset-one-third { + margin-left: 340px; +} +.row > .offset-two-thirds { + margin-left: 660px; +} +/* Typography.less + * Headings, body text, lists, code, and more for a versatile and durable typography system + * ---------------------------------------------------------------------------------------- */ +p { + font-size: 13px; + font-weight: normal; + line-height: 18px; + margin-bottom: 9px; +} +p small { + font-size: 11px; + color: #bfbfbf; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + color: #404040; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + color: #bfbfbf; +} +h1 { + margin-bottom: 18px; + font-size: 30px; + line-height: 36px; +} +h1 small { + font-size: 18px; +} +h2 { + font-size: 24px; + line-height: 36px; +} +h2 small { + font-size: 14px; +} +h3, +h4, +h5, +h6 { + line-height: 36px; +} +h3 { + font-size: 18px; +} +h3 small { + font-size: 14px; +} +h4 { + font-size: 16px; +} +h4 small { + font-size: 12px; +} +h5 { + font-size: 14px; +} +h6 { + font-size: 13px; + color: #bfbfbf; + text-transform: uppercase; +} +ul, ol { + margin: 0 0 18px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: 18px; + color: #808080; +} +ul.unstyled { + list-style: none; + margin-left: 0; +} +dl { + margin-bottom: 18px; +} +dl dt, dl dd { + line-height: 18px; +} +dl dt { + font-weight: bold; +} +dl dd { + margin-left: 9px; +} +hr { + margin: 20px 0 19px; + border: 0; + border-bottom: 1px solid #eee; +} +strong { + font-style: inherit; + font-weight: bold; +} +em { + font-style: italic; + font-weight: inherit; + line-height: inherit; +} +.muted { + color: #bfbfbf; +} +blockquote { + margin-bottom: 18px; + border-left: 5px solid #eee; + padding-left: 15px; +} +blockquote p { + font-size: 14px; + font-weight: 300; + line-height: 18px; + margin-bottom: 0; +} +blockquote small { + display: block; + font-size: 12px; + font-weight: 300; + line-height: 18px; + color: #bfbfbf; +} +blockquote small:before { + content: '\2014 \00A0'; +} +address { + display: block; + line-height: 18px; + margin-bottom: 18px; +} +code, pre { + padding: 0 3px 2px; + font-family: Monaco, Andale Mono, Courier New, monospace; + font-size: 12px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + background-color: #fee9cc; + color: rgba(0, 0, 0, 0.75); + padding: 1px 3px; +} +pre { + background-color: #f5f5f5; + display: block; + padding: 8.5px; + margin: 0 0 18px; + line-height: 18px; + font-size: 12px; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} +/* Forms.less + * Base styles for various input types, form layouts, and states + * ------------------------------------------------------------- */ +form { + margin-bottom: 18px; +} +fieldset { + margin-bottom: 18px; + padding-top: 18px; +} +fieldset legend { + display: block; + padding-left: 150px; + font-size: 19.5px; + line-height: 1; + color: #404040; + *padding: 0 0 5px 145px; + /* IE6-7 */ + + *line-height: 1.5; + /* IE6-7 */ + +} +form .clearfix { + margin-bottom: 18px; + zoom: 1; +} +form .clearfix:before, form .clearfix:after { + display: table; + content: ""; + zoom: 1; +} +form .clearfix:after { + clear: both; +} +label, +input, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: normal; +} +label { + padding-top: 6px; + font-size: 13px; + line-height: 18px; + float: left; + width: 130px; + text-align: right; + color: #404040; +} +form .input { + margin-left: 150px; +} +input[type=checkbox], input[type=radio] { + cursor: pointer; +} +input, +textarea, +select, +.uneditable-input { + display: inline-block; + width: 210px; + height: 18px; + padding: 4px; + font-size: 13px; + line-height: 18px; + color: #808080; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +select { + padding: initial; +} +input[type=checkbox], input[type=radio] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; + /* IE6-7 */ + + line-height: normal; + border: none; +} +input[type=file] { + background-color: #ffffff; + padding: initial; + border: initial; + line-height: initial; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +input[type=button], input[type=reset], input[type=submit] { + width: auto; + height: auto; +} +select, input[type=file] { + height: 27px; + *height: auto; + line-height: 27px; + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + +} +select[multiple] { + height: inherit; + background-color: #ffffff; +} +textarea { + height: auto; +} +.uneditable-input { + background-color: #ffffff; + display: block; + border-color: #eee; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +:-moz-placeholder { + color: #bfbfbf; +} +::-webkit-input-placeholder { + color: #bfbfbf; +} +input, textarea { + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -ms-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} +input:focus, textarea:focus { + outline: 0; + border-color: rgba(82, 168, 236, 0.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); +} +input[type=file]:focus, input[type=checkbox]:focus, select:focus { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + outline: 1px dotted #666; +} +form .clearfix.error > label, form .clearfix.error .help-block, form .clearfix.error .help-inline { + color: #b94a48; +} +form .clearfix.error input, form .clearfix.error textarea { + color: #b94a48; + border-color: #ee5f5b; +} +form .clearfix.error input:focus, form .clearfix.error textarea:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +form .clearfix.error .input-prepend .add-on, form .clearfix.error .input-append .add-on { + color: #b94a48; + background-color: #fce6e6; + border-color: #b94a48; +} +form .clearfix.warning > label, form .clearfix.warning .help-block, form .clearfix.warning .help-inline { + color: #c09853; +} +form .clearfix.warning input, form .clearfix.warning textarea { + color: #c09853; + border-color: #ccae64; +} +form .clearfix.warning input:focus, form .clearfix.warning textarea:focus { + border-color: #be9a3f; + -webkit-box-shadow: 0 0 6px #e5d6b1; + -moz-box-shadow: 0 0 6px #e5d6b1; + box-shadow: 0 0 6px #e5d6b1; +} +form .clearfix.warning .input-prepend .add-on, form .clearfix.warning .input-append .add-on { + color: #c09853; + background-color: #d2b877; + border-color: #c09853; +} +form .clearfix.success > label, form .clearfix.success .help-block, form .clearfix.success .help-inline { + color: #468847; +} +form .clearfix.success input, form .clearfix.success textarea { + color: #468847; + border-color: #57a957; +} +form .clearfix.success input:focus, form .clearfix.success textarea:focus { + border-color: #458845; + -webkit-box-shadow: 0 0 6px #9acc9a; + -moz-box-shadow: 0 0 6px #9acc9a; + box-shadow: 0 0 6px #9acc9a; +} +form .clearfix.success .input-prepend .add-on, form .clearfix.success .input-append .add-on { + color: #468847; + background-color: #bcddbc; + border-color: #468847; +} +.input-mini, +input.mini, +textarea.mini, +select.mini { + width: 60px; +} +.input-small, +input.small, +textarea.small, +select.small { + width: 90px; +} +.input-medium, +input.medium, +textarea.medium, +select.medium { + width: 150px; +} +.input-large, +input.large, +textarea.large, +select.large { + width: 210px; +} +.input-xlarge, +input.xlarge, +textarea.xlarge, +select.xlarge { + width: 270px; +} +.input-xxlarge, +input.xxlarge, +textarea.xxlarge, +select.xxlarge { + width: 530px; +} +textarea.xxlarge { + overflow-y: auto; +} +input.span1, textarea.span1 { + display: inline-block; + float: none; + width: 30px; + margin-left: 0; +} +input.span2, textarea.span2 { + display: inline-block; + float: none; + width: 90px; + margin-left: 0; +} +input.span3, textarea.span3 { + display: inline-block; + float: none; + width: 150px; + margin-left: 0; +} +input.span4, textarea.span4 { + display: inline-block; + float: none; + width: 210px; + margin-left: 0; +} +input.span5, textarea.span5 { + display: inline-block; + float: none; + width: 270px; + margin-left: 0; +} +input.span6, textarea.span6 { + display: inline-block; + float: none; + width: 330px; + margin-left: 0; +} +input.span7, textarea.span7 { + display: inline-block; + float: none; + width: 390px; + margin-left: 0; +} +input.span8, textarea.span8 { + display: inline-block; + float: none; + width: 450px; + margin-left: 0; +} +input.span9, textarea.span9 { + display: inline-block; + float: none; + width: 510px; + margin-left: 0; +} +input.span10, textarea.span10 { + display: inline-block; + float: none; + width: 570px; + margin-left: 0; +} +input.span11, textarea.span11 { + display: inline-block; + float: none; + width: 630px; + margin-left: 0; +} +input.span12, textarea.span12 { + display: inline-block; + float: none; + width: 690px; + margin-left: 0; +} +input.span13, textarea.span13 { + display: inline-block; + float: none; + width: 750px; + margin-left: 0; +} +input.span14, textarea.span14 { + display: inline-block; + float: none; + width: 810px; + margin-left: 0; +} +input.span15, textarea.span15 { + display: inline-block; + float: none; + width: 870px; + margin-left: 0; +} +input.span16, textarea.span16 { + display: inline-block; + float: none; + width: 930px; + margin-left: 0; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; + border-color: #ddd; + cursor: not-allowed; +} +.actions { + background: #f5f5f5; + margin-top: 18px; + margin-bottom: 18px; + padding: 17px 20px 18px 150px; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.actions .secondary-action { + float: right; +} +.actions .secondary-action a { + line-height: 30px; +} +.actions .secondary-action a:hover { + text-decoration: underline; +} +.help-inline, .help-block { + font-size: 13px; + line-height: 18px; + color: #bfbfbf; +} +.help-inline { + padding-left: 5px; + *position: relative; + /* IE6-7 */ + + *top: -5px; + /* IE6-7 */ + +} +.help-block { + display: block; + max-width: 600px; +} +.inline-inputs { + color: #808080; +} +.inline-inputs span { + padding: 0 2px 0 1px; +} +.input-prepend input, .input-append input { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend .add-on, .input-append .add-on { + position: relative; + background: #f5f5f5; + border: 1px solid #ccc; + z-index: 2; + float: left; + display: block; + width: auto; + min-width: 16px; + height: 18px; + padding: 4px 4px 4px 5px; + margin-right: -1px; + font-weight: normal; + line-height: 18px; + color: #bfbfbf; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + -webkit-border-radius: 3px ... [truncated message content] |
From: <ma...@us...> - 2012-01-30 22:48:10
|
Revision: 8844 http://xoops.svn.sourceforge.net/xoops/?rev=8844&view=rev Author: mageg Date: 2012-01-30 22:48:03 +0000 (Mon, 30 Jan 2012) Log Message: ----------- update of the core with the avatars plugin Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_custom.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_system.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_custom.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_system.png Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2012-01-30 22:46:09 UTC (rev 8843) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2012-01-30 22:48:03 UTC (rev 8844) @@ -241,6 +241,9 @@ } if ($op == 'avatarform') { + if (!$xoops->isActiveModule('avatars')) { + $xoops->redirect('index.php', 3, _NOPERM); + } $xoops->header(); echo '<a href="userinfo.php?uid=' . $xoops->user->getVar('uid') . '">' . _US_PROFILE . '</a> <span class="bold">»»</span> ' . _US_UPLOADMYAVATAR . '<br /><br />'; $oldavatar = $xoops->user->getVar('user_avatar'); @@ -248,12 +251,12 @@ echo '<div class="pad10 txtcenter floatcenter0"><h4 class="red bold">' . _US_OLDDELETED . '</h4>'; echo '<img src="' . XOOPS_UPLOAD_URL . '/' . $oldavatar . '" alt="" /></div>'; } - if ($xoopsConfigUser['avatar_allow_upload'] == 1 && $xoops->user->getVar('posts') >= $xoopsConfigUser['avatar_minposts']) { + if ($xoops->getModuleConfig('avatars_allowupload', 'avatars') == 1 && $xoops->user->getVar('posts') >= $xoops->getModuleConfig('avatars_postsrequired', 'avatars')) { $form = new XoopsThemeForm(_US_UPLOADMYAVATAR, 'uploadavatar', 'edituser.php', 'post', true); $form->setExtra('enctype="multipart/form-data"'); - $form->addElement(new XoopsFormLabel(_US_MAXPIXEL, $xoopsConfigUser['avatar_width'] . ' x ' . $xoopsConfigUser['avatar_height'])); - $form->addElement(new XoopsFormLabel(_US_MAXIMGSZ, $xoopsConfigUser['avatar_maxsize'])); - $form->addElement(new XoopsFormFile(_US_SELFILE, 'avatarfile', $xoopsConfigUser['avatar_maxsize']), true); + $form->addElement(new XoopsFormLabel(_US_MAXPIXEL, $xoops->getModuleConfig('avatars_imagewidth', 'avatars') . ' x ' . $xoops->getModuleConfig('avatars_imageheight', 'avatars'))); + $form->addElement(new XoopsFormLabel(_US_MAXIMGSZ, $xoops->getModuleConfig('avatars_imagefilesize', 'avatars'))); + $form->addElement(new XoopsFormFile(_US_SELFILE, 'avatarfile', $xoops->getModuleConfig('avatars_imagefilesize', 'avatars')), true); $form->addElement(new XoopsFormHidden('op', 'avatarupload')); $form->addElement(new XoopsFormHidden('uid', $xoops->user->getVar('uid'))); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); @@ -280,6 +283,9 @@ } if ($op == 'avatarupload') { + if (!$xoops->isActiveModule('avatars')) { + $xoops->redirect('index.php', 3, _NOPERM); + } if (!$xoops->security->check()) { $xoops->redirect('index.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $xoops->security->getErrors())); exit(); @@ -302,7 +308,7 @@ 'image/jpeg' , 'image/pjpeg' , 'image/x-png' , - 'image/png'), $xoopsConfigUser['avatar_maxsize'], $xoopsConfigUser['avatar_width'], $xoopsConfigUser['avatar_height']); + 'image/png'), $xoops->getModuleConfig('avatars_imagefilesize', 'avatars'), $xoops->getModuleConfig('avatars_imagewidth', 'avatars'), $xoops->getModuleConfig('avatars_imageheight', 'avatars')); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix('cavt'); if ($uploader->upload()) { @@ -339,6 +345,9 @@ } if ($op == 'avatarchoose') { + if (!$xoops->isActiveModule('avatars')) { + $xoops->redirect('index.php', 3, _NOPERM); + } if (!$xoops->security->check()) { $xoops->redirect('index.php', 3, _US_NOEDITRIGHT . "<br />" . implode('<br />', $xoops->security->getErrors())); exit(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-30 22:46:09 UTC (rev 8843) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/makedata.php 2012-01-30 22:48:03 UTC (rev 8844) @@ -173,10 +173,6 @@ $dbm->insert('config', " VALUES (21, 0, 2, 'activation_type', '_MD_AM_ACTVTYPE', '0', '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8)"); $dbm->insert('config', " VALUES (22, 0, 2, 'activation_group', '_MD_AM_ACTVGROUP', " . $gruops['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)"); $dbm->insert('config', " VALUES (23, 0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', '0', '_MD_AM_UNAMELVLDSC', 'select', 'int', 12)"); - $dbm->insert('config', " VALUES (24, 0, 2, 'avatar_allow_upload', '_MD_AM_AVATARALLOW', '0', '_MD_AM_AVATARALWDSC', 'yesno', 'int', 14)"); - $dbm->insert('config', " VALUES (27, 0, 2, 'avatar_width', '_MD_AM_AVATARW', '120', '_MD_AM_AVATARWDSC', 'textbox', 'int', 16)"); - $dbm->insert('config', " VALUES (28, 0, 2, 'avatar_height', '_MD_AM_AVATARH', '120', '_MD_AM_AVATARHDSC', 'textbox', 'int', 18)"); - $dbm->insert('config', " VALUES (29, 0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', '35000', '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20)"); $dbm->insert('config', " VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '" . addslashes($adminmail) . "', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); $dbm->insert('config', " VALUES (31, 0, 2, 'self_delete', '_MD_AM_SELFDELETE', '0', '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)"); $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'flat', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); @@ -193,7 +189,6 @@ $dbm->insert('config', " VALUES (43, 0, 3, 'meta_robots', '_MD_AM_METAROBOTS', 'index,follow', '_MD_AM_METAROBOTSDSC', 'select', 'text', 2)"); $dbm->insert('config', " VALUES (44, 0, 5, 'enable_search', '_MD_AM_DOSEARCH', '1', '_MD_AM_DOSEARCHDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (45, 0, 5, 'keyword_min', '_MD_AM_MINSEARCH', '5', '_MD_AM_MINSEARCHDSC', 'textbox', 'int', 1)"); - $dbm->insert('config', " VALUES (46, 0, 2, 'avatar_minposts', '_MD_AM_AVATARMP', '0', '_MD_AM_AVATARMPDSC', 'textbox', 'int', 15)"); $dbm->insert('config', " VALUES (47, 0, 1, 'enable_badips', '_MD_AM_DOBADIPS', '0', '_MD_AM_DOBADIPSDSC', 'yesno', 'int', 40)"); $dbm->insert('config', " VALUES (48, 0, 3, 'meta_rating', '_MD_AM_METARATING', 'general', '_MD_AM_METARATINGDSC', 'select', 'text', 4)"); $dbm->insert('config', " VALUES (49, 0, 3, 'meta_author', '_MD_AM_METAAUTHOR', 'XOOPS', '_MD_AM_METAAUTHORDSC', 'textbox', 'text', 6)"); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_custom.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_custom.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_system.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/16/avatar_system.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_custom.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_custom.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_system.png =================================================================== (Binary files differ) Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/images/icons/32/avatar_system.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-01-30 22:46:09 UTC (rev 8843) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/admin/preferences.php 2012-01-30 22:48:03 UTC (rev 8844) @@ -96,17 +96,6 @@ define("_MD_AM_ALLOWHTML", "Allow HTML tags in user comments?"); define("_MD_AM_DEBUGMODE", "Debug mode"); define("_MD_AM_DEBUGMODEDSC", "Several debug options. A running website should have this turned off."); -define("_MD_AM_AVATARALLOW", "Allow custom avatar upload?"); -define("_MD_AM_AVATARALWDSC", ""); -define("_MD_AM_AVATARMP", "Minimum posts required"); -define("_MD_AM_AVATARMPDSC", "Enter the minimum number of posts required to upload a custom avatar"); -define("_MD_AM_AVATARW", "Avatar image max width (pixel)"); -define("_MD_AM_AVATARWDSC", ""); -define("_MD_AM_AVATARH", "Avatar image max height (pixel)"); -define("_MD_AM_AVATARHDSC", ""); -define("_MD_AM_AVATARMAX", "Avatar image max filesize (byte)"); -define("_MD_AM_AVATARMAXDSC", ""); -define("_MD_AM_AVATARCONF", "Custom avatar settings"); define("_MD_AM_CHNGUTHEME", "Change all users' theme"); define("_MD_AM_NOTIFYTO", "Select group to which new user notification mail will be sent"); define("_MD_AM_NOTIFYTODSC", ""); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html 2012-01-30 22:46:09 UTC (rev 8843) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_userinfo.html 2012-01-30 22:48:03 UTC (rev 8844) @@ -7,7 +7,9 @@ <table class="width70 aligncenter bnone"> <tr class="txtcenter"> <td><input type="button" value="<{$lang_editprofile}>" onclick="location='edituser.php'" /> + <{if $avatars == true}> <input type="button" value="<{$lang_avatar}>" onclick="location='edituser.php?op=avatarform'" /> + <{/if}> <input type="button" value="<{$lang_inbox}>" onclick="location='viewpmsg.php'" /> <{if $user_candelete == true}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2012-01-30 22:46:09 UTC (rev 8843) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2012-01-30 22:48:03 UTC (rev 8844) @@ -78,6 +78,12 @@ $xoops->tpl->assign('user_uid', $thisUser->getVar('uid')); } +if ($xoops->isActiveModule('avatars')) { + $xoops->tpl->assign('avatars', true); +}else{ + $xoops->tpl->assign('avatars', false); +} + $xoops->tpl->assign('xoops_pagetitle', sprintf(_US_ALLABOUT, $thisUser->getVar('uname'))); $xoops->tpl->assign('lang_allaboutuser', sprintf(_US_ALLABOUT, $thisUser->getVar('uname'))); $xoops->tpl->assign('lang_avatar', _US_AVATAR); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |