Esempio n. 1
0
function bandeau_titre($titre)
{
    global $ALLOWED_LANGUAGES;
    $img = IMAGE_TITRE ? '<img src="' . Utils::get_server_name() . IMAGE_TITRE . '" alt="' . NOMAPPLICATION . '" class="img-responsive">' : '';
    echo '
    <header role="banner">';
    if (count($ALLOWED_LANGUAGES) > 1) {
        echo '<form method="post" action="" class="hidden-print">
            <div class="input-group input-group-sm pull-right col-md-2 col-xs-4">
                <select name="lang" class="form-control" title="' . __('Language selector', 'Select the language') . '" >' . liste_lang() . '</select>
                <span class="input-group-btn">
                    <button type="submit" class="btn btn-default btn-sm" title="' . __('Language selector', 'Change the language') . '">OK</button>
                </span>
            </div>
        </form>';
    }
    echo '
        <h1><a href="' . Utils::get_server_name() . '" title="' . __('Generic', 'Home') . ' - ' . NOMAPPLICATION . '">' . $img . '</a></h1>
        <h2 class="lead"><i>' . $titre . '</i></h2>
        <hr class="trait" role="presentation" />
    </header>
    <main role="main">';
    global $connect;
    $tables = $connect->allTables();
    $diff = array_diff([Utils::table('comment'), Utils::table('poll'), Utils::table('slot'), Utils::table('vote')], $tables);
    if (0 != count($diff)) {
        echo '<div class="alert alert-danger">' . __('Error', 'Framadate is not properly installed, please check the "INSTALL" to setup the database before continuing.') . '</div>';
        bandeau_pied();
        die;
    }
}
Esempio n. 2
0
function smarty_modifier_resource($link)
{
    return Utils::get_server_name() . $link;
}
Esempio n. 3
0
             if ($config['user_can_add_img_or_link']) {
                 echo '<span class="input-group-addon btn-link md-a-img" title="' . __('Step 2 classic', 'Add a link or an image') . ' - ' . __('Generic', 'Choice') . ' ' . ($i + 1) . '" ><span class="glyphicon glyphicon-picture"></span> <span class="glyphicon glyphicon-link"></span></span>';
             }
             echo '
         </div>
         </div>' . "\n";
         }
         echo '
         <div class="col-md-4">
             <div class="btn-group btn-group">
                 <button type="button" id="remove-a-choice" class="btn btn-default" title="' . __('Step 2 classic', 'Remove a choice') . '"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . __('Generic', 'Remove') . '</span></button>
                 <button type="button" id="add-a-choice" class="btn btn-default" title="' . __('Step 2 classic', 'Add a choice') . '"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . __('Generic', 'Add') . '</span></button>
             </div>
         </div>
         <div class="col-md-8 text-right">
             <a class="btn btn-default" href="' . Utils::get_server_name() . 'create_poll.php?type=classic" title="' . __('Step 2', 'Back to step 1') . '">' . __('Generic', 'Back') . '</a>
             <button name="fin_sondage_autre" value="' . __('Generic', 'Next') . '" type="submit" class="btn btn-success disabled" title="' . __('Step 2', 'Go to step 3') . '">' . __('Generic', 'Next') . '</button>
         </div>
     </div>
 </div>
 <div class="modal fade" id="md-a-imgModal" tabindex="-1" role="dialog" aria-labelledby="md-a-imgModalLabel" aria-hidden="true">
     <div class="modal-dialog">
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">' . __('Generic', 'Close') . '</span></button>
                 <p class="modal-title" id="md-a-imgModalLabel">' . __('Step 2 classic', 'Add a link or an image') . '</p>
             </div>
             <div class="modal-body">
                 <p class="alert alert-info">' . __('Step 2 classic', 'These fields are optional. You can add a link, an image or both.') . '</p>
                 <div class="form-group">
                     <label for="md-img"><span class="glyphicon glyphicon-picture"></span> ' . __('Step 2 classic', 'URL of the image') . '</label>
Esempio n. 4
0
 /**
  * @return array
  */
 function ok()
 {
     return array('status' => 'OK', 'msg' => __f('Installation', 'Ended', Utils::get_server_name()));
 }
Esempio n. 5
0
     // Summary
     $summary = '<ul>';
     $choices = $_SESSION['form']->getChoices();
     foreach ($choices as $choice) {
         $summary .= '<li>' . strftime($date_format['txt_full'], $choice->getName());
         $first = true;
         foreach ($choice->getSlots() as $slots) {
             $summary .= $first ? ': ' : ', ';
             $summary .= $slots;
             $first = false;
         }
         $summary .= '</li>';
     }
     $summary .= '</ul>';
     echo '
 <form name="formulaire" action="' . Utils::get_server_name() . 'create_date_poll.php" method="POST" class="form-horizontal" role="form">
 <div class="row" id="selected-days">
     <div class="col-md-8 col-md-offset-2">
         <h3>' . __('Step 3', 'Confirm the creation of your poll') . '</h3>
         <div class="well summary">
             <h4>' . __('Step 3', 'List of your choices') . '</h4>
             ' . $summary . '
         </div>
         <div class="alert alert-info clearfix">
             <p>' . __f('Step 3', 'Your poll will be automatically archived in %d days.', $config['default_poll_duration']) . '
             <br />' . __('Step 3', 'You can set a closer archiving date for it.') . '</p>
             <div class="form-group">
                 <label for="enddate" class="col-sm-5 control-label">' . __('Step 3', 'Archiving date:') . '</label>
                 <div class="col-sm-6">
                     <div class="input-group date">
                         <span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
Esempio n. 6
0
 * Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
 *
 * =============================
 *
 * 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
 *
 * Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
 * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
 */
use Framadate\Services\PollService;
use Framadate\Utils;
include_once __DIR__ . '/app/inc/init.php';
if (!is_file(CONF_FILENAME)) {
    header('Location: ' . Utils::get_server_name() . 'admin/install.php');
    exit;
}
/* SERVICES */
/* -------- */
$logService = '\\Framadate\\Services\\LogService';
$pollService = new PollService($connect, new $logService());
/* PAGE */
/* ---- */
$demoPoll = $pollService->findById('aqg259dth55iuhwm');
$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'];
$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);
$smarty->assign('demo_poll', $demoPoll);
Esempio n. 7
0
 *
 * 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
 *
 * Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
 * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
 */
use Framadate\Services\InstallService;
use Framadate\Utils;
require_once '../app/inc/init.php';
if (is_file(CONF_FILENAME)) {
    header('Location: ' . Utils::get_server_name());
    exit;
}
$error = null;
$installService = new InstallService();
if (!empty($_POST)) {
    $installService->updateFields($_POST);
    $result = $installService->install($smarty);
    if ($result['status'] === 'OK') {
        header('Location: ' . Utils::get_server_name() . 'admin/migration.php');
        exit;
    } else {
        $error = __('Error', $result['code']);
    }
}
$smarty->assign('error', $error);
$smarty->assign('title', __('Admin', 'Installation'));
$smarty->assign('fields', $installService->getFields());
$smarty->display('admin/install.tpl');