Definition at line 29 of file class_copro_key.php.
Copro_key::get_detail |
( |
| ) |
|
Definition at line 110 of file class_copro_key.php.
References $array, and $cn.
113 $array=$cn->get_array(
"select * from coprop.clef_repartition_detail
114 where cr_id=$1",array($this->cr_id));
if(isset($_POST['remove'])) $array
Copro_key::insert |
( |
|
$p_array | ) |
|
Definition at line 46 of file class_copro_key.php.
References $cn, and verify().
54 $this->cr_id = $cn->get_value(
"insert into coprop.clef_repartition(cr_note,cr_name,cr_tantieme)
55 values($1,$2,$3) returning cr_id", array( strip_tags($cr_note), strip_tags($cr_name),$cr_tantieme));
56 for ($i = 0; $i < count($f_id); $i++)
58 if (${
"part" . $f_id[$i]} ==
'')
59 ${
"part" . $f_id[$i]} = 0;
60 $cn->exec_sql(
"insert into coprop.clef_repartition_detail(lot_fk,crd_amount,cr_id) values($1,$2,$3)", array($f_id[$i], ${
"part" . $f_id[$i]}, $this->cr_id));
64 catch (Exception $exc)
67 echo $exc->getTraceAsString();
verify($p_array, $b_dupl=true)
Definition at line 98 of file class_copro_key.php.
References $array, and $cn.
101 $array=$cn->get_array(
"select * from coprop.clef_repartition where
102 cr_id=$1",array($this->cr_id));
103 if ( $cn->count() == 1 )
105 foreach ( array(
"cr_id",
"cr_name",
"cr_note",
"cr_tantieme") as $k=>$e) {
if(isset($_POST['remove'])) $array
Copro_key::update |
( |
|
$p_array | ) |
|
Definition at line 71 of file class_copro_key.php.
References $cn, and verify().
77 $this->
verify($p_array,
false);
79 $cn->exec_sql(
"update coprop.clef_repartition set
80 cr_note=$1,cr_name=$2,cr_tantieme=$3
82 array( strip_tags($cr_note), strip_tags($cr_name),$cr_tantieme,$this->cr_id));
83 $cn->exec_sql(
"delete from coprop.clef_repartition_detail where cr_id=$1",array($this->cr_id));
84 for ($i = 0; $i < count($f_id); $i++)
86 if (${
"part" . $f_id[$i]} ==
'')
87 ${
"part" . $f_id[$i]} = 0;
88 $cn->exec_sql(
"insert into coprop.clef_repartition_detail(lot_fk,crd_amount,cr_id) values($1,$2,$3)", array($f_id[$i], ${
"part" . $f_id[$i]}, $this->cr_id));
92 catch (Exception $exc)
95 echo $exc->getTraceAsString();
verify($p_array, $b_dupl=true)
Copro_key::verify |
( |
|
$p_array, |
|
|
|
$b_dupl = true |
|
) |
| |
Definition at line 31 of file class_copro_key.php.
References $cn.
Referenced by insert(), and update().
35 if (strlen(trim ($cr_name))==0)
36 throw new Exception(
"Le nom est vide");
39 $dupl=$cn->count_sql(
"select * from coprop.clef_repartition where cr_name=$1",array($cr_name));
41 throw new Exception(
"Une clef avec ce nom existe déja");
The documentation for this class was generated from the following file: