<style>
    .modal-dialog{
        width: 52%;
    }
</style>
<?php 
$compData   =   $this->mainMenu()->getCompanyData();
/*$str = ['<%= site_url%>','<%= facebook_url%>','<%= twitter_url%>','<%= instagram_url%>','<%= linkedin_url%>','<%= youtube_url%>','<%= client_app_url%>','<%= driver_app_url%>','<%= developed_by%>'];
$rplc = [$compData['site_name'],$compData['facebook'],$compData['twitter'],$compData['instagram'],$compData['linkedin'],$compData['youtube'],$compData['client_app_url'],$compData['driver_app_url'],$compData['developed_by']];*/
$str = ['<%= site_url %>'];
$rplc = [$compData['site_name']];
$smsStr = ['<%=','%>'];
$smsRplc = ['<strong>','</strong>'];
?>
<div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h3 class="modal-title">
            <?php if($type=='sms-template') { ?>
            <?php echo $data['msg_type']; ?>
            <?php } else {?>
            <?php echo $data['name']; ?>
            <?php }?>
        </h3>
</div>
<div class="modal-body pull-left">

    <div class="col-sm-12 fa-border no-padding">
        <div class="invoice-model-bg">
            <div class="col-sm-12 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                   <?php if($type=='header'){ ?>
                   <?php echo str_replace($str,$rplc,$data['header_text']) ;?>
                   <?php } else if($type=='footer') { ?>
                   <?php echo str_replace($str,$rplc,$data['footer_text']) ;?>
                   <?php } else if($type=='template') {?>
                   <?php echo str_replace($str,$rplc,$data['header_text']) ;?>
                   <?php echo str_replace($str,$rplc,$data['description']) ;?>
                   <?php echo str_replace($str,$rplc,$data['footer_text']) ;?>
                   <?php } else if($type=='sms-template') { ?>
                   <?php echo str_replace($smsStr,$smsRplc,$data['message']);?>
                   <?php }?>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal-footer">
    <div class="col-sm-12 no-padding">
        <a class="btn btn-unapublish pull-right" data-dismiss="modal" href="#" id="invoice-cancel">
            <i class="fa fa-close"></i>Exit
        </a>
    </div>
</div>
