if (getvar('choose')) { $pkg = getvar('pkg'); $lblpackage = getvar('lblpackage'); $dureepackage = getvar('dureepackage'); $prix = getvar('prix'); if (getvar('env') == 'test') $prix = 5; $description = getvar('description'); $SESSION->IDPACKAGE = $pkg; $SESSION->PRIX = $prix; $SESSION->LBLPACKAGE = $lblpackage; $SESSION->DUREEPACKAGE = $dureepackage; //ajout de dureepackage $SESSION->DESCRIPTION = $description; var_dump($SESSION); var_dump($USER); //exit; if (isloggedin()) { //redirect to moodle $url = '/local/modepaiementcnx.php'; redirect($CFG->wwwroot . $url); } else { $url = '/local/choixnew.php'; redirect($CFG->wwwroot . $url); } } /*Création de la page des forfaits*/ $PAGE->set_context(get_system_context()); $PAGE->set_pagelayout('standard'); $PAGE->set_title("Inscription - Forfaits"); $PAGE->set_heading("Forfaits"); $PAGE->set_url($CFG->wwwroot . '/local/forfaits.php'); $PAGE->requires->css(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'), true); $PAGE->requires->css(new moodle_url($CFG->wwwroot . '/local/css/style.css'), true); $PAGE->requires->css(new moodle_url($CFG->wwwroot . '/local/css/animate.min.css'), true); //$rsPackage = $DB->get_records_sql('SELECT * FROM {package} WHERE ETAT =?', array(1)); // // //$rsPackage = $DB->get_records_sql('SELECT * FROM {package} WHERE ETAT =?', array(1)); //$rsPackageAkwaba = $DB->get_records_sql('SELECT * FROM {package} WHERE COULEUR =?', array("blue")); //$rsPackageStandard = $DB->get_records_sql('SELECT * FROM {package} WHERE COULEUR =?', array("orange")); //$rsPackagePlus = $DB->get_records_sql('SELECT * FROM {package} WHERE COULEUR =?', array("green")); //$rsPackagePro = $DB->get_records_sql('SELECT * FROM {package} WHERE COULEUR =?', array("red")); $rsPackagePro = $DB->get_records_sql('SELECT * FROM {package} WHERE ETAT =?', array(1)); echo $OUTPUT->header(); /*require_once(dirname(__FILE__) . '/includes/listpackage.php');*/ ?>

SOUSCRIVEZ AU FORFAIT UNIQUE ET ETUDIEZ !

Error
Coding error detected, it must be fixed by a programmer: Invalid state passed to moodle_page::set_state. We are in state 0 and state 3 was requested.