<?php
session_start();
if(!isset($_SESSION['user'])) {
	header("location: ../index.php");
	exit;
}

include "../dbconnect.php";
include("../header.php");

$client_id = 62;
$outlet_id = 1;
?>
				<!-- START SETUP FEEDBACK PROCESS -->
				<div class="row">
					<div class="col-lg-12">
						
						<div class="card">
							<div class="card-header admin-feed">
								SETUP FEEDBACK PROCESS
							</div>
							<div class="card-body">
						
								<form class="form-horizontal" action="save_fb_settings_data.php" method="post">
									<!-- Dine In -->
									<div class="dine-in">
										<div class="form-group row">
											<label class="col-md-3 form-control-label" for="" style="font-weight: 700;">Enable Feedback For Dine In</label>
											<div class="col-md-9">
												<?php
												$fb_qry = mysql_query("SELECT * FROM `feedback_config` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id'");
												$fb_row = mysql_fetch_array($fb_qry);
												?>
												<label class="switch switch-default switch-pill switch-success">
													<input type="checkbox" name="dinein-switch" class="switch-input" <?php if($fb_row['enable_fb_dine_in'] == 1) { echo "checked"; } ?> >
													<span class="switch-label"></span>
													<span class="switch-handle"></span>
												</label>
											</div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Method</label>
											<div class="col-md-9">
                                                <label class="radio-inline dine-disabled" for="dine-radio1">
                                                    <input type="radio" class="flow-radio dine-disabled" id="dine-radio1" name="dine-radios" value="Online" <?php if($fb_row['dine_in_fb_mode'] == 'Online') { echo "checked"; } ?> >Through Online
                                                </label>
                                                <label class="radio-inline dine-disabled" for="dine-radio2">
                                                    <input type="radio" class="flow-radio dine-disabled" id="dine-radio2" name="dine-radios" value="Tablet" <?php if($fb_row['dine_in_fb_mode'] == 'Tablet') { echo "checked"; } ?> >Through Tablet
                                                </label>
												<label class="radio-inline dine-disabled" for="dine-radio3">
                                                    <input type="radio" class="flow-radio dine-disabled" id="dine-radio3" name="dine-radios" value="Callback" <?php if($fb_row['dine_in_fb_mode'] == 'Callback') { echo "checked"; } ?> > Through Callback
                                                </label>
                                            </div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Response</label>
											<div class="col-md-9">
                                                <label class="radio-inline dine-disabled" for="respond-radio1">
                                                    <input type="radio" class="flow-radio dine-disabled" id="respond-radio1" name="res-dine" value="1" <?php if($fb_row['dine_in_response_type'] == 1) { echo "checked"; } ?> >In Stars <i class="fa fa-star" aria-hidden="true" style="color: #fec10e;"></i>
                                                </label>
                                                <label class="radio-inline dine-disabled" for="respond-radio2">
                                                    <input type="radio" class="flow-radio dine-disabled" id="respond-radio2" name="res-dine" value="0" <?php if($fb_row['dine_in_response_type'] == 0) { echo "checked"; } ?> >In Smiley Face <img src="../assets/img/emoji-img/happy.png">
                                                </label>
                                            </div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Questions</label>
											<div class="col-md-3">
												<button type="button" name="dinein-btn" class="btn btn-md btn-primary dine-disabled btn-popup" id="dinemodal" > Setup Your Feedback Form</button>
											</div>
											<div class="col-md-3">
												<div id="dine-danger"></div>
											</div>
										</div>
										
									</div>
									
									<!-- Delivery -->
									<div class="delivery">
										<div class="form-group row">
											<label class="col-md-3 form-control-label" for="" style="font-weight: 700;">Enable Feedback For Delivery</label>
											<div class="col-md-9">
												<label class="switch switch-default switch-pill switch-success">
													<input type="checkbox" name="delivery-switch" class="switch-input" <?php if($fb_row['enable_fb_delivery'] == 1) { echo "checked"; } ?> >
													<span class="switch-label"></span>
													<span class="switch-handle"></span>
												</label>
											</div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Method</label>
											<div class="col-md-9">
                                                <label class="radio-inline del-disabled" for="delivery-radio">
                                                    <input type="radio" class="flow-radio del-disabled" id="delivery-radio" name="delivery-radios" value="Online" <?php if($fb_row['delivery_fb_mode'] == 'Online') { echo "checked"; } ?> >Through Online
                                                </label>
												<label class="radio-inline del-disabled" for="delivery-radio2">
                                                    <input type="radio" class="flow-radio del-disabled" id="delivery-radio2" name="delivery-radios" value="Callback" <?php if($fb_row['delivery_fb_mode'] == 'Callback') { echo "checked"; } ?> > Through Callback
                                                </label>
                                            </div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Response</label>
											<div class="col-md-9">
                                                <label class="radio-inline del-disabled" for="respond-deliver1">
                                                    <input type="radio" class="flow-radio del-disabled" id="respond-deliver1" name="res-deliver" value="1" <?php if($fb_row['delivery_response_star'] == 1) { echo "checked"; } ?> >In Stars <i class="fa fa-star" aria-hidden="true" style="color: #fec10e;"></i>
                                                </label>
                                                <label class="radio-inline del-disabled" for="respond-deliver2">
                                                    <input type="radio" class="flow-radio del-disabled" id="respond-deliver2" name="res-deliver" value="0" <?php if($fb_row['delivery_response_star'] == 0) { echo "checked"; } ?> >In Smiley Face <img src="../assets/img/emoji-img/happy.png">
                                                </label>
                                            </div>
										</div>
										
										<div class="form-group row">
											<label class="col-md-3" for="">Feedback Questions</label>
											<div class="col-md-3">
												<button type="button" class="btn btn-md btn-primary del-disabled btn-del-edit" id="delmodal"> Setup Your Feedback Form</button>
											</div>
											<div class="col-md-3">
												<div class="text-danger1"></div>
											</div>
										</div>
										
									</div>

									<div class="cust-exp">
										<div class="form-group row">
											<label class="col-md-3 form-control-label" for="" style="font-weight: 700;">For Online Feedback</label>
										</div>
										
										<div class="form-group row">
											<div class="col-md-3 del-disabled">
												Communicate After
											</div>
											<div class="col-md-9 del-disabled">
												<select id="select-time" class="del-disabled" name="comm-after">
													<option value="1" <?php if($fb_row['online_fb_after_mts'] == 1) { echo "selected"; } ?> >1</option>
													<option value="2" <?php if($fb_row['online_fb_after_mts'] == 2) { echo "selected"; } ?> >2</option>
													<option value="3" <?php if($fb_row['online_fb_after_mts'] == 3) { echo "selected"; } ?> >3</option>
													<option value="4" <?php if($fb_row['online_fb_after_mts'] == 4) { echo "selected"; } ?> >4</option>
													<option value="5" <?php if($fb_row['online_fb_after_mts'] == 5) { echo "selected"; } ?> >5</option>
												</select> Hours
											</div>
										</div>
									</div>

									<div class="cust-remind">
										<div class="form-group row">
											<label class="col-md-3 form-control-label" for="" style="font-weight: 700;">Enable Reminder</label>
											<div class="col-md-9">
												<label class="switch switch-default switch-pill switch-success">
													<input type="checkbox" name="reminder-switch" class="switch-input" <?php if($fb_row['online_fb_resend'] == 1) { echo "checked"; } ?> >
													<span class="switch-label"></span>
													<span class="switch-handle"></span>
												</label>
											</div>
										</div>
										
										<div class="form-group row">
											<div class="col-md-3 remind-disabled">
												Send Reminder SMS After
											</div>
											<div class="col-md-9 remind-disabled">
												<select id="select-time" class="remind-disabled" name="reminder-after">
													<option value="1" <?php if($fb_row['online_resend_after'] == 1) { echo "selected"; } ?> >1</option>
													<option value="2" <?php if($fb_row['online_resend_after'] == 2) { echo "selected"; } ?> >2</option>
													<option value="3" <?php if($fb_row['online_resend_after'] == 3) { echo "selected"; } ?> >3</option>
													<option value="4" <?php if($fb_row['online_resend_after'] == 4) { echo "selected"; } ?> >4</option>
													<option value="5" <?php if($fb_row['online_resend_after'] == 5) { echo "selected"; } ?> >5</option>
												</select> Days
											</div>
										</div>
									</div>
									
									<div class="form-group row">
										<div class="col-lg-3">
										</div>
										<div class="col-lg-3 save-setting">
											<button type="submit" name="saveSetting" class="btn btn-success btn-save-setting">Save Feedback Process</button>
										</div>
									</div>
									
								</form>
								
							</div>
						</div>
						
					</div>
				</div>
				<!-- END SETUP FEEDBACK PROCESS -->
				
				<!-- START ALERT SETTINGS -->
				<div class="row">
					<div class="col-lg-12">
						
						<div class="card">
							<div class="card-header admin-feed">
								ALERT SETTINGS
							</div>
							<div class="card-body">
						
								<form class="form-horizontal" action="save_fb_settings_data.php" method="post" data-parsley-validate>
									
									<div class="form-group row">
										<label class="col-md-3 form-control-label" for="" style="font-weight: 700;">Enable Alert</label>
										<div class="col-md-9">
											<label class="switch switch-default switch-pill switch-success">
												<input type="checkbox" name="alert-switch" class="switch-input" <?php if($fb_row['enable_fb_alert'] == 1) { echo "checked"; } ?> >
												<span class="switch-label"></span>
												<span class="switch-handle"></span>
											</label>
										</div>
									</div>
									
									<div class="form-group row">
										<div class="col-md-6 alert-disabled">
											Receive Alerts upto
											<select id="select-time" class="alert-disabled" name="recive-alert">
												<option value="1" <?php if($fb_row['fb_alert_value'] == 1) { echo "selected"; } ?> >1</option>
												<option value="2" <?php if($fb_row['fb_alert_value'] == 2) { echo "selected"; } ?> >2</option>
												<option value="3" <?php if($fb_row['fb_alert_value'] == 3) { echo "selected"; } ?> >3</option>
												<option value="4" <?php if($fb_row['fb_alert_value'] == 4) { echo "selected"; } ?> >4</option>
												<option value="5" <?php if($fb_row['fb_alert_value'] == 5) { echo "selected"; } ?> >5</option>
											</select> Star Rating
										</div>
									</div>
									
									<div class="form-group row alert-settings">
										<label class="col-lg-5 col-md-5 form-control-label alert-disabled" for="">Send Alert Emails To <span style="font-weight: normal;">(These email ids will receive alerts for all outlets)</span></label>
									</div>

									<?php
									$fetch_qry1 = mysql_query("SELECT `client_id`, `outlet_id`, `email_id` FROM `feedback_alert_mails` WHERE `outlet_id` = '0'");
									if (mysql_num_rows($fetch_qry1) > 0) {
										?>
										<div class="form-group row field_wrapper">
											<?php
											$s = 1;
											while ($fetch_row1 = mysql_fetch_array($fetch_qry1)) {
												// $outlet_id = $fetch_row['outlet_id'];
												// $email = $fetch_row['email_id'];
												?>
												<div class="col-lg-4 remove-alloutlet-email<?php echo $s.$fetch_row1['outlet_id'] ?> outlet-wise-textbox">
													<div class="input-group">
														<?php
														if ($fetch_row1['outlet_id'] == 0 AND $fetch_row1['email_id'] != '') {
															?>
															<input type="email" id="input-small" name="alert-emails[]" class="form-control input-alert-disable" value="<?php echo $fetch_row1['email_id']; ?>" data-parsley-required data-parsley-type="email" data-parsley-trigger="keyup" data-parsley-errors-messages-disabled />
															<button type="button" class="btn btn-custom alert-disabled close-dis btn-remove-email" onclick="removeAllOutletEmail('delete_alloutlet_email', <?php echo $fetch_row1['outlet_id']; ?>, '<?php echo $fetch_row1['email_id']; ?>', <?php echo $s.$fetch_row1['outlet_id'] ?> )">X</button>
															<?php
														}
														?>
													</div>
												</div>
												<?php
												$s++;
											}
											?>
										</div>
										<?php
									} else {
										?>
										<div class="form-group row field_wrapper">
											<div class="col-lg-4">
												<div class="input-group">
													<input type="email" id="input-small" name="alert-emails[]" class="form-control input-alert-disable" data-parsley-required data-parsley-type="email" data-parsley-trigger="keyup" data-parsley-errors-messages-disabled />
												</div>
											</div>
										</div>
										<?php
									}
									?>
									<div class="form-group row">
										<div class="col-lg-1 feedwarn">
											<button type="button" class="btn btn-outline-success btn-popup alert-disabled add_button"> Add More &nbsp;<i class="fa fa-plus" aria-hidden="true"></i></button>
										</div>
									</div>
									<!-- <div class="form-group row field_wrapper">
										<div class="col-lg-4">
											<div class="input-group">
												<input type="email" id="input-small" name="alert-emails[]" class="form-control input-alert-disable" data-parsley-required data-parsley-type="email" data-parsley-trigger="keyup" data-parsley-errors-messages-disabled />
											</div>
										</div>
									</div>

									<div class="form-group row">
										<div class="col-lg-1 feedwarn">
											<button type="button" class="btn btn-outline-success btn-popup alert-disabled add_button"> Add More &nbsp;<i class="fa fa-plus" aria-hidden="true"></i></button>
										</div>
									</div> -->
									<?php
									$q1 = mysql_query("SELECT * FROM `feedback_alert_mails` WHERE `outlet_id` != '0'");
									if(mysql_num_rows($q1) > 0){
										$chk_css = '';
										$outlet_css = 'display: block';
										$chk_switch = 'checked';
									} else {
										$chk_css = 'alert-disabled';
										$outlet_css = 'display: none';
										$chk_switch = '';
									}
									?>
									<div class="form-group row outlet-alert-settings">
										<label class="col-md-3 form-control-label <?php echo $chk_css; ?>" for="">Enable Outlet Wise Alert Emails <!-- <input type="checkbox" name="outlet-check" class="outlet-checkbox <?php //echo $chk_css; ?>"> --></label>
										<div class="col-md-9">
											<label class="switch switch-default switch-pill switch-success">
												<input type="checkbox" name="outlet-check" class="switch-input" <?php echo $chk_switch; ?>>
												<span class="switch-label"></span>
												<span class="switch-handle"></span>
											</label>
										</div>
									</div>

									<input type="hidden" name="clientid" value="<?php echo $client_id; ?>">
									<!-- <input type="hidden" name="outledID" value="<?php //echo $outlet_id; ?>"> -->

									<div id="outlet-email-area" style="<?php echo $outlet_css; ?>">
										<?php
										$unit_qry = mysql_query("SELECT `UnitId`, `UnitName` FROM `unit_master`");
										while ($unit_row = mysql_fetch_array($unit_qry)) {
											$UnitId = $unit_row['UnitId']
											?>
											<div class="row">
												<label class="col-md-3 form-control-label alert-disabled" for="" style="font-weight: 700;"><?php echo $unit_row['UnitName']; ?></label>
											</div>
											<?php
											$fetch_qry = mysql_query("SELECT `client_id`, `outlet_id`, `email_id` FROM `feedback_alert_mails` WHERE `outlet_id` = '$UnitId'");
											$fetch_count = mysql_num_rows($fetch_qry);
											if ($fetch_count > 0) {
												?>
												<div class="form-group row outlet_wrapper<?php echo $unit_row['UnitId']; ?>">
													<?php
													$s = 1;
													$e = 2;
													while ($fetch_row = mysql_fetch_array($fetch_qry)) {
														$outletID = $fetch_row['outlet_id'];
														$email = $fetch_row['email_id'];
														?>
														<div class="col-lg-4 remove-email<?php echo $s.$outletID ?> outlet-wise-textbox">
															<div class="input-group">
																
																<?php
																if ($UnitId == $outletID AND $email != '') {
																	?>
																	<input type="email" id="outlet-input-small<?php echo $e.$outletID ?>" name="outlet-alert-emails#<?php echo $unit_row['UnitId']; ?>[]" class="form-control input-alert-disable" value="<?php echo $fetch_row['email_id']; ?>" data-parsley-required data-parsley-type="email" data-parsley-trigger="keyup" data-parsley-errors-messages-disabled />
																	<button type="button" class="btn btn-custom alert-disabled close-dis btn-remove-email" onclick="removeEmail('delete_email', <?php echo $unit_row['UnitId']; ?>, '<?php echo $fetch_row['email_id']; ?>', <?php echo $s.$outletID ?> )">X</button>
																	<?php
																}
																?>
															</div>
														</div>
														<?php
														$s++;
														$e++;
													}
													?>
												</div>
												<?php
											} else {
												?>
												<div class="form-group row outlet_wrapper<?php echo $unit_row['UnitId']; ?>">
													<div class="col-lg-4">
														<div class="input-group">
															<input type="hidden" name="clientid" value="91">
															<input type="email" id="outlet-input-small<?php echo $e.$outletID ?>" name="outlet-alert-emails#<?php echo $unit_row['UnitId']; ?>[]" class="form-control input-alert-disable" data-parsley-required data-parsley-type="email" data-parsley-trigger="keyup" data-parsley-errors-messages-disabled />
															
														</div>
													</div>
												</div>
												<?php
											}
											?>
											<div class="form-group row outlet-alert-btn">
												<div class="col-lg-1 feedwarn">
													<button type="button" class="btn btn-outline-success btn-popup alert-disabled outlet-button add_button<?php echo $unit_row['UnitId']; ?>" onclick="addEmailTextbox(<?php echo $unit_row['UnitId']; ?>)"> Add More &nbsp;<i class="fa fa-plus" aria-hidden="true"></i></button>
												</div>
											</div>
											<?php
										}
										?>
									</div>
									
									<div class="form-group row">
										<div class="col-lg-4">
											<span class="help-block alert-disabled">Please save before you exit</span>
										</div>
									</div>
									
									<div class="form-group row">
										<div class="col-lg-1">
											<button type="submit" name="save-email" class="btn btn-success btn-feedemail btn-popup alert-disabled">Save Email Ids</button>
										</div>
									</div>
									
								</form>
								
							</div>
						</div>
						
					</div>
				</div>
				<!-- END ALERT SETTINGS -->
				
				<!-- START POPUP SMILEY FACE FOR DINE IN -->
				<div id="feedbackModal-smiley" class="modal">

					<!-- Modal content -->
					<div class="modal-content">
						<div class="modal-header">
							<span class="close" onClick="CloseModal('feedbackModal-smiley')">&times;</span>
							<h2></h2>
						</div>
						<div class="modal-body">
							<div class="text-center">
								<div class="logo">
									<?php
									$mis_qry = mysql_query("SELECT `HeaderLogo`, `HeaderName` FROM `mismaster`");
									$mis_row = mysql_fetch_array($mis_qry);
									?>
									<img src="../img/<?php echo $mis_row['HeaderLogo']; ?>" class="img-responsive" alt="">
								</div>
							</div>
							<p class="fb-title">Help us to serve you better</p>
							<!-- <div class="form-label text-center form-styling">
								<label class="smiley-form-style">Form styling</label>
								<label class="radio-inline smiley-radio" for="form-style1">
									<input type="radio" class="flow-radio" id="form-style1" name="comext" value="compact" checked="">Compact
								</label>
								<label class="radio-inline smiley-radio" for="form-style2">
									<input type="radio" class="flow-radio" id="form-style2" name="comext" value="extend">Extend
								</label>
							</div> -->
							<div class="container">
								<div class="row">
									<div class="col-lg-12 col-sm-12 col-md-12 feedback">
										
										<!-- compact form -->
										<!-- <div id="compact-form">
											<form method="post" action="" role="form">
												
												<div class="form-group">
													<div class="row form-label">
														<table class="table table-custom">
															<thead>
																<tr>
																	<th></th>
																	<th>Poor</th>
																	<th>Average</th>
																	<th>Good</th>
																	<th>Very Good</th>
																	<th>Excellent</th>
																</tr>
															</thead>
															<tbody>
															<?php
															/*$qry = mysql_query("SELECT * FROM `feedback_ques` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id'");
															while($row = mysql_fetch_array($qry)) {
																$ques_for = $row['fb_ques_for'];
																$fb_ques_id = $row['fb_ques_id'];
																if($ques_for == 'Both' || $ques_for == 'Dine-In') {*/
																	?>	
																	<tr>
																		<?php
																		// if($fb_ques_id == 2) {
																			?>
																			<td colspan="6">
																				
																				<?php //echo ucwords($row['fb_ques']); ?>
																				
																				<label class="radio-inline" for="item-radio">
																					<input type="radio" class="flow-radio" id="item-radio" name="item-gen" value="itemwise">Item Wise
																				</label>
																				<label class="radio-inline" for="gen-radio">
																					<input type="radio" class="flow-radio" id="gen-radio" name="item-gen" value="general" checked="">General
																				</label>
																					
																			</td>
																			<?php
																		// } else {
																			?>
																			<td><?php //echo ucwords($row['fb_ques']); ?></td>
																			<?php
																		// }
																		?>
																		
																		
																		<?php
																		/*$fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = '$outlet_id'");
																		while($fb_row = mysql_fetch_array($fb_qry)) {
																			if($fb_ques_id != 2) {*/
																				?>
																				<td><div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12"><input id="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php //echo $fb_row['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php //echo $fb_row['fb_option_image']; ?>"></label></div></td>
																				<?php
																		// 	}
																		// } ?>
																		
																		
																	</tr>
																	<?php //if($row['fb_ques_id'] == 2) { ?>
																		<tr><td><div class="compact-item" style="display: none;"></div></td></tr>
																	<?php //} ?>
																	<tr>
																		<td></td>
																		<?php
																		/*$fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = '$outlet_id'");
																		while($fb_row = mysql_fetch_array($fb_qry)) {
																			if($fb_ques_id == 2) {*/
																				?>
																				<td><div class="compact-gen"><div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12"><input id="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php //echo $fb_row['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php //echo $fb_row['fb_option_image']; ?>"></label></div></div></td>
																				<?php
																			// }
																		// } ?>
																	</tr>	
																	<?php
																// }
															// }
															?>
															</tbody>
														</table>
													</div>
												</div>
												
												<div class="form-group">
													<label>Email</label>
													<input type="text" name="email" class="form-control" placeholder="Enter your email">
												</div>
												
												<div class="row">
													<div class="col-lg-6">
														<div class="form-group">
															<label>Birthday</label>
															<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your dob date">
														</div>
													</div>
													<div class="col-lg-6">
														<div class="form-group">
															<label>Anniversary</label>
															<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
														</div>
													</div>
												</div>
												
												<div class="form-group">
													<label>Comments</label>
													<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
												</div>
												
												<div class="form-group">
													<button type="submit" class="btn btn-success" name="submit" id="btn-submit">Save Form</button>
												</div>
												
											</form>
										</div> -->
										
										<!-- extended form -->
										<div id="extended-form">
											<form method="post" action="" role="form">
												
												<?php
												$qry = mysql_query("SELECT `client_id`, `outlet_id`, `fb_ques_id`, `fb_ques`, `fb_ques_for`, `fb_ques_enable` FROM `feedback_ques` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id' AND `fb_ques_enable` = 1 AND (`fb_ques_for` = 'Both' OR `fb_ques_for` = 'Dine-In')");
												while($row = mysql_fetch_array($qry)) {
													$ques_for = $row['fb_ques_for'];
													$fb_ques_id = $row['fb_ques_id'];
													
													?>
													<div class="form-group">
														<div class="row form-label">
															<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
																
																<label id="fb_topic_name<?php if($fb_ques_id != 1 && $fb_ques_id != 2) { echo $row['fb_ques_id']; }?>"><?php echo ucwords($row['fb_ques']); ?></label>
																
															</div>
															<?php
															if($fb_ques_id == 2) {
																?>
																<div class="col-md-8">
																	<label class="radio-inline" for="feed-radio2">
																		<input type="radio" class="flow-radio" id="feed-radio2" name="feed-radios" value="itemwise">Item Wise
																	</label>
																	<label class="radio-inline" for="feed-radio1">
																		<input type="radio" class="flow-radio" id="feed-radio1" name="feed-radios" value="general" checked="">General
																	</label>
																</div>
																<?php
															} ?>
															<?php
															if($fb_ques_id != 1 && $fb_ques_id != 2) {
																?>
																<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
																	<input type="button" class="btn btn-primary edit_button" id="edit_button<?php echo $row['fb_ques_id'];?>" value="Edit" onclick="edit_row('<?php echo $row['fb_ques_id'];?>');">
																	<input type="button" class="btn btn-primary save_button" id="save_button<?php echo $row['fb_ques_id'];?>" value="Save" onclick="save_row('<?php echo $row['fb_ques_id'];?>', '<?php echo $row['fb_ques_for'];?>');" style="display: none;">
																</div>
																<?php
															}
															?>
														</div>
														<div class="row">
															<div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12">
																<?php if($row['fb_ques_id'] == 2) { ?>
																<div class="itemwise" style="display: none;">
																			
																</div>
																	<?php
																	}
																	$fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = '$outlet_id'");
																	while($fb_row = mysql_fetch_array($fb_qry)) {
																	if($row['fb_ques_id'] != 2) {	
																		?>
																		<div class="selector col-lg-2 col-md-2 col-sm-2 col-xs-2">
																			
																			<input id="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php echo $fb_row['fb_option_text']; ?>" />
																			<label class="drinkcard-cc" for="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php echo $fb_row['fb_option_image']; ?>"></label>
																			<p class="text"><?php echo ucfirst($fb_row['fb_option_text']); ?></p>
																				
																		</div>
																		<?php
																	} else {
																		?>
																		
																		<div class="general">
																			<div class="selector col-lg-2 col-md-2 col-sm-2 col-xs-2">
																				
																				<input id="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php echo $fb_row['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php echo $fb_row['fb_option_image']; ?>"></label>
																				<p class="text"><?php echo ucfirst($fb_row['fb_option_text']); ?></p>
																			</div>
																		</div>
																		<?php
																	}
																}
																?>
																
															</div>
														</div>
													</div>
													<?php
												}
												?>
												
												<!-- <div class="form-group">
													<label>Email</label>
													<input type="text" name="email" class="form-control" placeholder="Enter your email">
												</div>
												
												<div class="row">
													<div class="col-lg-6">
														<div class="form-group">
															<label>Birthday</label>
															<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your birthday">
														</div>
													</div>
													<div class="col-lg-6">
														<div class="form-group">
															<label>Anniversary</label>
															<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
														</div>
													</div>
												</div>
												
												<div class="form-group">
													<label>Comments</label>
													<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
												</div>
												
												<div class="form-group">
													<button type="submit" class="btn btn-success btn-save-setting" name="submit" id="btn-submit">Save Form</button>
												</div> -->
												
											</form>
										</div>
										
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
				<!-- END POPUP SMILEY FACE FOR DINE IN -->
				
				<!-- START POPUP STAR FOR DINE IN -->
				<div id="feedbackModal-star" class="modal">

					<!-- Modal content -->
					<div class="modal-content">
						<div class="modal-header">
							<span class="close" onClick="CloseModal('feedbackModal-star')">&times;</span>
							<h2></h2>
						</div>
						<div class="modal-body">
							<div class="col-lg-12 col-sm-12 col-md-12 text-center">
								<div class="logo">
									<img src="../assets/img/<?php echo $mis_row['HeaderLogo']; ?>" class="img-responsive" alt="">
								</div>
							</div>
							<p class="fb-title">Help us to serve you better</p>
							<div class="container">
								<div class="row">
									<div class="col-lg-12 col-sm-12 col-md-12 feedback">
										
										<form method="post" action="" role="form">
											
											<?php
											$qry1 = mysql_query("SELECT * FROM `feedback_ques` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id'");
											while($row1 = mysql_fetch_array($qry1)) {
												$ques_for = $row1['fb_ques_for'];
												if($ques_for == 'Both' || $ques_for == 'Dine-In') {
													?>
													<div class="form-group">
														<div class="row">
															<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
																
																<label id="fb_topic_name"><?php echo ucwords($row1['fb_ques']); ?></label>
																
															</div>
														</div>
														<div class="row">
															
															<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
																<div class="stars">
																	<input class="star star-5" id="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-5" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>" value="5"/>
																	<label class="star star-5" for="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-5"></label>
																	<input class="star star-4" id="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-4" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>" value="4"/>
																	<label class="star star-4" for="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-4"></label>
																	<input class="star star-3" id="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-3" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>" value="3"/>
																	<label class="star star-3" for="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-3"></label>
																	<input class="star star-2" id="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-2" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>" value="2"/>
																	<label class="star star-2" for="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-2"></label>
																	<input class="star star-1" id="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-1" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>" value="1"/>
																	<label class="star star-1" for="<?php echo strtolower(str_replace(' ', '_', $row1['fb_ques'])); ?>-1"></label>
																</div>
															</div>
																
														</div>
													</div>
													<?php
												}
											} ?>
											
											<!-- <div class="form-group">
												<label>Email</label>
												<input type="text" name="email" class="form-control" placeholder="Enter your email">
											</div>
											
											<div class="row">
												<div class="col-lg-6">
													<div class="form-group">
														<label>Birthday</label>
														<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your birthday">
													</div>
												</div>
												<div class="col-lg-6">
													<div class="form-group">
														<label>Anniversary</label>
														<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
													</div>
												</div>
											</div>
											
											<div class="form-group">
												<label>Comments</label>
												<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
											</div>
											
											<div class="form-group">
												<button type="submit" class="btn btn-primary btn-save-setting" name="submit" id="btn-submit">Save Form</button>
											</div> -->
											
										</form>
										
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
				<!-- END POPUP STAR FOR DINE IN -->
				
				
				<!-- START POPUP SMILEY FACE FOR DELIVERY -->
				<div id="deliveryModal-smiley" class="modal">

					<!-- Modal content -->
					<div class="modal-content">
						<div class="modal-header">
							<span class="close" onClick="CloseModal('deliveryModal-smiley')">&times;</span>
							<h2></h2>
						</div>
						<div class="modal-body">
							<div class="text-center">
								<div class="logo">
									<img src="../assets/img/<?php echo $mis_row['HeaderLogo']; ?>" class="img-responsive" alt="">
								</div>
							</div>
							<p class="fb-title">Help us to serve you better</p>
							<!-- <div class="form-label text-center form-styling">
								<label class="smiley-form-style">Form styling</label>
								<label class="radio-inline smiley-radio" for="form-style1">
									<input type="radio" class="flow-radio" id="form-style1" name="comext" value="compact" checked="">Compact
								</label>
								<label class="radio-inline smiley-radio" for="form-style2">
									<input type="radio" class="flow-radio" id="form-style2" name="comext" value="extend">Extend
								</label>
							</div> -->
							
							<div class="container">
								<div class="row">
									<div class="col-lg-12 col-sm-12 col-md-12 feedback">
										
										<!-- compact form -->
										<!-- <div id="del-compact-form">
											<form method="post" action="" role="form">
												
												<div class="form-group">
													<div class="row form-label">
														<table class="table table-custom">
															<thead>
																<tr>
																	<th></th>
																	<th>Poor</th>
																	<th>Average</th>
																	<th>Good</th>
																	<th>Very Good</th>
																	<th>Excellent</th>
																</tr>
															</thead>
															<tbody>
															<?php
															// $qry = mysql_query("SELECT * FROM `feedback_ques` WHERE `client_id` = 75 AND `outlet_id` = 1");
															// while($row = mysql_fetch_array($qry)) {
															// 	$ques_for = $row['fb_ques_for'];
															// 	$fb_ques_id = $row['fb_ques_id'];
															// 	if($ques_for == 'Both' || $ques_for == 'Dine-In') {
																	?>	
																	<tr>
																		<?php
																		// if($fb_ques_id == 2) {
																			?>
																			<td colspan="6">
																				
																				<?php //echo ucwords($row['fb_ques']); ?>
																				
																				<label class="radio-inline" for="delitem-radio">
																					<input type="radio" class="flow-radio" id="delitem-radio" name="del-gen" value="itemwise">Item Wise
																				</label>
																				<label class="radio-inline" for="delgen-radio">
																					<input type="radio" class="flow-radio" id="delgen-radio" name="del-gen" value="general" checked="">General
																				</label>
																					
																			</td>
																			<?php
																		// } else {
																			?>
																			<td><?php //echo ucwords($row['fb_ques']); ?></td>
																			<?php
																		// }
																		?>
																		
																		
																		<?php
																		// $fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = 1");
																		// while($fb_row = mysql_fetch_array($fb_qry)) {
																		// 	if($fb_ques_id != 2) {
																				?>
																				<td><div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12"><input id="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php //echo $fb_row['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php //echo $fb_row['fb_option_image']; ?>"></label></div></td>
																				<?php
																			// }
																		// } ?>
																		
																		
																	</tr>
																	<?php //if($row['fb_ques_id'] == 2) { ?>
																		<tr><td><div class="del-compact-item" style="display: none;"></div></td></tr>
																	<?php //} ?>
																	<tr>
																		<td></td>
																		<?php
																		// $fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = 1");
																		// while($fb_row = mysql_fetch_array($fb_qry)) {
																		// 	if($fb_ques_id == 2) {
																				?>
																				<td><div class="del-compact-gen"><div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12"><input id="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>" type="radio" name="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php //echo $fb_row['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php //echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php //echo $fb_row['fb_option_image']; ?>"></label></div></div></td>
																				<?php
																			// }
																		// } ?>
																	</tr>	
																	<?php
																// }
															// }
															?>
															</tbody>
														</table>
													</div>
												</div>
												
												<div class="form-group">
													<label>Email</label>
													<input type="text" name="email" class="form-control" placeholder="Enter your email">
												</div>
												
												<div class="row">
													<div class="col-lg-6">
														<div class="form-group">
															<label>Birthday</label>
															<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your dob date">
														</div>
													</div>
													<div class="col-lg-6">
														<div class="form-group">
															<label>Anniversary</label>
															<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
														</div>
													</div>
												</div>
												
												<div class="form-group">
													<label>Comments</label>
													<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
												</div>
												
												<div class="form-group">
													<button type="submit" class="btn btn-success" name="submit" id="btn-submit">Save Form</button>
												</div>
												
											</form>
										</div> -->
										
										<!-- extended form -->
										<div id="del-extended-form">
											<form method="post" action="" role="form">
												
												<?php
												$qry2 = mysql_query("SELECT `client_id`, `outlet_id`, `fb_ques_id`, `fb_ques`, `fb_ques_for`, `fb_ques_enable` FROM `feedback_ques` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id' AND `fb_ques_enable` = 1 AND (`fb_ques_for` = 'Both' OR `fb_ques_for` = 'Delivery')");
												while($row2 = mysql_fetch_array($qry2)) {
													$ques_for = $row2['fb_ques_for'];
													$fb_ques_id = $row2['fb_ques_id'];
													?>
													<div class="form-group">
														<div class="row form-label">
															<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
																
																<label id="fb_topic_name_del<?php if($fb_ques_id != 1 && $fb_ques_id != 2) { echo $row2['fb_ques_id']; }?>"><?php echo ucwords($row2['fb_ques']); ?></label>
																
															</div>
															<?php
															if($fb_ques_id == 2) {
																?>
																<div class="col-md-8">
																	<label class="radio-inline" for="feed-radio4">
																		<input type="radio" class="flow-radio" id="feed-radio4" name="feed-del" value="itemwise">Item Wise
																	</label>
																	<label class="radio-inline" for="feed-radio3">
																		<input type="radio" class="flow-radio" id="feed-radio3" name="feed-del" value="general" checked="">General
																	</label>
																</div>
																<?php
															} ?>
															<?php
															if($fb_ques_id != 1 && $fb_ques_id != 2) {
																?>
																<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
																	<input type="button" class="btn btn-primary edit_button" id="edit_button_del<?php echo $row2['fb_ques_id'];?>" value="Edit" onclick="edit_row_del('<?php echo $row2['fb_ques_id'];?>');">
																	<input type="button" class="btn btn-primary save_button" id="save_button_del<?php echo $row2['fb_ques_id'];?>" value="Save" onclick="save_row_del('<?php echo $row2['fb_ques_id'];?>', '<?php echo $row2['fb_ques_for'];?>');" style="display: none;">
																</div>
																<?php
															}
															?>
														</div>
														<div class="row">
															<div class="cc-selector col-lg-12 col-md-12 col-sm-12 col-xs-12">
																<?php if($row2['fb_ques_id'] == 2) { ?>
																<div class="del-itemwise" style="display: none;">
																			
																</div>
																	<?php
																	}
																	$fb_qry2 = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = '$outlet_id'");
																	while($fb_row2 = mysql_fetch_array($fb_qry2)) {
																	if($row2['fb_ques_id'] != 2) {	
																		?>
																		<div class="selector col-lg-2 col-md-2 col-sm-2 col-xs-2">
																			
																			<input id="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])).'_'.$fb_row2['fb_option_text']; ?>" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])); ?>" value="<?php echo $fb_row2['fb_option_text']; ?>" />
																			<label class="drinkcard-cc" for="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])).'_'.$fb_row2['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php echo $fb_row2['fb_option_image']; ?>"></label>
																			<p class="text"><?php echo ucfirst($fb_row2['fb_option_text']); ?></p>
																				
																		</div>
																		<?php
																	} else {
																		?>
																		
																		<div class="del-general">
																			<div class="selector col-lg-2 col-md-2 col-sm-2 col-xs-2">
																				
																				<input id="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])).'_'.$fb_row2['fb_option_text']; ?>" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])); ?>" value="<?php echo $fb_row2['fb_option_text']; ?>" />
																				<label class="drinkcard-cc" for="<?php echo strtolower(str_replace(' ', '_', $row2['fb_ques'])).'_'.$fb_row2['fb_option_text']; ?>"><img src="../assets/img/emoji-img/<?php echo $fb_row2['fb_option_image']; ?>"></label>
																				<p class="text"><?php echo ucfirst($fb_row2['fb_option_text']); ?></p>
																			</div>
																		</div>
																		<?php
																	}
																}
																?>
																
															</div>
														</div>
													</div>
													<?php
												}
												?>
												
												<!-- <div class="form-group">
													<label>Email</label>
													<input type="text" name="email" class="form-control" placeholder="Enter your email">
												</div>
												
												<div class="row">
													<div class="col-lg-6">
														<div class="form-group">
															<label>Birthday</label>
															<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your birthday">
														</div>
													</div>
													<div class="col-lg-6">
														<div class="form-group">
															<label>Anniversary</label>
															<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
														</div>
													</div>
												</div>
												
												<div class="form-group">
													<label>Comments</label>
													<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
												</div>
												
												<div class="form-group">
													<button type="submit" class="btn btn-success btn-save-setting" name="submit" id="btn-submit">Save Form</button>
												</div> -->
												
											</form>
										</div>
										
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
				<!-- END POPUP SMILEY FACE FOR DELIVERY -->
				
				<!-- START POPUP STAR FOR DELIVERY -->
				<div id="deliveryModal-star" class="modal">

					<!-- Modal content -->
					<div class="modal-content">
						<div class="modal-header">
							<span class="close" onClick="CloseModal('deliveryModal-star')">&times;</span>
							<h2></h2>
						</div>
						<div class="modal-body">
							<div class="col-lg-12 col-sm-12 col-md-12 text-center">
								<div class="logo">
									<img src="../img/<?php echo $mis_row['HeaderLogo']; ?>" class="img-responsive" alt="">
								</div>
							</div>
							<div class="col-lg-12 col-sm-12 col-md-12">
								<p class="fb-title">Help us to serve you better</p>
							</div>
							<div class="container">
								<div class="row">
									<div class="col-lg-12 col-sm-12 col-md-12 feedback">
										
										<form method="post" action="" role="form">
											
											<?php
											$qry3 = mysql_query("SELECT * FROM `feedback_ques` WHERE `client_id` = '$client_id' AND `outlet_id` = '$outlet_id'");
											while($row3 = mysql_fetch_array($qry3)) {
												//$topic_id = $row['fb_topic_id'];
												?>
												<div class="form-group">
													<div class="row">
														<div class="col-lg-6 col-md-4 col-sm-4 col-xs-12">
															
															<label id="fb_topic_name"><?php echo ucwords($row3['fb_ques']); ?></label>
															
														</div>
													</div>
													<div class="row">
														
														<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
															<div class="stars">
																<input class="star star-5" id="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-5" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>" value="5"/>
																<label class="star star-5" for="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-5"></label>
																<input class="star star-4" id="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-4" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>" value="4"/>
																<label class="star star-4" for="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-4"></label>
																<input class="star star-3" id="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-3" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>" value="3"/>
																<label class="star star-3" for="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-3"></label>
																<input class="star star-2" id="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-2" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>" value="2"/>
																<label class="star star-2" for="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-2"></label>
																<input class="star star-1" id="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-1" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>" value="1"/>
																<label class="star star-1" for="<?php echo strtolower(str_replace(' ', '_', $row3['fb_ques'])); ?>-1"></label>
															</div>
														</div>
															
													</div>
												</div>
												<?php
											} ?>
											
											<!-- <div class="form-group">
												<label>Email</label>
												<input type="text" name="email" class="form-control" placeholder="Enter your email">
											</div>
											
											<div class="row">
												<div class="col-lg-6">
													<div class="form-group">
														<label>Birthday</label>
														<input type="text" name="dob" class="form-control" id="dateofbirth" placeholder="Select your birthday">
													</div>
												</div>
												<div class="col-lg-6">
													<div class="form-group">
														<label>Anniversary</label>
														<input type="text" name="anniversary" class="form-control" id="anniversary" placeholder="Select your anniversary date">
													</div>
												</div>
											</div>
											
											<div class="form-group">
												<label>Comments</label>
												<textarea class="form-control" name="comments" placeholder="Comments please..." rows="5"></textarea>
											</div>
											
											<div class="form-group">
												<button type="submit" class="btn btn-primary btn-save-setting" name="submit" id="btn-submit">Save Form</button>
											</div> -->
											
										</form>
										
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
				<!-- END POPUP STAR FOR DELIVERY -->
	
