Skip to content

Commit

Permalink
Initial GIT
Browse files Browse the repository at this point in the history
  • Loading branch information
montuy337513 committed Nov 3, 2020
0 parents commit 2c2fb08
Show file tree
Hide file tree
Showing 41 changed files with 2,946 additions and 0 deletions.
19 changes: 19 additions & 0 deletions admin/about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/*
*******************************************************
*** ***
*** backpack ***
*** Cedric MONTUY pour CHG-WEB ***
*** Original author : Yoshi Sakai ***
*** ***
*******************************************************
*/
include_once 'admin_header.php';
xoops_cp_header();

$aboutAdmin = new ModuleAdmin();

echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('2MHAG2L3NZG8G', false);

include 'admin_footer.php';
15 changes: 15 additions & 0 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/*
*******************************************************
*** ***
*** backpack ***
*** Cedric MONTUY pour CHG-WEB ***
*** Original author : Yoshi Sakai ***
*** ***
*******************************************************
*/
echo '<div class="adminfooter">'."\n".'<div style="text-align: center;">'."\n"
. ' <a href="http://www.xoops.org" rel="external"><img src="'.$pathIcon32.'/xoopsmicrobutton.gif" alt="Xoops" title="Xoops"></a>'."\n"
. ' </div>'."\n" . ' <div class="center smallsmall italic pad5"> ce module est maintenu par <a href="https://store.chg-web.com" rel="external">Cedric MONTUY CHG-WEB</a>' . "\n" . '</div>';

xoops_cp_footer();
60 changes: 60 additions & 0 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/*
*******************************************************
*** ***
*** backpack ***
*** Cedric MONTUY pour CHG-WEB ***
*** Original author : Yoshi Sakai ***
*** ***
*******************************************************
*/
$path = dirname(dirname(dirname(__DIR__)));
include_once $path . '/mainfile.php';
include_once $path . '/include/cp_functions.php';
require_once $path . '/include/cp_header.php';

global $xoopsModule;

$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
$thisModulePath = dirname(__DIR__);

include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
require_once($thisModulePath.'/include/zip.lib.php');
require_once($thisModulePath.'/include/defines.lib.php');
require_once($thisModulePath.'/include/read_dump.lib.php');

$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
// Include backup functions
include_once($thisModulePath.'/admin/backup.ini.php');
include_once($thisModulePath.'/class/class.backpack.php');

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

if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) {
include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
} else {
redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING, FALSE);
}
$myts = MyTextSanitizer::getInstance();

if ($xoopsUser) {
$moduleperm_handler = xoops_gethandler('groupperm');
if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) {
redirect_header(XOOPS_URL, 1, _NOPERM);
exit();
}
} else {
redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
exit();
}

if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
include_once(XOOPS_ROOT_PATH.'/class/template.php');
$xoopsTpl = new XoopsTpl();
}

$xoopsTpl->assign('pathIcon16', $pathIcon16);
Loading

0 comments on commit 2c2fb08

Please sign in to comment.