Skip to content

Commit

Permalink
Merge pull request #3 from mambax7/master
Browse files Browse the repository at this point in the history
2.01 RC-1
  • Loading branch information
mambax7 committed Apr 1, 2016
2 parents e02e48f + a0e0184 commit b60369e
Show file tree
Hide file tree
Showing 154 changed files with 6,228 additions and 5,616 deletions.
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

339 changes: 0 additions & 339 deletions LICENSE

This file was deleted.

31 changes: 23 additions & 8 deletions admin/about.php
@@ -1,14 +1,29 @@
<?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.
*/

/**
* $Id: about.php 9889 2012-07-16 12:08:42Z beckmi $
* Module: SmartPartner
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
*/

include_once("admin_header.php");
include_once __DIR__ . '/admin_header.php';

xoops_cp_header();

$aboutAdmin = new ModuleAdmin();

echo $aboutAdmin->addNavigation(basename(__FILE__));
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);

include_once(SMARTOBJECT_ROOT_PATH . "class/smartobjectabout.php");
$aboutObj = new SmartobjectAbout();
$aboutObj->render();
include_once __DIR__ . '/admin_footer.php';
101 changes: 50 additions & 51 deletions admin/admin.php
@@ -1,9 +1,9 @@
<?php
// $Id: admin.php 9889 2012-07-16 12:08:42Z beckmi $
//
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <http://www.xoops.org/> //
// Copyright (c) 2000-2016 XOOPS.org //
// <http://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 //
Expand All @@ -25,66 +25,65 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu) //
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project //
// URL: http://www.myweb.ne.jp/, http://xoops.org/, http://jp.xoops.org/ //
// Project: XOOPS Project //
// ------------------------------------------------------------------------- //

$admin_mydirname = basename(dirname(dirname(__FILE__)));
$admin_mydirname = basename(dirname(__DIR__));

$fct = empty($_POST['fct']) ? '' : trim($_POST['fct']);
$fct = empty($_GET['fct']) ? $fct : trim($_GET['fct']);
if (empty($fct)) $fct = 'preferences';
if (empty($fct)) {
$fct = 'preferences';
}
//if (isset($fct) && $fct == "users") {
// $xoopsOption['pagetype'] = "user";
// $xoopsOption['pagetype'] = "user";
//}
include "../../../mainfile.php";
include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
// include "../../mainfile.php"; GIJ
include XOOPS_ROOT_PATH . "/include/cp_functions.php";
include XOOPS_ROOT_PATH . '/include/cp_functions.php';

include_once XOOPS_ROOT_PATH . "/class/xoopsmodule.php";
include_once "../include/gtickets.php"; // GIJ
include_once XOOPS_ROOT_PATH . '/kernel/module.php';
include_once dirname(__DIR__) . '/include/gtickets.php'; // GIJ

$admintest = 0;

if (is_object($xoopsUser)) {
$xoopsModule =& XoopsModule::getByDirname("system");
$xoopsModule = XoopsModule::getByDirname('system');
if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
exit();
}
$admintest = 1;
} else {
redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
exit();
}

