File manager - Edit - /home/custbahd/irungikitchen.com/admin/reminders/add/index.php
Back
<?php session_start(); include_once('../../db/saucerer.php'); //IP r_time Protocol $ip_address = $_SERVER["REMOTE_ADDR"]; // Check if the "mobile" word exists in User-Agent $isMob = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "mobile")); // Check if the "tablet" word exists in User-Agent $isTab = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "tablet")); // Platform check $isWin = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "windows")); $isAndroid = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "android")); $isInotes = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "inotes")); $isIPad = is_numeric(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "ipad")); $isIOS = $isInotes || $isIPad; if($isTab){ if ($isIPad) { $device = 'iPad'; } else { $device = 'Tablet'; } } elseif($isMob){ if ($isInotes) { $device = 'iPhone'; } else { $device = 'Phone'; } } else{ $device = 'Desktop'; } if($isIOS){ $system = 'iOS'; }elseif($isAndroid){ $system = 'ANDROID'; }elseif($isWin){ $system = 'WINDOWS'; } if(isset($_POST['submit'])){ $client_id = $_POST['client_id']; $client_name = $_POST['client_name']; $frequency = $_POST['frequency']; $title = $_POST['title']; $type = $_POST['type']; $notes = $_POST['notes']; $r_date = $_POST['r_date']; $r_time = $_POST['r_time']; $author = $_POST['author']; $handler = $_POST['handler']; $token = $_POST['token']; $access = $_POST['access']; $user = $_SESSION['name']; $page = $_POST['page']; if ($type=='Task') { $sql = "INSERT INTO tasks (client_id, client_name, title, frequency, notes, r_date, r_time, handler, author) VALUES ('$client_id','$client_name','$title','$frequency','$notes','$r_date','$r_time','$handler','$author')"; $link = 'tasks'; } elseif ($type=='Event') { $sql = "INSERT INTO events (client_id, client_name, title, frequency, notes, r_date, r_time, handler, author) VALUES ('$client_id','$client_name','$title','$frequency','$notes','$r_date','$r_time','$handler','$author')"; $link = 'events'; } //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = ''.$type.' successfully created</a>'; $action = "Add"; $result = "Success"; $summary = "".$type.", ".$title." has been created"; $channel = "Notifications"; } else{ $_SESSION['error'] = 'Something went wrong while creating the '.$type.''; $result = "Error"; $summary = "Error creating ".$type.", ".$title.""; $channel = "System"; $action = "Add"; } $attempt = "Admin"; $filter = "Admin"; $category = "".$type.""; $link = "".$link.""; $sql = "INSERT INTO secure (name, token, access, attempt, action, user, handler, result, filter, category, channel, summary, link, ip_address, device_name, system_name) VALUES ('$title', '$token', '$access', '$attempt', '$action', '$user', 'Admin', '$result', '$filter', '$category', '$channel', '$summary', '$link', '$ip_address', '$device', '$system')"; mysqli_query($mysqli, $sql); } header('location: '.$page.''); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 1.2 |
proxy
|
phpinfo
|
Settings