forked from Wavyzz/dolibarr
amelioration de la doc doxygen
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- G<>n<EFBFBD>r<EFBFBD> par Doxygen 1.3.7 -->
|
||||
<div class="qindex"><a class="qindex" href="index.html">Page principale</a> | <a class="qindex" href="files.html">Liste des fichiers</a> | <a class="qindex" href="globals.html">Membres de fichier</a></div>
|
||||
<div class="qindex"><a class="qindex" href="index.html">Page principale</a> | <a class="qindex" href="classes.html">Liste alphab<EFBFBD>tique</a> | <a class="qindex" href="annotated.html">Liste des classes</a> | <a class="qindex" href="files.html">Liste des fichiers</a> | <a class="qindex" href="functions.html">Membres de classe</a> | <a class="qindex" href="globals.html">Membres de fichier</a></div>
|
||||
<h1>htdocs/lib/webcal.class.php</h1><a href="webcal_8class_8php.html">Aller <20> la documentation de ce fichier.</a><pre class="fragment"><div>00001 <?PHP
|
||||
00002 <span class="comment">/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org></span>
|
||||
00003 <span class="comment"> *</span>
|
||||
@@ -27,87 +27,87 @@
|
||||
00020 <span class="comment"> *</span>
|
||||
00021 <span class="comment"> */</span>
|
||||
00022
|
||||
00031 <span class="keyword">class </span>Webcal {
|
||||
00032 var $localdb;
|
||||
00033 var $heure = -1;
|
||||
00034 var $duree = 0;
|
||||
00035
|
||||
00040 function Webcal()
|
||||
00041 {
|
||||
00042 global $conf;
|
||||
00043
|
||||
00044 $this->localdb = <span class="keyword">new</span> Db($conf->webcal->db->type,
|
||||
00045 $conf->webcal->db->host,
|
||||
00046 $conf->webcal->db->user,
|
||||
00047 $conf->webcal->db->pass,
|
||||
00048 $conf->webcal->db->name);
|
||||
00049 }
|
||||
00050
|
||||
00059 function add($user, $date, $texte, $desc)
|
||||
00060 {
|
||||
00061
|
||||
00062 $id = $this->get_next_id();
|
||||
00063
|
||||
00064 $cal_id = $id;
|
||||
00065 $cal_create_by = $user->webcal_login;
|
||||
00066 $cal_date = strftime('%Y%m%d', $date);
|
||||
00067 $cal_time = $this->heure;
|
||||
00068 $cal_mod_date = strftime('%Y%m%d', time());
|
||||
00069 $cal_mod_time = strftime('%H%M', time());
|
||||
00070 $cal_duration = $this->duree;
|
||||
00071 $cal_priority = 2;
|
||||
00072 $cal_type = <span class="stringliteral">"E"</span>;
|
||||
00073 $cal_access = <span class="stringliteral">"P"</span>;
|
||||
00074 $cal_name = $texte;
|
||||
00075 $cal_description = $desc;
|
||||
00076
|
||||
00077 $sql = <span class="stringliteral">"INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date,</span>
|
||||
00078 <span class="stringliteral"> cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"</span>;
|
||||
00079
|
||||
00080 $sql .= <span class="stringliteral">" VALUES ($cal_id, '$cal_create_by', $cal_date, $cal_time,$cal_mod_date, $cal_mod_time,</span>
|
||||
00081 <span class="stringliteral"> $cal_duration,$cal_priority,'$cal_type', '$cal_access', '$cal_name','$cal_description')"</span>;
|
||||
<a name="l00037"></a><a class="code" href="classWebcal.html">00037</a> <span class="keyword">class </span><a class="code" href="classWebcal.html">Webcal</a> {
|
||||
00038 var $localdb;
|
||||
00039 var $heure = -1;
|
||||
00040 var $duree = 0;
|
||||
00041
|
||||
<a name="l00046"></a><a class="code" href="classWebcal.html#a0">00046</a> function <a class="code" href="classWebcal.html#a0">Webcal</a>()
|
||||
00047 {
|
||||
00048 global $conf;
|
||||
00049
|
||||
00050 $this->localdb = <span class="keyword">new</span> Db($conf->webcal->db->type,
|
||||
00051 $conf->webcal->db->host,
|
||||
00052 $conf->webcal->db->user,
|
||||
00053 $conf->webcal->db->pass,
|
||||
00054 $conf->webcal->db->name);
|
||||
00055 }
|
||||
00056
|
||||
<a name="l00065"></a><a class="code" href="classWebcal.html#a1">00065</a> function <a class="code" href="classWebcal.html#a1">add</a>($user, $date, $texte, $desc)
|
||||
00066 {
|
||||
00067
|
||||
00068 $id = $this-><a class="code" href="classWebcal.html#a2">get_next_id</a>();
|
||||
00069
|
||||
00070 $cal_id = $id;
|
||||
00071 $cal_create_by = $user->webcal_login;
|
||||
00072 $cal_date = strftime('%Y%m%d', $date);
|
||||
00073 $cal_time = $this->heure;
|
||||
00074 $cal_mod_date = strftime('%Y%m%d', time());
|
||||
00075 $cal_mod_time = strftime('%H%M', time());
|
||||
00076 $cal_duration = $this->duree;
|
||||
00077 $cal_priority = 2;
|
||||
00078 $cal_type = <span class="stringliteral">"E"</span>;
|
||||
00079 $cal_access = <span class="stringliteral">"P"</span>;
|
||||
00080 $cal_name = $texte;
|
||||
00081 $cal_description = $desc;
|
||||
00082
|
||||
00083 <span class="keywordflow">if</span> ( $this->localdb->query($sql) )
|
||||
00084 {
|
||||
00083 $sql = <span class="stringliteral">"INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date,</span>
|
||||
00084 <span class="stringliteral"> cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"</span>;
|
||||
00085
|
||||
00086 $sql = <span class="stringliteral">"INSERT INTO webcal_entry_user (cal_id, cal_login, cal_status)"</span>;
|
||||
00087 $sql .= <span class="stringliteral">" VALUES ($cal_id, '$cal_create_by', 'A')"</span>;
|
||||
00086 $sql .= <span class="stringliteral">" VALUES ($cal_id, '$cal_create_by', $cal_date, $cal_time,$cal_mod_date, $cal_mod_time,</span>
|
||||
00087 <span class="stringliteral"> $cal_duration,$cal_priority,'$cal_type', '$cal_access', '$cal_name','$cal_description')"</span>;
|
||||
00088
|
||||
00089 <span class="keywordflow">if</span> ( $this->localdb->query($sql) )
|
||||
00090 {
|
||||
00089 <span class="keywordflow">if</span> ( $this->localdb->query($sql) )
|
||||
00090 {
|
||||
00091
|
||||
00092 }
|
||||
00093 <span class="keywordflow">else</span>
|
||||
00094 {
|
||||
00095 $error = $this->localdb->error() . '<br>' .$sql;
|
||||
00096 }
|
||||
00097 }
|
||||
00098 <span class="keywordflow">else</span>
|
||||
00099 {
|
||||
00100 $error = $this->localdb->error() . '<br>' .$sql;
|
||||
00101 }
|
||||
00102
|
||||
00103 $this->localdb->close();
|
||||
00104 }
|
||||
00105
|
||||
00112 function get_next_id()
|
||||
00113 {
|
||||
00114
|
||||
00115 $sql = <span class="stringliteral">"SELECT max(cal_id) FROM webcal_entry"</span>;
|
||||
00116
|
||||
00117 <span class="keywordflow">if</span> ($this->localdb->query($sql))
|
||||
00118 {
|
||||
00119 $id = $this->localdb->result(0, 0) + 1;
|
||||
00120 <span class="keywordflow">return</span> $id;
|
||||
00121 }
|
||||
00122 <span class="keywordflow">else</span>
|
||||
00123 {
|
||||
00124 print $this->localdb->error();
|
||||
00125 }
|
||||
00126 }
|
||||
00127 }
|
||||
00128 ?>
|
||||
</div></pre><hr size="1"><address style="align: right;"><small>G<EFBFBD>n<EFBFBD>r<EFBFBD> le Thu Jul 15 14:51:57 2004 pour dolibarr par
|
||||
00092 $sql = <span class="stringliteral">"INSERT INTO webcal_entry_user (cal_id, cal_login, cal_status)"</span>;
|
||||
00093 $sql .= <span class="stringliteral">" VALUES ($cal_id, '$cal_create_by', 'A')"</span>;
|
||||
00094
|
||||
00095 <span class="keywordflow">if</span> ( $this->localdb->query($sql) )
|
||||
00096 {
|
||||
00097
|
||||
00098 }
|
||||
00099 <span class="keywordflow">else</span>
|
||||
00100 {
|
||||
00101 $error = $this->localdb->error() . '<br>' .$sql;
|
||||
00102 }
|
||||
00103 }
|
||||
00104 <span class="keywordflow">else</span>
|
||||
00105 {
|
||||
00106 $error = $this->localdb->error() . '<br>' .$sql;
|
||||
00107 }
|
||||
00108
|
||||
00109 $this->localdb->close();
|
||||
00110 }
|
||||
00111
|
||||
<a name="l00118"></a><a class="code" href="classWebcal.html#a2">00118</a> function <a class="code" href="classWebcal.html#a2">get_next_id</a>()
|
||||
00119 {
|
||||
00120
|
||||
00121 $sql = <span class="stringliteral">"SELECT max(cal_id) FROM webcal_entry"</span>;
|
||||
00122
|
||||
00123 <span class="keywordflow">if</span> ($this->localdb->query($sql))
|
||||
00124 {
|
||||
00125 $id = $this->localdb->result(0, 0) + 1;
|
||||
00126 <span class="keywordflow">return</span> $id;
|
||||
00127 }
|
||||
00128 <span class="keywordflow">else</span>
|
||||
00129 {
|
||||
00130 print $this->localdb->error();
|
||||
00131 }
|
||||
00132 }
|
||||
00133 }
|
||||
00134 ?>
|
||||
</div></pre><hr size="1"><address style="align: right;"><small>G<EFBFBD>n<EFBFBD>r<EFBFBD> le Thu Jul 15 20:50:38 2004 pour dolibarr par
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user