Synchro portable

This commit is contained in:
Rodolphe Quiedeville 2003-10-14 21:04:35 +00:00
parent c43af5de56
commit 042257ba92
3 changed files with 152 additions and 89 deletions

58
doc/dev/config.sgml Normal file
View File

@ -0,0 +1,58 @@
<!-- $Id$ -->
<!-- $Source$ -->
<chapt id="config">Configuration
<sect id="config-conf">Fichier de configuration
<p>
Le fichier de configuration de Dolibarr est
<file>conf/conf.php</file> il est écrit par /install.php
<p>
<p>
Le contenu du fichier standard est :
<example>
$dolibarr_main_document_root="/spare/home/www/dolibarr/dolibarr/htdocs";
$dolibarr_main_url_root="http://dolibarr.lafrere.lan";
$dolibarr_main_db_host="localhost";
$dolibarr_main_db_name="dolibarr";
$dolibarr_main_db_user="dolibarr";
$dolibarr_main_db_pass="";
</example>
</p>
<sect1 id="config-sup">Paramètres optionnels supplémentaires
<p>
Vous pouvez ajouter le paramètre supplémentaire optionnel :
<example>
$dolibarr_auto_user="demo";
</example>
Si vous souhaitez utiliser Dolibarr en mono-utilisateur, il
faut quand même que cet utilisateur existe dans la base de
données.
</p>
</sect1>
</sect>
</chapt>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:("dolibarr-dev.sgml" "book" "chapt")
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

View File

@ -1,6 +1,7 @@
<!DOCTYPE debiandoc public "-//DebianDoc//DTD DebianDoc//EN" <!DOCTYPE debiandoc public "-//DebianDoc//DTD DebianDoc//EN"
[ [
<!entity ch-main system "main.sgml"> <!entity ch-main system "main.sgml">
<!entity ch-config system "config.sgml">
<!entity ch-modules system "modules.sgml"> <!entity ch-modules system "modules.sgml">
<!entity ch-constantes system "constantes.sgml"> <!entity ch-constantes system "constantes.sgml">
<!entity ch-permissions system "permissions.sgml"> <!entity ch-permissions system "permissions.sgml">
@ -25,6 +26,7 @@
&ch-main; &ch-main;
&ch-modules; &ch-modules;
&ch-config;
&ch-permissions; &ch-permissions;
&ch-constantes; &ch-constantes;
&ch-propale; &ch-propale;

View File

@ -85,7 +85,6 @@ llxHeader();
if ($account) if ($account)
{ {
if ($vline) if ($vline)
{ {
$viewline = $vline; $viewline = $vline;
@ -104,7 +103,7 @@ if ($account)
*/ */
print '<form method="post" action="'."$PHP_SELF?vline=$vline&account=$account".'">'; print '<form method="post" action="'."$PHP_SELF?vline=$vline&account=$account".'">';
print '<input type="hidden" name="action" value="search">'; print '<input type="hidden" name="action" value="search">';
print '<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">'; print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
print "<TR>"; print "<TR>";
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>&nbsp;</td><td><input type="text" name="req_desc" size="24"></TD>'; print '<td>&nbsp;</td><td><input type="text" name="req_desc" size="24"></TD>';
@ -112,7 +111,7 @@ if ($account)
print '<td align="right"><input type="text" name="req_credit" size="6"></TD>'; print '<td align="right"><input type="text" name="req_credit" size="6"></TD>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="right"><input type="submit" value="Chercher"></td>'; print '<td align="right"><input type="submit" value="Chercher"></td>';
print "</TR>\n"; print "</tr>\n";
print "</form>"; print "</form>";
/* /*
* *
@ -120,7 +119,7 @@ if ($account)
*/ */
print "<form method=\"post\" action=\"$PHP_SELF?vline=$vline&account=$account\">"; print "<form method=\"post\" action=\"$PHP_SELF?vline=$vline&account=$account\">";
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print "<TR class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td>Date</td><td>Type</td><td>Description</TD>"; print "<td>Date</td><td>Type</td><td>Description</TD>";
print "<td align=\"right\">Débit</TD>"; print "<td align=\"right\">Débit</TD>";
print "<td align=\"right\">Crédit</TD>"; print "<td align=\"right\">Crédit</TD>";
@ -128,6 +127,8 @@ if ($account)
print "<td align=\"right\">Relevé</td>"; print "<td align=\"right\">Relevé</td>";
print "</TR>\n"; print "</TR>\n";
$limit = 20;
$sql = "SELECT count(*) FROM llx_bank"; $sql = "SELECT count(*) FROM llx_bank";
if ($account) { $sql .= " WHERE fk_account=$account"; } if ($account) { $sql .= " WHERE fk_account=$account"; }
if ( $db->query($sql) ) if ( $db->query($sql) )
@ -135,16 +136,20 @@ if ($account)
$nbline = $db->result (0, 0); $nbline = $db->result (0, 0);
$db->free(); $db->free();
if ($nbline > $viewline ) if ($nbline > $limit )
{ {
$limit = $nbline - $viewline ; $offset = $nbline - $limit;
} }
else else
{ {
$limit = $viewline; $offset = 0;
} }
} }
print "<tr><td>".$nbline;
$sql = "SELECT rowid, label FROM llx_bank_categ;"; $sql = "SELECT rowid, label FROM llx_bank_categ;";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
@ -167,6 +172,12 @@ if ($account)
* select sum(amount) from solde ; * select sum(amount) from solde ;
*/ */
$pageprev = $page - 1;
$pagenext = $page + 1;
$sql = "SELECT sum (b.amount) FROM llx_bank as b ";
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type"; $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
$sql .= " FROM llx_bank as b "; $sql .= " FROM llx_bank as b ";
@ -197,6 +208,7 @@ if ($account)
} }
} }
$sql .= " ORDER BY b.dateo ASC"; $sql .= " ORDER BY b.dateo ASC";
$sql .= $db->plimit($limit, $offset);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
@ -212,10 +224,7 @@ if ($account)
$objp = $db->fetch_object( $i); $objp = $db->fetch_object( $i);
$total = $total + $objp->amount; $total = $total + $objp->amount;
$time = time(); $time = time();
if ($i > ($nbline - $viewline))
{
$var = !$var; $var = !$var;
if ($objp->do > $time && !$sep) if ($objp->do > $time && !$sep)
{ {
$sep = 1 ; $sep = 1 ;
@ -253,10 +262,7 @@ if ($account)
} }
else else
{ {
//Xavier DUTOIT : Ajout d'un lien pour modifier la ligne
print "<td><a href=\"ligne.php?rowid=$objp->rowid&account=$account\">$objp->label</a>&nbsp;</td>"; print "<td><a href=\"ligne.php?rowid=$objp->rowid&account=$account\">$objp->label</a>&nbsp;</td>";
// print "<td>$objp->label&nbsp;</td>";
} }
if ($objp->amount < 0) if ($objp->amount < 0)
@ -292,11 +298,8 @@ if ($account)
{ {
print "<td align=\"center\"><a href=\"$PHP_SELF?action=del&rowid=$objp->rowid&account=$account\">[Del]</a></td>"; print "<td align=\"center\"><a href=\"$PHP_SELF?action=del&rowid=$objp->rowid&account=$account\">[Del]</a></td>";
} }
print "</tr>"; print "</tr>";
}
$i++; $i++;
} }
$db->free(); $db->free();