<?php include("../footer.php"); ?>

<script>
/***** feedback popup form for dine in *****/
var btn = document.getElementById("dinemodal"); 
btn.onclick = function() {
	var r2 = document.getElementById('respond-radio2').checked;
	if(r2 == true){		
		document.getElementById('feedbackModal-smiley').style.display = "block";
		document.getElementById('feedbackModal-star').style.display = "none";
	} else {
		document.getElementById('feedbackModal-star').style.display = "block";		
		document.getElementById('feedbackModal-smiley').style.display = "none";
	}   
}
function CloseModal(mid){
document.getElementById(mid).style.display = "none";
}


var delbtn = document.getElementById("delmodal"); 
delbtn.onclick = function() {
	var r4 = document.getElementById('respond-deliver2').checked;
	if(r4 == true){		
		document.getElementById('deliveryModal-smiley').style.display = "block";
		document.getElementById('deliveryModal-star').style.display = "none";
	} else {
		document.getElementById('deliveryModal-star').style.display = "block";		
		document.getElementById('deliveryModal-smiley').style.display = "none";
	}   
}

$(document).ready(function(){
	$("input[name=feed-radios]:radio").change(function(){
		if($('#feed-radio1').is(':checked')) {
			$(".general").show();
			$(".general").css("display","block");
			$(".itemwise").css("display","none");
		}
		if($('#feed-radio2').is(':checked')) {
			var itemwise = $("input#feed-radio2").val();
			//alert(itemwise);
			$.ajax({
				type: 'post',
				url: 'feedback_selector.php',
				data: {item: itemwise},
				success: function(data){
					// console.log(data);
					$(".itemwise").html(data);
				}
			});
			$(".itemwise").show();
			$(".itemwise").css("display","block");
			$(".general").css("display","none");
		}
	});
});


