Update exportcsv.php

This commit is contained in:
UT from dolibit 2022-09-08 10:12:01 +02:00 committed by GitHub
parent a079fb3fec
commit fee724dbed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> /* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -17,23 +18,26 @@
*/ */
/** /**
* \file htdocs/opensurvey/exportcsv.php * \file htdocs/opensurvey/exportcsv.php
* \ingroup opensurvey * \ingroup opensurvey
* \brief Page to list surveys * \brief Page to list surveys
*/ */
// Load Dolibarr environment
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php";
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
$numsondage = ''; $numsondage = '';
if (GETPOST('id')) { if (GETPOST('id')) {
$numsondage = GETPOST("id", 'alpha'); $numsondage = GETPOST("id", 'alpha');
} }
// Initialize Objects
$object = new Opensurveysondage($db); $object = new Opensurveysondage($db);
$result = $object->fetch(0, $numsondage); $result = $object->fetch(0, $numsondage);
if ($result <= 0) { if ($result <= 0) {