Précédent   Forum du club des développeurs et IT Pro > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 09/01/2013, 06h54   #1
MisTer KaliMan
Invité de passage
 
Homme Anthony
Inscription : janvier 2013
Messages : 4
Détails du profil
Informations personnelles :
Nom : Homme Anthony
Localisation : France, Loiret (Centre)

Informations professionnelles :
Secteur : Transports

Informations forums :
Inscription : janvier 2013
Messages : 4
Points : 0
Points : 0
Par défaut Aide à la modification d'un module

Bonjour à tous,

Je viens de découvrir votre forum, tout d'abord, quel forum, j'ai rarement vu un forum aussi complet.
Je pense avoir enfin trouver une communauté pour m'aider à faire ce que je souhaite.
Par contre j'espère être dans la bonne section, sinon désolé par avance.

Donc voilà j'ai créé un site pour une guilde d'un jeu. Je passe par le CSS de Nuked Klan sur la dernière version.
Sur mon site, j'ai un module recrutement déjà incorporé au thème de mon site.
J'aimerais pouvoir personnaliser se module, supprimer et ajouter des questions, jusque là je peux m'en sortir mais vite fais. Par contre j'aimerais rajouter des questions avec une réponse à choisir parmi une liste déroulante, ou à cocher et çà je ne sais pas du tout comment faire.
Voilà, si je suis dans la bonne partie et que quelqu'un peux m'aider, je posterais les fichiers en .php correspondant.

Merci à tous par avance et bonne journée.

Amicalement.
MisTer KaliMan est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/01/2013, 08h13   #2
Exia93
Membre Expert
 
Homme
Étudiant
Inscription : avril 2012
Messages : 611
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : avril 2012
Messages : 611
Points : 1 069
Points : 1 069
Bonjour,

si je comprend bien tu voudrait une interface d'administration qui te permette de gerer les questions de ton module de recrutement ? (Ajouter de nouvelle questions, les supprimer, modifier leur type(passer d'une liste déroulante à des checkbox), ...)
Exia93 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/01/2013, 08h20   #3
MisTer KaliMan
Invité de passage
 
Homme Anthony
Inscription : janvier 2013
Messages : 4
Détails du profil
Informations personnelles :
Nom : Homme Anthony
Localisation : France, Loiret (Centre)

Informations professionnelles :
Secteur : Transports

Informations forums :
Inscription : janvier 2013
Messages : 4
Points : 0
Points : 0
Bonjour,

Non enfin de compte je souhaiterais modifier simplement le module recrutement, enlever dans celui actuel les questions qui me dérange et rajouter celles que j'ai besoin, mais pour certaines questions, il y a soit une réponse à choisir dans une liste soit une case à cocher.
MisTer KaliMan est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/01/2013, 19h27   #4
MisTer KaliMan
Invité de passage
 
Homme Anthony
Inscription : janvier 2013
Messages : 4
Détails du profil
Informations personnelles :
Nom : Homme Anthony
Localisation : France, Loiret (Centre)

Informations professionnelles :
Secteur : Transports

Informations forums :
Inscription : janvier 2013
Messages : 4
Points : 0
Points : 0
Je vous met les 2 fichiers en .php pour que vous compreniez de quoi je parle :


Le fichier admin.php

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<?php 
// -------------------------------------------------------------------------//
// Nuked-KlaN - PHP Portal                                                  //
// <a href="http://www.nuked-klan.org" target="_blank">http://www.nuked-klan.org</a>                                                //
// -------------------------------------------------------------------------//
// 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.           //
// -------------------------------------------------------------------------//
if (!defined("INDEX_CHECK"))
{
    die ("<div style=\"text-align: center;\">You cannot open this page directly</div>");
} 
 
global $user, $language;
translate("modules/Recruit/lang/" . $language . ".lang.php");
include("modules/Admin/design.php");
admintop();
 
if (!$user)
{
    $visiteur = 0;
} 
else
{
    $visiteur = $user[1];
} 
$ModName = basename(dirname(__FILE__));
$level_admin = admin_mod($ModName);
if ($visiteur >= $level_admin && $level_admin > -1)
{
    function main()
    {
        global $nuked, $language;
 
	echo "<div class=\"content-box\">\n" //<!-- Start Content Box -->
		. "<div class=\"content-box-header\"><h3>" . _RECRUIT . "</h3>\n"
        . "<div style=\"text-align:right;\"><a href=\"help/" . $language . "/Recruit.php\" rel=\"modal\">\n"
	. "<img style=\"border: 0;\" src=\"help/help.gif\" alt=\"\" title=\"" . _HELP . "\" /></a>\n"
	. "</div></div>\n"
	. "<div class=\"tab-content\" id=\"tab2\"><div style=\"text-align: center;\">" . _NAVRECRUIT . "<b> | "
	. "<a href=\"index.php?file=Recruit&amp;page=admin&amp;op=edit_pref\">" . _PREFS . "</a></b></div><br />"
	. "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">\n"
	. "<tr>\n"
	. "<td style=\"width: 25%;\" align=\"center\"><b>" . _NICK . "</b></td>\n"
	. "<td style=\"width: 20%;\" align=\"center\"><b>" . _FIRSTNAME . "</b></td>\n"
	. "<td style=\"width: 15%;\" align=\"center\"><b>" . _GAME . "</b></td>\n"
	. "<td style=\"width: 20%;\" align=\"center\"><b>" . _MAIL . "</b></td>\n"
	. "<td style=\"width: 20%;\" align=\"center\"><b>" . _DATE . "</b></td></tr>\n";
 
        $sql = mysql_query("SELECT id, pseudo, prenom, mail, game, date FROM " . RECRUIT_TABLE . " ORDER BY id DESC");
        $count = mysql_num_rows($sql);
        while (list($rid, $pseudo, $prenom, $mail, $game, $date) = mysql_fetch_array($sql))
        {
            $date = strftime("%x", $date);
 
            $sql2 = mysql_query("SELECT name FROM " . GAMES_TABLE . " WHERE id='$game'");
            list($game_name) = mysql_fetch_array($sql2);
            $game_name = htmlentities($game_name);
 
 
            echo "<tr>\n"
            . "<td style=\"width: 25%;\" align=\"center\"><a href=\"index.php?file=Recruit&amp;page=admin&amp;op=view&amp;rid=" . $rid . "\">" . $pseudo . "</a></td>\n"
            . "<td style=\"width: 20%;\" align=\"center\">" . $prenom . "</td>\n"
            . "<td style=\"width: 15%;\" align=\"center\">" . $game_name . "</td>\n"
            . "<td style=\"width: 20%;\" align=\"center\"><a href=\"mailto:" . $mail . "\">" . $mail . "</a></td>\n"
            . "<td style=\"width: 20%;\" align=\"center\">" . $date . "</td></tr>\n";
        } 
        if ($count == 0)
        {
            echo "<tr><td colspan=\"5\" align=\"center\">" . _NORECRUIT . "</td></tr>\n";
        } 
        echo "</table><div style=\"text-align: center;\"><br />[ <a href=\"index.php?file=Admin\"><b>" . _BACK . "</b></a> ]</div><br /></div></div>\n";
    } 
 
    function edit_pref()
    {
        global $nuked, $language;
 
        $charte = $nuked['recrute_charte'];
 
        if ($nuked['recrute'] == 1)
        {
            $etat = _OPEN;
        } 
        else
        {
            $etat = _CLOSE;
        } 
 
       echo "<div class=\"content-box\">\n" //<!-- Start Content Box -->
		. "<div class=\"content-box-header\"><h3>" . _RECRUIT . "</h3>\n"
        . "<div style=\"text-align:right;\"><a href=\"help/" . $language . "/Recruit.php\" rel=\"modal\">\n"
	. "<img style=\"border: 0;\" src=\"help/help.gif\" alt=\"\" title=\"" . _HELP . "\" /></a>\n"
	. "</div></div>\n"
	. "<div class=\"tab-content\" id=\"tab2\"><div style=\"text-align: center;\"><b><a href=\"index.php?file=Recruit&amp;page=admin\">" . _NAVRECRUIT . "</a> | "
	. "</b>" . _PREFS . "</div><br />\n"
	. "<form method=\"post\" action=\"index.php?file=Recruit&amp;page=admin&amp;op=update_pref\" onsubmit=\"backslash('charte_recruit');\">\n"
	. "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
	. "<tr><td><b>" . _RECRUTE . "</b> : <select name=\"recrute\">\n"
	. "<option value=\"" . $nuked['recrute'] . "\">" . $etat . "</option>\n"
	. "<option value=\"1\">" . _OPEN . "</option>\n"
	. "<option value=\"0\">" . _CLOSE . "</option></select></td></tr>\n"
	. "<tr><td><b>" . _MAILAVERT . "</b> : <input type=\"text\" size=\"30\" name=\"recrute_mail\" value=\"" . $nuked['recrute_mail'] . "\" /></td></tr>\n"
	. "<tr><td><b>" . _INBOXAVERT . "</b> : <select name=\"recrute_inbox\"><option value=\"\">" . _OFF . "</option>\n";
 
        $sql2 = mysql_query("SELECT id, pseudo FROM " . USER_TABLE . " WHERE niveau > 1 ORDER BY niveau DESC");
        while (list($id_user, $pseudo) = mysql_fetch_array($sql2))
        {
            if ($nuked['recrute_inbox'] == $id_user)
            {
                $checked = "selected=\"selected\"";
            } 
            else
            {
                $checked = "";
            } 
 
            echo "<option value=\"" . $id_user . "\" " . $checked . ">" . $pseudo . "</option>\n";
        } 
        echo "</select></td></tr><tr><td>&nbsp;</td></tr>\n";
 
 
 
        echo "<tr><td><b>" . _CHARTE . "</b> : <br /><textarea class=\"editor\" id=\"charte_recruit\" name=\"recrute_charte\" cols=\"65\" rows=\"15\">" . $charte . "</textarea></td></tr></table>\n"
	. "<div style=\"text-align: center;\"><input type=\"submit\" value=\"" . _SEND . "\" /></div>\n"
	. "<div style=\"text-align: center;\"><br />[ <a href=\"index.php?file=Recruit&amp;page=admin\"><b>" . _BACK . "</b></a> ]</div></form><br /></div></div>\n";
    } 
 
    function update_pref($recrute_mail, $recrute_inbox, $recrute_charte, $recrute)
    {
        global $nuked, $user;
 
		$recrute_charte = html_entity_decode($recrute_charte);
        $recrute_charte = mysql_real_escape_string(stripslashes($recrute_charte));
 
        $upd = mysql_query("UPDATE " . CONFIG_TABLE . " SET value = '" . $recrute . "' WHERE name = 'recrute'");
        $upd1 = mysql_query("UPDATE " . CONFIG_TABLE . " SET value = '" . $recrute_charte . "' WHERE name = 'recrute_charte'");
        $upd2 = mysql_query("UPDATE " . CONFIG_TABLE . " SET value = '" . $recrute_mail . "' WHERE name = 'recrute_mail'");
        $upd3 = mysql_query("UPDATE " . CONFIG_TABLE . " SET value = '" . $recrute_inbox . "' WHERE name = 'recrute_inbox'");
		// Action
		$texteaction = "". _ACTIONPREFREC .".";
		$acdate = time();
		$sqlaction = mysql_query("INSERT INTO ". $nuked['prefix'] ."_action  (`date`, `pseudo`, `action`)  VALUES ('".$acdate."', '".$user[0]."', '".$texteaction."')");
		//Fin action
		echo "<div class=\"notification success png_bg\">\n"
		. "<div>\n"
		. "" . _PREFUPDATE . "\n"
		. "</div>\n"
		. "</div>\n";
        redirect("index.php?file=Recruit&page=admin", 2);
    } 
 
    function view($rid)
    {
        global $nuked, $language;
 
        echo "<script type=\"text/javascript\">\n"
	. "<!--\n"
	. "\n"
	. "function del_recruit(pseudo, id)\n"
	. "{\n"
	. "if (confirm('" . _DELETERECRUTE . " '+pseudo+' ! " . _CONFIRM . "'))\n"
	. "{document.location.href = 'index.php?file=Recruit&page=admin&op=del&rid='+id;}\n"
	. "}\n"
    	. "\n"
	. "// -->\n"
	. "</script>\n";
 
        echo "<div class=\"content-box\">\n" //<!-- Start Content Box -->
		. "<div class=\"content-box-header\"><h3>" . _RECRUIT . "</h3>\n"
        . "<div style=\"text-align:right;\"><a href=\"help/" . $language . "/Recruit.php\" rel=\"modal\">\n"
	. "<img style=\"border: 0;\" src=\"help/help.gif\" alt=\"\" title=\"" . _HELP . "\" /></a>\n"
	. "</div></div>\n"
	. "<div class=\"tab-content\" id=\"tab2\"><table width=\"90%\" style=\"margin-left: auto;margin-right: auto;text-align: left;\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td>\n";
 
        $sql = mysql_query("SELECT pseudo, prenom, age, mail, icq, country, game, `connection`, experience, dispo, comment FROM " . RECRUIT_TABLE . " WHERE id = '" . $rid . "'");
        list($pseudo, $prenom, $age, $mail, $icq, $country, $game, $connection, $experience, $dispo, $comment) = mysql_fetch_array($sql);
        list ($pays, $ext) = explode ('.', $country);
 
        $sql2 = mysql_query("SELECT name FROM " . GAMES_TABLE . " WHERE id = '" . $game . "'");
        list($game_name) = mysql_fetch_array($sql2);
        $game_name = htmlentities($game_name);
 
        echo "<b>" . _NICK . " : </b>" . $pseudo . "<br />\n"
	. "<b>" . _FIRSTNAME . " : </b>" . $prenom . "<br />\n"
	. "<b>" . _AGE . " : </b>" . $age . "<br />\n"
	. "<b>" . _MAIL . " : </b><a href=\"mailto:" . $mail . "\">" . $mail . "</a><br />\n"
	. "<b>" . _ICQMSN . " : </b>" . $icq . "<br />\n"
	. "<b>" . _COUNTRY . " : </b>" . $pays . "<br />\n"
	. "<b>" . _GAME . " : </b>" . $game_name . "<br />\n"
	. "<b>" . _CONNECT . " : </b>" . $connection . "<br />\n"
	. "<b>" . _EXPERIENCE . " : </b>" . $experience . "<br />\n"
	. "<b>" . _AVAILABLE . " : </b>" . $dispo . "<br /><br />\n"
	. "<b>" . _COMMENT . " : </b>" . $comment . "<br /><br />\n";
 
        echo "</td></tr></table><div style=\"text-align: center;\"><input type=\"submit\" value=\"" . _REMOVE . "\" onclick=\"javascript:del_recruit('" . mysql_real_escape_string(stripslashes($pseudo)) . "', '" . $rid . "');\" /></div>\n"
	. "<div style=\"text-align: center;\"><br /><br />[ <a href=\"index.php?file=Recruit&amp;page=admin\"><b>" . _BACK . "</b></a> ]</div><br /></div></div>\n";
    } 
 
    function del($rid)
    {
        global $nuked, $user;
 
        $del = mysql_query("DELETE FROM " . RECRUIT_TABLE . " WHERE id = '" . $rid ."'");
		// Action
		$texteaction = "". _ACTIONDELREC .".";
		$acdate = time();
		$sqlaction = mysql_query("INSERT INTO ". $nuked['prefix'] ."_action  (`date`, `pseudo`, `action`)  VALUES ('".$acdate."', '".$user[0]."', '".$texteaction."')");
		//Fin action
		echo "<div class=\"notification success png_bg\">\n"
		. "<div>\n"
		. "" . _RECRUITDELETE . "\n"
		. "</div>\n"
		. "</div>\n";
        redirect("index.php?file=Recruit&page=admin", 2);
    } 
 
    switch ($_REQUEST['op'])
    {
        case "view":
            view($_REQUEST['rid']);
            break;
 
        case "del":
            del($_REQUEST['rid']);
            break;
 
        case "edit_pref":
            edit_pref();
            break;
 
        case "update_pref":
            update_pref($_REQUEST['recrute_mail'], $_REQUEST['recrute_inbox'], $_REQUEST['recrute_charte'], $_REQUEST['recrute']);
            break;
 
        default:
            main();
            break;
    } 
 
} 
else if ($level_admin == -1)
{
    echo "<div class=\"notification error png_bg\">\n"
	. "<div>\n"
	. "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />"
	. "</div>\n"
	. "</div>\n";
}
else if ($visiteur > 1)
{
    echo "<div class=\"notification error png_bg\">\n"
	. "<div>\n"
	. "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />"
	. "</div>\n"
	. "</div>\n";
}
else
{
    echo "<div class=\"notification error png_bg\">\n"
	. "<div>\n"
	. "<br /><br /><div style=\"text-align: center;\">" . _ZONEADMIN . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />"
	. "</div>\n"
	. "</div>\n";
} 
 
