ok
Direktori : /home2/selectio/www/subamangala/admin/ |
Current File : /home2/selectio/www/subamangala/admin/profile-edit.php |
<?php include "header.php"; $ids=$_GET['id']; $statement = $pdo->prepare("SELECT e.* FROM `profiles` e where e.id=".$ids); $statement->execute(); $datas = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); if($totalData>0){ ?> <div class="content-wrapper"> <section class="content-header"> <h1>Edit Profiles Details</h1> <ol class="breadcrumb"> <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Edit Profiles Details</li> </ol> </section> <div class="col-lg-12 alerts"> <div id="custom-alerts" style="display:none;"> <div class="alert alert-dismissable"> <div class="custom-msg"></div> </div> </div> <?php if ($error) { ?> <div class="alert alert-danger alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-ban"></i> Error</h4> <?= $error; ?> </div> <?php $error=0;} if ($warning) { ?> <div class="alert alert-warning alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-warning"></i> Warning</h4> <?= $warning; ?> </div> <?php $warning=0;} if ($message) { ?> <div class="alert alert-success alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4> <i class="icon fa fa-check"></i> Success</h4> <?= $message; ?> </div> <?php $message=0; } ?> </div> <div class="clearfix"></div> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Please fill in the information below</h3> </div> <div class="box-body"> <div class="col-lg-12"> <form enctype="multipart/form-data" method="post" id="preferance_add_update_form"> <div class="row"></div> <div class="form-group" style="text-align:center;"> <input type="submit" name="add_user" value="Update Profile" class="btn btn-success" /> </form> </div> </div> <div class="form-group" style="text-align:center;"> <a href="preference-set.php?id=<?=$_GET['id']?>"><button class="btn btn-primary" ><i class="fa fa-refresh"></i> Reset Form</button></a> <a href="profiles-list.php"><button class="btn btn-warning" ><i class="fa fa-chevron-left"></i> Back to List</button></a> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <?php } ?> <?php include "footer.php"; ?> <script language=JavaScript src="tamil/utf.js"> </SCRIPT> <SCRIPT language=JavaScript src="tamil/tamil.js"></SCRIPT> <script> $(document).ready(function(){ $('input,textarea').on('keydown',function(event){ if(event.which==121){ $(this).toggleClass('tamil'); return false; } if($(this).hasClass('tamil')){ toggleKBMode(event); }else{ return true; } }); $('input,textarea').on('keypress',function(event){ if($(this).hasClass('tamil')){ convertThis(event); } }); }); </script> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <style> .select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: rgb(228, 228, 228); box-sizing: border-box; display: inline-block; margin-left: 5px; margin-top: 5px; position: relative; max-width: 100%; text-overflow: ellipsis; vertical-align: bottom; white-space-collapse: collapse; text-wrap: nowrap; border-width: 1px; border-style: solid; border-color: rgb(170, 170, 170); border-image: initial; border-radius: 4px; padding: 0px 10px 0px 20px; overflow: hidden; color: black; font-weight: 800; } .select2-container--default .select2-selection--multiple { background-color: white; border: 1px solid #aaa; border-radius: 4px; cursor: text; height:100px; padding-bottom: 5px; padding-right: 5px; position: relative; } </style> <script> $(document).ready(function(){ bus_code(); }); $("#role").change(function () { bus_code(); }); function bus_code(){ var role = $("#role").val(); // Role (2=Agent, 3=Driver) if(role==2){ $("#bus_code_section").hide(); }else if(role==3){ $("#bus_code_section").show(); }else{ $("#bus_code_section").hide(); } } </script> <script> $(document).ready(function(){ upload_image(); }); function upload_image(){ $image_crop = $('#image_demo').croppie({ enableExif: true, viewport: { width:500, height:700, type:'square' //circle }, boundary:{ width:500, height:700 } }); $('#upload_image').on('change', function(){ console.log('testing upload image file'); var reader = new FileReader(); reader.onload = function (event) { $image_crop.croppie('bind', { url: event.target.result }).then(function(){ console.log('jQuery bind complete'); }); } reader.readAsDataURL(this.files[0]); $('#uploadimageModal').modal('show'); console.log('testing upload image'); }); $('.crop_image').click(function(event){ $image_crop.croppie('result', { type: 'canvas', size: 'viewport' }).then(function(response){ $.ajax({ url:"img-upload/upload.php", type: "POST", data:{"image": response}, success:function(data) { $('#uploadimageModal').modal('hide'); $('#uploaded_image').html(data); } }); }) }); } </script> <!-- Preference Update Ajax Starts Here --> <script> $('#preferance_add_update_form').on('submit', function(e){ // console.log("Click And Form Working"); e.preventDefault(); var formData = new FormData(this); formData.append('type', 'create_update_preferance'); $.ajax({ url: 'apis/preferance-create-update-api.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { if(response['status']==200){ alert(response['message']); window.location.href="http://fmsbilling.xyz/subamangala/register.php"; $('#preferance_add_update_form').trigger("reset"); }else{ alert(response['message']); } } }); }); </script> <!-- Preference Update Ajax Ends Here -->