<?php
$version = "V2.0 Delta";
require "config.php";
require "JSON.php";
require "notes.misc.php";
require "notes.class.note.php";
require "notes.edit.php";
require "notes.select.php";
require "notes.new.php";
require "notes.dispatcher.php";
require "notes.delete.php";
require "notes.tags.php";
require_once ("notes.admin.php");
session_start ();
// Get all used variables from GET/POST values
RequestVariables ();
mysql_connect ($adress, $db_username, $db_pwd);
mysql_select_db ($db_name);
dispatch ();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>My Notebook</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode: "",
plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
auto_resize: true,
//theme_advanced_resizing : true,
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
theme_advanced_toolbar_location : "bottom",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,"
+ "justifyleft,justifycenter,justifyright,justifyfull,formatselect,"
+ "undo,redo,bullist,numlist,outdent,indent,seperator, link,unlink,anchor,image,cleanup,code,separator,sub,sup,charmap",
theme_advanced_buttons2 : ""
+"",
theme_advanced_buttons3 : "",
file_browser_callback : 'tinyBrowser',
height:"200px",
width:"900px"
});
</script>
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
<script src="prototype.js" type="text/javascript"></script>
<script src="notes.main.js" type="text/javascript"></script>
<script src="notes.suggest.js" type="text/javascript"></script>
<script src="notes.contextmenu.js" type="text/javascript"></script>
</head>
<body id="body" onLoad="init()">
<br>
<div class="overlay" id="Overlay" onClick="">
<div style="background-color: #FFDD99; vertical-align: bottom; text-align: center; height: 30px;">
<span id="OverlayMessage" style="vertical-align: middle; text-align: center;">
</span>
<img style="vertical-align: bottom; text-align: center;" src="images/loading.gif" alt="Loading...">
</div>
</div>
<div class="window" id="w_NewNoteBox" style="width: 650px; height: 250px;">
<div class="window-title">Enter new note:</div>
<textarea
cols="80" rows="1" name="Note" class="window-input" id="w_NewNoteText"
style="width: 600px; height: 150px;"></textarea>
<button type="button" class="ButtonLeft"
onClick="javascript: CloseNewNote();">Cancel</button>
<button type="button" class="ButtonRight"
onClick="javascript: submitNewNote()">Insert</button>
<input id="w_NewNoteInput" class="window-input"
style="position: relative; width: 300px; height: 20px;"
type="text">
</div>
<div class="window" id = "RenameTag" style="width: 400px; height:80px;">
<div id="Message" class="window-title">Rename Tag</div>
<br>
New name: <input id="RenameTagInput" class="window-input" style="position: relative: width: 300px; height: 20px;" type="text">
<br>
<br>
<button type="button" class="ButtonLeft" id="RTCancelButton"
onClick="">Cancel</button>
<button type="button" class="ButtonRight" id="RTRenameButton"
onClick="">Rename</button>
</div>
<div class="window" id="_Question" style="width: 400px; height:80px;">
<div id="_Question" class="window-title">Do you really want to delete this tag?</div>
<br><br>
<button type="button" class="ButtonLeft" id="_DTCancelButton" onClick="">Cancel</button>
<button type="button" class="ButtonRight" id="_DTDeleteButton" onClick="">Delete</button>
</div>
<div id="w_DeleteMessageWindow" class="window" style="width: 400px; height: 100px;">
<div id="Message" class="window-title">Ich möchte diesen Teppich nicht kaufen!</div>
<br><br><br>
<button type="button" onClick="CancelMessageWindow();" class="ButtonLeft" id="NoButton">No</button>
<button type="button" onClick="DeleteMessageWindow();" class="ButtonRight" id="YesButton">Yes</button>
</div>
<?php
echo "<div style=\"width: 900; height: 137;\">";
echo "<div class=\"banner\"> <br><br><br><br><br><br>";
echo "<a style=\"position: relative; top: 75; color: #FFFFFF;vertical-align: text-bottom; float: right; font-weight: bold; font-size: 12pt;\" href=\"index.php?Action=Logout\">Logout</a>";
echo "</div>";
echo "<div class=\"spacer\"> ";
echo "</div>";
echo "<div class=\"tags\">";
echo "<span id=\"Tags\">";
echo getTagLinks ();
echo "</span>";
echo "</div>";
echo "<div class=\"spacer\"> </div>";
echo "<div class=\"spacer\" style=\"text-align: left;\"> ";
echo "<a style=\"background-color: #0062A0; text-align: left;\" href=\"javascript: EnterNewNode();\">Create new note</a>";
echo "</div>";
echo "<div style=\"width: 900; background-color: #0062A0; display: block;\">";
echo "<div style=\"text-align: right;\">";
echo "<span class=\"search\">Find: <input class=\"search\" style=\"text-align: left;\" id=\"SearchBox\"type=\"text\" onkeyup=\"UpdateSearch();\"></span>";
echo "</div>";
echo "</div>";
echo "<span id=\"_info\"></span>";
echo "";
echo "<br><br>";
echo "<div class=\"main\" id=\"_notes\">";
$tags = "-" . str_replace (" ", "--", $defaultTags) . "-";
$notes = getNotes (selectNotes ($tags));
foreach ($notes as $note)
{
echo "<div id=\"noteid-" . $note->getId() . "\">";
echo $note->getHTML();
echo "</div>";
}
echo "</div></div><br><br><br>";
?>
<br>
</body>
</html>