%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php include("includes/header.php"); include("includes/sidebar.php"); function weekday() { $output2 =''; $week_day= array(); $week_day = array("Weekdays","Weekends","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"); for($i=1;$i<sizeof($week_day); $i++){ $output2 .= '<option value="'.@$week_day[$i].'">'.@$week_day[$i].'</option>'; } return $output2; } function get_hours_range( $start = 0, $end = 86400, $step = 3600, $format = 'g:i a' ) { $times = array(); foreach ( range( $start, $end, $step ) as $timestamp ) { $hour_mins = gmdate( 'H:i', $timestamp ); if ( ! empty( $format ) ) $times[$hour_mins] = gmdate( $format, $timestamp ); else $times[$hour_mins] = $hour_mins; } return $times; } $times = get_hours_range(); // 9-17 hours, stepped every 30 mins, formatted as hh:mm $times = get_hours_range( 32400, 61200, 1800, 'H:i' ); ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- Page Content --> <div class="right_col" role="main"> <div class=""> <!-- Page Title Bar --> <div class="page-title"> <div class="title_left"> <h3>Doctor Management</h3> </div> <div class="title_right"> <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search for..."> <span class="input-group-btn"> <button class="btn btn-default" type="button">Go!</button> </span> </div> </div> </div> </div> <!-- End of Page Title Bar --> <div class="clearfix"></div> <?php if((isset($msg))&&($msg!='')){ echo '<script>alert("'.$msg.'");</script>'; } ?> <!-- Content Section --> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <!-- Panel Title --> <div class="x_title"> <h2>View Doctors</h2> <ul class="nav navbar-right panel_toolbox"> <!-- <li><a class="add-new-link" href="<?php //echo base_url();?>admin/Doctor/add_doctor">Add New Doctor</a></li>--> <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a> </li> </ul> <div class="clearfix"></div> </div> <!-- End of Panel Title --> <!-- Panel Content --> <div class="x_content"> <table id="datatable-buttons" class="table table-striped table-bordered"> <thead> <tr> <th class="actions"> <input type="checkbox" id="check-all" class="flat"> </th> <th>ID</th> <th>Name</th> <th>Designation</th> <th>Department</th> <th>Profile</th> <th>OPD Schd.</th> <th class="status actions">Status</th> <th class="priority actions">Priority</th> <th class="actions"></th> </tr> </thead> <tbody> <?php foreach($records as $key=>$record){ ?> <tr> <td class="a-center "> <input type="checkbox" class="flat" name="table_records"> </td> <td><?php echo $record['DoctorID'];?></td> <td><?php echo $record['DoctorTitle'].' '.$record['DoctorName'];?></td> <td><?php echo $record['DesignationTitle'];?></td> <td><?php echo $record['DepartmentNames'];?></td> <td><a href="<?=base_url('uploads/doctor/'.$record['DoctorProfilePic'])?>" target="_blank"><img src="<?php echo base_url('uploads/doctor/'.$record['DoctorProfilePic']);?>" style="height:100px;" alt="" srcset=""></a></td> <td><button type="button" class="btn btn-primary" data-toggle="modal" data-id="<?php echo $record['DoctorID']; ?>" id="getUser" data-target="#exampleModal">OPD Schedule.</button></td> <td><?php echo $record['Status'];?> <!-- <select class="form-control select2-single-ns"> <option>Active</option> <option>Inactive</option> </select> --> </td> <td><input type="text" class="form-control" disabled="disabled" value="<?php echo $record['DoctorPriorityOrder'];?>" size="2"></td> <td> <ul class="nav"> <!-- <li style="float:left;"><a href="#">Quick Edit</a></li> --> <li style="float:left;"><a href="<?php echo base_url();?>admin/Doctor/update_doctor/<?php echo $record['DoctorID'];?>"><i class="fa fa-2x fa-edit"></i></a></li> <li style="float:left;"><a href="<?php echo base_url();?>admin/Doctor/remove_doctor/<?php echo $record['DoctorID'];?>"><i class="fa fa-2x fa-times-circle"></i></a></li> </ul> </td> </tr> <?php }?> </tbody> </table> </div> <!-- End of Panel Content --> </div> </div> </div> <!-- End of Content Section --> </div> </div> <!-- End of Page Content --> <!------------------------ Modal Box-----> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Opd Schedule </h5> <?php echo form_open_multipart('admin/Doctor/opd_schedule/'.$getid, 'id="schedule_add" name="schedule_add"');?> <table class="table table-bordered my_result" id="item_table"> <tr> <th>Day</th> <th>Start Time</th> <th>End Time</th> <th>Add More</th> <tr><td> <select name="day[]" id="day" class="form-control select2-single day1"> <option value="">-Select Days-</option> <?php echo weekday();?></select> </td> <td> <select class="form-control" name="time_first[]" id="time_first"> <?php foreach($times as $key=>$timeview){ echo '<option value='.$timeview.'>'.$timeview.'</option>';}?> </select></td> <td> <select class="form-control" name="time_end[]" id="time_end"> <?php foreach($times as $key=>$timeview){ echo '<option value='.$timeview.'>'.$timeview.'</option>';}?> </select></td> <td><button type="button" name="add" class="btn btn-success btn-sm add"><span class="glyphicon glyphicon-plus"></span></button></td></tr> </tr> </table> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <input type="submit" class="btn btn-primary" name="Save" value="Save changes"> </div> </form> </div> </div> </div> <script type="application/javascript"> //$(document).ready(function(){ $(document).on('click', '#getUser', function(e){ e.preventDefault(); var uid = $(this).data('id'); // it will get id of clicked row var data_pk = 'uid='+uid; $('#dynamic-content').html(''); // leave it blank before ajax call $('#modal-loader').show(); // load ajax loader $.ajax({ url: "Doctor/getuser", async: false, type: "GET", data: data_pk, dataType: "html", success: function(data) { $('.my_result').html(data); } }) .done(function(data){ console.log(data); $('#dynamic-content').html(''); $('#dynamic-content').html(data); // load response $('#modal-loader').hide(); // hide ajax loader }) .fail(function(){ $('#dynamic-content').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...'); $('#modal-loader').hide(); }); }); //}); /***************** working ***/ $(document).ready(function(){ $(document).on('click', '.add', function(){ var html = ''; html += '<tr>'; html +='<td><select name="day[]" class="form-control select2-single day1"><option value="">Select Days</option><?php echo weekday();?></select></td>'; html += '<td><select class="form-control" name="time_first[]" id="time_first"> <?php foreach($times as $timeview){ echo '<option value='.$timeview.'>'.$timeview.'</option>';}?> </select></td> <br/> <td><select class="form-control" name="time_end[]" id="time_end"> <?php foreach($times as $timeview){ echo '<option value='.$timeview.'>'.$timeview.'</option>';}?> </select></td></p>'; html += '<td><button type="button" name="remove" class="btn btn-danger btn-sm remove"><span class="glyphicon glyphicon-minus"></span></button></td></tr>'; $('#item_table').append(html); }); $(document).on('click', '.remove', function(){ $(this).closest('tr').remove(); }); $('#insert_form').on('submit', function(event){ event.preventDefault(); var error = ''; $('.time_start').each(function(){ var count = 1; if($(this).val() == '') { error += "<p>Enter Item Name at "+count+" Row</p>"; return false; } count = count + 1; }); $('.time_end').each(function(){ var count = 1; if($(this).val() == '') { error += "<p>Enter Item Quantity at "+count+" Row</p>"; return false; } count = count + 1; }); $('.item_unit').each(function(){ var count = 1; if($(this).val() == '') { error += "<p>Select Unit at "+count+" Row</p>"; return false; } count = count + 1; }); $('.day1').each(function(){ var count = 1; if($(this).val() == '') { error += "<p>Select Unit at "+count+" Row</p>"; return false; } count = count + 1; }); var form_data = $(this).serialize(); if(error == '') { $.ajax({ url:"insert.php", method:"POST", data:form_data, success:function(data) { if(data == 'ok') { $('#item_table').find("tr:gt(0)").remove(); $('#error').html('<div class="alert alert-success">Item Details Saved</div>'); } } }); } else { $('#error').html('<div class="alert alert-danger">'+error+'</div>'); } }); }); </script> <?php include("includes/footer.php"); ?>