Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.19 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 15.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (!function_exists('sm_error')) {
  15. function sm_error($error)
  16. {
  17. global $e;
  18. global $uid;
  19. global $app;
  20. @ob_end_clean();
  21. header('Content-Encoding: none');
  22.  
  23. if (!isset($_SERVER['REQUEST_URI'])) {
  24. echo $error;
  25.  
  26. exit();
  27. }
  28.  
  29. echo "<html>\n<head>\n\t<title>";
  30. echo _('Sitemanager Error');
  31. echo "</title>\n\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\t<style type=\"text/css\" media=\"screen\">\n\t\t#errormsg {\n\t\t\tpadding: 5px;\n\t\t\tbackground-color: #ffffcc;\n\t\t}\n\t\t\n\t\t#footer {\n\t\t\tcolor: gray;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t\t\n\t\th1 {\n\t\t\tmargin-bottom: 5px;\n\t\t\tfont-size: 18px;\n\t\t}\n\t\t\n\t\thtml, td {\n\t\t\tfont: 11px Arial, Helvetica, sans-serif;\n\t\t}\n\t\t\n\t\thtml {\n\t\t\tborder-top: 8px solid red;\n\t\t}\n\t\t\n\t\ta {\n\t\t\tcolor: blue;\n\t\t\ttext-decoration: underline;\n\t\t}\n\t</style>\n</head>\n<body>\n\t<h1>Sitemanager error</h1>\n<div>";
  32. echo '<div id="errormsg">' . nl2br($error) . "</div>\n";
  33. echo "\t<h3>Backtrace</h3>\n\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n";
  34. $trace = debug_backtrace();
  35.  
  36. foreach ($trace as $key => $array) {
  37. echo "\t<tr style=\"background: ";
  38. echo($key % 2 ? '#e7e7e7' : '');
  39. echo "\">\n\t\t<td>";
  40. echo $array['file'];
  41. echo "</td>\n\t\t<td>";
  42. echo $array['line'];
  43. echo "</td>\n\t\t<td>";
  44. echo $array['function'];
  45. echo "</td>\n\t</tr>\n";
  46. }
  47. echo "\t</table>\n\t<div id=\"footer\">";
  48. echo(defined('SM_VERSION') ? SM_VERSION : '');
  49. echo "</div>\n</body>\n</html>\n";
  50.  
  51. exit();
  52. }
  53. }
  54.  
  55. if (!defined('SM_LICENCER_VERSION')) {
  56. if (!function_exists('gettext')) {
  57. function _($str)
  58. {
  59. return $str;
  60. }
  61.  
  62. function _q($str)
  63. {
  64. return $str;
  65. }
  66.  
  67. function _qe($str)
  68. {
  69. return str_replace("'", "\\'", $str);
  70. }
  71.  
  72. function ngettext($str1, $str2, $i)
  73. {
  74. if (1 < $i) {
  75. return $str2;
  76. }
  77.  
  78. return $str1;
  79. }
  80.  
  81. function gettext_date($format, $timestamp = '')
  82. {
  83. return date($format, $timestamp);
  84. }
  85.  
  86. return 1;
  87. }
  88.  
  89. function _q($str)
  90. {
  91. return $str;
  92. }
  93.  
  94. function _qe($str)
  95. {
  96. return str_replace("'", "\\'", $str);
  97. }
  98.  
  99. function gettext_date($format, $timestamp = '')
  100. {
  101. return date($format, $timestamp);
  102. }
  103. }
  104.  
  105. function sm_get_page()
  106. {
  107. global $appurl;
  108. global $pid;
  109. global $pages;
  110. global $page;
  111. global $url;
  112. global $fullname;
  113. global $company_name;
  114. global $crequest;
  115. $temp = explode('C', preg_replace('/\\?.*$/', '', $_SERVER['REQUEST_URI']), 2);
  116. $crequest = preg_replace('/\\/(.*?)\\/?$/', '\\1', $temp[0]);
  117.  
  118. if (1 < count($temp)) {
  119. $appurl = preg_replace('/^\\/(.*?)\\/?$/', '\\1', $temp[1]);
  120. $appurl = explode('/', $appurl);
  121. } else {
  122. $appurl = array();
  123. }
  124.  
  125. $url = explode('/', $crequest);
  126.  
  127. if ($url[0] == '/' || $url[0] == '') {
  128. $url[0] = 'home';
  129. }
  130.  
  131. $q = "SELECT id FROM pages WHERE parent = 0 AND symbolic = '" . $url[0] . "'";
  132. $result = dbexec($q);
  133. list($id) = mysql_fetch_row($result);
  134. $pages = array();
  135.  
  136. if (!empty($id)) {
  137. array_push($pages, $id);
  138. }
  139.  
  140. for ($i = 1; $i < count($url); $i++) {
  141. $q = "SELECT id FROM pages WHERE parent = '" . $id . "' AND symbolic = '" . $url[$i] . "'";
  142. $result = dbexec($q);
  143. list($id) = mysql_fetch_row($result);
  144.  
  145. if (!empty($id)) {
  146. array_push($pages, $id);
  147. }
  148. }
  149. $q = "SELECT full_name, symbolic, title, keywords, description, charset FROM pages WHERE id = '" . $id . "' AND publish > 0";
  150. $result = dbexec($q);
  151. $keywords = $title = $description = $charset = '';
  152.  
  153. if (0 < mysql_num_rows($result)) {
  154. list($fullname, $page, $title, $keywords, $description, $charset) = mysql_fetch_row($result);
  155. $pid = $id;
  156. mysql_free_result($result);
  157. } else {
  158. $pages = array();
  159. $GLOBALS['error_404'] = true;
  160. }
  161.  
  162. $q = "SELECT name, value FROM config WHERE tag = 'SITE'";
  163. $result = dbexec($q);
  164.  
  165. while ($row = mysql_fetch_assoc($result)) {
  166. $s[$row['name']] = $row['value'];
  167. }
  168. $q = 'SELECT c.company, c.city, g.country_name FROM contact as c, ' . GLOBALDB . '.countries as g WHERE c.id = 1 AND c.country = g.country_code';
  169. list($company_name, $city, $country) = mysql_fetch_row(dbexec($q));
  170.  
  171. if ($title == '%AUTO%' && $keywords == '%AUTO%' && $description == '%AUTO%') {
  172. if (!empty($s['AUTO_MARKETING']) && empty($GLOBALS['error_404'])) {
  173. $GLOBALS['AUTO_MARKETING_TITLE'] = (string) $company_name . ', ' . $fullname;
  174. $GLOBALS['AUTO_MARKETING_KEYWORDS'] = (string) $company_name . ', ' . $fullname;
  175. $description = (string) $company_name;
  176.  
  177. if (!empty($country)) {
  178. $description .= ', based in ' . $country;
  179. }
  180.  
  181. if (!empty($city)) {
  182. $description .= ', located in ' . $city;
  183. }
  184.  
  185. $q = "SHOW TABLES LIKE 'product_categories'";
  186. list($hastable) = mysql_fetch_row(dbexec($q));
  187.  
  188. if ($hastable) {
  189. $q = 'SELECT name FROM product_categories WHERE cat = 0';
  190. $result = dbexec($q);
  191. $description .= ', providing ';
  192.  
  193. for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
  194. if (0 < $i) {
  195. $description .= ', ';
  196. }
  197.  
  198. $description .= $row['name'];
  199. }
  200. }
  201. }
  202. } else {
  203. if (empty($title) || empty($keywords) || empty($description)) {
  204. if (empty($title) && !empty($s['TITLE'])) {
  205. $title = $s['TITLE'];
  206. }
  207.  
  208. if (empty($keywords) && !empty($s['KEYWORDS'])) {
  209. $keywords = $s['KEYWORDS'];
  210. }
  211.  
  212. if (empty($description) && !empty($s['DESCRIPTION'])) {
  213. $description = $s['DESCRIPTION'];
  214. }
  215. }
  216. }
  217.  
  218. $keywords = chop(ereg_replace("\r\n|\n|\t", '', $keywords));
  219. $description = chop(ereg_replace("\r\n|\n|\t", '', $description));
  220.  
  221. if (empty($charset)) {
  222. $charset = 'iso8859-1';
  223. }
  224.  
  225. if (!$crequest) {
  226. $crequest = $url[0];
  227. }
  228.  
  229. if (empty($GLOBALS['AUTO_MARKETING_TITLE'])) {
  230. define('SM_PAGE_TITLE', $title);
  231. }
  232.  
  233. if (empty($GLOBALS['AUTO_MARKETING_KEYWORDS'])) {
  234. .................................................................
  235. .......................................
  236. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement