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("rank-checker");
28
 
29
include_once(SP_CTRLPATH."/rank.ctrl.php");
30
include_once(SP_CTRLPATH."/moz.ctrl.php");
31
$controller = New RankController();
32
$controller->view->menu = 'seotools';
33
$controller->layout = 'ajax';
34
$controller->spTextTools = $controller->getLanguageTexts('seotools', $_SESSION['lang_code']);
35
$controller->set('spTextTools', $controller->spTextTools);
36
$controller->spTextRank = $controller->getLanguageTexts('rank', $_SESSION['lang_code']);
37
$controller->set('spTextRank', $controller->spTextRank);
38
 
39
if($_SERVER['REQUEST_METHOD'] == 'POST'){
40
 
41
	switch($_POST['sec']){
42
 
43
		case "quickrank":
44
			if (isQuickCheckerEnabled()) {
45
				$controller->findQuickRank($_POST);
46
			} else {
47
				showErrorMsg($_SESSION['text']['label']["Access denied"]);
48
			}
49
			break;
50
 
51
		case "generate":
52
			if(SP_USER_GEN_REPORT || isAdmin()){
53
				$controller->generateReports($_POST);
54
			} else {
55
				showErrorMsg($_SESSION['text']['label']["Access denied"]);
56
			}
57
			break;
58
 
59
		case "reports":
60
			$controller->showReports($_POST);
61
			break;
62
 
63
		case "showpr":
64
			$controller->printGooglePageRank(urldecode($_POST['url']));
65
			break;
66
 
67
		case "showalexa":
68
			$controller->printAlexaRank(urldecode($_POST['url']));
69
			break;
70
 
71
		case "showmozrank":
72
			$controller->printMOZRank(urldecode($_POST['url']));
73
			break;
74
 
75
		case "graphical-reports":
76
			$controller->showGraphicalReports($_POST);
77
			break;
78
 
79
		default:
80
			$controller->findQuickRank($_POST);
81
			break;
82
	}
83
 
84
}else{
85
	switch($_GET['sec']){
86
 
87
		case "quickrank":
88
			$controller->showQuickRankChecker();
89
			break;
90
 
91
		case "showpr":
92
			$controller->printGooglePageRank(urldecode($_GET['url']));
93
			break;
94
 
95
		case "showmozrank":
96
			$controller->printMOZRank(urldecode($_GET['url']));
97
			break;
98
 
99
		case "showalexa":
100
			$controller->printAlexaRank(urldecode($_GET['url']));
101
			break;
102
 
103
		case "alexaimg":
104
			$controller->printAlexaRankImg($_GET['rank']);
105
			break;
106
 
107
		case "generate":
108
			$controller->showGenerateReports($_GET);
109
			break;
110
 
111
		case "reports":
112
			$controller->showReports($_GET);
113
			break;
114
 
115
		case "graphical-reports":
116
			$controller->showGraphicalReports($_GET);
117
			break;
118
 
119
		default:
120
			$controller->showQuickRankChecker();
121
			break;
122
	}
123
}
124
 
125
?>