/*$(document).ready(function(){
	$("input[name=comext]:radio").change(function(){
		if($('#form-style1').is(':checked')) {
			$("#compact-form").show();
			$("#compact-form").css("display","block");
			$("#extended-form").css("display","none");
		}
		if($('#form-style2').is(':checked')) {
			$("#extended-form").show();
			$("#extended-form").css("display","block");
			$("#compact-form").css("display","none");
		}
	});
});*/


/*$(document).ready(function(){
	$("input[name=item-gen]:radio").change(function(){
		if($('#item-radio').is(':checked')) {
			var itemcom = $("input#item-radio").val();
			//alert(itemwise);
			$.ajax({
				type: 'post',
				url: 'feedback_selector.php',
				data: {items: itemcom},
				success: function(data){
					// console.log(data);
					$(".compact-item").html(data);
				}
			});
			$(".compact-item").show();
			$(".compact-item").css("display","block");
			$(".compact-gen").css("display","none");
		}
		if($('#gen-radio').is(':checked')) {
			$(".compact-gen").show();
			$(".compact-gen").css("display","block");
			$(".compact-item").css("display","none");
		}
	});
});*/


/*	Open compact and extended form for delivery	*/
/*$(document).ready(function(){
	$("input[name=delcomext]:radio").change(function(){
		if($('#form-style3').is(':checked')) {
			$("#del-compact-form").show();
			$("#del-compact-form").css("display","block");
			$("#del-extended-form").css("display","none");
		}
		if($('#form-style4').is(':checked')) {
			$("#del-extended-form").show();
			$("#del-extended-form").css("display","block");
			$("#del-compact-form").css("display","none");
		}
	});
});*/


/*$(document).ready(function(){
	$("input[name=del-gen]:radio").change(function(){
		if($('#delitem-radio').is(':checked')) {
			var itemcom = $("input#delitem-radio").val();
			//alert(itemwise);
			$.ajax({
				type: 'post',
				url: 'feedback_selector.php',
				data: {items: itemcom},
				success: function(data){
					// console.log(data);
					$(".del-compact-item").html(data);
				}
			});
			$(".del-compact-item").show();
			$(".del-compact-item").css("display","block");
			$(".del-compact-gen").css("display","none");
		}
		if($('#delgen-radio').is(':checked')) {
			$(".del-compact-gen").show();
			$(".del-compact-gen").css("display","block");
			$(".del-compact-item").css("display","none");
		}
	});
});*/



$(document).ready(function(){
	$("input[name=feed-del]:radio").change(function(){
		if($('#feed-radio3').is(':checked')) {
			$(".del-general").show();
			$(".del-general").css("display","block");
			$(".del-itemwise").css("display","none");
		}
		if($('#feed-radio4').is(':checked')) {
			var itemwise = $("input#feed-radio4").val();
			//alert(itemwise);
			$.ajax({
				type: 'post',
				url: 'feedback_selector.php',
				data: {item: itemwise},
				success: function(data){
					// console.log(data);
					$(".del-itemwise").html(data);
				}
			});
			$(".del-itemwise").show();
			$(".del-itemwise").css("display","block");
			$(".del-general").css("display","none");
		}
	});
});

