57 $sql =
"select * from document_type where dt_id=$1";
58 $R = $this->
db->exec_sql(
$sql, array($this->dt_id));
59 if ($this->
db->count($R) == 0)
return 1;
61 $this->dt_id =
$r[
'dt_id'];
62 $this->dt_value =
$r[
'dt_value'];
63 $this->dt_prefix =
$r[
'dt_prefix'];
74 $sql =
"select * from document_type order by dt_value";
75 $r = $p_cn->get_array(
$sql);
79 $tmp[
'dt_value'] =
$r[
$i][
'dt_value'];
80 $tmp[
'dt_prefix'] =
$r[
$i][
'dt_prefix'];
83 $bt->label =
_(
'Modifier');
84 $bt->javascript =
"cat_doc_change('" .
$r[
$i][
'dt_id'] .
"','" . Dossier::id() .
"');";
86 $tmp[
'js_mod'] = $bt->input();
90 $bt->label =
_(
'Effacer');
91 $bt->javascript =
"confirm_box('X{$r[$i]['dt_id']}','" .
_(
'Vous confirmez') .
"',";
92 $bt->javascript.=
"function () { cat_doc_remove('{$r[$i]['dt_id']}','" . Dossier::id() .
"');})";
94 $tmp[
'js_remove'] = $bt->input();
110 $this->
db->exec_sql(
"alter sequence seq_doc_type_" . $this->dt_id .
" restart " . $p_int);
115 alert(
"Erreur " .
$e->getMessage());
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
alert($p_msg, $buffer=false)
alert in javascript
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
_("actif, passif,charge,...")
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
contains the class for connecting to Noalyss
class for the table document_type , a document_type is a kind of action in the follow up
$dt_prefix
$dt_prefix (text) prefix to use for this
__construct(Database $p_cn, $p_id=-1)
document_type
$dt_id
$dt_id (int) primary key of DOCUMENT_TYPE
$dt_value
$dt_value (text) description of document type
set_number($p_int)
Restart the increment of the document.
static get_list($p_cn)
get a list