11
cadch
Re: lostpass.php Have some error,On user by Gmail
  • 2021/11/24 2:54

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


Yes,But my Code not smart~



12
cadch
Re: lostpass.php Have some error,On user by Gmail
  • 2021/11/21 8:23

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


XoopsCore25-2.5.11-Beta1



13
cadch
lostpass.php Have some error,On user by Gmail
  • 2021/11/19 8:41

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


lostpass.php Have some error,On user by Gmail
Gmail on Chrome will use cache.google.com,If user click mail url【xoops_url/lostpass.php?email=xxx@xxx.com&code=xxxxx】
Will go to 【google_url/url?q=xoops_url/lostpass.php?email%3Dxxx@xxx.com%26code%3Dxxxxx&source=gmail&ust=xxxxxxxx&usg=xxxxxxx"】
cache.google.com will cache the URL,Will send 【lostpass1.tpl】again.
Fix it
if (empty($getuser)) {
    
$msg _US_SORRYNOTFOUND;
    
redirect_header('user.php'2$msg);
} else {
    
$code   = isset($_GET['code']) ? trim($_GET['code']) : '';
    
$areyou substr($getuser[0]->getVar('pass'), 09);
    if (
$code != '' && $areyou == $code) {
        
$newpass     xoops_makepass();
        
$xoopsMailer xoops_getMailer();
        
$xoopsMailer->useMail();
        
$xoopsMailer->setTemplate('lostpass2.tpl');
        
$xoopsMailer->assign('SITENAME'$xoopsConfig['sitename']);
        
$xoopsMailer->assign('ADMINMAIL'$xoopsConfig['adminmail']);
        
$xoopsMailer->assign('SITEURL'XOOPS_URL '/');
        
$xoopsMailer->assign('IP'$_SERVER['REMOTE_ADDR']);
        
$xoopsMailer->assign('AGENT'$_SERVER['HTTP_USER_AGENT']);
        
$xoopsMailer->assign('NEWPWD'$newpass);
        
$xoopsMailer->setToUsers($getuser[0]);
        
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
        
$xoopsMailer->setFromName($xoopsConfig['sitename']);
        
$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQXOOPS_URL));
        if (!
$xoopsMailer->send()) {
            echo 
$xoopsMailer->getErrors();
        }
        
// Next step: add the new password to the database
        
$sql sprintf(
            
"UPDATE %s SET pass = '%s' WHERE uid = %u",
            
$xoopsDB->prefix('users'),
            
password_hash($newpassPASSWORD_DEFAULT),
            
$getuser[0]->getVar('uid')
        );
        if (!
$xoopsDB->queryF($sql)) {
            include 
$GLOBALS['xoops']->path('header.php');
            echo 
_US_MAILPWDNG;
            include 
$GLOBALS['xoops']->path('footer.php');
            exit();
        }
        
redirect_header('user.php'3sprintf(_US_PWDMAILED$getuser[0]->getVar('uname')), false);
        
// If no Code, send it
    
} elseif (isset($_POST['email'])) {
        
$xoopsMailer xoops_getMailer();
        
$xoopsMailer->useMail();
        
$xoopsMailer->setTemplate('lostpass1.tpl');
        
$xoopsMailer->assign('SITENAME'$xoopsConfig['sitename']);
        
$xoopsMailer->assign('ADMINMAIL'$xoopsConfig['adminmail']);
        
$xoopsMailer->assign('SITEURL'XOOPS_URL '/');
        
$xoopsMailer->assign('IP'$_SERVER['REMOTE_ADDR']);
        
$xoopsMailer->assign('AGENT'$_SERVER['HTTP_USER_AGENT']);
        
$xoopsMailer->assign('NEWPWD_LINK'XOOPS_URL '/lostpass.php?email=' $email '&code=' $areyou);
        
$xoopsMailer->setToUsers($getuser[0]);
        
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
        
$xoopsMailer->setFromName($xoopsConfig['sitename']);
        
$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ$xoopsConfig['sitename']));
        include 
$GLOBALS['xoops']->path('header.php');
        if (!
$xoopsMailer->send()) {
            echo 
$xoopsMailer->getErrors();
        }
        echo 
'';
        
printf(_US_CONFMAIL$getuser[0]->getVar('uname'));
        echo 
'';
        include 
$GLOBALS['xoops']->path('footer.php');
    } else {
        
redirect_header('user.php'2'Please input your EMAIL.');
    }
}



14
cadch
Re: What to expect in PHP 8
  • 2020/2/10 2:51

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


Exciting Features to Look Forward in PHP 8



15
cadch
block how to get xoopsModuleConfig var
  • 2019/11/19 4:01

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


My block need to read xoopsModuleConfig var
I used xoops2.5.10
block modules/block/xxx.php
$xxx $xoopsModuleConfig['xxx']

show ERROR:Undefined variable: xoopsModuleConfig in file.
My block how to get xoopsModuleConfig var
Thanks~



16
cadch
About Development a new module used CAPTCHA question~
  • 2010/2/21 10:36

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


Hello~everybody~
I Development a new module for XOOPS 2.4.4, the module Used CAPTCHA,
But it No work~
We find XOOPS/class/captcha/xoopscaptcha.php in 211~215
About "Skip CAPTCHA verification if disabled"
If we Delete code:
Quote:
if (!$this->isActive()) {
$is_valid = true;
// Skip CAPTCHA for member if set
} else


Our module's CAPTCHA, It's run correct!!
Why??
Who can tell me ,How to used CAPTCHA for my module, And Don't to change XOOPS CLASS code.
Thanks~


Very~



17
cadch
New website with XOOPS 2 Ha Ha Ha
  • 2008/12/22 14:52

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


The website about Chinese Art from Taiwan.
Used flash and flash action script design
And HACK XOOPS output XML to flash.
This is HACKing... Will set XOOPS for flash API Ha Ha....



18
cadch
Re: New website with XOOPS 2 Ha Ha Ha
  • 2008/12/12 16:38

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


Quote:
Your website looks very good, only thing i don´t understand is the "ha ha ha" in your post ?

HA HA HA is a pet phrase.HA HA HA
I find an error in 2.3.2b
edituser.php input data is by code ISO Not UTF-8
When input Chinese will Wrong~ha ha ha
I Want to sleep~I got enough sleep~Our time is 24:00 Bye



19
cadch
New website with XOOPS 2 Ha Ha Ha
  • 2008/12/12 16:03

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


The website about fashion Model from Taiwan.
Used flash and flash action script design
And HACK XOOPS output XML to flash.
This is HACKing... Will set XOOPS for flash API Ha Ha....



20
cadch
My sites theme HA HA HA HA
  • 2008/9/14 18:55

  • cadch

  • Just popping in

  • Posts: 33

  • Since: 2007/12/17


I was looking for reviews and for someone to test the current theme im using

site

http://www.37tea.com.tw/

downloadable here

http://www.37tea.com.tw/system/module ... nloads/viewcat.php?cid=98

Thank you for any replies.




TopTop
« 1 (2)



Login

Username:
Password:

Lost Password? Register now!

Who's Online

64 user(s) are online (28 user(s) are browsing Support Forums)


Members: 0


Guests: 64


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jan 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits