11
Draven
Re: PHP Surveyor Ported to Xoops
  • 2004/12/5 19:59

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


This happens when you submit the survey after filling it out?

12
irmtfan
Re: PHP Surveyor Ported to Xoops
  • 2004/12/5 20:05

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


after i do an example survey and answer some demo questions at the end i click on the " submit " and everythings is ok but i get this error at the end of the page ( php debug on )

13
Draven
Re: PHP Surveyor Ported to Xoops
  • 2004/12/5 20:38

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Is your survey live? If you have not activated your survey then the answers will not be saved and may be the reason for the error.

14
Mithrandir
Re: PHP Surveyor Ported to Xoops

I have a few questions to your header files.
xoops_header.php:
include_once '../../mainfile.php';
include_once 
'xoops_version.php';
include_once 
XOOPS_ROOT_PATH '/header.php';

Why do you include xoops_version.php? Anything you need in there?

xoops_admin_header.php:
include '../../../mainfile.php';
include 
XOOPS_ROOT_PATH.'/include/cp_header.php';
include 
'xoops_version.php';

if ( !
file_exists("../language/".$xoopsConfig['language']."/admin.php") ) {
    include 
"../language/".$xoopsConfig['language']."/admin.php";
}

    
if (
is_object($xoopsUser)) {
    
$xoopsModule XoopsModule::getByDirname($modversion['dirname']);
    if (!
$xoopsUser->isAdmin($xoopsModule->mid())) {
        
redirect_header(XOOPS_URL "/"3_NOPERM);
        exit();
    } 
} else {
    
redirect_header(XOOPS_URL "/"1_NOPERM);
    exit();
}
    
xoops_cp_header();

Don't include both mainfile.php and include/cp_header.php - just cp_header.php. That will include mainfile.php.
It will also perform the permission check and include the admin language files, so all you really need is
include XOOPS_ROOT_PATH.'/include/cp_header.php';

xoops_cp_header();

15
bronskybeat
Re: PHP Surveyor Ported to Xoops
  • 2005/11/5 16:14

  • bronskybeat

  • Just popping in

  • Posts: 1

  • Since: 2002/8/28


Imposible to download the file, the link is broken...

Login

Who's Online

192 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

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

Latest GitHub Commits