40 'index' =>
'admin_index.tpl',
41 'about' =>
'admin_about.tpl',
42 'infobox' =>
'admin_infobox.tpl',
43 'bread' =>
'admin_breadcrumb.tpl',
44 'button' =>
'admin_buttons.tpl',
45 'tips' =>
'admin_tips.tpl',
46 'nav' =>
'admin_navigation.tpl',
98 $xoops->theme()->addStylesheet(
'media/xoops/css/moduladmin.css');
113 $this->bread[] = array(
114 'link' =>
$link,
'title' => $title,
'home' => $home
132 $this->itemConfigBoxLine[] = array(
'type' =>
$type,
'text' => $value);
136 if (!is_dir($value)) {
137 $this->itemConfigBoxLine[] = array(
141 $this->itemConfigBoxLine[] = array(
148 if (is_dir($value[0])) {
149 if (substr(decoct(fileperms($value[0])), 2) != $value[1]) {
150 $this->itemConfigBoxLine[] = array(
156 substr(decoct(fileperms($value[0])), 2)
160 $this->itemConfigBoxLine[] = array(
166 substr(decoct(fileperms($value[0])), 2)
175 if (is_array($value)) {
183 $this->itemConfigBoxLine[] = array(
187 $this->itemConfigBoxLine[] = array(
195 if (is_array($value)) {
203 $this->itemConfigBoxLine[] = array(
207 $this->itemConfigBoxLine[] = array(
215 if (is_array($value)) {
223 $this->itemConfigBoxLine[] = array(
227 $this->itemConfigBoxLine[] = array(
248 $ret[
'title'] = $title;
249 $ret[
'type'] =
$type;
250 $ret[
'extra'] = $extra;
251 $this->itemInfoBox[] = $ret;
267 $ret[
'text'] =
$text;
268 $ret[
'color'] = $color;
270 foreach (array_keys($this->itemInfoBox) as
$i) {
271 if ($this->itemInfoBox[$i][
'type'] ==
$type) {
272 $this->itemInfoBox[
$i][
'line'][] = $ret;
291 $ret[
'title'] = $title;
292 $ret[
'link'] =
$link;
293 $ret[
'icon'] = $icon;
294 $ret[
'extra'] = $extra;
295 $this->itemButton[] = $ret;
320 return 'admin:' . $this->tplModule .
'/' . $this->tplFile[
$type];
331 $xoops->tpl()->assign(
'xo_admin_breadcrumb', $this->bread);
353 public function renderButton($position =
"floatright", $delimiter =
" ")
357 $xoops->tpl()->assign(
'xo_admin_buttons_position', $position);
358 $xoops->tpl()->assign(
'xo_admin_buttons_delim', $delimiter);
359 $xoops->tpl()->assign(
'xo_admin_buttons', $this->itemButton);
371 public function displayButton($position =
"floatright", $delimiter =
" ")
384 $xoops->tpl()->assign(
'xo_admin_box', $this->itemInfoBox);
406 $this->
module->loadAdminMenu();
407 foreach (array_keys($this->
module->adminmenu) as
$i) {
410 "/media/xoops/images/icons/32/" . $this->module->adminmenu[$i][
'icon']
414 "/media/xoops/images/icons/32/"
415 . $this->
module->adminmenu[$i][
'icon']
419 "/modules/" .
$xoops->module->dirname()
420 .
"/icons/32/" . $this->
module->adminmenu[
$i][
'icon']
423 $xoops->tpl()->append(
'xo_admin_index_menu', $this->
module->adminmenu[$i]);
425 if ($this->
module->getInfo(
'help')) {
427 $help[
'link'] =
'../system/help.php?mid=' . $this->
module->getVar(
'mid',
's')
428 .
"&" . $this->
module->getInfo(
'help');
429 $help[
'icon'] =
$xoops->url(
"/media/xoops/images/icons/32/help.png");
431 $xoops->tpl()->append(
'xo_admin_index_menu', $help);
433 $xoops->tpl()->assign(
'xo_admin_box', $this->itemInfoBox);
436 if ($this->
module->getInfo(
'min_php') || $this->
module->getInfo(
'min_xoops')
437 || !empty($this->itemConfigBoxLine)
440 if ($this->
module->getInfo(
'min_php')) {
441 if (0 >= version_compare(phpversion(), $this->
module->getInfo(
'min_php'))) {
445 $this->
module->getInfo(
'min_php'),
454 $this->
module->getInfo(
'min_php'),
464 $dbarray = $this->
module->getInfo(
'min_db');
468 $dbCurrentVersion = mysql_get_server_info();
471 $dbCurrentVersion = mysqli_get_server_info();
474 $dbCurrentVersion =
$xoops->db()->getAttribute(PDO::ATTR_SERVER_VERSION);
477 $dbCurrentVersion =
'0';
480 $currentVerParts = explode(
'.', (
string)$dbCurrentVersion);
481 $iCurrentVerParts = array_map(
'intval', $currentVerParts);
483 $reqVerParts = explode(
'.', (
string)$dbRequiredVersion);
484 $iReqVerParts = array_map(
'intval', $reqVerParts);
485 $icount =
$j = count($iReqVerParts);
486 $reqVer = $curVer = 0;
487 for ($i = 0; $i < $icount; ++
$i) {
489 $reqVer += $iReqVerParts[
$i] * pow(10,
$j);
490 if (isset($iCurrentVerParts[$i])) {
491 $curVer += $iCurrentVerParts[
$i] * pow(10,
$j);
493 $curVer = $curVer * pow(10,
$j);
496 if ($reqVer > $curVer) {
519 if ($this->
module->getInfo(
'min_xoops')) {
521 if (version_compare($xoopsVersion, $this->
module->getInfo(
'min_xoops')) >= 0) {
525 $this->
module->getInfo(
'min_xoops'),
534 $this->
module->getInfo(
'min_xoops'),
541 $xoops->tpl()->assign(
'xo_admin_index_config', $this->itemConfigBoxLine);
568 $this->
module->loadAdminMenu();
569 foreach (array_keys($this->
module->adminmenu) as
$i) {
570 if ($this->
module->adminmenu[$i][
'link'] ==
"admin/" .
$menu) {
572 $xoops->path(
"/media/xoops/images/icons/32/" . $this->module->adminmenu[$i][
'icon'])
575 "/media/xoops/images/icons/32/"
576 . $this->
module->adminmenu[$i][
'icon']
580 "/modules/" .
$xoops->module->dirname() .
"/icons/32/"
581 . $this->
module->adminmenu[
$i][
'icon']
584 $xoops->tpl()->assign(
'xo_sys_navigation', $this->
module->adminmenu[$i]);
601 foreach ($items as $item) {
614 $xoops->tpl()->assign(
'xo_admin_tips', $this->tips);
639 $date = explode(
'/', $this->
module->getInfo(
'release_date'));
640 $author = explode(
',', $this->
module->getInfo(
'author'));
641 $nickname = explode(
',', $this->
module->getInfo(
'nickname'));
645 foreach (array_keys($author) as
$i) {
646 $author_list .= $author[
$i];
647 if (isset($nickname[$i]) && $nickname[$i] !=
'') {
648 $author_list .=
" (" . $nickname[
$i] .
"), ";
650 $author_list .=
", ";
657 .
"/locale/" .
$language .
"/changelog.txt"
662 .
"/locale/" .
$language .
"/changelog.txt";
663 if (is_readable(
$file)) {
664 $changelog = utf8_encode(implode(
"<br />", file(
$file))) .
"\n";
667 if (is_readable(
$file)) {
668 $changelog = utf8_encode(implode(
"<br />", file(
$file))) .
"\n";
671 $author_list = substr($author_list, 0, -2);
673 $this->
module->setInfo(
'release_date', $release_date);
674 $this->
module->setInfo(
'author_list', $author_list);
675 if (is_array($this->
module->getInfo(
'paypal'))) {
676 $this->
module->setInfo(
'paypal', $this->
module->getInfo(
'paypal'));
678 $this->
module->setInfo(
'changelog', $changelog);
694 . $this->
module->getInfo(
"module_website_url")
695 .
'" rel="external" title="'
696 . $this->
module->getInfo(
"module_website_name") .
' - '
697 . $this->
module->getInfo(
"module_website_url") .
'">'
698 . $this->
module->getInfo(
"module_website_name") .
'</a>',
702 $xoops->tpl()->assign(
'xoops_logo', $logo_xoops);
703 $xoops->tpl()->assign(
'xo_admin_box', $this->itemInfoBox);
static formatTimestamp($time, $format= 'l', $timeoffset=null)
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
const SF_SERVICE_IS_INSTALLED
const EF_FOLDER_DOES_NOT_EXIST
const EF_SERVICE_IS_NOT_INSTALLED
renderButton($position="floatright", $delimiter=" ")
const F_MINIMUM_DATABASE_VERSION_REQUIRED
const F_MINIMUM_PHP_VERSION_REQUIRED
addInfoBox($title, $type= 'default', $extra= '')
addInfoBoxLine($text= '', $type= 'default', $color= 'inherit')
const SF_EXTENSION_IS_INSTALLED
const F_MINIMUM_XOOPS_VERSION_REQUIRED
renderNavigation($menu= '')
const F_MODULE_IS_NOT_INSTALLED
displayButton($position="floatright", $delimiter=" ")
addConfigBoxLine($value= '', $type= 'default')
addItemButton($title, $link, $icon= 'add', $extra= '')
const EF_FOLDER_MUST_BE_WITH_CHMOD
const EF_EXTENSION_IS_NOT_INSTALLED
renderAbout($logo_xoops=true)
addBreadcrumbLink($title= '', $link= '', $home=false)
const F_MODULE_IS_INSTALLED
displayNavigation($menu= '')
displayAbout($logo_xoops=true)