DuGris
Xoops Planète
SecurityImage : SecurityImage avec le module Wfdownloads version 3
Posté par DuGris le 15/04/2006 00:20:00
SecurityImage

SmartDownloadUtilisation de la class SecurityImage avec le module
Wfdownloads version 3



Modification à apporter dans le fichier class/download.php

Ajouter les lignes en rouge, comme indiqué ci-dessous

...
...
$sform->addElement(new XoopsFormFile(_MD_WFD_DUPLOADSCRSHOT, 'screenshot', 0), false); // Ligne 350
// Hack SecurityImage by DuGris
if ( defined('SECURITYIMAGE_INCLUDED') ) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$sform->addElement($security_image, true);
}
}
// Hack SecurityImage by DuGris
$option_tray = new XoopsFormElementTray(_MD_WFD_OPTIONS, '');
...
...

Modification à apporter dans le fichier submit.php

Ajouter les lignes en rouge, comme indiqué ci-dessous

...
...
...
if (isset($_POST['submit']) && !empty($_POST['submit'])) { // Ligne 39
// Hack SecurityImage by DuGris
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
redirect_header( 'javascript:history.go(-1)' , 3, _SECURITYIMAGE_ERROR ) ;
exit();
}
// Hack SecurityImage by DuGris
$notify = !empty($_POST['notify']) ? 1 : 0;
...
...
...
Créer un fichier PDF à partir de cet article Format imprimable Envoyer cet article à un ami  
Afux sur Facebook
Facebook
Dugris Xoops Planète
Profil Facebook de Laurent Jen
Faire un don
_DMB_SELECTAMT


Voulez-vous que votre nom soit cité avec votre don ?
Oui - Citez- moi comme un généreux donateur.
Non - Listez mon don anonymement


Archives
Recherche


Qui est en ligne
WF-Downloads : 1
Partenaires : 1
Documentation : 3
Téléchargements : 1

Membre(s): 0
Invité(s): 8

Plus ...
Visiteurs
140871 A ce jour
669761 Pages vues