<?php

/* 
 * Author       : Jai K
 * Purpose      : The main view page for Kiosk Admin Settings
 * Created On   : 2016-12-21 18:52
 */

?>
<style>
    .inp-lang-swap-icn{
        position: absolute;
        min-width: 40px;
        min-height: 25px;
        background: #f33;
        color: #fff;
        margin-top: -25px;
        font-weight: bold;
        text-align: center;
        line-height: 25px;
        cursor: pointer;
        /*z-index: 99;*/
        
        display: none;
    }
    
    .note {
        padding: 15px 0px; 
    }
    
    .note ul li {
        font-size: 12px; color: #999;
    }
    
    .blck-content table {
        width: 100%;
        
    }
    
    .blck-content table th, .blck-content table td {
        padding: 5px;
        color: #999;
        border: 2px solid #fff;
    }
    
    .blck-content table th {
        background: #607d8b;
        color: #fff;
        text-align: center;
    }
    
    .blck-content table td {
        
    }
    
    .blck-content table td.ctrls {
        text-align: center;
        
    }
    
    .ctrls .fa {
        cursor: pointer;
        padding: 10px;
        border-radius: 20px;
        color: #fff;
        width: 35px;
        font-weight: bold;
        box-shadow: 2px 2px 6px #666;
    }
    
    .ctrls .add-btn {
        background: #607d8b;
    }
    
    .ctrls .rm-btn {
        background: #f33;
    }
    
    .blck-content table input {
        width: 100%;
        border: none;
        padding: 5px 15px;
    }
    
    .thumb-img {
        width: 60px;
        height: 35px;
        position: absolute;
        margin-left: -80px;
    }
    
    .tiny-blck {
        padding-bottom: 40px;
        border-bottom: 1px dotted;
        margin: 20px;
    }
    
    .tiny-blck .sub-title {
        padding: 5px 15px;
        width: 140px;
        color: #fff;
        box-shadow: 2px 2px 4px #666;
        margin: 0px 15px;
    }
    
