Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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."/proxy.ctrl.php");
26
$controller = New ProxyController();
27
$controller->view->menu = 'adminpanel';
28
$controller->layout = 'ajax';
29
$controller->set('spTextPanel', $controller->getLanguageTexts('panel', $_SESSION['lang_code']));
30
$controller->spTextProxy = $controller->getLanguageTexts('proxy', $_SESSION['lang_code']);
31
$controller->set('spTextProxy', $controller->spTextProxy);
32
$controller->set('spTextSA', $controller->getLanguageTexts('siteauditor', $_SESSION['lang_code']));
33
 
34
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
35
 
36
	switch ($_POST['sec']) {
37
 
38
		case "create":
39
		    $_POST = sanitizeData($_POST, true, true);
40
			$controller->createProxy($_POST);
41
			break;
42
 
43
		case "update":
44
		    $_POST = sanitizeData($_POST, true, true);
45
			$controller->updateProxy($_POST);
46
			break;
47
 
48
		case "activateall":
49
		    if (!empty($_POST['ids'])) {
50
    		    foreach($_POST['ids'] as $id) {
51
    		        $controller->__changeStatus($id, 1);
52
    		    }
53
		    }
54
			$controller->listProxy($_POST);
55
		    break;
56
 
57
		case "inactivateall":
58
		    if (!empty($_POST['ids'])) {
59
    		    foreach($_POST['ids'] as $id) {
60
    		        $controller->__changeStatus($id, 0);
61
    		    }
62
		    }
63
			$controller->listProxy($_POST);
64
		    break;
65
 
66
		case "deleteall":
67
		    if (!empty($_POST['ids'])) {
68
    		    foreach($_POST['ids'] as $id) {
69
    		        $controller->__deleteProxy($id);
70
    		    }
71
		    }
72
			$controller->listProxy($_POST);
73
		    break;
74
 
75
	    case "checkall":
76
	    	if (!empty($_POST['ids'])) {
77
	    		foreach($_POST['ids'] as $id) {
78
	    			$controller->checkStatus($id);
79
	    		}
80
	    	}
81
	    	$controller->listProxy($_POST);
82
	    	break;
83
 
84
		case "checkAllstatus":
85
			$controller->checkAllProxyStatus($_POST);
86
			break;
87
 
88
		case "importproxy":
89
			$controller->importProxy($_POST);
90
			break;
91
 
92
		case "perfomance":
93
			$controller->showProxyPerfomance($_POST);
94
			break;
95
 
96
		default:
97
			$controller->listProxy($_POST);
98
			break;
99
 
100
	}
101
 
102
} else {
103
 
104
	switch ($_GET['sec']) {
105
 
106
		case "Activate":
107
			$controller->__changeStatus($_GET['proxyId'], 1);
108
			$controller->listProxy($_GET);
109
			break;
110
 
111
		case "Inactivate":
112
			$controller->__changeStatus($_GET['proxyId'], 0);
113
			$controller->listProxy($_GET);
114
			break;
115
 
116
		case "delete":
117
			$controller->__deleteProxy($_GET['proxyId']);
118
			$controller->listProxy($_GET);
119
			break;
120
 
121
		case "edit":
122
			$controller->editProxy($_GET['proxyId']);
123
			break;
124
 
125
		case "new":
126
			$controller->newProxy($_GET);
127
			break;
128
 
129
		case "checkstatus":
130
			$controller->checkStatus($_GET['proxyId']);
131
			$controller->listProxy($_GET);
132
			break;
133
 
134
		case "checkAllstatus":
135
			$controller->showcheckAllStatus($_GET);
136
			break;
137
 
138
		case "runcheckstatus":
139
			$controller->runCheckStatus($_GET);
140
			break;
141
 
142
		case "import":
143
			$controller->showImportProxy($_GET);
144
			break;
145
 
146
		case "croncommand":
147
			$controller->showCronCommand();
148
			break;
149
 
150
		case "perfomance":
151
			$controller->showProxyPerfomance($_GET);
152
			break;
153
 
154
		default:
155
			$controller->listProxy($_GET);
156
			break;
157
	}
158
}
159
?>