Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //
- //echo(__LINE__ . "<BR />");
- //error_reporting(E_ALL);
- error_reporting(0);
- //mb_internal_encoding("UTF-8");
- session_start();
- include("languages.php");
- $brokenUtf8ToUtf8 = array(
- "\xc2\x80" => "\xe2\x82\xac",
- "\xc2\x82" => "\xe2\x80\x9a",
- "\xc2\x83" => "\xc6\x92",
- "\xc2\x84" => "\xe2\x80\x9e",
- "\xc2\x85" => "\xe2\x80\xa6",
- "\xc2\x86" => "\xe2\x80\xa0",
- "\xc2\x87" => "\xe2\x80\xa1",
- "\xc2\x88" => "\xcb\x86",
- "\xc2\x89" => "\xe2\x80\xb0",
- "\xc2\x8a" => "\xc5\xa0",
- "\xc2\x8b" => "\xe2\x80\xb9",
- "\xc2\x8c" => "\xc5\x92",
- "\xc2\x8e" => "\xc5\xbd",
- "\xc2\x91" => "\xe2\x80\x98",
- "\xc2\x92" => "\xe2\x80\x99",
- "\xc2\x93" => "\xe2\x80\x9c",
- "\xc2\x94" => "\xe2\x80\x9d",
- "\xc2\x95" => "\xe2\x80\xa2",
- "\xc2\x96" => "\xe2\x80\x93",
- "\xc2\x97" => "\xe2\x80\x94",
- "\xc2\x98" => "\xcb\x9c",
- "\xc2\x99" => "\xe2\x84\xa2",
- "\xc2\x9a" => "\xc5\xa1",
- "\xc2\x9b" => "\xe2\x80\xba",
- "\xc2\x9c" => "\xc5\x93",
- "\xc2\x9e" => "\xc5\xbe",
- "\xc2\x9f" => "\xc5\xb8"
- );
- function toUTF8($text){
- /**
- * Function Encoding::toUTF8
- *
- * This function leaves UTF8 characters alone, while converting almost all non-UTF8 to UTF8.
- *
- * It assumes that the encoding of the original string is either Windows-1252 or ISO 8859-1.
- *
- * It may fail to convert characters to UTF-8 if they fall into one of these scenarios:
- *
- * 1) when any of these characters: ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞß
- * are followed by any of these: ("group B")
- * ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶•¸¹º»¼½¾¿
- * For example: %ABREPRESENT%C9%BB. «REPRESENTÉ»
- * The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB)
- * is also a valid unicode character, and will be left unchanged.
- *
- * 2) when any of these: à áâãäåæçèéêëìÃîï are followed by TWO chars from group B,
- * 3) when any of these: ðñòó are followed by THREE chars from group B.
- *
- * @name toUTF8
- * @param string $text Any string.
- * @return string The same string, UTF8 encoded
- *
- */
- if(is_array($text))
- {
- foreach($text as $k => $v)
- {
- $text[$k] = toUTF8($v);
- }
- return $text;
- } elseif(is_string($text)) {
- $max = strlen($text);
- $buf = "";
- for($i = 0; $i < $max; $i++){
- $c1 = $text{$i};
- if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already
- $c2 = $i+1 >= $max? "\x00" : $text{$i+1};
- $c3 = $i+2 >= $max? "\x00" : $text{$i+2};
- $c4 = $i+3 >= $max? "\x00" : $text{$i+3};
- if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8
- if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already
- $buf .= $c1 . $c2;
- $i++;
- } else { //not valid UTF8. Convert it.
- $cc1 = (chr(ord($c1) / 64) | "\xc0");
- $cc2 = ($c1 & "\x3f") | "\x80";
- $buf .= $cc1 . $cc2;
- }
- } elseif($c1 >= "\xe0" & $c1 <= "\xef"){ //looks like 3 bytes UTF8
- if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf"){ //yeah, almost sure it's UTF8 already
- $buf .= $c1 . $c2 . $c3;
- $i = $i + 2;
- } else { //not valid UTF8. Convert it.
- $cc1 = (chr(ord($c1) / 64) | "\xc0");
- $cc2 = ($c1 & "\x3f") | "\x80";
- $buf .= $cc1 . $cc2;
- }
- } elseif($c1 >= "\xf0" & $c1 <= "\xf7"){ //looks like 4 bytes UTF8
- if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf"){ //yeah, almost sure it's UTF8 already
- $buf .= $c1 . $c2 . $c3;
- $i = $i + 2;
- } else { //not valid UTF8. Convert it.
- $cc1 = (chr(ord($c1) / 64) | "\xc0");
- $cc2 = ($c1 & "\x3f") | "\x80";
- $buf .= $cc1 . $cc2;
- }
- } else { //doesn't look like UTF8, but should be converted
- $cc1 = (chr(ord($c1) / 64) | "\xc0");
- $cc2 = (($c1 & "\x3f") | "\x80");
- $buf .= $cc1 . $cc2;
- }
- } elseif(($c1 & "\xc0") == "\x80"){ // needs conversion
- if(isset($win1252ToUtf8[ord($c1)])) { //found in Windows-1252 special cases
- $buf .= $win1252ToUtf8[ord($c1)];
- } else {
- $cc1 = (chr(ord($c1) / 64) | "\xc0");
- $cc2 = (($c1 & "\x3f") | "\x80");
- $buf .= $cc1 . $cc2;
- }
- } else { // it doesn't need convesion
- $buf .= $c1;
- }
- }
- return $buf;
- } else {
- return $text;
- }
- }
- function UTF8FixWin1252Chars($text){
- // If you received an UTF-8 string that was converted from Windows-1252 as it was ISO8859-1
- // (ignoring Windows-1252 chars from 80 to 9F) use this function to fix it.
- // See: http://en.wikipedia.org/wiki/Windows-1252
- return str_replace(array_keys($brokenUtf8ToUtf8), array_values($brokenUtf8ToUtf8), $text);
- }
- function removeBOM($str=""){
- if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) {
- $str=substr($str, 3);
- }
- return $str;
- }
- function lng($which)
- {
- global $ARRXKS;
- return $ARRXKS[$_SESSION['lang']]["$which"];
- }
- function LangChoose()
- {
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="pl-PL">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>Meet-Helmond.nl SMS Service - Free Worldwide SMS Sending | Select your Language</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <!-- Send free sms worldwide
- Send free sms around the world
- gratis sms in nederland
- gratis sms naar nederland
- gratis sms wereldwijd
- -->
- <div class="information">
- <div class="boxinfo">Cookies MUST be enabled to use this website!</div>
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">');
- //echo('<BR />');
- //print_r($_GET);
- //echo('<BR />');
- global $ARRXKS;
- $LANG_keys = array_keys($ARRXKS);
- $count = 1;
- for ($i = 0; $i <= count($ARRXKS) - 1; $i++)
- {
- echo('<a href="index.php?uselang='.$LANG_keys[$i].'"><img border="0" src="images/flags/'.$LANG_keys[$i].'.png" name="abc" id="def" value="'.$LANG_keys[$i].'" alt="'.$LANG_keys[$i].'"></img></a>');
- if((($count) % 5) == 0)
- {
- echo('<BR />');
- }
- $count = $count + 1;
- }
- echo('
- </form>
- </div>
- <body>
- </body>
- </html>
- ');
- }
- //print_r($_POST);
- if(!isset($_SESSION['lang']))
- {
- if(isset($_GET['uselang']))
- {
- if(isset($ARRXKS[$_GET['uselang']]["robot"]))
- {
- $_SESSION['lang'] = $_GET['uselang'];
- }
- else
- {
- LangChoose();
- exit();
- }
- }
- else
- {
- LangChoose();
- exit();
- }
- }
- $database['address'] = "hh";//"127.0.0.1";//host
- $database['user'] = "hh";//"root";//username
- $database['name'] = "hh";//"ucp";//database name
- $database['password'] = "hh";//password for user@DB
- //echo(__LINE__ . "<BR />");
- $database['link'] = mysql_connect($database['address'], $database['user'], $database['password']);
- if (!$database['link']) {
- die('Could not connect to MySQL Server.');
- }
- $database['selected'] = mysql_select_db($database['name'], $database['link']);
- if (!$database['selected']) {
- die ('Can\'t use provided database.');
- }
- //
- //echo(__LINE__ . "<BR />");
- if(!isset($_SESSION['CurrPage']))
- {
- $_SESSION['CurrPage'] = "LoginIndex";
- }
- if(!isset($_SESSION['Rec']))
- {
- $_SESSION['Rec'] = "login";
- }
- if(isset($_GET['action']))
- {
- $action = $_GET['action'];
- }
- else
- {
- $action = "x";
- }
- $errorMessage = "x";
- //echo(__LINE__ . "<BR />");
- function quote_smart($value, $handle) {
- if (get_magic_quotes_gpc()) {
- $value = stripslashes($value);
- }
- if (!is_numeric($value)) {
- $value = "'" . mysql_real_escape_string($value, $handle) . "'";
- }
- return $value;
- }
- /**
- * Check email address validity
- * @param strEmailAddress Email address to be checked
- * @return True if email is valid, false if not
- */
- function email_valid($strEmailAddress) {
- // If magic quotes is "on", email addresses with quote marks will
- // fail validation because of added escape characters. Uncommenting
- // the next three lines will allow for this issue.
- //if (get_magic_quotes_gpc()) {
- // $strEmailAddress = stripslashes($strEmailAddress);
- //}
- // Control characters are not allowed
- if (preg_match('/[\x00-\x1F\x7F-\xFF]/', $strEmailAddress)) {
- return false;
- }
- // Check email length - min 3 (a@a), max 256
- if (!check_text_length($strEmailAddress, 3, 256)) {
- return false;
- }
- // Split it into sections using last instance of "@"
- $intAtSymbol = strrpos($strEmailAddress, '@');
- if ($intAtSymbol === false) {
- // No "@" symbol in email.
- return false;
- }
- $arrEmailAddress[0] = substr($strEmailAddress, 0, $intAtSymbol);
- $arrEmailAddress[1] = substr($strEmailAddress, $intAtSymbol + 1);
- // Count the "@" symbols. Only one is allowed, except where
- // contained in quote marks in the local part. Quickest way to
- // check this is to remove anything in quotes. We also remove
- // characters escaped with backslash, and the backslash
- // character.
- $arrTempAddress[0] = preg_replace('/\./'
- ,''
- ,$arrEmailAddress[0]);
- $arrTempAddress[0] = preg_replace('/"[^"]+"/'
- ,''
- ,$arrTempAddress[0]);
- $arrTempAddress[1] = $arrEmailAddress[1];
- $strTempAddress = $arrTempAddress[0] . $arrTempAddress[1];
- // Then check - should be no "@" symbols.
- if (strrpos($strTempAddress, '@') !== false) {
- // "@" symbol found
- return false;
- }
- // Check local portion
- if (!check_local_portion($arrEmailAddress[0])) {
- return false;
- }
- // Check domain portion
- if (!check_domain_portion($arrEmailAddress[1])) {
- return false;
- }
- // If we're still here, all checks above passed. Email is valid.
- return true;
- }
- //echo(__LINE__ . "<BR />");
- /**
- * Checks email section before "@" symbol for validity
- * @param strLocalPortion Text to be checked
- * @return True if local portion is valid, false if not
- */
- function check_local_portion($strLocalPortion) {
- // Local portion can only be from 1 to 64 characters, inclusive.
- // Please note that servers are encouraged to accept longer local
- // parts than 64 characters.
- if (!check_text_length($strLocalPortion, 1, 64)) {
- return false;
- }
- // Local portion must be:
- // 1) a dot-atom (strings separated by periods)
- // 2) a quoted string
- // 3) an obsolete format string (combination of the above)
- $arrLocalPortion = explode('.', $strLocalPortion);
- for ($i = 0, $max = sizeof($arrLocalPortion); $i < $max; $i++) {
- if (!preg_match('.^('
- . '([A-Za-z0-9!#$%&\'*+/=?^_`{|}~-]'
- . '[A-Za-z0-9!#$%&\'*+/=?^_`{|}~-]{0,63})'
- .'|'
- . '("[^\\\"]{0,62}")'
- .')$.'
- ,$arrLocalPortion[$i])) {
- return false;
- }
- }
- return true;
- }
- /**
- * Checks email section after "@" symbol for validity
- * @param strDomainPortion Text to be checked
- * @return True if domain portion is valid, false if not
- */
- function check_domain_portion($strDomainPortion) {
- // Total domain can only be from 1 to 255 characters, inclusive
- if (!check_text_length($strDomainPortion, 1, 255)) {
- return false;
- }
- // Check if domain is IP, possibly enclosed in square brackets.
- if (preg_match('/^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])'
- .'(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}$/'
- ,$strDomainPortion) ||
- preg_match('/^\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])'
- .'(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\]$/'
- ,$strDomainPortion)) {
- return true;
- } else {
- $arrDomainPortion = explode('.', $strDomainPortion);
- if (sizeof($arrDomainPortion) < 2) {
- return false; // Not enough parts to domain
- }
- for ($i = 0, $max = sizeof($arrDomainPortion); $i < $max; $i++) {
- // Each portion must be between 1 and 63 characters, inclusive
- if (!check_text_length($arrDomainPortion[$i], 1, 63)) {
- return false;
- }
- if (!preg_match('/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|'
- .'([A-Za-z0-9]+))$/', $arrDomainPortion[$i])) {
- return false;
- }
- if ($i == $max - 1) { // TLD cannot be only numbers
- if (strlen(preg_replace('/[0-9]/', '', $arrDomainPortion[$i])) <= 0) {
- return false;
- }
- }
- }
- }
- return true;
- }
- /**
- * Check given text length is between defined bounds
- * @param strText Text to be checked
- * @param intMinimum Minimum acceptable length
- * @param intMaximum Maximum acceptable length
- * @return True if string is within bounds (inclusive), false if not
- */
- function check_text_length($strText, $intMinimum, $intMaximum) {
- // Minimum and maximum are both inclusive
- $intTextLength = strlen($strText);
- if (($intTextLength < $intMinimum) || ($intTextLength > $intMaximum)) {
- return false;
- } else {
- return true;
- }
- }
- //echo(__LINE__ . "<BR />");
- switch($_SESSION['CurrPage'])
- {
- case "LoginIndex":
- {
- //echo(__LINE__ . "<BR />");
- $uname = "";
- $pword = "";
- $errorMessage = "x";
- //==========================================
- // ESCAPE DANGEROUS SQL CHARACTERS
- //==========================================
- if ($_SERVER['REQUEST_METHOD'] == 'POST')
- {
- //echo(__LINE__ . "<BR />");
- if($_POST['loginaction'] == "Login")
- {
- if (md5($_POST['norobot']) == $_SESSION['randomnr2'])
- {
- //echo(__LINE__ . "<BR />");
- $uname = $_POST['username'];
- $pword = $_POST['password'];
- $uname = quote_smart($uname, $database['link']);
- $pword = strtoupper(hash("whirlpool",$pword));
- $SQL = "SELECT * FROM `sms_accounts` WHERE `Email` = $uname AND `Password` = '$pword'";
- $result = mysql_query($SQL,$database['link']);
- //====================================================
- // CHECK TO SEE IF THE $result VARIABLE IS TRUE
- //====================================================
- //echo(__LINE__ . "<BR />");
- if ($result)
- {
- //echo(__LINE__ . "<BR />");
- $num_rows = @mysql_num_rows($result);
- if ($num_rows > 0)
- {
- //echo(__LINE__ . "<BR />");
- $row = mysql_fetch_array($result, MYSQL_ASSOC);
- $_SESSION['login'] = "1";
- $_SESSION['index'] = $row["id"];
- $_SESSION['credits'] = $row["credits"];
- $_SESSION['Email'] = $row["Email"];
- $_SESSION['CurrPage'] = "UserIndex";
- $_SESSION['Rec'] = "default";
- $_SESSION['LoginTime'] = time();
- }
- else
- {
- //echo(__LINE__ . "<BR />");
- $errorMessage = lng("wrongemailpasswd");
- }
- }
- else
- {
- //echo(__LINE__ . "<BR />");
- $errorMessage = lng("uknerr");
- }
- }
- else
- {
- $errorMessage = lng("robot");
- }
- $_SESSION['Rec'] = "login";
- //echo(__LINE__ . "<BR />");
- }else
- if($_POST['loginaction'] == "Register")
- {
- //echo(__LINE__ . "<BR />");
- $_SESSION['Rec'] = "register";
- //$errorMessage = "Registraties zijn uitgeschakelt";
- }else
- if($_SESSION['Rec'] == "submitregister")
- {
- if($_POST['reggoback'] == "Back")
- {
- $_SESSION['Rec'] = "login";
- }
- else
- {
- if (md5($_POST['norobot']) == $_SESSION['randomnr2'])
- {
- //echo(__LINE__ . "<BR />");
- $uname = $_POST['username'];
- $pword = $_POST['password'];
- $rpword = $_POST['rpassword'];
- if(email_valid($uname) == true)
- {
- if($pword == $rpword)
- {
- if(strlen($pword) >= 6)
- {
- $uname = quote_smart($uname, $database['link']);
- $SQL = "SELECT `Email` FROM `sms_accounts` WHERE `Email` = " . $uname;
- $result = mysql_query($SQL,$database['link']);
- $num_rows = @mysql_num_rows($result);
- if ($num_rows == 0)
- {
- $pword = strtoupper(hash("whirlpool",$pword));
- $SQL = "INSERT INTO `sms_accounts` (`Email`,`Password`) VALUES(".$uname.",'".$pword."')";
- $result = mysql_query($SQL,$database['link']);
- if($result)
- {
- $_SESSION['Rec'] = "newaccount";
- mysql_query("INSERT INTO `sms_stats` VALUES(DATE_FORMAT(NOW(), '%Y-%m-01'),0,0,1,0) ON DUPLICATE KEY UPDATE NewUsers = NewUsers+1",$database['link']);
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("catdb");
- }
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("aexists");
- }
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("pwhastobe");
- }
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("pwsnotsame");
- }
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("wrongmail");
- }
- }
- else
- {
- $_SESSION['Rec'] = "register";
- $errorMessage = lng("robot");
- }
- }
- break;
- }
- }
- break;
- }
- case "UserIndex":
- {
- //echo(__LINE__ . "<BR />");
- if((time()-$_SESSION['LoginTime']) <= 900)
- {
- //echo(__LINE__ . "<BR />");
- $SQL = "SELECT credits FROM `sms_accounts` WHERE `id` = ".$_SESSION['index'];
- $result = mysql_query($SQL,$database['link']);
- $_SESSION['LoginTime'] = time();
- if ($result)
- {
- $num_rows = @mysql_num_rows($result);
- if ($num_rows > 0)
- {
- $row = mysql_fetch_array($result, MYSQL_ASSOC);
- //$_SESSION['login'] = "1";
- //$_SESSION['index'] = $row["id"];
- //$_SESSION['Email'] = $row["Email"];
- $_SESSION['credits'] = $row["credits"];
- //$_SESSION['CurrPage'] = "UserIndex";
- //$_SESSION['LoginTime'] = time();
- }
- }
- if ($_SERVER['REQUEST_METHOD'] == 'POST')
- {
- //echo(__LINE__ . "<BR />");
- switch($_SESSION['Rec'])
- {
- case "changepass":
- {
- $CurrPW = strtoupper(hash("whirlpool",$_POST['cpassword']));
- $NewPW = strtoupper(hash("whirlpool",$_POST['npassword']));
- $RepPW = strtoupper(hash("whirlpool",$_POST['rpassword']));
- if($NewPW != $RepPW)
- {
- $errorMessage = lng("newpsmismatch");
- $action = "newrepchpwfail";
- }
- else
- if(strlen($_POST['npassword']) < 6)
- {
- $errorMessage = lng("pwhastobe");
- $action = "newrepchpwfail";
- }
- else
- {
- $SQL = "SELECT `Password` FROM `sms_accounts` WHERE `Email` = '".$_SESSION['Email']."'";
- $result = mysql_query($SQL,$database['link']);
- $num_rows = @mysql_num_rows($result);
- if ($num_rows > 0)
- {
- $row = mysql_fetch_array($result, MYSQL_ASSOC);
- $PlayerPW = $row["Password"];
- if($PlayerPW != $CurrPW)
- {
- $errorMessage = lng("pwfail");
- $action = "newrepchpwfail";
- }
- else
- {
- $SQL = "UPDATE `sms_accounts` set `Password` = '$NewPW' WHERE Email = '".$_SESSION['Email']."'";
- mysql_query($SQL,$database['link']);
- $action = "changepwsuccess";
- }
- }
- else
- {
- $errorMessage = lng("uknerr");
- $action = "newrepchpwfail";
- }
- }
- break;
- }
- case "cemail":
- {
- $CurrPW = strtoupper(hash("whirlpool",$_POST['cpassword']));
- if(email_valid($_POST['nemail']) == true)
- {
- $NewMail = quote_smart($_POST['nemail'], $database['link']);
- $SQL = "SELECT `Password` FROM `sms_accounts` WHERE `Email` = '".$_SESSION['Email']."'";
- $result = mysql_query($SQL,$database['link']);
- $num_rows = @mysql_num_rows($result);
- if ($num_rows > 0)
- {
- $row = mysql_fetch_array($result, MYSQL_ASSOC);
- $PlayerPW = $row["Password"];
- if($PlayerPW != $CurrPW)
- {
- $errorMessage = lng("pwfail");
- $action = "mailfail";
- }
- else
- {
- $SQL = "SELECT `Email` FROM `sms_accounts` WHERE `Email` = " . $NewMail;
- $result = mysql_query($SQL,$database['link']);
- $num_rows = @mysql_num_rows($result);
- if ($num_rows == 0)
- {
- $SQL = "UPDATE `sms_accounts` set `Email` = $NewMail WHERE Email = '".$_SESSION['Email']."'";
- $_SESSION['Email'] = $NewMail;
- $result = mysql_query($SQL,$database['link']);
- if($result)
- {
- $action = "mailsucc";
- }
- else
- {
- $action = "mailfail";
- $errorMessage = lng("ccmail");
- }
- }
- else
- {
- $errorMessage = lng("mailused");
- $action = "mailfail";
- }
- }
- }
- else
- {
- $errorMessage = lng("uknerr");
- $action = "mailfail";
- }
- }
- else
- {
- $errorMessage = lng("wrongmail");
- $action = "mailfail";
- }
- break;
- }
- case "sendsms":
- {
- if (md5($_POST['norobot']) == $_SESSION['randomnr2'])
- {
- $cost = 5;
- if($_SESSION['credits'] < $cost)
- {
- $errorMessage = lng("necredits");
- $action = "sms";
- }
- else
- {
- if($_POST['sendertype'] == "OWNNR")
- {
- if($_POST['smsfrom'] != "MeetHelmond")
- {
- $cost += 3;
- }
- }
- if($_SESSION['credits'] < $cost)
- {
- $errorMessage = lng("necredits");
- $action = "sms";
- }
- else
- {
- if(is_numeric($_POST['smsfrom']) == false && strlen($_POST['smsfrom']) > 11)
- {
- $errorMessage = lng("fromwrong");
- $action = "sms";
- }
- else
- {
- $passedtest = false;
- if(substr ( $_POST['smsto'] , 0, 4 ) == "0031")
- {
- $passedtest = true;
- }
- else
- {
- if($_POST['international'] == "YES")
- {
- $cost += 3;
- if($_SESSION['credits'] < $cost)
- {
- $errorMessage = lng("necredits");
- $action = "sms";
- }
- else
- {
- $passedtest = true;
- }
- }
- else
- {
- $errorMessage = lng("interntnum");
- $action = "sms";
- }
- }
- if($passedtest == true)
- {
- $passedtest = false;
- $USER_MSG_SEND = $_POST['message'];
- if(strlen($_POST['message']) > 140 || strlen($_POST['message']) == 0)
- {
- $errorMessage = lng("msglenght");
- $action = "sms";
- }
- else
- {
- if($_POST['adstype'] == "NO")
- {
- $cost += 10;
- if($_SESSION['credits'] < $cost)
- {
- $errorMessage = lng("necredits");
- $action = "sms";
- }
- else
- {
- $passedtest = true;
- }
- }
- else
- {
- $USER_MSG_SEND .= lng("admsg");
- $passedtest = true;
- }
- }
- if($passedtest == true)
- {
- if($_SESSION['credits'] < $cost)
- {
- $errorMessage = lng("necredits");
- $action = "sms";
- }
- else
- {
- if(is_numeric ( $_POST['smsto'] ) == false)
- {
- $errorMessage = lng("invreceip");
- $action = "sms";
- }
- else
- {
- $SMS = new CMSMS;
- $XMLtoSend = $SMS->CreateMessage(
- 'GET YOUR OWN SMS GATEWAY KEY',
- $_POST['smsfrom'],
- $_POST['smsto'],
- 0,
- $USER_MSG_SEND
- );
- if(strlen($SMS->SendMessage('http://smssgateway.clubmessage.nl/cm/gateway.ashx',$XMLtoSend)) > 0)
- {
- $errorMessage = lng("smsdelvfail");
- $action = "sms";
- }
- else
- {
- $_SESSION['credits'] -= $cost;
- //echo($cost);
- $SQL = "UPDATE `sms_accounts` set `credits` = '".$_SESSION['credits']."' WHERE id = '".$_SESSION['index']."'";
- mysql_query($SQL,$database['link']);
- mysql_query("INSERT INTO `sms_stats` VALUES(DATE_FORMAT(NOW(), '%Y-%m-01'),0,".$cost.",0,1) ON DUPLICATE KEY UPDATE SpentCredits = SpentCredits+".$cost.", SentSMS = SentSMS+1",$database['link']);
- $action = "smssucc";
- }
- }
- }
- }
- }
- }
- }
- }
- }
- else
- {
- $errorMessage = lng("robot");
- $action = "sms";
- }
- }
- }
- }
- }
- break;
- }
- }
- mysql_close($database['link']);
- //echo(__LINE__ . "<BR />");
- switch($_SESSION['CurrPage'])
- {
- case "LoginIndex":
- {
- //echo(__LINE__ . "<BR />");
- switch($_SESSION['Rec'])
- {
- case "login":
- {
- //echo(__LINE__ . "<BR />");
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <!--
- Gratis sms versturen naar nederland<BR />
- Gratis sms versturen over de hele wereld<BR />
- Free sms service in the netherlands<BR/>
- Gratis sms in nederland<BR />
- -->
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- ');
- if($errorMessage == "x")
- {
- echo('<div class="boxinfo">'.lng("smspanel").' <a href="mailto:sms@meet-helmond.nl">SMS@Meet-Helmond.nl</a> </div>');
- }
- else
- {
- echo('<div class="boxfail">'.$errorMessage.'</div>');
- }
- echo('
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="112"><b>'.lng("email").'</b></td>
- <td width="188"><input name="username" type="text" class="textfield" id="username" /></td>
- </tr>
- <tr>
- <td><b>'.lng("passwd").'</b></td>
- <td><input name="password" type="password" class="textfield" id="password" /></td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" id="loginaction" name="loginaction" value="Login">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("login").'</button>
- <button type="submit" class="positive" id="loginaction" name="loginaction" value="Register">
- <img src="images/icons/info.png" alt=""/>
- '.lng("register").'</button></td>
- </tr>
- </table>
- </form>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "register":
- {
- //echo(__LINE__ . "<BR />");
- $_SESSION['Rec'] = "submitregister";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- ');
- if($errorMessage == "x")
- {
- echo('<div class="boxinfo">'.lng("crhrya").'</div>');
- }
- else
- {
- echo('<div class="boxfail">'.$errorMessage.'</div>');
- }
- echo('
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="112"><b>'.lng("email").'</b></td>
- <td width="188"><input name="username" type="text" class="textfield" id="username" /></td>
- </tr>
- <tr>
- <td><b>'.lng("passwd").'</b></td>
- <td><input name="password" type="password" class="textfield" id="password" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("reppswd").'</b></td>
- <td><input name="rpassword" type="password" class="textfield" id="rpassword" /></td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" id="reggoback" name="reggoback" value="Register">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("regnow").'</button>
- <button type="submit" class="positive" id="reggoback" name="reggoback" value="Back">
- <img src="images/icons/info.png" alt=""/>
- '.lng("goback").'</button>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "newaccount":
- {
- //echo(__LINE__ . "<BR />");
- $_SESSION['Rec'] = "default";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- '.lng("acccsfly").'
- <p><a href="index.php"><strong><center>'.lng("homepage").'</center></strong></a>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- default:
- {
- //echo(__LINE__ . "<BR />");
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- <!--
- Gratis sms versturen naar nederland<BR />
- Gratis sms versturen over de hele wereld<BR />
- Free sms service in the netherlands<BR/>
- Gratis sms in nederland<BR />
- -->
- </head>
- <div class="information">
- ');
- if($errorMessage == "x")
- {
- echo('<div class="boxinfo">'.lng("smspanel").' <a href="mailto:sms@meet-helmond.nl">SMS@Meet-Helmond.nl</a></div>');
- }
- else
- {
- echo('<div class="boxfail">'.$errorMessage.'</div>');
- }
- echo('
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="112"><b>'.lng("email").'</b></td>
- <td width="188"><input name="username" type="text" class="textfield" id="username" /></td>
- </tr>
- <tr>
- <td><b>'.lng("passwd").'</b></td>
- <td><input name="password" type="password" class="textfield" id="password" /></td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" id="loginaction" name="loginaction" value="Login">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("login").'</button>
- <button type="submit" class="positive" id="loginaction" name="loginaction" value="Register">
- <img src="images/icons/info.png" alt=""/>
- '.lng("register").'</button></td>
- </tr>
- </table>
- </form>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- }
- break;
- }
- case "UserIndex":
- {
- //echo(__LINE__ . "<BR />");
- if((time()-$_SESSION['LoginTime']) > 900)
- {
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- ');
- echo('<div class="boxfail">'.lng("timeouts").'</div>');
- echo('
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="112"><b>'.lng("email").'</b></td>
- <td width="188"><input name="username" type="text" class="textfield" id="username" /></td>
- </tr>
- <tr>
- <td><b>'.lng("passwd").'</b></td>
- <td><input name="password" type="password" class="textfield" id="password" /></td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" id="loginaction" name="loginaction" value="Login">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("login").'</button>
- <button type="submit" class="positive" id="loginaction" name="loginaction" value="Register">
- <img src="images/icons/info.png" alt=""/>
- '.lng("register").'</button></td>
- </tr>
- </table>
- </form>
- </div>
- <body>
- </body>
- </html>
- ');
- $templang = $_SESSION['lang'];
- session_destroy();
- session_start();
- $_SESSION['lang'] = $templang;
- exit();
- }
- switch($action)
- {
- case "logout":
- {
- $_SESSION['Rec'] = "logout";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- '.lng("loggedout").'
- <p><a href="index.php"><strong><center>'.lng("homepage").'</center></strong></a>
- </div>
- <body>
- </body>
- </html>
- ');
- session_destroy();
- break;
- }
- case "changepwsuccess":
- {
- $_SESSION['Rec'] = "default";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- '.lng("pwchsuccsfly").'
- <p><a href="index.php"><strong><center>'.lng("homepage").'</center></strong></a>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "mailsucc":
- {
- $_SESSION['Rec'] = "default";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- '.lng("elsuccchd").'
- <p><a href="index.php"><strong><center>'.lng("homepage").'</center></strong></a>
- </div>
- <body>
- </body>
- </html>
- ');
- session_destroy();
- break;
- }
- case "newrepchpwfail":
- {
- $_SESSION['Rec'] = "changepass";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- <div class="boxfail">'.lng("flwersocrd").'<BR/>');echo($errorMessage);echo('</div>
- <p>
- <form id="passForm" name="passForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td><b>'.lng("currpw").'</b></td>
- <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("newpw").'</b></td>
- <td><input name="npassword" type="password" class="textfield" id="npassword" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("repnewpw").'</b></td>
- <td><input name="rpassword" type="password" class="textfield" id="rpassword" /></td>
- </tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Change">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("change").'</button></td>
- </tr>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "changepassword":
- {
- $_SESSION['Rec'] = "changepass";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- <div class="boxinfo">'.lng("hrycnchypw").'</div>
- <p>
- <form id="passForm" name="passForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td><b>'.lng("currpw").'</b></td>
- <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("newpw").'</b></td>
- <td><input name="npassword" type="password" class="textfield" id="npassword" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("repnewpw").'</b></td>
- <td><input name="rpassword" type="password" class="textfield" id="rpassword" /></td>
- </tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Change">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("change").'</button></td>
- <td>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "mailfail":
- {
- $_SESSION['Rec'] = "cemail";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- <div class="boxfail">');echo($errorMessage);echo('</div>
- <p>
- <form id="mailForm" name="mailForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td><b>'.lng("currpw").'</b></td>
- <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
- </tr>
- <tr>
- <td><b>'.lng("ynewmail").'</b></td>
- <td><input name="nemail" type="text" class="textfield" id="nemail" /></td>
- </tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Verander">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("change").'</button></td>
- <td>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "linkemail":
- {
- $_SESSION['Rec'] = "cemail";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- <div class="boxinfo">'.lng("hrycnchyremail").'</div>
- <p>
- <form id="mailForm" name="mailForm" method="post" action="index.php">
- <table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td><b>'.lng("currpw").'</b></td>
- <td><input name="cpassword" type="password" class="textfield" id="cpassword" /></td>
- </tr>
- <tr>
- <tr>
- <td><b>'.lng("ynewmail").'</b></td>
- <td><input name="nemail" type="text" class="textfield" id="nemail" /></td>
- </tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Verander">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("change").'</button></td>
- <td>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- case "sms":
- {
- //echo(__LINE__ . "<BR />");
- $_SESSION['Rec'] = "sendsms";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- <script language="javascript" type="text/javascript">
- function limitText(limitField, limitCount, limitNum) {
- if (limitField.value.length > limitNum) {
- limitField.value = limitField.value.substring(0, limitNum);
- } else {
- limitCount.value = limitNum - limitField.value.length;
- }
- }
- </script>
- </head>
- <div class="information">
- ');
- if($errorMessage == "x")
- {
- echo('<div class="boxinfo">'.lng("sndsmsinf").'</div>
- <p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="800" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="320"><b>'.lng("fromwho").'</b></td>
- <td>
- <input type="radio" name="sendertype" value="USEMH" checked>'.lng("deffrm").'<br>
- <input type="radio" name="sendertype" value="OWNNR" >'.lng("wantownnum").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("interntsmsquest").'</b></td>
- <td>
- <input type="radio" name="international" value="NO" checked>'.lng("ans_no").'<br>
- <input type="radio" name="international" value="YES" >'.lng("ans_yes").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("enabledadsz").'</b></td>
- <td>
- <input type="radio" name="adstype" value="YES" checked>'.lng("ans_yes2").'<br>
- <input type="radio" name="adstype" value="NO">'.lng("ans_no2").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("wordfrom").'</b></td>
- <td width><input name="smsfrom" type="text" class="textfield" id="smsfrom" value="MeetHelmond"/></td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("senditto").'</b></td>
- <td width><input name="smsto" type="text" class="textfield" id="smsto" value="0031600000000"/></td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("msgtext").'</b></td>
- <td width><textarea name="message" type="text" class="textfield" id="message" rows="10" onKeyDown="limitText(this.form.message,this.form.countdown,140);" onKeyUp="limitText(this.form.message,this.form.countdown,140);"></textarea>
- <BR /><font size="1">'.lng("maxchars").'<br/>
- '.lng("leftchrs").' <input readonly type="text" name="countdown" size="3" value="140"></font>
- </td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Send">
- <img src="images/icons/tick.png" alt=""/>
- '.lng("senditt").'</button></td>
- </tr>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- }
- else
- {
- echo('<div class="boxfail">'.$errorMessage.'</div><p>
- <form id="loginForm" name="loginForm" method="post" action="index.php">
- <table width="800" border="0" align="center" cellpadding="2" cellspacing="0">
- <tr>
- <td width="320"><b>'.lng("fromwho").'</b></td>
- <td>
- <input type="radio" name="sendertype" value="USEMH" checked>'.lng("deffrm").'<br>
- <input type="radio" name="sendertype" value="OWNNR" >'.lng("wantownnum").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("interntsmsquest").'</b></td>
- <td>
- <input type="radio" name="international" value="NO" checked>'.lng("ans_no").'<br>
- <input type="radio" name="international" value="YES" >'.lng("ans_yes").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("enabledadsz").'</b></td>
- <td>
- <input type="radio" name="adstype" value="YES" checked>'.lng("ans_yes2").'<br>
- <input type="radio" name="adstype" value="NO">'.lng("ans_no2").'<br>
- </td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("wordfrom").'</b></td>
- <td width><input name="smsfrom" type="text" class="textfield" id="smsfrom" value="');
- print $_POST['smsfrom'];
- echo('"/></td>
- </tr>
- <tr>
- <td width="320"><b'.lng("senditto").'</b></td>
- <td width><input name="smsto" type="text" class="textfield" id="smsto" value="');
- print $_POST['smsto'];
- echo('"/></td>
- </tr>
- <tr>
- <td width="320"><b>'.lng("msgtext").'</b></td>
- <td width><textarea name="message" type="text" class="textfield" id="message" rows="10" onKeyDown="limitText(this.form.message,this.form.countdown,140);" onKeyUp="limitText(this.form.message,this.form.countdown,140);" value="');
- print $_POST['message'];
- echo('"></textarea>
- <BR /><font size="1">'.lng("maxchars").'<br/>
- '.lng("leftchrs").' <input readonly type="text" name="countdown" size="3" value="140"> </font>
- </td>
- </tr>
- <tr>
- <td><b>'.lng("captchawr").'</b><br><img src="captcha.php" /></td>
- <td><input name="norobot" class="textfield" type="text"></td>
- </tr>
- <tr>
- <td> </td>
- <td><button type="submit" class="positive" value="Verstuur">
- <img src="images/icons/tick.png" alt="Verstuur"/>
- '.lng("senditt").'</button>
- </td>
- </tr>
- </table>
- </form>
- <div class="buttons">
- <a href="index.php" class="negative">
- <img src="images/icons/home.png" alt="Go Back"/>
- '.lng("goback").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- }
- break;
- }
- case "smssucc":
- {
- $_SESSION['Rec'] = "default";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- '.lng("smsetnsuccfsly").'
- <p><a href="index.php"><strong><center>'.lng("homepage").'</center></strong></a>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- default:
- {
- $_SESSION['Rec'] = "default";
- echo('
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset='.lng("charset").'" />
- <title>'.lng("title").'</title>
- <link href="css.css" rel="stylesheet" type="text/css" />
- </head>
- <div class="information">
- <center><div class="box1">'.lng("welcome").' ');
- print $_SESSION['Email'];
- echo('<BR/>'.lng("crdits").' ');
- print $_SESSION['credits'];
- echo('<BR /><BR />'.lng("welcomehelp").' <a href="mailto:sms@meet-helmond.nl">SMS@Meet-Helmond.nl</a><p>
- </div></center>
- <p>
- <center><table width="750">
- <tr><td align="center"><a href="index.php?action=changepassword"><img src="images/password.png"/></a></td>
- <td align="center"><a href="index.php?action=linkemail"><img src="images/linkemail.png"/></a></td>
- </tr>
- <tr><td align="center"><a href="index.php?action=changepassword">'.lng("changeherepw").'</a></td>
- <td align="center"><a href="index.php?action=linkemail">'.lng("changehereeml").'</a></td>
- </tr>
- <tr><td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2196&SID='.$_SESSION['Email'].'"><img src="images/earn.png"/></a></td>
- <td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2202&SID='.$_SESSION['Email'].'"><img src="images/earn.png"/></a></td>
- <td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2203&SID='.$_SESSION['Email'].'"><img src="images/earn.png"/></a></td></tr>
- <tr> <td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2196&SID='.$_SESSION['Email'].'">'.lng("earncrdts").' (+2)</a></td>
- <td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2202&SID='.$_SESSION['Email'].'">'.lng("earncrdts").' (+5)</a></td>
- <td align="center"><a href="https://www.adworkmedia.com/checkout/index.php?pubID=8791&CID=2203&SID='.$_SESSION['Email'].'">'.lng("earncrdts").' (+10)</a></td>
- </tr>
- <tr><td align="center"><a href="index.php?action=sms"><img src="images/sms.png"/></a></td></tr>
- <tr><td align="center"><a href="index.php?action=sms">'.lng("sendnewsmsnow").'</a></td></tr>
- <p>
- </table></center>
- <p><div class="buttons">
- <a href="index.php?action=logout" class="negative">
- <img src="images/icons/error.png" alt="Logout"/>
- '.lng("logoutnow").'
- </a>
- </div>
- </div>
- <body>
- </body>
- </html>
- ');
- break;
- }
- }
- }
- }
- class CMSMS
- {
- function CreateMessage($ProductToken, $Sender, $Recipient, $Tariff, $Body)
- {
- $XMLSMS = new SimpleXMLElement('<MESSAGES/>');
- $XMLSMS->addChild('AUTHENTICATION');
- $XMLSMS->AUTHENTICATION->addChild('PRODUCTTOKEN', $ProductToken);
- $XMLSMS->addChild('TARIFF'); $XMLSMS->TARIFF = $Tariff;
- $XMLSMS->addChild('MSG');
- $XMLSMS->MSG->addChild('FROM');
- $XMLSMS->MSG->FROM = $Sender;
- $XMLSMS->MSG->addChild('BODY');
- $XMLSMS->MSG->BODY = $Body;
- $XMLSMS->MSG->addChild('TO');
- $XMLSMS->MSG->TO = $Recipient;
- return $XMLSMS->asXML();
- }
- function SendMessage($URL, $Message)
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $URL);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml', 'Content-length: ' . strlen($Message)));
- curl_setopt($ch, CURLOPT_POSTFIELDS, $Message);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $return = curl_exec($ch);
- $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- if($http_status == 200)
- {
- return $return;
- }else
- {
- return $http_status;
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement