Changeset 1086


Ignore:
Timestamp:
2007/01/18 20:45:05 (15 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/test-xoops.ec-cube.net/html/register.php

    r1070 r1086  
    3939} 
    4040 
    41 function userCheck($uname, $email, $pass, $vpass) 
     41function userCheck($uname, $email, $pass, $vpass, $agree_disc = "", $agree_check = false) 
    4242{ 
    4343    global $xoopsConfigUser; 
     
    113113        $stop .= sprintf(_US_PWDTOOSHORT,$xoopsConfigUser['minpass'])."<br />"; 
    114114    } 
     115     
     116    if ($agree_check) { 
     117        if($agree_disc != 1) { 
     118            $stop .= sprintf(_US_PWDTOOSHORT,$xoopsConfigUser['minpass'])."<br />";      
     119        } 
     120    } 
     121         
    115122    return $stop; 
    116123} 
     
    124131$user_viewemail = (isset($_POST['user_viewemail']) && intval($_POST['user_viewemail'])) ? 1 : 0; 
    125132$user_mailok = (isset($_POST['user_mailok']) && intval($_POST['user_mailok'])) ? 1 : 0; 
    126 $mailmaga = 1; 
    127 $agree_disc = 1; 
     133$mailmaga = (isset($_POST['mailmaga']) && intval($_POST['mailmaga'])) ? 1 : 0;; 
     134$agree_disc = isset($_POST['agree_disc']) ? $myts->stripSlashesGPC($_POST['agree_disc']) : ''; 
     135 
    128136switch ( $op ) { 
    129137case 'newuser': 
     
    139147    } 
    140148 
    141     $stop .= userCheck($uname, $email, $pass, $vpass); 
     149    $stop .= userCheck($uname, $email, $pass, $vpass, $agree_disc, true); 
    142150    if (empty($stop)) { 
    143151        $token =& XoopsSingleTokenHandler::quickCreate('register_finish'); 
Note: See TracChangeset for help on using the changeset viewer.