Location: PHPKode > projects > OpenCMS > OpenCMS - Version Alpha/admin_header_modify_select.php
<?php

session_start();

?>

<html><link rel='shortcut icon' href='favicon.ico'>
<head>
<title>
OpenCMS
</title>
</head>

<body bgcolor='#333333' topmargin='0' leftmargin='0'>

<div align='center'><img src='site_images/admin_header_opencms.jpg'></div>
<table width='960' cellspacing='0' cellpadding='20' border='0' align='center'>
<tr>
	<td bgcolor='#ffffff'>


	<?php
		include 'site_login.php';
	?>

	<br>

	<font face='arial' size='4' color='#000000'>
		<b>
			ADMIN - HEADER Modify Select:
		</b>
	</font>


	<br>
	<br>

	<font face='arial' size='2' color='#000000'>

	<?php

		if ($_SESSION['session_id_login_verify'] == 'YES') {

			// Grabs the _POST variables...
			$id = $_POST['id'];


			// This section replaces all bad characters from the form fields.
			$id_replace_quote_single = str_replace("'", "`", $id);
			$id_replace_quote_double = str_replace('"', "``", $id_replace_quote_single);
			$id_replace_slashes = str_replace("\\", "/", $id_replace_quote_double);
			$id_replace_lefthtml = str_replace("<", "[", $id_replace_slashes);
			$id_replace_righthtml = str_replace(">", "]", $id_replace_lefthtml);
			$id = $id_replace_righthtml;	



			include 'site_connect_mysql.php';

			//Connect To Database
			$mysql_OpenCMS_connection = mysql_connect($loginhostname, $loginusername, $loginpassword);
			mysql_select_db($logindatabase, $mysql_OpenCMS_connection);


			$header_list = "
			SELECT 
			* 
			FROM " . 
			$connect_mysql_header_table . "
			WHERE " .
			$connect_mysql_header_id . " = '" .
			$id . "'"
			; 

			//echo "<h2>" . $header_list . "</h2>";


			$header_list_data = mysql_query($header_list) or die(mysql_error());
			$header_list_data_count = mysql_num_rows($header_list_data);



			while($header_list_data_info = mysql_fetch_array($header_list_data)){
				
				$type = $header_list_data_info[$connect_mysql_header_type];
				$text = $header_list_data_info[$connect_mysql_header_text];

			}





			echo "
				

				<form method='post' action='admin_header_modify_select_submit.php' style='display: inline; margin: 0;'>
				
				Header For:<br>
				" . $type . "
				</select>
				<br><br>
				
				Text:<br>
				<input type='text' name='text' size='60' value='" . $text . "'>
				<br><br>

				<input type='hidden' name='id' value='" . $id . "'>
				<input type='hidden' name='type' value='" . $type . "'>
				<input type='hidden' name='action' value='MODIFY'>
				
				<input type='submit' value='MODIFY HEADER'>

				</form>

				<!--
				<br>
				<br>
				<hr>
				OR
				<hr>
				<br>


				<form method='post' action='admin_header_modify_select_submit.php' style='display: inline; margin: 0;'>

				<input type='hidden' name='id' value='" . $id . "'>
				<input type='hidden' name='action' value='DELETE'>
				
				<input type='submit' value='DELETE HEADER'>
				<br>
				</i>Warning: Can't be undone!</i>

				</form>
				-->


			";
			
		}
		else {

			echo "Error: You do not have access to see this page. Go <a href='index.php'>Back</a>.";

		}

	?>

	</font>

	</td>
</tr>
</table>

<table width='960' cellspacing='0' cellpadding='20' border='0' align='center'>
<tr>
	<td bgcolor='#000000'>

		<font face='arial' size='1' color='#ffffff'>
			OpenCMS - Version Alpha - http://sourceforge.net/projects/open-cms/
		</font>

	</td>
</tr>
</table>

</body>
</html>



Return current item: OpenCMS