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
checkLoggedIn();
25
 
26
// check for access to seo tool
27
isUserHaveAccessToSeoTool("keyword-position-checker");
28
 
29
include_once(SP_CTRLPATH."/keyword.ctrl.php");
30
include_once(SP_CTRLPATH."/website.ctrl.php");
31
include_once(SP_CTRLPATH."/user-type.ctrl.php");
32
include_once(SP_CTRLPATH."/searchengine.ctrl.php");
33
$controller = New KeywordController();
34
$controller->view->menu = 'seotools';
35
$controller->layout = 'ajax';
36
$controller->set('spTextTools', $controller->getLanguageTexts('seotools', $_SESSION['lang_code']));
37
$controller->spTextKeyword = $controller->getLanguageTexts('keyword', $_SESSION['lang_code']);
38
$controller->set('spTextKeyword', $controller->spTextKeyword);
39
 
40
 
41
$userId = isLoggedIn();
42
 
43
if($_SERVER['REQUEST_METHOD'] == 'POST'){
44
 
45
	switch($_POST['sec']){
46
		case "create":
47
			$controller->createKeyword($_POST);
48
			break;
49
 
50
		case "update":
51
			$controller->updateKeyword($_POST);
52
			break;
53
 
54
		case "import":
55
			$controller->createImportedKeywords($_POST);
56
			break;
57
 
58
		case "activateall":
59
		    if (!empty($_POST['ids'])) {
60
    		    foreach($_POST['ids'] as $id) {
61
    		        $controller->__changeStatus($id, 1);
62
    		    }
63
		    }
64
			$controller->listKeywords($_POST);
65
		    break;
66
 
67
		case "inactivateall":
68
		    if (!empty($_POST['ids'])) {
69
    		    foreach($_POST['ids'] as $id) {
70
    		        $controller->__changeStatus($id, 0);
71
    		    }
72
		    }
73
			$controller->listKeywords($_POST);
74
		    break;
75
 
76
		case "deleteall":
77
		    if (!empty($_POST['ids'])) {
78
    		    foreach($_POST['ids'] as $id) {
79
    		        $controller->__deleteKeyword($id);
80
    		    }
81
		    }
82
			$controller->listKeywords($_POST);
83
		    break;
84
 
85
		default:
86
			$controller->listKeywords($_POST);
87
			break;
88
	}
89
 
90
}else{
91
	switch($_GET['sec']){
92
 
93
		case "Activate":
94
			$controller->__changeStatus($_GET['keywordId'], 1);
95
			$controller->listKeywords($_GET);
96
			break;
97
 
98
		case "Inactivate":
99
			$controller->__changeStatus($_GET['keywordId'], 0);
100
			$controller->listKeywords($_GET);
101
			break;
102
 
103
		case "reports":
104
			$controller->showKeywordReports($_GET['keywordId']);
105
			break;
106
 
107
		case "delete":
108
			$controller->__deleteKeyword($_GET['keywordId']);
109
			$controller->listKeywords($_GET);
110
			break;
111
 
112
		case "edit":
113
			$controller->editKeyword($_GET['keywordId']);
114
			break;
115
 
116
		case "new":
117
			$controller->set('post', $_GET);
118
			$controller->newKeyword();
119
			break;
120
 
121
		case "import":
122
			$controller->set('post', $_GET);
123
			$controller->importKeywords();
124
			break;
125
 
126
		case "keywordbox":
127
			$controller->set('keyNull', $_GET['keyNull']);
128
			$controller->showKeywordSelectBox($userId, $_GET['website_id']);
129
			break;
130
 
131
		default:
132
			$controller->listKeywords($_GET);
133
			break;
134
	}
135
}
136
 
137
?>