if ($global_level != 0) { $add_client_data_active = isset($_POST["add_client_form_active"]) ? 1 : 0; } /** Arguments used on validation and client creation. */ $edit_arguments = array('id' => $client_id, 'username' => $add_client_data_user, 'name' => $add_client_data_name, 'email' => $add_client_data_email, 'address' => $add_client_data_addr, 'phone' => $add_client_data_phone, 'contact' => $add_client_data_intcont, 'notify' => $add_client_data_notity, 'active' => $add_client_data_active, 'type' => 'edit_client'); /** * If the password field, or the verification are not completed, * send an empty value to prevent notices. */ $edit_arguments['password'] = isset($_POST['add_client_form_pass']) ? $_POST['add_client_form_pass'] : ''; //$edit_arguments['password_repeat'] = (isset($_POST['add_client_form_pass2'])) ? $_POST['add_client_form_pass2'] : ''; /** Validate the information from the posted form. */ $edit_validate = $edit_client->validate_client($edit_arguments); /** Create the client if validation is correct. */ if ($edit_validate == 1) { $edit_response = $edit_client->edit_client($edit_arguments); } } $page_title = __('Edit client', 'cftp_admin'); if (isset($add_client_data_user) && $global_user == $add_client_data_user) { $page_title = __('My account', 'cftp_admin'); } include 'header.php'; ?> <div id="main"> <h2><?php echo $page_title; ?> </h2>