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 |
include_once("includes/sp-load.php");
|
|
|
24 |
checkLoggedIn();
|
|
|
25 |
|
|
|
26 |
// check for access to seo tool
|
|
|
27 |
isUserHaveAccessToSeoTool("site-auditor");
|
|
|
28 |
|
|
|
29 |
include_once(SP_CTRLPATH."/siteauditor.ctrl.php");
|
|
|
30 |
$controller = New SiteAuditorController();
|
|
|
31 |
$controller->view->menu = 'seotools';
|
|
|
32 |
$controller->layout = 'ajax';
|
|
|
33 |
$controller->set('spTextTools', $controller->getLanguageTexts('seotools', $_SESSION['lang_code']));
|
|
|
34 |
$controller->set('spTextPanel', $controller->getLanguageTexts('panel', $_SESSION['lang_code']));
|
|
|
35 |
$controller->spTextSA = $controller->getLanguageTexts('siteauditor', $_SESSION['lang_code']);
|
|
|
36 |
$controller->set('spTextSA', $controller->spTextSA);
|
|
|
37 |
|
|
|
38 |
if($_SERVER['REQUEST_METHOD'] == 'POST'){
|
|
|
39 |
|
|
|
40 |
switch($_POST['sec']){
|
|
|
41 |
|
|
|
42 |
case "create":
|
|
|
43 |
$controller->set('spTextSettings', $controller->getLanguageTexts('settings', $_SESSION['lang_code']));
|
|
|
44 |
$controller->createProject($_POST);
|
|
|
45 |
break;
|
|
|
46 |
|
|
|
47 |
case "update":
|
|
|
48 |
$controller->set('spTextSettings', $controller->getLanguageTexts('settings', $_SESSION['lang_code']));
|
|
|
49 |
$controller->updateProject($_POST);
|
|
|
50 |
break;
|
|
|
51 |
|
|
|
52 |
case "activateall":
|
|
|
53 |
if (!empty($_POST['ids'])) {
|
|
|
54 |
foreach($_POST['ids'] as $id) {
|
|
|
55 |
$controller->__changeStatus($id, 1);
|
|
|
56 |
}
|
|
|
57 |
}
|
|
|
58 |
$controller->showAuditorProjects($_POST);
|
|
|
59 |
break;
|
|
|
60 |
|
|
|
61 |
case "inactivateall":
|
|
|
62 |
if (!empty($_POST['ids'])) {
|
|
|
63 |
foreach($_POST['ids'] as $id) {
|
|
|
64 |
$controller->__changeStatus($id, 0);
|
|
|
65 |
}
|
|
|
66 |
}
|
|
|
67 |
$controller->showAuditorProjects($_POST);
|
|
|
68 |
break;
|
|
|
69 |
|
|
|
70 |
case "deleteall":
|
|
|
71 |
if (!empty($_POST['ids'])) {
|
|
|
72 |
foreach($_POST['ids'] as $id) {
|
|
|
73 |
$controller->__deleteProject($id);
|
|
|
74 |
}
|
|
|
75 |
}
|
|
|
76 |
$controller->showAuditorProjects($_POST);
|
|
|
77 |
break;
|
|
|
78 |
|
|
|
79 |
case "showreport":
|
|
|
80 |
$controller->showProjectReport($_POST);
|
|
|
81 |
break;
|
|
|
82 |
|
|
|
83 |
case "importlinks":
|
|
|
84 |
$controller->importLinks($_POST);
|
|
|
85 |
break;
|
|
|
86 |
|
|
|
87 |
default:
|
|
|
88 |
$controller->showAuditorProjects($_POST);
|
|
|
89 |
break;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
}else{
|
|
|
93 |
switch($_GET['sec']){
|
|
|
94 |
|
|
|
95 |
case "Activate":
|
|
|
96 |
$controller->__changeStatus($_GET['project_id'], 1);
|
|
|
97 |
$controller->showAuditorProjects($_GET);
|
|
|
98 |
break;
|
|
|
99 |
|
|
|
100 |
case "Inactivate":
|
|
|
101 |
$controller->__changeStatus($_GET['project_id'], 0);
|
|
|
102 |
$controller->showAuditorProjects($_GET);
|
|
|
103 |
break;
|
|
|
104 |
|
|
|
105 |
case "delete":
|
|
|
106 |
$controller->__deleteProject($_GET['project_id']);
|
|
|
107 |
$controller->showAuditorProjects($_GET);
|
|
|
108 |
break;
|
|
|
109 |
|
|
|
110 |
case "new":
|
|
|
111 |
$controller->set('spTextSettings', $controller->getLanguageTexts('settings', $_SESSION['lang_code']));
|
|
|
112 |
$controller->newProject($_GET);
|
|
|
113 |
break;
|
|
|
114 |
|
|
|
115 |
case "edit":
|
|
|
116 |
$controller->set('spTextSettings', $controller->getLanguageTexts('settings', $_SESSION['lang_code']));
|
|
|
117 |
$controller->editProject($_GET['project_id']);
|
|
|
118 |
break;
|
|
|
119 |
|
|
|
120 |
case "showrunproject":
|
|
|
121 |
$controller->showRunProject($_GET['project_id']);
|
|
|
122 |
break;
|
|
|
123 |
|
|
|
124 |
case "runproject":
|
|
|
125 |
$controller->runProject($_GET['project_id']);
|
|
|
126 |
break;
|
|
|
127 |
|
|
|
128 |
case "viewreports":
|
|
|
129 |
$controller->viewReports($_GET);
|
|
|
130 |
break;
|
|
|
131 |
|
|
|
132 |
case "pagedetails":
|
|
|
133 |
$controller->viewPageDetails($_GET);
|
|
|
134 |
break;
|
|
|
135 |
|
|
|
136 |
case "recheckreport":
|
|
|
137 |
$controller->recheckReportPages($_GET['project_id']);
|
|
|
138 |
$controller->showRunProject($_GET['project_id']);
|
|
|
139 |
break;
|
|
|
140 |
|
|
|
141 |
case "showreport":
|
|
|
142 |
$controller->showProjectReport($_GET);
|
|
|
143 |
break;
|
|
|
144 |
|
|
|
145 |
case "checkscore":
|
|
|
146 |
$controller->checkPageScore($_GET);
|
|
|
147 |
break;
|
|
|
148 |
|
|
|
149 |
case "deletepage":
|
|
|
150 |
$controller->__deleteReportPage($_GET['report_id']);
|
|
|
151 |
$controller->loadReportsPage($_GET);
|
|
|
152 |
break;
|
|
|
153 |
|
|
|
154 |
case "croncommand":
|
|
|
155 |
$controller->showCronCommand();
|
|
|
156 |
break;
|
|
|
157 |
|
|
|
158 |
case "showsettings":
|
|
|
159 |
$settingCtrler = $controller->createController('Settings');
|
|
|
160 |
$settingCtrler->set('spTextPanel', $controller->getLanguageTexts('panel', $_SESSION['lang_code']));
|
|
|
161 |
$settingCtrler->spTextSettings = $controller->getLanguageTexts('settings', $_SESSION['lang_code']);
|
|
|
162 |
$settingCtrler->set('spTextSettings', $settingCtrler->spTextSettings);
|
|
|
163 |
$settingCtrler->set('headLabel', $controller->spTextSA['Site Auditor Settings']);
|
|
|
164 |
$settingCtrler->showSystemSettings('siteauditor');
|
|
|
165 |
break;
|
|
|
166 |
|
|
|
167 |
case "importlinks":
|
|
|
168 |
$controller->showImportProjectLinks($_GET);
|
|
|
169 |
break;
|
|
|
170 |
|
|
|
171 |
default:
|
|
|
172 |
$controller->showAuditorProjects($_GET);
|
|
|
173 |
break;
|
|
|
174 |
}
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
?>
|