<link rel="stylesheet" href="<?php echo base_url();?>assets/js/validationEngine.jquery.css" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/cust_paginition.css" type="text/css" />
<div id="addMagezine">
			<div class="modal-dialog">
				<div class="modal-content"> 
					<!-- Modal heading -->
					<div class="modal-header">
                        <a class="btn  pull-right mar" href="<?php echo base_url(); ?>index.php/magazine/magazine_list"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> </a>
						<h3 class="modal-title" align="left">Add New Magazine Details</h3>
					</div>
					<!-- // Modal heading END --> 
					<!-- Modal body -->
					<div class="modal-body">
						<div class="innerAll">
							<div class="innerLR">
								<form class="form-horizontal" role="form" id = "add_magezine" method = "post" action = "<?php echo base_url();?>index.php/magazine/add_magezine" enctype="multipart/form-data">
								<?php $this->load->view('admin/flashdata_admin'); ?> 
									<div class="form-group mmar">
										<label  class="col-sm-3 control-label text-center">Magazine ID: </label>
										<div class="col-sm-3">
											<input type="text" class="form-control validate[required, maxSize[35], custom[onlyLetterNumber]] text-input" value="" maxlength="35" name="magezine_id" id="magezine_id" />
										</div>
                                        <div id="promo_code_block" class="formErrorContent"></div>
									</div>
									<div class="form-group mmar">
										<label  class="col-sm-3 control-label text-center">Upload Magazine Image: </label>
										<div class="col-sm-9">
											<input type="file" class="" name="magezine_image" id="magezine_image" />
										</div>
                                        <div id="file_type_msg" class="formErrorContent"></div>
									</div>
									<!--  <div  class="form-group mmar">
										<label  class="col-sm-3 control-label text-center">Crop Image: </label>
										<div class="col-sm-9">
											<img src="<?php echo base_url();?>assets/images/avatar-large.jpg" class="img-responsive" id="jcrop-target-1"/>
											<div id="preview-pane" >
												<div class="preview-container">
													<img src="<?php echo base_url();?>assets/images/avatar-large.jpg" class="img-responsive jcrop-preview" alt="Preview" />
												</div>
											</div>
										</div>
									</div>  -->
									<div class="form-group mmar">
										<label  class="col-sm-3 control-label text-center">Magazine Title: </label>
										<div class="col-sm-9">
											<input type="text" class="form-control validate[required, maxSize[30]] text-input" placeholder="Magezine Name" maxlength="30" name="magezine_name" />
										</div>
									</div>
									<div class="form-group mmar">
										<label  class="col-sm-3 control-label text-center ">Category: </label>
										<div class="col-sm-9">
											<select class="marl-n validate[required] cust_select" name="magezine_category">
												<option value = "">-- Select --</option>
												<?php foreach($category as $strCategory) { ?>
												<option value = "<?php echo $strCategory['id']; ?>"><?php echo $strCategory['name']; ?></option>
												<?php } ?>
											</select>
										</div>

									</div>
									<div class="form-group mmar">
										<label  class="col-sm-3 control-label text-center ">Language: </label>
										<div class="col-sm-9">
											<select class=" marl-n validate[required] cust_select" name="magezine_language">
												<option value = "">-- Select --</option>
												<?php foreach($language as $strLanguage) { ?>
												<option value = "<?php echo $strLanguage['id']; ?>"><?php echo $strLanguage['name']; ?></option>
												<?php } ?>
											</select>
										</div>
									</div>
									<div class="form-group mmar">
										<!-- <label  class="col-sm-3 control-label text-center ">Issues per year: </label>
										<!-- <div class="col-sm-3">
											<select class=" marl-n validate[required] cust_select" name="magezine_issues">
												<option value= "">-- select --</option>
												<option value= "1">1</option>
												<option value= "2">2</option>
												<option value= "3">3</option>
												<option value= "4">4</option>
												<option value= "5">5</option>
												<option value= "6">6</option>
												<option value= "7">7</option>
												<option value= "8">8</option>
												<option value= "9">9</option>
												<option value= "10">10</option>
												<option value= "11">11</option>
												<option value= "12">12</option>
											</select>
										</div> -->
                                        <!--<div class="col-sm-3">
                                            <input type="text" class="form-control validate[required,custom[integer],max[999], min[1]] text-input" value="" maxlength="35" name="magezine_issues" id="magezine_issues" />
                                        </div> -->
										<label  class="col-sm-3 control-label text-center ">Currency: </label>
										<div class="col-sm-3">
											<select class=" marl-n validate[required] cust_select" name="magezine_currency" >
												<option value = "">-- Select --</option>
												<?php foreach($currency as $strCurrency) { ?>
												<option value = "<?php echo $strCurrency['id']; ?>"><?php echo $strCurrency['name']; ?></option>
												<?php } ?>
											</select>
										</div>
									</div>

									<div class="form-group">
										<label  class="col-sm-3 control-label text-center">Magazine Description: </label>
										<div class="col-sm-9">
											<textarea class="form-control "  name="magezine_desc" ></textarea>
										</div>
									</div>
									 <div class="form-group mmar">
										<!--<label  class="col-sm-3 control-label text-center ">Promotional Package: </label>
										<div class="col-sm-3">
											<select class=" col-md-12 marl-n cust_select" name="magezine_promo">
												<option value= "">-- select --</option>
												<?php //foreach($promotion as $strPromotion) { ?>
												<option value = "<?php //echo $strPromotion['id']; ?>"><?php //echo $strPromotion['promo_code']; ?></option>
												<?php //} ?>
											</select>
										</div> -->
										<label  class="col-sm-3 control-label text-center ">Status: </label>
										<div class="col-sm-3">
											<select class=" marl-n validate[required] text-input cust_select" name="magezine_status">
												<option>Live</option>
												<option>Suspended</option>
												<option>Closed</option>
											</select>
										</div>
									</div>
									<div class="form-group mmar">
									<label class="col-sm-3 control-label text-center">Month: </label>
										<div class="col-sm-9">
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="01"> Jan
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="02"> Feb
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="03"> Mar
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="04"> Apr
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="05"> May
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="06"> Jun
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="07"> Jul
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="08"> Aug
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="09"> Sep
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="10"> Oct
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="11"> Nov
											</div>
											<div class="col-sm-3">
												 <input type="checkbox" name="months[]" checked="checked" value="12"> Dec
											</div>
										</div>
									</div>
                                    <div class="form-group mmar">
                                        <label  class="col-sm-3 control-label text-center">Subscription Amount: </label>
                                        <div class="col-sm-9">
                                            <table class="table table-white table-vertical-center margin-none table-striped footable">
                                                <thead>
                                                <tr>
                                                    <th data-class="highlight" class="text-center">No. of Years</th>
                                                    <th  class="text-center">Enter Amount</th>
                                                    <th  class="text-center">Add </th>
                                                    <th  class="text-center">Delete </th>

                                                </tr>
                                                </thead>
                                                <tbody>
                                                <tr>
                                                    <td class="text-center" >
                                                        <select class=" marl-n validate[required] cust_select" name="magezine_sub_no_years[]">
                                                            <option>1</option>
                                                            <option>2</option>
                                                            <option>3</option>

                                                        </select>
                                                    </td>
                                                    <td class="text-center" >
                                                        <input type="text" class="form-control validate[required, custom[onlyNumberSp]] text-input" name="magezine_sub_amount[]"/>
                                                    </td>
                                                    <td class="text-center">
                                                        <a href="javascript:void(0)" id="aAddRow"><i class="fa fa-fw fa-plus"></i></a>
                                                    </td>
                                                    <td class="text-center">
                                                        <a href="javascript:void(0)" id="aDeleteRow"><i class="fa fa-fw fa-minus"></i></a>
                                                    </td>

                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div id = "year_error" class = "year_err">

                                    </div>
									<div class="form-group">
										<div class="col-sm-offset-4 col-sm-8">
                                            <input type="hidden" id="system_base_url" value="<?php echo base_url();?>">
											<button type="submit" class="btn btn-primary" id ="btnSubmit">Submit</button>
                                            <a class="btn" href="<?php echo base_url(); ?>index.php/magazine/magazine_list"> <button type="button" class="btn btn-primary">Cancel</button></a>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					<!-- // Modal body END --> 
				</div>
			</div>
		</div>
		<script src="<?php echo base_url();?>assets/js/main.js" type="text/javascript"></script>
        <script src="<?php echo base_url();?>assets/js/magazines.js" type="text/javascript"></script>
        <script src="<?php echo base_url();?>assets/plugins/forms_elements_multiselect/js/jquery.multi-select.js?v=v2.0.0-rc1&sv=v0.0.1.2"></script>
        <script src="<?php echo base_url();?>assets/plugins/forms_elements_bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
        <script src="<?php echo base_url();?>assets/components/forms_elements_bootstrap-select/bootstrap-select.js"></script>
        <script src="<?php echo base_url();?>assets/components/forms_elements_bootstrap-select/bootstrap-select.init.js"></script>
        <script src="<?php echo base_url();?>assets/components/forms_elements_fuelux-radio/fuelux-radio.init.js"></script>
        <script src="<?php echo base_url();?>assets/components/forms_elements_multiselect/multiselect.init.js?v=v2.0.0-rc1&sv=v0.0.1.2"></script>
		<script src="<?php echo base_url();?>assets/js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="<?php echo base_url();?>assets/js/jquery.validationEngine.js" type="text/javascript"></script>
		
		
		<script>
		$(document).ready(function() {
			$("#add_magezine").validationEngine();
		});
		</script>
		
