403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/mitzvahm/planner/rpt/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mitzvahm/planner/rpt/food_by_venue.php
<?php include('mod/_mod_security.php'); ?>
<?php
	$_POST['sort'] = str_ireplace('*venue*', trim($_POST['venue']), $_POST['sort']);
	$sql = "SELECT g.guest_type, g.last_name, g.first_name, g.food_".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['venue']))." AS food_choice, g.food_".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['venue']))."_comment AS food_comment, t.table_no, t.table_desc ".
			"FROM guests g LEFT OUTER JOIN tables t ON (g.table_".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['venue']))." = t.id AND g.user_id = t.user_id AND g.event_id = t.event_id) ".
			"WHERE rsvp_".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['venue']))." = 1 AND ".
			"g.user_id = ".$_SESSION['user_id']." AND g.event_id = ".$_SESSION['active_event']." ORDER BY ".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['sort']))." ";
	$result = mysqli_query($GLOBALS['con'], $sql) or die('Database error!');
	//$result = mysqli_query($GLOBALS['con'], $sql) or die(mysqli_error($GLOBALS['con']).' ==='.$sql.'===');
	if (mysqli_num_rows($result) <= 0) :
		echo 'No data for report!';
		exit();
	endif;
?>
<table align="center" cellpadding="0" cellspacing="2" border="0">
	<thead>
		<?php report_fixed_header(); ?>
		<tr class="page_header">
			<td colspan="5"style="font-size:18px;">
				<?php echo venue_decode(mysqli_real_escape_string($GLOBALS['con'], trim($_POST['venue']))); ?>
			</td>
		</tr>
		<tr>
			<td width="100" align="center">
				Last Name
			</td>
			<td width="100" align="center">
				First Name
			</td>
			<td width="140" align="center">
				Guest Type
			</td>
			<td width="50" align="center">
				Table Number
			</td>
			<td width="170" align="center">
				Table Description
			</td>
			<td width="180" align="center">
				Food Choice
			</td>
			<td width="180" align="center">
				Comment
			</td>
		</tr>
	</thead>
	<tfoot>
		<?php report_fixed_footer(); ?>
	</tfoot>
	<tbody>
		<?php
			$ar_total_meal = array();
			$ar_total_gtype = array();
			while($row = mysqli_fetch_object($result)) :
				$extra_class = '';
				if ($row->guest_type == 'C') :
					$extra_class = ' italic ';
				endif;
		?>
				<tr>
					<td class="<?php echo $extra_class; ?>">
						<?php echo $row->last_name; ?>
					</td>
					<td class="<?php echo $extra_class; ?>">
						<?php echo $row->first_name; ?>
					</td>
					<td>
						<?php
							switch ($row->guest_type) :
								case "P" :
									echo 'Primary';
									$count_p = $count_p + 1;
									break;
								case "S" :
									echo 'Significant Other';
									$count_s = $count_s + 1;
									break;
								case "C" :
									echo 'Child';
									$count_c = $count_c + 1;
									break;
								case "G" :
									echo 'Gift Only';
									$count_g = $count_g + 1;
									break;
							endswitch;
						?>
					</td>
					<td align="center">
						<?php echo $row->table_no; ?>
					</td>
					<td align="left">
						<?php echo $row->table_desc; ?>
					</td>
					<td>
						<?php echo $row->food_choice; ?>
					</td>
					<td>
						<?php echo $row->food_comment; ?>
					</td>
				</tr>
		<?php
			$ar_total_meal[strtolower($row->food_choice)] = (int)$ar_total_meal[strtolower($row->food_choice)] + 1;
			$calc_gtype = ($row->guest_type == 'C' ? 'Children' : 'Adults');
			$ar_total_gtype[$calc_gtype][strtolower($row->food_choice)] = (int)$ar_total_gtype[$calc_gtype][strtolower($row->food_choice)] + 1;
			endwhile;
		?>
		<tr>
			<td>
				Total:
			</td>
			<td align="right">
				<?php echo mysqli_num_rows($result); ?>
			</td>
			<td align="left">
				Total by Guest Type:
			</td>
			<td align="left" colspan="2">&nbsp;
				<?php //var_dump($ar_total_gtype); ?>
				<!--
				Adults: <?php echo (int)$ar_total_gtype['P'] + (int)$ar_total_gtype['S']; ?><br />
				Children: <?php echo (int)$ar_total_gtype['C']; ?><br />
				-->
				<?php
					foreach ($ar_total_gtype as $key => $ar_value) :
						echo $key.':<br />';
						$count_type = 0;
						foreach ($ar_value as $key2 => $value) :
							echo '&emsp;'.($key2 > ' ' ? $key2 : 'Not specified').': '.$value.'<br />';
							$count_type = $count_type + (int)$value;
						endforeach;
						echo '&emsp;&emsp;Total: '.$count_type.'<br />';
					endforeach;
				?>
			</td>
			<td align="left">
				Total by Meal Choice:
			</td>
			<td align="left">
				<?php
					foreach ($ar_total_meal as $key => $value) :
						echo ($key > ' ' ? $key : 'Not specified').': '.$value.'<br />';
					endforeach;
				?>
			</td>
		</tr>
	</tbody>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit