X7ROOT File Manager
Current Path:
/home/hamdjcne/app.hamdalillahitravel.com/app/Views/accounts
home
/
hamdjcne
/
app.hamdalillahitravel.com
/
app
/
Views
/
accounts
/
ðŸ“
..
📄
admin.php
(5.11 KB)
📄
admin_form.php
(4.56 KB)
📄
announcement.php
(12.35 KB)
📄
announcement_form.php
(6.28 KB)
📄
customer.php
(13.06 KB)
📄
customer_form.php
(9.6 KB)
📄
profile.php
(75.96 KB)
Editing: customer_form.php
<?php use App\Models\Crud; $this->Crud = new Crud(); ?> <?php echo form_open_multipart($form_link, array('id'=>'bb_ajax_form', 'class'=>'')); ?> <!-- delete view --> <?php if($param2 == 'delete') { ?> <div class="row"> <div class="col-sm-12"><div id="bb_ajax_msg"></div></div> </div> <div class="row"> <div class="col-sm-12 text-center"> <h3><b>Are you sure?</b></h3> <input type="hidden" name="d_customer_id" value="<?php if(!empty($d_id)){echo $d_id;} ?>" /> </div> <div class="col-sm-12 text-center"> <button class="btn btn-danger text-uppercase" type="submit"> <i class="bi bi-trash2"></i> Yes - Delete </button> </div> </div> <?php } ?> <?php if($param2 == 'email') { ?> <div class="row"> <div class="col-sm-12 fs-2"><div id="bb_ajax_msg"></div></div> </div> <div class="row"> <input type="hidden" name="uid" id="uid" value="<?php if(!empty($d_id)){echo $d_id;} ?>" /> <div class="col-sm-6 text-center my-5"> <button class="btn btn-info text-uppercase" type="button"> <i class="bi bi-send"></i> Send Activatation Email </button> </div> <div class="col-sm-6 text-center my-5"> <button class="btn btn-primary text-uppercase" type="button"> <i class="bi bi-send"></i> Send One Time Password </button> </div> </div> <?php } ?> <!-- insert/edit view --> <?php if($param2 == 'edit' || $param2 == '') { ?> <div class="row"> <div class="col-sm-12"><div id="bb_ajax_msg"></div></div> </div> <div class="row"> <input type="hidden" name="user_id" value="<?php if(!empty($e_id)){echo $e_id;} ?>" /> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Company Name</label> <input type="text" class="form-control" name="company_name" id="company_name" required value="<?php if(!empty($e_company_name)){echo $e_company_name;} ?>"> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Email</label> <input type="email" class="form-control" name="email" id="email" required value="<?php if(!empty($e_email)){echo $e_email;} ?>" readonly> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Phone</label> <input type="text" class="form-control" name="phone" id="phone" required value="<?php if(!empty($e_phone)){echo $e_phone;} ?>"> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Account status</label> <select class="form-control js-select2" data-toggle="select2" id="ban" name="ban" > <option value="1" <?php if(!empty($e_ban)){if($e_ban == 1){echo 'selected';}} ?>>Activated</option> <option value="0" <?php if(!empty($e_ban)){if($e_ban == 0){echo 'selected';}} ?>>Disabled</option> </select> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Approval status</label> <select class="form-control js-select2" data-toggle="select2" id="approval" name="approval" required> <option value="0" <?php if(!empty($e_approval)){if($e_approval == 0){echo 'selected';}} ?>>Pending</option> <option value="1" <?php if(!empty($e_approval)){if($e_approval == 1){echo 'selected';}} ?>>Approved</option> </select> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Address</label> <input type="text" class="form-control" name="address" id="address" value="<?php if(!empty($e_address)){echo $e_address;} ?>"> </div> </div> <div class="col-sm-6 mb-8"> <div class="form-group" id=""> <label for="activate" class="mb-2">Role</label> <select class="form-select js-select2" data-search="on" id="role" name="role"> <option value=" ">Select</option> <?php $cat = $this->Crud->read_single_order('name!=', 'Developer', 'access_role', 'name', 'asc'); foreach ($cat as $ca) { if($ca->name == 'Administrator' || $ca->name == 'Partner') continue; if($role == 'manager' && $ca->name == 'Manager') continue; ?> <option value="<?=$ca->id;?>" <?php if(!empty($e_role_id)){if($e_role_id == $ca->id){echo 'selected';}} ?>><?=ucwords($ca->name); ?></option> <?php }?> </select> </div> </div> <?php if($param2 == 'edit'){?> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Reset Password</label> <input type="password" class="form-control" name="password" id="password"> </div> </div> <?php } else {?> <div class="col-sm-6 mb-8"> <div class="form-group"> <label for="activate" class="mb-2">Password</label> <input type="password" class="form-control" name="password" id="password" required> </div> </div> <?php } ?> <div class="col-sm-12 text-center"> <button class="btn btn-primary bb_fo_btn" type="submit"> <i class="ri-save-line"></i> Save Record </button> </div> </div> <?php } ?> <?php echo form_close(); ?> <script> $('.js-select2').select2(); function lgaa() { $('#lga_id').html('<option>Loading..</option>'); var state_id = $('#state_id').val(); var lga_id = '<?=$lga_id = isset($e_lga_id) ? $e_lga_id : ''; ?>'; $.ajax({ url: site_url + 'auth/get_city/' + state_id, success: function(data) { $('#lga_id').empty(); $('#lga_id').html(data); if (lga_id) { $('#lga_id').val(lga_id); } } }); } <?php if($param2 == 'edit' || $param2 == '') { ?> lgaa(); <?php } ?> $(document).ready(function() { // Handle Activation Email Button Click $(".btn-info").click(function() { $('#bb_ajax_msg').html('<div class="col-sm-12 fs-2 text-center" data-kt-indicator="on"> <span class="indicator-progress">Please wait... <span class="spinner-border spinner-border-sm align-middle ms-2"></span></span></div>').css('color', 'black'); let userId = $("#uid").val(); // Get the user ID value if (userId) { $.ajax({ url: site_url+'accounts/send_email/activation', // Update with your endpoint for sending activation email type: 'POST', data: { user_id: userId }, success: function(response) { $('#bb_ajax_msg').html(response); }, error: function(xhr, status, error) { $('#bb_ajax_msg').html('Error sending activation email.').css('color', 'red'); console.error(error); // Log error details } }); } else { $('#bb_ajax_msg').html('User ID is missing!').css('color', 'red'); } }); // Handle One-Time Password Button Click $(".btn-primary").click(function() { $('#bb_ajax_msg').html('<div class="col-sm-12 fs-2 text-center" data-kt-indicator="on"> <span class="indicator-progress">Please wait... <span class="spinner-border spinner-border-sm align-middle ms-2"></span></span></div>'); let userId = $("#uid").val(); // Get the user ID value if (userId) { $.ajax({ url: site_url+'accounts/send_email/otp', // Update with your endpoint for sending OTP type: 'POST', data: { user_id: userId }, success: function(response) { $('#bb_ajax_msg').html(response); }, error: function(xhr, status, error) { $('#bb_ajax_msg').html('Error sending one-time password.').css('color', 'red'); console.error(error); // Log error details } }); } else { $('#bb_ajax_msg').html('User ID is missing!'); } }); }); </script> <script src="<?php echo site_url(); ?>assets/js/jsform.js"></script>
Upload File
Create Folder