cvs: peardoc /fr/package/text/text-captcha-numeral example.xml information.xml intro.xml
| From: | Christophe Gesch� | Date: | Wed, 10 Jan 2007 13:51:36 +0000 |
| Subject: | cvs: peardoc /fr/package/text/text-captcha-numeral example.xml information.xml intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9275@lists.php.net to get a copy of this message | ||
moosh Wed Jan 10 13:51:36 2007 UTC
Added files:
/peardoc/fr/package/text/text-captcha-numeral example.xml
information.xml
intro.xml
Log:
- initial translation
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/text/text-captcha-numeral/example.xml?view=markup&rev=1.1
Index: peardoc/fr/package/text/text-captcha-numeral/example.xml
+++ peardoc/fr/package/text/text-captcha-numeral/example.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.2 Maintainer: moosh Status: started -->
<!-- $Id: example.xml,v 1.1 2007/01/10 13:51:36 moosh Exp $ -->
<sect2 id="package.text.text-captcha-numeral.example">
<title>Exemple</title>
<para>
The following example implements the standard use of a CAPTCHA:
Submitted form data is only evaluated when a CAPTCHA has been
solved correctly.
</para>
<example id="package.text.text-captcha-numeral.example.create">
<title>Créer un CAPTCHA numérique</title>
<para>
L'exemple qui suit vous montre simplement comment générer une
simple opération mathématique avec Text_CAPTCHA_Numeral.
</para>
<programlisting role="php"><![CDATA[
require_once 'Text/CAPTCHA/Numeral.php';
$num = new Text_CAPTCHA_Numeral;
$operation = $num->getOperation();
/**
* This will print the mathematical operation
* that has been generated by the package.
*/
print $operation;]]>
</programlisting>
</example>
<example id="package.text.text-captcha-numeral.example.secure">
<title>Protéger un forumlaire avec un CAPTCHA numérique</title>
<para>
Cet exemple vous présente comment protéger un formulaire
en utilisant un CAPTCHA numérique.
On génère une opération arithmétique
et on conserve la réponse dans une variable de session
</para>
<programlisting role="php">
<![CDATA[
require_once 'Text/CAPTCHA/Numeral.php';
$numcap = new Text_CAPTCHA_Numeral;
if (isset($_POST['captcha']) && isset($_SESSION['answer'])) {
if ($_POST['captcha'] == $_SESSION['answer']) {
$errors[] = 'Ok.. Vous êtes probablement un humain..';
} else {
$errors[] = 'Soit vous êtes maladroit soit vous n\'êtes pas humain';
}
}
if (!empty($errors)) {
foreach ($errors as $error) {
print "<h1><font
color='red'>$error</font></h1><br />";
}
}
print '
<form name="capter" action="index.php?page=liveExample"
method="post">
<table>
<tr>
<th>What is this result pilgrim?:
'.$numcap->getOperation().'</th>
<td><input type="text" value="" name="captcha"
/></td>
</tr>
<tr>
<th/>
<td><input type="submit" value="Laissez moi vous prouver que je
suis un humain!" /></td>
</tr>
</form>
';
$_SESSION['answer'] = $numcap->getAnswer();
]]>
</programlisting>
</example>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/text/text-captcha-numeral/information.xml?view=markup&rev=1.1
Index: peardoc/fr/package/text/text-captcha-numeral/information.xml
+++ peardoc/fr/package/text/text-captcha-numeral/information.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.2 Maintainer: moosh Status: ready -->
<!-- $Id: information.xml,v 1.1 2007/01/10 13:51:36 moosh Exp $ -->
<sect2 id="package.text.text-captcha-numeral.information">
<title>
Information à propos de Text_CAPTCHA_Numeral
et de son fonctionnement interne
</title>
<para>
<classname>Text_CAPTCHA_Numeral</classname>
vous donne la possibilité de générer des
CAPTCHA arithmétiques.
</para>
<itemizedlist>
<listitem>
<simpara>
<function>getOperation</function>
génère l'opération qui sera affichée à l'utilisateur.
</simpara>
<simpara>
<function>getAnswer</function>
retourne la réponse attendue pour l'opération proposée.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/viewvc.cgi/peardoc/fr/package/text/text-captcha-numeral/intro.xml?view=markup&rev=1.1
Index: peardoc/fr/package/text/text-captcha-numeral/intro.xml
+++ peardoc/fr/package/text/text-captcha-numeral/intro.xml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.2 Maintainer: moosh Status: started -->
<!-- $Id: intro.xml,v 1.1 2007/01/10 13:51:36 moosh Exp $ -->
<sect2 id="package.text.text-captcha-numeral.intro">
<title>Introduction</title>
<para>
Ce paquet fourni le nécéssaire pour créer des
<acronym>CAPTCHA</acronym>
numériques
(Completely Automated Public Turing tests
to tell Computers and Humans Apart).
Cela comprend les fonctionnalités suivantes:
</para>
<itemizedlist>
<listitem>
<simpara>
Crée un Captcha numérique
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="package.text.text-captcha-numeral.information">
Des informations génériques à propos de Text_CAPTCHA_Numeral
</link>
</simpara>
</listitem>
</itemizedlist>
<para>
The package creates numeral <acronym>CAPTCHAs</acronym>;
due to the stateless nature of the HTTP protocol,
the logic to secure a webpage using the package
must be specifically implemented.
Regardez
<link linkend="package.text.text-captcha-numeral.example">l'exemple
d'utilisation</link>
pour des informations détaillées.
</para>
<para>
Currently
</para>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->