-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
59 lines (52 loc) · 2.01 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
declare(strict_types=1);
/*
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.
*/
/**
* wgBacklinks module for xoops
*
* @copyright module for xoops
* @license GPL 2.0 or later
* @package wgbacklinks
* @author Goffy - Wedega.com - Email:<[email protected]> - Website:<https://wedega.com>
*/
include __DIR__ . '/header.php';
$GLOBALS['xoopsOption']['template_main'] = 'wgbacklinks_index.tpl';
include_once \XOOPS_ROOT_PATH . '/header.php';
// Define Stylesheet
$GLOBALS['xoTheme']->addStylesheet($style, null);
$keywords = array();
//
$GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL);
$GLOBALS['xoopsTpl']->assign('wgbacklinks_url', \WGBACKLINKS_URL);
//
$crit_sites = new \CriteriaCompo();
$crit_sites->add(new \Criteria('site_active', 1));
$sitesCount = $sitesHandler->getCount($crit_sites);
if ($sitesCount > 0) {
$sitesAll = $sitesHandler->getall($crit_sites);
// Get All Sites
$sites = [];
foreach (\array_keys($sitesAll) as $i) {
$sites[] = $sitesAll[$i]->getValuesSites();
$keywords[] = $sitesAll[$i]->getVar('site_name');
$keywords[] = $sitesAll[$i]->getVar('site_desc');
$keywords[] = $sitesAll[$i]->getVar('site_url');
}
$GLOBALS['xoopsTpl']->assign('sites', $sites);
unset($sites);
}
$GLOBALS['xoopsTpl']->assign('copyright', $copyright);
// Keywords
wgbacklinksMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
unset($keywords);
// Description
wgbacklinksMetaDescription(\_MA_WGBACKLINKS_INDEX_DESC);
$GLOBALS['xoopsTpl']->assign('xoops_mpageurl', \WGBACKLINKS_URL . '/index.php');
include __DIR__ . '/footer.php';