Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/admin/settings/socialNetworks.php
<h3><?=SOCIALNETWORKS_TITLE?></h3>
<?php
if (isset($_POST['submit']) && $_POST['submit'] == SOCIALNETWORKS_FORM_SUBMIT) {
	//get data
	$facebook = $_POST['facebook'];
	$twitter = $_POST['twitter'];
	$linkedin = $_POST['linkedin'];
	$flickr = $_POST['flickr'];
	$myspace = $_POST['myspace'];
	$gmaps = $_POST['gmaps'];
	
	$message = '<p class="ok">';
	
	if (isset($gmaps) && $gmaps != "") {
		$gmaps = str_replace('<iframe', '<iframe class="map"',$gmaps);
		$message .= $db->updateSettings('gmaps', $gmaps);
	}
	
	$message .= $db->updateSettings('facebook', $facebook); 
	$message .= $db->updateSettings('twitter', $twitter);
	$message .= $db->updateSettings('linkedin', $linkedin);
	$message .= $db->updateSettings('flickr', $flickr);
	$message .= $db->updateSettings('myspace', $myspace);
	$message .= "</p>";
	
	echo $message;
} else {
	?>
	<center>
	<form action="home.php?id=admin&action=social" method="post">
		<table style="margin-left: auto; margin-right: auto; text-align: left; width: 650px;" border="0" cellpadding="2" cellspacing="2">
			<tr>
				<td colspan="2" rowspan="1" align="center">
					<b><?=SOCIALNETWORKS_CURRENT_MAP?></b>
					<br>
					<?php 
					$gmaps = $utils->getSettingValue('gmaps');
					if (isset($gmaps) && $gmaps != "") {
						echo $utils->getSettingValue('gmaps');
					} else {
						?>
						<span style="color: #FF0000;"><?=SOCIALNETWORKS_NO_MAP?></span>
						<?php 
					}
					?>
				</td>			
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_GOOGLE?>
				</td>
				<td class="td_right">
					<input type="text" name="gmaps" size="50">
				</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="1" align="center">
					<?=SOCIALNETWORKS_GOOGLEMAPS?><a href="https://maps.google.com" class="category" target="_blank"><?=SOCIALNETWORKS_GOOGLEMAPS_LINK?></a>
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_FACEBOOK?>
				</td>
				<td class="td_right">
					<input type="text" name="facebook" size="50" value="<?=$utils->getSettingValue('facebook')?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_TWITTER?>
				</td>
				<td class="td_right">
					<input type="text" name="twitter" size="50" value="<?=$utils->getSettingValue('twitter')?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_LINKEDIN?>
				</td>
				<td class="td_right">
					<input type="text" name="linkedin" size="50" value="<?=$utils->getSettingValue('linkedin')?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_FLICKR?>
				</td>
				<td class="td_right">
					<input type="text" name="flickr" size="50" value="<?=$utils->getSettingValue('flickr')?>">
				</td>
			</tr>
			<tr>
				<td class="td_left">
					<?=SOCIALNETWORKS_FORM_MYSPACE?>
				</td>
				<td class="td_right">
					<input type="text" name="myspace" size="50" value="<?=$utils->getSettingValue('myspace')?>">
				</td>
			</tr>
			<tr>
				<td colspan="2" rowspan="1" style="text-align: center;">
					<input type="submit" name="submit" value="<?=SOCIALNETWORKS_FORM_SUBMIT?>" />
				</td>
			</tr>
	
		</table>
	</form>
	</center>
<?php
}
?>
Return current item: EZphotopress