-
Notifications
You must be signed in to change notification settings - Fork 1
/
diarycron.php
39 lines (35 loc) · 1.24 KB
/
diarycron.php
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
<?php
/**
* Copyright (C) 2009-2019 www.seopanel.in. All rights reserved.
* @author Geo Varghese
*
*/
$dirpath = realpath(dirname(__FILE__));
$spLoadFile = "$dirpath/../../includes/sp-load.php";
$spLoadFileExist = true;
if (!file_exists($spLoadFile)) {
$dirpath = str_ireplace('/plugins/SeoDiary/diarycron.php', '', $_SERVER['SCRIPT_FILENAME']);
$spLoadFile = $dirpath."/includes/sp-load.php";
$spLoadFileExist = !file_exists($spLoadFile) ? false : true;
}
// check wheteher load file exists
if ($spLoadFileExist) {
include_once($spLoadFile);
/*if (empty($_SERVER['REQUEST_METHOD'])) {*/
if (empty($_SERVER['REQUEST_METHOD'])) {
include_once(SP_CTRLPATH."/seoplugins.ctrl.php");
$controller = New SeoPluginsController();
$pluginInfo = $controller->__getSeoPluginInfo('SeoDiary', 'name');
$info['pid'] = $pluginInfo['id'];
$info['action'] = "cronJob";
$_GET['doc_type'] = 'export';
$controller->manageSeoPlugins($info, "get", true);
/*} else {
} else {
showErrorMsg("<p style='color:red'>You don't have permission to access this page!</p>");
}*/
}
} else {
echo "Seo Panel Bootstrap loader file not accessible!";
}
?>