File manager - Edit - /home/autoph/public_html/connectv1/api/controllers/sms.php
Back
<?php class SMSS { function update_sc_reminder_status($json, $db) { $num_rows = $db->sql_num_rows("SELECT * FROM `config_sms_sc_reminder` WHERE 1"); if (intval($num_rows) > 0) { //update $db->sql_query("UPDATE `config_sms_sc_reminder` SET template='$json' "); } else { //insert $db->sql_query("INSERT INTO `config_sms_sc_reminder` (template) VALUES ('$json') "); } } function get_sc_reminder($utility, $db) { return $db->select("SELECT template FROM `config_sms_sc_reminder` LIMIT 1"); } function read_color($name, $db) { $colors = $db->return_result("SELECT id,name FROM `vehicle_color` WHERE status = 1 AND `name` LIKE '%$name%' LIMIT 10 "); $json = []; foreach ($colors as $color) { $json[] = ['id' => $color['name'], 'text' => $color['name']]; } echo json_encode($json); } function read_color_name_by_id($id, $db) { return $db->select("SELECT name FROM `vehicle_color` WHERE status = 1 AND `id` = '$id'"); } function create_color($name, $db) { return $db->sql_query_id("INSERT INTO vehicle_color (`name`, `status`) VALUES ('$name', '1')"); } function read_module_template($id, $db) { return $db->select("SELECT template FROM `sms_module_templates` WHERE status = 1 AND `id` = '$id'"); } function read_module_status($id, $db) { return $db->select("SELECT status FROM `sms_modules` WHERE status = 1 AND `id` = '$id'"); } function update_module_status($id, $module, $status, $db) { // return $db->sql_query("UPDATE `sms_modules` SET status = $status WHERE 1 AND `id` = '$id'"); return $db->sql_query("INSERT INTO sms_modules (id,module,status) VALUES ('$id','$module','$status') ON DUPLICATE KEY UPDATE module = VALUES (module),status = VALUES (status)"); } function update_module_template($id, $module_id, $template, $db) { // return $db->sql_query("UPDATE `sms_module_templates` SET template = '$template' WHERE 1 AND `id` = '$id'"); return $db->sql_query("INSERT INTO `sms_module_templates` (id,module_id,template,status) VALUES ('$id','$module_id','$template','1') ON DUPLICATE KEY UPDATE `template` = VALUES (template), `module_id` = VALUES (module_id),`status` = VALUES (status) "); } }
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings