Exemplo n.º 1
0
$numsondage = false;
//On récupère le numéro de sondage par le lien web.
if (issetAndNoEmpty('sondage', $_GET) === true) {
    $numsondage = $_GET["sondage"];
    $_SESSION["numsondage"] = $numsondage;
}
if (issetAndNoEmpty('sondage') === true) {
    $numsondage = $_POST["sondage"];
    $_SESSION["numsondage"] = $numsondage;
} elseif (issetAndNoEmpty('sondage', $_COOKIE) === true) {
    $numsondage = $_COOKIE["sondage"];
} elseif (issetAndNoEmpty('numsondage', $_SESSION) === true) {
    $numsondage = $_SESSION["numsondage"];
}
if ($numsondage !== false) {
    $dsondage = get_sondage_from_id($numsondage);
    if ($dsondage === false) {
        $err |= NO_POLL;
    }
} else {
    $err |= NO_POLL_ID;
}
//output a CSV and die()
if (issetAndNoEmpty('export', $_GET) && $dsondage !== false) {
    if ($_GET['export'] == 'csv') {
        require_once 'exportcsv.php';
    }
    if ($_GET['export'] == 'ics' && $dsondage->is_date) {
        require_once 'exportics.php';
    }
    die;
Exemplo n.º 2
0
//abiding by the rules of distribution of free software. You can  use,
//modify and/ or redistribute the software under the terms of the CeCILL-B
//license as circulated by CEA, CNRS and INRIA at the following URL
//"http://www.cecill.info".
//
//The fact that you are presently reading this means that you have had
//knowledge of the CeCILL-B license and that you accept its terms. You can
//find a copy of this license in the file LICENSE.
//
//==========================================================================
include_once 'fonctions.php';
if (!isset($_GET['numsondage']) || !preg_match(";^[\\w\\d]{16}\$;i", $_GET['numsondage'])) {
    header('Location: studs.php');
}
$user_studs = $connect->Execute("SELECT * FROM user_studs WHERE id_sondage=" . $_GET['numsondage'] . " ORDER BY id_users");
$dsondage = get_sondage_from_id($_GET['numsondage']);
$nbcolonnes = substr_count($dsondage->sujet, ',') + 1;
$toutsujet = explode(",", $dsondage->sujet);
#$toutsujet=str_replace("°","'",$toutsujet);
//affichage des sujets du sondage
$input .= ";";
for ($i = 0; $toutsujet[$i]; $i++) {
    if ($dsondage->format == "D" || $dsondage->format == "D+") {
        $input .= '' . date("j/n/Y", $toutsujet[$i]) . ';';
    } else {
        $input .= '' . $toutsujet[$i] . ';';
    }
}
$input .= "\r\n";
if (strpos($dsondage->sujet, '@') !== false) {
    $input .= ";";
Exemplo n.º 3
0
//
//This software is governed by the CeCILL-B license under French law and
//abiding by the rules of distribution of free software. You can  use,
//modify and/ or redistribute the software under the terms of the CeCILL-B
//license as circulated by CEA, CNRS and INRIA at the following URL
//"http://www.cecill.info".
//
//The fact that you are presently reading this means that you have had
//knowledge of the CeCILL-B license and that you accept its terms. You can
//find a copy of this license in the file LICENSE.
//
//==========================================================================
session_start();
require_once 'php2pdf/phpToPDF.php';
include_once 'fonctions.php';
$dsondage = get_sondage_from_id($_POST['numsondage']);
$lieureunion = stripcslashes($_POST["lieureunion"]);
$datereunion = explode("@", $_POST["meilleursujet"]);
//creation du fichier PDF
$PDF = new phpToPDF();
$PDF->AddPage();
$PDF->SetFont('Arial', '', 11);
//affichage de la date de convocation
$PDF->Text(140, 30, "Le " . date("d/m/Y"));
$PDF->Image("./" . LOGOLETTRE . "", 20, 20, 65, 40);
$PDF->SetFont('Arial', 'U', 11);
$PDF->Text(40, 120, "Objet : ");
$PDF->SetFont('Arial', '', 11);
$PDF->Text(55, 120, _(' Convocation'));
$PDF->Text(55, 140, _('Hello,'));
$PDF->Text(40, 150, _("You're invited at the meeting") . ' "' . utf8_decode($dsondage->titre) . '".');