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

include "../dbconnect.php";

$client_id = '62';
$outlet_id = '3';

if(isset($_POST['item']) && $_POST['item'] == 'itemwise') {
	?>

	<table class="table">
		<tr>
			<th>List of Item</th>
			<th>Poor</th>
			<th>Avarage</th>
			<th>Good</th>
			<th>Very Good</th>
			<th>Excellent</th>
		</tr>
		<tr>
			<td>Item 1</td>
			<?php
																	
			$fb_qry = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = '$outlet_id'");
			while($fb_row = mysql_fetch_array($fb_qry)) { ?>
			<td>
				<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="../img/emoji-img/<?php echo $fb_row['fb_option_image']; ?>">
				</label>
			</td>
			<?php } ?>
		</tr>
	</table>

	<?php
}
?>



<?php
if(isset($_POST['items']) && $_POST['items'] == 'itemwise') {
	?>
	
	<td>Item 1</td>
	<?php
																
	$fb_qry1 = mysql_query("SELECT * FROM `feedback_ques_details` WHERE `outlet_id` = 1");
	while($fb_row1 = mysql_fetch_array($fb_qry1)) { ?>
		
		<td>
			<input id="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row1['fb_option_text']; ?>" type="radio" name="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])); ?>" value="<?php echo $fb_row1['fb_option_text']; ?>" />
			<label class="drinkcard-cc" for="<?php echo strtolower(str_replace(' ', '_', $row['fb_ques'])).'_'.$fb_row1['fb_option_text']; ?>">
				<img src="img/emoji-img/<?php echo $fb_row1['fb_option_image']; ?>">
			</label>
		</td>
		
		<?php
	}
}

?>