<?php

/* 
 * Author       : Jai K
 * Purpose      : The View page for Form Download
 * Created On   : 2016-12-28 19:15    
 */
?>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color"><?php echo $title; ?> - View</h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                    <div class="box box-danger">
                        <div class="box-body" style="float: left;">
                            <div class="col-xs-12">
                                <div class="col-md-6">
                                    <div class="form-group float-clear">
                                        <label>Form Name</label><div class="sub-lbl"><?php echo $results['frm_name']; ?></div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="col-xs-12">    
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>File</label>
                                        <div class="sub-lbl" style="float: left;">
                                            <?php 
                                                if( !empty( $results['frm_file'] ) ) :
                                                    echo get_file_preview( DIR_FORM_DOWNLOAD . $results['frm_file'], 'width: 70px; height: 70px;', FALSE );

                                                    if(file_exists( DIR_FORM_DOWNLOAD . $results['frm_file'] ) ) :
                                                ?>
                                                        <a target="_blank" title="Click to download" href="<?php echo BASE_URL .DIR_FORM_DOWNLOAD . $results['frm_file']; ?>" style="background: #1ba; color: #fff; padding: 5px;" >Download</a>
                                                <?php endif; 
                                                endif;
                                            ?>
                                        </div>
                                    </div>
                                </div> 
                                
                            </div>
                            
                            <div class="col-xs-12" style="margin-top: 20px;">    
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="leftcol">Status</label><div class="sub-lbl"><?php echo $results['status'] == "1" ? 'Active' : 'Inactive'; ?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        
                    </div>    
                                                 
                            
            </div>
        </div>
                    
                
    </section><!-- /.content -->
</aside>


