-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathQuickWebProxy.ctrl.php
More file actions
134 lines (107 loc) · 3.18 KB
/
QuickWebProxy.ctrl.php
File metadata and controls
134 lines (107 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
/**
* Copyright (C) 2009-2019 www.seopanel.org. All rights reserved.
* @author Geo Varghese
*
*/
// include plugins controller if not included
include_once(SP_CTRLPATH.'/seoplugins.ctrl.php');
class QuickWebProxy extends SeoPluginsController{
// plugin settings controller object
var $settingsCtrler;
// plugin helper controller object
var $helperCtrler;
// the plugin text database table
var $textTable = "texts";
// the plugin text category
var $textCategory = "QuickWebProxy";
// plugin directory name
var $directoryName = "QuickWebProxy";
/*
* function to init plugin details before each plugin action
*/
function initPlugin($data) {
$this->setPluginTextsForRender($this->textCategory, $this->textTable);
$this->set('pluginText', $this->pluginText);
if (!defined('PLUGIN_PATH')) {
define('PLUGIN_PATH', $this->pluginPath);
}
// create setting object and define all settings
$this->settingsCtrler = $this->createHelper('QWP_Settings');
$this->settingsCtrler->defineAllPluginSystemSettings();
// create helper object
$this->helperCtrler = $this->createHelper('QWP_Helper');
}
/*
* func to assign common data to an object
*/
function assignCommonDataToObject($object) {
$object->data = $this->data;
$object->pluginText = $this->pluginText;
return $object;
}
/*
* function to show the first pagewhile access plugin
*/
function index($data) {
if (isAdmin() || QWP_ALLOW_USER_WEB_PROXY) {
$this->helperCtrler->showWebProxyForm($data);
} else {
$this->settingsCtrler->showPluginAboutUs();
}
}
/*
* function to show the first pagewhile access plugin
*/
function doWebProxy($data) {
$this->helperCtrler->doWebProxy($data);
}
/*
* function to show the first pagewhile access plugin
*/
function processWebProxy($data) {
if (SP_DEMO) {
showErrorMsg("Operation not allowed.");
} else {
if (isAdmin() || QWP_ALLOW_USER_WEB_PROXY) {
$this->helperCtrler->processWebProxy($data);
} else {
showErrorMsg("Operation not allowed.");
}
}
}
/*
* function show system settings
*/
function settings($data) {
checkAdminLoggedIn();
$this->settingsCtrler->showPluginSettings();
}
/*
* function to save plugin settings
*/
function updateSettings($data) {
checkAdminLoggedIn();
$this->settingsCtrler->updatePluginSettings($data);
}
/*
* func to show about us
*/
function aboutus() {
$this->settingsCtrler->set('spTextPanel', $this->getLanguageTexts('panel', $_SESSION['lang_code']));
$this->settingsCtrler->showPluginAboutUs();
}
/**
* function to show proxy server reports form
*/
function report($data){
$this->helperCtrler->viewFilter($data);
}
/**
* function to show proxy server reports
*/
function showReport($data){
$this->helperCtrler->showReportSummary($data);
}
}
?>