Merge branch 'opensurvey-improvements' of

https://github.com/marcosgdf/dolibarr into
marcosgdf-opensurvey-improvements

Conflicts:
	ChangeLog
This commit is contained in:
Laurent Destailleur 2014-01-12 14:50:00 +01:00
commit 06aa3b8250
91 changed files with 1213 additions and 1651 deletions

View File

@ -50,6 +50,9 @@ http://www.fsf.org/licensing/licenses/index_html
Copyright
---------
Copyright (C) 2014
- Marcos García <marcosgdf@gmail.com>
Copyright (C) 2013
- Christophe Battarel <christophe.battarel@altairis.fr>
- Laurent Destailleur <eldy@users.sourceforge.net>

View File

@ -12,6 +12,8 @@ For users:
- New: Add option MAIN_AUTO_TIMESTAMP_IN_NOTES to automatically add timestamp
and user line into editionf field when editing a note.
- New: Add button cancel into edition of notes.
- New: Improved Opensurvey module and added options to disable comments and disable
public votes
For translators:
- Update language files.
@ -20,6 +22,7 @@ For developers:
- New: Add path file of trigger into admin trigger list page.
- New: More phpunit tests.
- New: Payments and supplier payment pages tabs can now be extended from modules.
<<<<<<< HEAD
- New: Add option 'aZ' into GETPOST function to check parameters contains
only a to z or A to Z characters.
@ -29,6 +32,10 @@ Dolibarr better:
- The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been
removed. You must now use the 6 parameters way. See file modMyModule.class.php for example.
=======
- New: Opensurvey polls tab cards can now be extended from external modules.
- New: Triggers OPENSURVEY_CREATE, OPENSURVEY_DELETE
>>>>>>> 2313ea01dda16f3dc73c718bee2bf1c38291fa49
***** ChangeLog for 3.5 compared to 3.4.* *****
For users:

View File

@ -134,6 +134,7 @@ class modMyModule extends DolibarrModules
// 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
// 'opensurveypoll' to add a tab in opensurvey poll view
$this->tabs = array();
// Dictionnaries

View File

@ -1,5 +1,6 @@
<?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
@ -74,9 +75,6 @@ class modOpenSurvey extends DolibarrModules
//$this->dirs[0] = DOL_DATA_ROOT.'/mymodule;
//$this->dirs[1] = DOL_DATA_ROOT.'/mymodule/temp;
// Config pages. Put here list of php page names stored in admin directory used to setup module
$this->config_page_url = array("index.php@opensurvey");
// Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
@ -110,8 +108,7 @@ class modOpenSurvey extends DolibarrModules
$this->rights[$r][1] = 'Read surveys'; // Permission label
$this->rights[$r][2] = 'r'; // Permission by default for new user (0/1)
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
$this->rights[$r][4] = 'survey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$r++;
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
@ -120,8 +117,7 @@ class modOpenSurvey extends DolibarrModules
$this->rights[$r][1] = 'Create/modify surveys'; // Permission label
$this->rights[$r][2] = 'w'; // Permission by default for new user (0/1)
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
$this->rights[$r][4] = 'survey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$r++;
@ -137,7 +133,7 @@ class modOpenSurvey extends DolibarrModules
'langs'=>'opensurvey',
'position'=>200,
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->opensurvey->survey->read',
'perms'=>'$user->rights->opensurvey->read',
'target'=>'',
'user'=>0);
$r++;
@ -161,12 +157,12 @@ class modOpenSurvey extends DolibarrModules
'titre'=>'NewSurvey',
'mainmenu'=>'opensurvey',
'leftmenu'=>'opensurvey_new',
'url'=>'/opensurvey/public/index.php?origin=dolibarr',
'url'=>'/opensurvey/wizard/index.php',
'langs'=>'opensurvey',
'position'=>210,
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
'perms'=>'',
'target'=>'_blank',
'perms'=>'$user->rights->opensurvey->write',
'target'=>'',
'user'=>0);
$r++;

View File

@ -18,3 +18,15 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_comments TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER canedit ;
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible ;
ALTER TABLE llx_opensurvey_sondage DROP INDEX idx_id_sondage_admin ;
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN id_sondage_admin ;
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN canedit ;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_spy TINYINT( 1 ) UNSIGNED NOT NULL AFTER allow_comments ;
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN origin ;
ALTER TABLE llx_opensurvey_sondage ADD COLUMN fk_user_creat INT( 11 ) UNSIGNED NOT NULL AFTER nom_admin ;
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN mailsonde mailsonde TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN titre titre TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN date_fin date_fin DATETIME NOT NULL;
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN format format VARCHAR( 2 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

View File

@ -15,5 +15,4 @@
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- ============================================================================
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin);

View File

@ -17,17 +17,16 @@
CREATE TABLE llx_opensurvey_sondage (
id_sondage VARCHAR(16) PRIMARY KEY,
id_sondage_admin VARCHAR(24),
commentaires text,
mail_admin VARCHAR(128),
nom_admin VARCHAR(64),
titre TEXT,
date_fin DATETIME,
format VARCHAR(2),
mailsonde varchar(2) DEFAULT '0',
survey_link_visible integer DEFAULT 1,
canedit integer DEFAULT 0,
origin VARCHAR(64),
fk_user_creat INT(11) UNSIGNED NOT NULL,
titre TEXT NOT NULL,
date_fin DATETIME NOT NULL,
format VARCHAR(2) NOT NULL,
mailsonde TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0',
allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1,
allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1,
tms TIMESTAMP,
sujet TEXT
) ENGINE=InnoDB;
) ENGINE=InnoDB;

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=الحد من التاريخ
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=الحد من التاريخ
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=الحد من التاريخ
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Крайната дата
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Крайната дата
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Крайната дата
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Crear enquesta
PollTitle=Títol de l'enquesta
OpenSurveyYourName=El seu nom
OpenSurveyYourEMail=La seva adreça de correu electrònic
VotersCanModify=Els votants poden modificar el vot d'altres
ToReceiveEMailForEachVote=Per rebre un email per cada vot
TypeDate=Tipus de data
TypeClassic=Tipus estándar
YouAreInPollCreateArea=Està a la secció de creació d'enquestes
FieldMandatory=Camp obligatori
OpenSurveyDesc=Servei online per planificar una cita o elaborar una enquesta de forma fàcil i ràpida
OpenSurveyNoRegistration=SSense registre requerit.
OpenSurveyStep2=Seleccioneu les dates entre els dies lliures (verds). Els dies seleccionats són de color blau. Pot seleccionar un dia prèviament seleccionat fent clic de nou en ell
RemoveAllDays=Eliminar tots els dies
CopyHoursOfFirstDay=Copia hores del primer dia
@ -43,7 +39,6 @@ YesNoList=Llista (buit/sí/no)
PourContreList=Llista (buit/a favor/en contra)
AddNewColumn=Afegir nova columna
TitleChoice=Títol de l'opció
InfoAfterCreate=Un cop hagi confirmat la creació de la seva enquesta, passareu automàticament a la pàgina de la seva enquesta.<br>També rebrà un email amb un enllaç a la seva enquesta per enviar als votants.
ExportSpreadsheet=Exportar resultats a un full de càlcul
ExpireDate=Data límit
NbOfVoters=Núm. de votants
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Aquest nom ja havia estat usat per a aquesta enquesta
ErrorPollDoesNotExists=Error, l'enquesta <strong>%s</strong> no existeix.
OpenSurveyNothingToSetup=No hi ha una configuració específica que fer.
PollWillExpire=La seva enquesta expirarà automàticament <strong>%s</strong> dies després de l'última data de la seva enquesta.
RemovalDate=Data d'eliminació
AddADate=Afegir una data
AddStartHour=Afegir hora d'inici
AddEndHour=Afegir hora de fi
@ -66,4 +60,3 @@ NoCommentYet=Cap comentari ha estat publicat per a aquesta enquesta
CanEditVotes=Podeu canviar el vot d'altres
SelectDayDesc=Per a cada dia seleccionat, pot triar, o no, les hores de reunió en el següent format:<br>- buit,<br>- "8h", "8H" o "8:00" per proporcionar una hora d'inici de la reunió,<br>- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" per proporcionar una hora d'inici i de fi de la reunió,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" per el mateix però amb minuts.
BackToCurrentMonth=Tornar al mes actual
PublicLinkToCreateSurvey=Enllaç públic que permet a qualsevol crear una enquesta

View File

@ -11,14 +11,10 @@ CreatePoll=Vytvoření ankety
PollTitle=Anketa titul
OpenSurveyYourName=Vaše jméno
OpenSurveyYourEMail=Vaše e-mailová adresa
VotersCanModify=Voliči mohou změnit hlas ostatních
ToReceiveEMailForEachVote=Chcete-li obdržet e-mail pro každé hlasování
TypeDate=Zadejte datum
TypeClassic=Typ standardní
YouAreInPollCreateArea=Nacházíte se v sekci pro vytvoření hlasování
FieldMandatory=Pole povinné
OpenSurveyDesc=Online služby naplánovat rendez-vous nebo udělat průzkum snadno a rychle.
OpenSurveyNoRegistration=Ne nutná registrace.
OpenSurveyStep2=Zvolte termín Vašeho amoung volné dny (zelená). Vybrané dny jsou v modré barvě. Můžete zrušit výběr den předem zvolenou opětovným kliknutím na něj
RemoveAllDays=Odstraňte všechny dny
CopyHoursOfFirstDay=Kopírování hodin prvního dne
@ -43,7 +39,6 @@ YesNoList=List (prázdný / ano / ne)
PourContreList=List (prázdný / pro / proti)
AddNewColumn=Přidat nový sloupec
TitleChoice=Volba štítek
InfoAfterCreate=Poté, co jste potvrdili vytvoření vašeho hlasování, budete automaticky přesměrováni na stránku vašeho hlasování. <br> Také byste měli obdržet e-mail s odkazem na vaše hlasování pro odeslání do voličů.
ExportSpreadsheet=Export výsledků tabulku
ExpireDate=Omezit datum
NbOfVoters=Nb voličů
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Tento název již byl použit při tomto hlasování
ErrorPollDoesNotExists=Chyba hlasování <strong>%s</strong> neexistuje.
OpenSurveyNothingToSetup=Neexistuje žádné specifické nastavení dělat.
PollWillExpire=Váš průzkum skončí automaticky <strong>%s</strong> dní po posledním dni svého hlasování.
RemovalDate=Odstranění data
AddADate=Přidat datum
AddStartHour=Přidat začít hodinu
AddEndHour=Přidat end hodinu
@ -66,4 +60,3 @@ NoCommentYet=Žádné komentáře byly zveřejněny na tuto anketu ještě
CanEditVotes=Může změnit hlas ostatních
SelectDayDesc=Pro každý vybraný den, můžete si vybrat, zda se mají splnit hodin v následujícím formátu: <br> - Prázdné, <br> - &quot;8h&quot;, &quot;8H&quot; nebo &quot;8:00&quot; dát schůzku v úvodní hodinu, <br> - &quot;8-11&quot;, &quot;8h-11h&quot;, &quot;8H-11H&quot; nebo &quot;08:00-11:00&quot; dát schůzku je začátek a konec hodiny, <br> - &quot;8h15-11h15&quot;, &quot;8H15-11h15&quot; nebo &quot;08:15-11:15&quot; to samé, ale v minutách.
BackToCurrentMonth=Zpět na aktuální měsíc
PublicLinkToCreateSurvey=Veřejné odkaz dovolit každý vytvořit průzkum

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Limit dato
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Limit dato
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Limit dato
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Abstimmung erstellen
PollTitle=Abstimmungstitel
OpenSurveyYourName=Ihr Name
OpenSurveyYourEMail=Ihre E-Mail-Adresse
VotersCanModify=Wähler können Stimmen von Anderen verändern
ToReceiveEMailForEachVote=EMail für jede Stimme erhalten
TypeDate=Typ Datum
TypeClassic=Typ Standard
YouAreInPollCreateArea=Du bist im Abschnitt "Abstimmung erstellen"
FieldMandatory=Feld zwingend nötig
OpenSurveyDesc=Online-Service um eine Verabredung oder eine Umfrage schnell und einfach zu erstellen
OpenSurveyNoRegistration=Keine Registrierung benötigt.
OpenSurveyStep2=Wähle Deine Daten unter den freien Tagen (grün). Die ausgewählten Tage erscheinen blau. Du kannst einen bereits ausgewählten Tag durch anklicken wieder abwählen.
RemoveAllDays=Alle Tage entfernen
CopyHoursOfFirstDay=Stunden vom ersten Tag kopieren
@ -43,7 +39,6 @@ YesNoList=Liste (leer/ja/nein)
PourContreList=Liste (leer/dafür/dagegen)
AddNewColumn=Neue Spalte hinzufügen
TitleChoice=Beschreibung wählen
InfoAfterCreate=Nach der Bestätigungen zum Erstellen der Abstimmung wirst Du automatisch auf die Seite mit der Abstimmung weitergeleitet.<br>Du solltest auch ein Email mit einem Link zur Abstimmung erhalten, welches Du an die Wähler schicken kannst.
ExportSpreadsheet=Exportiere Resultattabelle
ExpireDate=Frist
NbOfVoters=Anzahl Wähler
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Dieser Name wurde für diese Abstimmung schon benutzt
ErrorPollDoesNotExists=Fehler, Umfrage <strong>%s</strong> existiert nicht.
OpenSurveyNothingToSetup=Es gibt nichts Spezielles zu konfigurieren.
PollWillExpire=Deine Abstimmung endet automatisch nach <strong>%s</strong> Tagen nach dem letzten Abstimmungstag.
RemovalDate=Entferndatum
AddADate=Datum hinzufügen
AddStartHour=Startzeit hinzufügen
AddEndHour=Endzeit hinzufügen
@ -66,4 +60,3 @@ NoCommentYet=Bisher gibt es keine Kommentare für diese Abstimmung
CanEditVotes=Kann Stimmen von Anderen verändern
SelectDayDesc=Für jeden ausgewählen Tag kann man die Besprechungszeiten im folgenden Format auswählen:<br>- leer,<br>- "8h", "8H" oder "8:00" für eine Besprechungs-Startzeit,<br>- "8-11", "8h-11h", "8H-11H" oder "8:00-11:00" für eine Besprechungs-Start und -Endzeit,<br>- "8h15-11h15", "8H15-11H15" oder "8:15-11:15" für das Gleiche aber mit Minuten.
BackToCurrentMonth=Zurück zum aktuellen Monat
PublicLinkToCreateSurvey=Öffentlicher Link mit dem Jeder eine Umfrage erstellen kann

View File

@ -11,14 +11,10 @@ CreatePoll=Δημιουργία δημοσκόπησης
PollTitle=Τίτλος δημοσκόπησης
OpenSurveyYourName=Το όνομά σας
OpenSurveyYourEMail=Η διεύθυνση email σας
VotersCanModify=Οι ψηφοφόροι μπορούν να τροποποιήσουν την ψήφο των άλλων
ToReceiveEMailForEachVote=Να λαμβάνετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου για κάθε ψηφοφορία
TypeDate=Ημερομηνία
TypeClassic=Πρότυπο
YouAreInPollCreateArea=Βρίσκεστε στο τμήμα δημιουργίας δημοσκόπηση
FieldMandatory=Υποχρεωτικό πεδίο
OpenSurveyDesc=On-line υπηρεσία για να προγραμματίσετε ένα ραντεβού ή να κάνετε μια έρευνα γρήγορα και εύκολα.
OpenSurveyNoRegistration=Δεν απαιτείται εγγραφή.
OpenSurveyStep2=Επιλέξτε τις ημερομηνίες σας ανάμεσα στις ελεύθερες ημέρες (πράσινο). Οι επιλεγμένες ημέρες είναι σε μπλε χρώμα. Μπορείτε να ακυρώσετε μια μέρα προηγουμένως επιλεγεί κάνοντας κλικ ξανά πάνω του
RemoveAllDays=Αφαιρέστε όλες τις ημέρες
CopyHoursOfFirstDay=Αντιγραφή ωρών της πρώτης ημέρας
@ -43,7 +39,6 @@ YesNoList=Λίστα (άδειο/ναι/όχι)
PourContreList=Λίστα (άδειο/για/από)
AddNewColumn=Προσθέσετε νέα στήλη
TitleChoice=Επιλέξτε ετικέτα
InfoAfterCreate=Αφού έχετε επιβεβαιώσει τη δημιουργία της δημοσκόπησης σας, θα μεταφερθείτε αυτόματα στη σελίδα της δημοσκόπησης σας.<br>Θα πρέπει επίσης να λάβετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου με το σύνδεσμο στο δικό σας δημοψήφισμα για την αποστολή τους στους ψηφοφόρους.
ExportSpreadsheet=Εξαγωγή αποτελεσμάτων σε υπολογιστικό φύλλο
ExpireDate=Όριο ημερομηνίας
NbOfVoters=Αριθμός ψηφοφόρων
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Το όνομα αυτό χρησιμοποιείται ή
ErrorPollDoesNotExists=Σφάλμα, δημοσκόπησης <strong>%s</strong> δεν υπάρχει.
OpenSurveyNothingToSetup=Δεν υπάρχει συγκεκριμένη ρύθμιση να κάνετε.
PollWillExpire=Δημοσκόπηση σας θα λήξει αυτόματα <strong>%s</strong> ημέρες μετά την τελευταία ημέρα της δημοσκόπησης σας.
RemovalDate=Ημερομηνία αφαίρεσης
AddADate=Προσθέσετε μια ημερομηνία
AddStartHour=Προσθέσετε ώρα έναρξη
AddEndHour=Προσθέσετε ώρα λήξης
@ -66,4 +60,3 @@ NoCommentYet=Δεν έχουν αναρτηθεί σχόλια για αυτή
CanEditVotes=Μπορεί να αλλάξει την ψήφο των άλλων
SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
BackToCurrentMonth=Πίσω στον τρέχοντα μήνα
PublicLinkToCreateSurvey=Κοινόχρηστους σύνδεσμος για να επιτρέπει σε όλους να δημιουργούν μια έρευνα

View File

@ -37,6 +37,7 @@ ErrorBadParameters=Bad parameters
ErrorBadValueForParameter=Wrong value '%s' for parameter incorrect '%s'
ErrorBadImageFormat=Image file has not a supported format
ErrorBadDateFormat=Value '%s' has wrong date format
ErrorWrongDate=Date is not correct!
ErrorFailedToWriteInDir=Failed to write in directory %s
ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s)
ErrorUserCannotBeDelete=User can not be deleted. May be it is associated on Dolibarr entities.
@ -63,7 +64,7 @@ ErrorNoValueForRadioType=Please fill value for radio list
ErrorBadFormatValueList=The list value cannot have more than one come : <u>%s</u>, but need at least one: llave,valores
ErrorFieldCanNotContainSpecialCharacters=Field <b>%s</b> must not contains special characters.
ErrorNoAccountancyModuleLoaded=No accountancy module activated
ErrorExportDuplicateProfil=This profil name already exists for this export set.
ErrorExportDuplicateProfil=This profile name already exists for this export set.
ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete.
ErrorLDAPMakeManualTest=A .ldif file has been generated in directory %s. Try to load it manually from command line to have more information on errors.
ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "statut not started" if field "done by" is also filled.
@ -127,6 +128,7 @@ ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setu
ErrorPHPNeedModule=Error, your PHP must have module <b>%s</b> installed to use this feature.
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
ErrorWarehouseMustDiffers=Source and target warehouses must differs
ErrorBadFormat=Bad format!
# Warnings
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
@ -143,4 +145,4 @@ WarningUntilDirRemoved=All security warnings (visible by admin users only) will
WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution.
WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box.
WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card).
WarningNotRelevant=Irrelevant operation for this dataset
WarningNotRelevant=Irrelevant operation for this dataset