adminfoot();
 
?>

Le fichier index.php :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<?php
// -------------------------------------------------------------------------//
// Nuked-KlaN - PHP Portal                                                  //
// <a href="http://www.nuked-klan.org" target="_blank">http://www.nuked-klan.org</a>                                                //
// -------------------------------------------------------------------------//
// 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.           //
// -------------------------------------------------------------------------//
defined('INDEX_CHECK') or die ('You can\'t run this file alone.');
 
global $nuked, $language, $user, $cookie_captcha;
translate('modules/Recruit/lang/' . $language . '.lang.php');
 
// Inclusion système Captcha
include_once('Includes/nkCaptcha.php');
 
// On determine si le captcha est actif ou non
if (_NKCAPTCHA == 'off') $captcha = 0;
else if ((_NKCAPTCHA == 'auto' OR _NKCAPTCHA == 'on') && $user[1] > 0)  $captcha = 0;
else $captcha = 1;
 
opentable();
 
$visiteur = $user ? $user[1] : 0;
 
$ModName = basename(dirname(__FILE__));
$level_access = nivo_mod($ModName);
if ($visiteur >= $level_access && $level_access > -1)
{
    compteur('Recruit');
 
    if ($nuked['recrute'] > 0)
    {
        function index()
        {
            global $nuked;
 
            if ($nuked['recrute_charte'] != '')
            {
				echo "<br /><table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"90%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">\n"
				. "<tr><td align=\"center\"><big><b>" . _RECRUIT . "</b></big></td></tr>\n"
				. "<tr><td>&nbsp;</td></tr><tr><td>" . html_entity_decode($nuked['recrute_charte']) . "</td></tr></table>\n"
				. "<form method=\"post\" action=\"index.php?file=Recruit\">\n"
				. "<div style=\"text-align: center;\"><input type=\"hidden\" name=\"op\" value=\"form\" />\n"
				. "<input type=\"submit\" value=\"" . _IAGREE . "\" />&nbsp;<input type=\"button\" value=\"" . _IDESAGREE . "\" onclick=\"javascript:history.back()\" /></div></form>\n";
            }
            else
            {
                form();
            }
        }
 
        function form()
        {
            global $nuked, $user, $language, $captcha;
 
			define('EDITOR_CHECK', 1);
 
			echo "<script type=\"text/javascript\">\n"
			."<!--\n"
			."\n"
			. "function verifchamps()\n"
			. "{\n"
			. "if (document.getElementById('recruit_pseudo').value.length == 0)\n"
			. "{\n"
			. "alert('" . _NONICK . "');\n"
			. "return false;\n"
			. "}\n"
			. "\n"
			. "if (document.getElementById('recruit_lastname').value.length == 0)\n"
			. "{\n"
			. "alert('" . _NOLASTNAME . "');\n"
			. "return false;\n"
			. "}\n"
			. "\n"
			. "if (document.getElementById('recruit_age').value.length == 0)\n"
			. "{\n"
			. "alert('" . _NOAGE . "');\n"
			. "return false;\n"
			. "}\n"
			."\n"
			. "if (isNaN(document.getElementById('recruit_age').value))\n"
			. "{\n"
			. "alert('" . _BADAGE . "');\n"
			. "return false;\n"
			. "}\n"
			."\n"
			."if (document.getElementById('recruit_mail').value.indexOf('@') == -1)\n"
			."{\n"
			."alert('" . _BADMAIL . "');\n"
			."return false;\n"
			."}\n"
			."\n"
			. "if (document.getElementById('recruit_icq').value.length == 0)\n"
			. "{\n"
			. "alert('" . _NOICQ . "');\n"
			. "return false;\n"
			. "}\n"
			."\n"
			. "return true;\n"
			. "}\n"
			."\n"
			. "// -->\n"
			. "</script>\n";
 
 
			echo "<br /><form method=\"post\" action=\"index.php?file=Recruit\" onsubmit=\"return verifchamps();\">\n"
			. "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"90%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">\n"
			. "<tr><td colspan=\"2\" align=\"center\"><big><b>" . _RECRUIT . "</b></big></td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _NICK . " : </b></td><td><input id=\"recruit_pseudo\" type=\"text\" name=\"pseudo\" value=\"" . $user[2] . "\" size=\"20\" /></td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _FIRSTNAME . " : </b></td><td><input id=\"recruit_lastname\" type=\"text\" name=\"prenom\" size=\"20\" /></td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _AGE . " : </b></td><td><input id=\"recruit_age\" type=\"text\" name=\"age\" size=\"3\" /></td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _MAIL . " : </b></td><td><input id=\"recruit_mail\" type=\"text\" name=\"mail\" size=\"25\" /></td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _ICQMSN . " : </b></td><td><input id=\"recruit_icq\" type=\"text\" name=\"icq\" size=\"25\" /></td></tr>\n"
			. "<tr><td style=\"width: 20%;\"><b>" . _COUNTRY . " : </b></td><td><select name=\"country\">\n";
 
			if ($language == "french")
			{
				$pays = "France.gif";
			}
 
			$rep = Array();
			$handle = @opendir("images/flags");
			while (false !== ($f = readdir($handle)))
			{
				if ($f != ".." && $f != "." && $f != "index.html" && $f != "Thumbs.db")
				{
					$rep[] = $f;
				}
			}
 
			closedir($handle);
			sort ($rep);
			reset ($rep);
 
			while (list ($key, $filename) = each ($rep))
			{
				if ($filename == $pays)
				{
					$checked = "selected=\"selected\"";
				}
				else
				{
					$checked = "";
				}
 
				list ($country, $ext) = explode ('.', $filename);
				echo "<option value=\"" . $filename . "\" " . $checked . ">" . $country . "</option>\n";
			}
 
			echo "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _GAME . " : </b></td><td><select name=\"game\">\n";
 
			$sql = mysql_query("SELECT id, name FROM " . GAMES_TABLE . " ORDER BY name");
			while (list($game_id, $nom) = mysql_fetch_array($sql))
			{
				$nom = htmlentities($nom);
				echo "<option value=\"" . $game_id . "\">" . $nom . "</option>\n";
			}
 
			echo "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _CONNECT . " : </b></td><td><select name=\"connex\">\n"
			. "<option>" . _56K . "</option>\n"
			. "<option>" . _NUMERIS . "</option>\n"
			. "<option>" . _ADSL . "</option>\n"
			. "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _EXPERIENCE . " : </b></td><td><select name=\"exp\">\n"
			. "<option>" . _LESS1MONTH . "</option>\n"
			. "<option>" . _LESS6MONTH . "</option>\n"
			. "<option>" . _LESS1YEAR . "</option>\n"
			. "<option>" . _MORE1YEAR . "</option>\n"
			. "<option>" . _MORE2YEAR . "</option>\n"
			. "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _AVAILABLE . " : </b></td><td><select name=\"dispo\">\n"
			. "<option>" . _EVENING . "</option>\n"
			. "<option>" . _WEEKEND . "</option>\n"
			. "<option>" . _HOLIDAY . "</option>\n"
			. "<option>" . _THREE . "</option>\n"
			. "<option>" . _OTHER . "</option>\n"
			. "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _COMMENT . " : </b></td><td><textarea id=\"e_basic\" name=\"comment\" cols=\"60\" rows=\"10\"></textarea></td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\n";
 
			if ($captcha == 1) create_captcha(2);
 
			echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"" . _SEND . "\" /><input type=\"hidden\" name=\"op\" value=\"send_recruit\" /></td></tr></table></form><br />\n";
        }
 
        function send_recruit($pseudo, $prenom, $age, $mail, $icq, $country, $game, $connex, $exp, $dispo, $comment)
        {
            global $nuked, $captcha;
 
			// Verification code captcha
            if ($captcha == 1 && !ValidCaptchaCode($_POST['code_confirm']))
            {
				echo "<br /><br /><div style=\"text-align: center;\">" . _BADCODECONFIRM . "<br /><br /><a href=\"javascript:history.back()\">[ <b>" . _BACK . "</b> ]</a></div><br /><br />";
				closetable();
				footer();
				exit();
            }
 
            if (!is_numeric($age)) {
                echo "<br /><br /><div style=\"text-align: center;\">" . _BADAGE . "<br /><br /><a href=\"javascript:history.back()\">[ <b>" . _BACK . "</b> ]</a></div><br /><br />";
				closetable();
				footer();
				exit();
            }
 
            $inbox = $nuked['recrute_inbox'];
            $email = $nuked['recrute_mail'];
            $date = time();
            $date2 = nkDate($date);
 
			$comment = secu_html(html_entity_decode($comment));
 
            $pseudo = mysql_real_escape_string(stripslashes($pseudo));
            $prenom = mysql_real_escape_string(stripslashes($prenom));
            $age = intval($age);
            $mail = mysql_real_escape_string(stripslashes($mail));
            $icq = mysql_real_escape_string(stripslashes($icq));
            $country = mysql_real_escape_string(stripslashes($country));
            $connex = mysql_real_escape_string(stripslashes($connex));
            $exp = mysql_real_escape_string(stripslashes($exp));
            $dispo = mysql_real_escape_string(stripslashes($dispo));
            $comment = mysql_real_escape_string(stripslashes($comment));
 
            $pseudo = htmlentities($pseudo);
            $prenom = htmlentities($prenom);
            $mail = htmlentities($mail);
            $icq = htmlentities($icq);
            $country = htmlentities($country);
            $connex = htmlentities($connex);
            $exp = htmlentities($exp);
            $dispo = htmlentities($dispo);
 
            $sql = mysql_query("INSERT INTO " . RECRUIT_TABLE . " ( `id` , `date` , `pseudo` , `prenom` , `age` , `mail` , `icq` , `country` , `game` , `connection` , `experience` , `dispo` , `comment` ) VALUES ( '' , '" . $date . "' , '" . $pseudo . "' , '" . $prenom . "' , '" . $age . "' , '" . $mail . "' , '" . $icq . "' , '" . $country . "' , '" . $game . "' , '" . $connex . "' , '" . $exp . "' , '" . $dispo . "' , '" . $comment. "' )");
			$upd2 = mysql_query("INSERT INTO ". $nuked['prefix'] ."_notification  (`date` , `type` , `texte`)  VALUES ('".$date."', '1', '"._NOTDEM.": [<a href=\"index.php?file=Recruit&page=admin\">lien</a>].')");
 
            $subject = _RECRUIT . ", " . $date2;
            $corps = $pseudo . " " . _NEWRECRUIT . "\r\n" . $nuked['url'] . "/index.php?file=Recruit&page=admin\r\n\r\n\r\n" . $nuked['name'] . " - " . $nuked['slogan'];
            $from = "From: " . $nuked['name'] . " <" . $nuked['mail'] . ">\r\nReply-To: " . $mail;
 
            $subject = @html_entity_decode($subject);
            $corps = @html_entity_decode($corps);
            $from = @html_entity_decode($from);
 
            if ($email != "")
            {
                mail($email, $subject, $corps, $from);
            }
            if ($inbox != "")
            {
                $sql2 = mysql_query("INSERT INTO " . USERBOX_TABLE . " ( `mid` , `user_from` , `user_for` , `titre` , `message` , `date` , `status` ) VALUES ( '' , '" . $inbox . "' , '" . $inbox . "' , '" . $subject . "' , '" . $corps . "' , '" . $date . "' , '0' )");
            }
 
            echo "<br /><br /><div style=\"text-align: center;\">" . _SENDRECRUIT . "</div><br /><br />";
            redirect("index.php", 2);
        }
 
        switch ($_REQUEST['op'])
        {
            case"index":
                index();
                break;
 
            case"form":
                form();
                break;
 
            case"send_recruit":
                send_recruit($_REQUEST['pseudo'], $_REQUEST['prenom'], $_REQUEST['age'], $_REQUEST['mail'], $_REQUEST['icq'], $_REQUEST['country'], $_REQUEST['game'], $_REQUEST['connex'], $_REQUEST['exp'], $_REQUEST['dispo'], $_REQUEST['comment']);
                break;
 
            default:
                index();
                break;
        }
    }
    else
    {
        echo "<br /><br /><div style=\"text-align: center;\">" . _RECRUITOFF . "</div><br /><br />";
    }
 
}
else if ($level_access == -1)
{
    echo "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />";
}
else if ($level_access == 1 && $visiteur == 0)
{
    echo "<br /><br /><div style=\"text-align: center;\">" . _USERENTRANCE . "<br /><br /><b><a href=\"index.php?file=User&amp;op=login_screen\">" . _LOGINUSER . "</a> | <a href=\"index.php?file=User&amp;op=reg_screen\">" . _REGISTERUSER . "</a></b></div><br /><br />";
}
else
{
    echo "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />";
}
 
closetable();
 
?>
MisTer KaliMan est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/01/2013, 18h25   #5
MisTer KaliMan
Invité de passage
 
Homme Anthony
Inscription : janvier 2013
Messages : 4
Détails du profil
Informations personnelles :
Nom : Homme Anthony
Localisation : France, Loiret (Centre)

Informations professionnelles :
Secteur : Transports

Informations forums :
Inscription : janvier 2013
Messages : 4
Points : 0
Points : 0
Bonsoir,

Désolé pour la balise.

Personne ne serais dispo pour m'aider ?

Bonne soirée.
MisTer KaliMan est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 12h21.


 
 
 
 
Partenaires

Hébergement Web