HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/afish-ka.ru/modules/services/qr.inc
<?

	$result = query("SELECT * FROM `shedule` WHERE `datetime`>=NOW() AND `aid`='".mysql_escape_string($global_vars['request'][2])."';"); // QR
	
	
	if(mysql_num_rows($result)!=1)
		die();
	else {
		$data = mysql_fetch_array($result);
		list($actions_qr_date,$actions_qr_time)=explode(" ",$data['datetime']);
		$actions_qr_date=explode("-",$actions_qr_date);
		$actions_qr_time=explode(":",$actions_qr_time);
		$firm = mysql_fetch_array(query("SELECT * FROM `firms` WHERE `id`='".$data['fid']."';"));
		
		$action = query("SELECT * FROM `actions` WHERE `id`='".mysql_escape_string($global_vars['request'][2])."';");
		$action = mysql_fetch_array($action);		
		
		$result = query("SELECT `type_subtitle`, `id`, `human_id`, `human_subid` FROM `firms_types` WHERE `id`='".$action['type']."' LIMIT 1;");
		$actions_type = mysql_fetch_array($result);
		$actions_type_id = $actions_type[1];
		$actions_type_subhuman = $actions_type[3];
		$actions_type_human = $actions_type[2];
		$actions_type = $actions_type[0];
		
		$actions_qr = "http://qrcode.kaywa.com/img.php?s=6&d=BEGIN%3AVCALENDAR%0D%0ABEGIN%3AVEVENT%0D%0ADTSTART%3A".$actions_qr_date[0].$actions_qr_date[1].$actions_qr_date[2]."T".$actions_qr_time[0].$actions_qr_time[1].$actions_qr_time[2]."%0D%0ADTEND%3A".$actions_qr_date[0].$actions_qr_date[1].$actions_qr_date[2]."T".$actions_qr_time[0].$actions_qr_time[1].$actions_qr_time[2]."%0D%0ASUMMARY%3A".urlencode($action['title'])."%0D%0ALOCATION%3A".urlencode($firm['title'])."%0D%0ADESCRIPTION%3A".urlencode($action['genre'].". Подробности на http://".$url.$actions_type_human."/".$actions_type_subhuman."/".$action['id']."/")."%0D%0AEND%3AVEVENT%0D%0AEND%3AVCALENDAR";
		
		header("Location: ".$actions_qr);
	}

?>