| 103 |
- |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************
|
|
|
4 |
* Copyright (C) 2009-2011 by Geo Varghese(www.seopanel.in) *
|
|
|
5 |
* sendtogeo@gmail.com *
|
|
|
6 |
* *
|
|
|
7 |
* This program is free software; you can redistribute it and/or modify *
|
|
|
8 |
* it under the terms of the GNU General Public License as published by *
|
|
|
9 |
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
10 |
* (at your option) any later version. *
|
|
|
11 |
* *
|
|
|
12 |
* This program is distributed in the hope that it will be useful, *
|
|
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
15 |
* GNU General Public License for more details. *
|
|
|
16 |
* *
|
|
|
17 |
* You should have received a copy of the GNU General Public License *
|
|
|
18 |
* along with this program; if not, write to the *
|
|
|
19 |
* Free Software Foundation, Inc., *
|
|
|
20 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
21 |
***************************************************************************/
|
|
|
22 |
|
|
|
23 |
# class defines all seo tools controller functions
|
|
|
24 |
class AdminPanelController extends Controller{
|
|
|
25 |
|
|
|
26 |
# index function
|
|
|
27 |
function index($info = ""){
|
|
|
28 |
|
|
|
29 |
if (isAdmin() || !SP_CUSTOM_DEV) {
|
|
|
30 |
$menuList[] = array(
|
|
|
31 |
'id' => 1,
|
|
|
32 |
'name' => $this->spTextPanel['Website Manager'],
|
|
|
33 |
'url_section' => 'websites'
|
|
|
34 |
);
|
|
|
35 |
} else {
|
|
|
36 |
$info['start_script'] = !empty($info['start_script']) ? $info['start_script'] : "archive.php";
|
|
|
37 |
$info['menu_selected'] = !empty($info['menu_selected']) ? $info['menu_selected'] : "report-manager";
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
if(isAdmin()){
|
|
|
41 |
$menuList[] = array(
|
|
|
42 |
'id' => 2,
|
|
|
43 |
'name' => $this->spTextPanel['User Manager'],
|
|
|
44 |
'url_section' => 'users'
|
|
|
45 |
);
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
// user type manager
|
|
|
49 |
if (isAdmin()) {
|
|
|
50 |
$menuList[] = array(
|
|
|
51 |
'id' => 15,
|
|
|
52 |
'name' => $this->spTextPanel['User Type Manager'],
|
|
|
53 |
'url_section' => 'user-types-manager'
|
|
|
54 |
);
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
if (isLoggedIn()) {
|
|
|
58 |
$menuList[] = array(
|
|
|
59 |
'id' => 3,
|
|
|
60 |
'name' => $this->spTextPanel['Reports Manager'],
|
|
|
61 |
'url_section' => 'report-manager'
|
|
|
62 |
);
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
if (isAdmin()) {
|
|
|
66 |
$menuList[] = array(
|
|
|
67 |
'id' => 4,
|
|
|
68 |
'name' => $this->spTextPanel['Seo Tools Manager'],
|
|
|
69 |
'url_section' => 'seo-tools-manager'
|
|
|
70 |
);
|
|
|
71 |
|
|
|
72 |
$menuList[] = array(
|
|
|
73 |
'id' => 5,
|
|
|
74 |
'name' => $this->spTextPanel['Seo Plugins Manager'],
|
|
|
75 |
'url_section' => 'seo-plugin-manager'
|
|
|
76 |
);
|
|
|
77 |
|
|
|
78 |
$menuList[] = array(
|
|
|
79 |
'id' => 6,
|
|
|
80 |
'name' => $this->spTextPanel['Themes Manager'],
|
|
|
81 |
'url_section' => 'themes-manager'
|
|
|
82 |
);
|
|
|
83 |
|
|
|
84 |
$menuList[] = array(
|
|
|
85 |
'id' => 7,
|
|
|
86 |
'name' => $this->spTextPanel['Directory Manager'],
|
|
|
87 |
'url_section' => 'directory-manager'
|
|
|
88 |
);
|
|
|
89 |
|
|
|
90 |
$menuList[] = array(
|
|
|
91 |
'id' => 8,
|
|
|
92 |
'name' => $this->spTextPanel['Proxy Manager'],
|
|
|
93 |
'url_section' => 'proxy-manager'
|
|
|
94 |
);
|
|
|
95 |
|
|
|
96 |
$menuList[] = array(
|
|
|
97 |
'id' => 9,
|
|
|
98 |
'name' => $this->spTextPanel['Search Engine Manager'],
|
|
|
99 |
'url_section' => 'se-manager'
|
|
|
100 |
);
|
|
|
101 |
|
|
|
102 |
$menuList[] = array(
|
|
|
103 |
'id' => 10,
|
|
|
104 |
'name' => $this->spTextPanel['Log Manager'],
|
|
|
105 |
'url_section' => 'log-manager'
|
|
|
106 |
);
|
|
|
107 |
|
|
|
108 |
$menuList[] = array(
|
|
|
109 |
'id' => 11,
|
|
|
110 |
'name' => $this->spTextPanel['API Manager'],
|
|
|
111 |
'url_section' => 'api-manager'
|
|
|
112 |
);
|
|
|
113 |
|
|
|
114 |
$menuList[] = array(
|
|
|
115 |
'id' => 12,
|
|
|
116 |
'name' => $this->spTextPanel['System Settings'],
|
|
|
117 |
'url_section' => 'settings'
|
|
|
118 |
);
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
$menuList[] = array(
|
|
|
122 |
'id' => 13,
|
|
|
123 |
'name' => $_SESSION['text']['common']['My Account'],
|
|
|
124 |
'url_section' => 'my-profile'
|
|
|
125 |
);
|
|
|
126 |
|
|
|
127 |
$menuList[] = array(
|
|
|
128 |
'id' => 14,
|
|
|
129 |
'name' => $this->spTextPanel['About Us'],
|
|
|
130 |
'url_section' => 'about-us'
|
|
|
131 |
);
|
|
|
132 |
|
|
|
133 |
$menuSelected = empty($info['menu_selected']) ? 'websites' : urldecode($info['menu_selected']);
|
|
|
134 |
$this->set('menuList', $menuList);
|
|
|
135 |
$this->set('menuSelected', $menuSelected);
|
|
|
136 |
$startScript = empty($info['start_script']) ? "websites.php" : urldecode($info['start_script']);
|
|
|
137 |
if (!stristr($startScript, '.php')) {
|
|
|
138 |
$startScript .= ".php";
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
$arguments = "";
|
|
|
142 |
foreach ($info as $key => $value) {
|
|
|
143 |
if (!in_array($key, array('menu_selected', 'start_script'))) {
|
|
|
144 |
$key = htmlentities($key, ENT_QUOTES);
|
|
|
145 |
$value = htmlentities(urldecode($value), ENT_QUOTES);
|
|
|
146 |
$arguments .= "&$key=$value";
|
|
|
147 |
|
|
|
148 |
}
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
$this->set('startFunction', "scriptDoLoad('$startScript', 'content', '$arguments')");
|
|
|
152 |
|
|
|
153 |
$this->render('adminpanel/adminpanel');
|
|
|
154 |
}
|
|
|
155 |
}
|
|
|
156 |
?>
|