Location: PHPKode > projects > Silicon Fodder > SiliconFodder/DocumentRoot/notepad/index.php
<? require_once("../common/nocache.php"); ?>
<? require_once("../common/includes.php"); ?>
<?
// opening an existing note?
if($HTTP_GET_VARS["noteID"] != "") {
	$noteID = $HTTP_GET_VARS["noteID"];
	// need to get the folder id
	$folderID = "U";
	$mySQL = "SELECT folderid FROM notepad WHERE id=".$noteID;
	$rows = gendb_query($mySQL, $myDb) or die(gendb_error());
	$row = gendb_fetch_assoc($rows);
	gendb_free_result($rows);
	if($row["folderid"] > 0) {
		$folderID = $row["folderid"];
	}
}

if(isPda()) {
	if($noteID != "") {
		$HTTP_GET_VARS["id"] = $noteID;
		require_once("../notepad/editnote.php");
	} else {
		require_once("../notepad/notepad.php");
	}
} else {
?>
<html>
<head>
<script language="javascript">
showNoteUnloadMsg = false;
function note_onbeforeunload() {
	if(showNoteUnloadMsg) {
		event.returnValue = "This note has been amended - click 'Cancel' then 'Save' if you want to save the changes";
	}
}
</script>
</head>

<?
if($noteID != "") {
?>
<frameset cols="*,200" border="0" frameborder="0" onBeforeUnload="note_onbeforeunload()">
	<frame scrolling="auto" src="editnote.php?folder=<?=$folderID?>&id=<?=$noteID?>" noresize name="notepadMain">
	<frame scrolling="vertical" src="folderSelect.php?nores=1&folder=<?=$folderID?>&type=edit" noresize name="notepadFolders">
</frameset>
<?
} else {
?>
<frameset cols="*,200" border="0" frameborder="0" onBeforeUnload="note_onbeforeunload()">
	<frame scrolling="auto" src="/blank.htm" noresize name="notepadMain">
	<frame scrolling="vertical" src="folders.php" noresize name="notepadFolders">
</frameset>
<?
}
?>
<noframes>
<body>
<h2>The My Web Office system will only function with frame-enabled browsers</h2> {
</body>
</noframes>

</html>
<?
}
?>
Return current item: Silicon Fodder