View File

@ -9,16 +9,9 @@ AddACommentForPoll=You can add a comment into survey...
AddComment=Add comment
CreatePoll=Create poll
PollTitle=Poll title
OpenSurveyYourName=Your name
OpenSurveyYourEMail=Your email address
VotersCanModify=Voters can modify vote of others
ToReceiveEMailForEachVote=To receive an email for each vote
TypeDate=Type date
TypeClassic=Type standard
YouAreInPollCreateArea=You are in the poll creation section
FieldMandatory=Field mandatory
OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
OpenSurveyNoRegistration=No registration required.
OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
RemoveAllDays=Remove all days
CopyHoursOfFirstDay=Copy hours of first day
@ -27,15 +20,12 @@ SelectedDays=Selected days
TheBestChoice=The best choice currently is
TheBestChoices=The best choices currently are
with=with
OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you (without paying attention to the choices of the other voters) and validate with the plus button at the end of the line.
InitiatorOfPoll=Initiator of the poll
OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.
CommentsOfVoters=Comments of voters
ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes)
RemovePoll=Remove poll
PollManagement=Polls management
BackToHoursSetup=Back to hours setup
UrlForSurvey=URL to communicate to get a direct access to survey
PollOnChoice=Your are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll:
PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll:
CreateSurveyDate=Create a date survey
CreateSurveyStandard=Create a standard survey
CheckBox=Simple checkbox
@ -43,7 +33,6 @@ YesNoList=List (empty/yes/no)
PourContreList=List (empty/for/against)
AddNewColumn=Add new column
TitleChoice=Choice label
InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
ExportSpreadsheet=Export result spreadsheet
ExpireDate=Limit date
NbOfVoters=Nb of voters
@ -57,13 +46,20 @@ VoteNameAlreadyExists=This name was already used for this poll
ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
OpenSurveyNothingToSetup=There is no specific setup to do.
PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
RemovalDate=Removal date
AddADate=Add a date
AddStartHour=Add start hour
AddEndHour=Add end hour
votes=vote(s)
NoCommentYet=No comments have been posted for this poll yet
CanEditVotes=Can change vote of others
CanComment=Voters can comment in the poll
CanSeeOthersVote=Voters can see other people's vote
SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
BackToCurrentMonth=Back to current month
PublicLinkToCreateSurvey=Public link to allow everybody to create a survey
ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation
ErrorOpenSurveyOneChoice=Enter at least one choice
ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY
ErrorInsertingComment=There was an error while inserting your comment
MoreChoices=Enter more choices for the voters
SurveyExpiredInfo=The voting time of this poll has expired.
EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s

View File

@ -11,14 +11,10 @@ CreatePoll=Crear encuesta
PollTitle=Título de la encuesta
OpenSurveyYourName=Su nombre
OpenSurveyYourEMail=Su dirección de correo electrónico
VotersCanModify=Los votantes pueden modificar el voto de otros
ToReceiveEMailForEachVote=Para recibir un email por cada voto
TypeDate=Tipo fecha
TypeClassic=Tipo estándar
YouAreInPollCreateArea=Está en la sección de creación de encuestas
FieldMandatory=Campo obligatorio
OpenSurveyDesc=Servicio online para planificar una cita o elaborar una encuesta de forma fácil y rápida.
OpenSurveyNoRegistration=Sin registro requerido.
OpenSurveyStep2=Seleccione sus fechas de entre los días libres (verdes). Los días seleccionados son de color azul. Puede seleccionar un día previamente seleccionado haciendo click de nuevo en él
RemoveAllDays=Eliminar todos los días
CopyHoursOfFirstDay=Copiar horas del primer día
@ -43,7 +39,6 @@ YesNoList=Lista (vacío/sí/no)
PourContreList=Lista (vacío/a favor/en contra)
AddNewColumn=Añadir nueva columna
TitleChoice=Título de la opción
InfoAfterCreate=Una vez haya confirmado la creación de su encuesta, será redirigido automáticamente a la página de su encuesta.<br>También recibirá un email con un enlace a su encuesta para enviárselo a los votantes.
ExportSpreadsheet=Exportar resultados a una hoja de cálculo
ExpireDate=Fecha límite
NbOfVoters=Núm. de votantes
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Este nombre ya había sido usado para esta encuesta
ErrorPollDoesNotExists=Error, la encuesta <strong>%s</strong> no existe.
OpenSurveyNothingToSetup=No hay una configuración específica que hacer.
PollWillExpire=Su encuesta expirará automáticamente <strong>%s</strong> días después de la última fecha de su encuesta.
RemovalDate=Fecha de eliminación
AddADate=Añadir una fecha
AddStartHour=Añadir hora de inicio
AddEndHour=Añadir hora de fin
@ -66,4 +60,3 @@ NoCommentYet=Ningún comentario ha sido publicado todavía para esta encuesta
CanEditVotes=Puede cambiar el voto de otros
SelectDayDesc=Para cada día seleccionado, puede elegir, o no, las horas de reunión en el siguiente formato:<br>- vacío,<br>- "8h", "8H" o "8:00" para proporcionar una hora de inicio de la reunión,<br>- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" para proporcionar una hora de inicio y de fin de la reunión,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" para lo mismo pero con minutos.
BackToCurrentMonth=Volver al mes actual
PublicLinkToCreateSurvey=Enlace público que permite a cualquiera crear una encuesta

View File

@ -11,14 +11,10 @@ CreatePoll=Loo küsitlus
PollTitle=Küsitluse pealkiri
OpenSurveyYourName=Sinu nimi
OpenSurveyYourEMail=Sinu e-posti aadress
VotersCanModify=Hääletajad saavad teiste hääli muuta
ToReceiveEMailForEachVote=Iga hääle kohta saadetakse e-kiri
TypeDate=Liik: kuupäev
TypeClassic=Liik: standardne
YouAreInPollCreateArea=Oled küsitluse loomise sektsioonis
FieldMandatory=Kohustuslik väli
OpenSurveyDesc=Online teenus kohtumise planeerimiseks või kiiresti ja lihtsalt uuringu läbi viimiseks.
OpenSurveyNoRegistration=Registreerimine pole nõutud.
OpenSurveyStep2=Vali kuupäevad vabade päevade seas (rohelised). Valitud päevad on märgitud sinisega. Eelnevalt valitud päevalt saab valiku maha võtta sellel klõpsates
RemoveAllDays=Eemalda kõik päevad
CopyHoursOfFirstDay=Kopeeri esimese päeva tunnid
@ -43,7 +39,6 @@ YesNoList=Nimekiri (tühi/jah/ei)
PourContreList=Nimekiri (tühi/poolt/vastu)
AddNewColumn=Lisa uus veerg
TitleChoice=Valiku silt
InfoAfterCreate=Pärast küsitluse loomise kinnitamist suunatakse Sind automaatselt küsitluse lehele.<br>Samuti peaks Sinuni jõudma e-kiri lingiga küsitlusele, et küsitlust teistele jagada.
ExportSpreadsheet=Ekspordi tulemuste tabel
ExpireDate=Piira kuupäevaga
NbOfVoters=Hääletajaid
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Sellele küsitlusele vastamiseks on seda nime juba kasutat
ErrorPollDoesNotExists=Viga: küsitlust nimega <strong>%s</strong> ei ole
OpenSurveyNothingToSetup=Pole erilist seadistust, mida teha.
PollWillExpire=Sinu küsitlus aegub automaatselt <strong>%s</strong> päeva pärast viimast vastust.
RemovalDate=Kustutamise kuupäev
AddADate=Lisa kuupäev
AddStartHour=Lisa alustamise kellaaeg
AddEndHour=Lisa lõpetamise kellaaeg
@ -66,4 +60,3 @@ NoCommentYet=Sellele küsitlusel ei ole veel ühtki kommentaari
CanEditVotes=Saab teiste hääli muuta
SelectDayDesc=Iga valitud päeva kohta võid, aga ei pea, lisada sobivaid kellaaegasid järgnevas formaadis::<br>- tühi,<br>- "8h", "8H" või "8:00" kohtumise alustamise kellaajaks,<br>- "8-11", "8h-11h", "8H-11H" või "8:00-11:00" kohtumise alustamise ja lõpu kellaajaks,<br>- "8h15-11h15", "8H15-11H15" või "8:15-11:15" on sama, mis eelmine, aga minutitega.
BackToCurrentMonth=Tagasi praegusesse kuusse
PublicLinkToCreateSurvey=Avalik link, mis võimaldab igaühel uuringut luua

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=الحد من التاريخ
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=الحد من التاريخ
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=الحد من التاريخ
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Raja-päivämäärä
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Raja-päivämäärä
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Raja-päivämäärä
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Créer sondage
PollTitle=Titre sondage
OpenSurveyYourName=Votre nom
OpenSurveyYourEMail=Votre adresse email
VotersCanModify=Les votants peuvent modifier les votes des autres
ToReceiveEMailForEachVote=Pour recevoir un email à chaque vote
TypeDate=Type date
TypeClassic=Type classique
YouAreInPollCreateArea=Vous êtes dans l'espace de création de sondage
FieldMandatory=Champ obligatoire
OpenSurveyDesc=Service en ligne permettant de planifier un rendez-vous ou réaliser un sondage rapidement et simplement.
OpenSurveyNoRegistration=Aucune inscription préalable n'est nécessaire.
OpenSurveyStep2=Sélectionner les dates parmi les jours libres (en vert). Les jours sélectionné sont bleus. Vous pouvez désélectionner un jour en cliquant à nouveau dessus.
RemoveAllDays=Efface tous les jours
CopyHoursOfFirstDay=Copier heures du premier jour
@ -43,7 +39,6 @@ YesNoList=Liste (vide/oui/non)
PourContreList=Liste (vide/pour/contre)
AddNewColumn=Ajouter nouvelle colonne
TitleChoice=Libellé du choix
InfoAfterCreate=Une fois la confirmation de la création de votre sondage réalisée, vous serez redirigé vers la page de vote du sondage.<br>Vous devriez de plus recevoir un email avec le lien de la page sondage pour diffusion auprès des votants.
ExportSpreadsheet=Exporter feuille de résultats
ExpireDate=Date expiration
NbOfVoters=Nombre de votants
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Ce nom a déjà été utilisé pour ce vote
ErrorPollDoesNotExists=Erreur, le sondage <strong>%s</strong> n'existe pas.
OpenSurveyNothingToSetup=Aucune configuration particulière n'est requise.
PollWillExpire=Ce sondage expirera automatiquement <strong>%s</strong> jours après la date de dernier choix.
RemovalDate=Date de retrait
AddADate=Ajouter une date
AddStartHour=Ajouter heure de début
AddEndHour=Ajouter heure de fin
@ -66,4 +60,3 @@ NoCommentYet=Pas de commentaires laissés pour le moment sur ce sondage
CanEditVotes=Modification des votes des autres autorisés
SelectDayDesc=Pour chaque jour, vous pouvez choisir, ou pas, les heures au format suivant :<br>- laisser vide,<br>- "8h", "8H" ou "8:00" pour définir uniquement une heure de début,<br>- "8-11", "8h-11h", "8H-11H" ou "8:00-11:00" pour définir une heure de début et de fin,<br>- "8h15-11h15", "8H15-11H15" ou "8:15-11:15" pour définir une heure de début et fin avec précision sur les minutes.
BackToCurrentMonth=Retour au mois en cours
PublicLinkToCreateSurvey=Lien publique pour permettre à tout le monde de créer un sondage

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
# ExpireDate=Limit date
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Dátum korlást
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Dátum korlást
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Dátum korlást
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Takmarka dagsetningu
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Takmarka dagsetningu
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Takmarka dagsetningu
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Crea sondaggio
PollTitle=Titolo del sondaggio
OpenSurveyYourName=Il tuo nome
OpenSurveyYourEMail=Il tuo indirizzo email
VotersCanModify=I votanti possono modificare il voto degli altri
ToReceiveEMailForEachVote=Per ricevere un'email per ogni voto
TypeDate=Digita data
TypeClassic=Tipo standard
YouAreInPollCreateArea=Sei nella sezione di creazione sondaggi
FieldMandatory=Campo obbligatorio
OpenSurveyDesc=Servizio online per pianificare incontri o fare indagini velocemente e con facilità.
OpenSurveyNoRegistration=La registrazione non è necessaria
OpenSurveyStep2=Scegli le date fra i giorni liberi (in verde). I giorni selezionati sono in blu. Puoi deselezionare un giorno precedentemente selezionato cliccandoci di nuovo sopra.
RemoveAllDays=Cancella tutti i giorni
CopyHoursOfFirstDay=Copia le ore del primo giorno
@ -43,7 +39,6 @@ YesNoList=Lista (vuota/sì/no)
PourContreList=Elenco (vuota/a favore/contro)
AddNewColumn=Aggiungi una colonna
TitleChoice=Scegli l'etichetta
InfoAfterCreate=Una volta convalidata la creazione del sondaggio, sarai reindirizzato automaticamente alla pagina del sondaggio.<br>Dovresti anche ricevere una email con il link del sondaggio da mandare ai votanti.
ExportSpreadsheet=Esporta su foglio elettronico
ExpireDate=Data limite
NbOfVoters=Num votanti
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Questo nome è già stato usato in questo sondaggio
ErrorPollDoesNotExists=Errore, il sondaggio <strong>%s</strong>non esiste.
OpenSurveyNothingToSetup=Non ci sono configurazioni da fare.
PollWillExpire=Il sondaggio scadrà automaticamente<strong>%s</strong>giorni dopo la sua data finale.
RemovalDate=Data di cancellazione
AddADate=Aggiungi una data
AddStartHour=Aggiungi un'ora di partenza
AddEndHour=Aggiungi un'ora di fine
@ -66,4 +60,3 @@ NoCommentYet=Non è ancora stato inserito alcun commento su questo sondaggio
CanEditVotes=Puoi cambiare il voto degli altri
SelectDayDesc=Per ogni giorno selezionato, puoi scegliere o no, le ore di riunione nel formato seguente:<br>-vuoto,<br>-"8h", "8H" o "8:00"per definire un orario di inizio,<br>-"8-11", "8h-11h", "8H-11H" o "8:00-11:00" per fornire un orario di inizio e fine,<br>- "8h15-11h15", "8H15-11H15" o "8:15-11:15"la stessa cosa ma con i minuti.
BackToCurrentMonth=Torna al mese in corso
PublicLinkToCreateSurvey=Link pubblico per permettere a tutti di creare un'indagine

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=日付を制限する
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=日付を制限する
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=日付を制限する
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
# ExpireDate=Limit date
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Izveidot aptauju
PollTitle=Aptauja virsraksts
OpenSurveyYourName=Jūsu vārds
OpenSurveyYourEMail=Jūsu e-pasta adrese
VotersCanModify=Vēlētāji var mainīt balsojumu par citiem
ToReceiveEMailForEachVote=Lai saņemtu e-pastu par katru balsojumu
TypeDate=Tipa datums
TypeClassic=Tipa standarts
YouAreInPollCreateArea=Jūs esat pieres daļā radīšanas sadaļā
FieldMandatory=Lauks obligāts
OpenSurveyDesc=Tiešsaistes pakalpojumu, lai plānotu Rendez-vous vai veikt aptauju ātri un viegli.
OpenSurveyNoRegistration=Nav nepieciešama reģistrācija.
OpenSurveyStep2=Izvēlieties datumus amoung bezmaksas dienas (zaļā krāsā). Izvēlētās dienas ir zilā krāsā. Jūs varat noņemsiet dienu iepriekš izvēlēto noklikšķinot vēlreiz uz tā
RemoveAllDays=Noņemt visas dienas
CopyHoursOfFirstDay=Kopēt stundas pirmajā dienā
@ -43,7 +39,6 @@ YesNoList=Saraksts (tukšs/jā/nē)
PourContreList=Saraksts (tukšs/par/pret)
AddNewColumn=Pievienot jaunu kolonnu
TitleChoice=Izvēlies nosaukumu
InfoAfterCreate=Kad esat apstiprinājuši izveidot savu aptauju, jums tiks automātiski novirzīts uz lapu jūsu aptaujā. <br> Jums vajadzētu saņemt arī e-pastu ar saiti uz jūsu aptauju, lai nosūtītu to uz vēlētājiem.
ExportSpreadsheet=Eksporta rezultātu izklājlapu
ExpireDate=Ierobežot datumu
NbOfVoters=Balsotāju skaits
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Šis nosaukums jau tika izmantots šajā aptaujā
ErrorPollDoesNotExists=Kļūda, aptauja <strong>%s</strong> neeksistē.
OpenSurveyNothingToSetup=Nav īpašas uzstādīšanas darīt.
PollWillExpire=Jūsu aptauja beigsies automātiski <strong>%s</strong> pēc pēdējās dienas, kad balsošanas datums beigsies.
RemovalDate=Noņemšanas datums
AddADate=Pievienot datumu
AddStartHour=Pievienot sākuma stundu
AddEndHour=Pievienot beigu stundu
@ -66,4 +60,3 @@ NoCommentYet=Nav komentāri ir ievietojis šajā aptaujā vēl
CanEditVotes=Var mainīt balsojumu citiem
SelectDayDesc=Attiecībā uz katru izvēlēto dienu, jūs varat izvēlēties, vai ne, tiekoties stundas šādā formātā: <br> - Tukša, <br> - &quot;8h&quot;, &quot;8H&quot; vai &quot;08:00&quot;, lai sniegtu tikšanos s starta stundu, <br> - &quot;8-11&quot;, &quot;8h-11h&quot;, &quot;8H-11H&quot; vai &quot;8:00-11:00&quot;, lai sniegtu sanāksmi sākuma un beigu stundu, <br> - &quot;8h15-11h15&quot;, &quot;8H15-11H15&quot; vai &quot;8:15-11:15&quot; par to pašu, bet ar minūtes.
BackToCurrentMonth=Atpakaļ uz tekošā mēneša
PublicLinkToCreateSurvey=Sabiedrības saites, lai ļautu ikvienam izveidot aptauju

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Limit date
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Limit date
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Limit date
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Termijn
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Termijn
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Termijn
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Limit daty
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Limit daty
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Limit daty
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Criar uma enquete
PollTitle=Titulo enquete
OpenSurveyYourName=Seu nome
OpenSurveyYourEMail=Seu endereço e-mail
VotersCanModify=Votantes podem modificar voto de outros
ToReceiveEMailForEachVote=Para receber um e-mail por cada voto
TypeDate=Tipo data
TypeClassic=Tipo estandard
YouAreInPollCreateArea=Voce esta na seçao de criaçao da enquete
FieldMandatory=Campo obrigatorio
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
OpenSurveyNoRegistration=Nao e preciso se registrar.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
RemoveAllDays=Remover todos os dias
CopyHoursOfFirstDay=Copiar horarios do primeiro dia
@ -43,7 +39,6 @@ SelectedDays=Dias selecionados
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Data Límite
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Data Límite
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Data Límite
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ AddComment=Adicionar comentário
# PollTitle=Poll title
OpenSurveyYourName=O seu nome
OpenSurveyYourEMail=O seu endereço de email
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
TypeDate=Tipo de data
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@ SelectedDays=Dias selecionados
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Data Limite
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ SurveyResults=Resultados
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ votes=Voto(s)
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Creaţi sondaj
PollTitle=Titlu sondaj
OpenSurveyYourName=Numele dvs.
OpenSurveyYourEMail=Adresa dvs de email
VotersCanModify=Votanţii pot modifica zotul celorlarţi
ToReceiveEMailForEachVote=Primirea unui email pentru fiecare vot
TypeDate=Tip dată
TypeClassic=Tip standard
YouAreInPollCreateArea=Sunteţi în secţiunea creare sondaj
FieldMandatory=Câmp obligatoriu
OpenSurveyDesc=Serviciul online pentru planificarea unei întâlniri sau de a face un sondaj rapid și ușor.
OpenSurveyNoRegistration=Nu necesită înregistrare.
OpenSurveyStep2=Selectati datele între zilele libere (verde). Zilele selectate sunt în albastru. Puteți deselecta o zi selectată anterior, făcând clic din nou pe ea
RemoveAllDays=Elimină toate zilele
CopyHoursOfFirstDay=Copiază orelele ale primei zile
@ -43,7 +39,6 @@ YesNoList=Listă (goală/da/nu)
PourContreList=Listă (goală/pentru/impotrivă)
AddNewColumn=Adaugă coloană nouă
TitleChoice=Etichetă Alegere
InfoAfterCreate=După ce ați confirmat crearea de sondajului, veți fi redirecționat automat la pagina sondajului. <br> Ar trebui să primiţi, de asemenea, un e-mail cu link-ul sondajului pentru a trimite-l la votanţi.
ExportSpreadsheet=Exportă rezultatul în foaie de calcul
ExpireDate=Data limită
NbOfVoters=Nr-ul voturilor
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Acest nume a fost deasemenea folosit pentru acest sondaj
ErrorPollDoesNotExists=Eroare, sondajul <strong>%s</strong> nu există.
OpenSurveyNothingToSetup=Nu există setări specifice de făcut.
PollWillExpire=Sondajul dvs. va expira în mod automat în <strong>% s </ strong> zile de la ultima data a sondajului.
RemovalDate=Data eliminare
AddADate=Adaugă o dată
AddStartHour=Adaugă o oră de start
AddEndHour=Adaugă o oră de final
@ -66,4 +60,3 @@ NoCommentYet=Niciun comentariu nu a fost postat încă pentru acest sondaj
CanEditVotes=Puteţi schimba votul altora
SelectDayDesc=Pentru fiecare zi selectată, puteți alege, sau nu, orele întălnirii în următorul format: <br>- gol,<br>- "8h", "8H" or "8:00" pentru a da ora de start a întâlnirii, <br> - "8-11", "8h-11h", "8H-11H" or "8:00-11:00" pentru a da startul și ora finală, <br> - ""8h15-11h15", "8H15-11H15" or "8:15-11:15" pentru același lucru, dar cu minute.
BackToCurrentMonth=Înapoi la luna curentă
PublicLinkToCreateSurvey=Link public pentru a permite oricărui să creeze un sondaj

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Дата лимита
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Дата лимита
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Дата лимита
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Vytvorenie ankety
PollTitle=Anketa titul
OpenSurveyYourName=Vaše meno
OpenSurveyYourEMail=Vaša e-mailová adresa
VotersCanModify=Voliči môžu zmeniť hlas ostatných
ToReceiveEMailForEachVote=Ak chcete dostať e-mail pre každé hlasovanie
TypeDate=Zadajte dátum
TypeClassic=Typ štandardné
YouAreInPollCreateArea=Nachádzate sa v sekcii pre vytvorenie hlasovanie
FieldMandatory=Pole povinné
OpenSurveyDesc=Online služby naplánovať rendez-vous alebo urobiť prieskum ľahko a rýchlo.
OpenSurveyNoRegistration=Nie nutná registrácia.
OpenSurveyStep2=Zvoľte termín Vášho amoung voľné dni (zelená). Vybrané dni sú v modrej farbe. Môžete zrušiť výber deň vopred zvolenú opätovným kliknutím na neho
RemoveAllDays=Odstráňte všetky dni
CopyHoursOfFirstDay=Kopírovanie hodín prvého dňa
@ -43,7 +39,6 @@ YesNoList=List (prázdny / áno / nie)
PourContreList=List (prázdny / pre / proti)
AddNewColumn=Pridať nový stĺpec
TitleChoice=Voľba štítok
InfoAfterCreate=Potom, čo ste potvrdili vytvorenie vášho hlasovania, budete automaticky presmerovaní na stránku vášho hlasovania. <br> Tiež by ste mali dostať e-mail s odkazom na vaše hlasovanie pre odoslanie do voličov.
ExportSpreadsheet=Export výsledkov tabuľku
ExpireDate=Obmedziť dátum
NbOfVoters=Nb voličov
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Tento názov už bol použitý pri tomto hlasovaní
ErrorPollDoesNotExists=Chyba hlasovania <strong>%s</strong> neexistuje.
OpenSurveyNothingToSetup=Neexistuje žiadne špecifické nastavenia robiť.
PollWillExpire=Váš prieskum skončí automaticky <strong>%s</strong> dní po poslednom dni svojho hlasovania.
RemovalDate=Odstránenie dáta
AddADate=Pridať dátum
AddStartHour=Pridať začať hodinu
AddEndHour=Pridať end hodinu
@ -66,4 +60,3 @@ NoCommentYet=Žiadne komentáre boli zverejnené na túto anketu ešte
CanEditVotes=Môže zmeniť hlas ostatných
SelectDayDesc=Pre každý vybraný deň, môžete si vybrať, či sa majú splniť hodín v nasledujúcom formáte: <br> - Prázdne, <br> - &quot;8h&quot;, &quot;8H&quot; alebo &quot;8:00&quot; dať schôdzku v úvodnej hodinu, <br> - &quot;8-11&quot;, &quot;8h-11h&quot;, &quot;8H-11H&quot; alebo &quot;08:00-11:00&quot; dať schôdzku je začiatok a koniec hodiny, <br> - &quot;8h15-11h15&quot;, &quot;8H15-11h15&quot; alebo &quot;08:15-11:15&quot; to isté, ale v minútach.
BackToCurrentMonth=Späť na aktuálny mesiac
PublicLinkToCreateSurvey=Verejné odkaz dovoliť každý vytvoriť prieskum

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Omejitveni datum
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Omejitveni datum
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Omejitveni datum
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=Begränsa datum
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=Begränsa datum
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=Begränsa datum
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ CreatePoll=Anket oluştur
PollTitle=Anket başlığı
OpenSurveyYourName=Adınız
OpenSurveyYourEMail=Eposta adresiniz
VotersCanModify=Oy kullananlar başkalarının oylarını değiştirebilir
ToReceiveEMailForEachVote=Her oy için bir eposta almak için
TypeDate=Tarih türü
TypeClassic=Standart tür
YouAreInPollCreateArea=Anket oluşturma bölümündesiniz
FieldMandatory=Zorunlu alan
OpenSurveyDesc=Bir randevu planlamak ya da hızlıca ve kolayca bir araştırma yapmak için çevrimiçi servis.
OpenSurveyNoRegistration=Kayıt gerekmez.
OpenSurveyStep2=Boş günler arasından tarihlerinizi seçin (yeşil). Seçilen günler mavidir. Daha önceden seçtiğiniz günü tıklayarak seçimi kaldırabilirsiniz
RemoveAllDays=Bütün günleri kaldır
CopyHoursOfFirstDay=İlk günün saatlerini kopyala
@ -43,7 +39,6 @@ YesNoList=Liste (boş/evet/hayır)
PourContreList=Liste (boş, uygun/karşı)
AddNewColumn=Yeni sütun ekle
TitleChoice=Seçim etiketi
InfoAfterCreate=Anketinizin oluşturulmasını onayladığınızda, otomatik olarak anket sayfanıza yönlendirileceksiniz.<br>Oylayıcılara göndermek üzere anketinizin bağlantısı olan bir eposta da alacaksınız.
ExportSpreadsheet=Sonuçları hesap tablosuna aktar
ExpireDate=Sınır tarihi
NbOfVoters=Oylayıcı sayısı
@ -57,7 +52,6 @@ VoteNameAlreadyExists=Bu isim bu anket için zaten kullanılmış
ErrorPollDoesNotExists=Hata, anket <strong>%s</strong> mevcut değil.
OpenSurveyNothingToSetup=Yapılacak özel ayar yok.
PollWillExpire=Anketiniz, son tarihinden <strong>%s</strong> gün sonra kendiliğinden sona erecektir.
RemovalDate=Kaldırılma tarihi
AddADate=Bir tarih ekle
AddStartHour=Başlangıç saati ekle
AddEndHour=Bitiş saati ekle
@ -66,4 +60,3 @@ NoCommentYet=Bu anket için henüz gönderilen açıklama yok
CanEditVotes=Başkalarını oyu değiştirilebilir
SelectDayDesc=Seçilen her gün için, toplantı saatlerini aşağıdaki biçimde seçebilir ya da seçmeyebilirsiniz :<br>- boş,<br>- "8h", "8H" or "8:00" toplantı başlama saatleri için,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" ttoplantı başlama ve bitiş saatleri için,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" aynı şeyler için ama dakika olarak.
BackToCurrentMonth=Geçerli aya geri dön
PublicLinkToCreateSurvey=Herkesin bir araştırma oluşturmasını sağlayan genel bağlantı

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
# ExpireDate=Limit date
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
# ExpireDate=Limit date
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@ NewSurvey=新的调查
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@ CreateSurveyStandard=创建一个标准的调查
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
TitleChoice=选择标签
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=极限日期
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ SurveyResults=结果
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ SurveyResults=结果
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -11,14 +11,10 @@
# PollTitle=Poll title
# OpenSurveyYourName=Your name
# OpenSurveyYourEMail=Your email address
# VotersCanModify=Voters can modify vote of others
# ToReceiveEMailForEachVote=To receive an email for each vote
# TypeDate=Type date
# TypeClassic=Type standard
# YouAreInPollCreateArea=You are in the poll creation section
# FieldMandatory=Field mandatory
# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily.
# OpenSurveyNoRegistration=No registration required.
# OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it
# RemoveAllDays=Remove all days
# CopyHoursOfFirstDay=Copy hours of first day
@ -43,7 +39,6 @@
# PourContreList=List (empty/for/against)
# AddNewColumn=Add new column
# TitleChoice=Choice label
# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.<br>You should also receive an email with link to your poll for sending it to the voters.
# ExportSpreadsheet=Export result spreadsheet
ExpireDate=極限日期
# NbOfVoters=Nb of voters
@ -57,7 +52,6 @@ ExpireDate=極限日期
# ErrorPollDoesNotExists=Error, poll <strong>%s</strong> does not exists.
# OpenSurveyNothingToSetup=There is no specific setup to do.
# PollWillExpire=Your poll will expire automatically <strong>%s</strong> days after the last date of your poll.
# RemovalDate=Removal date
# AddADate=Add a date
# AddStartHour=Add start hour
# AddEndHour=Add end hour
@ -66,4 +60,3 @@ ExpireDate=極限日期
# CanEditVotes=Can change vote of others
# SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
# BackToCurrentMonth=Back to current month
# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey

