root/trunk/includes/actions/contactform.php

Revision 1, 3.0 KB (checked in by anonymous, 7 years ago)

initial import

Line 
1<?php
2/****************************************************** Open .node ***
3 * Description:   
4 * Status:        Stable.
5 * Author:        Alexandre Dath <alexandre@dotnode.com>
6 * $Id$
7 *
8 * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ******************** http://opensource.ikse.net/projects/dotnode ***/
24
25// Action d'envoi d'email par un formulaire
26
27if( array_key_exists('rval', $_GET) )
28{
29        switch($_GET['rval'])
30        {
31        case 0:
32                print "L'email a � envoy�vec succ�";
33        break;
34    case 99:
35        print "L'email que vous avez indiquez n'est pas valide.<br />\n";
36        break;
37    case 999:
38        print "Erreur inconnu\n";
39        break;
40        default:
41        print $_GET['rval'];
42        }
43}
44else
45{
46        print "<div id='contactform'>\n";
47        print "<form action='/action.php' method='post'><br />\n";
48        print "<label for='nom'><b>Nom :</b></label><br /><input id='nom' name='nom'><br />\n";
49        print "<label for='societe'><b>Soci� :</b></label><br /><input id='societe' name='societe'><br />\n";
50        print "<label for='adresse'>Adresse :</label><br /><textarea id='adresse' name='adresse' cols='30' rows='4'></textarea><br />\n";
51    print "<label for='cp'>Code Postal :</label><br /><input id='cp' name='cp' /><br />\n";
52        print "<label for='ville'>Ville :</label><br /><input id='ville' name='ville' /><br />\n";
53        print "<label for='tel'>Tel :</label><br /><input id='tel' name='tel' /><br />\n";
54        print "<label for='fax'>Fax :</label><br /><input id='fax' name='fax' /><br />\n";
55        print "<label for='email'><b>Email :</b></label><br /><input id='email' name='email' /><br />\n";
56    print "<label for='sujet'><b>Sujet de l'email :</b></label><br /><input id='sujet' name='sujet' /><br />\n";
57        print "<label for='contenu'><b>Contenu de l'email :</b></label><br />\n";
58        print "<input type='hidden' name='rurl' value='".$_SERVER["PHP_SELF"]."' />\n";
59        print "<input type='hidden' name='p' value='static' />\n";
60        print "<input type='hidden' name='s' value='contact' />\n";
61        print "<input type='hidden' name='a' value='email' />\n";
62        print "<textarea id='contenu' name='contenu' cols='70' rows='10'></textarea><br />\n";
63    print "<input type='submit' name='submit' value='Envoyer' />\n";
64        print "</form>\n";
65        print "</div>\n";
66}
67
68
69?>
Note: See TracBrowser for help on using the browser.