Beispiel #1
0
 function storeResolution($data)
 {
     global $circle_short, $operator, $number, $arCacheData;
     $conn = getAppDB2Con();
     echo $query = "REPLACE INTO resolution(`number`,`operator`,`circle`,`resolution`) VALUES ('{$number}','{$operator}','{$circle_short}','" . mysql_real_escape_string($data) . "')";
     $result = mysqli_query($conn, $query);
     if ($result) {
         $this->return["response"] = "Your resolution has been stored.Please reply with the date as <dd-mm-yyyy> till which you want to keep this resolution";
         $hit_time = date("Y-m-d H:i:s");
         $expiry_time = date("Y-m-d H:i:s", strtotime($hit_time . " +1 day"));
         $arCacheData["res"]["data"] = $data;
         $arCacheData["res"]["no"] = $number;
         $arCacheData["res"]["expiry"] = $expiry_time;
     } else {
         $this->return["response"] = "Some internal error occured.Please try after some time";
     }
 }
Beispiel #2
0
<?php

$no_result_msg = "Sorry. No Tips found for your query. Try again later\n";
$conDb2 = getAppDB2Con();
if (preg_match("~__tips__content__(.+)__(.+)__(.+)__~", $req, $match)) {
    $tips_type = $match[1];
    $tips_lang = $match[2];
    $tips_id = $match[3];
    $query = "SELECT * FROM tips_content WHERE lcase(language)='{$tips_lang}' AND lcase(type)='{$tips_type}' and id> {$tips_id} limit 1";
    $result = mysqli_query($conDb2, $query) or trigger_error("ERROR in QUERY " . mysql_error());
    if (mysqli_num_rows($result) <= 0) {
        $tips_id = 0;
        //reseting the id value
        $query = "SELECT * FROM tips_content WHERE lcase(language)='{$tips_lang}' AND lcase(type)='{$tips_type}' and id> {$tips_id} limit 1";
    }
    $result = mysqli_query($conDb2, $query) or trigger_error("ERROR in QUERY " . mysql_error());
    //to add to options list
    $optType = "";
    $optLang = "";
    $optID = "";
    while ($row = mysqli_fetch_array($result)) {
        $total_return = $row['type'] . "\n";
        $total_return .= $row['content'] . "\n";
        $optID = strtolower($row['id']);
        $optType = strtolower($row['type']);
        $optLang = strtolower($row['language']);
    }
    if ($total_return) {
        $options_list[] = "Read Next";
        $list[] = array("content" => '__tips__content__' . $optType . '__' . $optLang . '__' . $optID . '__');
    } else {
Beispiel #3
0
                     $operator_trace = "AIRCEL";
                     break;
             }
         }
         $trace_return1 = "Service Provider : {$operator_trace}\nService Region : {$op_circle}\nService Type : {$type_service}";
         $add_below = "\n--\nInternet search on sms! Sms HELP to {$shortcode} to find out more.{$tollfree}";
         break;
     }
     $minDigit = $minDigit - 1;
 }
 echo "<h2>{$req}</h2>";
 if ($operator == "vodafone") {
     $trace_return = $trace_return1;
 } else {
     echo "<h2>INCLUDE TRUECALLER</h2>";
     $conn = getAppDB2Con();
     echo $query = "select * from truecaller where number='{$num_word}' and ccode=91";
     $result = mysqli_query($conn, $query);
     if (mysqli_num_rows($result)) {
         echo "<h2>INCLUDE DB</h2>";
         $row = mysqli_fetch_array($result);
         var_dump($row);
         $name = $row['name'];
         $score = $row['score'];
     } else {
         echo $url = "API";
         $ttime = microtime(true);
         $content = httpGet($url);
         $ttime = microtime(true) - $ttime;
         $log_count = count($to_logserver['urls']);
         $to_logserver['urls'][$log_count]['truecaller']['fetch_time'] = $ttime;