View File

@ -1,66 +0,0 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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 <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/opensurvey/admin/index.php
* \ingroup opensurvey
* \brief Setup page of opensurvey
*/
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Security check
if (!$user->admin) accessforbidden();
$langs->load("admin");
$langs->load("other");
/*
* View
*/
$langs->load("opensurvey");
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("OpenSurveyArea"),$linkback,'setup');
print '<br>';
echo $langs->trans("OpenSurveyNothingToSetup").'<br><br>'."\n";
// Link
print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':<br>';
// Define $urlwithroot
$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/public/index.php',1);
$urllink='<a href="'.$url.'" target="_blank">'.$url.'</a>';
print $urllink;
llxFooter();
$db->close();
?>

View File

@ -1,5 +1,6 @@
<?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
@ -16,7 +17,7 @@
*/
/**
* \file htdocs/opensurvey/adminstuds.php
* \file htdocs/opensurvey/card.php
* \ingroup opensurvey
* \brief Page to edit survey
*/
@ -29,28 +30,25 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Security check
if (!$user->admin) accessforbidden();
if (!$user->rights->opensurvey->read) accessforbidden();
// Initialisation des variables
$action=GETPOST('action');
$numsondage = $numsondageadmin = '';
if (GETPOST('sondage'))
{
if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL
{
$numsondageadmin=GETPOST("sondage",'alpha');
$numsondage=substr($numsondageadmin, 0, 16);
}
else
{
$numsondageadmin='';
$numsondage=GETPOST("sondage",'alpha');
}
$numsondage = '';
if (GETPOST('id')) {
$numsondage = GETPOST('id', 'alpha');
}
$object=new Opensurveysondage($db);
$result=$object->fetch(0, $numsondage);
if ($result <= 0)
{
dol_print_error($db,$object->error);
exit;
}
$expiredate=dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GETPOST('expireyear'));
@ -63,7 +61,10 @@ $expiredate=dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GE
// Delete
if ($action == 'delete_confirm')
{
$result=$object->delete($user,'',$numsondageadmin);
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$result=$object->delete($user,'',$numsondage);
header('Location: '.dol_buildpath('/opensurvey/list.php',1));
exit();
@ -72,6 +73,9 @@ if ($action == 'delete_confirm')
// Update
if ($action == 'update')
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$error=0;
if (! GETPOST('nouveautitre'))
@ -81,20 +85,15 @@ if ($action == 'update')
$action = 'edit';
}
if (! $error)
{
$res=$object->fetch(0,$numsondageadmin);
if ($res < 0) dol_print_error($db,$object->error);
}
if (! $error)
{
$object->titre = GETPOST('nouveautitre');
$object->commentaires = GETPOST('nouveauxcommentaires');
$object->mail_admin = GETPOST('nouvelleadresse');
$object->date_fin = $expiredate;
$object->survey_link_visible = GETPOST('survey_link_visible')=='on'?1:0;
$object->canedit = GETPOST('canedit')=='on'?1:0;
$object->allow_comments = GETPOST('cancomment') == 'on' ? true : false;
$object->allow_spy = GETPOST('canseeothersvote') == 'on' ? true : false;
$object->mailsonde = GETPOST('mailsonde') == 'on' ? true : false;
$res=$object->update($user);
if ($res < 0)
@ -127,13 +126,11 @@ if (GETPOST('ajoutcomment'))
$comment = GETPOST("comment");
$comment_user = GETPOST('commentuser');
$sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)";
$sql.= " VALUES ('".$db->escape($numsondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')";
$resql = $db->query($sql);
dol_syslog("sql=".$sql);
$resql = $object->addComment($comment, $comment_user);
if (! $resql)
{
$err |= COMMENT_INSERT_FAILED;
setEventMessage($langs->trans('ErrorInsertingComment'), 'errors');
}
}
}
@ -142,8 +139,16 @@ if (GETPOST('ajoutcomment'))
$idcomment=GETPOST('deletecomment','int');
if ($idcomment)
{
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$idcomment;
$resql = $db->query($sql);
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$resql = $object->deleteComment($idcomment);
}
if ($action == 'edit') {
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
}
@ -151,16 +156,13 @@ if ($idcomment)
* View
*/
$form=new Form($db);
$result=$object->fetch(0,$numsondage);
if ($result <= 0)
{
print $langs->trans("ErrorRecordNotFound");
llxFooter();
exit;
if ($object->fk_user_creat) {
$userstatic = new User($db);
$userstatic->fetch($object->fk_user_creat);
}
$form=new Form($db);
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeader('',$object->titre, 0, 0, 0, 0, $arrayofjs, $arrayofcss);
@ -178,20 +180,10 @@ $toutsujet=str_replace("@","<br>",$toutsujet);
$toutsujet=str_replace("°","'",$toutsujet);
print '<form name="updatesurvey" action="'.$_SERVER["PHP_SELF"].'?sondage='.$numsondageadmin.'" method="POST">'."\n";
print '<form name="updatesurvey" action="'.$_SERVER["PHP_SELF"].'?id='.$numsondage.'" method="POST">'."\n";
print '<input type="hidden" name="action" value="update">';
$head = array();
$head[0][0] = '';
$head[0][1] = $langs->trans("Card");
$head[0][2] = 'general';
$h++;
$head[1][0] = 'adminstuds_preview.php?sondage='.$object->id_sondage_admin;
$head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview");
$head[1][2] = 'preview';
$h++;
$head = opensurvey_prepare_head($object);
print dol_get_fiche_head($head,'general',$langs->trans("Survey"),0,dol_buildpath('/opensurvey/img/object_opensurvey.png',1),1);
@ -203,12 +195,12 @@ $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).'">'.$langs->tra
// Ref
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage_admin', 'id_sondage_admin');
print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage');
print '</td>';
print '</tr>';
// Type
$type=($object->format=="A"||$object->format=="A+")?'classic':'date';
$type=($object->format=="A")?'classic':'date';
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1);
print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate").'</td></tr>';
@ -219,42 +211,76 @@ $adresseadmin=$object->mail_admin;
print $langs->trans("Title") .'</td><td colspan="2">';
if ($action == 'edit')
{
print '<input type="text" name="nouveautitre" size="40" value="'.dol_escape_htmltag($object->titre).'">';
print '<input type="text" name="nouveautitre" size="40" value="'.dol_escape_htmltag(dol_htmlentities($object->titre)).'">';
}
else print $object->titre;
else print dol_htmlentities($object->titre);
print '</td></tr>';
// Auteur
// Author
print '<tr><td>';
print $langs->trans("Author") .'</td><td colspan="2">';
print $object->nom_admin;
if ($object->fk_user_creat) {
print $userstatic->getLoginUrl(1);
} else {
print dol_htmlentities($object->nom_admin);
}
print '</td></tr>';
// Description
print '<tr><td>'.$langs->trans("Description") .'</td><td colspan="2">';
if ($action == 'edit')
{
print '<textarea name="nouveauxcommentaires" rows="7" cols="80">'.$object->commentaires.'</textarea>'."\n";
print '<textarea name="nouveauxcommentaires" rows="7" cols="80">'. dol_htmlentities($object->commentaires).'</textarea>'."\n";
}
else print dol_nl2br($object->commentaires);
else print dol_nl2br(dol_htmlentities($object->commentaires));
print '</td></tr>';
// EMail
print '<tr><td>'.$langs->trans("EMail") .'</td><td colspan="2">';
//If linked user, then emails are going to be sent to users' email
if (!$object->fk_user_creat) {
print '<tr><td>'.$langs->trans("EMail") .'</td><td colspan="2">';
if ($action == 'edit')
{
print '<input type="text" name="nouvelleadresse" size="40" value="'.$object->mail_admin.'">';
}
else print dol_print_email($object->mail_admin);
print '</td></tr>';
}
// Receive an email with each vote
print '<tr><td>'.$langs->trans('ToReceiveEMailForEachVote').'</td><td colspan="2">';
if ($action == 'edit')
{
print '<input type="text" name="nouvelleadresse" size="40" value="'.$object->mail_admin.'">';
print '<input type="checkbox" name="mailsonde" size="40"'.($object->mailsonde?' checked="true"':'').'">';
}
else {
print yn($object->mailsonde);
//If option is active and linked user does not have an email, we show a warning
if ($object->fk_user_creat && $object->mailsonde) {
if (!$userstatic->email) {
print ' '.img_warning($langs->trans('NoEMail'));
}
}
}
else print dol_print_email($object->mail_admin);
print '</td></tr>';
// Can edit other votes
print '<tr><td>'.$langs->trans('CanEditVotes').'</td><td colspan="2">';
// Users can comment
print '<tr><td>'.$langs->trans('CanComment').'</td><td colspan="2">';
if ($action == 'edit')
{
print '<input type="checkbox" name="canedit" size="40"'.($object->canedit?' checked="true"':'').'">';
print '<input type="checkbox" name="cancomment" size="40"'.($object->allow_comments?' checked="true"':'').'">';
}
else print yn($object->canedit);
else print yn($object->allow_comments);
print '</td></tr>';
// Users can see others vote
print '<tr><td>'.$langs->trans('CanSeeOthersVote').'</td><td colspan="2">';
if ($action == 'edit')
{
print '<input type="checkbox" name="canseeothersvote" size="40"'.($object->allow_spy?' checked="true"':'').'">';
}
else print yn($object->allow_spy);
print '</td></tr>';
// Expire date
@ -272,7 +298,7 @@ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($
$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/public/studs.php',1).'?sondage='.$numsondage;
$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$object->id_sondage;
$urllink='<a href="'.$url.'" target="_blank">'.$url.'</a>';
print $urllink;
@ -290,15 +316,20 @@ dol_fiche_end();
*/
print '<div class="tabsAction">';
if ($action != 'edit') print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&sondage=' . $numsondageadmin . '">'.$langs->trans("Modify") . '</a>';
if ($action != 'edit' && $user->rights->opensurvey->write) {
//Modify button
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id=' . $numsondage . '">'.$langs->trans("Modify") . '</a>';
if ($action != 'edit') print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?suppressionsondage=1&sondage='.$numsondageadmin.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
//Delete button
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?suppressionsondage=1&id='.$numsondage.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}
print '</div>';
if ($action == 'delete')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?&sondage='.$numsondageadmin, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondage, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1);
}
@ -311,21 +342,15 @@ print '<form name="formulaire5" action="#" method="POST">'."\n";
print_fiche_titre($langs->trans("CommentsOfVoters"),'','');
// Comment list
$sql = 'SELECT id_comment, usercomment, comment';
$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments';
$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'";
$sql.= " ORDER BY id_comment";
$resql = $db->query($sql);
$num_rows=$db->num_rows($resql);
if ($num_rows > 0)
{
$i = 0;
while ( $i < $num_rows)
{
$obj=$db->fetch_object($resql);
print '<a href="'.dol_buildpath('/opensurvey/adminstuds.php',1).'?deletecomment='.$obj->id_comment.'&sondage='.$numsondageadmin.'"> '.img_picto('', 'delete.png').'</a> ';
print $obj->usercomment.' : '.dol_nl2br($obj->comment)." <br>";
$i++;
$comments = $object->getComments();
if ($comments) {
foreach ($comments as $comment) {
if ($user->rights->opensurvey->write) {
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?deletecomment='.$comment->id_comment.'&id='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> ';
}
print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))." <br>";
}
}
else
@ -336,12 +361,14 @@ else
print '<br>';
// Add comment
print $langs->trans("AddACommentForPoll") . '<br>';
print '<textarea name="comment" rows="2" cols="80"></textarea><br>'."\n";
print $langs->trans("Name") .' : <input type=text name="commentuser"><br>'."\n";
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") {
print "<font color=#FF0000>" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . "</font>";
if ($object->allow_comments) {
print $langs->trans("AddACommentForPoll") . '<br>';
print '<textarea name="comment" rows="2" cols="80"></textarea><br>'."\n";
print $langs->trans("Name") .': <input type="text" name="commentuser" value="'.$user->getFullName($langs).'"><br>'."\n";
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") {
print "<font color=#FF0000>" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . "</font>";
}
}
print '</form>';

