41 $head[0][0] =
'card.php?id='.$object->id_sondage;
42 $head[0][1] = $langs->trans(
"Survey");
43 $head[0][2] =
'general';
46 $head[1][0] =
'results.php?id='.$object->id_sondage;
47 $head[1][1] = $langs->trans(
"SurveyResults");
48 $nbVotes =
$object->countVotes();
50 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbVotes).
'</span>';
52 $head[1][2] =
'preview';
78function llxHeaderSurvey($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [], $numsondage =
'')
84 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, 1);
86 print
'<body id="mainbody" class="publicnewmemberform">';
88 include_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
91 print
'<span id="dolpaymentspan"></span>'.
"\n";
92 print
'<div class="center">'.
"\n";
94 print
'<form name="formulaire" action="studs.php?sondage='.urlencode($numsondage).
'#bas" method="POST">'.
"\n";
95 print
'<input type="hidden" name="sondage" value="'.$numsondage.
'"/>';
96 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
99 print
'<div class="survey_borders"><br><br>';
135 $url = $urlwithouturlroot.dol_buildpath(
'/opensurvey/', 1);
137 if (!preg_match(
"|/$|", $url)) {
153 if ($tableau ===
null) {
157 return (isset($tableau[$name]) && !empty($tableau[$name]));
170 if ($admin ===
true) {
189 $chaine =
"abcdefghijklmnopqrstuvwxyz123456789";
190 mt_srand((
int) ((
float) microtime() * 1000000));
191 for ($i = 0; $i < $car; $i++) {
192 $string .= $chaine[mt_rand() % strlen($chaine)];
206 require_once DOL_DOCUMENT_ROOT.
'/opensurvey/class/opensurveysondage.class.php';
210 $allow_comments = empty($_SESSION[
'allow_comments']) ? 0 : 1;
211 $allow_spy = empty($_SESSION[
'allow_spy']) ? 0 : 1;
215 $opensurveysondage->id_sondage = $sondage;
216 $opensurveysondage->description = $_SESSION[
'description'];
217 $opensurveysondage->mail_admin = $_SESSION[
'adresse'];
218 $opensurveysondage->nom_admin = $_SESSION[
'nom'];
219 $opensurveysondage->title = $_SESSION[
'title'];
220 $opensurveysondage->date_fin = $_SESSION[
'champdatefin'];
221 $opensurveysondage->format = $_SESSION[
'formatsondage'];
222 $opensurveysondage->mailsonde = $_SESSION[
'mailsonde'];
223 $opensurveysondage->allow_comments = $allow_comments;
224 $opensurveysondage->allow_spy = $allow_spy;
225 $opensurveysondage->sujet = $_SESSION[
'toutchoix'];
227 $res = $opensurveysondage->create($user);
233 unset($_SESSION[
"title"]);
234 unset($_SESSION[
"nom"]);
235 unset($_SESSION[
"adresse"]);
236 unset($_SESSION[
"description"]);
237 unset($_SESSION[
"mailsonde"]);
238 unset($_SESSION[
'allow_comments']);
239 unset($_SESSION[
'allow_spy']);
240 unset($_SESSION[
'toutchoix']);
241 unset($_SESSION[
'totalchoixjour']);
242 unset($_SESSION[
'champdatefin']);
244 $urlback =
dol_buildpath(
'/opensurvey/card.php', 1).
'?id='.$sondage;
246 header(
"Location: ".$urlback);
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
Put here description of your class.
htmlPrintOnlineHeader($mysoc, $langs, $showlogo=1, $alttext='', $subimageconst='', $altlogo1='', $altlogo2='')
Show the header of a company in HTML public pages.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
dol_htmloutput_events($disabledoutputofmessages=0)
Print formatted messages to output (Used to show messages on html output).
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
llxFooterSurvey()
Show footer for new member.
get_server_name()
get_server_name
opensurvey_prepare_head(Opensurveysondage $object)
Returns an array with the tabs for the "Opensurvey poll" section It loads tabs from modules looking f...
getUrlSondage($id, $admin=false)
Fonction permettant de générer les URL pour les sondage.
llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[], $numsondage='')
Show header for new member.
dol_survey_random($car)
Generate a random id.
issetAndNoEmpty($name, $tableau=null)
Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau.
ajouter_sondage()
Add a poll.