403Webshell
Server IP : 104.21.21.239  /  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/invited_all.php
<?php include('mod/_mod_security.php'); ?>
<?php
	$sql = "SELECT * FROM events WHERE id = ".$_SESSION['active_event']." AND user_id = ".$_SESSION['user_id']." ";
	$result_event = mysqli_query($GLOBALS['con'], $sql) or die('Database error!');
	if (mysqli_num_rows($result_event) <= 0) :
		echo 'No data for report!';
		exit();
	else :
		$row_event = mysqli_fetch_object($result_event);
	endif;
	$sql = "SELECT g1.id, g1.last_name, g1.first_name, g1.guest_type, g1.invite_temple, g1.invite_av, g1.invite_kv, g1.invite_bv, g1.invite_dv, g1.primary_guest_id, ".
			"IF(g1.guest_type = 'P',0,1) AS sort_type, IF(g1.guest_type = 'P' OR g1.primary_guest_id = 0,last_name,(SELECT g2.last_name from guests g2 WHERE g2.id = g1.primary_guest_id)) AS sort_name, ".
			"IF(g1.guest_type = 'P' OR g1.primary_guest_id = 0, g1.id ,g1.primary_guest_id) AS sort_id ".
			"FROM guests g1 WHERE ".
			"(g1.invite_temple = 1 OR g1.invite_av = 1 OR g1.invite_kv = 1 OR g1.invite_bv = 1 OR g1.invite_dv = 1) AND ".
			"user_id = ".$_SESSION['user_id']." AND event_id = ".$_SESSION['active_event']." ORDER BY sort_name ASC, sort_id ASC, sort_type ASC, g1.last_name ASC, g1.first_name ASC ";
	//$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>
			<td width="110" align="center">
				Last Name
			</td>
			<td width="100" align="center">
				First Name
			</td>
			<td width="120" align="center">
				Guest Type
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="center">
						<?php echo $row_event->temple_rename; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="center">
						<?php echo $row_event->av_rename; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="center">
						<?php echo $row_event->kv_rename; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="center">
						<?php echo $row_event->bv_rename; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="center">
						<?php echo $row_event->dv_rename; ?>
					</td>
			<?php
				endif;
			?>
			<td width="80" align="center">
				Guest ID #
			</td>
		</tr>
	</thead>
	<tfoot>
		<?php report_fixed_footer(); ?>
	</tfoot>
	<tbody>
		<?php
			$total_temple = 0;
			$total_temple_p = 0;
			$total_temple_s = 0;
			$total_temple_c = 0;
			$total_temple_g = 0;
			$total_av = 0;
			$total_av_p = 0;
			$total_av_s = 0;
			$total_av_c = 0;
			$total_av_g = 0;
			$total_kv = 0;
			$total_kv_p = 0;
			$total_kv_s = 0;
			$total_kv_c = 0;
			$total_kv_g = 0;
			$total_bv = 0;
			$total_bv_p = 0;
			$total_bv_s = 0;
			$total_bv_c = 0;
			$total_bv_g = 0;
			$total_dv = 0;
			$total_dv_p = 0;
			$total_dv_s = 0;
			$total_dv_c = 0;
			$total_dv_g = 0;
			while($row = mysqli_fetch_object($result)) :
				if ($row->invite_temple == 1) :
					$total_temple = $total_temple + 1;
					switch ($row->guest_type) :
					case 'P' :
						$total_temple_p = $total_temple_p + 1;
						break;
					case 'S' :
						$total_temple_s = $total_temple_s + 1;
						break;
					case 'C' :
						$total_temple_c = $total_temple_c + 1;
						break;
					case 'G' :
						$total_temple_g = $total_temple_g + 1;
						break;
					endswitch;
				endif;
				if ($row->invite_av == 1) :
					$total_av = $total_av + 1;
					switch ($row->guest_type) :
					case 'P' :
						$total_av_p = $total_av_p + 1;
						break;
					case 'S' :
						$total_av_s = $total_av_s + 1;
						break;
					case 'C' :
						$total_av_c = $total_av_c + 1;
						break;
					case 'G' :
						$total_av_g = $total_av_g + 1;
						break;
					endswitch;
				endif;
				if ($row->invite_kv == 1) :
					$total_kv = $total_kv + 1;
					switch ($row->guest_type) :
					case 'P' :
						$total_kv_p = $total_kv_p + 1;
						break;
					case 'S' :
						$total_kv_s = $total_kv_s + 1;
						break;
					case 'C' :
						$total_kv_c = $total_kv_c + 1;
						break;
					case 'G' :
						$total_kv_g = $total_kv_g + 1;
						break;
					endswitch;
				endif;
				if ($row->invite_bv == 1) :
					$total_bv = $total_bv + 1;
					switch ($row->guest_type) :
					case 'P' :
						$total_bv_p = $total_bv_p + 1;
						break;
					case 'S' :
						$total_bv_s = $total_bv_s + 1;
						break;
					case 'C' :
						$total_bv_c = $total_bv_c + 1;
						break;
					case 'G' :
						$total_bv_g = $total_bv_g + 1;
						break;
					endswitch;
				endif;
				if ($row->invite_dv == 1) :
					$total_dv = $total_dv + 1;
					switch ($row->guest_type) :
					case 'P' :
						$total_dv_p = $total_dv_p + 1;
						break;
					case 'S' :
						$total_dv_s = $total_dv_s + 1;
						break;
					case 'C' :
						$total_dv_c = $total_dv_c + 1;
						break;
					case 'G' :
						$total_dv_g = $total_dv_g + 1;
						break;
					endswitch;
				endif;
				
				
				switch ($row->rsvp_temple) :
					case 1 :
						$total_temple_yes = $total_temple_yes + 1;
						break;
					case 2 :
						$total_temple_no = $total_temple_no + 1;
						break;
				endswitch;
				switch ($row->rsvp_av) :
					case 1 :
						$total_av_yes = $total_av_yes + 1;
						break;
					case 2 :
						$total_av_no = $total_av_no + 1;
						break;
				endswitch;
				switch ($row->rsvp_kv) :
					case 1 :
						$total_kv_yes = $total_kv_yes + 1;
						break;
					case 2 :
						$total_kv_no = $total_kv_no + 1;
						break;
				endswitch;
				switch ($row->rsvp_bv) :
					case 1 :
						$total_bv_yes = $total_bv_yes + 1;
						break;
					case 2 :
						$total_bv_no = $total_bv_no + 1;
						break;
				endswitch;
				switch ($row->rsvp_dv) :
					case 1 :
						$total_dv_yes = $total_dv_yes + 1;
						break;
					case 2 :
						$total_dv_no = $total_dv_no + 1;
						break;
				endswitch;
		?>
				<tr>
					<td>
						<?php 
							if ($row->primary_guest_id > 0) :
								echo '&emsp;';
							endif;
							echo $row->last_name; 
						?>
					</td>
					<td>
						<?php echo $row->first_name; ?>
					</td>
					<td>
						<?php
							switch ($row->guest_type) :
								case "P" :
									echo 'Primary';
									break;
								case "S" :
									echo 'Significant Other';
									break;
								case "C" :
									echo 'Child';
									break;
								case "G" :
									echo 'Gift Only';
									break;
							endswitch;
						?>
					</td>
					<?php
						if (!empty($row_event->temple_name)) :
					?>
							<td align="center">
								<?php
									if ($row->invite_temple == 1) :
										echo 'X';
									endif;
								?>
							</td>
					<?php
						endif;
						if (!empty($row_event->av_name)) :
					?>
							<td align="center">
								<?php
									if ($row->invite_av == 1) :
										echo 'X';
									endif;
								?>
							</td>
					<?php
						endif;
						if (!empty($row_event->kv_name)) :
					?>
							<td align="center">
								<?php
									if ($row->invite_kv == 1) :
										echo 'X';
									endif;
								?>
							</td>
					<?php
						endif;
						if (!empty($row_event->bv_name)) :
					?>
							<td align="center">
								<?php
									if ($row->invite_bv == 1) :
										echo 'X';
									endif;
								?>
							</td>
					<?php
						endif;
						if (!empty($row_event->dv_name)) :
					?>
							<td align="center">
								<?php
									if ($row->invite_dv == 1) :
										echo 'X';
									endif;
								?>
							</td>
					<?php
						endif;
					?>
					<td>
						<?php echo $row->id; ?>
					</td>
				</tr>
		<?php
			endwhile;
		?>
		<tr>
			<td colspan="2">
				Totals:
			</td>
			<td align="right">
				Total:
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="right">
						<?php echo $total_temple; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="right">
						<?php echo $total_av; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="right">
						<?php echo $total_kv; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="right">
						<?php echo $total_bv; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="right">
						<?php echo $total_dv; ?>
					</td>
			<?php
				endif;
			?>
			<td>&nbsp;
			</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;
			</td>
			<td align="right">
				Primary:
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="right">
						<?php echo $total_temple_p; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="right">
						<?php echo $total_av_p; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="right">
						<?php echo $total_kv_p; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="right">
						<?php echo $total_bv_p; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="right">
						<?php echo $total_dv_p; ?>
					</td>
			<?php
				endif;
			?>
			<td>&nbsp;
			</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;
			</td>
			<td align="right">
				Significant Other:
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="right">
						<?php echo $total_temple_s; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="right">
						<?php echo $total_av_s; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="right">
						<?php echo $total_kv_s; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="right">
						<?php echo $total_bv_s; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="right">
						<?php echo $total_dv_s; ?>
					</td>
			<?php
				endif;
			?>
			<td>&nbsp;
			</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;
			</td>
			<td align="right">
				Child:
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="right">
						<?php echo $total_temple_c; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="right">
						<?php echo $total_av_c; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="right">
						<?php echo $total_kv_c; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="right">
						<?php echo $total_bv_c; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="right">
						<?php echo $total_dv_c; ?>
					</td>
			<?php
				endif;
			?>
			<td>&nbsp;
			</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;
			</td>
			<td align="right">
				Gift Only:
			</td>
			<?php
				if (!empty($row_event->temple_name)) :
			?>
					<td align="right">
						<?php echo $total_temple_g; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->av_name)) :
			?>
					<td align="right">
						<?php echo $total_av_g; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->kv_name)) :
			?>
					<td align="right">
						<?php echo $total_kv_g; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->bv_name)) :
			?>
					<td align="right">
						<?php echo $total_bv_g; ?>
					</td>
			<?php
				endif;
				if (!empty($row_event->dv_name)) :
			?>
					<td align="right">
						<?php echo $total_dv_g; ?>
					</td>
			<?php
				endif;
			?>
			<td>&nbsp;
			</td>
		</tr>
	</tbody>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit