Skip to content

Commit a97f13f

Browse files
committed
Adding SmartFAQ 1.11 RC2
1 parent cea2483 commit a97f13f

File tree

172 files changed

+18600
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+18600
-0
lines changed

smartfaq/admin/about.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/*
3+
* You may not change or alter any portion of this comment or credits
4+
* of supporting developers from this source code or any supporting source code
5+
* which is considered copyrighted (c) material of the original comment or credit authors.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
*/
11+
12+
/**
13+
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
14+
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
15+
* @package
16+
* @since
17+
* @author XOOPS Development Team
18+
* @version $Id $
19+
*/
20+
21+
include_once dirname(__FILE__) . '/admin_header.php';
22+
23+
xoops_cp_header();
24+
25+
$aboutAdmin = new ModuleAdmin();
26+
27+
echo $aboutAdmin->addNavigation('about.php');
28+
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
29+
30+
include 'admin_footer.php';

smartfaq/admin/about2.php

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?php
2+
3+
/**
4+
* $Id: about.php,v 1.12 2004/12/14 01:59:42 malanciault Exp $
5+
* Module: SmartFAQ
6+
* Author: The SmartFactory <www.smartfactory.ca>
7+
* Licence: GNU
8+
*/
9+
10+
include_once("admin_header.php");
11+
$myts = &MyTextSanitizer::getInstance();
12+
13+
Global $xoopsModule;
14+
15+
xoops_cp_header();
16+
17+
$module_handler = &xoops_gethandler('module');
18+
$versioninfo = &$module_handler->get($xoopsModule->getVar('mid'));
19+
20+
//sf_adminMenu(-1, _AM_SF_ABOUT . " " . $versioninfo->getInfo('name'));
21+
22+
/* Centered heading
23+
echo "<br />";
24+
echo "<table width='100%'>";
25+
echo "<tr>";
26+
echo "<td align = 'center'>";
27+
echo "<img src='".XOOPS_URL."/modules/smartfaq/".$versioninfo->getInfo('image')."' alt='' align='center'/></a>";
28+
echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . "</div>";
29+
if ( $versioninfo->getInfo('author_realname') != '')
30+
{
31+
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
32+
} else
33+
{
34+
$author_name = $versioninfo->getInfo('author');
35+
}
36+
37+
echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " .$author_name;
38+
echo "</div>";
39+
echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div><br></>\n";
40+
41+
echo "</td>";
42+
echo "</tr>";
43+
echo "</table>";
44+
*/
45+
// Left headings...
46+
echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/" . $versioninfo->getInfo('image') . "' alt='' hspace='0' vspace='0' align='left' style='margin-right: 10px;'/></a>";
47+
echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . " (" . $versioninfo->getInfo('status_version') . ")</div>";
48+
if ($versioninfo->getInfo('author_realname') != '') {
49+
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
50+
} else {
51+
$author_name = $versioninfo->getInfo('author');
52+
}
53+
54+
echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name;
55+
echo "</div>";
56+
echo "<div style = 'line-height: 16px; display: block;'>" . $versioninfo->getInfo('license') . "</div>\n";
57+
58+
// Developers Information
59+
echo "<br /><table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
60+
echo "<tr>";
61+
echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_AUTHOR_INFO . "</b></td>";
62+
echo "</tr>";
63+
64+
if ($versioninfo->getInfo('developer_lead') != '') {
65+
echo "<tr>";
66+
echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>";
67+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>";
68+
echo "</tr>";
69+
}
70+
if ($versioninfo->getInfo('developer_contributor') != '') {
71+
echo "<tr>";
72+
echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>";
73+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>";
74+
echo "</tr>";
75+
}
76+
if ($versioninfo->getInfo('developer_website_url') != '') {
77+
echo "<tr>";
78+
echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>";
79+
echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>";
80+
echo "</tr>";
81+
}
82+
if ($versioninfo->getInfo('developer_email') != '') {
83+
echo "<tr>";
84+
echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>";
85+
echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>";
86+
echo "</tr>";
87+
}
88+
89+
90+
echo "</table>";
91+
echo "<br />\n";
92+
// Module Developpment information
93+
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
94+
echo "<tr>";
95+
echo "<td colspan='2' class='bg3' align='left'><b>" . _MI_SF_MODULE_INFO . "</b></td>";
96+
echo "</tr>";
97+
98+
if ($versioninfo->getInfo('date') != '') {
99+
echo "<tr>";
100+
echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>";
101+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>";
102+
echo "</tr>";
103+
}
104+
105+
if ($versioninfo->getInfo('status') != '') {
106+
echo "<tr>";
107+
echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>";
108+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>";
109+
echo "</tr>";
110+
}
111+
112+
if ($versioninfo->getInfo('demo_site_url') != '') {
113+
echo "<tr>";
114+
echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>";
115+
echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>";
116+
echo "</tr>";
117+
}
118+
119+
if ($versioninfo->getInfo('support_site_url') != '') {
120+
echo "<tr>";
121+
echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>";
122+
echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>";
123+
echo "</tr>";
124+
}
125+
126+
if ($versioninfo->getInfo('submit_bug') != '') {
127+
echo "<tr>";
128+
echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>";
129+
echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>";
130+
echo "</tr>";
131+
}
132+
if ($versioninfo->getInfo('submit_feature') != '') {
133+
echo "<tr>";
134+
echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>";
135+
echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>";
136+
echo "</tr>";
137+
}
138+
139+
echo "</table>";
140+
// Warning
141+
if ($versioninfo->getInfo('warning') != '') {
142+
echo "<br />\n";
143+
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
144+
echo "<tr>";
145+
echo "<td class='bg3' align='left'><b>" . _MI_SF_MODULE_DISCLAIMER . "</b></td>";
146+
echo "</tr>";
147+
148+
echo "<tr>";
149+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('warning') . "</td>";
150+
echo "</tr>";
151+
152+
echo "</table>";
153+
}
154+
// Author's note
155+
if ($versioninfo->getInfo('author_word') != '') {
156+
echo "<br />\n";
157+
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
158+
echo "<tr>";
159+
echo "<td class='bg3' align='left'><b>" . _MI_SF_AUTHOR_WORD . "</b></td>";
160+
echo "</tr>";
161+
162+
echo "<tr>";
163+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('author_word') . "</td>";
164+
echo "</tr>";
165+
166+
echo "</table>";
167+
}
168+
169+
// Version History
170+
if ($versioninfo->getInfo('version_history') != '') {
171+
echo "<br />\n";
172+
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
173+
echo "<tr>";
174+
echo "<td class='bg3' align='left'><b>" . _MI_SF_VERSION_HISTORY . "</b></td>";
175+
echo "</tr>";
176+
177+
echo "<tr>";
178+
echo "<td class='even' align='left'>" . $versioninfo->getInfo('version_history') . "</td>";
179+
echo "</tr>";
180+
181+
echo "</table>";
182+
}
183+
184+
echo "<br />";
185+
//$modfooter = sf_modFooter();
186+
//echo "<div align='center'>" . $modfooter . "</div>";
187+
//xoops_cp_footer();
188+
include "admin_footer.php";

smartfaq/admin/admin.php

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<?php
2+
// $Id: admin.php,v 1.3 2005/08/16 15:39:45 fx2024 Exp $
3+
// ------------------------------------------------------------------------ //
4+
// XOOPS - PHP Content Management System //
5+
// Copyright (c) 2000 XOOPS.org //
6+
// <http://www.xoops.org/> //
7+
// ------------------------------------------------------------------------ //
8+
// This program is free software; you can redistribute it and/or modify //
9+
// it under the terms of the GNU General Public License as published by //
10+
// the Free Software Foundation; either version 2 of the License, or //
11+
// (at your option) any later version. //
12+
// //
13+
// You may not change or alter any portion of this comment or credits //
14+
// of supporting developers from this source code or any supporting //
15+
// source code which is considered copyrighted (c) material of the //
16+
// original comment or credit authors. //
17+
// //
18+
// This program is distributed in the hope that it will be useful, //
19+
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
20+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
21+
// GNU General Public License for more details. //
22+
// //
23+
// You should have received a copy of the GNU General Public License //
24+
// along with this program; if not, write to the Free Software //
25+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
26+
// ------------------------------------------------------------------------ //
27+
// Author: Kazumi Ono (AKA onokazu) //
28+
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
29+
// Project: The XOOPS Project //
30+
// ------------------------------------------------------------------------- //
31+
if (!defined("XOOPS_ROOT_PATH")) {
32+
die("XOOPS root path not defined");
33+
}
34+
35+
if (isset($HTTP_POST_VARS['fct'])) {
36+
$fct = trim($HTTP_POST_VARS['fct']);
37+
}
38+
if (isset($HTTP_GET_VARS['fct'])) {
39+
$fct = trim($HTTP_GET_VARS['fct']);
40+
}
41+
if (empty($fct)) $fct = 'preferences' ;
42+
include "../../../mainfile.php";
43+
include XOOPS_ROOT_PATH."/include/cp_functions.php";
44+
45+
include_once XOOPS_ROOT_PATH."/kernel/module.php";
46+
47+
$admintest = 0;
48+
49+
if (is_object($xoopsUser)) {
50+
$xoopsModule =& XoopsModule::getByDirname("system");
51+
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
52+
redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
53+
exit();
54+
}
55+
$admintest=1;
56+
} else {
57+
redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
58+
exit();
59+
}
60+
61+
// include system category definitions
62+
include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
63+
$error = false;
64+
if ($admintest != 0) {
65+
if (isset($fct) && $fct != '') {
66+
if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
67+
68+
include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ;
69+
70+
if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
71+
include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
72+
} elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
73+
include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
74+
}
75+
include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
76+
$sysperm_handler =& xoops_gethandler('groupperm');
77+
$category = !empty($modversion['category'])? intval($modversion['category']) : 0;
78+
unset($modversion);
79+
if ($category > 0) {
80+
$groups =& $xoopsUser->getGroups();
81+
if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){
82+
if (file_exists("../include/{$fct}.inc.php")) {
83+
include_once "../include/{$fct}.inc.php" ;
84+
} else {
85+
$error = true;
86+
}
87+
} else {
88+
$error = true;
89+
}
90+
} elseif ($fct == 'version') {
91+
if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
92+
include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
93+
} else {
94+
$error = true;
95+
}
96+
} else {
97+
$error = true;
98+
}
99+
} else {
100+
$error = true;
101+
}
102+
} else {
103+
$error = true;
104+
}
105+
}
106+
107+
if (false != $error) {
108+
xoops_cp_header();
109+
echo "<h4>System Configuration</h4>";
110+
echo '<table class="outer" cellpadding="4" cellspacing="1">';
111+
echo '<tr>';
112+
$groups = $xoopsUser->getGroups();
113+
$all_ok = false;
114+
if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
115+
$sysperm_handler =& xoops_gethandler('groupperm');
116+
$ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups);
117+
} else {
118+
$all_ok = true;
119+
}
120+
$admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
121+
$handle = opendir($admin_dir);
122+
$counter = 0;
123+
$class = 'even';
124+
while ($file = readdir($handle)) {
125+
if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
126+
include $admin_dir.'/'.$file.'/xoops_version.php';
127+
if ($modversion['hasAdmin']) {
128+
$category = isset($modversion['category'])? intval($modversion['category']) : 0;
129+
if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
130+
echo "<td class='$class' align='center' valign='bottom' width='19%'>";
131+
echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
132+
echo "</td>";
133+
$counter++;
134+
$class = ($class == 'even')? 'odd' : 'even';
135+
}
136+
if ( $counter > 4 ) {
137+
$counter = 0;
138+
echo "</tr>";
139+
echo "<tr>";
140+
}
141+
}
142+
unset($modversion);
143+
}
144+
}
145+
while ($counter < 5) {
146+
echo '<td class="'.$class.'">&nbsp;</td>';
147+
$class = ($class == 'even')? 'odd' : 'even';
148+
$counter++;
149+
}
150+
echo '</tr></table>';
151+
xoops_cp_footer();
152+
}
153+
154+
?>

0 commit comments

Comments
 (0)