Subversion Repositories cheapmusic

Rev

Rev 103 | Details | Compare with Previous | 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();
155 - 25
isHavingWebsite();
103 - 26
include_once(SP_CTRLPATH."/keyword.ctrl.php");
27
include_once(SP_CTRLPATH."/overview.ctrl.php");
28
$controller = New OverviewController();
29
$controller->view->menu = 'home';
30
$controller->layout = 'ajax';
31
 
32
$spTextHome = $controller->getLanguageTexts('home', $_SESSION['lang_code']);
33
$controller->set('spTextHome', $spTextHome);
34
 
35
// set site details according to customizer plugin
36
$custSiteInfo = getCustomizerDetails();
37
if (!empty($custSiteInfo['site_title'])) $controller->set('spTitle', $custSiteInfo['site_title']);
38
if (!empty($custSiteInfo['site_description'])) $controller->set('spDescription', $custSiteInfo['site_description']);
39
if (!empty($custSiteInfo['site_keywords'])) $controller->set('spKeywords', $custSiteInfo['site_keywords']);
40
 
41
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
42
 
43
    switch($_GET['sec']) {
44
 
45
        case "page-overview":
46
            $controller->showPageOverview($_GET['website_id'], $_GET['from_time'], $_GET['to_time']);
47
            break;
48
 
49
        case "page-overview-data":
50
            $controller->showPageOverviewData($_GET);
51
            break;
52
 
53
	    case "keyword-overview":
54
	        $controller->showKeywordOverview($_GET['website_id'], $_GET['from_time'], $_GET['to_time']);
55
	        break;
56
 
57
	    case "keyword-overview-data":
58
	        $controller->showKeywordOverviewData($_GET);
59
	        break;
60
 
61
	    default:
62
	        $controller->layout = 'default';
63
		    $controller->showOverView($_GET);
64
			break;
65
 
66
	}
67
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
68
 
69
	switch($_POST['sec']){
70
 
71
	    default:
72
	        $controller->layout = 'default';
73
	        $controller->showOverView($_POST);
74
			break;
75
 
76
	}
77
}
78
?>