<div class="modal-footer"> <button type="submit" class="btn btn-primary" name="submit">Save</button> <button type="reset" class="btn">Cancel</button> </div> </div> <script type="text/template" id="users_view_row_template"> <tr> <td class ="user_id"><%= user_id_string %></td> <td class="first_name"><%= first_name_string %></td> <td class="last_name"><%= last_name_string %></td> <td class="e_mail"><%= e_mail_string %></td> <td class="drivers_license_id"><%= drivers_license_id_string %></td> <td class="gender"><%= gender_string %></td> </tr> </script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&libraries=places"></script> <script src="js/lib/underscore.min.js"></script> <script src="js/admin_users_view.js"></script> <?php } else { ?> <div class="well ds-component ds-hover container-narrow" data-componentid="well1"> <div class="ds-component ds-hover" data-componentid="content2"> <?php functions\html_respond('Log In Required', 'Please register or log in to access this part of the website'); ?> </div> </div> <?php } include "templates/footer.php";
$missing_fields = array(); foreach ($required as $post_key => $db_key) { if (empty($_POST[$post_key])) { $missing_fields[] = $post_key; } else { $user_data[$db_key] = $_POST[$post_key]; } } // Copy over non-required fields $user_data['drivers_license_id'] = $_POST['register-drivers-license-id']; if ($missing_fields) { $status = 'Error!'; $msg = 'Missing fields: ' . implode(', ', $missing_fields); } else { user\add_user($user_data); user\authenticate_user($user_data['email_address'], $user_data['password']); $status = 'Success!'; $msg = 'You have successfully registered for Easy Ride!'; } } include 'templates/head.php'; ?> <div class="well ds-component ds-hover container-narrow" data-componentid="well1"> <div class="ds-component ds-hover" data-componentid="content2"> <?php functions\html_respond($status, $msg); ?> </div> </div> <?php include 'templates/footer.php';