diff --git a/htdocs/service/fiche.php3 b/htdocs/service/fiche.php3 new file mode 100644 index 00000000000..24558d459df --- /dev/null +++ b/htdocs/service/fiche.php3 @@ -0,0 +1,57 @@ + + * + * $Id$ + * $Source$ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +require("./pre.inc.php3"); + +llxHeader(); + + +$db = new Db(); + +if ($action == "create") { + + print "Nouveau service
"; + print "
\n"; + print ""; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print '"; + print ''; + print ''; + print '
Référence
Libelle
Prix
Description'; + print "
'; +} + +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/service/index.php3 b/htdocs/service/index.php3 new file mode 100644 index 00000000000..59c273e506d --- /dev/null +++ b/htdocs/service/index.php3 @@ -0,0 +1,146 @@ + + * + * $Id$ + * $Source$ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +require("./pre.inc.php3"); + +llxHeader(); +$bc[0]="bgcolor=\"#90c090\""; +$bc[1]="bgcolor=\"#b0e0b0\""; + + +$db = new Db(); +if ($sortfield == "") { + $sortfield="lower(p.label),p.price"; +} +if ($sortorder == "") { + $sortorder="ASC"; +} + +if ($action == 'update') { + $sql = "UPDATE llx_product SET description='$desc' where rowid = $rowid"; + $db->query($sql); +} + +$yn["t"] = "oui"; +$yn["f"] = "non"; + +if ($page == -1) { $page = 0 ; } +$limit = 26; +$offset = $limit * $page ; +$pageprev = $page - 1; +$pagenext = $page + 1; + + + +print "\n"; +print ""; +print ""; +print '
"; +print "Liste[Nouveau service]
'; + +/* + * Fiche + * + */ +if ($rowid) { + + $sql = "SELECT p.rowid, p.label, p.price, p.description, p.duration,p.ref FROM llx_product as p"; + $sql .= " WHERE p.rowid = $rowid;"; + + + if ( $db->query($sql) ) { + $num = $db->num_rows(); + $i = 0; + print "

"; + print ""; + print ""; + print ""; + print "\n"; + $var=True; + if ( $num ) { + $objp = $db->fetch_object(0); + $var=!$var; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + + print ""; + $i++; + } + print "
RéfNom
rowid\">$objp->ref$objp->label
prix$objp->price
duree$objp->duration
desc".nl2br($objp->description)."
"; + $db->free(); + + print "


\n"; + print ""; + print "
"; + print ""; + print "
"; + } + + /* + * + * Liste + * + */ + +} else { + + $sql = "SELECT p.rowid, p.label, p.price, p.duration,p.ref FROM llx_product as p"; + + $sql .= " ORDER BY $sortfield $sortorder "; + $sql .= $db->plimit( $limit ,$offset); + + if ( $db->query($sql) ) { + $num = $db->num_rows(); + $i = 0; + print "

"; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + $var=True; + while ($i < $num) { + $objp = $db->fetch_object( $i); + $var=!$var; + print ""; + print "\n"; + print "\n"; + print ''; + print "\n"; + print "\n"; + $i++; + } + print "
RéfNomPrixDurée
rowid\">$objp->ref$objp->label'.price($objp->price).'$objp->duration
"; + $db->free(); + } + +} +$db->close(); + +llxFooter("Dernière modification $Date$ révision $Revision$"); +?> diff --git a/htdocs/service/pre.inc.php3 b/htdocs/service/pre.inc.php3 new file mode 100644 index 00000000000..d146ea3ce35 --- /dev/null +++ b/htdocs/service/pre.inc.php3 @@ -0,0 +1,124 @@ + + * + * $Id$ + * $Source$ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ +require("../main.inc.php3"); + +function llxHeader($head = "", $urlp = "") { + global $PREFIX, $user; + + print "\n$head\n\n"; + ?> + + \n"; + print ""; + + print "" . $GLOBALS["MAIN_TITLE"] . ""; + print "Technique"; + print "Commercial"; + print "Compta"; + print "Stats"; + print "\n"; + + print ""; + print ""; + + + print ""; + /* + * + */ + print "
"; + + print ""; + print ""; + + print ""; + + + print ""; + /* + * + */ + print ""; + /* + * + */ + print ""; + /* + * + */ + print ""; + + print ""; + + print "
"; + print "
" . $GLOBALS["dbname"] . " - " . $user->code ."
"; + print "Accueil
"; + print "Bookmark"; + print "
"; + print "
Societe
\n"; + print "Contact
\n"; + print "
"; + print "\n"; + print "
"; + print ''; + print "
"; + print ''; + print "
"; + print "Projets
\n"; + print "
"; + print "
Societes
\n"; + print "
"; + print ''; + print ''; + print ' '; + print ""; + print "
"; + + print "
Contacts
\n"; + print "
"; + print ''; + print ''; + print " "; + print ""; + print "
"; + + + print "
"; + print "Soc : "; + print ""; + print "
"; + print "
"; + + print "
\n"; +} + +function llxFooter($foot='') { + print "
\n"; + print "$foot"; +} +/* + * $Id$ + * $Source$ + */ +?>