Location: PHPKode > projects > PLiMa > plima-0.5.2/inc/head.inc.php
<?
/***
	*   pLiMa - php List Manager
  *   Copyright (C) 2003  Jinn Koriech (hide@address.com)
	*
  *		This file is part of pLiMa.
	*
	*   pLiMa is free software; you can redistribute it and/or modify
	*   it under the terms of the GNU General Public License as published by
	*   the Free Software Foundation; either version 2 of the License, or
	*   any later version.
	*
	*   pLiMa is distributed in the hope that it will be useful,
	*   but WITHOUT ANY WARRANTY; without even the implied warranty of
	*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	*   GNU General Public License for more details.
	*
	*   You should have received a copy of the GNU General Public License
	*   along with pLiMa; if not, visit http://www.gnu.org or write to the 
	*   Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
	*	  Boston, MA  02111-1307  USA
	*	
	*/
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>

<head>
<title>pLiMa</title>
<link rel="stylesheet" href="<? echo WEB_ROOT ?>/inc/style.css" type="text/css">
</head>

<body>
<div id='content'>
	<div id='top'>
		<div id='topTitle'>
			<h1><a href='<? echo WEB_ROOT."/index.phtml"; ?>'>pLiMa</a> 
				<? 
					echo $_SESSION['MALI'] != '' 
								? " - Current List: <a href='".WEB_ROOT."/list-home.phtml?select_list=".$_SESSION['MALI']."'>".strtoupper(str_replace(TABLE_PREFIX, "", $_SESSION['MALI'])) . "</a>"
								: '' ; 

				?></h1>
		</div>
		<div id='topOption'>
			<form name='list' action='<? echo WEB_ROOT. "/list-home.phtml"; ?>' method='get'>
				<script type="text/javascript">
					function dropGo(url) {
						document.list.submit();
					}
				</script>
<?
					// Start output of the list
					echo "<select name='select_list' id='titleForm' onChange='dropGo'>\n";

					mysql_data_seek($tables, 0);
					while( $row = mysql_fetch_row($tables) ) {
						if ( strstr($row[0], TABLE_PREFIX) ) {

							if ( $row[0] == $_SESSION['MALI'] ) $selected = "SELECTED";
							else $selected = "";

							echo "<option value='" . $row[0] . "' $selected>" . str_replace(TABLE_PREFIX, "", $row[0]) . "</option>\n";
						}
					}
					mysql_free_result($tables);
					unset($row);
?>
				</select>
				<input type='button' value='Go' id='titleForm' onClick='dropGo(document.list.action.value)' />
			</form>
		</div>
		<div id='topMenu'>
			<? if ( $_SESSION['MALI'] != '' ) : ?>
			<div style='float: left'>
				<a href='<? echo WEB_ROOT."/list-home.phtml"; ?>'>Home</a>
				| <a href='<? echo WEB_ROOT."/compose1.phtml"; ?>'>Compose Message</a>
				| <a href='<? echo WEB_ROOT."/options.phtml"; ?>'>Options</a>
			</div>
			<? endif; ?>
			<div style='float: right'>
				<a href='<? echo WEB_ROOT."/sendq.phtml"; ?>'>Send Que</a>
				| <a href='<? echo WEB_ROOT."/new-list1.phtml"; ?>'>Create mailing-list</a>
				<? // | <a href='< ? echo WEB_ROOT."/index.phtml?unset=1"; ? >'>Clear Session</a> ?>
			</div>
			&nbsp;
		</div>
	</div>
	<div id='contentBody'>

<!-- BEGIN BODY -->
Return current item: PLiMa