View File

@ -1,5 +1,6 @@
<?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
@ -43,18 +44,34 @@ class Opensurveysondage extends CommonObject
var $id_sondage;
var $commentaires;
var $mail_admin;
var $nom_admin;
/**
* Id of user author of the poll
* @var int
*/
public $fk_user_creat;
var $titre;
var $id_sondage_admin;
var $date_fin='';
var $format;
var $mailsonde;
var $survey_link_visible;
var $canedit;
public $sujet;
/**
* Allow comments on this poll
* @var bool
*/
public $allow_comments;
/**
* Allow users see others vote
* @var bool
*/
public $allow_spy;
/**
* Constructor
@ -77,23 +94,10 @@ class Opensurveysondage extends CommonObject
*/
function create($user, $notrigger=0)
{
global $conf, $langs;
$error=0;
// Clean parameters
if (isset($this->id_sondage)) $this->id_sondage=trim($this->id_sondage);
if (isset($this->commentaires)) $this->commentaires=trim($this->commentaires);
if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin);
if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin);
if (isset($this->titre)) $this->titre=trim($this->titre);
if (isset($this->id_sondage_admin)) $this->id_sondage_admin=trim($this->id_sondage_admin);
if (isset($this->format)) $this->format=trim($this->format);
if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde);
if (isset($this->survey_link_visible)) $this->survey_link_visible=trim($this->survey_link_visible);
if (isset($this->canedit)) $this->canedit=trim($this->canedit);
$this->cleanParameters();
// Check parameters
// Put here code to add control on parameters values
@ -103,31 +107,29 @@ class Opensurveysondage extends CommonObject
$sql.= "id_sondage,";
$sql.= "commentaires,";
$sql.= "mail_admin,";
$sql.= "nom_admin,";
$sql.= "fk_user_creat,";
$sql.= "titre,";
$sql.= "id_sondage_admin,";
$sql.= "date_fin,";
$sql.= "format,";
$sql.= "mailsonde,";
$sql.= "survey_link_visible,";
$sql.= "canedit";
$sql.= "allow_comments,";
$sql.= "allow_spy,";
$sql.= "sujet";
$sql.= ") VALUES (";
$sql.= " ".(! isset($this->id_sondage)?'NULL':"'".$this->db->escape($this->id_sondage)."'").",";
$sql.= " ".(! isset($this->commentaires)?'NULL':"'".$this->db->escape($this->commentaires)."'").",";
$sql.= " ".(! isset($this->mail_admin)?'NULL':"'".$this->db->escape($this->mail_admin)."'").",";
$sql.= " ".(! isset($this->nom_admin)?'NULL':"'".$this->db->escape($this->nom_admin)."'").",";
$sql.= " ".(! isset($this->titre)?'NULL':"'".$this->db->escape($this->titre)."'").",";
$sql.= " ".(! isset($this->id_sondage_admin)?'NULL':"'".$this->db->escape($this->id_sondage_admin)."'").",";
$sql.= " ".(! isset($this->date_fin) || dol_strlen($this->date_fin)==0?'NULL':$this->db->idate($this->date_fin)).",";
$sql.= " ".(! isset($this->format)?'NULL':"'".$this->db->escape($this->format)."'").",";
$sql.= " ".(! isset($this->mailsonde)?'NULL':"'".$this->db->escape($this->mailsonde)."'").",";
$sql.= " ".(! isset($this->survey_link_visible)?'NULL':"'".$this->db->escape($this->survey_link_visible)."'").",";
$sql.= " ".(! isset($this->canedit)?'NULL':"'".$this->db->escape($this->canedit)."'")."";
$sql.= "'".$this->db->escape($this->id_sondage)."',";
$sql.= " ".(empty($this->commentaires)?'NULL':"'".$this->db->escape($this->commentaires)."'").",";
$sql.= " ".$user->id.",";
$sql.= " '".$this->db->escape($this->titre)."',";
$sql.= " '".$this->db->idate($this->date_fin)."',";
$sql.= " '".$this->db->escape($this->format)."',";
$sql.= " ".$this->db->escape($this->mailsonde).",";
$sql.= " ".$this->db->escape($this->allow_comments).",";
$sql.= " ".$this->db->escape($this->allow_spy).",";
$sql.= " '".$this->db->escape($this->sujet)."'";
$sql.= ")";
$this->db->begin();
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
@ -136,22 +138,19 @@ class Opensurveysondage extends CommonObject
if (! $error)
{
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."opensurvey_sondage");
if (! $notrigger)
{
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
global $langs, $conf;
//// Call triggers
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('OPENSURVEY_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
}
}
// Commit or rollback
if ($error)
{
@ -180,27 +179,22 @@ class Opensurveysondage extends CommonObject
*/
function fetch($id,$numsurvey='')
{
global $langs;
$sql = "SELECT";
//$sql.= " t.rowid,";
$sql.= " t.id_sondage,";
$sql.= " t.commentaires,";
$sql.= " t.mail_admin,";
$sql.= " t.nom_admin,";
$sql.= " t.fk_user_creat,";
$sql.= " t.titre,";
$sql.= " t.id_sondage_admin,";
$sql.= " t.date_fin,";
$sql.= " t.format,";
$sql.= " t.mailsonde,";
$sql.= " t.survey_link_visible,";
$sql.= " t.canedit,";
$sql.= " t.allow_comments,";
$sql.= " t.allow_spy,";
$sql.= " t.sujet,";
$sql.= " t.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t";
if ($id > 0) $sql.= " WHERE t.rowid = ".$this->db->escape($id);
else if (strlen($numsurvey) == 16) $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'";
else $sql.= " WHERE t.id_sondage_admin = '".$this->db->escape($numsurvey)."'";
$sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'";
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
@ -210,26 +204,32 @@ class Opensurveysondage extends CommonObject
{
$obj = $this->db->fetch_object($resql);
//$this->id = $obj->rowid;
$this->ref = $obj->id_sondage_admin;
$this->id_sondage = $obj->id_sondage;
//For compatibility
$this->ref = $this->id_sondage;
$this->commentaires = $obj->commentaires;
$this->mail_admin = $obj->mail_admin;
$this->nom_admin = $obj->nom_admin;
$this->titre = $obj->titre;
$this->id_sondage_admin = $obj->id_sondage_admin;
$this->date_fin = $this->db->jdate($obj->date_fin);
$this->format = $obj->format;
$this->mailsonde = $obj->mailsonde;
$this->survey_link_visible = $obj->survey_link_visible;
$this->canedit = $obj->canedit;
$this->allow_comments = $obj->allow_comments;
$this->allow_spy = $obj->allow_spy;
$this->sujet = $obj->sujet;
$this->fk_user_creat = $obj->fk_user_creat;
$this->date_m = $this->db->jdate($obj->tls);
$ret=1;
}
else $ret=0;
else
{
$sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey);
$this->error='Fetch no poll found for '.$sondage;
dol_syslog($this->error, LOG_ERR);
$ret = 0;
}
$this->db->free($resql);
}
@ -257,18 +257,7 @@ class Opensurveysondage extends CommonObject
$error=0;
// Clean parameters
if (isset($this->id_sondage)) $this->id_sondage=trim($this->id_sondage);
if (isset($this->commentaires)) $this->commentaires=trim($this->commentaires);
if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin);
if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin);
if (isset($this->titre)) $this->titre=trim($this->titre);
if (isset($this->id_sondage_admin)) $this->id_sondage_admin=trim($this->id_sondage_admin);
if (isset($this->format)) $this->format=trim($this->format);
if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde);
if (isset($this->survey_link_visible)) $this->survey_link_visible=trim($this->survey_link_visible);
if (isset($this->canedit)) $this->canedit=trim($this->canedit);
$this->cleanParameters();
// Check parameters
// Put here code to add a control on parameters values
@ -281,15 +270,13 @@ class Opensurveysondage extends CommonObject
$sql.= " mail_admin=".(isset($this->mail_admin)?"'".$this->db->escape($this->mail_admin)."'":"null").",";
$sql.= " nom_admin=".(isset($this->nom_admin)?"'".$this->db->escape($this->nom_admin)."'":"null").",";
$sql.= " titre=".(isset($this->titre)?"'".$this->db->escape($this->titre)."'":"null").",";
$sql.= " id_sondage_admin=".(isset($this->id_sondage_admin)?"'".$this->db->escape($this->id_sondage_admin)."'":"null").",";
$sql.= " date_fin=".(dol_strlen($this->date_fin)!=0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').",";
$sql.= " format=".(isset($this->format)?"'".$this->db->escape($this->format)."'":"null").",";
$sql.= " mailsonde=".(isset($this->mailsonde)?$this->db->escape($this->mailsonde):"null").",";
$sql.= " survey_link_visible=".(isset($this->survey_link_visible)?$this->db->escape($this->survey_link_visible):"null").",";
$sql.= " canedit=".(isset($this->canedit)?$this->db->escape($this->canedit):"null")."";
//$sql.= " WHERE rowid=".$this->id;
$sql.= " WHERE id_sondage_admin='".$this->db->escape($this->id_sondage_admin)."'";
$sql.= " allow_comments=".$this->db->escape($this->allow_comments).",";
$sql.= " allow_spy=".$this->db->escape($this->allow_spy);
$sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'";
$this->db->begin();
@ -337,30 +324,25 @@ class Opensurveysondage extends CommonObject
*
* @param User $user User that deletes
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @param string $numsondageadmin Num sondage admin to delete
* @param string $numsondage Num sondage admin to delete
* @return int <0 if KO, >0 if OK
*/
function delete($user, $notrigger, $numsondageadmin)
function delete($user, $notrigger, $numsondage)
{
global $conf, $langs;
$error=0;
$numsondage=substr($numsondageadmin, 0, 16);
$this->db->begin();
if (! $error)
{
if (! $notrigger)
{
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
//// Call triggers
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('OPENSURVEY_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
}
}
@ -376,7 +358,7 @@ class Opensurveysondage extends CommonObject
$resql=$this->db->query($sql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."opensurvey_sondage";
$sql.= " WHERE id_sondage_admin = '".$this->db->escape($numsondageadmin)."'";
$sql.= " WHERE id_sondage = '".$this->db->escape($numsondage)."'";
dol_syslog(get_class($this)."::delete sql=".$sql);
$resql = $this->db->query($sql);
@ -433,60 +415,6 @@ class Opensurveysondage extends CommonObject
return $this->lines;
}
/**
* Load an object from its id and create a new one in database
*
* @param int $fromid Id of object to clone
* @return int New id of clone
*/
function createFromClone($fromid)
{
global $user,$langs;
$error=0;
$object=new Opensurveysondage($this->db);
$this->db->begin();
// Load source object
$object->fetch($fromid);
$object->id=0;
$object->statut=0;
// Clear fields
// ...
// Create clone
$result=$object->create($user);
// Other options
if ($result < 0)
{
$this->error=$object->error;
$error++;
}
if (! $error)
{
}
// End
if (! $error)
{
$this->db->commit();
return $object->id;
}
else
{
$this->db->rollback();
return -1;
}
}
/**
* Initialise object with example values
* Id must be 0 if object instance is a specimen
@ -502,13 +430,92 @@ class Opensurveysondage extends CommonObject
$this->mail_admin='';
$this->nom_admin='';
$this->titre='';
$this->id_sondage_admin='';
$this->date_fin='';
$this->format='';
$this->mailsonde='';
$this->survey_link_visible='';
$this->canedit=0;
}
/**
* Returns all comments for the current opensurvey poll
*
* @return Object[]
*/
public function getComments() {
$sql = 'SELECT id_comment, usercomment, comment';
$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments';
$sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'";
$sql.= " ORDER BY id_comment";
$resql = $this->db->query($sql);
$num_rows=$this->db->num_rows($resql);
$comments = array();
if ($num_rows > 0) {
while ($obj = $this->db->fetch_object($resql)) {
$comments[] = $obj;
}
}
return $comments;
}
/**
* Adds a comment to the poll
*
* @param string $comment Comment content
* @param string $comment_user Comment author
* @return boolean False in case of the query fails, true if it was successful
*/
public function addComment($comment, $comment_user) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)";
$sql.= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')";
$resql = $this->db->query($sql);
dol_syslog("sql=".$sql);
if (!$resql) {
return false;
}
return true;
}
/**
* Deletes a comment of the poll
*
* @param int $id_comment Id of the comment
* @return boolean False in case of the query fails, true if it was successful
*/
public function deleteComment($id_comment) {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = '.$this->id_sondage;
$resql = $this->db->query($sql);
if (!$resql) {
return false;
}
return true;
}
/**
* Cleans all the class variables before doing an update or an insert
*
* @return void
*/
private function cleanParameters() {
$this->id_sondage = trim($this->id_sondage);
$this->commentaires = trim($this->commentaires);
$this->mail_admin = trim($this->mail_admin);
$this->nom_admin = trim($this->nom_admin);
$this->titre = trim($this->titre);
$this->format = trim($this->format);
$this->mailsonde = ($this->mailsonde ? 1 : 0);
$this->allow_comments = ($this->allow_comments ? 1 : 0);
$this->allow_spy = ($this->allow_spy ? 1 : 0);
$this->sujet = trim($this->sujet);
}
}
?>

View File

