Source for file Kopie van menu.php

Documentation is available at Kopie van menu.php

  1. <?php
  2.  
  3. /*
  4. Program E related AIML knowledgebase tools
  5. Copyright 2004, Anne Kootstra [anne@aiml.info]
  6. http://www.AIML.info
  7. Program E is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. Program E is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Program E; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21.  
  22. require_once "../admin/botloaderfuncs.php";
  23. require_once "include/common.inc.php";
  24. require_once "include/retrieve.inc.php";
  25. require_once "include/menu.inc.php";
  26.  
  27. getRequest("pat_id", 0);
  28. getRequest("word_path", 0);
  29. getRequest("botid", 0);
  30. getRequest("pid", 0);
  31.  
  32.  
  33.  
  34. // routine to create the bot selection list.
  35. $botnames = getbotnames();
  36.  
  37. while(list($key, $val) = each($botnames)) {
  38. if($botid == $key){
  39. $bots .= "<option value=\"$key\" selected>$val</option>";
  40. }else{
  41. $bots .= "<option value=\"$key\">$val</option>";
  42. }
  43. }
  44.  
  45.  
  46. // auto select a previously selected bot.
  47. if(!$botid) {
  48.  
  49. $page['{{bots}}'] = $bots;
  50. echo useTemplate('botselect',$page);
  51.  
  52. return;
  53.  
  54. }
  55.  
  56.  
  57. if(!$pat_id) {
  58. $pat_id = findmainnode($botid);
  59. }
  60.  
  61. if (!$pid) {
  62. $pid = 1;
  63. }
  64.  
  65. $wordPathTree = processWordPath($botid, $pat_id);
  66. $word_path = '';
  67.  
  68. while(list($key, $val) = each($wordPathTree )) {
  69.  
  70. $word_path .= " <a href=\"#\"onClick=\"alterPat_id(".$val['id'].");\">".$val['word']."</a>";
  71.  
  72. }
  73.  
  74.  
  75. $word_table['{{botid}}'] = $botid;
  76. $word_table['{{botname}}'] = getBotName($botid);
  77. $word_table['{{word_path}}'] = $word_path."<br>" ;
  78. $word_table['{{pid}}'] = $pid;
  79. $word_table['{{result_navigation}}'] = PrintNavigation($pat_id, $pid, $botid);
  80.  
  81. $word_list = findAllwords($botid, $pat_id, $pid);
  82.  
  83. while(list($key, $val) = each($word_list)) {
  84.  
  85. $word_table['{{wordtable}}'] .= "<tr>\n <td><a href=\"#\" onClick=\"alterPat_id(".$key.");\">".$val."</a></td>\n</tr>\n";
  86.  
  87. }
  88. echo useTemplate('menu',$word_table);
  89. ?>

Documentation generated on Tue, 11 Jan 2005 18:41:07 +0100 by phpDocumentor 1.3.0RC3