• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

note_new.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00033 require_once "./include/inc.header.php";
00034 require_once "./classes/class.ilObjNote.php";
00035 require_once "./classes/class.ilObjNoteFolder.php";
00036 
00037 $myNote = new ilObjNote($_GET["id"], false);
00038 $myNoteFolder = new ilObjNoteFolder($ilias->account->getId());
00039 
00040 if ($_GET["cmd"] == "edit")
00041 {
00042         $myNotes = $myNoteFolder->viewNote($_GET["id"]);
00043 
00044         $tpl->setVariable("LOTITLE", $myNote->getTitle());
00045         $tpl->setVariable("NOTETEXT", $myNotes->text);
00046         $tpl->setVariable("LOID", $myNotes->lo_id);
00047         if($myNotes->important =='y') $tpl->setVariable("IMPORTANT_CHECKED", "checked");
00048         if($myNotes->good =='y') $tpl->setVariable("GOOD_CHECKED", "checked");
00049         if($myNotes->bad =='y') $tpl->setVariable("BAD_CHECKED", "checked");
00050         if($myNotes->question =='y') $tpl->setVariable("QUESTION_CHECKED", "checked");
00051         $tpl->setVariable("FORMACTION", "notes.php?cmd=update&amp;id=".$_GET["id"]);
00052 }
00053 else
00054         $tpl->setVariable("FORMACTION", "notes.php?cmd=save");
00055 
00056 
00057 $tpl->addBlockFile("CONTENT", "content", "tpl.note_new.html");
00058 $tpl->addBlockFile("BUTTONS", "buttons", "tpl.buttons.html");
00059 
00060         $tpl->setCurrentBlock("btn_row");
00061 $tpl->parseCurrentBlock();
00062 $tpl->setVariable("TXT_LOID", "Learning Object ID");
00063 $tpl->setVariable("TXT_LOTITLE", "Learning Object Title");
00064 $tpl->setVariable("TXT_NOTETEXT", "Notiztext");
00065 $tpl->setVariable("TXT_SAVE", $lng->txt("save"));
00066 
00067 $tpl->parseCurrentBlock();
00068 
00069 $tpl->show();
00070 
00071 ?>

Generated on Fri Dec 13 2013 09:06:37 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1