@ -1,5 +1,6 @@
<?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
@ -16,33 +17,22 @@
*/
/**
* \file htdocs/opensurvey/public/exportcsv.php
* \file htdocs/opensurvey/exportcsv.php
* \ingroup opensurvey
* \brief Page to list surveys
*/
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require_once('../../main.inc.php');
require_once('../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php");
$action=GETPOST('action');
$numsondage = $numsondageadmin = '';
if (GETPOST('sondage'))
$numsondage = '';
if (GETPOST('id'))
{
if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL
{
$numsondageadmin=GETPOST("sondage",'alpha');
$numsondage=substr($numsondageadmin, 0, 16);
}
else
{
$numsondageadmin='';
$numsondage=GETPOST("sondage",'alpha');
}
$numsondage=GETPOST("id",'alpha');
}
$object=new Opensurveysondage($db);
@ -69,7 +59,7 @@ $toutsujet=explode(",",$object->sujet);
$input.=$langs->trans("Name").";";
for ($i=0;$toutsujet[$i];$i++)
{
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
$input.=''.dol_print_date($toutsujet[$i],'dayhour').';';
} else {

View File

@ -1,5 +1,6 @@
<?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
@ -21,7 +22,40 @@
* \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("Card");
$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
@ -36,8 +70,6 @@
*/
function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
{
global $user, $conf, $langs, $mysoc;
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
print '<body id="mainbody" class="publicnewmemberform" style="margin-top: 10px;">';
@ -71,28 +103,22 @@ function llxFooterSurvey()
*/
function showlogo()
{
global $user, $conf, $langs, $mysoc;
global $conf, $mysoc;
// Print logo
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
if ($mysoc->logo) {
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) {
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file=thumbs/'.urlencode($mysoc->logo_small);
}
}
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=128;
}
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
if (!$urllogo && (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')))
{
$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
}
print '<center>';
print '<img alt="Logo" id="logosubscribe" title="" src="'.$urllogo.'" style="max-width: 120px" /><br>';
print '<strong>'.$langs->trans("OpenSurvey").'</strong>';
print '</center><br>';
print '<div style="text-align:center"><img alt="Logo" id="logosubscribe" title="" src="'.$urllogo.'"/></div>';
print '<br>';
}
@ -118,24 +144,6 @@ function get_server_name()
return $url;
}
/**
* is_error
*
* @param unknown_type $cerr error number
* @return boolean Error key found or not
*/
function is_error($cerr)
{
global $err;
if ( $err == 0 ) {
return false;
}
return (($err & $cerr) != 0 );
}
/**
* Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau
*
@ -163,7 +171,7 @@ function issetAndNoEmpty($name, $tableau = null)
function getUrlSondage($id, $admin = false)
{
if ($admin === true) {
$url = get_server_name().'adminstuds_preview.php?sondage='.$id;
$url = get_server_name().'results.php?id='.$id;
} else {
$url = get_server_name().'/public/studs.php?sondage='.$id;
}
@ -192,87 +200,54 @@ function dol_survey_random($car)
/**
* Add a poll
*
* @param string $origin Origin of poll creation
* @return void
*/
function ajouter_sondage($origin)
function ajouter_sondage()
{
global $conf, $db;
global $db, $user;
require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php';
$sondage=dol_survey_random(16);
$sondage_admin=$sondage.dol_survey_random(8);
if ($_SESSION["formatsondage"]=="A"||$_SESSION["formatsondage"]=="A+") {
//extraction de la date de fin choisie
if ($_SESSION["champdatefin"]) {
if ($_SESSION["champdatefin"]>time()+250000) {
$date_fin=$_SESSION["champdatefin"];
}
} else {
$date_fin=time()+15552000;
}
}
if ($_SESSION["formatsondage"]=="D"||$_SESSION["formatsondage"]=="D+") {
//Calcul de la date de fin du sondage
$taille_tableau=count($_SESSION["totalchoixjour"])-1;
$date_fin=$_SESSION["totalchoixjour"][$taille_tableau]+200000;
}
if (is_numeric($date_fin) === false) {
$date_fin = time()+15552000;
}
$canedit=empty($_SESSION['formatcanedit'])?'0':'1';
$allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1;
$allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1;
// Insert survey
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_sondage';
$sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde, canedit, origin, sujet)';
$sql.= " VALUES ('".$db->escape($sondage)."', '".$db->escape($_SESSION['commentaires'])."', '".$db->escape($_SESSION['adresse'])."', '".$db->escape($_SESSION['nom'])."',";
$sql.= " '".$db->escape($_SESSION['titre'])."', '".$sondage_admin."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',";
$sql.= " '".$canedit."', '".$db->escape($origin)."',";
$sql.= " '".$db->escape($_SESSION['toutchoix'])."'";
$sql.= ")";
dol_syslog($sql);
$resql=$db->query($sql);
if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?sondage='.$sondage_admin;
else
{
// Define $urlwithroot
$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/public/studs.php',1).'?sondage='.$sondage;
$urlback=$url;
//var_dump($urlback);exit;
$opensurveysondage = new Opensurveysondage($db);
$opensurveysondage->id_sondage = $sondage;
$opensurveysondage->commentaires = $_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["canedit"]);
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();
}
define('COMMENT_EMPTY', 0x0000000001);
define('COMMENT_USER_EMPTY', 0x0000000010);
define('COMMENT_INSERT_FAILED', 0x0000000100);
define('NAME_EMPTY', 0x0000001000);
define('NAME_TAKEN', 0x0000010000);
define('NO_POLL', 0x0000100000);
define('NO_POLL_ID', 0x0001000000);
define('INVALID_EMAIL', 0x0010000000);
define('TITLE_EMPTY', 0x0100000000);
define('INVALID_DATE', 0x1000000000);
$err = 0;
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -25,7 +25,8 @@ require_once('../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
// Security check
if (!$user->rights->opensurvey->read) accessforbidden();
/*
* View
@ -49,21 +50,6 @@ print_fiche_titre($langs->trans("OpenSurveyArea"));
echo $langs->trans("NoSurveysInDatabase",$nbsondages).'<br><br>'."\n";
// Link
print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':<br>';
// Define $urlwithroot
$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/public/index.php',1);
$urllink='<a href="'.$url.'" target="_blank">'.$url.'</a>';
print $urllink;
llxFooter();
$db->close();

View File

@ -1,5 +1,6 @@
<?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
@ -25,9 +26,12 @@ require_once('../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
// Security check
if (!$user->rights->opensurvey->read) accessforbidden();
$action=GETPOST('action');
$id=GETPOST('id');
$numsondage=substr($id, 0, 16);
$numsondage= $id;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="p.titre";
@ -38,23 +42,6 @@ $limit = $conf->liste_limit;
$offset = $limit * $page;
/*
* Actions
*/
if ($action == 'delete_confirm')
{
$db->begin();
$object=new Opensurveysondage($db);
$result=$object->delete($user,'',$numsondageadmin);
$db->commit();
}
/*
* View
*/
@ -68,19 +55,13 @@ print '<div class=corps>'."\n";
print_fiche_titre($langs->trans("OpenSurveyArea"));
if ($action == 'delete')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$id, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1);
}
// tableau qui affiche tous les sondages de la base
print '<table class="liste">'."\n";
print '<tr class="liste_titre"><td>'. $langs->trans("Survey").'</td><td>'. $langs->trans("Type") .'</td><td>'. $langs->trans("Title") .'</td><td>'. $langs->trans("Author") .'</td><td align="center">'. $langs->trans("ExpireDate") .'</td><td align="center">'. $langs->trans("NbOfVoters") .'</td><td colspan=2>&nbsp;</td>'."\n";
print '<tr class="liste_titre"><td>'. $langs->trans("Ref").'</td><td>'. $langs->trans("Title") .'</td><td>'. $langs->trans("Type") .'</td><td>'. $langs->trans("Author") .'</td><td align="center">'. $langs->trans("ExpireDate") .'</td><td align="center">'. $langs->trans("NbOfVoters") .'</td>'."\n";
$sql = "SELECT id_sondage, id_sondage_admin, mail_admin, format, origin, date_fin, titre, nom_admin";
$sql = "SELECT id_sondage, fk_user_creat, u.login, format, date_fin, titre, nom_admin";
$sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p";
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."user u ON u.rowid = p.fk_user_creat";
// Count total nb of records
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
@ -113,19 +94,31 @@ while ($i < min($num,$limit))
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>';
print '<a href="'.dol_buildpath('/opensurvey/adminstuds.php',1).'?sondage='.$obj->id_sondage_admin.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>';
print '</td><td>';
$type=($obj->format=='A' || $obj->format=='A+')?'classic':'date';
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?id='.$obj->id_sondage.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>';
print '</td><td>'.dol_htmlentities($obj->titre).'</td><td>';
$type=($obj->format=='A')?'classic':'date';
print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1);
print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate");
print '</td><td>'.$obj->titre.'</td><td>'.$obj->nom_admin.'</td>';
print '</td><td>';
// Author
if ($obj->fk_user_creat) {
$userstatic = new User($db);
$userstatic->id = $obj->fk_user_creat;
$userstatic->login = $obj->login;
print $userstatic->getLoginUrl(1);
} else {
print dol_htmlentities($obj->nom_admin);
}
print '</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day');
if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); }
print '</td>';
print'<td align="center">'.$nbuser.'</td>'."\n";
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$obj->id_sondage_admin.'&action=delete">'.img_picto('', 'delete.png').'</a></td>'."\n";
print '</tr>'."\n";
$i++;

View File

@ -1,222 +0,0 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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 <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/opensurvey/public/choix_autre.php
* \ingroup opensurvey
* \brief Page to create a new survey (choice selection)
*/
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
$erreur = false;
$testdate = true;
$date_selected = '';
$origin=GETPOST('origin','alpha');
/*
* Action
*/
// Set session vars
$erreur_injection = false;
if (isset($_SESSION["nbrecases"])) {
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
if (isset($_POST["choix"][$i])) {
$_SESSION["choix$i"]=$_POST["choix"][$i];
}
if (isset($_POST["typecolonne"][$i])) {
$_SESSION["typecolonne$i"]=$_POST["typecolonne"][$i];
}
}
} else { //nombre de cases par défaut
$_SESSION["nbrecases"]=5;
}
if (isset($_POST["ajoutcases"]) || isset($_POST["ajoutcases_x"])) {
$_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5;
}
// Create survey into database
if (isset($_POST["confirmecreation"]) || isset($_POST["confirmecreation_x"]))
{
//recuperation des données de champs textes
$toutchoix = '';
for ($i = 0; $i < $_SESSION["nbrecases"] + 1; $i++)
{
if (! empty($_POST["choix"][$i]))
{
$toutchoix.=',';
$toutchoix.=str_replace(array(",","@"), " ", $_POST["choix"][$i]).(empty($_POST["typecolonne"][$i])?'':'@'.$_POST["typecolonne"][$i]);
}
}
$toutchoix=substr("$toutchoix",1);
$_SESSION["toutchoix"]=$toutchoix;
if (GETPOST('champdatefin'))
{
$registredate=explode("/",$_POST["champdatefin"]);
if (is_array($registredate) === false || count($registredate) !== 3) {
$testdate = false;
$date_selected = $_POST["champdatefin"];
} else {
$time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
if ($time === false || date('d/m/Y', $time) !== $_POST["champdatefin"]) {
$testdate = false;
$date_selected = $_POST["champdatefin"];
} else {
if (mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]) > time() + 250000) {
$_SESSION["champdatefin"]=mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
}
}
}
} else {
$_SESSION["champdatefin"]=time()+15552000;
}
if ($testdate === true)
{
//format du sondage AUTRE
$_SESSION["formatsondage"]="A";
$_SESSION["caneditsondage"]=$_SESSION["canedit"];
// Add into database
ajouter_sondage($origin);
} else {
$_POST["fin_sondage_autre"] = 'ok';
}
}
/*
* View
*/
$form=new Form($db);
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss);
if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adresse']))
{
dol_print_error('',"You haven't filled the first section of the poll creation");
llxFooterSurvey();
exit;
}
//partie creation du sondage dans la base SQL
//On prépare les données pour les inserer dans la base
print '<form name="formulaire" action="#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
print '<input type="hidden" name="origin" value="'.dol_escape_htmltag($origin).'">';
print '<div class="bandeautitre">'. $langs->trans("CreatePoll")." (2 / 2)" .'</div>'."\n";
print '<div class=corps>'."\n";
print '<br>'. $langs->trans("PollOnChoice") .'<br><br>'."\n";
print '<table>'."\n";
//affichage des cases texte de formulaire
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
$j = $i + 1;
if (isset($_SESSION["choix$i"]) === false) {
$_SESSION["choix$i"] = '';
}
print '<tr><td>'. $langs->trans("TitleChoice") .' '.$j.' : </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.dol_escape_htmltag($_SESSION["choix$i"]).'" id="choix'.$i.'">';
$tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList"));
print ' &nbsp; '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]);
print '</td></tr>'."\n";
}
print '</table>'."\n";
//ajout de cases supplementaires
print '<table><tr>'."\n";
print '<td>'. $langs->trans("5MoreChoices") .'</td><td><input type="image" name="ajoutcases" value="Retour" src="images/add-16.png"></td>'."\n";
print '</tr></table>'."\n";
print'<br>'."\n";
print '<table><tr>'."\n";
print '<td></td><td><input type="submit" class="button" name="fin_sondage_autre" value="'.dol_escape_htmltag($langs->trans("NextStep")).'" src="images/next-32.png"></td>'."\n";
print '</tr></table>'."\n";
//test de remplissage des cases
$testremplissage = '';
for ($i=0;$i<$_SESSION["nbrecases"];$i++)
{
if (isset($_POST["choix"][$i]))
{
$testremplissage="ok";
}
}
//message d'erreur si aucun champ renseigné
if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) {
print "<br><font color=\"#FF0000\">" . $langs->trans("Enter at least one choice") . "</font><br><br>"."\n";
$erreur = true;
}
//message d'erreur si mauvaise date
if ($testdate === false) {
print "<br><font color=\"#FF0000\">" . _("Date must be have the format DD/MM/YYYY") . "</font><br><br>"."\n";
}
if ($erreur_injection) {
print "<font color=#FF0000>" . _("Characters \" < and > are not permitted") . "</font><br><br>\n";
}
if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) {
//demande de la date de fin du sondage
print '<br>'."\n";
print '<div class=presentationdatefin>'."\n";
print '<br>'. _("Your poll will be automatically removed after 6 months.<br> You can fix another removal date for it.") .'<br><br>'."\n";
print _("Removal date (optional)") .' : <input type="text" name="champdatefin" value="'.$date_selected.'" size="10" maxlength="10"> '. _("(DD/MM/YYYY)") ."\n";
print '</div>'."\n";
print '<div class=presentationdatefin>'."\n";
print '<font color=#FF0000>'. $langs->trans("InfoAfterCreate") .'</font>'."\n";
print '</div>'."\n";
print '<br>'."\n";
print '<table>'."\n";
print '<tr><td>'. $langs->trans("CreatePoll") .'</td><td><input type="image" name="confirmecreation" src="images/add.png"></td></tr>'."\n";
print '</table>'."\n";
}
//fin du formulaire et bandeau de pied
print '</form>'."\n";
print '<a name=bas></a>'."\n";
print '<br><br><br>'."\n";
print '</div>'."\n";
llxFooterSurvey();
$db->close();
?>

View File

