53 $sql =
"select * from document_type where dt_id=$1";
54 $R = $this->
db->exec_sql(
$sql, array($this->dt_id));
55 if ($this->
db->count($R) == 0)
return 1;
57 $this->dt_id =
$r[
'dt_id'];
58 $this->dt_value =
$r[
'dt_value'];
59 $this->dt_prefix =
$r[
'dt_prefix'];
70 $sql =
"select * from document_type order by dt_value";
71 $r = $p_cn->get_array(
$sql);
75 $tmp[
'dt_value'] =
$r[
$i][
'dt_value'];
76 $tmp[
'dt_prefix'] =
$r[
$i][
'dt_prefix'];
79 $bt->label = _(
'Modifier');
80 $bt->javascript =
"cat_doc_change('" .
$r[
$i][
'dt_id'] .
"','" .
Dossier::id() .
"');";
82 $tmp[
'js_mod'] = $bt->input();
86 $bt->label = _(
'Effacer');
87 $bt->javascript =
"confirm_box('X{$r[$i]['dt_id']}','" . _(
'Vous confirmez') .
"',";
88 $bt->javascript.=
"function () { cat_doc_remove('{$r[$i]['dt_id']}','" .
Dossier::id() .
"');})";
90 $tmp[
'js_remove'] = $bt->input();
106 $this->
db->exec_sql(
"alter sequence seq_doc_type_" . $this->dt_id .
" restart " . $p_int);
111 alert(
"Erreur " .
$e->getMessage());
record_log($p_message)
Record an error message into the log file of the server.
alert($p_msg, $buffer=false)
alert in javascript
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
class for the table document_type , a document_type is a kind of action in the follow up
__construct($p_cn, $p_id=-1)
document_type
set_number($p_int)
Restart the increment of the document.
static get_list($p_cn)
get a list
static id()
return the 'gDossier' value after a check