whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
public_html
/
application
/
views
/
webapp
/
Upload File:
files >> //proc/self/root/home/papecmvm/public_html/application/views/webapp/add_user.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php'); $type = $userdata[0]['type']; ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <?php if(isset($user)){ echo '<h1>Edit User</h1>'; }else{ echo '<h1>Add User</h1>'; } ?> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Add User</li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('id' => 'formid'); if(isset($user)){ $enc_id = $this->model->encryptdata($user[0]['rid']); echo form_open_multipart("webapp/people/updateUser/".$enc_id,$attributes); }else{ echo form_open_multipart("webapp/people/add_user",$attributes); } ?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="text-left"> </div> </div><!-- /.box-header --> <div class="box-body"> <div class="col-sm-6"> <div class="form-group"> <label>Type</label> <select class="form-control" name="type" required> <?php if(isset($user)){ $type = $user[0]['type']; } ?> <option value="office_user" <?php if(isset($user)){ if($type == 'office_user'){echo 'selected';} } ?>>Office User</option> <?php if($type == 'admin'){ ?> <option value="team_leader" <?php if(isset($user)){ if($type == 'team_leader'){echo 'selected';} } ?>>Team Leader</option> <option value="admin" <?php if(isset($user)){ if($type == 'admin'){echo 'selected';} } ?>>Admin</option> <?php } ?> </select> </div> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control" required <?php if(isset($user)){ ?> value="<?php echo $user[0]['name']; ?>" <?php } ?> > </div> <div class="form-group"> <label>Email</label> <input type="text" name="email" class="form-control" required <?php if(isset($user)){ ?> value="<?php echo $user[0]['email']; ?>" <?php } ?> > </div> <?php if(!isset($user)) { ?> <div class="form-group"> <label>User Name</label> <input type="text" name="username" class="form-control" required <?php if(isset($user)){ ?> value="<?php echo $user[0]['username']; ?>" <?php } ?> > </div> <?php } ?> <div class="form-group"> <label>Phone</label> <input type="text" name="phone" class="form-control" required <?php if(isset($user)){ ?> value="<?php echo $user[0]['mobile']; ?>" <?php } ?> > </div> <?php if(isset($user)) { ?> <input type="hidden" name="hiddenPhoto" value="<?php echo $user[0]['photo']; ?>"> <?php if(!empty($user[0]['photo'])){ ?> <img src="<?php echo base_url().'webapp/profile/'.$user[0]['photo']; ?>" style="width:100px;"> <?php }else{ ?> <img src="<?php echo base_url().'webapp/profile/noPhotoAvailable.jpg'; ?>" style="width:100px;"> <?php } ?> <?php } ?> <div class="form-group"> <label>Photo</label> <input type="file" name="photo" accept=".png, .jpg, .jpeg, .pdf"> </div> <input type="submit" name="save" value="save" class="btn btn-primary"> </div><!-- /.box-body --> </div> </div><!-- /.box --> </div> </div> <!-- /.row --> <?php echo form_close(); ?> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/webapp/footer.php');?> <script type="text/javascript"> $(document).ready(function(){ //---------------- delete message ------------------------------------- $('#deletedata').click(function() { var exists = $('input[type=checkbox][name^=ck]:checked').filter(':checked').length; if( !exists ) { alert('Please select at least 1 checkbox!'); return false; } else if(confirm('Are you sure you want to delete this Data?')) { var cct = $.cookie("<?php echo $this->config->item('csrf_cookie_name'); ?>"); var postData = $('input[type=checkbox][name^=ck]:checked').serialize(); $.post("postmanagement/deletepostselected",{ck: postData,'<?php echo $this->security->get_csrf_token_name(); ?>': cct}, function(data,status){ location.reload(); }); //$('#formid').submit(); } else { return false; } }); }); </script>
Copyright ©2021 || Defacer Indonesia