Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
bc08f313
Commit
bc08f313
authored
22 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
b4d2fdf2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/adherents/type.php
+253
-0
253 additions, 0 deletions
htdocs/adherents/type.php
mysql/tables/Makefile
+1
-0
1 addition, 0 deletions
mysql/tables/Makefile
mysql/tables/drop.sql
+2
-0
2 additions, 0 deletions
mysql/tables/drop.sql
with
256 additions
and
0 deletions
htdocs/adherents/type.php
0 → 100644
+
253
−
0
View file @
bc08f313
<?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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.
*
* $Id$
* $Source$
*
*/
require
(
"./pre.inc.php"
);
require
(
"../adherent.class.php"
);
require
(
"../adherent_type.class.php"
);
require
(
"../cotisation.class.php"
);
require
(
"../paiement.class.php"
);
$db
=
new
Db
();
if
(
$HTTP_POST_VARS
[
"action"
]
==
'add'
&&
$user
->
admin
)
{
$adht
=
new
AdherentType
(
$db
);
$adht
->
libelle
=
$HTTP_POST_VARS
[
"libelle"
];
$adht
->
cotisation
=
$HTTP_POST_VARS
[
"cotisation"
];
$adht
->
commentaire
=
$HTTP_POST_VARS
[
"comment"
];
if
(
$adht
->
create
(
$user
->
id
)
)
{
Header
(
"Location: type.php"
);
}
}
if
(
$HTTP_POST_VARS
[
"action"
]
==
'update'
&&
$user
->
admin
)
{
$adht
=
new
AdherentType
(
$db
);
$adht
->
id
=
$rowid
;
$adht
->
libelle
=
$HTTP_POST_VARS
[
"libelle"
];
$adht
->
cotisation
=
$HTTP_POST_VARS
[
"cotisation"
];
$adht
->
commentaire
=
$HTTP_POST_VARS
[
"comment"
];
if
(
$adht
->
update
(
$user
->
id
)
)
{
Header
(
"Location: type.php"
);
}
}
if
(
$action
==
'delete'
)
{
$adh
=
new
Adherent
(
$db
);
$adh
->
delete
(
$rowid
);
Header
(
"Location: liste.php"
);
}
if
(
$action
==
'commentaire'
)
{
$don
=
new
Don
(
$db
);
$don
->
set_commentaire
(
$rowid
,
$HTTP_POST_VARS
[
"commentaire"
]);
$action
=
"edit"
;
}
llxHeader
();
/* ************************************************************************** */
/* */
/* Liste */
/* */
/* ************************************************************************** */
$sql
=
"SELECT d.rowid, d.libelle, d.cotisation"
;
$sql
.
=
" FROM llx_adherent_type as d"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
();
$i
=
0
;
print
"<TABLE border=
\"
0
\"
cellspacing=
\"
0
\"
cellpadding=
\"
4
\"
>"
;
print
'<TR class="liste_titre">'
;
print
"<td>Id</td>"
;
print
"<td>Libelle</td><td>Soumis a cotisation</td><td> </td>"
;
print
"</TR>
\n
"
;
$var
=
True
;
while
(
$i
<
$num
)
{
$objp
=
$db
->
fetch_object
(
$i
);
$var
=!
$var
;
print
"<TR
$bc[$var]
>"
;
print
"<TD>"
.
$objp
->
rowid
.
"</td>
\n
"
;
print
'<TD>'
.
$objp
->
libelle
.
'</TD>'
;
print
'<TD>'
.
$objp
->
cotisation
.
'</TD>'
;
print
'<TD><a href="type.php?action=edit&rowid='
.
$objp
->
rowid
.
'">Editer</TD>'
;
print
"</tr>"
;
$i
++
;
}
print
"</table>"
;
}
else
{
print
$sql
;
print
$db
->
error
();
}
print
"<p><TABLE border=
\"
1
\"
width=
\"
100%
\"
cellspacing=
\"
0
\"
cellpadding=
\"
4
\"
><tr>"
;
/*
* Case 1
*/
print
'<td align="center" width="25%">[<a href="type.php?action=create">Nouveau Type</a>]</td>'
;
/*
* Case 2
*/
print
"<td align=
\"
center
\"
width=
\"
25%
\"
>-</td>"
;
/*
* Case 3
*/
print
"<td align=
\"
center
\"
width=
\"
25%
\"
>-</td>"
;
/*
* Case 4
*/
print
"<td align=
\"
center
\"
width=
\"
25%
\"
>-</td>"
;
print
"</tr></table></form><p>"
;
/* ************************************************************************** */
/* */
/* Création d'une fiche don */
/* */
/* ************************************************************************** */
if
(
$action
==
'create'
)
{
$sql
=
"SELECT s.nom,s.idp, f.amount, f.total, f.facnumber"
;
$sql
.
=
" FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp"
;
$sql
.
=
" AND f.rowid =
$facid
"
;
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
$num
=
$db
->
num_rows
();
if
(
$num
)
{
$obj
=
$db
->
fetch_object
(
0
);
$total
=
$obj
->
total
;
}
}
print_titre
(
"Nouveau type"
);
print
"<form action=
\"
$PHP_SELF
\"
method=
\"
post
\"
>"
;
print
'<table cellspacing="0" border="1" width="100%" cellpadding="3">'
;
print
'<input type="hidden" name="action" value="add">'
;
print
'<tr><td>Libellé</td><td><input type="text" name="libelle" size="40"></td></tr>'
;
print
'<tr><td>Soumis à cotisation</td><td>'
;
print
'<select name="cotisation"><option value="yes">oui</option>'
;
print
'<option value="no">non</option></select>'
;
print
'<tr><td valign="top">Commentaires :</td><td>'
;
print
"<textarea name=
\"
comment
\"
wrap=
\"
soft
\"
cols=
\"
40
\"
rows=
\"
15
\"
></textarea></td></tr>"
;
print
'<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"></td></tr>'
;
print
"</form>
\n
"
;
print
"</table>
\n
"
;
}
/* ************************************************************************** */
/* */
/* Edition de la fiche */
/* */
/* ************************************************************************** */
if
(
$rowid
>
0
&&
$action
==
'edit'
)
{
$adht
=
new
AdherentType
(
$db
);
$adht
->
id
=
$rowid
;
$adht
->
fetch
(
$rowid
);
print_titre
(
"Edition de la fiche"
);
print
"<form action=
\"
$PHP_SELF
\"
method=
\"
post
\"
>"
;
print
'<table cellspacing="0" border="1" width="100%" cellpadding="3">'
;
print
'<tr><td>Libellé</td><td class="valeur">'
.
$adht
->
libelle
.
' </td></tr>'
;
print
'<tr><td>Soumis à cotisation</td><td class="valeur">'
.
$adht
->
cotisation
.
' </td></tr>'
;
print
'<tr><td valign="top">Commentaires</td>'
;
print
'<td valign="top" width="50%">'
;
print
nl2br
(
$adht
->
commentaire
)
.
' </td></tr>'
;
print
"</table>
\n
"
;
/*
*
*
*
*/
print
'<form method="post" action="'
.
$PHP_SELF
.
'?rowid='
.
$rowid
.
'">'
;
print
'<input type="hidden" name="rowid" value="'
.
$rowid
.
'">'
;
print
'<input type="hidden" name="action" value="update">'
;
print
'<table cellspacing="0" border="1" width="100%" cellpadding="3">'
;
print
'<tr><td>Libellé</td><td><input type="text" name="libelle" size="40" value="'
.
$adht
->
libelle
.
'"></td></tr>'
;
print
'<tr><td>Soumis à cotisation</td><td>'
;
$htmls
=
new
Form
(
$db
);
$htmls
->
selectyesno
(
"cotisation"
,
$adht
->
cotisation
);
print
'<tr><td valign="top">Commentaires :</td><td>'
;
print
"<textarea name=
\"
comment
\"
wrap=
\"
soft
\"
cols=
\"
40
\"
rows=
\"
15
\"
>"
.
$adht
->
commentaire
.
"</textarea></td></tr>"
;
print
'<tr><td colspan="2" align="center"><input type="submit" value="Enregistrer"</td></tr>'
;
print
'</table>'
;
print
"</form>"
;
}
$db
->
close
();
llxFooter
(
"<em>Dernière modification
$Date
$ révision
$Revision
$</em>"
);
?>
This diff is collapsed.
Click to expand it.
mysql/tables/Makefile
+
1
−
0
View file @
bc08f313
...
...
@@ -35,6 +35,7 @@ create:
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< c_stcomm.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< c_typent.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< llx_adherent.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< llx_adherent_type.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< llx_bank.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< llx_bank_account.sql
$(
MYSQL
)
$(
OPTIONS
)
$(
BASE
)
< llx_bank_categ.sql
...
...
This diff is collapsed.
Click to expand it.
mysql/tables/drop.sql
+
2
−
0
View file @
bc08f313
...
...
@@ -45,6 +45,8 @@ drop table if exists c_typent ;
drop
table
if
exists
llx_adherent
;
drop
table
if
exists
llx_adherent_type
;
drop
table
if
exists
llx_bank
;
drop
table
if
exists
llx_bank_account
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment