Advertisement
johnburn

_include-funcs.php

May 8th, 2011
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 21.28 KB | None | 0 0
  1. <?php
  2.  
  3. function colorize($loginnaam) {
  4.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  5.     if (!($info1 = mysql_query("SELECT `level`,`hulpadmin`,`vermoord`,`accban`,`activated`,`vipdays`,`forumstatus` FROM `[users]` where `login`='" . $loginnaam . "'"))) {
  6.         exit(mysql_error());
  7.     }
  8.     $info = mysql_fetch_object($info1);
  9.     $loginnaam = $info->level == "255" ? "<font color=\"red\">{$loginnaam}</font>" : $loginnaam;
  10.     $loginnaam = $info->hulpadmin == "1" ? "<font color=\"#CC3333\">{$loginnaam}</font>" : $loginnaam;
  11.     $loginnaam = $info->level == "254" ? "{$loginnaam}</font>" : $loginnaam;
  12.     $loginnaam = $info->level == "253" ? "<font color=\"orange\">{$loginnaam}</font>" : $loginnaam;
  13.     $loginnaam = "0" < $info->vermoord ? "{$loginnaam} {$l1}</font>" : $loginnaam;
  14.     $loginnaam = $info->accban == "-1" ? "<font color=\"green\">{$loginnaam} {$l2}</font>" : $loginnaam;
  15.     $loginnaam = $info->activated == "-3" ? "<font color=\"purple\">{$loginnaam} {$l3}</font>" : $loginnaam;
  16.     $loginnaam = "0" < $info->vipdays ? "<font color=\"yellow\">{$loginnaam}</font>" : $loginnaam;
  17.     $loginnaam = $info->level == "0" ? "<font color=\"white\">{$loginnaam}</font>" : $loginnaam;
  18.     return $loginnaam;
  19. }
  20. function clancolorize($loginnaam) {
  21.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  22.     if (!($info1 = mysql_query("SELECT `clanlevel` FROM `[users]` where `login`='" . $loginnaam . "'"))) {
  23.         exit(mysql_error());
  24.     }
  25.     $info = mysql_fetch_object($info1);
  26.     $loginnaam = $info->clanlevel == "9" ? "<font color=\"#FF0000\">{$loginnaam}</font>" : $loginnaam;
  27.     $loginnaam = $info->clanlevel == "8" ? "<font color=\"#CC3333\">{$loginnaam}</font>" : $loginnaam;
  28.     $loginnaam = $info->clanlevel == "7" ? "<font color=\"orange\">{$loginnaam}</font>" : $loginnaam;
  29.     $loginnaam = $info->clanlevel == "2" ? "<font color=\"blue\">{$loginnaam}</font>" : $loginnaam;
  30.     $loginnaam = $info->clanlevel == "1" ? "<font color=\"white\">{$loginnaam}</font>" : $loginnaam;
  31.     $loginnaam = str_replace("Owner", " <font color=\"red\">" . $l1a . "</font>", $loginnaam);
  32.     $loginnaam = str_replace("Leaders", " <font color=\"#CC3333\">" . $l1b . "</font>", $loginnaam);
  33.     $loginnaam = str_replace("Generaals", " <font color=\"orange\">" . $l1c . "</font>", $loginnaam);
  34.     return $loginnaam;
  35. }
  36. function datum($format, $timestamp) {
  37.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  38.     $wdays = array($l4, $l5, $l6, $l7, $l8, $l9, $l10);
  39.     $months = array(1 => $l11, $l12, $l13, $l14, $l15, $l16, $l17, $l18, $l19, $l20, $l21, $l22);
  40.     $replace_wdays = array(date("l", mktime(0, 0, 0, 11, 10, 1991)) => $wdays[0], date("l", mktime(0, 0, 0, 11, 11, 1991)) => $wdays[1], date("l", mktime(0, 0, 0, 11, 12, 1991)) => $wdays[2], date("l", mktime(0, 0, 0, 11, 13, 1991)) => $wdays[3], date("l", mktime(0, 0, 0, 11, 14, 1991)) => $wdays[4], date("l", mktime(0, 0, 0, 11, 15, 1991)) => $wdays[5], date("l", mktime(0, 0, 0, 11, 16, 1991)) => $wdays[6]);
  41.     $replace_short_wdays = array(date("D", mktime(0, 0, 0, 11, 10, 1991)) => substr($wdays[0], 0, 3), date("D", mktime(0, 0, 0, 11, 11, 1991)) => substr($wdays[1], 0, 3), date("D", mktime(0, 0, 0, 11, 12, 1991)) => substr($wdays[2], 0, 3), date("D", mktime(0, 0, 0, 11, 13, 1991)) => substr($wdays[3], 0, 3), date("D", mktime(0, 0, 0, 11, 14, 1991)) => substr($wdays[4], 0, 3), date("D", mktime(0, 0, 0, 11, 15, 1991)) => substr($wdays[5], 0, 3), date("D", mktime(0, 0, 0, 11, 16, 1991)) => substr($wdays[6], 0, 3));
  42.     $replace_months = array(date("F", mktime(0, 0, 0, 1, 1, 2004)) => $months[1], date("F", mktime(0, 0, 0, 2, 1, 2004)) => $months[2], date("F", mktime(0, 0, 0, 3, 1, 2004)) => $months[3], date("F", mktime(0, 0, 0, 4, 1, 2004)) => $months[4], date("F", mktime(0, 0, 0, 5, 1, 2004)) => $months[5], date("F", mktime(0, 0, 0, 6, 1, 2004)) => $months[6], date("F", mktime(0, 0, 0, 7, 1, 2004)) => $months[7], date("F", mktime(0, 0, 0, 8, 1, 2004)) => $months[8], date("F", mktime(0, 0, 0, 9, 1, 2004)) => $months[9], date("F", mktime(0, 0, 0, 10, 1, 2004)) => $months[10], date("F", mktime(0, 0, 0, 11, 1, 2004)) => $months[11], date("F", mktime(0, 0, 0, 12, 1, 2004)) => $Var_3648[12]);
  43.     $replace_short_months = array(date("M", mktime(0, 0, 0, 1, 1, 2004)) => substr($months[1], 0, 3), date("M", mktime(0, 0, 0, 2, 1, 2004)) => substr($months[2], 0, 3), date("M", mktime(0, 0, 0, 3, 1, 2004)) => substr($months[3], 0, 3), date("M", mktime(0, 0, 0, 4, 1, 2004)) => substr($months[4], 0, 3), date("M", mktime(0, 0, 0, 5, 1, 2004)) => substr($months[5], 0, 3), date("M", mktime(0, 0, 0, 6, 1, 2004)) => substr($months[6], 0, 3), date("M", mktime(0, 0, 0, 7, 1, 2004)) => substr($months[7], 0, 3), date("M", mktime(0, 0, 0, 8, 1, 2004)) => substr($months[8], 0, 3), date("M", mktime(0, 0, 0, 9, 1, 2004)) => substr($months[9], 0, 3), date("M", mktime(0, 0, 0, 10, 1, 2004)) => substr($months[10], 0, 3), date("M", mktime(0, 0, 0, 11, 1, 2004)) => substr($months[11], 0, 3), date("M", mktime(0, 0, 0, 12, 1, 2004)) => substr($months[12], 0, 3));
  44.     $return = date($format, $timestamp);
  45.     $return = strtr($return, $replace_wdays);
  46.     $return = strtr($return, $replace_short_wdays);
  47.     $return = strtr($return, $replace_months);
  48.     $return = strtr($return, $replace_short_months);
  49.     return $return;
  50. }
  51. function quote_smart($value) {
  52.     if (get_magic_quotes_gpc()) {
  53.         $value = stripslashes($value);
  54.     }
  55.     if (version_compare(phpversion(), "4.3.0") == "-1") {
  56.         return mysql_escape_string($value);
  57.     }
  58.     return mysql_real_escape_string($value);
  59. }
  60. function legenda($sitetitle) {
  61.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  62.     echo "\r\n<table align=\"center\">\r\n    <tr>\r\n\t\t<td class=\"subTitle\" colspan=\"2\">";
  63.     echo $l23;
  64.     echo "</td>\r\n\t</tr>\r\n    <tr>\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"red\">";
  65.     echo $l24;
  66.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  67.     echo $l25;
  68.     echo " ";
  69.     echo $sitetitle;
  70.     echo ".</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"#CC3333\">";
  71.     echo $l26;
  72.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  73.     echo $l27;
  74.     echo " ";
  75.     echo $sitetitle;
  76.     echo ".</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"blue\">";
  77.     echo $l28;
  78.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  79.     echo $l29;
  80.     echo " ";
  81.     echo $sitetitle;
  82.     echo ".</td>\r\n\t</tr>\r\n    <tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"orange\">";
  83.     echo $l30;
  84.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  85.     echo $l31;
  86.     echo " ";
  87.     echo $sitetitle;
  88.     echo ".</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"yellow\">";
  89.     echo $l32;
  90.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  91.     echo $l33;
  92.     echo " ";
  93.     echo $sitetitle;
  94.     echo ".</td>\r\n    </tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"green\">";
  95.     echo $l34;
  96.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  97.     echo $l35;
  98.     echo " ";
  99.     echo $sitetitle;
  100.     echo ".</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"purple\">";
  101.     echo $l36;
  102.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  103.     echo $l37;
  104.     echo " ";
  105.     echo $sitetitle;
  106.     echo ".</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"white\">";
  107.     echo $l38;
  108.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  109.     echo $l39;
  110.     echo " ";
  111.     echo $sitetitle;
  112.     echo ".</td>\r\n\t</tr>\r\n\r\n</table> \r\n";
  113. }
  114. function clanlegenda($clan) {
  115.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  116.     echo "<table align=\"center\">\r\n    <tr>\r\n\t\t<td class=\"subTitle\" colspan=\"2\">";
  117.     echo $l40;
  118.     echo "</td>\r\n\t</tr>\r\n    <tr>\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"red\">";
  119.     echo $l41;
  120.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  121.     echo $l42;
  122.     echo " <font color=\"Yellow\">";
  123.     echo $clan;
  124.     echo "</font>.</td>\r\n\t</tr>\r\n    <tr>\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"#CC3333\">";
  125.     echo $l43;
  126.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  127.     echo $l44;
  128.     echo " <font color=\"Yellow\">";
  129.     echo $clan;
  130.     echo "</font>.</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"orange\">";
  131.     echo $l45;
  132.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  133.     echo $l46;
  134.     echo " <font color=\"Yellow\">";
  135.     echo $clan;
  136.     echo "</font>.</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"blue\">";
  137.     echo $l47;
  138.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  139.     echo $l48;
  140.     echo " <font color=\"Yellow\">";
  141.     echo $clan;
  142.     echo "</font>.</td>\r\n\t</tr>\r\n\t<tr class=\"inhoud\">\r\n\t\t<td align=\"right\" class=\"mainTxt\"><font color=\"white\">";
  143.     echo $l49;
  144.     echo "</font></td>\r\n\t\t<td class=\"mainTxt\">";
  145.     echo $l50;
  146.     echo " <font color=\"Yellow\">";
  147.     echo $clan;
  148.     echo "</font>.</td>\r\n\t</tr>\r\n</table> \r\n";
  149. }
  150. function show_bankrate() {
  151.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  152.     echo "<table align=\"center\" width=\"70%\">\r\n    <tr>\r\n        <td class=\"subTitle\" colspan=\"2\">\r\n        ";
  153.     echo $l51;
  154.     echo " \r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <td align=\"center\" class=\"mainTxt\">\r\n        <font color=\"white\">";
  155.     echo $l52;
  156.     echo "</font>\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <td class=\"mainTxt\">\r\n        <center>\r\n        5 % ";
  157.     echo $l53;
  158.     echo " &euro;1.000.000<BR>\r\n        4 % ";
  159.     echo $l54;
  160.     echo " &euro;1.000.000 ";
  161.     echo $l55;
  162.     echo "  &euro;3.000.000<BR>\r\n        3 % ";
  163.     echo $l54;
  164.     echo " &euro;3.000.000 ";
  165.     echo $l55;
  166.     echo "  &euro;6.000.000<BR>\r\n        2 % ";
  167.     echo $l54;
  168.     echo " &euro;6.000.000 ";
  169.     echo $l55;
  170.     echo " &euro;10.000.000<BR>\r\n        1 % ";
  171.     echo $l54;
  172.     echo " &euro;10.000.000 ";
  173.     echo $l55;
  174.     echo " &euro;20.000.000<BR>\r\n        0,5 % ";
  175.     echo $l56;
  176.     echo " &euro;20.000.000  <BR>\r\n        </center>\r\n        </td>\r\n    </tr>\r\n    <tr class=\"inhoud\">\r\n        <td align=\"center\" class=\"mainTxt\">\r\n        <font color=\"yellow\">Betaald account :</font>\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <td class=\"mainTxt\">\r\n        <center>\r\n        6 % ";
  177.     echo $l53;
  178.     echo " &euro;1.000.000<BR>\r\n        5 % ";
  179.     echo $l54;
  180.     echo $l55;
  181.     echo "  &euro;3.000.000<BR>\r\n        4 % ";
  182.     echo $l54;
  183.     echo "  &euro;3.000.000 ";
  184.     echo $l55;
  185.     echo "  &euro;6.000.000<BR>\r\n        3 % ";
  186.     echo "  &euro;6.000.000 ";
  187.     echo $l55;
  188.     echo " &euro;10.000.000<BR>\r\n        2 % ";
  189.     echo $l54;
  190.     echo " &euro;10.000.000 ";
  191.     echo $l55;
  192.     echo " &euro;20.000.000<BR>\r\n        1 % ";
  193.     echo $l56;
  194.     echo " &euro;20.000.000  <BR>\r\n        </center>\r\n        </td>\r\n    </tr>\r\n</table> \r\n";
  195. }
  196. function show_stats() {
  197.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  198.     if (!($dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `activated`=1 and `aanuit`='1'"))) {
  199.         exit(mysql_error());
  200.     }
  201.     $leden = mysql_num_rows($dbres);
  202.     if (!($dbres2 = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300"))) {
  203.         exit(mysql_error());
  204.     }
  205.     $online = mysql_num_rows($dbres2);
  206.     if (!($laatstelid = mysql_query("select `login` from `[users]` where `activated`=1 and `aanuit`='1' and `accban`<>'-1' order by id desc limit 0,3"))) {
  207.         exit(mysql_error());
  208.     }
  209.     $laatste = @mysql_result(@$laatstelid, 0, 0);
  210.     echo $l57 . " " . $Var_912 . "      " . $l58 . " " . $online . "      " . $l59 . " " . colorize($laatste) . " ";
  211. }
  212. function stuurbericht($sVan, $sNaar, $sTitel, $sBericht) {
  213.     if (!mysql_query("INSERT INTO `[messages]` (`time`,`IP`,`forwardedFor`,`from`,`to`,`subject`,`message`) values\t(NOW(),'" . $_SERVER['REMOTE_ADDR'] . "','0','" . $sVan . "','" . $sNaar . "','" . $sTitel . "','" . $sBericht . "')")) {
  214.         exit("Function Automailer :" . mysql_error());
  215.     }
  216. }
  217. function maffiaprotection() {
  218.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  219.     if (!($select = mysql_query("SELECT * FROM `instellingen`"))) {
  220.         exit(mysql_error());
  221.     }
  222.     $page = mysql_fetch_object($select);
  223.     echo "\r\n\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
  224.     echo $sitelink;
  225.     echo "/layout/layout";
  226.     echo $page->layout;
  227.     echo "/css/css.css\">\r\n\r\n";
  228.     if (!($check1 = mysql_query("SELECT `maffiamode` FROM `[users]` WHERE `login`='" . $data->login . "'"))) {
  229.         exit(mysql_error());
  230.     }
  231.     $check = mysql_fetch_object($check1);
  232.     if (!empty($check->maffiamode) && $check->maffiamode <= 1) {
  233.         echo "    \r\n\t<table width=\"100%\" align=\"center\">\r\n\t\t<tr><td class=\"subtitle\">";
  234.         echo $l60;
  235.         echo "</td></tr>\r\n\t\t\t\t<td class=\"maintxt\" colspan=\"3\">";
  236.         echo $l61;
  237.         echo "\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t";
  238.         exit();
  239.     }
  240. }
  241. function show_copyrights() {
  242.     $beginjaar = "2007";
  243.     $jaar = date("Y");
  244.     $jaar2 = $jaar + 1;
  245.     $rechten = "";
  246.     echo "&copy; " . trim($sitelink, "http://www.") . " " . $beginjaar . " - " . $jaar . " Alle rechten voorbehouden!";
  247. }
  248. function check_login() {
  249.     if ($_SESSION['IP'] == $_SERVER['REMOTE_ADDR']) {
  250.         if (!($Tmp_10 && isset($_COOKIE['login'], $_COOKIE['validate']))) {
  251.             $validate = md5(rand(0, 1000));
  252.         } else {
  253.             $validate = $_COOKIE['validate'];
  254.         }
  255.         if (!strstr($_SERVER['REQUEST_URI'], "admin") && !strstr($_SERVER['REQUEST_URI'], "inc") && !strstr($_SERVER['REQUEST_URI'], "layout") && !strstr($_SERVER['REQUEST_URI'], "adsshow.php") && $_SERVER['REQUEST_URI'] != "" && $_SERVER['REQUEST_URI'] != "/") {
  256.             if (!mysql_query("UPDATE `[online]` SET `time`=NOW(),`page`='" . trim(trim($_SERVER['PHP_SELF'], ".php"), "/") . "' WHERE `login`='" . $_SESSION['login'] . "' AND `validate`='" . $validate . "'")) {
  257.                 exit(mysql_error());
  258.             }
  259.         }
  260.         return TRUE;
  261.     }
  262.     if (isset($_COOKIE['login'], $_COOKIE['validate'])) {
  263.         $login = $_COOKIE['login'];
  264.         $validate = $_COOKIE['validate'];
  265.         $query = mysql_query("SELECT * FROM `[online]` WHERE `login`='{$login}' AND `validate`='{$validate}' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) < 60*60*24");
  266.         if ($user = mysql_fetch_object($query)) {
  267.             mysql_query("UPDATE `[online]` SET `time`=NOW() WHERE `login`='{$login}' AND `validate`='{$validate}' AND `IP`='{$_SERVER['REMOTE_ADDR']}' AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`time`) < 60*60*24");
  268.             $_SESSION['login'] = $user->login;
  269.             $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
  270.             return TRUE;
  271.         }
  272.         unset($_SESSION['login']);
  273.         unset($_SESSION['IP']);
  274.         return FALSE;
  275.     }
  276.     unset($_SESSION['login']);
  277.     unset($_SESSION['IP']);
  278.     return FALSE;
  279. }
  280. function captcha() {
  281.     $codene = rand(1000, 9999);
  282.     $codee = ereg_replace("0", "gsqwq", $codene);
  283.     $codee = ereg_replace("1", "ssBjyq", $codee);
  284.     $codee = ereg_replace("2", "gHiq", $codee);
  285.     $codee = ereg_replace("4", "hsqerf", $codee);
  286.     $codee = ereg_replace("5", "Hwsawq", $codee);
  287.     $codee = ereg_replace("6", "hSXaq", $codee);
  288.     $codee = ereg_replace("7", "hgqYt", $codee);
  289.     $codee = ereg_replace("8", "hAsqF", $codee);
  290.     $codee = ereg_replace("9", "hxqSAw", $codee);
  291.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  292.     echo "<table width=\"100%\">\r\n<tr><td align=\"center\"><input name=\"url\" type=\"hidden\" value=\"";
  293.     echo $_SERVER['REQUEST_URI'];
  294.     echo "\"><input name=\"code2\" type=\"hidden\" value=\"";
  295.     echo $codene;
  296.     echo "\"><input name=\"codecheck\" type=\"hidden\" value=\"";
  297.     echo $codechecker;
  298.     echo "\"><img alt=\"";
  299.     echo $l62;
  300.     echo "\" src=\"../coden.php?security=";
  301.     echo $codee;
  302.     echo "\" style=\"position: relative; top: 4;\"><- ";
  303.     echo $l63;
  304.     echo "  -><input name=\"codenn\" maxlength=\"4\" size=\"5\" valign=\"center\"></td></tr>\r\n</table>\r\n";
  305. }
  306. function PageViewLimit() {
  307.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  308.     $PvlViews = 25;
  309.     session_start();
  310.     if (!isset($_SESSION['Pvl'])) {
  311.         $_SESSION['Pvl']['Time'] = time();
  312.         $_SESSION['Pvl']['Views'] = 1;
  313.     } else if (60 <= time() - $_SESSION['Pvl']['Time']) {
  314.         $_SESSION['Pvl'] = null;
  315.         $_SESSION['Pvl']['Time'] = time();
  316.         $_SESSION['Pvl']['Views'] = 1;
  317.     } else {
  318.         ++$_SESSION['Pvl']['Views'];
  319.         if ($PvlViews <= $_SESSION['Pvl']['Views']) {
  320.             if (!($select = mysql_query("SELECT * FROM `instellingen`"))) {
  321.                 exit(mysql_error());
  322.             }
  323.             $page = mysql_fetch_object($select);
  324.             echo "        <body style=\"margin:0px;\" >\r\n        <link rel=\"stylesheet\" type=\"text/css\" href=\"";
  325.             echo $sitelink;
  326.             echo "/layout/layout";
  327.             echo $page->layout;
  328.             echo "/css/css.css\">\r\n\t\t<table width=\"100%\">\r\n        \t<tr>\r\n                <td class=\"subTitle\">\r\n                ";
  329.             echo $l64;
  330.             echo "                </td>\r\n            </tr>\r\n            <tr>\r\n                <td class=\"mainTxt\" align=\"center\">\r\n                <B>";
  331.             echo $l65;
  332.             echo " ";
  333.             echo $PvlViews;
  334.             echo " ";
  335.             echo $l66;
  336.             echo "</b>\r\n                <br /><br />\r\n                ";
  337.             echo $l67;
  338.             echo "<BR />\r\n                <a href=\"";
  339.             echo $sitelink;
  340.             echo "/belsysteem.php\">";
  341.             echo $l68;
  342.             echo "</a>\r\n                <br />\r\n                </td>\r\n            </tr>\r\n        </table>\r\n\t\t";
  343.             exit();
  344.         }
  345.     }
  346. }
  347. function checknewmail() {
  348.     include ($_SERVER['DOCUMENT_ROOT'] . "/inc/language/" . $_SESSION['taalkeuze'] . ".inc.php");
  349.     $dbres = mysql_query("SELECT id FROM `[messages]` WHERE `read`='0' AND `inbox`='1' AND `to`='" . $_SESSION['login'] . "'");
  350.     $inboxnew = mysql_num_rows($dbres);
  351.     if (1 <= $inboxnew) {
  352.         echo "    <div style=\"position: absolute; top: 50px; left: 10; z-index: 0;\">\r\n        <table width=\"100%\">\r\n        <tr>\r\n            <td align=\"center\" class=\"Subtitle\">\r\n            ";
  353.         echo $l69;
  354.         echo "            </td>\r\n        </tr>\r\n        <tr>\r\n            <td align=\"center\" class=\"Error\">\r\n            <A href=\"http://";
  355.         echo $_SERVER['HTTP_HOST'];
  356.         echo "/message.php?p=inbox\"><IMG src=\"/images/newmessage.jpg\" border=\"0\" width=\"20\" height=\"20\"><br><br>";
  357.         echo $l70;
  358.         echo "</A>\r\n            </td>\r\n        </tr>\r\n        </table>\r\n\t</div>\r\n\t ";
  359.     }
  360. }
  361. function checkmail($mail) {
  362.     $email_host = explode("@", $mail);
  363.     $email_host = $email_host['1'];
  364.     $email_resolved = gethostbyname($email_host);
  365.     if ($email_resolved != $email_host && eregi("^[0-9a-z]([-_.~]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}\$", $mail)) {
  366.         $valid = 1;
  367.     }
  368.     return $valid;
  369. }
  370. include_once ($_SERVER['DOCUMENT_ROOT'] . "/inc/_include-config.php");
  371. echo "<s";
  372. echo "cript language=\"javascript\">\r\n    \r\n    function getKeyCode(eventObject)\r\n    {\r\n      if (!eventObject) keyCode = window.event.keyCode; //IE\r\n      else keyCode = eventObject.which;   //Mozilla\r\n      return keyCode;\r\n    }\r\n      \r\n    function onlyNumeric(eventObject)\r\n    {\r\n      keyCode = getKeyCode(eventObject);\r\n      if (((keyCode > 31) && (keyCode < 48)) || ((keyCode > 57) && (keyCode < 12";
  373. echo "7)))\r\n      {\r\n          if (!eventObject) window.event.keyCode = 0; //IE\r\n          else eventObject.preventDefault(); //Mozilla\r\n          return false;\r\n      }\r\n    }\r\n</script>\r\n\r\n";
  374. $locatie = $_SERVER['REQUEST_URI'];
  375. $array = array();
  376. $array[] = "mysql";
  377. $array[] = ")";
  378. $array[] = ";";
  379. $array[] = "}";
  380. $array[] = "INSERT";
  381. $array[] = "DROPTABLE";
  382. $array[] = "TRUNCATE";
  383. $array[] = "DROP";
  384. $array[] = "UPDATE";
  385. $array[] = "COOKIE";
  386. $array[] = "ENV ";
  387. $array[] = "FILES";
  388. $array[] = "GET ";
  389. $array[] = "POST";
  390. $array[] = "REQUEST";
  391. $array[] = "SERVER";
  392. $array[] = "<script>";
  393. foreach($array as $foutbezig) {
  394.     if (eregi($foutbezig, $locatie)) {
  395.         echo "Internet fout, ip adres doorgegeven aan domein houder.";
  396.         exit();
  397.     }
  398. }
  399. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement