34 echo
"<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL .
"/Frameworks/moduleclasses/moduleadmin/css/admin.css\";</style>";
42 if (!isset($infoArray) or empty($infoArray)) {
60 Include_once
'xoops_version.php';
74 Include_once
'xoops_version.php';
86 $myMethods = get_class_methods(__CLASS__);
97 if ( !file_exists($fileinc = XOOPS_ROOT_PATH .
"/Frameworks/moduleclasses/moduleadmin/language/{$language}/main.php" )){
98 if ( !file_exists($fileinc = XOOPS_ROOT_PATH .
"/Frameworks/moduleclasses/moduleadmin/language/english/main.php" )){
102 $ret = include_once $fileinc;
112 $path = XOOPS_URL .
"/modules/" . $this->_obj->getVar(
'dirname') .
"/";
113 $pathsystem = XOOPS_URL .
"/modules/system/";
114 $this->_obj->loadAdminMenu();
115 $ret =
"<div class=\"rmmenuicon\">\n";
116 foreach (array_keys( $this->_obj->adminmenu) as
$i) {
117 if ($this->_obj->adminmenu[$i][
'link'] !=
'admin/index.php'){
118 $ret .=
"<a href=\"../" . $this->_obj->adminmenu[
$i][
'link'] .
"\" title=\"" . $this->_obj->adminmenu[
$i][
'title'] .
"\">";
119 $ret .=
"<img src=\"" .
$path . $this->_obj->adminmenu[
$i][
'icon'].
"\" alt=\"" . $this->_obj->adminmenu[
$i][
'title'] .
"\" />";
120 $ret .=
"<span>" . $this->_obj->adminmenu[
$i][
'title'] .
"</span>";
124 if ($this->_obj->getInfo(
'help')) {
126 $ret .=
"<a href=\"" . $pathsystem .
"help.php?mid=" . $this->_obj->getVar(
'mid',
's') .
"&" . $this->_obj->getInfo(
'help') .
"\" title=\"" .
_AM_SYSTEM_HELP .
"\">";
127 $ret .=
"<img width=\"32px\" src=\"" . XOOPS_URL .
"/Frameworks/moduleclasses/icons/32/help.png\" alt=\"" .
_AM_SYSTEM_HELP .
"\" /> ";
132 $ret .=
"</div>\n<div style=\"clear: both;\"></div>\n";
142 $path = XOOPS_URL .
"/Frameworks/moduleclasses/icons/32/";
147 $ret =
"<div class=\"floatright\">\n";
151 $ret =
"<div class=\"floatleft\">\n";
155 $ret =
"<div class=\"aligncenter\">\n";
157 $ret .=
"<div class=\"xo-buttons\">\n";
158 foreach (array_keys( $this -> _itemButton) as
$i) {
159 $ret .=
"<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[
$i][
'link'] .
"' title='" . $this -> _itemButton[
$i][
'title'] .
"'>";
160 $ret .=
"<img src='" .
$path . $this -> _itemButton[
$i][
'icon'] .
"' title='" . $this -> _itemButton[
$i][
'title'] .
"' />" . $this -> _itemButton[
$i][
'title'] .
' ' . $this -> _itemButton[
$i][
'extra'];
164 $ret .=
"</div>\n</div>\n";
165 $ret .=
"<br /> <br /><br />";
172 $ret[
'link'] = $link;
174 $ret[
'extra'] = $extra;
175 $this -> _itemButton[] =
$ret;
191 $path = XOOPS_URL .
"/Frameworks/moduleclasses/icons/16/";
196 $line .=
"<span>" . $value .
"</span>";
200 if (!is_dir($value)){
201 $line .=
"<span style='color : red; font-weight : bold;'>";
202 $line .=
"<img src='" .
$path .
"off.png' >";
204 $line .=
"</span>\n";
206 $line .=
"<span style='color : green;'>";
207 $line .=
"<img src='" .
$path .
"on.png' >";
209 $line .=
"</span>\n";
214 if (is_dir($value[0])){
215 if (substr(decoct(fileperms($value[0])),2) != $value[1]) {
216 $line .=
"<span style='color : red; font-weight : bold;'>";
217 $line .=
"<img src='" .
$path .
"off.png' >";
219 $line .=
"</span>\n";
221 $line .=
"<span style='color : green;'>";
222 $line .=
"<img src='" .
$path .
"on.png' >";
224 $line .=
"</span>\n";
229 $this -> _itemConfigBoxLine[] = $line;
239 $ret =
"<table>\n<tr>\n";
240 $ret .=
"<td width=\"40%\">\n";
243 $ret .=
"<td width=\"60%\">\n";
248 if ($this->_obj->getInfo(
'min_php') || $this->_obj->getInfo(
'min_xoops') || !empty($this -> _itemConfigBoxLine)){
250 $ret .=
"<td colspan=\"2\">\n";
251 $ret .=
"<fieldset><legend class=\"label\">";
253 $ret .=
"</legend>\n";
256 $path = XOOPS_URL .
"/Frameworks/moduleclasses/icons/16/";
257 if ($this->_obj->getInfo(
'min_php')){
258 if (phpversion() < $this->_obj->getInfo(
'min_php')){
259 $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";
261 $ret .=
"<span style='color : green;'><img src='" .
$path .
"on.png' >" . sprintf(
_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo(
'min_php'), phpversion()) .
"</span>\n";
267 $path = XOOPS_URL .
"/Frameworks/moduleclasses/icons/16/";
268 $dbarray=$this->_obj->getInfo(
'min_db');
270 switch (XOOPS_DB_TYPE) {
272 $dbCurrentVersion= mysql_get_server_info();
275 $dbCurrentVersion = mysqli_get_server_info();
279 $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION);
282 $dbCurrentVersion =
'0';
285 $currentVerParts = explode(
'.', (
string)$dbCurrentVersion);
286 $iCurrentVerParts = array_map(
'intval', $currentVerParts);
288 $reqVerParts = explode(
'.', (
string)$dbRequiredVersion);
289 $iReqVerParts = array_map(
'intval', $reqVerParts);
290 $icount =
$j = count($iReqVerParts);
291 $reqVer = $curVer = 0;
292 for (
$i=0;
$i<$icount;
$i++) {
294 $reqVer += $iReqVerParts[
$i] * pow(10,
$j);
295 if (isset($iCurrentVerParts[
$i])) {
296 $curVer += $iCurrentVerParts[
$i] * pow(10,
$j);
298 $curVer = $curVer * pow(10,
$j);
301 if ($reqVer > $curVer) {
302 $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";
304 $ret .=
"<span style='color : green;'><img src='" .
$path .
"on.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).
' '.
_AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) .
"</span><br />\n";
309 if ($this->_obj->getInfo(
'min_xoops')){
319 if ($this->_obj->getInfo(
'min_admin')){
320 if ($this->
getVersion() < $this->_obj->getInfo(
'min_admin')){
327 if (!empty($this -> _itemConfigBoxLine)){
328 foreach (array_keys( $this -> _itemConfigBoxLine) as
$i) {
329 $ret .= $this -> _itemConfigBoxLine[
$i];
333 $ret .=
"</fieldset>\n";
337 $ret .=
"</table>\n";
348 $this -> _itemInfoBox[] =
$ret;
363 $ret[
'label'] = $label;
369 $line .= sprintf($text,
"<span style='color : " . $color .
"; font-weight : bold;'>" . $value .
"</span>");
376 $ret[
'line'] = $line;
377 $this -> _itemInfoBoxLine[] =
$ret;
383 foreach (array_keys( $this -> _itemInfoBox) as
$i) {
384 $ret .=
"<fieldset><legend class=\"label\">";
385 $ret .= $this -> _itemInfoBox[
$i][
'title'];
386 $ret .=
"</legend>\n";
387 foreach (array_keys( $this -> _itemInfoBoxLine) as $k) {
388 if ($this -> _itemInfoBoxLine[$k][
'label'] == $this -> _itemInfoBox[$i][
'title']){
389 $ret .= $this -> _itemInfoBoxLine[$k][
'line'];
393 $ret .=
"</fieldset>\n";
402 $path = XOOPS_URL .
"/Frameworks/moduleclasses/icons/32/";
404 $ret =
"<table>\n<tr>\n";
405 $ret .=
"<td width=\"50%\">\n";
406 $date = explode(
'/',$this->_obj->getInfo(
'release_date'));
407 $author = explode(
',',$this->_obj->getInfo(
'author'));
408 $nickname = explode(
',',$this->_obj->getInfo(
'nickname'));
413 <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") .
'">
414 ' . $this->_obj->getInfo(
"module_website_name") .
'</a></text></div>';
415 $ret .=
"<table>\n<tr>\n<td width=\"100px\">\n";
416 $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";
417 $ret .=
"</td><td>\n";
418 $ret .=
"<div style='margin-top: 1px; margin-bottom: 4px; font-size: 18px; line-height: 18px; color: #2F5376; font-weight: bold;'>\n";
419 $ret .= $this->_obj->getInfo(
'name') .
" " . $this->_obj->getInfo(
'version') .
" " . $this->_obj->getInfo(
'module_status') .
" (" . $release_date .
")\n";
422 $ret .=
"<div style='line-height: 16px; font-weight: bold;'>\n";
424 foreach (array_keys($author) as
$i) {
426 if (isset($nickname[$i]) && $nickname[$i] !=
'') {
427 $ret .=
" (" . $nickname[
$i] .
"), ";
434 $ret .=
"<div style='line-height: 16px;'>\n";
435 $ret.=
"<a href=\"http://" . $this->_obj->getInfo(
'license_url').
"\" target=\"_blank\" >" . $this->_obj->getInfo(
'license').
"</a>\n";
437 $ret .=
"<a href=\"http://" . $this->_obj->getInfo(
'website') .
"\" target=\"_blank\" >" . $this->_obj->getInfo(
'website') .
"</a>\n";
441 $ret .=
'<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
442 <input type="hidden" name="cmd" value="_s-xclick">
443 <input type="hidden" name="hosted_button_id" value="' . $paypal .
'">
444 <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!">
445 <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
449 $ret .=
"</td>\n</tr>\n</table>\n";
454 $ret .=
"<td width=\"50%\">\n";
455 $ret .=
"<fieldset><legend class=\"label\">\n";
457 $ret .=
"</legend><br/>\n";
458 $ret .=
"<div class=\"txtchangelog\">\n";
460 if ( !is_file( XOOPS_ROOT_PATH .
"/modules/" . $this->_obj->getVar(
"dirname") .
"/language/" .
$language .
"/changelog.txt" ) ){
464 $file = XOOPS_ROOT_PATH.
"/modules/" . $this->_obj->getVar(
"dirname") .
"/language/" .
$language .
"/changelog.txt";
465 if ( is_readable(
$file ) ){
466 $ret .= utf8_encode(implode(
"<br />", file(
$file ))) .
"\n";
468 $file = XOOPS_ROOT_PATH.
"/modules/" . $this->_obj->getVar(
"dirname") .
"/docs/changelog.txt";
469 if ( is_readable(
$file ) ){
470 $ret .= utf8_encode(implode(
"<br />", file(
$file ))) .
"\n";
474 $ret .=
"</fieldset>\n";
477 $ret .=
"</table>\n";
478 if ($logo_xoops ==
true){
479 $ret .=
"<div align=\"center\">";
480 $ret .=
"<a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" .
$path .
"xoopsmicrobutton.gif\" alt=\"XOOPS\" title=\"XOOPS\"></a>";
490 $path = XOOPS_URL .
"/modules/" . $this->_obj->getVar(
'dirname') .
"/";
491 $this->_obj->loadAdminMenu();
492 foreach (array_keys( $this->_obj->adminmenu) as
$i) {
493 if ($this->_obj->adminmenu[$i][
'link'] ==
"admin/" .
$menu){
494 $navigation .= $this->_obj->adminmenu[
$i][
'title'] .
" | ";
495 $ret =
"<div class=\"CPbigTitle\" style=\"background-image: url(" .
$path . $this->_obj->adminmenu[
$i][
'icon'] .
"); background-repeat: no-repeat; background-position: left; padding-left: 50px;\">
496 <strong>" . $this->_obj->adminmenu[
$i][
'title'] .
"</strong></div><br />";
498 $navigation .=
"<a href = '../" . $this->_obj->adminmenu[
$i][
'link'] .
"'>" . $this->_obj->adminmenu[
$i][
'title'] .
"</a> | ";
502 $navigation .=
"<a href = '../../system/admin.php?fct=preferences&op=showmod&mod=" . $this->_obj->getVar(
'mid') .
"'>" .
_MI_SYSTEM_ADMENU6 .
"</a>";
503 $ret = $navigation .
"<br /><br />" .
$ret;