Fork me on GitHub

Rapport de message :*
 

Re: Securityimage dans smartpartner

Titre du sujet : Re: Securityimage dans smartpartner
par Ghia sur 03/07/2008 20:47:25

comme en formulaire.php:

Apres
include "footer.php";




// If security image is installed .. include the class
if (file_exists (XOOPS_ROOT_PATH."/class/xoopsform/securityimage.php")) {
  include_once 
XOOPS_ROOT_PATH.'/class/xoopsform/securityimage.php';
} elseif (
file_exists (XOOPS_ROOT_PATH."/Frameworks/captcha/formcaptcha.php")) {
  include_once 
XOOPS_ROOT_PATH.'/Frameworks/captcha/formcaptcha.php';
    
$framework true;
}


Avant
// BUTTONS


// SecurityImage by DuGris
        
if (defined('SECURITYIMAGE_INCLUDED')) {
            
$security_image = new SecurityImage_SECURITYIMAGE_GETCODE );
            if (
$security_image->render()) {
                
$form->addElement($security_imagetrue);
            }
    } elseif(!empty(
$framework)) {
          
$form->addElement(new XoopsFormCaptcha('''xoopscaptcha'true412120,0),true);
        }
      
// SecurityImage by DuGris


Apres
case "submitPartner" :

// SecurityImage by DuGris
    
include_once(XOOPS_ROOT_PATH "/class/xoopsformloader.php");
    if ( 
defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
        
$redirect XOOPS_URL "/modules/" $modversion["dirname"] . "/formulaire.php?id=" $_GET['id'] . "&qcm=" $_GET['qcm'];
        
redirect_header$redirect 5_SECURITYIMAGE_ERROR ) ;
        exit();
        } elseif(!empty(
$framework)) {
          include_once 
XOOPS_ROOT_PATH.'/Frameworks/captcha/captcha.php';
            
$security = new XoopsCaptcha();
          if (!
$security->verify(true)) {
              if (!empty(
$_POST['pical_eventid'])) {
                  
$redirect XOOPS_URL "/modules/piCal/?event_id=".intval($_POST['pical_eventid']);
                } else {
                  
$redirect XOOPS_URL "/modules/" $modversion["dirname"] . "/formulaire.php?id=" $_GET['id'] . "&qcm=" $_GET['qcm'];
                }
        
redirect_header$redirect 5XOOPS_CAPTCHA_INVALID_CODE ) ;
        exit();
            }
    }
    
// SecurityImage by DuGris


Bonne chance!
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

71 Personne(s) en ligne (68 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 71 | Plus ...