Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
asiafood.bdcloud.fr /
opensurvey /
Delete
Unzip
Name
Size
Permission
Date
Action
class
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
css
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
img
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
wizard
[ DIR ]
drwxr-xr-x
2025-11-08 11:16
card.php
13.72
KB
-rwxr-xr-x
2021-01-30 17:58
exportcsv.php
3.25
KB
-rwxr-xr-x
2021-01-30 17:58
fonctions.php
8.88
KB
-rwxr-xr-x
2021-01-30 17:58
index.php
2.76
KB
-rwxr-xr-x
2021-01-30 17:58
list.php
20.61
KB
-rwxr-xr-x
2021-01-30 17:58
results.php
35.44
KB
-rwxr-xr-x
2021-01-30 17:58
Save
Rename
<?php /* 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 * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ /** * \file htdocs/opensurvey/fonctions.php * \ingroup opensurvey * \brief Functions for module */ /** * Returns an array with the tabs for the "Opensurvey poll" section * It loads tabs from modules looking for the entity Opensurveyso * * @param Opensurveysondage $object Current viewing poll * @return array Tabs for the opensurvey section */ function opensurvey_prepare_head(Opensurveysondage $object) { global $langs, $conf; $h = 0; $head = array(); $head[0][0] = 'card.php?id='.$object->id_sondage; $head[0][1] = $langs->trans("Survey"); $head[0][2] = 'general'; $h++; $head[1][0] = 'results.php?id='.$object->id_sondage; $head[1][1] = $langs->trans("SurveyResults"); $head[1][2] = 'preview'; $h++; // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'opensurveypoll'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'opensurveypoll', 'remove'); return $head; } /** * Show header for new member * * @param string $title Title * @param string $head Head array * @param int $disablejs More content into html header * @param int $disablehead More content into html header * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files * @param string $numsondage Num survey * @return void */ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $numsondage = '') { global $conf, $langs, $mysoc; global $dolibarr_main_url_root; //$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>'; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print '<body id="mainbody" class="publicnewmemberform">'; print '<span id="dolpaymentspan"></span>'."\n"; print '<div class="center">'."\n"; print '<form name="formulaire" action="studs.php?sondage='.urlencode($numsondage).'#bas" method="POST">'."\n"; print '<input type="hidden" name="sondage" value="'.$numsondage.'"/>'; print '<input type="hidden" name="token" value="'.newToken().'">'."\n"; print "\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) $width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $width = 150; } // Output html code for logo if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; if ($width) print ' width="'.$width.'"'; print '>'; print '</div>'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; } print '</div>'; } print '<div style="margin-left: 50px; margin-right: 50px; text-align: start;"><br>'; } /** * Show footer for new member * * @return void */ function llxFooterSurvey() { print '</div>'; print '</form>'; print '</div>'; printCommonFooter('public'); dol_htmloutput_events(); print "</body>\n"; print "</html>\n"; } /** * get_server_name * * @return string URL to use */ function get_server_name() { global $dolibarr_main_url_root; $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); //$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current $url = $urlwithouturlroot.dol_buildpath('/opensurvey/', 1); if (!preg_match("|/$|", $url)) { $url = $url."/"; } return $url; } /** * Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau * * @param string $name La clé à tester * @param array $tableau Le tableau où rechercher la clé ($_POST par défaut) * @return bool Vrai si la clé existe et renvoie une valeur non vide */ function issetAndNoEmpty($name, $tableau = null) { if ($tableau === null) { $tableau = $_POST; } return (isset($tableau[$name]) === true && empty($tableau[$name]) === false); } /** * Fonction permettant de générer les URL pour les sondage * * @param string $id L'identifiant du sondage * @param bool $admin True pour générer une URL pour l'administration d'un sondage, False pour un URL publique * @return string L'url pour le sondage */ function getUrlSondage($id, $admin = false) { if ($admin === true) { $url = get_server_name().'results.php?id='.$id; } else { $url = get_server_name().'/public/studs.php?sondage='.$id; } return $url; } /** * Generate a random id * * @param string $car Char to generate key * @return string */ function dol_survey_random($car) { $string = ""; $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; mt_srand((double) microtime() * 1000000); for ($i = 0; $i < $car; $i++) { $string .= $chaine[mt_rand() % strlen($chaine)]; } return $string; } /** * Add a poll * * @return void */ function ajouter_sondage() { global $db, $user; require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; $sondage = dol_survey_random(16); $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; $allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1; // Insert survey $opensurveysondage = new Opensurveysondage($db); $opensurveysondage->id_sondage = $sondage; $opensurveysondage->commentaires = $_SESSION['commentaires']; $opensurveysondage->description = $_SESSION['commentaires']; $opensurveysondage->mail_admin = $_SESSION['adresse']; $opensurveysondage->nom_admin = $_SESSION['nom']; $opensurveysondage->titre = $_SESSION['titre']; $opensurveysondage->date_fin = $_SESSION['champdatefin']; $opensurveysondage->format = $_SESSION['formatsondage']; $opensurveysondage->mailsonde = $_SESSION['mailsonde']; $opensurveysondage->allow_comments = $allow_comments; $opensurveysondage->allow_spy = $allow_spy; $opensurveysondage->sujet = $_SESSION['toutchoix']; $res = $opensurveysondage->create($user); if ($res < 0) { dol_print_error($db); } unset($_SESSION["titre"]); unset($_SESSION["nom"]); unset($_SESSION["adresse"]); unset($_SESSION["commentaires"]); unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); unset($_SESSION['allow_spy']); unset($_SESSION['toutchoix']); unset($_SESSION['totalchoixjour']); unset($_SESSION['champdatefin']); $urlback = dol_buildpath('/opensurvey/card.php', 1).'?id='.$sondage; header("Location: ".$urlback); exit(); }