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 |
checkAdminLoggedIn();
|
|
|
25 |
include_once(SP_CTRLPATH."/searchengine.ctrl.php");
|
|
|
26 |
$controller = New SearchEngineController();
|
|
|
27 |
$controller->view->menu = 'se-manager';
|
|
|
28 |
$controller->layout = 'ajax';
|
|
|
29 |
$controller->spTextPanel = $controller->getLanguageTexts('panel', $_SESSION['lang_code']);
|
|
|
30 |
$controller->set('spTextPanel', $controller->spTextPanel);
|
|
|
31 |
$controller->spTextUser = $controller->getLanguageTexts('searchengine', $_SESSION['lang_code']);
|
|
|
32 |
$controller->set('spTextSE', $controller->spTextUser);
|
|
|
33 |
|
|
|
34 |
if($_SERVER['REQUEST_METHOD'] == 'POST'){
|
|
|
35 |
|
|
|
36 |
switch($_POST['sec']){
|
|
|
37 |
|
|
|
38 |
case "activateall":
|
|
|
39 |
if (!empty($_POST['ids'])) {
|
|
|
40 |
foreach($_POST['ids'] as $id) {
|
|
|
41 |
$controller->__changeStatus($id, 1);
|
|
|
42 |
}
|
|
|
43 |
}
|
|
|
44 |
$controller->listSE($_POST);
|
|
|
45 |
break;
|
|
|
46 |
|
|
|
47 |
case "inactivateall":
|
|
|
48 |
if (!empty($_POST['ids'])) {
|
|
|
49 |
foreach($_POST['ids'] as $id) {
|
|
|
50 |
$controller->__changeStatus($id, 0);
|
|
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
$controller->listSE($_POST);
|
|
|
54 |
break;
|
|
|
55 |
|
|
|
56 |
case "deleteall":
|
|
|
57 |
if (!empty($_POST['ids'])) {
|
|
|
58 |
foreach($_POST['ids'] as $id) {
|
|
|
59 |
$controller->__deleteSearchEngine($id);
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
$controller->listSE($_POST);
|
|
|
63 |
break;
|
|
|
64 |
|
|
|
65 |
case "do-sync-se":
|
|
|
66 |
$result = $controller->doSyncSearchEngines();
|
|
|
67 |
if ($result['status']) {
|
|
|
68 |
Session::setSessionMessages($result['result'], false);
|
|
|
69 |
} else {
|
|
|
70 |
Session::setSessionMessages($result['result'], true);
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
$controller->showSyncSearchEngines();
|
|
|
74 |
break;
|
|
|
75 |
|
|
|
76 |
default:
|
|
|
77 |
$controller->listSE($_POST);
|
|
|
78 |
break;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
}else{
|
|
|
82 |
switch($_GET['sec']){
|
|
|
83 |
|
|
|
84 |
case "Activate":
|
|
|
85 |
$controller->__changeStatus($_GET['seId'], 1);
|
|
|
86 |
$controller->listSE($_GET);
|
|
|
87 |
break;
|
|
|
88 |
|
|
|
89 |
case "Inactivate":
|
|
|
90 |
$controller->__changeStatus($_GET['seId'], 0);
|
|
|
91 |
$controller->listSE($_GET);
|
|
|
92 |
break;
|
|
|
93 |
|
|
|
94 |
case "delete":
|
|
|
95 |
$controller->__deleteSearchEngine($_GET['seId']);
|
|
|
96 |
$controller->listSE($_GET);
|
|
|
97 |
break;
|
|
|
98 |
|
|
|
99 |
case "sync-se":
|
|
|
100 |
$controller->showSyncSearchEngines($_GET);
|
|
|
101 |
break;
|
|
|
102 |
|
|
|
103 |
default:
|
|
|
104 |
$controller->listSE($_GET);
|
|
|
105 |
break;
|
|
|
106 |
}
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
?>
|