268 lines
31 KiB
HTML
268 lines
31 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>phpcompta: /home/dany/developpement/phpcompta-dev/phpcompta/include/action.inc.php Source File</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.4 -->
|
|
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
|
|
<div class="nav">
|
|
<a class="el" href="dir_000000.html">developpement</a> » <a class="el" href="dir_000001.html">phpcompta-dev</a> » <a class="el" href="dir_000002.html">phpcompta</a> » <a class="el" href="dir_000006.html">include</a></div>
|
|
<h1>action.inc.php</h1><a href="action_8inc_8php.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <?
|
|
<a name="l00002"></a>00002 <span class="comment">/*</span>
|
|
<a name="l00003"></a>00003 <span class="comment"> * This file is part of PhpCompta.</span>
|
|
<a name="l00004"></a>00004 <span class="comment"> *</span>
|
|
<a name="l00005"></a>00005 <span class="comment"> * PhpCompta is free software; you can redistribute it and/or modify</span>
|
|
<a name="l00006"></a>00006 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
|
|
<a name="l00007"></a>00007 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> * (at your option) any later version.</span>
|
|
<a name="l00009"></a>00009 <span class="comment"> *</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> * PhpCompta is distributed in the hope that it will be useful,</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
|
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
|
|
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
|
|
<a name="l00014"></a>00014 <span class="comment"> *</span>
|
|
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
|
|
<a name="l00016"></a>00016 <span class="comment"> * along with PhpCompta; if not, write to the Free Software</span>
|
|
<a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
|
<a name="l00018"></a>00018 <span class="comment">*/</span>
|
|
<a name="l00019"></a>00019 <span class="comment">/* $Revision$ */</span>
|
|
<a name="l00020"></a>00020 <span class="comment">// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr</span>
|
|
<a name="l00025"></a>00025 <span class="comment"></span>
|
|
<a name="l00026"></a>00026 <span class="comment">// Action</span>
|
|
<a name="l00028"></a>00028 <span class="comment"></span>require_once(<span class="stringliteral">"class_widget.php"</span>);
|
|
<a name="l00029"></a>00029 require_once(<span class="stringliteral">"class_action.php"</span>);
|
|
<a name="l00037"></a><a class="code" href="action_8inc_8php.html#a27">00037</a> function <a class="code" href="action_8inc_8php.html#a27">ShowActionList</a>($cn,$retour,$h_url)
|
|
<a name="l00038"></a>00038 {
|
|
<a name="l00039"></a>00039 <span class="comment">// show the search menu</span>
|
|
<a name="l00040"></a>00040 ?>
|
|
<a name="l00041"></a>00041 <div <span class="keyword">class</span>=<span class="stringliteral">"u_content"</span>>
|
|
<a name="l00042"></a>00042 <span>
|
|
<a name="l00043"></a>00043 <form method=<span class="stringliteral">"get"</span> <a class="code" href="classaction.html">action</a>=<span class="stringliteral">"commercial.php"</span>>
|
|
<a name="l00044"></a>00044 <?
|
|
<a name="l00045"></a>00045 <a class="code" href="action_8inc_8php.html#a15">$a</a>=(isset($_GET['query']))?$_GET['query']:<span class="stringliteral">""</span>;
|
|
<a name="l00046"></a>00046 printf ('<span>Titre : <input type=<span class="stringliteral">"text"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"query"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"%s"</span>></span>',
|
|
<a name="l00047"></a>00047 $a);
|
|
<a name="l00048"></a>00048 <a class="code" href="bank_8inc_8php.html#a9">$qcode</a>=(isset($_GET['<a class="code" href="action_8inc_8php.html#a20">qcode</a>']))?$_GET['qcode']:<span class="stringliteral">""</span>;
|
|
<a name="l00049"></a>00049 printf ('<span>Tiers QuickCode: <input type="text" name="qcode" value="%s"></span>',
|
|
<a name="l00050"></a>00050 $qcode);
|
|
<a name="l00051"></a>00051
|
|
<a name="l00052"></a>00052 ?>
|
|
<a name="l00053"></a>00053 <input type=<span class="stringliteral">"submit"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"submit_query"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"recherche"</span>>
|
|
<a name="l00054"></a>00054 <input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"sa"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"list"</span>>
|
|
<a name="l00055"></a>00055 <input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"p_action"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"suivi_courrier"</span>>
|
|
<a name="l00056"></a>00056 </form>
|
|
<a name="l00057"></a>00057 </span>
|
|
<a name="l00058"></a>00058
|
|
<a name="l00059"></a>00059 <?
|
|
<a name="l00060"></a>00060 ?>
|
|
<a name="l00061"></a>00061 <span>
|
|
<a name="l00062"></a>00062 <form method=<span class="stringliteral">"get"</span> <a class="code" href="classaction.html">action</a>=<span class="stringliteral">"commercial.php"</span>>
|
|
<a name="l00063"></a>00063 <input type=<span class="stringliteral">"submit"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"submit_query"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"Ajout Action"</span>>
|
|
<a name="l00064"></a>00064 <input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"p_action"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"suivi_courrier"</span>>
|
|
<a name="l00065"></a>00065 <input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"sa"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"add_action"</span>>
|
|
<a name="l00066"></a>00066 <input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"tiers"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<? echo <span class="charliteral">'"'</span>.$qcode.<span class="charliteral">'"'</span>;?>>
|
|
<a name="l00067"></a>00067 <? <span class="comment">// if called from another menu, url is set</span>
|
|
<a name="l00068"></a>00068 echo <a class="code" href="action_8inc_8php.html#a2">$h_url</a>;
|
|
<a name="l00069"></a>00069 echo <a class="code" href="action_8inc_8php.html#a1">$retour</a>; ?>
|
|
<a name="l00070"></a>00070 </form>
|
|
<a name="l00071"></a>00071
|
|
<a name="l00072"></a>00072
|
|
<a name="l00073"></a>00073 </span>
|
|
<a name="l00074"></a>00074 <?
|
|
<a name="l00075"></a>00075 <span class="comment">// show the action in </span>
|
|
<a name="l00076"></a>00076 <a class="code" href="action_8inc_8php.html#a24">$act</a>=<span class="keyword">new</span> <a class="code" href="classaction.html">action</a>($cn);
|
|
<a name="l00077"></a>00077
|
|
<a name="l00078"></a>00078 $query=(isset ($_REQUEST['query']))?<span class="stringliteral">"and ag_title ~* '"</span>.FormatString($_REQUEST['query']).<span class="stringliteral">"'"</span>:<span class="stringliteral">""</span>;
|
|
<a name="l00079"></a>00079 $str=<span class="stringliteral">""</span>;
|
|
<a name="l00080"></a>00080 <span class="keywordflow">if</span> ( isset($_REQUEST['qcode'] ))
|
|
<a name="l00081"></a>00081 {
|
|
<a name="l00082"></a>00082 <span class="comment">// verify that qcode is not empty</span>
|
|
<a name="l00083"></a>00083 <span class="keywordflow">if</span> ( strlen(trim($_REQUEST['qcode'] )) != 0 )
|
|
<a name="l00084"></a>00084 {
|
|
<a name="l00085"></a>00085 <a class="code" href="impress__fiche_8php.html#a9">$fiche</a>=<span class="keyword">new</span> Fiche($cn);
|
|
<a name="l00086"></a>00086 <a class="code" href="impress__fiche_8php.html#a9">$fiche</a>->GetByQCode($_REQUEST['qcode']);
|
|
<a name="l00087"></a>00087 $str=<span class="stringliteral">" and f_id= "</span>.$fiche->id;
|
|
<a name="l00088"></a>00088 }
|
|
<a name="l00089"></a>00089 }
|
|
<a name="l00090"></a>00090
|
|
<a name="l00091"></a>00091 <a class="code" href="user__action__ach_8php.html#a2">$r</a>=$act->myList(<a class="code" href="constant_8php.html#a39">ACTION</a>,$query.$str);
|
|
<a name="l00092"></a>00092 echo <a class="code" href="user__action__ach_8php.html#a2">$r</a>;
|
|
<a name="l00093"></a>00093 }
|
|
<a name="l00094"></a>00094
|
|
<a name="l00095"></a>00095 <span class="comment">// We need a sub action (3rd level)</span>
|
|
<a name="l00096"></a>00096 <span class="comment">// show a list of already taken action </span>
|
|
<a name="l00097"></a>00097 <span class="comment">// propose to add one </span>
|
|
<a name="l00098"></a>00098 <span class="comment">// permit also a search</span>
|
|
<a name="l00099"></a>00099 <span class="comment">// show detail</span>
|
|
<a name="l00100"></a><a class="code" href="action_8inc_8php.html#a0">00100</a> <a class="code" href="action_8inc_8php.html#a0">$sub_action</a>=(isset($_REQUEST['sa']))?$_REQUEST['sa']:<span class="stringliteral">""</span>;
|
|
<a name="l00101"></a>00101 var_dump($_REQUEST);echo '<hr>';
|
|
<a name="l00102"></a>00102 <span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">""</span> ) <a class="code" href="action_8inc_8php.html#a0">$sub_action</a>=<span class="stringliteral">"list"</span>;
|
|
<a name="l00103"></a>00103
|
|
<a name="l00104"></a>00104 <span class="comment">// if correction is asked go to directly to add_action</span>
|
|
<a name="l00105"></a>00105 <span class="keywordflow">if</span> (isset($_POST['corr'] ))
|
|
<a name="l00106"></a>00106 <a class="code" href="action_8inc_8php.html#a0">$sub_action</a>=<span class="stringliteral">"add_action"</span>;
|
|
<a name="l00107"></a>00107
|
|
<a name="l00108"></a>00108 <span class="comment">// if this page is called from another menu (customer, supplier,...)</span>
|
|
<a name="l00109"></a>00109 <span class="comment">// a button back is added</span>
|
|
<a name="l00110"></a>00110 <span class="comment">// TODO add function for generating url, hidden tags...</span>
|
|
<a name="l00111"></a><a class="code" href="action_8inc_8php.html#a1">00111</a> <a class="code" href="action_8inc_8php.html#a1">$retour</a>=<span class="stringliteral">""</span>;
|
|
<a name="l00112"></a><a class="code" href="action_8inc_8php.html#a2">00112</a> <a class="code" href="action_8inc_8php.html#a2">$h_url</a>=<span class="stringliteral">""</span>;
|
|
<a name="l00113"></a>00113
|
|
<a name="l00114"></a>00114 <span class="keywordflow">if</span> ( isset ($_REQUEST['url']))
|
|
<a name="l00115"></a>00115 {
|
|
<a name="l00116"></a>00116 <a class="code" href="action_8inc_8php.html#a1">$retour</a>=sprintf('<A HREF=<span class="stringliteral">"%s"</span>><input type=<span class="stringliteral">"button"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"Retour"</span>></A>',urldecode($_REQUEST['url']));
|
|
<a name="l00117"></a>00117 <a class="code" href="action_8inc_8php.html#a2">$h_url</a>=sprintf('<input type=<span class="stringliteral">"hidden"</span> <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"url"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"%s"</span>>',urldecode($_REQUEST['url']));
|
|
<a name="l00118"></a>00118 }
|
|
<a name="l00119"></a>00119
|
|
<a name="l00121"></a>00121 <span class="comment">// Show a list of the action</span>
|
|
<a name="l00122"></a>00122 <span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">"list"</span> )
|
|
<a name="l00123"></a>00123 <a class="code" href="action_8inc_8php.html#a27">ShowActionList</a>($cn,$retour,$h_url);
|
|
<a name="l00124"></a>00124
|
|
<a name="l00126"></a>00126 <span class="comment">// Add an action</span>
|
|
<a name="l00127"></a>00127 <span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">"add_action"</span> )
|
|
<a name="l00128"></a>00128 {
|
|
<a name="l00129"></a>00129 echo <a class="code" href="action_8inc_8php.html#a1">$retour</a>;
|
|
<a name="l00130"></a>00130
|
|
<a name="l00131"></a>00131 echo '<div <span class="keyword">class</span>=<span class="stringliteral">"u_redcontent"</span>>';
|
|
<a name="l00132"></a>00132 echo <a class="code" href="constant_8php.html#a79">JS_SEARCH_CARD</a>;
|
|
<a name="l00133"></a>00133 <span class="comment">// Add hidden tag</span>
|
|
<a name="l00134"></a>00134 echo '<form <a class="code" href="action_8inc_8php.html#a3">name</a>=<span class="stringliteral">"RTEDemo"</span> <a class="code" href="classaction.html">action</a>=<span class="stringliteral">"commercial.php?p_action=suivi_courrier"</span> method=<span class="stringliteral">"post"</span> onsubmit=<span class="stringliteral">"return submitForm();"</span>>';
|
|
<a name="l00135"></a>00135 echo <a class="code" href="action_8inc_8php.html#a2">$h_url</a>;
|
|
<a name="l00136"></a>00136 $date=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"text"</span>);
|
|
<a name="l00137"></a><a class="code" href="action_8inc_8php.html#a3">00137</a> $date->name=<span class="stringliteral">"ag_date"</span>;
|
|
<a name="l00138"></a><a class="code" href="action_8inc_8php.html#a4">00138</a> $date->value=(isset($_POST['<a class="code" href="action_8inc_8php.html#a17">ag_date</a>']))?$_POST['<a class="code" href="action_8inc_8php.html#a17">ag_date</a>']:<span class="stringliteral">""</span>;
|
|
<a name="l00139"></a>00139 echo <span class="stringliteral">"<p>Date : "</span>;
|
|
<a name="l00140"></a>00140 echo $date->IOValue().<span class="stringliteral">"</p>"</span>;
|
|
<a name="l00141"></a>00141 <span class="comment">// Tiers</span>
|
|
<a name="l00142"></a><a class="code" href="action_8inc_8php.html#a5">00142</a> <a class="code" href="action_8inc_8php.html#a5">$W1</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"js_search"</span>);
|
|
<a name="l00143"></a><a class="code" href="action_8inc_8php.html#a6">00143</a> <a class="code" href="action_8inc_8php.html#a5">$W1</a>->label=<span class="stringliteral">"Tiers"</span>;
|
|
<a name="l00144"></a>00144 <a class="code" href="action_8inc_8php.html#a5">$W1</a>->name=<span class="stringliteral">"tiers"</span>;
|
|
<a name="l00145"></a>00145 <a class="code" href="action_8inc_8php.html#a5">$W1</a>->value=isset($_REQUEST['tiers'])?$_REQUEST['tiers']:<span class="stringliteral">""</span>;
|
|
<a name="l00146"></a><a class="code" href="action_8inc_8php.html#a7">00146</a> <a class="code" href="action_8inc_8php.html#a5">$W1</a>->extra=<span class="stringliteral">"8,9,14"</span>; <span class="comment">// filter on frd_id</span>
|
|
<a name="l00147"></a><a class="code" href="action_8inc_8php.html#a8">00147</a> <a class="code" href="action_8inc_8php.html#a5">$W1</a>->extra2=0; <span class="comment">// jrn = 0</span>
|
|
<a name="l00148"></a>00148 echo <span class="stringliteral">"<div class=\"no\">"</span>.$W1->IOValue();
|
|
<a name="l00149"></a><a class="code" href="action_8inc_8php.html#a9">00149</a> <a class="code" href="action_8inc_8php.html#a9">$client_label</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"span"</span>);
|
|
<a name="l00150"></a><a class="code" href="action_8inc_8php.html#a10">00150</a> <a class="code" href="action_8inc_8php.html#a10">$tiers_label</a>=<span class="stringliteral">""</span>;
|
|
<a name="l00151"></a>00151 <span class="comment">// Retrieve name</span>
|
|
<a name="l00152"></a>00152 <span class="keywordflow">if</span> ( $W1->value != <span class="stringliteral">""</span> )
|
|
<a name="l00153"></a>00153 {
|
|
<a name="l00154"></a>00154 $tiers=<span class="keyword">new</span> <a class="code" href="user__impress_8php.html#a10">fiche</a>($cn);
|
|
<a name="l00155"></a>00155 $tiers->GetByQCode($W1->value);
|
|
<a name="l00156"></a>00156 <a class="code" href="action_8inc_8php.html#a10">$tiers_label</a>=$tiers->strAttribut(1);
|
|
<a name="l00157"></a>00157
|
|
<a name="l00158"></a>00158 }
|
|
<a name="l00159"></a>00159 echo <a class="code" href="action_8inc_8php.html#a9">$client_label</a>->IOValue(<span class="stringliteral">"tiers_label"</span>,$tiers_label).<span class="stringliteral">"</div>"</span>;
|
|
<a name="l00160"></a>00160
|
|
<a name="l00161"></a><a class="code" href="action_8inc_8php.html#a11">00161</a> <a class="code" href="action_8inc_8php.html#a11">$doc_type</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"select"</span>);
|
|
<a name="l00162"></a>00162 <a class="code" href="action_8inc_8php.html#a11">$doc_type</a>->name=<span class="stringliteral">"dt_id"</span>;
|
|
<a name="l00163"></a>00163 <a class="code" href="action_8inc_8php.html#a11">$doc_type</a>->value=<a class="code" href="ac__common_8php.html#a12">make_array</a>($cn,<span class="stringliteral">"select dt_id,dt_value from document_type where dt_id in ("</span>.<a class="code" href="constant_8php.html#a39">ACTION</a>.<span class="stringliteral">")"</span>);
|
|
<a name="l00164"></a>00164 echo 'Type d\' <a class="code" href="classaction.html">action</a>';
|
|
<a name="l00165"></a><a class="code" href="action_8inc_8php.html#a12">00165</a> <a class="code" href="action_8inc_8php.html#a11">$doc_type</a>->selected=(isset($_POST['<a class="code" href="action_8inc_8php.html#a19">dt_id</a>']))?$_POST['<a class="code" href="action_8inc_8php.html#a19">dt_id</a>']:<span class="stringliteral">""</span>;
|
|
<a name="l00166"></a>00166 echo <a class="code" href="action_8inc_8php.html#a11">$doc_type</a>->IOValue();
|
|
<a name="l00167"></a>00167
|
|
<a name="l00168"></a>00168 <span class="comment">// state </span>
|
|
<a name="l00169"></a><a class="code" href="action_8inc_8php.html#a13">00169</a> <a class="code" href="action_8inc_8php.html#a13">$doc_state</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"select"</span>);
|
|
<a name="l00170"></a>00170 <a class="code" href="action_8inc_8php.html#a13">$doc_state</a>->name=<span class="stringliteral">"d_state"</span>;
|
|
<a name="l00171"></a>00171 <a class="code" href="action_8inc_8php.html#a13">$doc_state</a>->value=<a class="code" href="ac__common_8php.html#a12">make_array</a>($cn,<span class="stringliteral">"select s_id,s_value from document_state"</span>);
|
|
<a name="l00172"></a>00172 <a class="code" href="action_8inc_8php.html#a13">$doc_state</a>->selected=(isset($_POST['<a class="code" href="action_8inc_8php.html#a18">d_state</a>']))?$_POST['<a class="code" href="action_8inc_8php.html#a18">d_state</a>']:<span class="stringliteral">""</span>;
|
|
<a name="l00173"></a>00173 echo <span class="stringliteral">"Etat : "</span>.$doc_state->IOValue();
|
|
<a name="l00174"></a>00174 echo '<input type=<span class="stringliteral">"hidden"</span> name=<span class="stringliteral">"p_action"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"suivi_courrier"</span>>';
|
|
<a name="l00175"></a>00175 echo '<input type=<span class="stringliteral">"hidden"</span> name=<span class="stringliteral">"sa"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"save_action_st1"</span>>';
|
|
<a name="l00176"></a><a class="code" href="action_8inc_8php.html#a14">00176</a> <a class="code" href="action_8inc_8php.html#a14">$title</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"text"</span>);
|
|
<a name="l00177"></a>00177 <a class="code" href="action_8inc_8php.html#a14">$title</a>->name=<span class="stringliteral">"ag_title"</span>;
|
|
<a name="l00178"></a>00178 <a class="code" href="action_8inc_8php.html#a14">$title</a>->value=(isset($_POST['<a class="code" href="action_8inc_8php.html#a21">ag_title</a>']))?$_POST['<a class="code" href="action_8inc_8php.html#a21">ag_title</a>']:<span class="stringliteral">""</span>;
|
|
<a name="l00179"></a>00179 echo <span class="stringliteral">"<p>Titre : "</span>;
|
|
<a name="l00180"></a>00180 echo <a class="code" href="action_8inc_8php.html#a14">$title</a>->IOValue().<span class="stringliteral">"</p>"</span>;
|
|
<a name="l00181"></a>00181
|
|
<a name="l00182"></a>00182 ?>
|
|
<a name="l00183"></a>00183
|
|
<a name="l00184"></a>00184 <?
|
|
<a name="l00186"></a>00186 <span class="comment">// add here for who the action is taken (contact, client or supplier)</span>
|
|
<a name="l00187"></a>00187
|
|
<a name="l00188"></a>00188 ?>
|
|
<a name="l00189"></a>00189
|
|
<a name="l00190"></a>00190
|
|
<a name="l00191"></a>00191
|
|
<a name="l00192"></a>00192 <script language=<span class="stringliteral">"JavaScript"</span> type=<span class="stringliteral">"text/javascript"</span>>
|
|
<a name="l00193"></a>00193 <!--
|
|
<a name="l00194"></a>00194 function submitForm() {
|
|
<a name="l00195"></a>00195 <span class="comment">//make sure hidden and iframe values are in sync before submitting form</span>
|
|
<a name="l00196"></a>00196 <span class="comment">//to sync only 1 rte, use updateRTE(rte)</span>
|
|
<a name="l00197"></a>00197 <span class="comment">//to sync all rtes, use updateRTEs</span>
|
|
<a name="l00198"></a>00198 updateRTE('<a class="code" href="action_8inc_8php.html#a16">ag_desc</a>');
|
|
<a name="l00199"></a>00199 <span class="comment">//updateRTE();</span>
|
|
<a name="l00200"></a>00200 <span class="comment">//change the following line to true to submit form</span>
|
|
<a name="l00201"></a>00201 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|
<a name="l00202"></a>00202 }
|
|
<a name="l00203"></a>00203
|
|
<a name="l00204"></a>00204 <span class="comment">//Usage: initRTE(imagesPath, includesPath, cssFile)</span>
|
|
<a name="l00205"></a>00205 initRTE(<span class="stringliteral">"images/"</span>, <span class="stringliteral">""</span>, <span class="stringliteral">""</span>);
|
|
<a name="l00206"></a>00206 <span class="comment">//--></span>
|
|
<a name="l00207"></a>00207 </script>
|
|
<a name="l00208"></a>00208 <noscript><p><b>Javascript must be enabled to use <span class="keyword">this</span> form.</b></p></noscript>
|
|
<a name="l00209"></a>00209 Note Interne :
|
|
<a name="l00210"></a>00210 <script language=<span class="stringliteral">"JavaScript"</span> type=<span class="stringliteral">"text/javascript"</span>>
|
|
<a name="l00211"></a>00211 <!--
|
|
<a name="l00212"></a>00212 <span class="comment">//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)</span>
|
|
<a name="l00213"></a><a class="code" href="action_8inc_8php.html#a15">00213</a> <? <a class="code" href="action_8inc_8php.html#a15">$a</a>=(isset($_POST['<a class="code" href="action_8inc_8php.html#a16">ag_desc</a>']))?<a class="code" href="ac__common_8php.html#a9">FormatString</a>(urldecode($_POST['<a class="code" href="action_8inc_8php.html#a16">ag_desc</a>'])):<span class="stringliteral">""</span>; ?>
|
|
<a name="l00214"></a>00214 writeRichText('ag_desc', <? printf (<span class="stringliteral">"'%s'"</span>,$a); ?>, 520, 200, <span class="keyword">true</span>, <span class="keyword">false</span>);
|
|
<a name="l00215"></a>00215 <? <a class="code" href="debug_8php.html#a0">echo_debug</a>('<a class="code" href="classaction.html">action</a>.inc',__LINE__, <span class="stringliteral">" A = "</span>.$a); ?>
|
|
<a name="l00216"></a>00216 <span class="comment">//--></span>
|
|
<a name="l00217"></a>00217 </script>
|
|
<a name="l00218"></a>00218
|
|
<a name="l00219"></a>00219 <input type=<span class="stringliteral">"submit"</span> name=<span class="stringliteral">"save_action_st1"</span> <a class="code" href="action_8inc_8php.html#a4">value</a>=<span class="stringliteral">"Sauver"</span>></p>
|
|
<a name="l00220"></a>00220 </form>
|
|
<a name="l00221"></a>00221 </div>
|
|
<a name="l00222"></a>00222 <?
|
|
<a name="l00223"></a>00223 }
|
|
<a name="l00225"></a>00225 <span class="comment">// Save Action</span>
|
|
<a name="l00226"></a>00226 <span class="comment">// Stage 1 : show the result and confirm</span>
|
|
<a name="l00228"></a>00228 <span class="comment"></span><span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">"save_action_st1"</span> )
|
|
<a name="l00229"></a>00229 {
|
|
<a name="l00230"></a>00230 <a class="code" href="action_8inc_8php.html#a24">$act</a>=<span class="keyword">new</span> <a class="code" href="classaction.html">action</a>($cn);
|
|
<a name="l00231"></a><a class="code" href="action_8inc_8php.html#a16">00231</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_desc=$_POST['ag_desc'];
|
|
<a name="l00232"></a><a class="code" href="action_8inc_8php.html#a17">00232</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_date=$_POST['<a class="code" href="action_8inc_8php.html#a17">ag_date</a>'];
|
|
<a name="l00233"></a><a class="code" href="action_8inc_8php.html#a18">00233</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->d_state=$_POST['<a class="code" href="action_8inc_8php.html#a18">d_state</a>'];
|
|
<a name="l00234"></a><a class="code" href="action_8inc_8php.html#a19">00234</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->dt_id=$_POST['<a class="code" href="action_8inc_8php.html#a19">dt_id</a>'];
|
|
<a name="l00235"></a><a class="code" href="action_8inc_8php.html#a20">00235</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->qcode=$_POST['tiers'];
|
|
<a name="l00236"></a><a class="code" href="action_8inc_8php.html#a21">00236</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_title=$_POST['<a class="code" href="action_8inc_8php.html#a21">ag_title</a>'];
|
|
<a name="l00237"></a>00237 echo <a class="code" href="action_8inc_8php.html#a24">$act</a>->Confirm();
|
|
<a name="l00238"></a>00238 }
|
|
<a name="l00240"></a>00240 <span class="comment">// Save Action</span>
|
|
<a name="l00241"></a>00241 <span class="comment">// Stage 2 : Save the action and propose to save a file</span>
|
|
<a name="l00243"></a>00243 <span class="comment"></span><span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">"save_action_st2"</span> )
|
|
<a name="l00244"></a>00244 {
|
|
<a name="l00245"></a>00245 <a class="code" href="action_8inc_8php.html#a24">$act</a>=<span class="keyword">new</span> <a class="code" href="classaction.html">action</a>($cn);
|
|
<a name="l00246"></a>00246 <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_desc=$_POST['ag_desc'];
|
|
<a name="l00247"></a>00247 <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_date=$_POST['<a class="code" href="action_8inc_8php.html#a17">ag_date</a>'];
|
|
<a name="l00248"></a>00248 <a class="code" href="action_8inc_8php.html#a24">$act</a>->d_state=$_POST['<a class="code" href="action_8inc_8php.html#a18">d_state</a>'];
|
|
<a name="l00249"></a>00249 <a class="code" href="action_8inc_8php.html#a24">$act</a>->dt_id=$_POST['<a class="code" href="action_8inc_8php.html#a19">dt_id</a>'];
|
|
<a name="l00250"></a>00250 <a class="code" href="action_8inc_8php.html#a24">$act</a>->qcode=$_POST['tiers'];
|
|
<a name="l00251"></a>00251 <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_title=$_POST['<a class="code" href="action_8inc_8php.html#a21">ag_title</a>'];
|
|
<a name="l00252"></a><a class="code" href="action_8inc_8php.html#a22">00252</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->md_id=(isset($_POST['gen_doc']))?$_POST['gen_doc']:0;
|
|
<a name="l00253"></a>00253
|
|
<a name="l00254"></a><a class="code" href="action_8inc_8php.html#a23">00254</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->gen=isset($_POST['p_gen'])?'on<span class="charliteral">':'</span>off';
|
|
<a name="l00255"></a>00255
|
|
<a name="l00256"></a>00256 echo <a class="code" href="action_8inc_8php.html#a24">$act</a>->SaveStage2();
|
|
<a name="l00257"></a>00257 echo '<A HREF=<span class="stringliteral">"commercial.php?p_action=suivi_courrier"</span>><INPUT TYPE=<span class="stringliteral">"BUTTON"</span> VALUE=<span class="stringliteral">"Retour Liste"</span>></A>';
|
|
<a name="l00258"></a>00258 }
|
|
<a name="l00259"></a>00259
|
|
<a name="l00261"></a>00261 <span class="comment">// Save Document</span>
|
|
<a name="l00262"></a>00262 <span class="comment">// Stage 3 : Save the document</span>
|
|
<a name="l00264"></a>00264 <span class="comment"></span><span class="keywordflow">if</span> ( $sub_action == <span class="stringliteral">"save_action_st3"</span> )
|
|
<a name="l00265"></a>00265 {
|
|
<a name="l00266"></a>00266 <a class="code" href="debug_8php.html#a0">echo_debug</a>(<span class="stringliteral">"action.inc.php"</span>,__LINE__,'Stage 3');
|
|
<a name="l00267"></a><a class="code" href="action_8inc_8php.html#a24">00267</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>=<span class="keyword">new</span> <a class="code" href="classaction.html">action</a>($cn);
|
|
<a name="l00268"></a><a class="code" href="action_8inc_8php.html#a25">00268</a> <a class="code" href="action_8inc_8php.html#a24">$act</a>->ag_id=$_POST['<a class="code" href="action_8inc_8php.html#a25">ag_id</a>'];
|
|
<a name="l00269"></a><a class="code" href="action_8inc_8php.html#a26">00269</a> <a class="code" href="action_8inc_8php.html#a26">$d_id</a>=(isset($_POST['d_id']))?$_POST['d_id']:0;
|
|
<a name="l00270"></a>00270 echo <a class="code" href="action_8inc_8php.html#a24">$act</a>->SaveStage3($d_id);
|
|
<a name="l00271"></a>00271
|
|
<a name="l00272"></a>00272 <a class="code" href="action_8inc_8php.html#a27">ShowActionList</a>($cn,$retour,$h_url);
|
|
<a name="l00273"></a>00273
|
|
<a name="l00274"></a>00274 }
|
|
<a name="l00275"></a>00275
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Jun 24 20:41:33 2006 for phpcompta by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
|
|
</body>
|
|
</html>
|