2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
15 if (!defined('AT_INCLUDE_PATH')) { exit; }
20 <div class="row"><?php
21 if ($num_terms == 0) {
22 echo _AT('no_terms_found');
25 $num_glossary = count($glossary_ids);
27 for ($i=0; $i<$num_terms; $i++) {
28 for ($j=0;$j<$i;$j++) {
29 if ($strtolower($word[$j]) == $strtolower($word[$i])) {
30 /* skip multiple occurances of the same word: */
35 ?><table cellspacing="1" cellpadding="0" border="0" class="bodyline" summary="" align="center">
37 <td align="right" class="row1"><strong><?php
38 $key = in_array_cin($word[$i], $glossary_ids);
41 echo '<strong>'._AT('new').'</strong> ';
42 $current_word = $word[$i];
43 $current_defn = $_POST['glossary_defs'][$word[$i]];
45 $current_word = $glossary_ids[$key];
46 if (!$_POST['glossary_defs'][$word[$i]]) {
47 $current_defn = $glossary[$glossary_ids[$key]];
49 $current_defn = $_POST['glossary_defs'][$word[$i]];
53 echo _AT('glossary_term'); ?>:</strong></td>
54 <td class="row1"><?php echo AT_print(urldecode($current_word), 'glossary.word'); ?></td>
56 <?php if ($strlen(urldecode($current_word)) > 60): ?>
59 <td><strong><?php echo _AT('glossary_term_limit'); ?></strong></td>
63 <td valign="top" align="right" class="row1"><label for="body<?php echo $i; ?>"><strong><?php echo _AT('glossary_definition'); ?>:</strong></label></td>
65 <textarea name="glossary_defs[<?php echo AT_print($word[$i], 'glossary.word'); ?>]" class="formfield" cols="55" rows="4" id="body<?php echo $i; ?>"><?php
66 echo ContentManager::cleanOutput($current_defn);
71 <td valign="top" align="right" class="row1"><label for="r<?php echo $i; ?>"><strong><?php echo _AT('glossary_related'); ?>:</strong></label></td>
72 <td class="row1"><?php
74 if ($num_glossary > 1) {
75 echo '<select name="related_term['.AT_print($word[$i], 'glossary.word').']" id="r'.$i.'">';
76 echo '<option value="0"></option>';
77 foreach ($glossary_ids as $id => $term) {
78 if ($term == $word[$i]) {
81 echo '<option value="'.$id.'"';
82 if ($_POST['related_term'][$word[$i]] == $id) {
83 echo ' selected="selected"';
85 echo '>'.AT_print(urldecode($term), 'glossary.word').'</option>';
89 echo _AT('none_available');