View file File name : images.php Content : <?php foreach($props as $prop){ ?> <div class="detail-info"></div> <!DOCTYPE html> <html> <head> <title><?=$prop->project_code?></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <div class="content" style="padding:30px;"> <style> body{ color:#004d4d; } </style> <nav class="navbar "> <div class="container-fluid"> <div class="navbar-header"> <a class="" href="<?=$link?>"><h2 class="text-center" style="color:#004d4d;"> <i class="fa fa-arrow-left "></i> <?=$prop->project_code?> <span style="font-size:13px;color:#004d4d;" class="detailadd text-center"><?=$prop->lacality?> , <?=$prop->station?></span></h2> </a> </div> <div class="navbar-header navbar-right"> <a class="navbar-brand" href="#"><button data-toggle="modal" data-target="#myModal<?=$prop->id?>" class="btn btn-danger">Get Contact Details</button> </a> </div> </div> </nav> <?php $images=[]; $property_images=[]; $hall_images=[]; $bathroom_images=[]; $bedroom_images=[]; $balcony_images=[]; $kitchen_images=[]; if($prop->other_images!=''){ $images=explode(',',$prop->other_images); } if($prop->property_images!=''){ $property_images=explode(',',$prop->property_images); } if($prop->hall_images!=''){ $hall_images=explode(',',$prop->hall_images); } if($prop->bathroom_images!=''){ $bathroom_images=explode(',',$prop->bathroom_images); } if($prop->bedroom_images!=''){ $bedroom_images=explode(',',$prop->bedroom_images); } if($prop->balcony_images!=''){ $balcony_images=explode(',',$prop->balcony_images); } if($prop->kitchen_images!=''){ $kitchen_images=explode(',',$prop->kitchen_images); } ?> <ul class="nav nav-tabs row"> <?php if(count($property_images)!=0){ ?> <li <?php if(count($property_images)!=0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Property">Property <?=count($property_images)?></a></li><?php } ?> <?php if(count($hall_images)!=0){ ?> <li <?php if(count($property_images)==0 && count($hall_images)!=0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Hall">Hall <?=count($hall_images)?></a></li><?php } ?> <?php if(count($bathroom_images)!=0){ ?> <li <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)!=0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Kitchen">Kitchen <?=count($bathroom_images)?></a></li><?php } ?> <?php if(count($bedroom_images)!=0){ ?> <li <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)!=0) { echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Bathroom">Bathroom <?=count($bedroom_images)?></a></li><?php } ?> <?php if(count($balcony_images)!=0){ ?> <li <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)!=0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Bedroom">Bedroom <?=count($balcony_images)?></a></li><?php } ?> <?php if(count($kitchen_images)!=0){ ?> <li <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)==0 && count($kitchen_images)!=0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Balcony">Balcony <?=count($kitchen_images)?></a></li><?php } ?> <?php if(count($images)!=0){ ?><li <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)==0 && count($kitchen_images)==0){ echo 'class="active"'; } ?>><a data-toggle="tab" style="color:#004d4d;" href="#Other">Other <?=count($images)?></a></li> <?php } ?> </ul> <div class="tab-content"> <?php if(count($property_images)!=0){ ?> <div id="Property" class="tab-pane fade in <?php if(count($property_images)!=0){ echo 'active'; } ?>"> <h3>Property</h3> <div class="row"> <?php foreach($property_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <img src='<?=$img?>' style='width:100%;'> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($hall_images)!=0){ ?> <div id="Hall" class="tab-pane fade <?php if(count($property_images)==0 && count($hall_images)!=0){ echo 'active'; } ?>"> <h3>Hall</h3> <div class="row"> <?php foreach($hall_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($kitchen_images)!=0){ ?><div id="Kitchen" class="tab-pane fade in <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)==0 && count($kitchen_images)!=0){ echo 'active'; } ?>"> <h3>Kitchen</h3> <div class="row"> <?php foreach($bathroom_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($bathroom_images)!=0){ ?><div id="Bathroom" class="tab-pane fade in <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)!=0){ echo 'active'; } ?>"> <h3>Bathroom</h3> <div class="row"> <?php foreach($bedroom_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($bedroom_images)!=0){ ?><div id="Bedroom" class="tab-pane fade in <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)!=0){ echo 'active'; } ?>"> <h3>Bedroom</h3> <div class="row"> <?php foreach($balcony_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($balcony_images)!=0){ ?><div id="Balcony" class="tab-pane fade in <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)!=0){ echo 'active'; } ?>"> <h3>Balcony</h3> <div class="row"> <?php foreach($kitchen_images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div> <?php } ?> <?php if(count($images)!=0){ ?><div id="Other" class="tab-pane fade in <?php if(count($property_images)==0 && count($hall_images)==0 && count($bathroom_images)==0 && count($bedroom_images)==0 && count($balcony_images)==0 && count($kitchen_images)==0){ echo 'active'; } ?>"> <h3>Other</h3> <div class="row"> <?php foreach($images as $img){ ?> <div class="card col-md-4"> <div class="card-body"> <a href="<?=$img?>" target="__blank" ><img src='<?=$img?>' style='width:100%;'></a> </div> </div> <?php } ?> </div> </div><?php } ?> </div> </div> <div id="myModal<?=$prop->id?>" class="modal fade mdfd" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Fill your details to get Owner/Agent details.</h4> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body "> <form action="<?=base_url()?>properties/add_enquiry" id="form<?=$prop->id?>" method="post" enctype="multipart/form-data"> <div class="row"> <input type="hidden" name="service" value="Property Service" class="form-control" placeholder="Name" > <input type="hidden" id="updated_by<?=$prop->id?>" name="agent" value="<?=$prop->updated_by?>"> <input type="hidden" id="id<?=$prop->id?>" name="project_id" value="<?=$prop->id?>"> <div class="form-group name col-md-6"> <input type="text" id="name<?=$prop->id?>" name="name" class="form-control" placeholder="Name" required> </div> <div class="form-group email col-md-6"> <input type="email" id="email<?=$prop->id?>" name="email" class="form-control" placeholder="Email" required> </div> <div class="form-group number col-md-12"> <input type="text" id="phone<?=$prop->id?>" name="phone" class="form-control" placeholder="Number" required> </div> <div class="form-group message col-md-12"> <textarea class="form-control" id="message<?=$prop->id?>" name="message" rows="5" placeholder="Write message" required></textarea> </div> <div class="send-btn col-md-12"> <button type="button" id="btn<?=$prop->id?>" onclick="add_enquiry(<?=$prop->id?>)" class="btn btn-md button-theme">Send Message</button> </div> </div> </form> <div class="slick-slide-item" id="profile<?=$prop->id?>"style="display:none;"> <div class="row team-2"> <?php $users=$this->Core_model->get_usr($prop->updated_by); ?> <div class="col-xl-12 col-lg-6 col-md-12 col-sm-12 col-pad bg align-self-center"> <div class="detail headimg text-center"> <img src="https://dhcprop.com/assets/img/black-logo.png" alt="logo"> <h4>DHC PropLoan Mart</h4> <div class="bgline"></div> <div class="newcol"> <!--<h4><a href="#"><?=$users[0]->first_name?> <?=$users[0]->last_name?></a></h4>--> <div class="contact"> <ul> <li> <i class="flaticon-mail"></i><a href="mailto:<?=$users[0]->user_id?>"><?=$users[0]->user_id?></a> </li> <li> <i class="flaticon-phone"></i><a href="tel:<?=$users[0]->contact_no?>"><?=$users[0]->contact_no?></a> </li> </ul> </div> </div> </div> </div> </div> </div> </div> <!--<div class="modal-footer">--> <!-- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>--> </div> </div> </div> <?php } ?>