@ -1,197 +0,0 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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 <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/opensurvey/public/create_survey.php
* \ingroup opensurvey
* \brief Page to create a new survey
*/
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
$langs->load("opensurvey");
$origin=GETPOST('origin','alpha');
// On teste toutes les variables pour supprimer l'ensemble des warnings PHP
// On transforme en entites html les données afin éviter les failles XSS
$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'canedit', 'mailsonde', 'creation_sondage_date', 'creation_sondage_date_x', 'creation_sondage_autre', 'creation_sondage_autre_x');
foreach ($post_var as $var)
{
$$var = GETPOST($var);
}
// On initialise egalement la session car sinon bonjour les warning :-)
$session_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'canedit');
foreach ($session_var as $var)
{
if (isset($_SESSION[$var])) $_SESSION[$var] = null;
}
// On initialise également les autres variables
$erreur_adresse = false;
$erreur_injection_titre = false;
$erreur_injection_nom = false;
$erreur_injection_commentaires = false;
$cocheplus = '';
$cochemail = '';
// Jump to correct page
if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GETPOST("creation_sondage_date_x") || GETPOST("creation_sondage_autre_x"))
{
$_SESSION["titre"] = $titre;
$_SESSION["nom"] = $nom;
$_SESSION["adresse"] = $adresse;
$_SESSION["commentaires"] = $commentaires;
unset($_SESSION["canedit"]);
$_SESSION["canedit"] = $canedit;
unset($_SESSION["mailsonde"]);
if ($mailsonde !== null) {
$_SESSION["mailsonde"] = true;
} else {
$_SESSION["mailsonde"] = false;
}
if (! isValidEmail($adresse)) $erreur_adresse = true;
//var_dump($titre.' - '.$nom.' - '.$adresse.' - '.!$erreur_adresse.' - '.! $erreur_injection_titre.' - '.! $erreur_injection_commentaires.' - '.! $erreur_injection_nom.' - '.$creation_sondage_date.' - '.$creation_sondage_autre); exit;
if ($titre && $nom && $adresse && !$erreur_adresse && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom)
{
if (! empty($creation_sondage_date))
{
header("Location: choix_date.php".($origin?'?origin='.$origin:''));
exit();
}
if (! empty($creation_sondage_autre))
{
header("Location: choix_autre.php".($origin?'?origin='.$origin:''));
exit();
}
}
}
/*
* View
*/
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss);
print '<div class="bandeautitre">'. $langs->trans("CreatePoll").' (1 / 2)' .'</div>'."\n";
//debut du formulaire
print '<form name="formulaire" action="create_survey.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
print '<input type="hidden" name="origin" value="'.dol_escape_htmltag($origin).'">';
print '<div class=corps>'."\n";
print '<br>'. $langs->trans("YouAreInPollCreateArea") .'<br><br>'."\n";
//Affichage des différents champs textes a remplir
print '<table>'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("PollTitle") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.$_SESSION["titre"].'"></td>'."\n";
if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x')))
{
print "<td><font color=\"#FF0000\">" . $langs->trans("FieldMandatory") . "</font></td>"."\n";
}
print '</tr>'."\n";
print '<tr><td>'. $langs->trans("Description") .'</td><td><textarea name="commentaires" rows="7" cols="40">'.$_SESSION["commentaires"].'</textarea></td>'."\n";
print '</tr>'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("OpenSurveyYourName") .'</td><td>';
print '<input type="text" name="nom" size="40" maxlength="40" value="'.$_SESSION["nom"].'"></td>'."\n";
if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x')))
{
print "<td><font color=\"#FF0000\">" . $langs->trans("FieldMandatory") . "</font></td>"."\n";
}
print '</tr>'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("OpenSurveyYourEMail") .'</td><td>';
print '<input type="text" name="adresse" size="40" maxlength="64" value="'.$_SESSION["adresse"].'"></td>'."\n";
if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x')))
{
print "<td><font color=\"#FF0000\">" .$langs->trans("FieldMandatory") . " </font></td>"."\n";
} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x')))
{
print "<td><font color=\"#FF0000\">" . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . "</font></td>"."\n";
}
print '</tr>'."\n";
print '</table>'."\n";
//focus javascript sur le premier champ
print '<script type="text/javascript">'."\n";
print 'document.formulaire.titre.focus();'."\n";
print '</script>'."\n";
print '<br>'."\n";
// Check or not
$cocheplus='';
if ($_SESSION["canedit"]) $cocheplus="checked";
print '<input type="checkbox" name="canedit" '.$cocheplus.'> '. $langs->trans("VotersCanModify") .'<br>'."\n";
if ($_SESSION["mailsonde"]) $cochemail="checked";
print '<input type="checkbox" name="mailsonde" '.$cochemail.'> '. $langs->trans("ToReceiveEMailForEachVote") .'<br>'."\n";
if (GETPOST('choix_sondage'))
{
if (GETPOST('choix_sondage') == 'date') print '<input type="hidden" name="creation_sondage_date" value="date">';
else print '<input type="hidden" name="creation_sondage_autre" value="autre">';
print '<input type="hidden" name="choix_sondage" value="'.GETPOST('choix_sondage').'">';
print '<br><input type="submit" class="button" name="submit" value="'.$langs->trans("CreatePoll").' ('.(GETPOST('choix_sondage') == 'date'?$langs->trans("TypeDate"):$langs->trans("TypeClassic")).')">';
}
else
{
//affichage des boutons pour choisir sondage date ou autre
print '<br><table >'."\n";
print '<tr><td>'. _("Schedule an event") .'</td><td></td> '."\n";
print '<td><input type="image" name="creation_sondage_date" value="Trouver une date" src="images/calendar-32.png"></td></tr>'."\n";
print '<tr><td>'. _("Make a choice") .'</td><td></td> '."\n";
print '<td><input type="image" name="creation_sondage_autre" value="'. _('Make a poll') . '" src="images/chart-32.png"></td></tr>'."\n";
print '</table>'."\n";
}
print '<br><br><br>'."\n";
print '</div>'."\n";
print '</form>'."\n";
llxFooterSurvey();
$db->close();
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,5 +1,6 @@
<?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
@ -32,19 +33,10 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Init vars
$action=GETPOST('action');
$numsondage = $numsondageadmin = '';
$numsondage = '';
if (GETPOST('sondage'))
{
if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL
{
$numsondageadmin=GETPOST("sondage",'alpha');
$numsondage=substr($numsondageadmin, 0, 16);
}
else
{
$numsondageadmin='';
$numsondage=GETPOST("sondage",'alpha');
}
$numsondage = GETPOST('sondage', 'alpha');
}
$object=new Opensurveysondage($db);
@ -53,6 +45,9 @@ if ($result <= 0) dol_print_error('','Failed to get survey id '.$numsondage);
$nblignes=count($object->fetch_lines());
//If the survey has not yet finished, then it can be modified
$canbemodified = ($object->date_fin > dol_now());
/*
* Actions
@ -65,6 +60,8 @@ $listofvoters=explode(',',$_SESSION["savevoter"]);
// Add comment
if (GETPOST('ajoutcomment'))
{
if (!$canbemodified) accessforbidden();
$error=0;
if (! GETPOST('comment'))
@ -83,17 +80,17 @@ if (GETPOST('ajoutcomment'))
$comment = GETPOST("comment");
$comment_user = GETPOST('commentuser');
$sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)";
$sql.= " VALUES ('".$db->escape($numsondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')";
$resql = $db->query($sql);
dol_syslog("sql=".$sql);
$resql = $object->addComment($comment, $comment_user);
if (! $resql) dol_print_error($db);
}
}
// Add vote
if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]))
if (isset($_POST["boutonp"]))
{
if (!$canbemodified) accessforbidden();
//Si le nom est bien entré
if (GETPOST('nom'))
{
@ -136,18 +133,25 @@ if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]))
$_SESSION["savevoter"]=$nom.','.(empty($_SESSION["savevoter"])?'':$_SESSION["savevoter"]); // Save voter
$listofvoters=explode(',',$_SESSION["savevoter"]);
if (! empty($object->mailsonde))
if ($object->mailsonde)
{
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $object->mail_admin, $conf->global->MAIN_MAIL_EMAIL_FROM, $nom." has filled a line.\nYou can find your poll at the link:\n".getUrlSondage($numsondage));
$result=$cmailfile->sendfile();
if ($result)
{
if ($object->fk_user_creat) {
$userstatic = new User($db);
$userstatic->fetch($object->fk_user_creat);
$email = $userstatic->email;
} else {
$email = $object->mail_admin;
}
else
{
//Linked user may not have an email set
if ($email) {
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$body = $langs->trans('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true));
$cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body);
$result=$cmailfile->sendfile();
}
}
}
@ -156,7 +160,7 @@ if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]))
}
else
{
$err |= NAME_EMPTY;
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors');
}
}
@ -200,6 +204,8 @@ if ($testmodifier)
$nouveauchoix.="0";
}
}
if (!$canbemodified) accessforbidden();
$idtomodify=$_POST["idtomodify".$modifier];
$sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs";
@ -215,8 +221,9 @@ if ($testmodifier)
$idcomment=GETPOST('deletecomment','int');
if ($idcomment)
{
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$idcomment;
$resql = $db->query($sql);
if (!$canbemodified) accessforbidden();
$resql = $object->deleteComment($idcomment);
}
@ -226,15 +233,6 @@ if ($idcomment)
*/
$form=new Form($db);
$object=new OpenSurveySondage($db);
$result=$object->fetch(0,$numsondage);
if ($result <= 0)
{
print $langs->trans("ErrorRecordNotFound");
llxFooterSurvey();
exit;
}
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
@ -259,23 +257,29 @@ print '<div class="corps"> '."\n";
//affichage du titre du sondage
$titre=str_replace("\\","",$object->titre);
print '<strong>'.$titre.'</strong><br>'."\n";
//affichage du nom de l'auteur du sondage
print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'<br>'."\n";
print '<strong>'.dol_htmlentities($titre).'</strong><br>'."\n";
//affichage des commentaires du sondage
if ($object->commentaires)
{
print '<br>'.$langs->trans("Description") .' :<br>'."\n";
$commentaires=dol_nl2br($object->commentaires);
$commentaires=dol_nl2br(dol_htmlentities($object->commentaires));
print $commentaires;
print '<br>'."\n";
}
print '</div>'."\n";
print '<form name="formulaire" action="studs.php?sondage='.$numsondage.'"'.'#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
//The survey has expired, users can't vote or do any action
if (!$canbemodified) {
print '<div style="text-align: center"><p>'.$langs->trans('SurveyExpiredInfo').'</p></div>';
llxFooterSurvey();
$db->close();
die;
}
print '<form name="formulaire" action="studs.php?sondage='.$numsondage.'"'.'#bas" method="POST">'."\n";
print '<input type="hidden" name="sondage" value="' . $numsondage . '"/>';
print '<div class="cadre"> '."\n";
@ -285,7 +289,7 @@ print '<br><br>'."\n";
print '<table class="resultats">'."\n";
// Show choice titles
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
//affichage des sujets du sondage
print '<tr>'."\n";
@ -358,7 +362,7 @@ if ($object->format=="D"||$object->format=="D+")
for ($i=0; isset($toutsujet[$i]); $i++) {
$heures=explode('@',$toutsujet[$i]);
if (isset($heures[1])) {
print '<td class="heure">'.$heures[1].'</td>'."\n";
print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else {
print '<td class="heure"></td>'."\n";
}
@ -404,14 +408,18 @@ while ($compteur < $num)
$ensemblereponses = $obj->reponses;
// ligne d'un usager pré-authentifié
$mod_ok = (in_array($obj->nom, $listofvoters));
if (!$mod_ok && !$object->allow_spy) {
$compteur++;
continue;
}
print '<tr>'."\n";
// ligne d'un usager pré-authentifié
$mod_ok = ($object->canedit || (! empty($nombase) && in_array($nombase, $listofvoters)));
// Name
$nombase=str_replace("°","'",$obj->nom);
print '<td class="nom">'.$nombase.'</td>'."\n";
print '<td class="nom">'.dol_htmlentities($obj->nom).'</td>'."\n";
// si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier)
@ -565,7 +573,7 @@ if ($ligneamodifier < 0 && (! isset($_SESSION['nom'])))
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')))
{
print '<input type="checkbox" name="choix'.$i.'" value="1"';
if (isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1' && is_error(NAME_EMPTY) )
if (isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1')
{
print ' checked="checked"';
}
@ -608,143 +616,127 @@ for ($i=0; $i < $nbcolonnes; $i++)
}
}
// Show line total
print '<tr>'."\n";
print '<td align="center">'. $langs->trans("Total") .'</td>'."\n";
for ($i = 0; $i < $nbcolonnes; $i++)
{
$showsumfor = isset($sumfor[$i])?$sumfor[$i]:'';
$showsumagainst = isset($sumagainst[$i])?$sumagainst[$i]:'';
if (empty($showsumfor)) $showsumfor = 0;
if (empty($showsumagainst)) $showsumagainst = 0;
print '<td>';
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) print $showsumfor;
if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst;
if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst;
print '</td>'."\n";
}
print '</tr>';
// Show picto winner
if ($nbofcheckbox >= 2)
{
if ($object->allow_spy) {
// Show line total
print '<tr>'."\n";
print '<td class="somme"></td>'."\n";
for ($i=0; $i < $nbcolonnes; $i++)
print '<td align="center">'. $langs->trans("Total") .'</td>'."\n";
for ($i = 0; $i < $nbcolonnes; $i++)
{
//print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne;
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne)
{
print '<td class="somme"><img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"></td>'."\n";
} else {
print '<td class="somme"></td>'."\n";
}
$showsumfor = isset($sumfor[$i])?$sumfor[$i]:'';
$showsumagainst = isset($sumagainst[$i])?$sumagainst[$i]:'';
if (empty($showsumfor)) $showsumfor = 0;
if (empty($showsumagainst)) $showsumagainst = 0;
print '<td>';
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) print $showsumfor;
if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst;
if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst;
print '</td>'."\n";
}
print '</tr>';
// Show picto winner
if ($nbofcheckbox >= 2)
{
print '<tr>'."\n";
print '<td class="somme"></td>'."\n";
for ($i=0; $i < $nbcolonnes; $i++)
{
//print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne;
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne)
{
print '<td class="somme"><img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"></td>'."\n";
} else {
print '<td class="somme"></td>'."\n";
}
}
print '</tr>'."\n";
}
print '</tr>'."\n";
}
print '</table>'."\n";
print '</div>'."\n";
$toutsujet=explode(",",$object->sujet);
$toutsujet=str_replace("°","'",$toutsujet);
if ($object->allow_spy) {
$toutsujet=explode(",",$object->sujet);
$toutsujet=str_replace("°","'",$toutsujet);
$compteursujet=0;
$meilleursujet = '';
$compteursujet=0;
$meilleursujet = '';
for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) {
$meilleursujet.=", ";
if ($object->format=="D"||$object->format=="D+") {
$meilleursujetexport = $toutsujet[$i];
for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) {
$meilleursujet.=", ";
if ($object->format=="D") {
$meilleursujetexport = $toutsujet[$i];
if (strpos($toutsujet[$i], '@') !== false) {
$toutsujetdate = explode("@", $toutsujet[$i]);
$meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ' ('.dol_print_date($toutsujetdate[0],'%A').')' . _("for") . ' ' . $toutsujetdate[1];
} else {
$meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ' ('.dol_print_date($toutsujet[$i],'%A').')';
if (strpos($toutsujet[$i], '@') !== false) {
$toutsujetdate = explode("@", $toutsujet[$i]);
$meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ' ('.dol_print_date($toutsujetdate[0],'%A').')' . ' - ' . $toutsujetdate[1];
} else {
$meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ' ('.dol_print_date($toutsujet[$i],'%A').')';
}
}
else
{
$tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= dol_htmlentities($tmps[0]);
}
$compteursujet++;
}
else
{
$tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= $tmps[0];
}
$compteursujet++;
}
}
$meilleursujet=substr("$meilleursujet", 1);
$meilleursujet = str_replace("°", "'", $meilleursujet);
// Show best choice
if ($nbofcheckbox >= 2)
{
$vote_str = $langs->trans('votes');
print '<p class="affichageresultats">'."\n";
if (isset($meilleurecolonne) && $compteursujet == "1") {
print '<img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"> ' . $langs->trans('TheBestChoice') . ": <b>$meilleursujet</b> " . $langs->trans('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) {
print '<img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"> ' . $langs->trans('TheBestChoices') . ": <b>$meilleursujet</b> " . $langs->trans('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
}
print '</p><br>'."\n";
$meilleursujet=substr("$meilleursujet", 1);
$meilleursujet = str_replace("°", "'", $meilleursujet);
// Show best choice
if ($nbofcheckbox >= 2)
{
$vote_str = $langs->trans('votes');
print '<p class="affichageresultats">'."\n";
if (isset($meilleurecolonne) && $compteursujet == "1") {
print '<img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"> ' . $langs->trans('TheBestChoice') . ": <b>".$meilleursujet."</b> " . $langs->trans('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) {
print '<img src="'.dol_buildpath('/opensurvey/img/medaille.png',1).'"> ' . $langs->trans('TheBestChoices') . ": <b>".$meilleursujet."</b> " . $langs->trans('with') . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
}
print '</p><br>'."\n";
}
}
print '<br>';
// Comment list
$sql = 'SELECT id_comment, usercomment, comment';
$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments';
$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'";
$sql.= " ORDER BY id_comment";
$resql = $db->query($sql);
$num_rows=$db->num_rows($resql);
if ($num_rows > 0)
$comments = $object->getComments();
if ($comments)
{
$i = 0;
print "<br><b>" . $langs->trans("CommentsOfVoters") . " :</b><br>\n";
while ( $i < $num_rows)
{
$obj=$db->fetch_object($resql);
print "<br><b>" . $langs->trans("CommentsOfVoters") . ":</b><br>\n";
foreach ($comments as $obj) {
print '<div class="comment"><span class="usercomment">';
if (in_array($obj->usercomment, $listofvoters)) print '<a href="'.$_SERVER["PHP_SELF"].'?deletecomment='.$obj->id_comment.'&sondage='.$numsondage.'"> '.img_picto('', 'delete.png').'</a> ';
print $obj->usercomment.' :</span> <span class="comment">'.dol_nl2br($obj->comment)."</span></div>";
$i++;
print dol_htmlentities($obj->usercomment).':</span> <span class="comment">'.dol_nl2br(dol_htmlentities($obj->comment))."</span></div>";
}
}
// Form to add comment
print '<div class="addcomment">' .$langs->trans("AddACommentForPoll") . "<br>\n";
if ($object->allow_comments) {
print '<div class="addcomment">' .$langs->trans("AddACommentForPoll") . "<br>\n";
print '<textarea name="comment" rows="2" cols="60"></textarea><br>'."\n";
print $langs->trans("Name") .' : ';
print '<input type="text" name="commentuser" maxlength="64" /> &nbsp; '."\n";
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
print '</form>'."\n";
print '<textarea name="comment" rows="2" cols="60"></textarea><br>'."\n";
print $langs->trans("Name") .': ';
print '<input type="text" name="commentuser" maxlength="64" /> &nbsp; '."\n";
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
print '</form>'."\n";
print '</div>'."\n"; // div add comment
print '</div>'."\n"; // div add comment
}
print '<br><br>';
/*
// Define $urlwithroot
$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
$message='';
$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$numsondage;
$urlvcal='<a href="'.$url.'" target="_blank">'.$url.'</a>';
$message.=img_picto('','object_globe.png').' '.$langs->trans("UrlForSurvey").': '.$urlvcal;
print '<center>'.$message.'</center>';
*/
print '<a name="bas"></a>'."\n";
llxFooterSurvey();

View File

@ -1,5 +1,6 @@
<?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
@ -16,7 +17,7 @@
*/
/**
* \file htdocs/opensurvey/adminstuds_preview.php
* \file htdocs/opensurvey/results.php
* \ingroup opensurvey
* \brief Page to preview votes of a survey
*/
@ -30,13 +31,12 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Security check
if (!$user->admin) accessforbidden();
if (!$user->rights->opensurvey->read) accessforbidden();
// Init vars
$action=GETPOST('action');
$numsondageadmin=GETPOST("sondage");
$numsondage=substr($numsondageadmin, 0, 16);
$numsondage= GETPOST("id");
$object=new Opensurveysondage($db);
$result=$object->fetch(0,$numsondage);
@ -49,10 +49,16 @@ $nblignes=count($object->fetch_lines());
* Actions
*/
//Return to the results
if (GETPOST('retoursondage')) {
header('Location: results.php?id='.$_GET['id']);
die;
}
$nbcolonnes = substr_count($object->sujet, ',') + 1;
// Add vote
if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]))
if (isset($_POST["boutonp"]))
{
if (GETPOST('nom'))
{
@ -119,7 +125,10 @@ for ($i=0; $i<$nblignes; $i++)
}
if ($testmodifier)
{
//var_dump($_POST);exit;
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$nouveauchoix = '';
for ($i = 0; $i < $nbcolonnes; $i++)
{
@ -148,8 +157,11 @@ if ($testmodifier)
}
// Add column (not for date)
if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A" || $object->format == "A+"))
if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A"))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$nouveauxsujets=$object->sujet;
//on rajoute la valeur a la fin de tous les sujets deja entrés
@ -163,11 +175,17 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if (! $resql) dol_print_error($db);
else {
header('Location: results.php?id='.$object->id_sondage);
}
}
// Add column (with format date)
if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->format == "D+"))
if (isset($_POST["ajoutercolonne"]) && ($object->format == "D"))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$nouveauxsujets=$object->sujet;
if (isset($_POST["nouveaujour"]) && $_POST["nouveaujour"] != "vide" &&
@ -242,16 +260,8 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->forma
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if (! $resql) dol_print_error($db);
if ($nouvelledate > strtotime($object->date_fin))
{
$date_fin=$nouvelledate+200000;
$sql = 'UPDATE '.MAIN_DB_PREFIX.'opensurvey_sondage';
$sql.= " SET date_fin = '".$db->escape($date_fin)."'";
$sql.= " WHERE id_sondage = '".$db->escape($numsondage)."'";
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if (! $resql) dol_print_error($db);
else {
header('Location: results.php?id='.$object->id_sondage);
}
}
@ -266,8 +276,11 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->forma
// Delete line
for ($i = 0; $i < $nblignes; $i++)
{
if (isset($_POST["effaceligne$i"]) || isset($_POST['effaceligne'.$i.'_x']))
if (isset($_POST["effaceligne$i"]))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$compteur=0;
// Loop on each answer
@ -298,8 +311,11 @@ for ($i = 0; $i < $nblignes; $i++)
// Delete column
for ($i = 0; $i < $nbcolonnes; $i++)
{
if ((isset($_POST["effacecolonne$i"]) || isset($_POST['effacecolonne'.$i.'_x'])) && $nbcolonnes > 1)
if (isset($_POST["effacecolonne$i"]) && $nbcolonnes > 1)
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$db->begin();
$toutsujet = explode(",",$object->sujet);
@ -382,8 +398,7 @@ $form=new Form($db);
$result=$object->fetch(0,$numsondage);
if ($result <= 0)
{
print $langs->trans("ErrorRecordNotFound");
llxFooter();
dol_print_error($db,$object->error);
exit;
}
@ -404,19 +419,9 @@ $toutsujet=str_replace("@","<br>",$toutsujet);
$toutsujet=str_replace("°","'",$toutsujet);
print '<form name="formulaire4" action="#" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
print '<form name="formulaire4" action="#" method="POST">'."\n";
$head = array();
$head[0][0] = 'adminstuds.php?sondage='.$object->id_sondage_admin;
$head[0][1] = $langs->trans("Card");
$head[0][2] = 'general';
$h++;
$head[1][0] = 'adminstuds_preview.php?sondage='.$object->id_sondage_admin;
$head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview");
$head[1][2] = 'preview';
$h++;
$head = opensurvey_prepare_head($object);
print dol_get_fiche_head($head,'preview',$langs->trans("Survey"),0,dol_buildpath('/opensurvey/img/object_opensurvey.png',1),1);
@ -428,12 +433,12 @@ $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).(! empty($socid)
// Ref
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage_admin', 'id_sondage_admin');
print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage', 'id_sondage');
print '</td>';
print '</tr>';
// Type
$type=($object->format=="A"||$object->format=="A+")?'classic':'date';
$type=($object->format=="A")?'classic':'date';
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1);
print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate").'</td></tr>';
@ -459,42 +464,42 @@ print '</form>'."\n";
print '<div class="tabsAction">';
print '<a class="butAction" href="public/exportcsv.php?sondage=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
print '<a class="butAction" href="exportcsv.php?id=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>';
print '</div>';
showlogo();
// Add form to add a field
if (GETPOST('ajoutsujet'))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
//on recupere les données et les sujets du sondage
print '<form name="formulaire" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="sondage" value="'.$numsondageadmin.'">';
print '<form name="formulaire" action="" method="POST">'."\n";
print '<input type="hidden" name="backtourl" value="'.GETPOST('backtourl').'">';
print '<div class="center">'."\n";
print "<br><br>"."\n";
// Add new column
if ($object->format=="A"||$object->format=="A+")
if ($object->format=="A")
{
print $langs->trans("AddNewColumn") .' :<br><br>';
print $langs->trans("AddNewColumn") .':<br><br>';
print $langs->trans("Title").' <input type="text" name="nouvellecolonne" size="40"><br>';
$tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList"));
print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'<br><br>';
print '<input type="submit" class="button" name="ajoutercolonne" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
print ' &nbsp; &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
print '<input type="submit" class="button" name="retoursondage" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
print '<br><br>'."\n";
}
else
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$formother=new FormOther($db);
//ajout d'une date avec creneau horaire
//print _("You can add a new scheduling date to your poll.<br> If you just want to add a new hour to an existant date, put the same date and choose a new hour.") .'<br><br> '."\n";
print $langs->trans("AddADate") .' :<br><br>'."\n";
print $langs->trans("AddADate") .':<br><br>'."\n";
print '<select name="nouveaujour"> '."\n";
print '<OPTION VALUE="vide"></OPTION>'."\n";
for ($i=1;$i<32;$i++){
@ -502,23 +507,13 @@ if (GETPOST('ajoutsujet'))
}
print '</SELECT>'."\n";
print '<select name="nouveaumois"> '."\n";
print '<OPTION VALUE="vide"></OPTION>'."\n";
for($i = 1; $i < 13; $i++) {
print '<OPTION VALUE="'.$i.'">'.strftime('%B', mktime(0, 0, 0, $i)).'</OPTION>'."\n";
}
print '</SELECT>'."\n";
print $formother->select_month('', 'nouveaumois', 1);
print '&nbsp;';
print $formother->select_year('', 'nouvelleannee', 1, 0, 5, 0, 1);
print '<select name="nouvelleannee"> '."\n";
print '<OPTION VALUE="vide"></OPTION>'."\n";
$maxyear=date("Y")+5;
for ($i = date("Y"); $i < $maxyear; $i++)
{
print '<OPTION VALUE="'.$i.'">'.$i.'</OPTION>'."\n";
}
print '</SELECT>'."\n";
print '<br><br>'. $langs->trans("AddStartHour") .' : <br><br>'."\n";
print '<br><br>'. $langs->trans("AddStartHour") .': <br><br>'."\n";
print '<select name="nouvelleheuredebut"> '."\n";
print '<OPTION VALUE="vide"></OPTION>'."\n";
for ($i = 0; $i < 24; $i++) {
@ -532,7 +527,7 @@ if (GETPOST('ajoutsujet'))
print '<OPTION VALUE="30">30</OPTION>'."\n";
print '<OPTION VALUE="45">45</OPTION>'."\n";
print '</SELECT>'."\n";
print '<br><br>'. $langs->trans("AddEndHour") .' : <br><br>'."\n";
print '<br><br>'. $langs->trans("AddEndHour") .': <br><br>'."\n";
print '<select name="nouvelleheurefin"> '."\n";
print '<OPTION VALUE="vide"></OPTION>'."\n";
for ($i = 0; $i < 24; $i++) {
@ -560,37 +555,15 @@ if (GETPOST('ajoutsujet'))
exit;
}
print $langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'<br><br>';
print '<div class="corps"> '."\n";
//affichage du titre du sondage
$titre=str_replace("\\","",$object->titre);
print '<strong>'.$titre.'</strong><br>'."\n";
//affichage du nom de l'auteur du sondage
print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'<br>'."\n";
//affichage des commentaires du sondage
if ($object->commentaires)
{
print '<br>'.$langs->trans("Description") .' :<br>'."\n";
$commentaires=dol_nl2br($object->commentaires);
print $commentaires;
print '<br>'."\n";
if ($user->rights->opensurvey->write) {
print '<br />'.$langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'<br>';
}
print '</div>'."\n";
$nbcolonnes=substr_count($object->sujet,',')+1;
print '<form name="formulaire" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="sondage" value="'.$numsondageadmin.'">';
print '<form name="formulaire" action="" method="POST">'."\n";
print '<div class="cadre"> '."\n";
print '<br>'."\n";
// Start to show survey result
print '<table class="resultats">'."\n";
@ -604,15 +577,18 @@ print '<td></td>'."\n";
print '<td></td>'."\n";
//boucle pour l'affichage des boutons de suppression de colonne
for ($i = 0; isset($toutsujet[$i]); $i++) {
print '<td class=somme><input type="image" name="effacecolonne'.$i.'" value="Effacer la colonne" src="'.dol_buildpath('/opensurvey/img/cancel.png',1).'"></td>'."\n";
if ($user->rights->opensurvey->write) {
for ($i = 0; isset($toutsujet[$i]); $i++) {
print '<td class=somme><input type="image" name="effacecolonne'.$i.'" src="'.dol_buildpath('/opensurvey/img/cancel.png',1).'"></td>'."\n";
}
}
print '</tr>'."\n";
// Show choice titles
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
//affichage des sujets du sondage
print '<tr>'."\n";
@ -644,7 +620,11 @@ if ($object->format=="D"||$object->format=="D+")
}
}
print '<td class="annee"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&sondage='.$object->id_sondage_admin.'">'.$langs->trans("Add").'</a></td>'."\n";
if ($user->rights->opensurvey->write) {
print '<td class="annee">';
print '<a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&id='.$object->id_sondage.'">'.$langs->trans("Add").'</a></td>'."\n";
}
print '</tr>'."\n";
print '<tr>'."\n";
print '<td></td>'."\n";
@ -670,7 +650,10 @@ if ($object->format=="D"||$object->format=="D+")
}
}
print '<td class="mois"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&sondage='.$object->id_sondage_admin.'">'.$langs->trans("Add").'</a></td>'."\n";
if ($user->rights->opensurvey->write) {
print '<td class="mois"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&id='.$object->id_sondage.'">'.$langs->trans("Add").'</a></td>'."\n";
}
print '</tr>'."\n";
print '<tr>'."\n";
print '<td></td>'."\n";
@ -694,7 +677,9 @@ if ($object->format=="D"||$object->format=="D+")
}
}
print '<td class="jour"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&sondage='.$object->id_sondage_admin.'">'.$langs->trans("Add").'</a></td>'."\n";
if ($user->rights->opensurvey->write) {
print '<td class="jour"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&id='.$object->id_sondage.'">'.$langs->trans("Add").'</a></td>'."\n";
}
print '</tr>'."\n";
//affichage des horaires
@ -706,13 +691,16 @@ if ($object->format=="D"||$object->format=="D+")
for ($i = 0; isset($toutsujet[$i]); $i++) {
$heures=explode('@', $toutsujet[$i]);
if (isset($heures[1])) {
print '<td class="heure">'.$heures[1].'</td>'."\n";
print '<td class="heure">'.dol_htmlentities($heures[1]).'</td>'."\n";
} else {
print '<td class="heure"></td>'."\n";
}
}
print '<td class="heure"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&sondage='.$object->id_sondage_admin.'">'.$langs->trans("Add").'</a></td>'."\n";
if ($user->rights->opensurvey->write) {
print '<td class="heure"><a href="'.$_SERVER["PHP_SELF"].'?ajoutsujet=1&id='.$object->id_sondage.'">'.$langs->trans("Add").'</a></td>'."\n";
}
print '</tr>'."\n";
}
}
@ -726,10 +714,10 @@ else
for ($i = 0; isset($toutsujet[$i]); $i++)
{
$tmp=explode('@',$toutsujet[$i]);
print '<td class="sujet">'.$tmp[0].'</td>'."\n";
print '<td class="sujet">'.dol_htmlentities($tmp[0]).'</td>'."\n";
}
print '<td class="sujet"><a href="'.$_SERVER["PHP_SELF"].'?sondage='.$numsondageadmin.'&ajoutsujet=1&backtourl='.urlencode($_SERVER["PHP_SELF"].'?sondage='.$numsondageadmin).'">'.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).'</a></td>'."\n";
print '<td class="sujet"><a href="'.$_SERVER["PHP_SELF"].'?id='.$numsondage.'&ajoutsujet=1&backtourl='.urlencode($_SERVER["PHP_SELF"]).'">'.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).'</a></td>'."\n";
print '</tr>'."\n";
}
@ -755,12 +743,14 @@ while ($compteur < $num)
$ensemblereponses = $obj->reponses;
print '<tr>'."\n";
print '<td><input type="image" name="effaceligne'.$compteur.'" value="Effacer" src="'.dol_buildpath('/opensurvey/img/cancel.png',1).'"></td>'."\n";
print '<tr><td>'."\n";
if ($user->rights->opensurvey->write) {
print '<input type="image" name="effaceligne'.$compteur.'" src="'.dol_buildpath('/opensurvey/img/cancel.png',1).'">'."\n";
}
// Name
$nombase=str_replace("°","'",$obj->nom);
print '<td class="nom">'.$nombase.'</td>'."\n";
print '</td><td class="nom">'.dol_htmlentities($obj->nom).'</td>'."\n";
// si la ligne n'est pas a changer, on affiche les données
if (! $testligneamodifier)
@ -870,7 +860,7 @@ while ($compteur < $num)
}
// Button edit at end of line
if ($compteur != $ligneamodifier)
if ($compteur != $ligneamodifier && ($user->rights->opensurvey->write))
{
print '<td class="casevide"><input type="submit" class="button" name="modifierligne'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Edit")).'"></td>'."\n";
}
@ -909,7 +899,7 @@ if (empty($testligneamodifier))
if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')))
{
print '<input type="checkbox" name="choix'.$i.'" value="1"';
if ( isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1' && is_error(NAME_EMPTY) )
if ( isset($_POST['choix'.$i]) && $_POST['choix'.$i] == '1' )
{
print ' checked="checked"';
}
@ -989,28 +979,16 @@ if ($nbofcheckbox >= 2)
}
// S'il a oublié de remplir un nom
if ((isset($_POST["boutonp"]) || isset($_POST["boutonp_x"])) && $_POST["nom"] == "") {
print '<tr>'."\n";
print "<td colspan=10><font color=#FF0000>" . _("Enter a name !") . "</font>\n";
print '</tr>'."\n";
if (isset($_POST["boutonp"]) && $_POST["nom"] == "") {
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors');
}
if (isset($erreur_prenom) && $erreur_prenom) {
print '<tr>'."\n";
print "<td colspan=10><font color=#FF0000>" . _("The name you've chosen already exist in this poll!") . "</font></td>\n";
print '</tr>'."\n";
}
if (isset($erreur_injection) && $erreur_injection) {
print '<tr>'."\n";
print "<td colspan=10><font color=#FF0000>" . _("Characters \" ' < et > are not permitted") . "</font></td>\n";
print '</tr>'."\n";
setEventMessage($langs->trans('VoteNameAlreadyExists'), 'errors');
}
if (isset($erreur_ajout_date) && $erreur_ajout_date) {
print '<tr>'."\n";
print "<td colspan=10><font color=#FF0000>" . _("The date is not correct !") . "</font></td>\n";
print '</tr>'."\n";
setEventMessage($langs->trans("ErrorWrongDate"), 'errors');
}
//fin du tableau
@ -1026,7 +1004,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) {
$meilleursujet.=", ";
if ($object->format == "D" || $object->format == "D+") {
if ($object->format == "D") {
$meilleursujetexport = $toutsujet[$i];
if (strpos($toutsujet[$i], '@') !== false) {
@ -1039,7 +1017,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
else
{
$tmps=explode('@',$toutsujet[$i]);
$meilleursujet .= $tmps[0];
$meilleursujet .= dol_htmlentities($tmps[0]);
}
$compteursujet++;
@ -1056,9 +1034,9 @@ if ($nbofcheckbox >= 2)
print '<p class="affichageresultats">'."\n";
if (isset($meilleurecolonne) && $compteursujet == "1") {
print "<img src=\"".dol_buildpath('/opensurvey/img/medaille.png',1)."\"> " . $langs->trans('TheBestChoice') . " : <b>$meilleursujet </b>" . $langs->trans("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
print "<img src=\"".dol_buildpath('/opensurvey/img/medaille.png',1)."\"> " . $langs->trans('TheBestChoice') . ": <b>".$meilleursujet." </b>" . $langs->trans("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) {
print "<img src=\"".dol_buildpath('/opensurvey/img/medaille.png',1)."\"> " . $langs->trans('TheBestChoices') . " : <b>$meilleursujet </b>" . $langs->trans("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
print "<img src=\"".dol_buildpath('/opensurvey/img/medaille.png',1)."\"> " . $langs->trans('TheBestChoices') . ": <b>".$meilleursujet." </b>" . $langs->trans("with") . " <b>$meilleurecolonne </b>" . $vote_str . ".\n";
}
print '<br></p><br>'."\n";
}

View File

@ -0,0 +1,164 @@
<?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 <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/opensurvey/wizard/choix_autre.php
* \ingroup opensurvey
* \brief Page to create a new survey (choice selection)
*/
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
/*
* Action
*/
// Set session vars
if (isset($_SESSION["nbrecases"])) {
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
if (isset($_POST["choix"][$i])) {
$_SESSION["choix$i"]=$_POST["choix"][$i];
}
if (isset($_POST["typecolonne"][$i])) {
$_SESSION["typecolonne$i"]=$_POST["typecolonne"][$i];
}
}
} else { //nombre de cases par défaut
$_SESSION["nbrecases"]=5;
}
if (isset($_POST["ajoutcases"])) {
$_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5;
}
// Create survey into database
if (isset($_POST["confirmecreation"]))
{
//recuperation des données de champs textes
$toutchoix = '';
for ($i = 0; $i < $_SESSION["nbrecases"] + 1; $i++)
{
if (! empty($_POST["choix"][$i]))
{
$toutchoix.=',';
$toutchoix.=str_replace(array(",","@"), " ", $_POST["choix"][$i]).(empty($_POST["typecolonne"][$i])?'':'@'.$_POST["typecolonne"][$i]);
}
}
$toutchoix=substr("$toutchoix",1);
$_SESSION["toutchoix"]=$toutchoix;
//test de remplissage des cases
$testremplissage = '';
for ($i=0;$i<$_SESSION["nbrecases"];$i++)
{
if (isset($_POST["choix"][$i]))
{
$testremplissage="ok";
}
}
//message d'erreur si aucun champ renseigné
if ($testremplissage != "ok" || (!$toutchoix)) {
setEventMessage($langs->trans("ErrorOpenSurveyOneChoice"), 'errors');
} else {
//format du sondage AUTRE
$_SESSION["formatsondage"]="A";
// Add into database
ajouter_sondage();
}
}
/*
* View
*/
$form=new Form($db);
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss);
if (empty($_SESSION['titre']))
{
dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection'));
llxFooterSurvey();
exit;
}
//partie creation du sondage dans la base SQL
//On prépare les données pour les inserer dans la base
print '<form name="formulaire" action="#bas" method="POST">'."\n";
print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)');
print '<br>'. $langs->trans("PollOnChoice") .'<br><br>'."\n";
print '<div class=corps>'."\n";
print '<table>'."\n";
//affichage des cases texte de formulaire
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
$j = $i + 1;
if (isset($_SESSION["choix$i"]) === false) {
$_SESSION["choix$i"] = '';
}
print '<tr><td>'. $langs->trans("TitleChoice") .' '.$j.': </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.dol_escape_htmltag($_SESSION["choix$i"]).'" id="choix'.$i.'">';
$tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList"));
print ' &nbsp; '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]);
print '</td></tr>'."\n";
}
print '</table>'."\n";
//ajout de cases supplementaires
print '<table><tr>'."\n";
print '<td>'. $langs->trans("5MoreChoices") .'</td><td><input type="image" name="ajoutcases" src="../img/add-16.png"></td>'."\n";
print '</tr></table>'."\n";
print'<br>'."\n";
print '<table><tr>'."\n";
print '<td></td><td><input type="submit" class="button" name="confirmecreation" value="'.dol_escape_htmltag($langs->trans("CreatePoll")).'"></td>'."\n";
print '</tr></table>'."\n";
//fin du formulaire et bandeau de pied
print '</form>'."\n";
print '<a name=bas></a>'."\n";
print '<br><br><br>'."\n";
print '</div>'."\n";
llxFooter();
$db->close();
?>

View File

@ -1,5 +1,6 @@
<?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
@ -16,33 +17,128 @@
*/
/**
* \file htdocs/opensurvey/public/choix_date.php
* \file htdocs/opensurvey/wizard/choix_date.php
* \ingroup opensurvey
* \brief Page to create a new survey (date selection)
*/
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
$origin=GETPOST('origin','alpha');
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
//le format du sondage est DATE
$_SESSION["formatsondage"] = "D";
//traitement de l'entrée des heures dans les cases texte
$erreur = false;
/*
* Actions
*/
// Insert survey
if (GETPOST('confirmation') || GETPOST('confirmation_x'))
if (GETPOST('confirmation'))
{
if (is_array($_SESSION['totalchoixjour']))
//On sauvegarde les heures deja entrées
if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true)
{
$nbofchoice=count($_SESSION["totalchoixjour"]);
for ($i = 0; $i < $nbofchoice; $i++)
{
for ($i = 0; $i < $nbofchoice; $i++) {
//affichage des 5 cases horaires
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
$_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j];
$case = $j + 1;
if (isset($_POST['horaires'.$i]) === false || isset($_POST['horaires'.$i][$j]) === false) {
$errheure[$i][$j]=true;
$erreur=true;
continue;
}
//si c'est un creneau type 8:00-11:00
if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $_POST["horaires$i"][$j], $creneaux)) {
//on recupere les deux parties du preg_match qu'on redécoupe autour des ":"
$debutcreneau=explode(":", $creneaux[1]);
$fincreneau=explode(":", $creneaux[2]);
//comparaison des heures de fin et de debut
//si correctes, on entre les données dans la variables de session
if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) {
$_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $_POST["horaires$i"][$j], $creneaux)) { //si c'est un creneau type 8h00-11h00
//on recupere les deux parties du preg_match qu'on redécoupe autour des "H"
$debutcreneau=preg_split("/h/i", $creneaux[1]);
$fincreneau=preg_split("/h/i", $creneaux[2]);
//comparaison des heures de fin et de debut
//si correctes, on entre les données dans la variables de session
if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) {
$_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure simple type 8:00
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < 24 && $heures[2] < 60) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure encore plus simple type 8h
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < 24 && $heures[2] < 60) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau simple type 8-11
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau H type 8h-11h
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif ($_POST["horaires$i"][$j]=="") { //Si la case est vide
unset($_SESSION["horaires$i"][$j]);
} else { //pour tout autre format, message d'erreur
$errheure[$i][$j]=true;
$erreur=true;
}
if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) {
if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) {
$_SESSION["horaires$i"][$j] = '';
} else {
$_SESSION["horaires$i"] = array();
$_SESSION["horaires$i"][$j] = '';
}
}
}
if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") {
$choixdate.=",";
$choixdate .= $_SESSION["totalchoixjour"][$i];
@ -58,11 +154,22 @@ if (GETPOST('confirmation') || GETPOST('confirmation_x'))
}
}
}
if (isset($errheure)) {
setEventMessage($langs->trans("ErrorBadFormat"), 'errors');
}
}
else dol_print_error('','array not defined');
$_SESSION["toutchoix"]=substr("$choixdate",1);
ajouter_sondage($origin);
//If just one day and no other time options, error message
if (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="") {
setEventMessage($langs->trans("MoreChoices"), 'errors');
$erreur=true;
}
if (!$erreur) {
$_SESSION["toutchoix"]=substr("$choixdate",1);
ajouter_sondage();
}
}
// Reset days
@ -84,22 +191,22 @@ if (GETPOST('reset')) {
* View
*/
if (! isset($_SESSION['nom']) && ! isset($_SESSION['adresse']) && ! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail']))
if (! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail']))
{
dol_print_error('',"You haven't filled the first section of the poll creation");
dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection'));
exit;
}
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss);
llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss);
//nombre de cases par défaut
if (! isset($_SESSION["nbrecaseshoraires"]))
{
$_SESSION["nbrecaseshoraires"]=5;
}
elseif ((GETPOST('ajoutcases') || GETPOST('ajoutcases_x')) && $_SESSION["nbrecaseshoraires"] == 5)
elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5)
{
$_SESSION["nbrecaseshoraires"]=10;
}
@ -115,14 +222,14 @@ if (! isset($_SESSION['mois'])) $_SESSION['mois']= date('n');
if (! isset($_SESSION['annee'])) $_SESSION['annee']= date('Y');
//mise a jour des valeurs de session si bouton retour a aujourd'hui
if ((!issetAndNoEmpty('anneeavant_x') && !issetAndNoEmpty('anneeapres_x') && !issetAndNoEmpty('moisavant_x') && !issetAndNoEmpty('moisapres_x') && !issetAndNoEmpty('choixjourajout')) && !issetAndNoEmpty('choixjourretrait') || (issetAndNoEmpty('retourmois') || issetAndNoEmpty('retourmois_x'))){
if ((!issetAndNoEmpty('choixjourajout')) && !issetAndNoEmpty('choixjourretrait') || issetAndNoEmpty('retourmois')){
$_SESSION["jour"]=date("j");
$_SESSION["mois"]=date("n");
$_SESSION["annee"]=date("Y");
}
//mise a jour des valeurs de session si mois avant
if (issetAndNoEmpty('moisavant') || issetAndNoEmpty('moisavant_x')) {
if (issetAndNoEmpty('moisavant')) {
if ($_SESSION["mois"] == 1) {
$_SESSION["mois"] = 12;
$_SESSION["annee"] = $_SESSION["annee"]-1;
@ -144,7 +251,7 @@ if (issetAndNoEmpty('moisavant') || issetAndNoEmpty('moisavant_x')) {
}
//mise a jour des valeurs de session si mois apres
if (issetAndNoEmpty('moisapres') || issetAndNoEmpty('moisapres_x')) {
if (issetAndNoEmpty('moisapres')) {
if ($_SESSION["mois"] == 12) {
$_SESSION["mois"] = 1;
$_SESSION["annee"] += 1;
@ -167,7 +274,7 @@ if (issetAndNoEmpty('moisapres') || issetAndNoEmpty('moisapres_x')) {
}
//mise a jour des valeurs de session si annee avant
if (issetAndNoEmpty('anneeavant') || issetAndNoEmpty('anneeavant_x')) {
if (issetAndNoEmpty('anneeavant')) {
$_SESSION["annee"] -= 1;
//On sauvegarde les heures deja entrées
@ -184,7 +291,7 @@ if (issetAndNoEmpty('anneeavant') || issetAndNoEmpty('anneeavant_x')) {
}
//mise a jour des valeurs de session si annee apres
if (issetAndNoEmpty('anneeapres') || issetAndNoEmpty('anneeapres_x')) {
if (issetAndNoEmpty('anneeapres')) {
$_SESSION["annee"] += 1;
//On sauvegarde les heures deja entrées
@ -204,10 +311,6 @@ if (issetAndNoEmpty('anneeapres') || issetAndNoEmpty('anneeapres_x')) {
$nbrejourmois = date("t", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee"]));
$premierjourmois = date("N", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee"])) - 1;
//le format du sondage est DATE
$_SESSION["formatsondage"] = "D";
$_SESSION["formatcanedit"] = $_SESSION["canedit"];
//traduction de la valeur du mois
if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13)
{
@ -220,10 +323,9 @@ else
//Debut du formulaire et bandeaux de tete
print '<form name="formulaire" action="choix_date.php" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
print '<input type="hidden" name="origin" value="'.dol_escape_htmltag($origin).'">';
print '<form name="formulaire" action="" method="POST">'."\n";
print '<div class="bandeautitre">'. $langs->trans("CreatePoll")." (2 / 2)" .'</div>'."\n";
print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)');
//affichage de l'aide pour les jours
print '<div class="bodydate">'."\n";
@ -233,11 +335,11 @@ print '</div>'."\n";
//debut du tableau qui affiche le calendrier
print '<center><div class="corps">'."\n";
print '<table align=center>'."\n";
print '<tr><td><input type="image" name="anneeavant" value="<<" src="images/rewind.png"></td><td><input type="image" name="moisavant" value="<" src="images/previous.png"></td>';
print '<tr><td><input type="image" name="anneeavant" value="<<" src="../img/rewind.png"></td><td><input type="image" name="moisavant" value="<" src="../img/previous.png"></td>';
print '<td width="150px" align="center"> '.$motmois.' '.$_SESSION["annee"].'<br>';
print '<input type="image" name="retourmois" alt="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" title="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" value="" src="'.img_picto('', 'refresh','',0,1).'">';
print '</td><td><input type="image" name="moisapres" value=">" src="images/next.png"></td>';
print '<td><input type="image" name="anneeapres" value=">>" src="images/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td>';
print '</td><td><input type="image" name="moisapres" value=">" src="../img/next.png"></td>';
print '<td><input type="image" name="anneeapres" value=">>" src="../img/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td>';
print '</td></tr>'."\n";
print '</table>'."\n";
print '<table>'."\n";
@ -385,117 +487,14 @@ print '</tr>'."\n";
print '</table>'."\n";
print '</div></center>'."\n";
//traitement de l'entrée des heures dans les cases texte
$errheure = $erreur = false;
if (issetAndNoEmpty('choixheures') || issetAndNoEmpty('choixheures_x')) {
//On sauvegarde les heures deja entrées
if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true)
{
$nbofchoice=count($_SESSION["totalchoixjour"]);
for ($i = 0; $i < $nbofchoice; $i++) {
//affichage des 5 cases horaires
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
$_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j];
}
}
}
//affichage des horaires
if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true)
{
$nbofchoice=count($_SESSION["totalchoixjour"]);
for ($i = 0; $i < $nbofchoice; $i++) {
//affichage des 5 cases horaires
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
$case = $j + 1;
if (isset($_POST['horaires'.$i]) === false || isset($_POST['horaires'.$i][$j]) === false) {
$errheure[$i][$j]=true;
$erreur=true;
$_SESSION["horaires$i"][$j]=$_POST["horaires$i"][$j];
continue;
}
//si c'est un creneau type 8:00-11:00
if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $_POST["horaires$i"][$j], $creneaux)) {
//on recupere les deux parties du preg_match qu'on redécoupe autour des ":"
$debutcreneau=explode(":", $creneaux[1]);
$fincreneau=explode(":", $creneaux[2]);
//comparaison des heures de fin et de debut
//si correctes, on entre les données dans la variables de session
if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) {
$_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $_POST["horaires$i"][$j], $creneaux)) { //si c'est un creneau type 8h00-11h00
//on recupere les deux parties du preg_match qu'on redécoupe autour des "H"
$debutcreneau=preg_split("/h/i", $creneaux[1]);
$fincreneau=preg_split("/h/i", $creneaux[2]);
//comparaison des heures de fin et de debut
//si correctes, on entre les données dans la variables de session
if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) {
$_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure simple type 8:00
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < 24 && $heures[2] < 60) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure encore plus simple type 8h
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < 24 && $heures[2] < 60) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau simple type 8-11
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau H type 8h-11h
//si valeures correctes, on entre les données dans la variables de session
if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) {
$_SESSION["horaires$i"][$j] = $heures[0];
} else { //sinon message d'erreur et nettoyage de la case
$errheure[$i][$j]=true;
$erreur=true;
}
} elseif ($_POST["horaires$i"][$j]=="") { //Si la case est vide
unset($_SESSION["horaires$i"][$j]);
} else { //pour tout autre format, message d'erreur
//$errheure[$i][$j]=true;
//$erreur=true;
$_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j];
}
}
}
}
}
print '<div class="bodydate"><center>'."\n";
// affichage de tous les jours choisis
if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheures_x') || $erreur))
//if (1==1 || GETPOST($_SESSION['totalchoixjour']) && (! GETPOST('choixheures_x') || $erreur))
if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur)
{
//affichage des jours
print '<br>'."\n";
print '<strong>'. $langs->trans("SelectedDays") .' :</strong>'."<br>\n";
print '<strong>'. $langs->trans("SelectedDays") .':</strong>'."<br>\n";
print $langs->trans("SelectDayDesc")."<br>\n";
print '<table>'."\n";
print '<tr>'."\n";
@ -507,44 +506,29 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur
}
if ($_SESSION["nbrecaseshoraires"] < 10) {
print '<td classe="somme"><input type="image" name="ajoutcases" src="images/add-16.png"></td>'."\n";
print '<td classe="somme"><input type="image" name="ajoutcases" src="../img/add-16.png"></td>'."\n";
}
print '</tr>'."\n";
//affichage de la liste des jours choisis
$nbofchoice=count($_SESSION["totalchoixjour"]);
for ($i=0; $i<$nbofchoice; $i++)
{
print '<tr>'."\n";
print '<td>'.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' ('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')</td>';
$affichageerreurfindeligne=false;
//affichage des cases d'horaires
for ($j=0;$j<$_SESSION["nbrecaseshoraires"];$j++) {
//si on voit une erreur, le fond de la case est rouge
if (isset($errheure[$i][$j]) && $errheure[$i][$j]) {
print '<td><input type=text size="10" maxlength="11" name=horaires'.$i.'[] value="'.$_SESSION["horaires$i"][$j].'" style="background-color:#FF6666;"></td>'."\n";
$affichageerreurfindeligne=true;
} else { //sinon la case est vide normalement
if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) {
if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) {
$_SESSION["horaires$i"][$j] = '';
} else {
$_SESSION["horaires$i"] = array();
$_SESSION["horaires$i"][$j] = '';
}
}
print '<td><input type=text size="10" maxlength="11" name=horaires'.$i.'[] value="'.$_SESSION["horaires$i"][$j].'"></td>'."\n";
}
}
if ($affichageerreurfindeligne) {
print '<td><b><font color=#FF0000>'. _("Bad format!") .'</font></b></td>'."\n";
}
print '</tr>'."\n";
}
@ -555,33 +539,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur
print '<tr>'."\n";
print '<td><input type="submit" class="button" name="reset" value="'. dol_escape_htmltag($langs->trans("RemoveAllDays")) .'"></td><td><input type="submit" class="button" name="reporterhoraires" value="'. dol_escape_htmltag($langs->trans("CopyHoursOfFirstDay")) .'"></td><td><input type="submit" class="button" name="resethoraires" value="'. dol_escape_htmltag($langs->trans("RemoveAllHours")) .'"></td></tr>'."\n";
print'<tr><td colspan="3"><br><br></td></tr>'."\n";
print '<tr><td colspan="3" align="center"><input type="submit" class="button" name="choixheures" value="'. $langs->trans("NextStep"). '"></td></tr>'."\n";
print '</table>'."\n";
//si un seul jour et aucunes horaires choisies, : message d'erreur
if ((GETPOST('choixheures') || GETPOST('choixheures_x')) && (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="")) {
print '<table><tr><td colspan=3><font color=#FF0000>'. _("Enter more choices for the voters") .'</font><br></td></tr></table>'."\n";
$erreur=true;
}
}
//s'il n'y a pas d'erreur et que le bouton de creation est activé, on demande confirmation
if (!$erreur && (GETPOST('choixheures') || GETPOST('choixheures_x'))) {
$taille_tableau=count($_SESSION["totalchoixjour"])-1;
$jour_arret = $_SESSION["totalchoixjour"][$taille_tableau]+200000;
$date_fin=dol_print_date($jour_arret, 'dayhourtext');
print '<br><div class="presentationdatefin">'. $langs->trans("PollWillExpire",2) .'</td></tr><tr><td><br>'. $langs->trans("RemovalDate") .' : <b> '.$date_fin.'</b><br>'."\n";
print '</div>'."\n";
print '<div class="presentationdatefin">'."\n";
print '<font color="#FF0000">'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll. <br>Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'</font>'."\n";
print'</div>'."\n";
// print'<p class=affichageexport>'."\n";
// print 'Pour finir la cr&eacute;ation du sondage, cliquez sur le bouton <img src="images/add-16.png" alt="ajout"> ci-dessous'."\n";
// print '</p>'."\n";
print '<table>'."\n";
print '<tr><td>'. $langs->trans("BackToHoursSetup") .'</td><td></td><td><input type="image" name="retourhoraires" src="images/back-32.png"></td></tr>'."\n";
print'<tr><td>'. $langs->trans("CreatePoll") .'</td><td></td><td><input type="image" name="confirmation" value="Valider la cr&eacute;ation" src="images/add.png"></td></tr>'."\n";
print '<tr><td colspan="3" align="center"><input type="submit" class="button" name="confirmation" value="'. $langs->trans("CreatePoll"). '"></td></tr>'."\n";
print '</table>'."\n";
}
@ -594,7 +552,7 @@ print '</form>'."\n";
print '<br><br><br><br>'."\n";
print '</center></div>'."\n";
llxFooterSurvey();
llxFooter();
$db->close();
?>

