Advertisement
plas71k

david phpcrypt file => decoded

Jan 31st, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.64 KB | None | 0 0
  1. <?php
  2. if (!defined('DATALIFEENGINE')) {
  3.     die("Hacking attempt!");
  4. }
  5. include ENGINE_DIR . '/data/searchclouddata.php';
  6. require_once ENGINE_DIR . '/classes/search.class.php';
  7. $search = new Searchcloud();
  8. if (!$tpl->result['search_cloud']) {
  9.     $counts = array();
  10.     $tags   = array();
  11.     $list   = array();
  12.     $sizes  = array(
  13.         "clouds_xsmall",
  14.         "clouds_small",
  15.         "clouds_medium",
  16.         "clouds_large",
  17.         "clouds_xlarge"
  18.     );
  19.     $min    = 1;
  20.     $max    = 1;
  21.     $range  = 1;
  22.     if ($searchcloud['order'] == "1") {
  23.         $order = "datetime DESC";
  24.     }
  25.     if ($searchcloud['order'] == "2") {
  26.         $order = "tag DESC";
  27.     }
  28.     if ($searchcloud['order'] == "3") {
  29.         $order = "RAND()";
  30.     }
  31.     $db->query("SELECT SQL_CALC_FOUND_ROWS tag, COUNT(*) AS count FROM " . PREFIX . "_search GROUP BY tag ORDER BY {$order} LIMIT 0,{$searchcloud['limit']}");
  32.     while ($row = $db->get_row()) {
  33.         $tags[$row['tag']] = $row['count'];
  34.         $counts[]          = $row['count'];
  35.     }
  36.     $db->free();
  37.     if (count($counts)) {
  38.         $min   = min($counts);
  39.         $max   = max($counts);
  40.         $range = ($max - $min);
  41.     }
  42.     if (!$range)
  43.         $range = 1;
  44.     foreach ($tags as $tag => $value) {
  45.         $list[$tag]['tag']   = $tag;
  46.         $list[$tag]['size']  = $sizes[sprintf("%d", ($value - $min) / $range * 4)];
  47.         $list[$tag]['count'] = $value;
  48.         $char_mixed          = $search->ddlrandom($searchcloud['alpha'], $searchcloud['numeric'], $search->CHAR_ALPHA . $search->CHAR_NUMERIC, $list);
  49.         $list[$tag]['mixed'] = $char_mixed;
  50.     }
  51.     $tags = array();
  52.     foreach ($list as $value) {
  53.         if (dle_strlen($value['tag'], $config['charset']) > $searchcloud['urllimit'])
  54.             $title = dle_substr($value['tag'], 0, $searchcloud['urllimit'], $config['charset']) . " ...";
  55.         else
  56.             $title = $value['tag'];
  57.         if (!$searchcloud['urlpath']) {
  58.             $urlpath = "";
  59.         } else {
  60.             $urlpath = $searchcloud['urlpath'] . "/";
  61.         }
  62.         if ($searchcloud['random'] != "no") {
  63.             $full_link = $config['http_home_url'] . $urlpath . $value['mixed'] . "/" . $search->dleUrlEncode($value['tag']) . ".html";
  64.         } else {
  65.             $full_link = $config['http_home_url'] . $urlpath . $search->dleUrlEncode($value['tag']) . ".html";
  66.         }
  67.         if (trim($value['tag']) != "") {
  68.             if ($config['allow_alt_url'] == "yes")
  69.                 $tags[] = "<a href=\"" . $full_link . "\" title=\"" . mb_convert_case($value['tag'], MB_CASE_TITLE, "UTF-8") . "\">" . mb_convert_case($title, MB_CASE_TITLE, "UTF-8") . "</a>";
  70.             else
  71.                 $tags[] = "<a href=\"$PHP_SELF?do=search&subaction=search&story=" . $search->dleUrlEncode($value['tag']) . "&searchterm=tag\" title=\"" . $lang['tags_count'] . " " . $value['count'] . "\">" . mb_convert_case($title, MB_CASE_TITLE, "UTF-8") . "</a>";
  72.         }
  73.     }
  74.     $tpl->result['search_cloud'] = implode(", ", $tags);
  75.     $row                         = $db->super_query("SELECT FOUND_ROWS() as count");
  76.     if ($row['count'] >= $searchcloud['limit']) {
  77.         if ($config['allow_alt_url'] == "yes")
  78.             $tpl->result['search_cloud'] .= ", ...<a href=\"" . $config['http_home_url'] . "searchs\">&raquo; Show all search results</a><span style=\"display:none;\"><a href=\"http://www.ddl-turkey.net\">DataLife Engine English Support</a></span>";
  79.         else
  80.             $tpl->result['search_cloud'] .= ", ...<a href=\"$PHP_SELF?do=allsearchs\">&raquo; Show all search results</a><span style=\"display:none;\"><a href=\"http://www.ddl-turkey.net\">DataLife Engine English Support</a></span>";
  81.     }
  82. }
  83. if ($do == "allsearchs") {
  84.     $tpl->result['content'] = dle_cache("allsearchs", $config['skin']);
  85.     if (!$tpl->result['content']) {
  86.         $tpl->load_template('searchcloud.tpl');
  87.         $counts = array();
  88.         $tags   = array();
  89.         $list   = array();
  90.         $sizes  = array(
  91.             "clouds_xsmall",
  92.             "clouds_small",
  93.             "clouds_medium",
  94.             "clouds_large",
  95.             "clouds_xlarge"
  96.         );
  97.         $min    = 1;
  98.         $max    = 1;
  99.         $range  = 1;
  100.         $db->query("SELECT tag, COUNT(*) AS count FROM " . PREFIX . "_search GROUP BY tag");
  101.         while ($row = $db->get_row()) {
  102.             $tags[$row['tag']] = $row['count'];
  103.             $counts[]          = $row['count'];
  104.         }
  105.         $db->free();
  106.         if (count($counts)) {
  107.             $min   = min($counts);
  108.             $max   = max($counts);
  109.             $range = ($max - $min);
  110.         }
  111.         if (!$range)
  112.             $range = 1;
  113.         foreach ($tags as $tag => $value) {
  114.             $list[$tag]['tag']   = $tag;
  115.             $list[$tag]['size']  = $sizes[sprintf("%d", ($value - $min) / $range * 4)];
  116.             $list[$tag]['count'] = $value;
  117.             $char_mixed          = $search->ddlrandom($searchcloud['alpha'], $searchcloud['numeric'], $search->CHAR_ALPHA . $search->CHAR_NUMERIC, $list);
  118.             $list[$tag]['mixed'] = $char_mixed;
  119.         }
  120.         $tags = array();
  121.         foreach ($list as $value) {
  122.             if (!$searchcloud['urlpath']) {
  123.                 $urlpath = "";
  124.             } else {
  125.                 $urlpath = $searchcloud['urlpath'] . "/";
  126.             }
  127.             if ($searchcloud['random'] != "no") {
  128.                 $full_link = $config['http_home_url'] . $urlpath . $value['mixed'] . "/" . $search->dleUrlEncode($value['tag']) . ".html";
  129.             } else {
  130.                 $full_link = $config['http_home_url'] . $urlpath . $search->dleUrlEncode($value['tag']) . ".html";
  131.             }
  132.             if (trim($value['tag']) != "") {
  133.                 if ($config['allow_alt_url'] == "yes")
  134.                     $tags[] = "<a href=\"" . $full_link . "\" class=\"{$value['size']}\" title=\"" . $lang['tags_count'] . " " . $value['count'] . "\">" . mb_convert_case($value['tag'], MB_CASE_TITLE, "UTF-8") . "</a>";
  135.                 else
  136.                     $tags[] = "<a href=\"$PHP_SELF?do=search&subaction=search&story=" . $search->dleUrlEncode($value['tag']) . "&searchterm=tag\" class=\"{$value['size']}\" title=\"" . $lang['tags_count'] . " " . $value['count'] . "\">" . mb_convert_case($value['tag'], MB_CASE_TITLE, "UTF-8") . "</a>";
  137.             }
  138.         }
  139.         $tags = implode(", ", $tags);
  140.         $tpl->set('{tags}', $tags . '<p align=\"center\" style=\"padding-top:24px;\"><a href=\"http://www.ddl-turkey.net\">Powered by Engine</a></p>');
  141.         $tpl->compile('content');
  142.         $tpl->clear();
  143.         create_cache("allsearchs", $tpl->result['content'], $config['skin']);
  144.     }
  145. }
  146. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement