Project

General

Profile

« Previous | Next » 

Revision 1590

Added by darkviper over 12 years ago

added request var to submit a request identifier. argument ?fri=12345 on GET-view will submit 'FormRequestId: 12345' by email

View differences:

view.php
154 154
?>
155 155
			<form <?php echo ( ( (strlen($form_name) > 0) AND (false == $use_xhtml_strict) ) ? "name=\"".$form_name."\"" : ""); ?> action="<?php echo htmlspecialchars(strip_tags($_SERVER['SCRIPT_NAME'])).'';?>" method="post">
156 156
				<input type="hidden" name="submission_id" value="<?php echo $_SESSION['form_submission_id']; ?>" />
157
				<?php
158
				$iFormRequestId = isset($_GET['fri']) ? intval($_GET['fri']) : 0;
159
				if($iFormRequestId) {
160
					echo '<input type="hidden" name="fri" value="'.$iFormRequestId.'" />'."\n";
161
				}
162
				?>
157 163
				<?php // echo $admin->getFTAN(); ?>
158 164
				<?php
159 165
				if(ENABLED_ASP) { // first add some honeypot-fields
......
423 429
					} else {
424 430
						// Adding the IP to the body and try to send the email
425 431
						// $email_body .= "\n\nIP: ".$_SERVER['REMOTE_ADDR'];
426

  
432
						$iFormRequestId = isset($_POST[fri]) ? intval($_POST['fri']) : 0;
433
						if($iFormRequestId) {
434
							$email_body .= "\n\nFormRequestID: ".$iFormRequestId;
435
						}
427 436
						$recipient = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $email_fromname );
428 437
						$email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $recipient );
429 438
						$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $email_body );
......
522 531
		}
523 532
	}
524 533

  
525
}
534
}

Also available in: Unified diff