File manager - Edit - /home/autoph/public_html/data03252025consolidation/app/cron/new_import_queue.php
Back
<?php include_once("../../cfg/db.php"); include_once("../sms/sms_start.php"); //4951758356153487 // if(isset($_REQUEST['apiKey'])){ // $params['apiKey'] = $_REQUEST['apiKey']; if(isset($argv[1])){ parse_str($argv[1], $params); if(isset($params['apiKey']) && $params['apiKey'] === '4951758356153487'){ if($db->select("SELECT COUNT(1) FROM `cron_new_import_customer` WHERE 1") == 0){ //if table is empty // get 20 records to store in table // $get_20 = $db->sql_query("SELECT tbnir.customer_id, tbnir.first_name, tbnir.last_name, tbnir.mobile_number, tbnir.company_id, tbnir.dealer_id, tbnir.date_uploaded, tbnir.token, tbnir.status // FROM `text_blast_new_import_record` tbnir // WHERE tbnir.status = -1 LIMIT 50"); //EXCLUDE THIRD PARTY COMPANY $get_20 = $db->sql_query("SELECT tbnir.customer_id, tbnir.first_name, tbnir.last_name, tbnir.mobile_number, tbnir.company_id, tbnir.dealer_id, tbnir.date_uploaded, tbnir.token, tbnir.status FROM `text_blast_new_import_record` tbnir WHERE tbnir.status = -1 AND DATE(date_uploaded) >='2024-09-27' LIMIT 20"); // $get_20 = $db->sql_query("SELECT * From text_blast_new_import_record WHERE (DATE_FORMAT(`date_uploaded`, '%Y-%m-%d') BETWEEN '2024-01-02' AND '2024-02-21') AND `status`='-1' // limit 3"); foreach($get_20 AS $data){ $quer = "INSERT INTO `cron_new_import_customer` (`cust_id`, `first_name`, `last_name`, `number`, `company_id`, `dealer_id`, `date_uploaded`, `token`) VALUES ('".$data['customer_id']."', '".$data['first_name']."', '".$data['last_name']."', '".$data['mobile_number']."', '".$data['company_id']."', '".$data['dealer_id']."', '".$data['date_uploaded']."', '".$data['token']."')"; $db->sql_query($quer); } } return; //always execute this } } echo "What are you doing? "; //this will appear if there's an error on param or code ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.04 |
proxy
|
phpinfo
|
Settings