Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/admin/settings/settings.php
<h3><?=SETTINGS_TITLE?></h3>
<?php
if (isset($_POST['submit']) && $_POST['submit'] == SETTINGS_FORM_SUBMIT) {
	//get data
	$email = $_POST['email'];
	$siteUrl = $_POST['url'];
	$title = $_POST['title'];
	$motto = $_POST['motto'];
	
	//set the / at the end of the siteUrl if it not present
	if (!$utils->endsWith($siteUrl,"/")) {
			$siteUrl .= "/";	
	}
	
	
	//modify email
	$message = '<p class="ok">';
	$message .= $db->updateSettings('title', $title); 
	$message .= $db->updateSettings('motto', $motto);
	$message .= $db->updateSettings('email', $email);
	$message .= $db->updateSettings('site_url', $siteUrl);
	$message .= "</p>";
	
	echo $message;
} else {
	?>
	<center>
	<form action="home.php?id=admin&action=settings" method="post">
		<table style="margin-left: auto; margin-right: auto; text-align: left; width: 400px;" border="0" cellpadding="2" cellspacing="2">			
			<tr>
				<td class="td_left">
					<?=SETTINGS_FORM_EMAIL?>
				</td>
				<td class="td_right">
					<input type="text" name="email" size="25" value="<?=$utils->getSettingValue('email') ?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SETTINGS_FORM_URL?>
				</td>
				<td class="td_right">
					<input type="text" name="url" size="25" value="<?=$utils->getSettingValue('site_url') ?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SETTINGS_FORM_TITLE?>
				</td>
				<td class="td_right">
					<input type="text" name="title" size="25" value="<?=$utils->getSettingValue('title') ?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SETTINGS_FORM_MOTTO?>
				</td>
				<td class="td_right">
					<input type="text" name="motto" size="25" value="<?=$utils->getSettingValue('motto') ?>">
				</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="1" style="text-align: center;">
					<input type="submit" name="submit" value="<?=SETTINGS_FORM_SUBMIT?>" />
				</td>
			</tr>
	
		</table>
	</form>
	</center>
<?php
}
?>
Return current item: EZphotopress