Voting

05 Oct 2017
404 times

Form for Voting

 

"; die("$user Connection failed......: " . mysqli_connect_error()); } echo "$username Connected successfully......."; //================================================================================================================================ $mobileno = $_GET["mob"]; $msg = $_GET["msg"]; $circle = $_GET["cir"]; $operator = $_GET["opr"]; $timestamp = $_GET["time"]; $progcode = ""; $qnno = ""; $ans = ""; $onlymsg = ""; $sbb = explode(" ",$msg); $j = 0; $length = count($sbb); $bgetans = 0; for ($i = 0; $i < $length; $i++) { global $progcode, $qnno, $ans, $onlymsg, $j; if ($bgetans == 0) { echo "
" . $i . ")" . $sbb[$i]; if (trim($sbb[$i]) == '') { } else { $j++; if ($j == 1) { $progcode = $progcode . strtoupper($sbb[$i]); if (strlen($progcode) == 1) { $j = 0; //Wait for the second letter }elseif (strlen($progcode) > 2) { $qnno = strtoupper(substr($progcode,2)); $progcode = strtoupper(substr($progcode,0,2)); } } elseif ($j == 2) { $qnno = $qnno . strtoupper($sbb[$i]); if (strlen($qnno) > 1) { $ans = strtoupper(substr($qnno,1,1)); $onlymsg = strtoupper(substr($qnno,2)); $qnno = strtoupper(substr($qnno,0,1)); $j = 4; } }elseif ($j == 3) { $ans = strtoupper($sbb[$i]); if (strlen($ans) > 1) { $ans = strtoupper(substr($ans,0,1)); $onlymsg = strtoupper(substr($ans,1)); } $bgetans = 1; } else { $onlymsg = $onlymsg . " " . $sbb[$i]; } } } else { $onlymsg = $onlymsg . " " . $sbb[$i]; } } echo "
Prog is " . $progcode . " " . $qnno . " " . $ans . " " . $onlymsg . "
"; //================================================================================================================================ $pos = -1; $needle = "SEX"; $msg = trim($msg); $hay = strtoupper ($msg); $pos = strpos($hay,$needle); if($pos === true) { //Throw away this sms if it contains objectionable text... die("Pos is true"); } processGen(); //=============================================================== function processGen() { global $mobileno, $msg, $circle, $operator, $timestamp; $sql = "INSERT INTO sms (MOBILENO, MSG, CIRCLE, OPERATOR, TIMESTAMP) VALUES ('$mobileno', '$msg', '$circle', '$operator', '$timestamp')"; writeMyQuery($sql); } //============================GEN Process END=================================================================== if ($progcode == "KT") { processKT(); } elseif ($progcode == "SQ") { processSQ(); } //================================= function processSQ() { global $progcode, $qnno, $ans, $mobileno, $onlymsg, $circle, $operator, $timestamp; //Get the current SMS that is LIVE.... $currentsms = include "getcurrentqn.php"; echo "
Current " . $currentsms; if ($currentsms === $progcode . " " . $qnno) { $sql = "INSERT INTO smsquiz (MOBILENO, MSG, CIRCLE, OPERATOR, TIMESTAMP,CODE,QNNO, ANSWER) VALUES ('$mobileno', '$onlymsg', '$circle', '$operator', '$timestamp','$progcode','$qnno','$ans')"; writeMyQuery($sql); } else { echo "
Current question is different"; } } //=========================SQ Process END====================================== function processKT() { global $progcode, $qnno, $ans, $mobileno, $onlymsg, $circle, $operator, $timestamp; $sql = "INSERT INTO smskt (MOBILENO, MSG, QNNO, ANS, CIRCLE, OPERATOR, TIMESTAMP) VALUES ('$mobileno', '$msg', $'$circle', '$operator', '$timestamp')"; } //=========================KT Process END====================================== function writeMyQuery($sql) { global $conn; if ($conn->query($sql) === TRUE) { echo "Success - $sql"; } else { echo "Error: " . $sql . "
" . $conn->error; } } //============================================================================== $conn->close(); function stringInsert($str,$insertstr,$pos) { $str = substr($str, 0, $pos) . $insertstr . substr($str, $pos); return $str; } ?>

Rate this item
(0 votes)
DD Podhiga

Curabitur ultrices commodo magna, ac semper risus molestie vestibulum. Aenean commodo nibh non dui adipiscing rhoncus.

Website: www.themewinter.com
More in this category: « VideoCall

About Us

DD Podhigai is Doordarshan's Tamil language regional channel. It is broadcasted both terrestrially and via satellite.

  SiteLock 


HITS: free website counter

Other Group Sites

   
     
    

Podhigai on Other DTH

Ch Num: 516 Ch Num: 808  
Ch Num: 907 Ch Num: 122  
Ch Num: 701 Ch Num: 563

Feedback