コード例 #1
0
ファイル: main.php プロジェクト: RanLee/XoopsCore
function b_system_main_edit($options)
{
    $xoops = Xoops::getInstance();
    $system = System::getInstance();
    $system_module = new SystemModule();
    $admin_page = new \Xoops\Module\Admin();
    // Define Stylesheet
    $xoops->theme()->addStylesheet('media/xoops/css/icons.css');
    $xoops->theme()->addStylesheet('modules/system/css/admin.css');
    // Define scripts
    $xoops->theme()->addScript('media/jquery/plugins/jquery.jeditable.js');
    $xoops->theme()->addScript('modules/system/js/module.js');
    $admin_page->addTips(SystemLocale::MENU_TIPS);
    $admin_page->renderTips();
    $list = $system_module->getModuleList();
    $xoops->tpl()->assign('modules_list', $list);
    return $xoops->tpl()->fetch('admin:system/system_modules_menu.tpl');
}
コード例 #2
0
ファイル: content.php プロジェクト: ming-hai/XoopsCore
*/
use Xoops\Core\Request;
/**
 * page module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         page
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
// Call header
$xoops->header('admin:page/page_admin_content.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('content.php');
switch ($op) {
    case 'list':
    default:
        $admin_page->addTips(PageLocale::CONTENT_TIPS);
        $admin_page->addItemButton(PageLocale::A_ADD_CONTENT, 'content.php?op=new', 'add');
        $admin_page->renderTips();
        $admin_page->renderButton();
        // Content
        $content_count = $content_Handler->countPage();
        $content_arr = $content_Handler->getPage($start, $nb_limit);
        // Assign Template variables
        $xoops->tpl()->assign('content_count', $content_count);
        if ($content_count > 0) {
            foreach (array_keys($content_arr) as $i) {
コード例 #3
0
ファイル: avatar_custom.php プロジェクト: ming-hai/XoopsCore
$helper = Avatars::getInstance();
$xoops_upload_path = \XoopsBaseConfig::get('uploads-path');
$xoops_upload_url = \XoopsBaseConfig::get('uploads-url');
// Get avatar handler
$avatar_Handler = $helper->getHandlerAvatar();
// Parameters
$nb_avatars = $helper->getConfig('avatars_pager');
$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
$upload_size = $helper->getConfig('avatars_imagefilesize');
$width = $helper->getConfig('avatars_imagewidth');
$height = $helper->getConfig('avatars_imageheight');
// Get Action type
$op = Request::getCmd('op', 'list');
// Call Header
$xoops->header('admin:avatars/avatars_admin_custom.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('avatar_custom.php');
$info_msg = array(sprintf(AvatarsLocale::ALERT_INFO_MIMETYPES, implode(", ", $mimetypes)), sprintf(AvatarsLocale::ALERT_INFO_MAXFILE, $upload_size / 1000), sprintf(AvatarsLocale::ALERT_INFO_PIXELS, $width, $height));
switch ($op) {
    case 'list':
    default:
        // Add Scripts
        $xoops->theme()->addScript('media/xoops/xoops.js');
        // Define Stylesheet
        $xoops->theme()->addStylesheet('modules/avatars/css/admin.css');
        $admin_page->addTips(AvatarsLocale::CUSTOM_TIPS);
        $admin_page->renderTips();
        // Get start pager
        $start = Request::getInt('start', 0);
        // Filter avatars
        $criteria = new Criteria('avatar_type', 'C');
コード例 #4
0
ファイル: avatar_system.php プロジェクト: ming-hai/XoopsCore
$helper = Avatars::getInstance();
$xoops_upload_path = \XoopsBaseConfig::get('uploads-path');
$xoops_upload_url = \XoopsBaseConfig::get('uploads-url');
// Parameters
$nb_avatars = $helper->getConfig('avatars_pager');
$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
$upload_size = $helper->getConfig('avatars_imagefilesize');
$width = $helper->getConfig('avatars_imagewidth');
$height = $helper->getConfig('avatars_imageheight');
// Get Action type
$op = Request::getCmd('op', 'list');
// Get avatar handler
$avatar_Handler = $helper->getHandlerAvatar();
// Call Header
$xoops->header('admin:avatars/avatars_admin_system.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('avatar_system.php');
$info_msg = array(sprintf(AvatarsLocale::ALERT_INFO_MIMETYPES, implode(", ", $mimetypes)), sprintf(AvatarsLocale::ALERT_INFO_MAXFILE, $upload_size / 1000), sprintf(AvatarsLocale::ALERT_INFO_PIXELS, $width, $height));
switch ($op) {
    case 'list':
    default:
        // Add Scripts
        $xoops->theme()->addScript('media/xoops/xoops.js');
        // Define Stylesheet
        $xoops->theme()->addStylesheet('modules/avatars/css/admin.css');
        $admin_page->addTips(AvatarsLocale::SYSTEM_TIPS);
        $admin_page->addItemButton(XoopsLocale::A_ADD, 'avatar_system.php?op=new', 'add');
        $admin_page->renderTips();
        $admin_page->renderButton();
        // Get start pager
        $start = Request::getInt('start', 0);
コード例 #5
0
ファイル: main.php プロジェクト: redmexico/XoopsCore
$xoops->theme()->addBaseScriptAssets(array('@jquery', '@jqueryui'));
$xoops->theme()->addScript('media/jquery/plugins/jquery.easing.js');
$xoops->theme()->addScript('media/jquery/plugins/jqueryFileTree.js');
$xoops->theme()->addScript('modules/system/js/admin.js');
$xoops->theme()->addScript('modules/system/js/templates.js');
$xoops->theme()->addScript('modules/system/js/code_mirror/codemirror.js');
// Define Stylesheet
$xoops->theme()->addStylesheet('modules/system/css/admin.css');
$xoops->theme()->addStylesheet('modules/system/css/code_mirror/docs.css');
// Define Breadcrumb and tips
$system_breadcrumb->addLink(SystemLocale::TEMPLATES_MANAGER, system_adminVersion('tplsets', 'adminpath'));
switch ($op) {
    //index
    default:
        // Define Breadcrumb and tips
        $admin_page = new \Xoops\Module\Admin();
        $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
        $admin_page->addBreadcrumbLink(SystemLocale::TEMPLATES_MANAGER, $system->adminVersion('tplsets', 'adminpath'));
        $admin_page->renderBreadcrumb();
        $admin_page->addTips(SystemLocale::TEMPLATES_TIPS);
        $admin_page->renderTips();
        $xoops->tpl()->assign('index', true);
        $form = new Xoops\Form\ThemeForm(SystemLocale::TEMPLATE_OVERLOADED, "form", 'admin.php?fct=tplsets', "post", true);
        $ele = new Xoops\Form\Select(SystemLocale::CHOOSE_TEMPLATE, 'tplset', $xoops->getConfig('tplset'));
        $tplset_handler = $xoops->getHandlerTplSet();
        $tplsetlist = $tplset_handler->getNameList();
        asort($tplsetlist);
        foreach ($tplsetlist as $key => $name) {
            $ele->addOption($key, $name);
        }
        $form->addElement($ele);
コード例 #6
0
ファイル: main.php プロジェクト: redmexico/XoopsCore
     $form->addElement($mailok_radio);
     $form->addElement($type_radio);
     $form->addElement($sort_select);
     $form->addElement($order_select);
     $form->addElement($limit_text);
     // if this is to find users for a specific group
     if (!empty($_GET['group']) && (int) $_GET['group'] > 0) {
         $group_hidden = new Xoops\Form\Hidden("group", (int) $_GET['group']);
         $form->addElement($group_hidden);
     }
     $form->addElement($submit_button);
     $form->display();
 } else {
     //Display data
     // Assign Breadcrumb menu
     $admin_page = new \Xoops\Module\Admin();
     $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
     $admin_page->addBreadcrumbLink(SystemLocale::USERS_MANAGEMENT, $system->adminVersion('users', 'adminpath'));
     $admin_page->addBreadcrumbLink(XoopsLocale::LIST_);
     $admin_page->renderBreadcrumb();
     $admin_page->addTips(SystemLocale::USERS_TIPS);
     $admin_page->renderTips();
     $admin_page->addItemButton(XoopsLocale::A_SYNCHRONIZE, 'admin.php?fct=users&op=users_synchronize&status=2', 'arrow-rotate-anticlockwise');
     $admin_page->addItemButton(SystemLocale::ADD_USER, 'admin.php?fct=users&op=users_add', 'add');
     $admin_page->renderButton();
     $requete_search = '<br /><br /><strong>' . SystemLocale::C_SEE_SEARCH_REQUEST . '</strong><br /><br />';
     $requete_pagenav = '';
     $criteria = new CriteriaCompo();
     $value = Request::getString('user_uname', '');
     if (!empty($value)) {
         $match = Request::getInt('user_uname_match', XOOPS_MATCH_START);
コード例 #7
0
ファイル: center.php プロジェクト: mambax7/protector-26
                        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("center.php", 2, _AM_MSG_REMOVED);
                }
            }
        }
    }
}
// beggining of Output
$xoops->header('admin:protector/protector_center.html');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('center.php');
// 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);
コード例 #8
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
 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       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         protector
 * @author          trabis <*****@*****.**>
 * @version         $Id$
 */
