resourcelinker.php 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047
  1. <?php
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004-2005 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. Copyright (c) Patrick Cool (patrick.cool@ugent.be)
  9. Copyright (c) Denes Nagy
  10. For a full list of contributors, see "credits.txt".
  11. The full license can be read in "license.txt".
  12. This program is free software; you can redistribute it and/or
  13. modify it under the terms of the GNU General Public License
  14. as published by the Free Software Foundation; either version 2
  15. of the License, or (at your option) any later version.
  16. See the GNU General Public License for more details.
  17. Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  18. ==============================================================================
  19. */
  20. /**
  21. ==============================================================================
  22. * @author Patrick Cool, original code
  23. * @author Denes Nagy - many bugfixes and improvements, adjusted for learning path
  24. * @author Roan Embrechts - refactoring, code cleaning
  25. * @package dokeos.resourcelinker
  26. * @todo reorganise code,
  27. * use Database API instead of creating table names locally.
  28. ==============================================================================
  29. */
  30. /*
  31. ==============================================================================
  32. INIT SECTION
  33. ==============================================================================
  34. */
  35. // name of the language file that needs to be included
  36. //$language_file = 'resourcelinker';// TODO: Repeated deleting and moving the rest of this lang file to trad4all
  37. include ('../inc/global.inc.php');
  38. $this_section=SECTION_COURSES;
  39. api_protect_course_script();
  40. /*
  41. -----------------------------------------------------------
  42. Libraries
  43. -----------------------------------------------------------
  44. */
  45. include_once (api_get_path(LIBRARY_PATH)."fileUpload.lib.php");
  46. include ('resourcelinker.inc.php');
  47. /*
  48. -----------------------------------------------------------
  49. Constants and variables
  50. -----------------------------------------------------------
  51. */
  52. $link_table = Database :: get_course_table(TABLE_LINK);
  53. $item_property_table = Database :: get_course_table(TABLE_ITEM_PROPERTY);
  54. $tbl_learnpath_main = Database :: get_course_table(TABLE_LEARNPATH_MAIN);
  55. $tbl_learnpath_chapter = Database :: get_course_table(TABLE_LEARNPATH_CHAPTER);
  56. $tbl_learnpath_item = Database :: get_course_table(TABLE_LEARNPATH_ITEM);
  57. $action = $_REQUEST['action'];
  58. $add = $_REQUEST['add'];
  59. $chapter_id = $_REQUEST['chapter_id'];
  60. $content = $_REQUEST['content'];
  61. // Note by Patrick Cool: this has been solved belowd. This piece of code hacking produced too much errors.
  62. /*
  63. if(empty($content)){
  64. //adds a default to the item-type selection
  65. $content = 'Document';
  66. }
  67. */
  68. $folder = $_REQUEST['folder'];
  69. $id = $_REQUEST['id'];
  70. $learnpath_id = $_REQUEST['learnpath_id'];
  71. $originalresource = $_REQUEST['originalresource'];
  72. $show_resources = $_REQUEST['show_resources'];
  73. $source_forum = $_REQUEST['source_forum'];
  74. $source_id = $_REQUEST['source_id'];
  75. $target = $_REQUEST['target'];
  76. $external_link = $_REQUEST['external_link'];
  77. $from_learnpath = $_SESSION['from_learnpath'];
  78. // this variable controls wether the link to add a chapter in a module or
  79. // another chapter is shown. This allows to create multi-level learnpaths,
  80. // but export features are not ready for this, yet, so use at your own risks
  81. // default : false -> do not display link
  82. // This setting should be moved to the platform configuration page in time...
  83. $multi_level_learnpath = true;
  84. /*
  85. ==============================================================================
  86. MAIN CODE
  87. ==============================================================================
  88. */
  89. if ($from_learnpath == 'yes')
  90. {
  91. //start from clear every time in LearnPath Builder
  92. $_SESSION['addedresource'] = null;
  93. $_SESSION['addedresourceid'] = null;
  94. $_SESSION['addedresourceassigned'] = null;
  95. unset ($_SESSION['addedresource']);
  96. unset ($_SESSION['addedresourceid']);
  97. unset ($_SESSION['addedresourceassigned']);
  98. }
  99. // Process a new chapter?
  100. if (!empty ($_POST['add_chapter']) && !empty ($_POST['title']))
  101. {
  102. $title = $_POST['title'];
  103. $description = '';
  104. if (!empty ($_POST['description']))
  105. {
  106. $description = $_POST['description'];
  107. }
  108. // get max display_order so far in this parent chapter
  109. $sql = "SELECT MAX(display_order) FROM $tbl_learnpath_chapter WHERE learnpath_id = $learnpath_id "." AND parent_chapter_id = $chapter_id";
  110. $res = Database::query($sql);
  111. $row = Database::fetch_array($res);
  112. $max_temp = $row[0];
  113. $sql = "SELECT MAX(display_order) FROM $tbl_learnpath_item WHERE "." chapter_id = $chapter_id";
  114. $res = Database::query($sql);
  115. $row = Database::fetch_array($res);
  116. $max_temp2 = $row[0];
  117. if ($max_temp2 > $max_temp)
  118. {
  119. $order = $max_temp2 +1;
  120. }
  121. else
  122. {
  123. $order = $max_temp +1;
  124. }
  125. $sql = "INSERT INTO $tbl_learnpath_chapter "."(learnpath_id,chapter_name,chapter_description,parent_chapter_id,display_order) "." VALUES "."($learnpath_id, '$title', '$description', $chapter_id, $order )";
  126. $res = Database::query($sql);
  127. if ($res !== false)
  128. {
  129. $title = '';
  130. $description = '';
  131. }
  132. }
  133. // This if when a external link is submitted
  134. if (!empty ($_POST['external_link_submit']))
  135. {
  136. $add = true;
  137. if ($add_2_links != "niet toevoegen")
  138. {
  139. // add external link to the links table.
  140. $pos = strpos($external_link, 'ttp:');
  141. if ($pos == '')
  142. {
  143. $external_link = 'http://'.$external_link;
  144. }
  145. $sql = "INSERT INTO $link_table (url, title, category_id) VALUES ('$external_link','$external_link','$add_2_links')";
  146. $result = Database::query($sql);
  147. $addedresource[] = "Link";
  148. $addedresourceid[] = Database::insert_id();
  149. $_SESSION['addedresource'] = $addedresource;
  150. $_SESSION['addedresourceid'] = $addedresourceid;
  151. }
  152. else
  153. {
  154. // do not add external link to the links table
  155. $addedresource[] = "Externallink";
  156. $addedresourceid[] = $external_link;
  157. $_SESSION['addedresource'] = $addedresource;
  158. $_SESSION['addedresourceid'] = $addedresourceid;
  159. }
  160. }
  161. // loading the session variables into local array
  162. $addedresource = $_SESSION['addedresource'];
  163. $addedresourceid = $_SESSION['addedresourceid'];
  164. // This is when a resource was added to the session
  165. if ($add)
  166. {
  167. // adding the new variable to the local array
  168. if (empty ($_POST['external_link_submit']))
  169. {
  170. //that case is already arranged, see upwards
  171. $addedresource[] = $content;
  172. $addedresourceid[] = $add;
  173. }
  174. $addedresourceassigned[] = 0;
  175. // loading the local array into the session variable
  176. $_SESSION['addedresource'] = $addedresource;
  177. $_SESSION['addedresourceid'] = $addedresourceid;
  178. //---------------------------------------
  179. //we assign to chapters immediately !
  180. //---------------------------------------
  181. $resource_added = false;
  182. if ($from_learnpath == 'yes')
  183. {
  184. $i = 0;
  185. //calculating the last order of the items of this chapter
  186. $sql = "SELECT MAX(display_order) FROM $tbl_learnpath_item WHERE chapter_id=$chapter_id";
  187. $result = Database::query($sql);
  188. if(Database::num_rows($result)==0){
  189. $lastorder_item = 0;
  190. }else{
  191. $row = Database::fetch_array($result);
  192. $lastorder_item = ($row[0]);
  193. }
  194. $sql = "SELECT MAX(display_order) FROM $tbl_learnpath_chapter WHERE parent_chapter_id=$chapter_id";
  195. $result = Database::query($sql);
  196. if(Database::num_rows($result)==0){
  197. $lastorder_chapter = 0;
  198. }else{
  199. $row = Database::fetch_array($result);
  200. $lastorder_chapter = ($row[0]);
  201. }
  202. $lastorder = ($lastorder_chapter>$lastorder_item?$lastorder_chapter+1:$lastorder_item+1);
  203. foreach ($addedresource as $addedresource_item)
  204. {
  205. // in the case we added a chapter, add this into the chapters list with the correct parent_id
  206. if ($addedresource_item == "Chap")
  207. {
  208. $sql = "INSERT INTO $tbl_learnpath_chapter ("."'learnpath_id','chapter_name','chapter_description','parent_chapter_id','display_order'".") VALUES (".$learnpath_id.",'".$learnpath_chapter_name."','".$learnpath_chapter_description."',".$chapter_id.",".$lastorder.")";
  209. Database::query($sql);
  210. }
  211. if (!$addedresourceassigned[$i])
  212. {
  213. //not to assign it twice
  214. if ($addedresource_item == "Ass")
  215. {
  216. $addedresource_item = "Assignments";
  217. }
  218. if ($addedresource_item == "Drop")
  219. {
  220. $addedresource_item = "Dropbox";
  221. }
  222. if ($addedresource_item == "Intro")
  223. {
  224. $addedresource_item = "Introduction_text";
  225. }
  226. if ($addedresource_item == "Course_desc")
  227. {
  228. $addedresource_item = "Course_description";
  229. }
  230. if ($addedresource_item == "Group")
  231. {
  232. $addedresource_item = "Groups";
  233. }
  234. if ($addedresource_item == "User")
  235. {
  236. $addedresource_item = "Users";
  237. }
  238. if ($target == '')
  239. {
  240. $target = '_self';
  241. }
  242. if ($addedresource_item == 'Link')
  243. {
  244. $addedresource_item .= ' '.$target;
  245. }
  246. $sql = "INSERT INTO $tbl_learnpath_item (id, chapter_id, item_type, item_id, display_order) VALUES ( '$autoid', '$chapter_id', '$addedresource_item','$addedresourceid[$i]','".$lastorder."')";
  247. $result = Database::query($sql);
  248. $addedresourceassigned[$i] = 1;
  249. $resource_added = true;
  250. }
  251. $i ++;
  252. $lastorder ++;
  253. }
  254. //$_SESSION['addedresource']=null;
  255. //$_SESSION['addedresourceid']=null;
  256. // cleaning up the session once again
  257. $_SESSION['addedresource'] = null;
  258. $_SESSION['addedresourceid'] = null;
  259. $_SESSION['addedresourceassigned'] = null;
  260. unset ($_SESSION['addedresource']);
  261. unset ($_SESSION['addedresourceid']);
  262. unset ($_SESSION['addedresourceassigned']);
  263. }
  264. }
  265. /*
  266. ==============================================================================
  267. BREADCRUMBS
  268. This part is to allow going back to the tool where you came from
  269. in a previous version I used the table tool_list, but since the forum can access the
  270. resource_linker from two different pages (newtopic.php and editpost.php) and this is different
  271. from the link field in tool_list, I decide to hardcode this stuff here.
  272. By doing this, you can easily control which pages can access the toollinker and which not.
  273. ==============================================================================
  274. */
  275. if ($_GET["source_id"])
  276. {
  277. switch ($_GET["source_id"])
  278. {
  279. case "1" : // coming from Agenda
  280. if ($action == "edit")
  281. {
  282. $url = "../calendar/agenda.php?action=edit&id=49&originalresource=$originalresource";
  283. }
  284. elseif ($action == "add")
  285. {
  286. $url = "../calendar/agenda.php?action=add&originalresource=$originalresource";
  287. }
  288. else
  289. {
  290. $url = "../calendar/agenda.php?action=add";
  291. }
  292. $originaltoolname = get_lang("Agenda");
  293. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  294. session_unregister('from_learnpath');
  295. unset ($from_learnpath);
  296. break;
  297. case "2" : // coming from forum: new topic
  298. $url = "../phpbb/newtopic.php?forum=$source_forum&md5=$md5";
  299. $originaltoolname = get_lang("ForumAddNewTopic");
  300. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  301. session_unregister('from_learnpath');
  302. unset ($from_learnpath);
  303. break;
  304. case "3" : // coming from forum: edit topic
  305. $url = "../phpbb/editpost.php?post_id=$post_id&topic=$topic&forum=$forum&md5=$md5&originalresource=no";
  306. $originaltoolname = get_lang("ForumEditTopic");
  307. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  308. session_unregister('from_learnpath');
  309. unset ($from_learnpath);
  310. break;
  311. case "4" : // coming from exercises: edit topic
  312. $url = "../exercice/admin.php?modifyAnswers=$modifyAnswers";
  313. $originaltoolname = get_lang("ExerciseAnswers");
  314. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  315. session_unregister('from_learnpath');
  316. unset ($from_learnpath);
  317. break;
  318. case "5" : // coming from learning path
  319. $from_learnpath = 'yes';
  320. api_session_register('from_learnpath');
  321. break;
  322. case "6" : // coming from forum: reply
  323. $url = "../phpbb/reply.php?topic=$topic&forum=$forum&parentid=$parentid";
  324. $url = $_SESSION['origintoolurl'];
  325. $originaltoolname = get_lang("ForumReply");
  326. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  327. session_unregister('from_learnpath');
  328. unset ($from_learnpath);
  329. break;
  330. /*************************************** add Frederik.Vermeire@pandora.be *************************************/
  331. case "7" : // coming from Ad_Valvas
  332. if ($action == "edit")
  333. {
  334. $url = "../announcements/announcements.php?action=edit&id=49&originalresource=$originalresource";
  335. }
  336. elseif ($action == "add")
  337. {
  338. $url = "../announcements/announcements.php?action=add&originalresource=$originalresource";
  339. }
  340. else
  341. {
  342. $url = "../announcements/announcements.php?action=add";
  343. }
  344. $originaltoolname = get_lang("AdValvas");
  345. $breadcrumbelement = array ("url" => $url, "name" => $originaltoolname);
  346. session_unregister('from_learnpath');
  347. unset ($from_learnpath);
  348. break;
  349. /*************************************** end add Frederik.Vermeire@pandora.be *********************************/
  350. }
  351. // We do not come from the learning path. We store the name of the tool & url in a session.
  352. if ($from_learnpath != 'yes')
  353. {
  354. if (!$_SESSION["origintoolurl"] OR $_SESSION["origintoolurl"]<>$interbreadcrumb["url"])
  355. {
  356. $_SESSION["origintoolurl"] = $breadcrumbelement["url"];
  357. $_SESSION["origintoolname"] = $breadcrumbelement["name"];
  358. $interbreadcrumb = "";
  359. }
  360. }
  361. }
  362. // This part of the code is the actual breadcrumb mechanism. If we do not come from the learning path we use
  363. // the information from the session. Else we use the information of the learningpath itself.
  364. if ($from_learnpath != 'yes')
  365. {
  366. $nameTools = get_lang('AddResource');
  367. $interbreadcrumb[] = array ("url" => $_SESSION["origintoolurl"], "name" => $_SESSION["origintoolname"]);
  368. }
  369. else
  370. {
  371. $learnpath_select_query = " SELECT * FROM $tbl_learnpath_main
  372. WHERE learnpath_id=$learnpath_id";
  373. $sql_result = Database::query($learnpath_select_query);
  374. $therow = Database::fetch_array($sql_result);
  375. $learnpath_chapter_query = " SELECT * FROM $tbl_learnpath_chapter
  376. WHERE (learnpath_id = '$learnpath_id' and id = '$chapter_id')";
  377. $sql_result = Database::query($learnpath_chapter_query);
  378. $therow2 = Database::fetch_array($sql_result);
  379. $from_learnpath = 'yes';
  380. session_register('from_learnpath');
  381. $interbreadcrumb[] = array ("url" => "../scorm/scormdocument.php", "name" => get_lang('LearningPath'));
  382. $interbreadcrumb[] = array ("url" => "../learnpath/learnpath_handler.php?learnpath_id=$learnpath_id", "name" => "{$therow['learnpath_name']}");
  383. $interbreadcrumb[] = array ("url" => api_get_self()."?action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no", "name" => "{$therow2['chapter_name']}");
  384. }
  385. $htmlHeadXtra[] = '<script type="text/javascript">
  386. /* <![CDATA[ */
  387. function targetfunc(input)
  388. {
  389. window.location=window.location+"&amp;target="+document.learnpath_link.target.value;
  390. }
  391. /* ]]> */
  392. </script>';
  393. Display :: display_header($nameTools);
  394. echo "<h3>".$nameTools;
  395. if ($from_learnpath == 'yes')
  396. {
  397. echo get_lang("AddResource")." - {$therow2['chapter_name']}";
  398. }
  399. echo "</h3>";
  400. // we retrieve the tools that are active.
  401. // We use this to check which resources a student may add (only the modules that are active)
  402. // see http://www.dokeos.com/forum/viewtopic.php?t=4858
  403. $active_modules=array();
  404. $tool_table = Database::get_course_table(TABLE_TOOL_LIST);
  405. $sql_select_active="SELECT * FROM $tool_table WHERE visibility='1'";
  406. $result_select_active=Database::query($sql_select_active);
  407. while ($row=Database::fetch_array($result_select_active))
  408. {
  409. $active_modules[]=$row['name'];
  410. }
  411. ?>
  412. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  413. <tr>
  414. <td width="300" valign="top" style='padding-right:15px;'>
  415. <table width="300" border="0" cellspacing="0" cellpadding="0" style='border-right:1px solid grey;'>
  416. <?php if ($from_learnpath != 'yes') { ?>
  417. <tr>
  418. <td width="26%"><b><?php echo get_lang('CourseResources'); ?></b></td>
  419. </tr>
  420. <?php
  421. if (is_allowed_to_edit() OR in_array(TOOL_DOCUMENT,$active_modules))
  422. {
  423. ?>
  424. <tr>
  425. <td><?php echo "<a href=\"".api_get_self()."?content=Document&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Document')."</a>"; ?></td>
  426. </tr>
  427. <?php
  428. }
  429. if (is_allowed_to_edit() OR in_array(TOOL_CALENDAR_EVENT,$active_modules))
  430. {
  431. ?>
  432. <tr>
  433. <td><?php echo "<a href=\"".api_get_self()."?content=Agenda&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Agenda')."</a>"; ?></td>
  434. </tr>
  435. <?php
  436. }
  437. if (is_allowed_to_edit() OR in_array(TOOL_ANNOUNCEMENT,$active_modules))
  438. {
  439. ?>
  440. <tr>
  441. <td><?php echo "<a href=\"".api_get_self()."?content=Ad_Valvas&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('AdValvas')."</a>"; ?></td>
  442. </tr>
  443. <?php
  444. }
  445. if (is_allowed_to_edit() OR in_array(TOOL_BB_FORUM,$active_modules))
  446. {
  447. ?>
  448. <tr>
  449. <td><?php echo "<a href=\"".api_get_self()."?content=Forum&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Forum')."</a>"; ?></td>
  450. </tr>
  451. <?php
  452. }
  453. if (is_allowed_to_edit() OR in_array(TOOL_LINK,$active_modules))
  454. {
  455. ?>
  456. <tr>
  457. <td><?php echo "<a href=\"".api_get_self()."?content=Link&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Link')."</a>"; ?></td>
  458. </tr>
  459. <?php
  460. }
  461. if (is_allowed_to_edit() OR in_array(TOOL_QUIZ,$active_modules))
  462. {
  463. ?>
  464. <tr>
  465. <td><?php echo "<a href=\"".api_get_self()."?content=Exercise&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Exercise')."</a>"; ?></td>
  466. </tr>
  467. <?php
  468. }
  469. }
  470. else
  471. {
  472. ?>
  473. <tr>
  474. <td width="26%"><b><?php echo get_lang('ExportableCourseResources'); ?></b></td>
  475. </tr>
  476. <?php if ($multi_level_learnpath === true ) { ?>
  477. <tr>
  478. <td><?php echo "<a href=\"".api_get_self()."?content=chapter&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Chapter')."</a>"; ?></td>
  479. </tr>
  480. <?php } ?>
  481. <tr>
  482. <td><?php echo "<a href=\"".api_get_self()."?content=Document&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Document')."</a>"; ?></td>
  483. </tr>
  484. <tr>
  485. <td><?php echo "<a href=\"".api_get_self()."?content=Exercise&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Exercise')."</a>"; ?></td>
  486. </tr>
  487. <tr>
  488. <td><?php echo "<a href=\"".api_get_self()."?content=Link&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Link')."</a>"; ?></td>
  489. </tr>
  490. <tr>
  491. <td><?php echo "<a href=\"".api_get_self()."?content=Forum&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Forum')."</a>"; ?></td>
  492. </tr>
  493. <tr>
  494. <td><?php echo "<a href=\"".api_get_self()."?content=Agenda&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Agenda')."</a>"; ?></td>
  495. </tr>
  496. <tr>
  497. <td><?php echo "<a href=\"".api_get_self()."?content=Ad_Valvas&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('AdValvas')."</a>"; ?></td>
  498. </tr>
  499. <tr>
  500. <td><?php echo "<a href=\"".api_get_self()."?content=Course_description&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('CourseDescription')."</a>"; ?></td>
  501. </tr>
  502. <tr>
  503. <td><?php echo "<a href=\"".api_get_self()."?content=Introduction_text&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('IntroductionText')."</a>"; ?></td>
  504. </tr>
  505. <tr>
  506. <td>&nbsp;</td>
  507. </tr>
  508. <tr>
  509. <td width="26%"><b><?php echo get_lang('DokeosRelatedCourseMaterial'); ?></b></td>
  510. </tr>
  511. <tr>
  512. <td><?php echo "<a href=\"".api_get_self()."?content=Dropbox&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Dropbox')."</a>"; ?></td>
  513. </tr>
  514. <tr>
  515. <td><?php echo "<a href=\"".api_get_self()."?content=Assignment&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Assignments')."</a>"; ?></td>
  516. </tr>
  517. <tr>
  518. <td><?php echo "<a href=\"".api_get_self()."?content=Groups&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Groups')."</a>"; ?></td>
  519. </tr>
  520. <tr>
  521. <td><?php echo "<a href=\"".api_get_self()."?content=Users&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('Users')."</a>"; ?></td>
  522. </tr>
  523. <?php
  524. }
  525. ?>
  526. <tr>
  527. <td>&nbsp;</td>
  528. </tr>
  529. <tr>
  530. <td><b><?php echo get_lang("ExternalResources"); ?></b></td>
  531. </tr>
  532. <tr>
  533. <td><?php echo "<a href=\"".api_get_self()."?content=Externallink&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('ExternalLink')."</a>"; ?></td>
  534. </tr>
  535. <?php
  536. if ($from_learnpath != 'yes')
  537. {
  538. echo "<tr><td>&nbsp;</td></tr>";
  539. echo "<tr><td><b>".get_lang('ResourcesAdded')." (";
  540. echo count($addedresource);
  541. echo ")</b></td></tr>";
  542. echo "<tr><td nowrap><a href=\"".api_get_self()."?showresources=true&action=$action&id=$id&learnpath_id=$learnpath_id&chapter_id=$chapter_id&source_forum=$source_forum&originalresource=no\">".get_lang('ShowDelete')."</a>";
  543. echo "</td></tr>";
  544. }
  545. ?>
  546. <tr>
  547. <td>&nbsp;</td>
  548. </tr>
  549. <!--<tr>
  550. <td><b><?php echo get_lang('BackTo'); ?></b></td>
  551. </tr>//-->
  552. <tr>
  553. <td>
  554. <?php
  555. if ($from_learnpath != 'yes')
  556. {
  557. echo "<form method=\"post\" action=\"{$_SESSION['origintoolurl']}\" style=\"margin: 0px;\"><input type=\"submit\" value=\"".get_lang('Ok')."\"></form>";
  558. }
  559. else
  560. {
  561. echo "<form method=\"get\" action=\"../learnpath/learnpath_handler.php\" style=\"margin: 0px;\"><input type=\"hidden\" name=\"learnpath_id\" value=\"".htmlentities($learnpath_id)."\"><input type=\"submit\" value=\"".' '.get_lang('Ok').' '."\"></form>";
  562. }
  563. ?>
  564. </td>
  565. </tr>
  566. <tr>
  567. <td>&nbsp;</td>
  568. </tr>
  569. </table>
  570. </td>
  571. <td valign="top">
  572. <?php
  573. if ($resource_added)
  574. {
  575. Display :: display_normal_message(get_lang("ResourceAdded"));
  576. }
  577. if ($from_learnpath != 'yes')
  578. {
  579. echo count($addedresource)." ".api_strtolower(get_lang('ResourcesAdded'))."<br/>";
  580. }
  581. //echo "<hr>";
  582. // Agenda items -->
  583. if ($content == "Agenda")
  584. {
  585. $TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);
  586. $TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
  587. $sql="SELECT agenda.*, toolitemproperties.*
  588. FROM ".$TABLEAGENDA." agenda, ".$TABLE_ITEM_PROPERTY." toolitemproperties
  589. WHERE `agenda`.`id` = `toolitemproperties`.`ref`
  590. AND `toolitemproperties`.`tool`='".TOOL_CALENDAR_EVENT."'
  591. AND `toolitemproperties`.`to_group_id`='0'
  592. AND `toolitemproperties`.`visibility`='1'";
  593. $result = Database::query($sql);
  594. while ($myrow = Database::fetch_array($result))
  595. {
  596. echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\">";
  597. echo "<img src='../img/agenda.gif' alt='agenda'>";
  598. echo api_convert_and_format_date($myrow["start_date"], null, date_default_timezone_get())."<br />";
  599. echo "<b>".$myrow["title"]."</b></td></tr><tr><td>";
  600. echo $myrow["content"]."<br />";
  601. showorhide_addresourcelink($content, $myrow["id"]);
  602. echo "</td></tr></table><br />";
  603. }
  604. } // end if ($_GET["resource"]=="Agenda")
  605. /*
  606. -----------------------------------------------------------
  607. chapter
  608. -----------------------------------------------------------
  609. */
  610. if ($content == "chapter")
  611. {
  612. echo '<table><form name="add_chapter" action="'.'" method="POST">'."\n";
  613. echo ' <tr><td>'.get_lang('Title').'</td><td><input type="text" name="title" value="'.$title.'"></input></td></tr>'."\n";
  614. echo ' <tr><td>'.get_lang('Description').'</td><td><input type="text" name="description" value="'.$description.'"></input></td></tr>'."\n";
  615. echo ' <tr><td></td><td><input type="submit" name="add_chapter" value="'.get_lang('AddIt').'"/></td></tr>'."\n";
  616. echo '</form></table>'."\n";
  617. //echo "<hr>";
  618. }
  619. /*
  620. -----------------------------------------------------------
  621. Documents
  622. -----------------------------------------------------------
  623. */
  624. // We show the documents in the following cases
  625. // 1. the link to add documenets in the resource linker was clicked
  626. // 2. we come to the resource linker for the first time (documents = default). In this case it can only be shown if
  627. // a. one is a teacher (documents can be shown even if the tool is inactive)
  628. // b. one is a student AND the documents tool is active. Student cannot add documents if the documents tool is inactive (teacher can do this)
  629. if ($content == "Document" OR (empty($content) AND (is_allowed_to_edit() OR in_array(TOOL_DOCUMENT,$active_modules))) AND !$_GET['showresources'])
  630. {
  631. // setting variables for file locations
  632. $baseServDir = $_configuration['root_sys'];
  633. $courseDir = $_course['path']."/document";
  634. $baseWorkDir = $baseServDir.$courseDir;
  635. // showing the link to move one folder up (when not in the root folder)
  636. show_folder_up();
  637. // showing the blue bar with the path in it when we are not in the root
  638. if (get_levels($folder))
  639. {
  640. echo "<table width=\"100%\"><tr><td bgcolor=\"#4171B5\">";
  641. echo "<img src=\"../img/opendir.gif\" alt='directory'><font color=\"#ffffff\"><b>";
  642. echo $folder."</b></font></td></tr></table>";
  643. }
  644. // showing the documents and subfolders of the folder we are in.
  645. show_documents($folder);
  646. //echo "<hr>";
  647. }
  648. /*
  649. -----------------------------------------------------------
  650. Ad Valvas
  651. -----------------------------------------------------------
  652. */
  653. if ($content == "Ad_Valvas")
  654. {
  655. $tbl_announcement = Database :: get_course_table(TABLE_ANNOUNCEMENT);
  656. $sql = "SELECT * FROM ".$tbl_announcement." a, ".$item_property_table." i WHERE i.tool = '".TOOL_ANNOUNCEMENT."' AND a.id=i.ref AND i.visibility='1' AND i.to_group_id = 0 AND i.to_user_id IS NULL ORDER BY a.display_order ASC";
  657. $result = Database::query($sql);
  658. while ($myrow = Database::fetch_array($result))
  659. {
  660. echo "<table width=\"100%\"><tr><td>";
  661. echo "<img src='../img/valves.gif' alt='advalvas'>";
  662. echo api_convert_and_format_date($myrow["end_date"], DATE_FORMAT_LONG, date_default_timezone_get());
  663. echo "</td></tr><tr><td>";
  664. echo $myrow["title"]."<br />";
  665. showorhide_addresourcelink($content, $myrow["id"]);
  666. echo "</td></tr></table>";
  667. }
  668. }
  669. /*
  670. -----------------------------------------------------------
  671. Forums
  672. -----------------------------------------------------------
  673. */
  674. if ($content == "Forum")
  675. {
  676. $TBL_FORUMS = Database::get_course_table(TABLE_FORUM);
  677. $TBL_CATAGORIES = Database::get_course_table(TABLE_FORUM_CATEGORY);
  678. $TBL_FORUMTOPICS = Database::get_course_table(TABLE_FORUM_POST);
  679. $tbl_posts = Database::get_course_table(TABLE_FORUM_POST);
  680. $tbl_posts_text = Database::get_course_table(TOOL_FORUM_POST_TEXT_TABLE);
  681. echo "<table width='100%'>";
  682. // displaying the categories and the forums
  683. if (!$forum and !$thread)
  684. {
  685. $sql = "SELECT * FROM ".$TBL_FORUMS." forums, ".$TBL_CATAGORIES." categories WHERE forums.cat_id=categories.cat_id ORDER BY forums.cat_id DESC";
  686. $result = Database::query($sql);
  687. while ($myrow = Database::fetch_array($result))
  688. {
  689. if ($myrow["cat_title"] !== $old_cat_title)
  690. {
  691. echo "<tr><td bgcolor='#4171B5' colspan='2'><font color='white'><b>".$myrow["cat_title"]."</b></font></td></tr>";
  692. }
  693. $old_cat_title = $myrow["cat_title"];
  694. echo "<tr><td><img src='../img/forum.gif'><a href='".api_get_self()."?content=Forum&category=".$myrow["cat_id"]."&forum=".$myrow["forum_id"]."&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".$myrow["forum_name"]."</td><td>";
  695. showorhide_addresourcelink("Forum", $myrow["forum_id"]);
  696. echo "</td></tr>";
  697. }
  698. }
  699. //displaying all the threads of one forum
  700. if ($forum)
  701. {
  702. // displaying the category title
  703. $sql = "SELECT * FROM ".$TBL_CATAGORIES." WHERE cat_id=$category";
  704. $result = Database::query($sql);
  705. $myrow = Database::fetch_array($result);
  706. echo "<tr><td bgcolor='#4171B5' colspan='2'><font color='white'><b>".$myrow["cat_title"]."</b></font></td></tr>";
  707. // displaying the forum title
  708. $sql = "SELECT * FROM ".$TBL_FORUMS." forums, ".$TBL_FORUMTOPICS." topics WHERE forums.forum_id=topics.forum_id";
  709. $result = Database::query($sql);
  710. $myrow = Database::fetch_array($result);
  711. echo "<tr><td bgcolor='#cccccc' colspan='2'><b>".$myrow["forum_name"]."</b></td></tr>";
  712. if (!$thread)
  713. {
  714. // displaying all the threads of this forum
  715. $sql = "SELECT * FROM ".$TBL_FORUMTOPICS." WHERE forum_id=$forum";
  716. $result = Database::query($sql);
  717. while ($myrow = Database::fetch_array($result))
  718. {
  719. echo "<tr><td><a href='".api_get_self()."?content=Forum&category=$category&forum=1&thread=".$myrow["topic_id"]."&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".$myrow["topic_title"]."</a> (".$myrow["prenom"]." ".$myrow["nom"].")</td><td>";
  720. showorhide_addresourcelink("Thread", $myrow["topic_id"]);
  721. echo "</td></tr>";
  722. }
  723. }
  724. else
  725. {
  726. // displaying all the replies
  727. $sql = "SELECT * FROM ".$tbl_posts." post, ".$tbl_posts_text." post_text WHERE post_text.post_id=post.post_id and post.topic_id=$thread ORDER BY post_text.post_id ASC";
  728. $result = Database::query($sql);
  729. while ($myrow = Database::fetch_array($result))
  730. {
  731. echo "<tr><td><b>".$myrow["post_title"]."</b><br>";
  732. echo $myrow["post_text"]."</td>";
  733. echo "<td>";
  734. showorhide_addresourcelink("Post", $myrow["post_id"]);
  735. echo "</td></tr><tr><td colspan='2'><hr noshade></td></tr>";
  736. }
  737. }
  738. }
  739. echo "</table>";
  740. }
  741. /*
  742. -----------------------------------------------------------
  743. Links
  744. -----------------------------------------------------------
  745. */
  746. if ($content == "Link")
  747. {
  748. // including the links language file
  749. include ("../lang/$language/link.inc.php");
  750. // including the links functions file
  751. include ("../link/linkfunctions.php");
  752. $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);
  753. if (($learnpath_id != '') and ($content == 'Link'))
  754. {
  755. echo "<form name='learnpath_link'><table>";
  756. echo "<tr></td><td align='left'>".get_lang('LinkTarget')." :</td><td align='left'><select name='target' onchange='targetfunc()'><option value='_self' ";
  757. if ($target == '_self')
  758. {
  759. echo "selected";
  760. }
  761. echo ">".get_lang('SameWindow')."</option><option value='_blank'";
  762. if ($target == '_blank')
  763. {
  764. echo "selected";
  765. }
  766. echo ">".get_lang('NewWindow')."</option></select></td></tr></table></form>";
  767. }
  768. // showing the links that are in the root (having no category)
  769. $sql = "SELECT * FROM ".$link_table." l, ".$item_property_table." ip WHERE (l.category_id=0 or l.category_id IS NULL) AND ip.tool = '".TOOL_LINK."' AND l.id=ip.ref AND ip.visibility='1'";
  770. $result = Database::query($sql);
  771. if (Database::num_rows($result) > 0)
  772. {
  773. echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".get_lang('NoCategory')."</i></td></tr></table>";
  774. while ($myrow = Database::fetch_array($result))
  775. {
  776. echo "<img src='../img/links.gif'>".$myrow["title"];
  777. echo "<br>";
  778. showorhide_addresourcelink($content, $myrow["id"]);
  779. echo "<br><br>";
  780. }
  781. }
  782. // showing the categories and the links in it.
  783. $sqlcategories = "SELECT * FROM ".$tbl_categories." ORDER by display_order DESC";
  784. $resultcategories = Database::query($sqlcategories) or die;
  785. while ($myrow = @ Database::fetch_array($resultcategories))
  786. {
  787. $sql_links = "SELECT * FROM ".$link_table." l, ".$item_property_table." ip WHERE l.category_id='".$myrow["id"]."' AND ip.tool = '".TOOL_LINK."' AND l.id=ip.ref AND ip.visibility='1' ORDER BY l.display_order DESC";
  788. echo "<table width=\"100%\"><tr><td bgcolor=\"#E6E6E6\"><i>".$myrow["category_title"]."</i></td></tr></table>";
  789. $result_links = Database::query($sql_links);
  790. while ($myrow = Database::fetch_array($result_links))
  791. {
  792. echo "<img src='../img/links.gif' />".$myrow["title"];
  793. echo "<br>";
  794. showorhide_addresourcelink($content, $myrow["id"]);
  795. echo "<br><br>";
  796. }
  797. }
  798. }
  799. /*
  800. -----------------------------------------------------------
  801. Exercise
  802. -----------------------------------------------------------
  803. */
  804. if (($content == "Exercise") or ($content == "HotPotatoes"))
  805. {
  806. $TBL_EXERCICES = Database::get_course_table(TABLE_QUIZ_TEST);
  807. $result = Database::query("SELECT * FROM ".$TBL_EXERCICES." WHERE active='1' ORDER BY id ASC");
  808. while ($myrow = Database::fetch_array($result))
  809. {
  810. echo "<img src='../img/quiz.gif'>".$myrow["title"]."<br>";
  811. showorhide_addresourcelink($content, $myrow["id"]);
  812. echo "<br><br>";
  813. }
  814. if ($from_learnpath == 'yes')
  815. {
  816. $uploadPath = "/HotPotatoes_files";
  817. $TBL_DOCUMENT = Database::get_course_table(TABLE_DOCUMENT);
  818. $documentPath = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document';
  819. $sql = "SELECT * FROM ".$TBL_DOCUMENT." WHERE (path LIKE '%htm%' OR path LIKE '%html%') AND path LIKE '".$uploadPath."/%/%' ORDER BY `id` ASC";
  820. $result = Database::query($sql);
  821. while ($myrow = Database::fetch_array($result))
  822. {
  823. $path = $myrow["path"];
  824. echo "<img src='../img/jqz.gif'>".GetQuizName($path, $documentPath)."<br>";
  825. showorhide_addresourcelink("HotPotatoes", $myrow["id"]);
  826. echo "<br><br>";
  827. }
  828. }
  829. }
  830. /*
  831. -----------------------------------------------------------
  832. External Links
  833. -----------------------------------------------------------
  834. */
  835. if ($content == "Externallink")
  836. {
  837. ?>
  838. <form name="form1" method="post" action="">
  839. <table width="80%" border="0" cellspacing="0" cellpadding="0">
  840. <tr>
  841. <td align="right"><?php echo get_lang('ExternalLink'); ?> : &nbsp;</td>
  842. <td align="left"><input name="external_link" type="text" id="external_link" value="http://"></td>
  843. <?php
  844. if ($learnpath_id != '')
  845. {
  846. echo "</tr><tr><td align='right'>".get_lang('LinkTarget')." :</td><td align='left'><select name='target'><option value='_self'>".get_lang('SameWindow')."</option><option value='_blank'>".get_lang('NewWindow')."</option></select></td>";
  847. }
  848. ?>
  849. </tr>
  850. <tr>
  851. <td><?php if ($is_allowedToEdit) {echo get_lang('AddToLinks');} ?></td>
  852. <td>
  853. <?php if ($is_allowedToEdit){?>
  854. <select name="add_2_links" id="add_2_links">
  855. <option value="niet toevoegen" selected="selected">-<?php echo get_lang('DontAdd'); ?>-</option>
  856. <option value="0"><?php echo get_lang('MainCategory'); ?></option>
  857. <?php
  858. $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);
  859. $sql = "SELECT * FROM `$tbl_categories` ORDER BY display_order ASC";
  860. echo $sql;
  861. $result = Database::query($sql);
  862. while ($row = Database::fetch_array($result))
  863. {
  864. echo "<option value='".$row["id"]."'>".$row["category_title"]."</option>";
  865. }
  866. ?>
  867. </select><?php } ?></td>
  868. </tr>
  869. <tr>
  870. <td>&nbsp;</td>
  871. <td><input name="external_link_submit" type="submit" id="external_link_submit" value="<?php echo get_lang('AddIt'); ?>"></td>
  872. </tr>
  873. <tr>
  874. <td>&nbsp;</td>
  875. <td>&nbsp;</td>
  876. </tr>
  877. <tr>
  878. <td colspan="2">&nbsp;</td>
  879. </tr>
  880. </table>
  881. </form>
  882. <?php
  883. }
  884. /*
  885. -----------------------------------------------------------
  886. Assignments
  887. -----------------------------------------------------------
  888. */
  889. if ($content == "Assignment")
  890. {
  891. echo "<a href=".api_get_self()."?content=Ass&add=Ass&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no>".get_lang('AddAssignmentPage')."</a>";
  892. }
  893. /*
  894. -----------------------------------------------------------
  895. Dropbox
  896. -----------------------------------------------------------
  897. */
  898. if ($content == "Dropbox")
  899. {
  900. echo "<a href='".api_get_self()."?content=Drop&add=Drop&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".get_lang('DropboxAdd')."</a>";
  901. }
  902. /*
  903. -----------------------------------------------------------
  904. Introduction text
  905. -----------------------------------------------------------
  906. */
  907. if ($content == "Introduction_text")
  908. {
  909. echo "<a href='".api_get_self()."?content=Intro&add=Intro&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".get_lang('IntroductionTextAdd')."</a>";
  910. }
  911. /*
  912. -----------------------------------------------------------
  913. Course description
  914. -----------------------------------------------------------
  915. */
  916. if ($content == "Course_description")
  917. {
  918. echo "<a href='".api_get_self()."?content=Course_desc&add=Course_desc&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".get_lang('CourseDescriptionAdd')."</a>";
  919. }
  920. /*
  921. -----------------------------------------------------------
  922. Groups
  923. -----------------------------------------------------------
  924. */
  925. if ($content == "Groups")
  926. {
  927. echo "<a href='".api_get_self()."?content=Group&add=Group&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".get_lang('$GroupsAdd')."</a>";
  928. }
  929. /*
  930. -----------------------------------------------------------
  931. Users
  932. -----------------------------------------------------------
  933. */
  934. if ($content == "Users")
  935. {
  936. echo "<a href='".api_get_self()."?content=User&add=User&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no'>".get_lang('UsersAdd')."</a>";
  937. }
  938. if ($showresources)
  939. {
  940. //echo "<h4>".get_lang('ResourceAdded')."</h4>";
  941. display_resources(1);
  942. }
  943. echo "</td></tr></table>";
  944. /*
  945. ==============================================================================
  946. FOOTER
  947. ==============================================================================
  948. */
  949. Display :: display_footer();
  950. ?>