/* $(document).ready(function(){
	$("input#feed-radio2:radio").change(function(){
		var itemwise = $("input#feed-radio2:checked").val();
		//alert(itemwise);
		$.ajax({
			type: 'post',
			url: 'feedback_selector.php',
			data: {item: itemwise},
			success: function(data){
				console.log(data);
				$(".itemwise").html(data);
			}
		});
	});
}); */

$( window ).on( "load", function() {
    // alert( "window loaded" );
    if ($("input[name=dinein-switch]:checkbox").is(":checked")) {
    	$(".dine-disabled").removeAttr("disabled");
		$(".dine-disabled").removeAttr("style");
		$(".btn-popup").removeAttr("style");
    } else {
    	$(".dine-disabled").attr("disabled","disabled");
		$(".dine-disabled").css("color","#ccc");
		$(".btn-popup").css("cursor","not-allowed");
    }
    
    if ($("input[name=delivery-switch]:checkbox").is(":checked")) {
    	$(".del-disabled").removeAttr("disabled");
		$(".del-disabled, .del-online").removeAttr("style");
		$(".btn-del-edit").removeAttr("style");
    } else {
    	$(".del-disabled").attr("disabled","disabled");
		$(".del-disabled, .del-online").css("color","#ccc");
		$(".btn-del-edit").css("cursor","not-allowed");
    }

    if ($("input[name=reminder-switch]:checkbox").is(":checked")) {
    	$(".remind-disabled").removeAttr("disabled");
		$(".remind-disabled").removeAttr("style");
    } else {
    	$(".remind-disabled").attr("disabled","disabled");
		$(".remind-disabled").css("color","#ccc");
    }

    if ($("input[name=alert-switch]:checkbox").is(":checked")) {
    	$(".alert-disabled").removeAttr("disabled");
		$(".input-alert-disable").removeAttr("readonly");
		$(".alert-disabled, close-dis, .input-alert-disable").removeAttr("style");
    } else {
    	$(".alert-disabled").attr("disabled","disabled");
		$(".input-alert-disable").attr("readonly",true);
		$(".alert-disabled").css("color","#ccc");
		$(".input-alert-disable").css("background-color","#ccc");
		$(".close-dis").css("cursor","not-allowed");
    }
});
</script>