<?php
/* 

 * Author       : Jai K

 * Purpose      : Main Header for "Kiosk Mode"

 * Created On   : 2016-08-22 14:18

 */

if( !defined('BASE_URL') ) :

    define( 'BASE_URL', base_url() );

endif;
?>
<!doctype html>

<html>

    <head>

        <meta charset="UTF-8">

        <title>TIRU - Homepage</title>

        <link rel="shortcut icon" href="<?php echo BASE_URL; ?>assets/billing/images/favicon.ico">

        <!-- <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/css/library/bootstrap.min.css"> -->

        <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/css/library/font-awesome.min.css">

        <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/css/style.css">

        <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/billing/css/common.css">

        <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/billing/css/inner.css">

        <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/billing/css/style.css">

        <?php if( !empty($user_data) ) : ?>

            <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/billing/css/keyboard.css">

            <link rel="stylesheet" href="<?php echo BASE_URL; ?>assets/billing/css/keyboard-previewkeyset.css">

            <link rel="stylesheet" type="text/css" href="<?php echo BASE_URL; ?>assets/css/library/bootstrap-material-datetimepicker.css" />

         <?php endif; ?>

        

        

        <script type="text/javascript" src="<?php echo BASE_URL; ?>assets/billing/js/jquery-1.11.1.min.js"></script>


        <script type="text/javascript">

            var base_url    = baseURL = '<?php echo base_url();?>';

            var controller  = '<?php echo $controller; ?>';

            var method  = '<?php echo $this->uri->segments[2]; ?>';

            var isKskBill   = <?php echo IS_KSK_BILL ? 'true' : 'false'; ?>;

            var pStatus     = "<?php echo $this->session->flashdata( REMOTE_ADDR . '_flag'); ?>";

            var keybrdClr   = "<?php echo $user_data['keyboard_clr']; ?>";

            var isNumpad    = <?php echo (!empty( $user_data['user_id'] ) ? $user_data['numpad'] : $is_numpad) ? 'true' : 'false'; ?>;

            var isTamil     = <?php echo $this->session->userdata( $user_data['user_id'] . '_tamil') ? 'true' : 'false'; ?>;

            var catOn       = <?php echo $user_data['category_on'] ? "true" : "false"; ?>;

            var isScan      = false;

            

            

            <?php $design_setting = get_design_setting();?>

        </script>

        <style type="text/css">

            

            .content_left_top, .amt_content_hd_div, .bottom_icon_div, .multi-select-expand .fa.tick-ok, #num-pad > div {

                background: <?php echo $design_setting->login_page_color;?>;

            }

            

            .top_logo, .bottom_icon1 input, .bottom_icon2 input, .amt_content_div {

                background: <?php echo $design_setting->archanai_title_color;?>;

                color: <?php echo $design_setting->login_page_color;?>;

            }

            #dev-childs .ctrls .add-btn, #num-pad > div .rm-btn {

                color: <?php echo $design_setting->login_page_color;?>;

            }

            

            #num-pad > div .rm-btn {

                border: 1px solid <?php echo $design_setting->login_page_color;?>;

            }

            .arrow-right {

                border-left: 20px solid <?php echo $design_setting->archanai_title_color;?>;

            }

            

             

        </style>

        

    </head>



<body id="ksk">

    <div class="over-lay"></div>

    

    <?php //echo "<pre>Data: "; print_r( $user_data ); die;

 if( !empty($user_data) ) : ?>

    <header>

        

        

        <div class="container">

            <div class="content_left_top">

                <div class="top_logo" style="padding: 0; width: 96px; height: 48px;"><img src="<?php echo BASE_URL; ?>assets/images/tiru_pro.png" style="width: 100%; max-height: 100%;" /></div>

                <div class="arrow-right"></div>

                <div class="app_name lang-swap" data-lang="<?php echo $settings->tamil_name; ?>"><?php echo $settings->temple_name; ?></div>

                <div class="top_right_div top-icn-grp">
					<span class="top_rt_icon8 daydevotees" title="Add Devotees Favorites"></span>
                    
					<span class="top_rt_icon7 daydevoteesret" title="Get Devotees Favorites"></span>
                    
					<span class="top_rt_icon1 lang-switch-btn" title="Switch to ENG/TAMIL language"></span>
					
                    <span class="top_rt_icon2 add-dev-btn" title="Reg. new devotee!"></span>

                    <span class="top_rt_icon3 get-dev-btn" title="Search the devotee!"></span>

                    <span class="top_rt_icon1 apply-names-btn" id="apply-names-btn" title="Apply Names"></span>

                    <span class="rec-sett-btn" title="Receipt Settings"></span>

                    <span class="form-dwnld-btn" title="Download Forms"></span>

                    

                    <a href="<?php echo base_url(); ?>" title="Go to Home"><span class="top_rt_icon4"></span></a>

                </div>

            </div>

    </header>
<?php
endif; // $user_data 
?>

