Merge commit 'origin/fusionax' into account
[platal.git] / modules / register.php
CommitLineData
f59bc2fb 1<?php
2/***************************************************************************
8d84c630 3 * Copyright (C) 2003-2009 Polytechnique.org *
f59bc2fb 4 * http://opensource.polytechnique.org/ *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the Free Software *
18 * Foundation, Inc., *
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
20 ***************************************************************************/
21
22class RegisterModule extends PLModule
23{
24 function handlers()
25 {
26 return array(
20d90835 27 'register' => $this->make_hook('register', AUTH_PUBLIC),
28 'register/end' => $this->make_hook('end', AUTH_PUBLIC),
2b6d403c 29 'register/end.php' => $this->make_hook('end_old', AUTH_PUBLIC),
f59bc2fb 30 'register/success' => $this->make_hook('success', AUTH_MDP),
97a0a459 31 'register/save' => $this->make_hook('save', AUTH_MDP),
f59bc2fb 32 );
33 }
34
20d90835 35 function handler_register(&$page, $hash = null)
f59bc2fb 36 {
5480a216 37 $alert = null;
cab08090 38 $sub_state = S::v('sub_state', Array());
f59bc2fb 39 if (!isset($sub_state['step'])) {
40 $sub_state['step'] = 0;
41 }
2efe5355 42 if (!isset($sub_state['backs'])) {
43 $sub_state['backs'] = array();
44 }
5e2307dc 45 if (Get::has('back') && Get::i('back') < $sub_state['step']) {
46 $sub_state['step'] = max(0,Get::i('back'));
2efe5355 47 $state = $sub_state;
48 unset($state['backs']);
49 $sub_state['backs'][] = $state;
50 if (count($sub_state['backs']) == 3) {
51 $alert .= "Tentative d'inscription tres hesitante - ";
eaf30d86 52 }
f59bc2fb 53 }
54
2b6d403c 55 // Compatibility with old sources, keep it atm
56 if (!$hash && Env::has('hash')) {
5e2307dc 57 $hash = Env::v('hash');
2b6d403c 58 }
59
20d90835 60 if ($hash) {
08cce2ff 61 $res = XDB::query(
ecc734a5 62 "SELECT m.uid, u.promo, u.nom, u.prenom, u.matricule, u.naissance_ini, FIND_IN_SET('watch', u.flags)
f59bc2fb 63 FROM register_marketing AS m
64 INNER JOIN auth_user_md5 AS u ON u.user_id = m.uid
20d90835 65 WHERE m.hash={?}", $hash);
ecc734a5 66 if (list($uid, $promo, $nom, $prenom, $ourmat, $naiss, $watch) = $res->fetchOneRow()) {
f59bc2fb 67 $sub_state['uid'] = $uid;
20d90835 68 $sub_state['hash'] = $hash;
f59bc2fb 69 $sub_state['promo'] = $promo;
70 $sub_state['nom'] = $nom;
71 $sub_state['prenom'] = $prenom;
72 $sub_state['ourmat'] = $ourmat;
eaf30d86 73 $sub_state['watch'] = $watch;
ecc734a5 74 $sub_state['naissance_ini'] = $naiss;
f59bc2fb 75
08cce2ff 76 XDB::execute(
f59bc2fb 77 "REPLACE INTO register_mstats (uid,sender,success)
78 SELECT m.uid, m.sender, 0
79 FROM register_marketing AS m
80 WHERE m.hash", $sub_state['hash']);
81 }
82 }
83
84 switch ($sub_state['step']) {
85 case 0:
8f201b69
FB
86 $wp = new PlWikiPage('Reference.Charte');
87 $wp->buildCache();
f59bc2fb 88 if (Post::has('step1')) {
89 $sub_state['step'] = 1;
90 if (isset($sub_state['hash'])) {
91 $sub_state['step'] = 3;
460d8f55 92 $this->load('register.inc.php');
f59bc2fb 93 create_aliases($sub_state);
94 }
95 }
96 break;
97
98 case 1:
99 if (Post::has('promo')) {
5e2307dc 100 $promo = Post::i('promo');
a41bf2f8 101 $res = XDB::query("SELECT COUNT(*)
102 FROM auth_user_md5
103 WHERE perms='pending' AND deces = '0000-00-00'
104 AND promo = {?}",
105 $promo);
106 if (!$res->fetchOneCell()) {
107 $err = "La promotion saisie est incorrecte ou tous les camardes de cette promo sont inscrits !";
f59bc2fb 108 } else {
109 $sub_state['step'] = 2;
110 $sub_state['promo'] = $promo;
111 if ($promo >= 1996 && $promo<2000) {
112 $sub_state['mat'] = ($promo % 100)*10 . '???';
113 } elseif($promo >= 2000) {
114 $sub_state['mat'] = 100 + ($promo % 100) . '???';
115 }
116 }
117 }
118 break;
119
120 case 2:
121 if (count($_POST)) {
460d8f55 122 $this->load('register.inc.php');
5e2307dc 123 $sub_state['prenom'] = Post::v('prenom');
124 $sub_state['nom'] = Post::v('nom');
125 $sub_state['mat'] = Post::v('mat');
f59bc2fb 126 $err = check_new_user($sub_state);
127
128 if ($err !== true) { break; }
129 $err = create_aliases($sub_state);
130 if ($err === true) {
131 unset($err);
132 $sub_state['step'] = 3;
133 }
134 }
135 break;
136
137 case 3:
138 if (count($_POST)) {
460d8f55 139 $this->load('register.inc.php');
c6310567 140 require_once 'emails.inc.php';
5e2307dc 141 if (!isvalid_email(Post::v('email'))) {
f59bc2fb 142 $err[] = "Le champ 'E-mail' n'est pas valide.";
5e2307dc 143 } elseif (!isvalid_email_redirection(Post::v('email'))) {
f59bc2fb 144 $err[] = $sub_state['forlife']." doit renvoyer vers un email existant ".
a7de4ef7 145 "valide, en particulier, il ne peut pas être renvoyé vers lui-même.";
f59bc2fb 146 }
1970c12b 147 $birth = trim(Env::v('naissance'));
12e5d7a6 148 if (!preg_match('@^[0-3]?\d/[01]?\d/(19|20)?\d{2}$@', $birth)) {
f59bc2fb 149 $err[] = "La 'Date de naissance' n'est pas correcte.";
35cd1be1 150 } else {
12e5d7a6 151 $birth = explode('/', $birth, 3);
7caaaf6d
AA
152 for ($i = 0; $i < 3; $i++)
153 $birth[$i] = intval($birth[$i]);
154 if ($birth[2] < 100) $birth[2] += 1900;
155 $year = $birth[2];
35cd1be1 156 $promo = (int)$sub_state['promo'];
157 if ($year > $promo - 15 || $year < $promo - 30) {
158 $err[] = "La 'Date de naissance' n'est pas correcte.";
5480a216 159 $alert = "Date de naissance incorrecte a l'inscription - ";
fb5d164e 160 $sub_state['wrong_naissance'] = $birth;
35cd1be1 161 }
f59bc2fb 162 }
163
bf273d6a 164 // Check if the given email is known as dangerous
15836cdd
FB
165 $res = XDB::query("SELECT w.state, w.description
166 FROM emails_watch AS w
167 WHERE w.email = {?} AND w.state != 'safe'",
168 Post::v('email'));
706ed3ef 169 $email_banned = false;
15836cdd
FB
170 if ($res->numRows()) {
171 list($state, $description) = $res->fetchOneRow();
172 $alert .= "Email surveille propose a l'inscription - ";
173 $sub_state['email_desc'] = $description;
706ed3ef
FB
174 if ($state == 'dangerous') {
175 $email_banned = true;
176 }
5480a216 177 }
0be07aa6 178 if ($sub_state['watch']) {
4653799f 179 $alert .= "Inscription d'un utilisateur surveillé - ";
0be07aa6 180 }
5480a216 181
182 if (check_ip('unsafe')) {
183 unset($err);
bf273d6a 184 }
185
f59bc2fb 186 if (isset($err)) {
187 $err = join('<br />', $err);
188 } else {
12e5d7a6
FB
189 $sub_state['naissance'] = sprintf("%04d-%02d-%02d",
190 intval($birth[2]), intval($birth[1]), intval($birth[0]));
ecc734a5 191 if ($sub_state['naissance_ini'] != '0000-00-00' && $sub_state['naissance'] != $sub_state['naissance_ini']) {
192 $alert .= "Date de naissance incorrecte à l'inscription - ";
193 }
5e2307dc 194 $sub_state['email'] = Post::v('email');
706ed3ef
FB
195 $ip_banned = check_ip('unsafe');
196 if ($ip_banned) {
197 $alert .= "Tentative d'inscription depuis une IP surveillee";
198 }
199 if ($email_banned || $ip_banned) {
115c90db 200 global $globals;
5480a216 201 $err = "Une erreur s'est produite lors de l'inscription."
1d55fe45 202 . " Merci de contacter <a href='mailto:register@{$globals->mail->domain}>"
203 . " register@{$globals->mail->domain}</a>"
5480a216 204 . " pour nous faire part de cette erreur";
5480a216 205 } else {
206 $sub_state['step'] = 4;
9fc2d0d2 207 if (count($sub_state['backs']) >= 3) {
a7de4ef7 208 $alert .= "Fin d'une inscription hésitante";
2efe5355 209 }
5480a216 210 finish_ins($sub_state);
211 }
bf273d6a 212 }
f59bc2fb 213 }
214 break;
215 }
216
217 $_SESSION['sub_state'] = $sub_state;
4653799f 218 if (!empty($alert)) {
5480a216 219 send_warning_mail($alert);
220 }
a41bf2f8 221 $page->changeTpl('register/step'.intval($sub_state['step']).'.tpl');
f59bc2fb 222 if (isset($err)) {
a7d35093 223 $page->trigError($err);
f59bc2fb 224 }
f59bc2fb 225 }
226
2b6d403c 227 function handler_end_old(&$page)
228 {
5e2307dc 229 return $this->handler_end($page, Env::v('hash'));
2b6d403c 230 }
231
f59bc2fb 232 function handler_end(&$page, $hash = null)
233 {
234 global $globals;
235
ecc734a5 236
f59bc2fb 237 $page->changeTpl('register/end.tpl');
a41bf2f8 238 $_SESSION['sub_state'] = array('step' => 5);
ecc734a5 239
240 if (check_ip('unsafe')) {
241 send_warning_mail('Une IP surveillée a tenté de finaliser son inscription');
242 XDB::execute('DELETE FROM register_pending
243 WHERE hash = {?} AND hash != \'INSCRIT\'', $hash);
244 return PL_FORBIDDEN;
245 }
246
f59bc2fb 247 require_once('user.func.inc.php');
248
249 if ($hash) {
08cce2ff 250 $res = XDB::query(
f59bc2fb 251 "SELECT r.uid, r.forlife, r.bestalias, r.mailorg2,
252 r.password, r.email, r.naissance, u.nom, u.prenom,
ecc734a5 253 u.promo, FIND_IN_SET('femme', u.flags), u.naissance_ini
f59bc2fb 254 FROM register_pending AS r
255 INNER JOIN auth_user_md5 AS u ON r.uid = u.user_id
20d90835 256 WHERE hash={?} AND hash!='INSCRIT'", $hash);
f59bc2fb 257 }
258
259 if (!$hash || !list($uid, $forlife, $bestalias, $mailorg2, $password, $email,
ecc734a5 260 $naissance, $nom, $prenom, $promo, $femme, $naiss_ini) = $res->fetchOneRow())
f59bc2fb 261 {
262 $page->kill("<p>Cette adresse n'existe pas, ou plus, sur le serveur.</p>
263 <p>Causes probables :</p>
264 <ol>
a7de4ef7 265 <li>Vérifie que tu visites l'adresse du dernier
266 e-mail reçu s'il y en a eu plusieurs.</li>
267 <li>Tu as peut-être mal copié l'adresse reçue par
268 mail, vérifie-la à la main.</li>
269 <li>Tu as peut-être attendu trop longtemps pour
270 confirmer. Les pré-inscriptions sont annulées
f59bc2fb 271 tous les 30 jours.</li>
a7de4ef7 272 <li>Tu es en fait déjà inscrit.</li>
f59bc2fb 273 </ol>");
274 }
275
276
277
278 /***********************************************************/
279 /****************** REALLY CREATE ACCOUNT ******************/
280 /***********************************************************/
281
08cce2ff 282 XDB::execute('UPDATE auth_user_md5
f59bc2fb 283 SET password={?}, perms="user",
284 date=NOW(), naissance={?}, date_ins = NOW()
285 WHERE user_id={?}', $password, $naissance, $uid);
08cce2ff 286 XDB::execute('REPLACE INTO auth_user_quick (user_id) VALUES ({?})', $uid);
287 XDB::execute('INSERT INTO aliases (id,alias,type)
f59bc2fb 288 VALUES ({?}, {?}, "a_vie")', $uid,
289 $forlife);
08cce2ff 290 XDB::execute('INSERT INTO aliases (id,alias,type,flags)
f59bc2fb 291 VALUES ({?}, {?}, "alias", "bestalias")',
292 $uid, $bestalias);
293 if ($mailorg2) {
08cce2ff 294 XDB::execute('INSERT INTO aliases (id,alias,type)
f59bc2fb 295 VALUES ({?}, {?}, "alias")', $uid,
296 $mailorg2);
297 }
298
299 require_once('emails.inc.php');
12a587df
VZ
300 $user = User::getSilent($uid);
301 $redirect = new Redirect($user);
f59bc2fb 302 $redirect->add_email($email);
303
304 // on cree un objet logger et on log l'inscription
03c0a3a7 305 S::logger($uid)->log('inscription', $email);
08cce2ff 306 XDB::execute('UPDATE register_pending SET hash="INSCRIT" WHERE uid={?}', $uid);
f59bc2fb 307
f59bc2fb 308
1e33266a 309 $mymail = new PlMailer('register/inscription.reussie.tpl');
f59bc2fb 310 $mymail->assign('forlife', $forlife);
311 $mymail->assign('prenom', $prenom);
312 $mymail->send();
313
03c0a3a7 314 // Enable search on the user
2a54eb4d 315 require_once('user.func.inc.php');
316 user_reindex($uid);
317
03c0a3a7
FB
318 // Add notification for people looking for this registration
319 require_once 'notifs.inc.php';
320 register_watch_op($uid, WATCH_INSCR);
321 inscription_notifs_base($uid);
322
323 // Default registration on forums
324 $p_for = 'xorg.promo.x' . $promo;
325 $cible = array('xorg.general', 'xorg.pa.divers', 'xorg.pa.logements', $p_for);
326 foreach ($cible as $val) {
7d15f750
FB
327 XDB::execute('INSERT INTO forum_subs (fid,uid)
328 SELECT fid, {?}
329 FROM forum
330 WHERE name = {?}', $uid, $val);
03c0a3a7
FB
331 if (XDB::affectedRows() == 0 && $val == $p_for) {
332 $res = XDB::query("SELECT SUM(perms IN ('admin','user') AND deces = 0), COUNT(*)
333 FROM auth_user_md5
334 WHERE promo = {?}", $promo);
335 list($effau, $effid) = $res->fetchOneRow();
336 if (5 * $effau > $effid) { // +
337 $mymail = new PlMailer('admin/forums-promo.mail.tpl');
338 $mymail->assign('promo', $promo);
339 $mymail->send();
340 }
341 }
342 }
343
b5dd6f2f 344 // update number of subscribers (perms has changed)
ebfdf077 345 $globals->updateNbIns();
b5dd6f2f 346
edc55095 347 if (!Platal::session()->startWeakSession($uid)) {
5480a216 348 return PL_FORBIDDEN;
349 }
f59bc2fb 350
351 /***********************************************************/
a7de4ef7 352 /************* envoi d'un mail au démarcheur ***************/
f59bc2fb 353 /***********************************************************/
08cce2ff 354 $res = XDB::iterRow(
ebb129a4
FB
355 "SELECT sa.alias, IF(s.nom_usage,s.nom_usage,s.nom) AS nom,
356 s.prenom, FIND_IN_SET('femme', s.flags) AS femme,
381a3df0 357 GROUP_CONCAT(m.email) AS mails, MAX(m.last) AS dateDernier
f59bc2fb 358 FROM register_marketing AS m
359 INNER JOIN auth_user_md5 AS s ON ( m.sender = s.user_id )
360 INNER JOIN aliases AS sa ON ( sa.id = m.sender
361 AND FIND_IN_SET('bestalias', sa.flags) )
ebb129a4 362 WHERE m.uid = {?}
38acbdf3
BFPC
363 GROUP BY m.sender
364 ORDER BY dateDernier DESC", $uid);
08cce2ff 365 XDB::execute("UPDATE register_mstats SET success=NOW() WHERE uid={?}", $uid);
f59bc2fb 366
ebb129a4 367 $market = array();
381a3df0
OLF
368 while (list($salias, $snom, $sprenom, $sfemme, $mails, $dateDernier) = $res->next()) {
369 $market[] = " - par $snom $sprenom sur $mails (le plus récemment le $dateDernier)";
1e33266a 370 $mymail = new PlMailer();
a7de4ef7 371 $mymail->setSubject("$prenom $nom s'est inscrit à Polytechnique.org !");
1d55fe45 372 $mymail->setFrom('"Marketing Polytechnique.org" <register@' . $globals->mail->domain . '>');
f59bc2fb 373 $mymail->addTo("\"$sprenom $snom\" <$salias@{$globals->mail->domain}>");
a7de4ef7 374 $msg = ($sfemme?'Chère':'Cher')." $sprenom,\n\n"
ecc734a5 375 . "Nous t'écrivons pour t'informer que $prenom $nom (X$promo), "
a7de4ef7 376 . "que tu avais incité".($femme?'e':'')." à s'inscrire à Polytechnique.org, "
377 . "vient à l'instant de terminer son inscription.\n\n"
378 . "Merci de ta participation active à la reconnaissance de ce site !!!\n\n"
f59bc2fb 379 . "Bien cordialement,\n"
a7de4ef7 380 . "L'équipe Polytechnique.org";
f59bc2fb 381 $mymail->setTxtBody(wordwrap($msg, 72));
382 $mymail->send();
383 }
5f5f0eb5 384
385 /**** send a mail to X.org administrators ****/
9812efa0 386 if ($globals->register->notif) {
387 $mymail = new PlMailer();
388 $mymail->setSubject("Inscription de $prenom $nom (X$promo)");
1d55fe45 389 $mymail->setFrom('"Webmaster Polytechnique.org" <web@' . $globals->mail->domain . '>');
9812efa0 390 $mymail->addTo($globals->register->notif);
280c6e4d 391 $mymail->addHeader('Reply-To', $globals->register->notif);
a7de4ef7 392 $msg = "$prenom $nom (X$promo) a terminé son inscription avec les données suivantes :\n"
9812efa0 393 . " - nom : $nom\n"
394 . " - prenom : $prenom\n"
395 . " - promo : $promo\n"
ecc734a5 396 . " - naissance : $naissance (date connue : $naiss_ini)\n"
9812efa0 397 . " - forlife : $forlife\n"
398 . " - email : $email\n"
5f5f0eb5 399 . " - sexe : $femme\n"
edc55095
FB
400 . " - ip : " . S::logger()->ip . " (" . S::logger()->host . ")\n"
401 . (S::logger()->proxy_ip ? " - proxy : " . S::logger()->proxy_ip . " (" . S::logger()->proxy_host . ")\n" : "")
defff1aa
SJ
402 . "\n\n";
403 if (count($market) > 0) {
404 $msg .= "Les marketings suivants avaient été effectués :\n"
405 . implode("\n", $market);
406 } else {
8f794f88 407 $msg .= "$prenom $nom n'a jamais reçu d'email de marketing.";
defff1aa 408 }
9812efa0 409 $mymail->setTxtBody($msg);
eaf30d86 410 $mymail->send();
9812efa0 411 }
f59bc2fb 412
e654517d 413 Marketing::clear($uid);
f59bc2fb 414
8b00e0e0 415 pl_redirect('register/success');
f59bc2fb 416 $page->assign('uid', $uid);
f59bc2fb 417 }
418
419 function handler_success(&$page)
420 {
84270653 421 global $globals;
f59bc2fb 422 $page->changeTpl('register/success.tpl');
7912097e 423 $page->assign('user', S::user());
f59bc2fb 424
a41bf2f8 425 $_SESSION['sub_state'] = array('step' => 5);
f59bc2fb 426 if (Env::has('response2')) {
5e2307dc 427 $_SESSION['password'] = $password = Post::v('response2');
f59bc2fb 428
08cce2ff 429 XDB::execute('UPDATE auth_user_md5 SET password={?}
f59bc2fb 430 WHERE user_id={?}', $password,
cab08090 431 S::v('uid'));
f59bc2fb 432
84270653 433 // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
d56cb887 434 // and if the (stupid) user has decided to use /register/success another time,
84270653
VZ
435 // updates the Google Apps password as well.
436 if ($globals->mailstorage->googleapps_domain) {
437 require_once 'googleapps.inc.php';
d56cb887 438 $account = new GoogleAppsAccount(S::user());
f5c4bf30 439 if ($account->active() && $account->sync_password) {
84270653
VZ
440 $account->set_password($password);
441 }
442 }
443
604dfd58
FB
444 S::logger()->log('passwd');
445 Platal::session()->setAccessCookie(true);
f59bc2fb 446
447 $page->assign('mdpok', true);
448 }
449
0baf0741 450 $res = XDB::iterRow("SELECT sub, domain
451 FROM register_subs
452 WHERE uid = {?} AND type = 'list'
453 ORDER BY domain",
454 S::i('uid'));
455 $current_domain = null;
456 $lists = array();
457 while (list($sub, $domain) = $res->next()) {
458 if ($current_domain != $domain) {
459 $current_domain = $domain;
460 $client = new MMList(S::v('uid'), S::v('password'), $domain);
461 }
462 list($details, ) = $client->get_members($sub);
463 $lists["$sub@$domain"] = $details;
464 }
465 $page->assign_by_ref('lists', $lists);
466
c99ef281 467 $page->addJsLink('motdepasse.js');
f59bc2fb 468 }
97a0a459
FB
469
470 function handler_save(&$page)
471 {
472 global $globals;
473
474 // Finish registration procedure
475 if (Post::v('register_from_ax_question')) {
476 XDB::execute('UPDATE auth_user_quick
477 SET profile_from_ax = 1
478 WHERE user_id = {?}',
479 S::v('uid'));
480 }
481 if (Post::v('add_to_nl')) {
482 require_once 'newsletter.inc.php';
483 NewsLetter::subscribe();
484 }
485 if (Post::v('add_to_ax')) {
adb07f6f 486 Platal::load('axletter', 'axletter.inc.php');
97a0a459
FB
487 AXLetter::subscribe();
488 }
489 if (Post::v('add_to_promo')) {
490 $r = XDB::query('SELECT id FROM groupex.asso WHERE diminutif = {?}',
491 S::v('promo'));
492 $asso_id = $r->fetchOneCell();
493 XDB::execute('REPLACE INTO groupex.membres (uid,asso_id)
494 VALUES ({?}, {?})',
495 S::v('uid'), $asso_id);
496 $mmlist = new MMList(S::v('uid'), S::v('password'));
497 $mmlist->subscribe("promo".S::v('promo'));
498 }
499 if (Post::v('sub_ml')) {
500 $subs = array_keys(Post::v('sub_ml'));
501 $current_domain = null;
502 foreach ($subs as $list) {
503 list($sub, $domain) = explode('@', $list);
504 if ($domain != $current_domain) {
505 $current_domain = $domain;
506 $client = new MMList(S::v('uid'), S::v('password'), $domain);
507 }
508 $client->subscribe($sub);
509 }
510 }
b9fe731c
VZ
511 if (Post::v('imap')) {
512 require_once 'emails.inc.php';
edc55095
FB
513 $user = S::user();
514 $storage = new EmailStorage($user, 'imap');
94c6c788 515 $storage->activate();
b9fe731c 516 }
97a0a459
FB
517
518 pl_redirect('profile/edit');
519 }
f59bc2fb 520}
521
a7de4ef7 522// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
f59bc2fb 523?>