Location: PHPKode > projects > quickjournal > quickjournal/index.php
<? include "config.php"; ?>
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
<html>
<head>
<title><?=$appname;?> v<?=$appversion;?></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<?=$cright;?>
<style>
	body, table, form, textarea {text-align:left;font-family:Verdana, Arial, Helvetica; font-size: 10px;}
	input {font-family:Verdana, Arial, Helvetica; font-size: 10px;}
	a:link{text-decoration:none;}
	a:visited{text-decoration:none;color:#666699;}
	a:hover{color:red;}
	a:active{color:orange;}
</style>
</head>
<body>
<table width="460" border="0" cellspacing="0" cellpadding="0">
	<tr><td valign="top">
		<center><strong>Please leave a note</strong><br />use the calendar below to navigate to a date</center><br />
		<table border=1 cellpadding=0 cellspacing=0 bgcolor=silver>
		   <tbody><tr><td align="center" valign="top">
				<script src="mycal.js" type="text/javascript" language="javascript"></script>
			</td></tr></tbody>
		</table>
		<br /><center><a href="<?=$PHP_SELF;?>">Today <?=date("Y-m-d");?></a></center>
	</td>
	<td><img height=1 alt="" src="images/tiny.gif" width=8></td>
	<td valign="top">
		  <table width=251 border=0 cellpadding=0 cellspacing=0 background="images/bgline.gif" bgcolor=#ffffff>
			<tbody>
			  <tr>
				<td colspan=5><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/top_bg.gif">
					<tr>
					  <td align="left" valign="top"><img src="images/top_left.gif" width="11" height="51"></td>
					  <td align="center" valign="top"><img src="images/top_logo.gif" width="160" height="51"></td>
					  <td align="right" valign="top"><img src="images/top_right.gif" width="11" height="51"></td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <tr>
				<td bgcolor=#b5b5b5><img height=1 alt=""  src="images/tiny.gif" width=1></td>
				<td colspan=3><img height=10 alt=""  src="images/tiny.gif" width=1></td>
				<td bgcolor=#b5b5b5><img height=1 alt=""  src="images/tiny.gif" width=1></td>
			  </tr>
			  <tr>
				<td bgcolor=#b5b5b5><img height=1 alt="" src="images/tiny.gif" width=1></td>
				<td><img height=1 alt=""  src="images/tiny.gif" width=10></td>
				<form name="form1" id="form1" method="post" action="index.php">
				  <td><img height=8 alt="" src="images/tiny.gif" width=430><br />

				   <?

					if ((!$day || !$year || $month) && !$mydate) {
					  	$mydate = date("Y-m-d");
					} else {
					 	$month = $month+1;
					 	if ($month && $year && $day) {
							$mydate = "$year-$month-$day";
						}
					}
					echo "<strong style='font-size: 13px;color:#666699;'>$mydate</strong><br /><br />";
					echo "<input type=\"hidden\" name=\"mode\" value=\"gowrite\">";
					echo "<input type=\"hidden\" name=\"mydate\" value=\"$mydate\">";

					$sql = "select * from notes where notes_date='$mydate' order by notes_time asc";
					$result = mysql_query($sql);
					while ($row=mysql_fetch_array($result)) {
						echo "
							<strong style='font-size: 11px;'>$row[notes_user]</strong> [".substr("$row[notes_time]", -8)."]<br />".nl2br(stripslashes($row[notes_note]))."<br /><br />
						";
					}
					mysql_free_result($result);
					 if ($mynotes && $user && $pass) {
						if ($allowhtml == "0") {
							$mynotes = str_replace("<", "&lt;", "$mynotes");
							$mynotes = str_replace(">", "&gt;", "$mynotes");
						}
						if ($mydate && $todayonly == "0") {
							$sql = "insert into notes (notes_date,notes_note,notes_time,notes_user) values ('$mydate','$mynotes',NOW(),'$user')";
						} else {
							$mydate = date("Y-m-d");
							$sql = "insert into notes (notes_date,notes_note,notes_time,notes_user) values ('$mydate','$mynotes',NOW(),'$user')";
						}

						while (list ($key, $val) = each ($allowed)) {
						    if ($key == "$user" && $val == "$pass") {
								mysql_query($sql) or die("error 324343");
							}
						}

						$adate = explode("-", $mydate);
						$mymonth = $adate[1]-1;
						header("Refresh:0;url=$PHP_SELF?day=$adate[2]&month=$mymonth&year=$adate[0]");
					}

					if ($todayonly == "1") {
						$posttext = "<strong style='font-size: 10px;color:#666699;'>Note: You can only post under today's date</strong>";
					} else {
						$posttext = "<strong style='font-size: 10px;color:#666699;'>Note: You can post notes under any date, past, present or future</strong>";
					}

				   ?>
				  <br />
				  <input name="user" type="text" value="" style="width:135; height:17"> :<strong style='font-size: 10px;color:#666699;'>Username</strong> &nbsp;&nbsp;
				  <input name="pass" type="password" value="" style="width:135; height:17"> :<strong style='font-size: 10px;color:#666699;'>Password</strong><br />
				  <textarea name="mynotes" style="width:430; height:80"></textarea><br />
				  <?=$posttext;?><br /><br />
					<input name="submitField" type="submit" value=" post new note " style='font-size: 10px;background-color:#666699;color:#ffffff;height:23'>
				  </td>
				</form>
				<td><img height=1 alt="" src="images/tiny.gif" width=10></td>
				<td bgcolor=#b5b5b5><img height=1 alt=""  src="images/tiny.gif" width=1></td>
			  </tr>
			  <tr>
				<td bgcolor=#b5b5b5><img height=1 alt="" src="images/tiny.gif" width=1></td>
				<td colspan=3><img height=10 alt="" src="images/tiny.gif" width=1></td>
				<td bgcolor=#b5b5b5><img height=1 alt="" src="images/tiny.gif" width=1></td>
			  </tr>
			  <tr>
				<td bgcolor=#b5b5b5 colspan=5><img height=1 alt="" src="images/tiny.gif" width=251></td>
			  </tr>
			</tbody>
		  </table>
		  <center><a href="http://www.phpdevshed.com/forum" title="click here for support">powered by phpdevshed.com - <?=$appname;?> - <?=$appversion;?></a><br />
		  <a href="http://www.phpdevshed.com/forum" title="click here to download Dataman">to administer <?=$appname;?> download Dataman</a><br />
		  <a href="" title="best">best viewed with good browsers</a></center>
	</td></tr>
</table>
</body>
</html>
Return current item: quickjournal