Location: PHPKode > projects > BluuCMS > bluucms-1.0/bluu-content/plugins/email/email_admin.php
<?php

	if(isset($_POST['save']))
	{
		
		foreach($_POST as $key => $value)
		{
			if($key != 'save')
			{
				if(!$plugin->set_setting('email', $filter->add_filter('clean_input', $key), $filter->add_filter('clean_input', $value)))
				{
					++$error;
				}
			}
		}
		if($error == 0)
		{
			header("location: ?plugin=email&saved=0");
			exit;
		}
		else
		{
			header("location: ?plugin=email&saved=1");
			exit;
		}
	}

?>
<form method="post">

	
   <fieldset id="email-to">
		<legend>Email To - who the email is going to.</legend>
		<div class="container">
    		<div class="nest">
				<input type="text" name="mailto" value="<?=$plugin->get_setting('email', 'mailto')?>"/>
			</div>
    	</div>
	</fieldset>
    
    <fieldset id="email-subject">
		<legend>Email Subject - the subject of the email.</legend>
		<div class="container">
    		<div class="nest">
				<input type="text" name="subject" value="<?=$plugin->get_setting('email', 'subject')?>"/>
			</div>
    	</div>
	</fieldset>
    
    <fieldset id="email-from">
		<legend>Email From - if empty will use the cms'es email address.</legend>
		<div class="container">
    		<div class="nest">
				<input type="text" name="from" value="<?=$plugin->get_setting('email', 'from')?>"/>
			</div>
    	</div>
	</fieldset>
    
	<fieldset id="email-body">
		<legend>Email Body - the body of the email.</legend>
		<div class="container">
    		<div class="nest">
				<textarea name="body" style="height: 100px;"><?=$plugin->get_setting('email', 'body')?></textarea>
			</div>
    	</div>
	</fieldset>
	
	<p>Body Help:</p>
	<p>To use the value of a input you use the name of the input as the variable eg: %email% will read the value from a input item named email.</p>
	<p>&nbsp;</p>
	<p>System Variables:</p>
	<ul>
		<li>%ip% - the ip address of the browser submitting the form</li>
		<li>%time% - the time and date of when the form was submitted.</li>
		<li>%useragent% - the useragent of computer submitting the form.</li>
		<li>%servername% - the name of the server.</li>
	</ul>

	<div id="hide-me-toggle"><p>ReCaptcha</p></div>
	
	<div id="hide-me">

    <fieldset id="enable-recaptcha">
		<legend>Enable ReCaptcha</legend>
		<div class="container">
    		<div class="nest">
				<select name="recaptcha">
					<?php ($plugin->get_setting('email', 'recaptcha') ? $recaptcha_enabled = "SELECTED" : $recaptcha_disabled = "SELECTED"); ?>
					<option <?=$recaptcha_disabled?> value="0">Disabled</option>
					<option <?=$recaptcha_enabled?> value="1">Enabled</option>
				</select>
			</div>
    	</div>
	</fieldset>
	
    <fieldset id="recaptcha-public">
		<legend>ReCaptcha Public Key</legend>
		<div class="container">
    		<div class="nest">
				<input type="text" name="recaptcha_public_key" value="<?=$plugin->get_setting('email', 'recaptcha_public_key')?>"/>
			</div>
    	</div>
	</fieldset>

    <fieldset id="recaptcha-private">
		<legend>ReCaptcha Private Key</legend>
		<div class="container">
    		<div class="nest">
				<input type="text" name="recaptcha_private_key" value="<?=$plugin->get_setting('email', 'recaptcha_private_key')?>"/>
			</div>
    	</div>
	</fieldset>
	
	<p>Havn't got a API key? <a href="http://recaptcha.net/api/getkey">Get one now.</a></p>

	</div>
    
    <div id="save">
		<button type="submit" class="save" name="save">Save</button>
    	<div id="loading"><img src="images/spinner.gif" alt="loading"/></div>
	</div>
               
</form>
Return current item: BluuCMS