View File

@ -0,0 +1,205 @@
<?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 <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/opensurvey/wizard/create_survey.php
* \ingroup opensurvey
* \brief Page to create a new survey
*/
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$langs->load("opensurvey");
// On teste toutes les variables pour supprimer l'ensemble des warnings PHP
// On transforme en entites html les données afin éviter les failles XSS
$post_var = array('titre', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre');
foreach ($post_var as $var)
{
$$var = GETPOST($var);
}
// On initialise egalement la session car sinon bonjour les warning :-)
$session_var = array('titre', 'commentaires', 'mailsonde');
foreach ($session_var as $var)
{
if (isset($_SESSION[$var])) $_SESSION[$var] = null;
}
// On initialise également les autres variables
$cocheplus = '';
$cochemail = '';
// Jump to correct page
if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre"))
{
$_SESSION["titre"] = $titre;
$_SESSION["commentaires"] = $commentaires;
if (GETPOST('mailsonde') == 'on') {
$_SESSION["mailsonde"] = true;
} else {
$_SESSION["mailsonde"] = false;
}
if (GETPOST('allow_comments') == 'on') {
$_SESSION['allow_comments'] = true;
} else {
$_SESSION['allow_comments'] = false;
}
if (GETPOST('allow_spy') == 'on') {
$_SESSION['allow_spy'] = true;
} else {
$_SESSION['allow_spy'] = false;
}
$testdate = false;
if (GETPOST('champdatefin'))
{
$registredate=explode("/",$_POST["champdatefin"]);
if (is_array($registredate) && count($registredate) === 3) {
$time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
if ($time !== false && date('d/m/Y', $time) === $_POST["champdatefin"]) {
//Expire date is not before today
if ($time - dol_now() > 0) {
$testdate = true;
$_SESSION['champdatefin'] = $time;
}
}
}
}
if (!$testdate) {
setEventMessage($langs->trans('ErrorOpenSurveyDateFormat'), 'errors');
}
if ($titre && $testdate)
{
if (! empty($creation_sondage_date))
{
header("Location: choix_date.php");
exit();
}
if (! empty($creation_sondage_autre))
{
header("Location: choix_autre.php");
exit();
}
}
}
/*
* View
*/
$form = new Form($db);
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeader('', $langs->trans("OpenSurvey"), '', "", 0, 0, $arrayofjs, $arrayofcss);
print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)');
//debut du formulaire
print '<form name="formulaire" action="" method="POST">'."\n";
//Affichage des différents champs textes a remplir
print '<table class="border" width="100%">'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("PollTitle") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.$_SESSION["titre"].'"></td>'."\n";
if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre')))
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PollTitle")), 'errors');
}
print '</tr>'."\n";
print '<tr><td>'. $langs->trans("Description") .'</td><td><textarea name="commentaires" rows="7" cols="40">'.$_SESSION["commentaires"].'</textarea></td>'."\n";
print '</tr>'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("ExpireDate") .'</td><td>';
if (!GETPOST('champdatefin')) {
//172800 = 48 hours
$champdatefin = time() + 172800;
} else {
$champdatefin = -1;
}
print $form->select_date($champdatefin,'champdatefin','','','',"add",1,0);
print '</tr>'."\n";
print '</table>'."\n";
//focus javascript sur le premier champ
print '<script type="text/javascript">'."\n";
print 'document.formulaire.titre.focus();'."\n";
print '</script>'."\n";
print '<br>'."\n";
// Check or not
if ($_SESSION["mailsonde"]) $cochemail="checked";
print '<input type="checkbox" name="mailsonde" '.$cochemail.'> '. $langs->trans("ToReceiveEMailForEachVote") .'<br>'."\n";
if ($_SESSION['allow_comments']) $allow_comments = "checked";
print '<input type="checkbox" name="allow_comments" '.$allow_comments.'> '.$langs->trans('CanComment').'<br />'."\n";
if ($_SESSION['allow_spy']) $allow_spy = "checked";
print '<input type="checkbox" name="allow_spy" '.$allow_spy.'> '.$langs->trans('CanSeeOthersVote').'<br />'."\n";
if (GETPOST('choix_sondage'))
{
if (GETPOST('choix_sondage') == 'date') print '<input type="hidden" name="creation_sondage_date" value="date">';
else print '<input type="hidden" name="creation_sondage_autre" value="autre">';
print '<input type="hidden" name="choix_sondage" value="'.GETPOST('choix_sondage').'">';
print '<br><input type="submit" class="button" name="submit" value="'.$langs->trans("CreatePoll").' ('.(GETPOST('choix_sondage') == 'date'?$langs->trans("TypeDate"):$langs->trans("TypeClassic")).')">';
}
else
{
//affichage des boutons pour choisir sondage date ou autre
print '<br><table>'."\n";
print '<tr><td>'. $langs->trans("CreateSurveyDate") .'</td><td></td> '."\n";
print '<td><input type="image" name="creation_sondage_date" value="'.$langs->trans('CreateSurveyDate').'" src="../img/calendar-32.png"></td></tr>'."\n";
print '<tr><td>'. $langs->trans("CreateSurveyStandard") .'</td><td></td> '."\n";
print '<td><input type="image" name="creation_sondage_autre" value="'.$langs->trans('CreateSurveyStandard').'" src="../img/chart-32.png"></td></tr>'."\n";
print '</table>'."\n";
}
print '<br><br><br>'."\n";
print '</form>'."\n";
llxFooter();
$db->close();
?>

