noalyss  Version-9
tag_choose.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 ?><?php
5 echo HtmlInput::title_box(_('Etiquette'), 'tag_div');
6 $max=$this->cn->count($ret);
7 if ( $max == 0 ) {
8  echo h2(_("Aucune étiquette disponible"),' class="notice"');
9  return;
10 }
11 ?>
12 <table>
13  <tr>
14  <th>
15  Tag
16  </th>
17  <th>
18  Description
19  </th>
20  </tr>
21 <?php
23 if (isNumber($_REQUEST['ag_id']) == 0 ) die ('ERROR : parameters invalid');
24  for ($i=0;$i<$max;$i++):
26 ?>
27  <tr class="<?php echo (($i%2==0)?'even':'odd');?>">
28  <td>
29  <?php
30  $js=sprintf("action_tag_add('%s','%s','%s')",$gDossier,$_REQUEST['ag_id'],$row['t_id']);
31  echo HtmlInput::anchor($row['t_tag'], "", "onclick=\"$js\"");
32  ?>
33  </td>
34  <td>
35  <?php
36  echo $row['t_description'];
37  ?>
38  </td>
39  </tr>
40 <?php
41  endfor;
42  ?>
43 </table>
44 <?php
45  $js=sprintf("onclick=\"show_tag('%s','%s','%s','j')\"",Dossier::id(),"none",'-1');
46  echo HtmlInput::button("tag_add", "Ajout d'une étiquette", $js);
47 ?>
$ret
$ret
Definition: ajax_display_letter.php:51
$max
$max
Definition: tag_choose.php:6
HtmlInput\button
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Definition: html_input.class.php:206
cn
$input_from cn
Definition: balance.inc.php:66
tr
tr($p_string, $p_extra='')
Definition: ac_common.php:88
HtmlInput\anchor
static anchor($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click")
Return a simple anchor with a url or a javascript if $p_js is not null then p_url will be javascript:...
Definition: html_input.class.php:915
Tag
Tag operations or actions to linked them together.
Definition: tag.class.php:31
DatabaseCore\fetch_array
static fetch_array($ret, $p_indice=0)
wrapper for the function pg_fetch_array
Definition: database_core.class.php:745
HtmlInput\title_box
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".
Definition: html_input.class.php:838
$i
$i
Definition: action_document_type_mtable_input.php:83
h2
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
isNumber
isNumber($p_int)
Definition: ac_common.php:218
$_REQUEST
$_REQUEST['ac']
Definition: ajax_search_action.php:26
$js
if(isNumber($_REQUEST['ag_id'])==0) die('ERROR $js
Definition: tag_choose.php:23
endfor
endfor
Definition: stock_cfg.inc.php:108
Dossier\id
static id()
return the $_REQUEST['gDossier'] after a check
Definition: dossier.class.php:55
table
$all table
Definition: company.inc.php:138
th
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
td
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
$row
$row
Definition: ajax_anc_detail_operation.php:33
$gDossier
if( $max==0) $gDossier
Definition: tag_choose.php:22