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("sm-checker");
28
 
29
include_once(SP_CTRLPATH."/social_media.ctrl.php");
30
$controller = New SocialMediaController();
31
$controller->view->menu = 'seotools';
32
$controller->layout = 'ajax';
33
$controller->set('spTextTools', $controller->getLanguageTexts('seotools', $_SESSION['lang_code']));
34
$controller->spTextSMC = $controller->getLanguageTexts('socialmedia', $_SESSION['lang_code']);
35
$controller->set('spTextSMC', $controller->spTextSMC);
36
 
37
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
38
 
39
    switch($_POST['sec']){
40
 
41
		case "doQuickChecker":
42
			$controller->doQuickChecker($_POST);
43
			break;
44
 
45
        case "updateSocialMediaLink":
46
            $controller->verifyActionAllowed($_POST['id']);
47
            $controller->updateSocialMediaLink($_POST);
48
            break;
49
 
50
        case "createSocialMediaLink":
51
            $controller->createSocialMediaLink($_POST);
52
            break;
53
 
54
	    case "reportSummary":
55
	        $controller->viewReportSummary($_POST);
56
	        break;
57
 
58
	    case "viewDetailedReports":
59
	        $controller->viewDetailedReports($_POST);
60
	        break;
61
 
62
	    case "viewGraphReports":
63
	        $controller->viewGraphReports($_POST);
64
	        break;
65
 
66
	    default:
67
	        $controller->showSocialMediaLinks($_POST);
68
			break;
69
	}
70
 
71
} else {
72
 
73
    switch($_GET['sec']) {
74
 
75
		case "quickChecker":
76
			$controller->viewQuickChecker($_GET);
77
			break;
78
 
79
        case "Activate":
80
            $controller->verifyActionAllowed($_GET['id']);
81
            $controller->__changeStatus($_GET['id'], 1);
82
            $controller->showSocialMediaLinks($_GET);
83
            break;
84
 
85
        case "Inactivate":
86
            $controller->verifyActionAllowed($_GET['id']);
87
            $controller->__changeStatus($_GET['id'], 0);
88
            $controller->showSocialMediaLinks($_GET);
89
            break;
90
 
91
        case "delete":
92
            $controller->verifyActionAllowed($_GET['id']);
93
            $controller->deleteSocialMediaLink($_GET['id']);
94
            break;
95
 
96
        case "edit":
97
            $controller->editSocialMediaLink($_GET['id']);
98
            break;
99
 
100
	    case "newSocialMediaLink":
101
	        $controller->newSocialMediaLink($_GET);
102
	        break;
103
 
104
	    case "reportSummary":
105
	        $controller->viewReportSummary($_GET);
106
	        break;
107
 
108
		case "viewDetailedReports":
109
			$controller->viewDetailedReports($_GET);
110
			break;
111
 
112
		case "viewGraphReports":
113
			$controller->viewGraphReports($_GET);
114
			break;
115
 
116
		case "linkSelectBox":
117
		    $controller->showSocialMediaLinkSelectBox($_GET['website_id']);
118
		    break;
119
 
120
		default:
121
			$controller->showSocialMediaLinks($_GET);
122
			break;
123
	}
124
 
125
}
126
?>