Moved exportcsv.php out of public folder as it should only be accesible for Dolibarr users
This commit is contained in:
parent
e0dd3d5bc9
commit
cf3ac246bf
@ -449,7 +449,7 @@ print '</form>'."\n";
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="public/exportcsv.php?sondage=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
|
print '<a class="butAction" href="exportcsv.php?id=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -16,33 +16,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/opensurvey/public/exportcsv.php
|
* \file htdocs/opensurvey/exportcsv.php
|
||||||
* \ingroup opensurvey
|
* \ingroup opensurvey
|
||||||
* \brief Page to list surveys
|
* \brief Page to list surveys
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
require_once('../main.inc.php');
|
||||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
||||||
require_once('../../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');
|
$action=GETPOST('action');
|
||||||
$numsondage = $numsondageadmin = '';
|
$numsondage = $numsondageadmin = '';
|
||||||
if (GETPOST('sondage'))
|
if (GETPOST('id'))
|
||||||
{
|
{
|
||||||
if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL
|
$numsondageadmin=GETPOST("id",'alpha');
|
||||||
{
|
$numsondage=substr($numsondageadmin, 0, 16);
|
||||||
$numsondageadmin=GETPOST("sondage",'alpha');
|
|
||||||
$numsondage=substr($numsondageadmin, 0, 16);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$numsondageadmin='';
|
|
||||||
$numsondage=GETPOST("sondage",'alpha');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$object=new Opensurveysondage($db);
|
$object=new Opensurveysondage($db);
|
||||||
Loading…
Reference in New Issue
Block a user