function show() { if (system::getval(debug)) { echo "<div id='login_debug'>"; } else { echo "<div id='login'>"; } if ($userID = session::get("user")) { // change password if ($_GET[action] == "change") { echo "<form method='get' action='index.php'>"; echo form::field("password", "password", "", "", "", "<i>Neues Passort</i>", "", "newpassword"); echo form::field("submit", "b1", "ändern"); echo form::field("hidden", "action", "changedo"); echo "</form>"; } else { echo "<span class='normal'>Angemeldet: </span><span class='red'>" . user::name($userID) . " </span>"; echo form::link("", " - abmelden ", "index.php?action=logout", "logout"); echo form::link("", " - Passwort ändern ", "index.php?action=change", "change-password"); // if su display admin echo form::link("", " - Administration", "admin.php", "admin"); if ($_SESSION['show']) { echo form::link("", " - Import into <b>" . thesaurus::name($_SESSION['show']) . "</b>", "import.php?id=" . $_SESSION['show'], "import"); } // menu switches action::hyrarchy(); // toggle hyrarchy off / on action::descriptor(); action::visible(); action::tooltips(); // toggle tooltips off / on if (right::write()) { action::edit(); } // show edit function action::listit(); action::debug(); } } else { echo "<span class='normal'>"; echo "<form method='get' action='index.php'>"; echo "<i>Benutzername </i><input type='text' name='user' value='{$user}'>"; echo " <i>Passwort </i><input type='password' name='password'>"; echo " <input type='submit' name='action' value='anmelden'>"; echo "<input type='hidden' name='action' value='login'>"; echo "</form>"; echo "</span>"; } // display javascript status /* echo "<span class='small'>"; if (session::get("JS")) echo "JavaScript aktiv"; else echo "kein Javascript"; echo "</span>";*/ echo "</div>"; }
function edit() { if (right::write()) { if (session::get("edit")) { echo form::link("endedit", "edit", "index.php?action=noedit", "noedit"); } else { echo form::link("edit", "edit", "index.php?action=edit", "edit"); } } }
function comment($id, $name, $error) { echo "<fieldset><legend>Erläuterungen</legend>"; echo "<textarea class='{$error}' name='comment' cols='45' rows='5' "; echo help::show("comment-field", ""); if (right::write()) { echo ">"; } else { echo " readonly>"; } echo $name; echo "</textarea>"; // display legend for comment area if (session::get("legend")) { echo form::link("help-off", "no help", "index.php?action=legendoff", "nolegend"); form::legend(); } else { echo form::link("help-on", "help", "index.php?action=legendon", "nolegend"); } echo "</fieldset>"; }