<div class="dialog" id="daydev-dialog">
    <div class="main-wrapper devotee_bg">
         <div class="dev-hdr" style=" background: #fff;  width: 85%; ">
            <h3 style="float: left; border-bottom: none;border-bottom:1px solid #f33;width:100%;  box-shadow: none; text-align: left; padding-left: 15px;"><i class="fa fa-user"></i>  Devotee Favorites </h3>
            
        </div>
       
        <form name="devote_old_form" id="devotee_old_form" method="post" action="<?php echo base_url() . 'billing_common/updatedevotee' ?>" accept-charset="ISO-8859-1">
            <input type="hidden" name="cur_url" id="cur_url" value="<?php echo current_url(); ?>"/>
            <div class="row devploats">
                <div class="col-xs-12 grid dev-mem">
                    <div class="col-xs-6 ">                      
                        <div class="form-group">
                            <label>Name <span style="color:red">*</span></label>
                            <input type="text" name="devnames" id="devnames" class="input devnames" placeholder="Enter Name"/>
                        </div>                                             
                    </div>
                    <div class="clear" style="clear:both;height:3em"></div>
                    <div class="col-xs-12">
						<div class="cell" data-names="Monday">
							<div><span style="" >Monday</span></div>
						</div>
						<div class="cell" data-names="Tuesday">
							<div><span style="" >Tuesday</span></div>
						</div>
						<div class="cell" data-names="Wednesday">
							<div><span style="" >Wednesday</span></div>
						</div>
						<div class="cell" data-names="Thursday">
							<div><span style="" >Thursday</span></div>
						</div>
						<div class="cell" data-names="Friday">
							<div><span style="" >Friday</span></div>
						</div>
						<div class="cell" data-names="Saturday">
							<div><span style="" >Saturday</span></div>
						</div>
						<div class="cell" data-names="Sunday">
							<div><span style="" >Sunday</span></div>
						</div>
					</div>                    
                </div>
            </div>            
			<div class="ctrls">
                <div class="bttn primary daydevok"><i class="fa fa-check"></i> <span>OK</span></div>                
                <div class="bttn clse-btn"><i class="fa fa-times"></i> Cancel</div>
            </div>                       
        </form>
    </div>
</div>

<div class="dialog" id="daydevoteesret-dialog">
	<div class="main-wrapper devotee_bg">
		<div class="dev-hdr" style=" background: #fff;  width: 85%; ">
			<h3 style="float: left; border-bottom: none;border-bottom:1px solid #f33;width:100%;  box-shadow: none; text-align: left; padding-left: 15px;"><i class="fa fa-user"></i>  <?php echo date("l"); ?> </h3>			
		</div>
		<form name="devote_new_form" id="devotee_new_form" method="post" action="<?php echo base_url() . 'billing_common/updatedevotee' ?>" accept-charset="ISO-8859-1">
			<input type="hidden" name="cur_url" id="cur_url" value="<?php echo current_url(); ?>"/>
			<div class="row devnames">
				<div class="col-xs-12 grid dev-mem">
					<div class="col-xs-12 namediv">
						<div class="clear" style="clear:both;height:2em"></div>
						<div class="col-xs-12">		   
						</div>
					</div>
					 <div class="">
						<div class="bttn primary daydevretok"><i class="fa fa-check"></i> <span>OK</span></div>
						<div class="bttn primary deleteret"><i class="fa fa-trash"></i> <span>Delete</span></div>				
						<div class="bttn clse-btn"><i class="fa fa-times"></i> Cancel</div>
					</div>
				</div>			   
			</div>
		</form>
	</div>
</div>

<input type="hidden" name="dayvalues" id="dayvalues" class="dayvalues"/>
<input type="hidden" name="daynamesval" id="daynamesval" class="daynamesval"/>
<script type="text/javascript">
$(document).ready(function(){
    $('.daydevotees').click(function () {
		dialog($('#daydev-dialog'));
	});
	
	$('.daydevoteesret').click(function () {		
		dialog($('#daydevoteesret-dialog'));
		$.ajax({
			url:'<?php echo base_url(); ?>billing_archanai/get_day_devotees',
			data:{"act":"get_day_dev"},
			dataType:"JSON",
			type:'post',
			success:function(output){			  
				var html='<div class="col-xs-12">';
				if(output.length>0){					
				for(var i=0;i<output.length;i++){				   
						html +='<div class="cell" data-names="'+output[i].ref_name+'" data-rand-no="'+output[i].ref_id+'" data-day="Thursday" data-all-days="'+output[i].ref_name_day+'">';
						html +='<div><span style="" >'+output[i].ref_name+' - '+ output[i].id+'</span></div>'   ;
						html +='</div>';				
				}
				 html +='</div>';
				 }else{
					 html +='<p>No details Found</p>';
				 }
				 html +='<div class="clear" style="clear:both;height:5em"></div>';
				$('.namediv').html(html);
			}
		})
	});	
});
</script>