</style>
<aside class="right-side">
    <section class="content-header">
        <div class="title_bar">
            <h1 class="major_txt_color"><?php echo $title; ?></h1>
            <div class="breadcrumb_container"><?php echo breadcrumb_links();?></div>
        </div>
    </section>
    <!-- Main content -->
    <?php $general = get_general_setting();?>
    <section class="content">
        
            <div class="row" id="main-content">
                <div class="box box-danger">
                    <?php if( !empty( $success ) || !empty( $error ) ) : ?>
                        <div class="alert alert-<?php echo !empty( $success ) ? 'success' : 'danger'; ?> alert-dismissable">
                            <i class="fa fa-thumbs-o-<?php echo !empty( $success ) ? 'up' : 'down'; ?>"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            <h4><?php echo !empty( $success ) ? $success : $error; ?></h4>
                        </div>
                    <?php endif; ?>
                </div> 

                <div class="col-xs-12">
                    <form action="<?php echo $form_action;?>" method="post"  enctype="multipart/form-data" method="post" onsubmit="return validate(); ">    
                        <input type="hidden" name="token" value="<?php echo $token; ?>" />
                        <ul class="error_container"></ul>
                        <div class="col-xs-12 blck">
                            <div class="sub-title" ><h4><i class="fa fa-fire" style="font-size: 14px;"></i> Receipt </h4><i class="ctrl opener opened fa fa-chevron-up" style="float: right; margin-top: -25px;"></i></div>
                            <div class="blck-content col-xs-12">
                                <div class="col-md-6">        
                                    <div class="form-group">
                                        <label>Message<div style="color: #999; font-size: 10px; margin-right: 1px;">(Will be displayed, at the bottom of every Archanai receipt)</div></label>
                                        <div class="input-group">
                                            <?php 
                                                $rec_msg_tamil = substr( $rec_msg[0]['value'], 0, 3) == 'TAM' ? TRUE : FALSE; 
                                            ?>
                                            <textarea class="form-control" <?php echo $rec_msg_tamil ? 'data-lang="TAM"' : ''; ?> name="rec_msg" rows="3" placeholder=""><?php echo !empty($rec_msg[0]['value']) ? substr($rec_msg[0]['value'], 3 ) : ''; ?></textarea> <!--class="form-control inp-lang-swap"-->
                                        </div>
                                    </div>
                                    
                                </div>

                                <div class="col-md-6">                                    
                                    

                                </div>
                            </div> <!-- blck-content -->    
                        </div> <!-- blck -->
                        
                        <div class="col-xs-12 blck">
                            <div class="sub-title" ><h4><i class="fa fa-fire" style="font-size: 14px;"></i> Acknowledgement </h4><i class="ctrl opener opened fa fa-chevron-up" style="float: right; margin-top: -25px;"></i></div>
                            <div class="blck-content col-xs-12">
                                <div class="col-md-6">        
                                    <div class="form-group">
                                        <label>SMS<div style="color: #999; font-size: 10px; margin-right: 1px;">Usage: Dear ((1)), You have successfully booked ((2)) with us. Date: ((3)). </div></label>
                                        <div class="input-group">
                                            <?php 
                                                $ack_msg_tamil = substr( $ack_sms_msg[0]['value'], 0, 3) == 'TAM' ? TRUE : FALSE; 
                                            ?>
                                            <textarea class="form-control" <?php echo $ack_msg_tamil ? 'data-lang="TAM"' : ''; ?> name="ack_sms_msg" rows="3" placeholder=""><?php echo !empty($ack_sms_msg[0]['value']) ? substr($ack_sms_msg[0]['value'], 3 ) : ''; ?></textarea>
                                        </div>
                                    </div>
                                    
                                    
                                    <div class="form-group note">
                                        <span style="font-weight: bold; color: #666; font-size: 10px;">Params: </span>
                                        <ul>
                                            <li>1   -   Name of the person</li>
                                            <li>2   -   Module Name (Eg. Prasadam)</li>
                                            <li>3   -   Date (DD/MM/YYYY)</li>
                                            <li>4   -   Time (HH:MM AM)</li>
                                        </ul>
                                        
                                    </div>
                                </div>

                                <div class="col-md-6">                                    
                                    
                                    <div class="form-group">
                                        <label>Mail<div style="color: #999; font-size: 10px; margin-right: 1px;">The description for to given at top of the mail</div></label>
                                        <div class="input-group">
                                            <?php 
                                                $ack_msg_tamil = substr( $ack_mail_msg[0]['value'], 0, 3) == 'TAM' ? TRUE : FALSE; 
                                            ?>
                                            <textarea class="form-control inp-lang-swap" <?php echo $ack_msg_tamil ? 'data-lang="TAM"' : ''; ?> name="ack_mail_msg" rows="3" placeholder=""><?php echo !empty($ack_mail_msg[0]['value']) ? substr($ack_mail_msg[0]['value'], 3 ) : ''; ?></textarea>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group note">
                                        <ul>
                                            <li>5   -   Total Amount</li>
                                            <li>6   -   Contact No</li>
                                            <li>7   -   Contact E-Mail</li>
                                            <li>8   -   Receipt No</li>
                                        </ul>
                                    </div>
                                </div>
                                
                                
                            </div> <!-- blck-content -->    
                        </div> <!-- blck -->
                        <?php if($general->scan_availability == 1) : ?>
                            <div class="col-xs-12 blck">
                                <div class="sub-title" ><h4><i class="fa fa-fire" style="font-size: 14px;"></i> Kiosk - Scan Card</h4><i class="ctrl opener opened fa fa-chevron-up" style="float: right; margin-top: -25px;"></i></div>
                                <div class="blck-content col-xs-12" style="padding: 0px; margin-top: -10px;">
                                    <div class="tiny-blck">
                                        <div class="sub-title">
                                             Video
                                        </div>
                                        <div class="content">
                                            <label for="video_chk" style="float: right; margin-top: -32px; color: #999; margin-right: 20px; ">
                                                <input type="checkbox" name="video_chk" <?php echo $video_url[0]['status'] == "0" ? '' : 'checked'; ?> />
                                                <span style="margin-left: 10px; font-size: 12px; border-bottom: 1px dotted; padding-bottom: 5px;">Enable Video</span>
                                            </label>
                                            <input type="text" class="form-control" style="min-width: 432px; border: none; letter-spacing: 1px; border-bottom: 1px solid; padding: 20px;" name="video_url" value="<?php echo $video_url[0]['value']; ?>" placeholder="Ex: http://example.com/my_video.mkv" />
                                            <span style="color: #999; font-size: 12px; letter-spacing: 1px; line-height: 30px; padding-left: 20px;">(or) uploads/videos/my_shots.mp4</span>
                                        </div>
                                    </div>
                                    
                                    <div class="tiny-blck">
                                        <div class="sub-title">
                                            Event(s)
                                        </div>
                                        <div class="content" id="event" >
                                            <table>
                                                <thead>
                                                    <tr>
                                                        <th width="5%">Active</th>
                                                        <th>Event Name</th>
                                                        <th>Start Date</th>
                                                        <th>End Date</th>
                                                        <th>Period</th>
                                                        <th width="5%">&nbsp;</th>
                                                    </tr>
                                                </thead>
                                                
                                                <tbody>
                                                    
                                                </tbody>
                                            </table>
                                            
                                            
                                        </div>
                                    </div>
                                    
                                    <div class="tiny-blck">
                                        <div class="sub-title">
                                            Advertisement(s)
                                        </div>
                                        <div class="content" id="ad" >
                                            <table>
                                                <thead>
                                                    <tr>
                                                        <th width="5%">Active</th>
                                                        <th>Ad. Name</th>
                                                        <th colspan="2">Image</th>
                                                        <th width="5%">&nbsp;</th>
                                                    </tr>
                                                </thead> 
                                                <tbody data-val='<?php echo json_encode( $advertisement ); ?>' data-dir="<?php echo DIR_ADVERTISEMENT; ?>">

                                                </tbody>
                                            </table>
                                            
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endif;?>
                        
                        <div class="box-footer form-actions" style="float: left; width: 100%; margin-top: 30px;">
                            <button class="btn btn-primary" type="reset"><i class="fa fa-trash"></i> Clear</button>
                            <button type="submit" class="btn btn-danger" name="submit" value="Update"><i class="fa fa-floppy-o"></i> Update</button>
                        </div>
                        
                    </form>    
                </div>
                
                
                
                    
            </div> <!-- main-content -->
        
    </section><!-- /.content -->
</aside><!-- /.right-side -->
<!-- ./wrapper -->
<script type="text/javascript" src="<?php echo BASE_URL; ?>assets/js/billing/settings.js"></script>