View File

@ -1,5 +1,6 @@
<?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
@ -21,44 +22,38 @@
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require_once('../../main.inc.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php");
$origin=GETPOST('origin','alpha');
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
$langs->load("opensurvey");
/*
* View
*/
$arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css');
llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss);
llxHeader('', $langs->trans("OpenSurvey"), '', "", 0, 0, $arrayofjs, $arrayofcss);
print_fiche_titre($langs->trans("CreatePoll"));
print '<center>
<form name="formulaire" action="create_survey.php" method="POST">
<input type="hidden" name="origin" value="'.dol_escape_htmltag($origin).'">
<div id="interface-header" style="">
<p id="application-description" class="pp-gris-fonce2">'.$langs->trans("OpenSurveyDesc").' '.$langs->trans("OpenSurveyNoRegistration").'</p>
</div><br>';
print $langs->trans("OrganizeYourMeetingEasily").'
<form name="formulaire" action="create_survey.php" method="POST">';
print '<p>'.$langs->trans("OrganizeYourMeetingEasily").'</p>
<div class="corps">
<br>
<div class="index_date"><div><img class="opacity" src="images/date.png" onclick="document.formulaire.date.click()"></div><button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded"><img src="images/calendar-32.png" alt=""><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</strong></button></div>
<div class="index_sondage"><div><img class="opacity" src="images/sondage2.png" onclick="document.formulaire.autre.click()"></div><button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded"><img src="images/chart-32.png" alt=""><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</strong></button></div><div style="clear:both;"></div>
<div class="index_date"><div><img class="opacity" src="../img/date.png" onclick="document.formulaire.date.click()"></div><button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded"><img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'"><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</strong></button></div>
<div class="index_sondage"><div><img class="opacity" src="../img/sondage2.png" onclick="document.formulaire.autre.click()"></div><button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded"><img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'"><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</strong></button></div><div style="clear:both;"></div>
</div>
</form></center>';
llxFooterSurvey();
llxFooter();
$db->close();
?>