// include system category definitions
include_once XOOPS_ROOT_PATH . "/modules/system/constants.php";
include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
$error = false;
if ($admintest != 0) {
if (isset($fct) && $fct != '') {
if (file_exists(XOOPS_ROOT_PATH . "/modules/system/admin/" . $fct . "/xoops_version.php")) {

if (file_exists(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php")) {
include XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php";
if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) {
if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php')) {
include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php';
} else {
include XOOPS_ROOT_PATH . "/modules/system/language/english/admin.php";
include XOOPS_ROOT_PATH . '/modules/system/language/english/admin.php';
}

if (file_exists(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/" . $fct . ".php")) {
include XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/" . $fct . ".php";
} elseif (file_exists(XOOPS_ROOT_PATH . "/modules/system/language/english/admin/" . $fct . ".php")) {
include XOOPS_ROOT_PATH . "/modules/system/language/english/admin/" . $fct . ".php";
if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php')) {
include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php';
} elseif (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php')) {
include XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php';
}
include XOOPS_ROOT_PATH . "/modules/system/admin/" . $fct . "/xoops_version.php";
$sysperm_handler =& xoops_gethandler('groupperm');
$category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php';
$syspermHandler = xoops_getHandler('groupperm');
$category = !empty($modversion['category']) ? (int)$modversion['category'] : 0;
unset($modversion);
if ($category > 0) {
$groups =& $xoopsUser->getGroups();
if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
if (file_exists("../include/{$fct}.inc.php")) {
include_once "../include/{$fct}.inc.php";
} else {
Expand All @@ -93,9 +92,9 @@
} else {
$error = true;
}
} elseif ($fct == 'version') {
if (file_exists(XOOPS_ROOT_PATH . "/modules/system/admin/version/main.php")) {
include_once XOOPS_ROOT_PATH . "/modules/system/admin/version/main.php";
} elseif ($fct === 'version') {
if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) {
include_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php';
} else {
$error = true;
}
Expand All @@ -112,46 +111,46 @@

if (false != $error) {
xoops_cp_header();
echo "<h4>System Configuration</h4>";
echo '<h4>System Configuration</h4>';
echo '<table class="outer" cellpadding="4" cellspacing="1">';
echo '<tr>';
$groups = $xoopsUser->getGroups();
$all_ok = false;
if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
$sysperm_handler =& xoops_gethandler('groupperm');
$ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups);
$syspermHandler = xoops_getHandler('groupperm');
$ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups);
} else {
$all_ok = true;
}
$admin_dir = XOOPS_ROOT_PATH . "/modules/system/admin";
$handle = opendir($admin_dir);
$counter = 0;
$class = 'even';
$admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
$handle = opendir($admin_dir);
$counter = 0;
$class = 'even';
while ($file = readdir($handle)) {
if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir . '/' . $file)) {
if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) {
include $admin_dir . '/' . $file . '/xoops_version.php';
if ($modversion['hasAdmin']) {
$category = isset($modversion['category']) ? intval($modversion['category']) : 0;
$category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
echo "<td class='$class' align='center' valign='bottom' width='19%'>";
echo "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=" . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
echo "</td>";
$counter++;
$class = ($class == 'even') ? 'odd' : 'even';
echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
echo '</td>';
++$counter;
$class = ($class === 'even') ? 'odd' : 'even';
}
if ($counter > 4) {
$counter = 0;
echo "</tr>";
echo "<tr>";
echo '</tr>';
echo '<tr>';
}
}
unset($modversion);
}
}
while ($counter < 5) {
echo '<td class="' . $class . '">&nbsp;</td>';
$class = ($class == 'even') ? 'odd' : 'even';
$counter++;
$class = ($class === 'even') ? 'odd' : 'even';
++$counter;
}
echo '</tr></table>';
xoops_cp_footer();
Expand Down
22 changes: 22 additions & 0 deletions admin/admin_footer.php
@@ -0,0 +1,22 @@
<?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)
* @package
* @since
* @author XOOPS Development Team
*/

echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';

xoops_cp_footer();
44 changes: 36 additions & 8 deletions admin/admin_header.php
@@ -1,14 +1,42 @@
<?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.
*/

/**
* $Id: admin_header.php 9889 2012-07-16 12:08:42Z beckmi $
* Module: SmartPartner
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
*/

include_once '../../../include/cp_header.php';
error_reporting(E_ALL);
$path = dirname(dirname(dirname(__DIR__)));
include_once $path . '/mainfile.php';
include_once $path . '/include/cp_functions.php';
require_once $path . '/include/cp_header.php';
include dirname(__DIR__) . '/include/common.php';

global $xoopsModule;

$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname');

//if functions.php file exist
//require_once dirname(__DIR__) . '/include/functions.php';

// Load language files
xoops_loadLanguage('admin', $moduleDirName);
xoops_loadLanguage('modinfo', $moduleDirName);
xoops_loadLanguage('main', $moduleDirName);

$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
$pathModuleAdmin =& $xoopsModule->getInfo('dirmoduleadmin');

include "../include/common.php";
smart_loadCommonLanguageFile();
include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');

0 comments on commit b60369e

Please sign in to comment.