2011-05-15 01:32:47 +02:00
|
|
|
<?php
|
2014-09-04 17:52:18 +02:00
|
|
|
/**
|
|
|
|
* This software is governed by the CeCILL-B license. If a copy of this license
|
|
|
|
* is not distributed with this file, you can obtain one at
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
|
|
|
*
|
|
|
|
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
2016-08-04 22:26:37 +02:00
|
|
|
* Authors of Framadate/OpenSondage: Framasoft (https://github.com/framasoft)
|
2014-09-04 17:52:18 +02:00
|
|
|
*
|
2014-07-04 11:21:31 +02:00
|
|
|
* =============================
|
2014-09-04 17:52:18 +02:00
|
|
|
*
|
|
|
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
|
|
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
|
|
|
*
|
2014-07-04 11:21:31 +02:00
|
|
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
2014-09-04 17:52:18 +02:00
|
|
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
2014-07-04 11:21:31 +02:00
|
|
|
*/
|
2015-03-29 19:32:15 +02:00
|
|
|
|
|
|
|
use Framadate\Services\PollService;
|
2015-09-03 08:03:37 +02:00
|
|
|
use Framadate\Utils;
|
2014-09-04 17:52:18 +02:00
|
|
|
|
|
|
|
include_once __DIR__ . '/app/inc/init.php';
|
|
|
|
|
2015-09-03 08:03:37 +02:00
|
|
|
if (!is_file(CONF_FILENAME)) {
|
2016-05-04 00:58:31 +02:00
|
|
|
header(('Location: ' . Utils::get_server_name() . 'admin/check.php'));
|
2015-09-03 08:03:37 +02:00
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2015-03-29 19:32:15 +02:00
|
|
|
/* SERVICES */
|
|
|
|
/* -------- */
|
|
|
|
$logService = '\Framadate\Services\LogService';
|
|
|
|
$pollService = new PollService($connect, new $logService());
|
|
|
|
|
|
|
|
/* PAGE */
|
|
|
|
/* ---- */
|
2011-05-15 01:32:47 +02:00
|
|
|
|
2018-04-14 08:48:24 +02:00
|
|
|
$demoPollURL = "";
|
|
|
|
|
|
|
|
if (defined("DEMO_POLL_ID")) {
|
|
|
|
$demoPollURL = Utils::getUrlSondage(DEMO_POLL_ID);
|
|
|
|
}
|
|
|
|
|
2016-06-18 22:42:50 +02:00
|
|
|
$nbcol = max( $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'], 1 );
|
2014-11-14 17:35:22 +01:00
|
|
|
|
2015-03-29 19:32:15 +02:00
|
|
|
$smarty->assign('show_what_is_that', $config['show_what_is_that']);
|
|
|
|
$smarty->assign('show_the_software', $config['show_the_software']);
|
|
|
|
$smarty->assign('show_cultivate_your_garden', $config['show_cultivate_your_garden']);
|
|
|
|
$smarty->assign('col_size', 12 / $nbcol);
|
2018-04-14 08:48:24 +02:00
|
|
|
$smarty->assign('demo_poll_url', $demoPollURL);
|
2014-11-14 17:35:22 +01:00
|
|
|
|
2018-07-06 18:06:35 +02:00
|
|
|
$smarty->assign('title', __('Generic', 'Create your own polls'));
|
2011-05-15 01:32:47 +02:00
|
|
|
|
2015-03-29 19:32:15 +02:00
|
|
|
$smarty->display('index.tpl');
|