include_once __DIR__ . '/header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$xoops->db();
global $xoopsDB;
$db = $xoopsDB;
$db->prefix('protector_log');
$rs = $db->query("SELECT count(lid) FROM " . $db->prefix('protector_log'));
list($numrows) = $db->fetchRow($rs);
$indexAdmin = new \Xoops\Module\Admin();
$indexAdmin->displayNavigation('index.php');
$indexAdmin->addInfoBox(_MI_PROTECTOR_ADMININDEX, 'off');
$indexAdmin->addInfoBoxLine(sprintf(_AM_PROTECTOR_NBALERT, '<span class="red">' . $numrows . '</span>'), 'off');
$indexAdmin->displayIndex();
$xoops->footer();
コード例 #9
0
ファイル: security.php プロジェクト: geekwright/composertool
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.
*/
use Xmf\FilterInput;
/**
 * @copyright 2015-2016 XOOPS Project (http://xoops.org)
 * @license   GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author    Richard Griffith <*****@*****.**>
 */
require __DIR__ . '/admin_header.php';
$indexAdmin = new \Xoops\Module\Admin();
$indexAdmin->displayNavigation('security.php');
$checker = new \SensioLabs\Security\SecurityChecker();
try {
    $alerts = $checker->check(XOOPS_PATH . '/composer.lock', 'text');
    $alertCount = $checker->getLastVulnerabilityCount();
    if ($alertCount == 0) {
        echo $xoops->alert('info', 'No issues detected', 'Security Advisories Checker');
    } else {
        foreach ($alerts as $package => $alert) {
            $body = "Version: {$alert['version']}<br><br>";
            foreach ($alert['advisories'] as $adv) {
                $title = FilterInput::clean($adv['title']);
                $cve = FilterInput::clean($adv['cve']);
                $link = FilterInput::clean($adv['link']);
                $body .= "{$title}<br>" . (empty($cve) ? '' : "CVE: {$cve}<br>") . "<a href=\"{$link}\" rel=\"external\">{$link}</a><br><br>";
コード例 #10
0
ファイル: main.php プロジェクト: redmexico/XoopsCore
                 $blockperm->setVar('gperm_name', 'block_read');
                 $blockperm->setVar('gperm_modid', 1);
                 $gperm_handler->insert($blockperm);
             }
             $xoops->db()->commit();
             $xoops->redirect("admin.php?fct=groups", 1, XoopsLocale::S_DATABASE_UPDATED);
         }
     } else {
         $xoops->redirect('admin.php?fct=groups', 1, XoopsLocale::E_DATABASE_NOT_UPDATED);
     }
     break;
     //Del a group
 //Del a group
 case 'groups_delete':
     // Define Breadcrumb and tips
     $admin_page = new \Xoops\Module\Admin();
     $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
     $admin_page->addBreadcrumbLink(SystemLocale::GROUPS_MANAGER, $system->adminVersion('groups', 'adminpath'));
     $admin_page->addBreadcrumbLink(SystemLocale::DELETE_GROUP);
     $admin_page->renderBreadcrumb();
     $groups_id = $system->cleanVars($_REQUEST, 'groups_id', 0, 'int');
     if ($groups_id > 0) {
         $obj = $groups_handler->get($groups_id);
         if (isset($_POST["ok"]) && $_POST["ok"] == 1) {
             if (!$xoops->security()->check()) {
                 $xoops->redirect("admin.php?fct=groups", 3, implode(",", $xoops->security()->getErrors()));
             }
             if ($groups_id > 0 && !in_array($groups_id, array(FixedGroups::ADMIN, FixedGroups::USERS, FixedGroups::ANONYMOUS))) {
                 $member_handler = $xoops->getHandlerMember();
                 $group = $member_handler->getGroup($groups_id);
                 $member_handler->deleteGroup($group);
コード例 #11
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
<?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.
*/
/**
 * avatars module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         avatar
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('index.php');
$admin_page->displayIndex();
$xoops->footer();
コード例 #12
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
// total avatars system
$avatars_total_s = $avatars_notdisplay_s + $avatars_display_s;
// avatars not display custom
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('avatar_display', 0));
$criteria->add(new Criteria('avatar_type', 'C'));
$avatars_notdisplay_c = $avatar_Handler->getCount($criteria);
// avatars display custom
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('avatar_display', 0, '!='));
$criteria->add(new Criteria('avatar_type', 'C'));
$avatars_display_c = $avatar_Handler->getCount($criteria);
// total avatars custom
$avatars_total_c = $avatars_notdisplay_c + $avatars_display_c;
// folder path
$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/avatars';
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('index.php');
$admin_page->addInfoBox(AvatarsLocale::SYSTEM, 'avatar_system');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_S, $avatars_total_s), 'avatar_system');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_S, '<span class="green">' . $avatars_display_s . '</span>'), 'avatar_system');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_S, '<span class="red">' . $avatars_notdisplay_s . '</span>'), 'avatar_system');
$admin_page->addInfoBox(AvatarsLocale::CUSTOM, 'avatar_custom');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBTOTAL_C, $avatars_total_c), 'avatar_custom');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBDISPLAY_C, '<span class="green">' . $avatars_display_c . '</span>'), 'avatar_custom');
$admin_page->addInfoBoxLine(sprintf(AvatarsLocale::NBNOTDISPLAY_C, '<span class="red">' . $avatars_notdisplay_c . '</span>'), 'avatar_custom');
$admin_page->addConfigBoxLine($folder_path, 'folder');
$admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod');
$admin_page->addConfigBoxLine('thumbnail', 'service');
$admin_page->displayIndex();
$xoops->footer();
コード例 #13
0
ファイル: banners.php プロジェクト: ming-hai/XoopsCore
$xoops_url = \XoopsBaseConfig::get('url');
// Parameters
$nb_banners = $helper->getConfig('banners_pager');
$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png', 'application/x-shockwave-flash');
$upload_size = 500000;
// Get Action type
$op = Request::getCmd('op', 'list');
// Get handler
$banner_Handler = $helper->getHandlerBanner();
$client_Handler = $helper->getHandlerBannerclient();
// Call header
$xoops->header('admin:banners/banners_admin_banners.tpl');
// Get start pager
$start = Request::getInt('start', 0);
$startF = Request::getInt('startF', 0);
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('banners.php');
$info_msg = array(sprintf(_AM_BANNERS_ALERT_INFO_MIMETYPES, implode(", ", $mimetypes)), sprintf(_AM_BANNERS_ALERT_INFO_MAXFILE, $upload_size / 1000));
switch ($op) {
    case 'list':
    default:
        // Define Stylesheet
        $xoops->theme()->addBaseStylesheetAssets('@jqueryuicss');
        // Define scripts
        $xoops->theme()->addBaseScriptAssets(array('@jqueryui', 'modules/system/js/admin.js'));
        $admin_page->addTips(_AM_BANNERS_TIPS_BANNERS);
        $admin_page->addItemButton(_AM_BANNERS_BANNERS_ADD, 'banners.php?op=new', 'add');
        $admin_page->renderTips();
        if ($client_Handler->getCount() == 0) {
            echo $xoops->alert('error', _AM_BANNERS_BANNERS_ERROR_NOCLIENT);
        } else {
コード例 #14
0
ファイル: index.php プロジェクト: redmexico/XoopsCore
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
 * maintenance extensions
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         maintenance
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage), Cointin Maxime (AKA Kraven30)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('index.php');
// folder path
$folder_path = \XoopsBaseConfig::get('root-path') . '/modules/maintenance/dump';
// files
$files = glob(\XoopsBaseConfig::get('root-path') . '/modules/maintenance/dump/*.*');
$count = 0;
foreach ($files as $filename_path) {
    if (basename(strtolower($filename_path)) != 'index.html') {
        ++$count;
    }
}
$admin_page->addConfigBoxLine($folder_path, 'folder');
$admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod');
$admin_page->addInfoBox(_MI_MAINTENANCE_DUMP);
$admin_page->addInfoBoxLine(sprintf(_AM_MAINTENANCE_NBFILES, $count));
コード例 #15
0
ファイル: admin.php プロジェクト: RanLee/XoopsCore
         if ($conf->getVar('conf_name') == 'active_' . $part) {
             $conf->setVar('conf_value', !$conf->getVar('conf_value'));
             $config_handler->insertConfig($conf);
         }
     }
     exit;
 }
 // Define main template
 $xoops->header('admin:system/system_index.tpl');
 // Define Stylesheet
 $xoops->theme()->addStylesheet('modules/system/css/admin.css');
 // Define scripts
 $xoops->theme()->addBaseScriptAssets('@jquery.');
 $xoops->theme()->addBaseScriptAssets('modules/system/js/admin.js');
 // Define Breadcrumb and tips
 $admin_page = new \Xoops\Module\Admin();
 $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
 $admin_page->addBreadcrumbLink(SystemLocale::SYSTEM_CONFIGURATION);
 $admin_page->renderBreadcrumb();
 $admin_page->addTips(SystemLocale::TIPS_MAIN);
 $admin_page->renderTips();
 $groups = $xoopsUser->getGroups();
 $all_ok = false;
 if (!in_array(FixedGroups::ADMIN, $groups)) {
     $sysperm_handler = $xoops->getHandlerGroupperm();
     $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups);
 } else {
     $all_ok = true;
 }
 $admin_dir = \XoopsBaseConfig::get('root-path') . '/modules/system/admin';
 $dirlist = XoopsLists::getDirListAsArray($admin_dir);
コード例 #16
0
ファイル: permissions.php プロジェクト: ming-hai/XoopsCore
/**
 * page module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         page
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
// Get Action type
$op = Request::getString('op', 'global');
// Call header
$xoops->header('admin:page/page_admin_permissions.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('permissions.php');
$opform = new Xoops\Form\SimpleForm('', 'opform', 'permissions.php', 'get');
$op_select = new Xoops\Form\Select('', 'op', $op);
$op_select->setExtra('onchange="document.forms.opform.submit()"');
$op_select->addOption('global', PageLocale::PERMISSIONS_RATE);
$op_select->addOption('view', PageLocale::PERMISSIONS_VIEW);
$opform->addElement($op_select);
$xoops->tpl()->assign('form', $opform->render());
switch ($op) {
    case 'global':
    default:
        $global_perm_array = array('1' => PageLocale::PERMISSIONS_RATE);
        $form = new Xoops\Form\GroupPermissionForm('', $module_id, 'page_global', '', 'admin/permissions.php', true);
        foreach ($global_perm_array as $perm_id => $perm_name) {
            $form->addItem($perm_id, $perm_name);
コード例 #17
0
ファイル: related.php プロジェクト: ming-hai/XoopsCore
*/
use Xoops\Core\Request;
/**
 * page module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         page
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
// Call header
$xoops->header('admin:page/page_admin_related.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('related.php');
switch ($op) {
    case 'list':
    default:
        $admin_page->addTips(PageLocale::RELATED_TIPS);
        $admin_page->addItemButton(PageLocale::A_ADD_RELATED, 'related.php?op=new', 'add');
        $admin_page->renderTips();
        $admin_page->renderButton();
        $related_count = $related_Handler->countRelated($start, $nb_limit);
        $related_arr = $related_Handler->getRelated($start, $nb_limit);
        $xoops->tpl()->assign('related_count', $related_count);
        $xoops->tpl()->assign('related', $related_arr);
        if ($related_count > 0) {
            // Display Page Navigation
            if ($related_count > $nb_limit) {
コード例 #18
0
ファイル: about.php プロジェクト: ming-hai/XoopsCore
<?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.
*/
/**
 * User Rank module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         userrank
 * @since           2.6.0
 * @author          Cointin Maxime (AKA Kraven30)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('about.php');
$admin_page->displayAbout(true);
$xoops->footer();
コード例 #19
0
ファイル: userrank.php プロジェクト: RanLee/XoopsCore
 */
include __DIR__ . '/header.php';
// Get main instance
$system = System::getInstance();
$xoops = Xoops::getInstance();
// Parameters
$nb_rank = $xoops->getModuleConfig('admin:userrank/userrank_pager');
$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
$upload_size = 500000;
// Get Action type
$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string');
// Get userrank handler
$userrank_Handler = $xoops->getHandler("ranks");
// Call Header
$xoops->header('admin:userrank/userrank.tpl');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('userrank.php');
switch ($op) {
    case 'list':
    default:
        // Add Scripts
        $xoops->theme()->addScript('media/xoops/xoops.js');
        $admin_page->addTips(_AM_USERRANK_TIPS);
        $admin_page->addItemButton(_AM_USERRANK_ADD, './userrank.php?op=userrank_new', 'add');
        $admin_page->renderTips();
        $admin_page->renderButton();
        // Get start pager
        $start = $system->cleanVars($_REQUEST, 'start', 0, 'int');
        // Criteria
        $criteria = new CriteriaCompo();
        $criteria->setSort("rank_id");
コード例 #20
0
ファイル: main.php プロジェクト: dazzlesoftware/XoopsCore
 case 'showmod':
     $mod = $system->cleanVars($_GET, 'mod', 1, 'int');
     if (!$mod) {
         $xoops->redirect('admin.php?fct=preferences', 1);
     }
     $config_handler = $xoops->getHandlerConfig();
     $config = $config_handler->getConfigs(new Criteria('conf_modid', $mod));
     $count = count($config);
     if ($count < 1) {
         $xoops->redirect('admin.php?fct=preferences', 1);
     }
     $module_handler = $xoops->getHandlerModule();
     $module = $xoops->getModuleById($mod);
     $xoops->loadLanguage('modinfo', $module->getVar('dirname'));
     // Define Breadcrumb and tips
     $admin_page = new \Xoops\Module\Admin();
     $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
     $admin_page->addBreadcrumbLink(XoopsLocale::PREFERENCES, $system->adminVersion('extensions', 'adminpath'));
     $admin_page->addBreadcrumbLink($module->getVar('name'));
     $admin_page->renderBreadcrumb();
     /* @var $form SystemPreferencesForm */
     $form = $xoops->getModuleForm(null, 'preferences');
     $form->getForm($config, $module);
     $xoops->tpl()->assign('form', $form->render());
     break;
 case 'save':
     if (!$xoops->security()->check()) {
         $xoops->redirect("admin.php?fct=preferences", 3, implode('<br />', $xoops->security()->getErrors()));
     }
     $xoopsTpl = new XoopsTpl();
     $count = count($conf_ids);
コード例 #21
0
ファイル: index.php プロジェクト: geekwright/composertool
<?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.
*/
/**
 * @copyright 2015-2016 XOOPS Project (http://xoops.org)
 * @license   GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author    Richard Griffith <*****@*****.**>
 */
require __DIR__ . '/admin_header.php';
$indexAdmin = new \Xoops\Module\Admin();
$indexAdmin->displayNavigation('index.php');
$max_time = ini_get('max_execution_time');
$indexAdmin->addConfigBoxLine(sprintf('For full function, max_execution_time should be at least 120. (Currently %d)', $max_time), $max_time < 120 ? 'warning' : 'accept');
$indexAdmin->displayIndex();
$xoops->footer();
コード例 #22
0
ファイル: main.php プロジェクト: redmexico/XoopsCore
     //Set active modules in cache folder
     $xoops->setActiveModules();
     // Call Footer
     $xoops->footer();
     break;
 case 'update':
     $mid = $system->cleanVars($_POST, 'mid', 0, 'int');
     $module_handler = $xoops->getHandlerModule();
     $block_handler = $xoops->getHandlerBlock();
     $module = $module_handler->getById($mid);
     // Call Header
     $xoops->header('admin:system/system_modules_logger.tpl');
     // Define Stylesheet
     $xoops->theme()->addStylesheet('modules/system/css/admin.css');
     // Define Breadcrumb and tips
     $admin_page = new \Xoops\Module\Admin();
     $admin_page->addBreadcrumbLink(SystemLocale::CONTROL_PANEL, \XoopsBaseConfig::get('url') . '/admin.php', true);
     $admin_page->addBreadcrumbLink(SystemLocale::MODULES_ADMINISTRATION, $system->adminVersion('modulesadmin', 'adminpath'));
     $admin_page->addBreadcrumbLink(XoopsLocale::A_UPDATE);
     $admin_page->renderBreadcrumb();
     $ret = array();
     $system_module = new SystemModule();
     $ret = $system_module->update($module->getVar('dirname'));
     $xoops->tpl()->assign('module', $ret);
     if ($ret) {
         $xoops->tpl()->assign('install', 1);
         $xoops->tpl()->assign('from_title', SystemLocale::MODULES_ADMINISTRATION);
         $xoops->tpl()->assign('from_link', $system->adminVersion('modulesadmin', 'adminpath'));
         $xoops->tpl()->assign('title', XoopsLocale::A_UPDATE);
         $xoops->tpl()->assign('log', $system_module->trace);
     }
コード例 #23
0
ファイル: about.php プロジェクト: ming-hai/XoopsCore
<?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.
*/
/**
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author          Richard Griffith <*****@*****.**>
 * @version         $Id: about.php 8065 2011-11-06 02:02:32Z beckmi $
 */
require __DIR__ . '/admin_header.php';
$aboutAdmin = new \Xoops\Module\Admin();
$aboutAdmin->displayNavigation('about.php');
$aboutAdmin->displayAbout(true);
require __DIR__ . '/admin_footer.php';
コード例 #24
0
ファイル: visibility.php プロジェクト: RanLee/XoopsCore
 * @author          Jan Pedersen
 * @author          Taiwen Jiang <*****@*****.**>
 * @version         $Id$
 */
include __DIR__ . '/header.php';
// Get main instance
$system = System::getInstance();
$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";
// Get Action type
$op = $system->cleanVars($_REQUEST, 'op', 'visibility', 'string');
// Call header
$xoops->header();
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('permissions.php');
$visibility_handler = $xoops->getModuleHandler('visibility');
$field_handler = $xoops->getModuleHandler('field');
$fields = $field_handler->getList();
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));
}
if ($op == "del") {
    $criteria = new CriteriaCompo(new Criteria('field_id', (int) $_REQUEST['field_id']));
    $criteria->add(new Criteria('user_group', (int) $_REQUEST['ug']));
コード例 #25
0
ファイル: advisory.php プロジェクト: ming-hai/XoopsCore
/**
 * Protector
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         protector
 * @author          trabis <*****@*****.**>
 * @version         $Id$
 */
include_once __DIR__ . '/header.php';
$xoops->db();
global $xoopsDB;
$db = $xoopsDB;
// Call header
$xoops->header('admin:protector/protector_advisory.html');
$admin_page = new \Xoops\Module\Admin();
$admin_page->renderNavigation('advisory.php');
// Define scripts
$xoops->theme()->addScript('modules/system/js/admin.js');
$i = 0;
// XOOPS_ROOT_PATH
// calculate the relative path between XOOPS_ROOT_PATH and XOOPS_TRUST_PATH
$root_paths = explode('/', \XoopsBaseConfig::get('root-path'));
$trust_paths = explode('/', \XoopsBaseConfig::get('trust-path'));
foreach ($root_paths as $i => $rpath) {
    if ($rpath != $trust_paths[$i]) {
        break;
    }
}
$relative_path = str_repeat('../', count($root_paths) - $i) . implode('/', array_slice($trust_paths, $i));
$security_arr[$i]['id'] = $i + 1;
コード例 #26
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
<?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.
*/
/**
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author          Richard Griffith <*****@*****.**>
 * @version         $Id: about.php 8065 2011-11-06 02:02:32Z beckmi $
 */
require __DIR__ . '/admin_header.php';
$indexAdmin = new \Xoops\Module\Admin();
$indexAdmin->displayNavigation('index.php');
$indexAdmin->displayIndex();
require __DIR__ . '/admin_footer.php';
コード例 #27
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
 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.
*/
/**
 * smiles module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         smilies
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
$xoops->header();
// folder path
$folder_path = \XoopsBaseConfig::get('root-path') . '/uploads/images';
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('index.php');
$admin_page->addInfoBox(_MI_IMAGES_IMAGES);
$admin_page->addInfoBoxLine(sprintf(_AM_IMAGES_NBCAT, $helper->getHandlerCategories()->getCount()));
$admin_page->addInfoBoxLine(sprintf(_AM_IMAGES_NBIMAGES, $helper->getHandlerImages()->getCount()));
$admin_page->addConfigBoxLine($folder_path, 'folder');
$admin_page->addConfigBoxLine(array($folder_path, '777'), 'chmod');
$admin_page->addConfigBoxLine('thumbnail', 'service');
$admin_page->displayIndex();
$xoops->footer();
コード例 #28
0
ファイル: main.php プロジェクト: RanLee/XoopsCore
        } else {
            $xoops->redirect('admin.php?fct=blocksadmin', 1, XoopsLocale::E_DATABASE_NOT_UPDATED);
        }
        break;
    case 'clone':
        // Initialize blocks handler
        $block_handler = $xoops->getHandlerBlock();
        // Get avatar id
        $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int');
        if ($block_id > 0) {
            // Call Header
            $xoops->header('admin:system/system_blocks.tpl');
            // Define Stylesheet
            $xoops->theme()->addStylesheet('modules/system/css/admin.css');
            // Define Breadcrumb and tips
            $system_breadcrumb = new \Xoops\Module\Admin();
            $system_breadcrumb->addBreadcrumbLink(SystemLocale::BLOCKS_ADMINISTRATION, system_adminVersion('blocksadmin', 'adminpath'));
            $system_breadcrumb->addBreadcrumbLink(SystemLocale::CLONE_BLOCK);
            $system_breadcrumb->renderBreadcrumb();
            $block = $block_handler->get($block_id);
            /* @var $form SystemBlockForm */
            $form = $xoops->getModuleForm($block, 'block');
            $form->getForm('clone');
            $form->display();
            // Call Footer
            $xoops->footer();
        } else {
            $xoops->redirect('admin.php?fct=blocksadmin', 1, XoopsLocale::E_DATABASE_NOT_UPDATED);
        }
        break;
}
コード例 #29
0
ファイル: index.php プロジェクト: ming-hai/XoopsCore
 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.
*/
/**
 * User Rank module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         userrank
 * @since           2.6.0
 * @author          Cointin Maxime (AKA Kraven30)
 * @version         $Id$
 */
include __DIR__ . '/header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$admin_page = new \Xoops\Module\Admin();
$admin_page->displayNavigation('index.php');
$userrank_handler = $xoops->getModuleHandler('rank', 'userrank');
$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->displayIndex();
$xoops->footer();
コード例 #30
0
ファイル: index.php プロジェクト: jlm69/alumni-26x
/**
 * Alumni module for Xoops
 *
 * @copyright       XOOPS Project http://xoops.org/
 * @license         GPL 2.0 or later
 * @package         alumni
 * @since           2.6.x
 * @author          John Mordo (jlm69)
 */
include __DIR__ . '/admin_header.php';
$xoops = Xoops::getInstance();
$xoops->header();
$listingHandler = $xoops->getModuleHandler('listing', 'alumni');
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('valid', 1));
$listing_valid = $listingHandler->getCount($criteria);
$moderateCriteria = new CriteriaCompo();
$moderateCriteria->add(new Criteria('valid', 0, '='));
$moderate_count = $listingHandler->getCount($moderateCriteria);
$indexAdmin = new \Xoops\Module\Admin();
$indexAdmin->displayNavigation('index.php');
$indexAdmin->addInfoBox(AlumniLocale::LISTINGS, 'listing');
$indexAdmin->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_LISTINGS, $moderate_count + $listing_valid), 'listing');
$indexAdmin->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_VALID, $listing_valid), 'listing');
$indexAdmin->addInfoBoxLine(sprintf(AlumniLocale::TOTAL_NOT_VALID, $moderate_count), 'listing');
$extensions = array('comments' => 'extension', 'notifications' => 'extension', 'xcaptcha' => 'extension');
foreach ($extensions as $module => $type) {
    $indexAdmin->addConfigBoxLine(array($module, 'warning'), $type);
}
$indexAdmin->displayIndex();
$xoops->footer();