0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.226.17.3


Current Path : /proc/thread-self/root/var/www/html/univadmin/
Upload File :
Current File : //proc/thread-self/root/var/www/html/univadmin/cronjob_sendnotif_rcu.php

<?php

require_once('DbConnect.php');
ini_set('display_errors', 'on');
include("sendnotif.php");
ini_set('memory_limit','900M');
ini_set('max_execution_time',1800);

//$fmobileno = $_GET['fmobileno'];

$query = "SELECT fid, fmobappid, ftitle,fmobileno, fbody FROM pushnotif 
where ifnull(fmobileno,'') <> ''  and funivcode = '027'
and ifnull(fstatus,'') <> 'T' and ifnull(fmobappid,'') <> ''";

$result = mysqli_query($conn, $query);
$count = mysqli_num_rows($result);

if ($count > 0) {
    $i = 0;
    while ($row = mysqli_fetch_assoc($result)) {
        // $to = $row['mobileno'];
        // $text = $row['fmessage'];
        $fmobileno = $row['fmobileno'];
        $registrationIds[$i] = $row['fmobappid'];
        // var_dump($registrationIds);
        
        $rgTrimedMobs[$i] = $fmobileno;
        
        if($i == 50)
        {
            $msg = array(
                'title'    => $row['ftitle'],
                'body'     => $row['fbody'],
                'icon'    => 'ic_launcher'
            );
            // var_dump($registrationIds);
            // var_dump($msg);
           $notifresp = sendNotification($registrationIds, $msg);
            echo $notifresp;
            echo $fmobileno;
            $srtImplodedMobs = implode("','",$rgTrimedMobs); 
            $strUpdateQuery = "update pushnotif set fstatus = 'T' where  fmobileno in ('{$srtImplodedMobs}')";
        //    var_dump($strUpdateQuery);	   
            $result2 = mysqli_query($conn,$strUpdateQuery);
            
            unset($rgInsert);
            $rgInsert = array();

            unset($rgTrimedMobs);
            $rgTrimedMobs = array();
            $i = 0;
            // break;
        }
        $i++;
    }

    $msg = array(
        'title'    => $row['ftitle'],
        'body'     => $row['fbody'],
        'icon'    => 'ic_launcher'
    );
    // var_dump($registrationIds);
    // var_dump($msg);
    $notifresp = sendNotification($registrationIds, $msg);

    $srtImplodedMobs = implode("','",$rgTrimedMobs); 
    $strUpdateQuery = "update pushnotif set fstatus = 'T' where  fmobileno in ('{$srtImplodedMobs}')";
    $result2 = mysqli_query($conn,$strUpdateQuery);
    echo "SMS Sent";
}