Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

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