noalyss Version-9
tag_select.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4/**
5 * @file
6 * @brief list of tags
7 */
9?>
10<?php
11echo HtmlInput::title_box('Tag', 'tag_div');
12$max=$this->cn->count($ret);
13if ( $max == 0 ) {
14 echo h2(_("Aucune étiquette disponible"),' class="notice"');
15 return;
16}
17?>
18<?php echo _("Cherche")." ".HtmlInput::filter_table('tag_tb_id', '0,1', 1); ?>
19<table class="result" id="tag_tb_id">
20 <tr>
21 <th>
22 <?php echo _("Tag")?>
23 </th>
24 <th>
25 <?php echo _("Description")?>
26 </th>
27 </tr>
28<?php
30$id="none";
31
32if ( get_class($this) == 'Tag_Action' ) {
33 $id=$http->request("ag_id","number");
34 } elseif (get_class($this)=='Tag_Operation')
35{
36 $id=$http->request("jrn_id");
37}
38
39if (isNumber($id) == 0 ) die ('ERROR : parameters invalid');
40 for ($i=0;$i<$max;$i++):
42?>
43 <tr class="<?php echo (($i%2==0)?'even':'odd');?>">
44 <td class="tagcell-color<?=$row['t_color']?>">
45 <?php
46 if ( get_class($this) == 'Tag_Action' ) {
47 $js=sprintf("action_tag_add('%s','%s','%s','%s')",$gDossier,$id,$row['t_id'],$row['tag_type']);
48 } else {
49 $js=sprintf("new operation_tag('%s').add('%s','%s','%s','%s')",$p_prefix,$gDossier,$id,$row['t_id'],$row['tag_type']);
50 }
51
52 echo HtmlInput::anchor($row['t_tag'], "", "onclick=\"$js\"");
53 ?>
54 </td>
55 <td>
56 <?php
57 if ( $row['t_description'] != "G"):
58 echo $row['t_description'];
59 else :
60 echo '<span class="icon">&#xe83e;</span>';
61 endif;
62 ?>
63 </td>
64 </tr>
65<?php
67 ?>
68</table>
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
isNumber($p_int)
Definition: ac_common.php:215
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
if(!headers_sent()) else
$input_from cn
Definition: balance.inc.php:66
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static id()
return the 'gDossier' value after a check
static filter_table($p_table_id, $p_col, $start_row)
filter the rows in a table and keep the colored row in alternance
static anchor($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
Return a simple anchor with a url or a javascript if $p_js is not null then p_url will be javascript:...
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
manage the http input (get , post, request) and extract from an array
$all table
if( $delta< 0) elseif( $delta==0)
if(get_class($this)=='Tag_Action') elseif(get_class( $this)=='Tag_Operation') if(isNumber($id)==0) die('ERROR endfor
Definition: tag_select.php:39
$http
Definition: tag_select.php:8
$max
Definition: tag_select.php:12
$id
Definition: tag_select.php:30