//Create an Account: //CreateAccount($dbc, $_POST['userName'], $_POST['password']); } elseif ($_POST['TASK'] == 2) { //Register an new device: RegisternewDevice($dbc, $_POST['simpleName']); } } switch ($_POST['t']) { case '1': //Test Connection by returnuing the device ID. testConnection($dbc, $_POST['dt']); die; break; case '2': //Get all of the undisplayed Authenticated messages: if (checkValidation($dbc, $_POST['dt'])) { getUndisplayedMessages($dbc, $_POST['dt']); } else { error_log("API DeviceTocken Validation Failed"); die; } break; case '3': $DeviceID = getDeviceIDForDeviceTocken($dbc, $_POST['dt']); awkMessageDisplay($dbc, $DeviceID, $_POST['mid']); die; break; case '4': //Authorise the Message break; case 8:
<?php require "manageDB.php"; $email = $_GET['email']; $name = $_GET['name']; if (checkValidation($email, $name)) { confirmUser($email); echo "<script>alert('La registrazione รจ andata a buon fine. Ora puoi effettuare il login')</script>"; header("location: login.php"); }
function printCheckRadio($field_name, $value, $label, $type = 'checkbox', $image = '', $with_validation = true) { global $form; $use_arrays = substr($field_name, -2) == '[]'; //detect whether the name is an array $base_field_name = $use_arrays ? substr($field_name, 0, -2) : $field_name; //trim the field name if using an array if ($with_validation) { checkValidation($base_field_name, 'abbr'); } echo '<input'; echo ' name="' . htmlspecialchars($field_name) . '"'; echo ' value="' . $value . '"'; if ($type == 'radio') { echo ' type="radio"'; $id = htmlspecialchars($field_name . '_' . str_replace(' ', '_', $value)); } else { echo ' type="checkbox"'; if ($use_arrays) { $id = htmlspecialchars($base_field_name . '_' . str_replace(' ', '_', $value)); } else { $id = htmlspecialchars($field_name); } } echo ' id="' . $id . '"'; //check the box if it should be set if ($use_arrays && in_array($value, $form[$base_field_name]) || !$use_arrays && $form[$field_name] == $value) { echo ' checked="checked"'; } echo ' />'; if ($label != '' || $image != '') { echo ' <label for="' . $id . '">' . trim($image . ' ') . $label . '</label>'; } }