40 $head[0][0] =
'card.php?id='.$object->id_sondage;
41 $head[0][1] = $langs->trans(
"Survey");
42 $head[0][2] =
'general';
45 $head[1][0] =
'results.php?id='.$object->id_sondage;
46 $head[1][1] = $langs->trans(
"SurveyResults");
47 $head[1][2] =
'preview';
73 function llxHeaderSurvey($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'', $numsondage =
'')
75 global $conf, $langs, $mysoc;
76 global $dolibarr_main_url_root;
80 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, 1);
82 print '<body id="mainbody" class="publicnewmemberform">';
84 print '<span id="dolpaymentspan"></span>'.
"\n";
85 print '<div class="center">'.
"\n";
86 print '<form name="formulaire" action="studs.php?sondage='.urlencode($numsondage).
'#bas" method="POST">'.
"\n";
87 print '<input type="hidden" name="sondage" value="'.$numsondage.
'"/>';
88 print '<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
93 $logosmall = $mysoc->logo_small;
99 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall))
101 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
102 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
103 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo))
105 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
106 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
112 print '<div class="backgreypublicpayment">';
113 print '<div class="logopublicpayment">';
114 print '<img id="dolpaymentlogo" src="'.$urllogo.
'"';
117 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
118 print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref?utm_medium=website&utm_source=poweredby" href="https://www.dolibarr.org" target="dolibarr" rel="noopener">'.$langs->trans(
"PoweredBy").
'<br><img src="'.DOL_URL_ROOT.
'/theme/dolibarr_logo.svg" width="80px"></a></div>';
123 print '<div style="margin-left: 50px; margin-right: 50px; text-align: start;"><br>';
153 global $dolibarr_main_url_root;
155 $urlwithouturlroot = preg_replace(
'/'.preg_quote(DOL_URL_ROOT,
'/').
'$/i',
'', trim($dolibarr_main_url_root));
159 $url = $urlwithouturlroot.dol_buildpath(
'/opensurvey/', 1);
161 if (!preg_match(
"|/$|", $url)) {
177 if ($tableau === null) {
181 return (isset($tableau[$name]) ===
true && empty($tableau[$name]) ===
false);
194 if ($admin ===
true) {
213 $chaine =
"abcdefghijklmnopqrstuvwxyz123456789";
214 mt_srand((
double) microtime() * 1000000);
215 for ($i = 0; $i < $car; $i++) {
216 $string .= $chaine[mt_rand() % strlen($chaine)];
230 require_once DOL_DOCUMENT_ROOT.
'/opensurvey/class/opensurveysondage.class.php';
234 $allow_comments = empty($_SESSION[
'allow_comments']) ? 0 : 1;
235 $allow_spy = empty($_SESSION[
'allow_spy']) ? 0 : 1;
239 $opensurveysondage->id_sondage = $sondage;
240 $opensurveysondage->description = $_SESSION[
'description'];
241 $opensurveysondage->mail_admin = $_SESSION[
'adresse'];
242 $opensurveysondage->nom_admin = $_SESSION[
'nom'];
243 $opensurveysondage->title = $_SESSION[
'title'];
244 $opensurveysondage->date_fin = $_SESSION[
'champdatefin'];
245 $opensurveysondage->format = $_SESSION[
'formatsondage'];
246 $opensurveysondage->mailsonde = $_SESSION[
'mailsonde'];
247 $opensurveysondage->allow_comments = $allow_comments;
248 $opensurveysondage->allow_spy = $allow_spy;
249 $opensurveysondage->sujet = $_SESSION[
'toutchoix'];
251 $res = $opensurveysondage->create($user);
257 unset($_SESSION[
"title"]);
258 unset($_SESSION[
"nom"]);
259 unset($_SESSION[
"adresse"]);
260 unset($_SESSION[
"description"]);
261 unset($_SESSION[
"mailsonde"]);
262 unset($_SESSION[
'allow_comments']);
263 unset($_SESSION[
'allow_spy']);
264 unset($_SESSION[
'toutchoix']);
265 unset($_SESSION[
'totalchoixjour']);
266 unset($_SESSION[
'champdatefin']);
268 $urlback =
dol_buildpath(
'/opensurvey/card.php', 1).
'?id='.$sondage;
270 header(
"Location: ".$urlback);
dol_htmloutput_events($disabledoutputofmessages=0)
Print formated messages to output (Used to show messages on html output).
printCommonFooter($zone= 'private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
get_server_name()
get_server_name
getUrlSondage($id, $admin=false)
Fonction permettant de générer les URL pour les sondage.
top_htmlhead($head, $title= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $disablejmobile=0, $disablenofollow=0)
Ouput html header of a page.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
llxFooterSurvey()
Show footer for new member.
issetAndNoEmpty($name, $tableau=null)
Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau.
dol_survey_random($car)
Generate a random id.
Put here description of your class.
opensurvey_prepare_head(Opensurveysondage $object)
Returns an array with the tabs for the "Opensurvey poll" section It loads tabs from modules looking f...
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
ajouter_sondage()
Add a poll.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).
llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $numsondage= '')
Show header for new member.