Documentation is available at Kopie van menu.php
- <?php
- /*
- Program E related AIML knowledgebase tools
- Copyright 2004, Anne Kootstra [anne@aiml.info]
- http://www.AIML.info
- Program E is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- Program E is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with Program E; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
- require_once "../admin/botloaderfuncs.php";
- require_once "include/common.inc.php";
- require_once "include/retrieve.inc.php";
- require_once "include/menu.inc.php";
- getRequest("pat_id", 0);
- getRequest("word_path", 0);
- getRequest("botid", 0);
- getRequest("pid", 0);
- // routine to create the bot selection list.
- $botnames = getbotnames();
- while(list($key, $val) = each($botnames)) {
- if($botid == $key){
- $bots .= "<option value=\"$key\" selected>$val</option>";
- }else{
- $bots .= "<option value=\"$key\">$val</option>";
- }
- }
- // auto select a previously selected bot.
- if(!$botid) {
- $page['{{bots}}'] = $bots;
- echo useTemplate('botselect',$page);
- return;
- }
- if(!$pat_id) {
- $pat_id = findmainnode($botid);
- }
- if (!$pid) {
- $pid = 1;
- }
- $wordPathTree = processWordPath($botid, $pat_id);
- $word_path = '';
- while(list($key, $val) = each($wordPathTree )) {
- $word_path .= " <a href=\"#\"onClick=\"alterPat_id(".$val['id'].");\">".$val['word']."</a>";
- }
- $word_table['{{botid}}'] = $botid;
- $word_table['{{botname}}'] = getBotName($botid);
- $word_table['{{word_path}}'] = $word_path."<br>" ;
- $word_table['{{pid}}'] = $pid;
- $word_table['{{result_navigation}}'] = PrintNavigation($pat_id, $pid, $botid);
- $word_list = findAllwords($botid, $pat_id, $pid);
- while(list($key, $val) = each($word_list)) {
- $word_table['{{wordtable}}'] .= "<tr>\n <td><a href=\"#\" onClick=\"alterPat_id(".$key.");\">".$val."</a></td>\n</tr>\n";
- }
- echo useTemplate('menu',$word_table);
- ?>
Documentation generated on Tue, 11 Jan 2005 18:41:07 +0100 by phpDocumentor 1.3.0RC3