diff --git a/COPYRIGHT b/COPYRIGHT index db0cb532478d3..799e49cd60b59 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -50,6 +50,9 @@ http://www.fsf.org/licensing/licenses/index_html Copyright --------- +Copyright (C) 2014 +- Marcos García + Copyright (C) 2013 - Christophe Battarel - Laurent Destailleur diff --git a/ChangeLog b/ChangeLog index 55e398c9bd928..e76e259c9b6a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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: diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index deeb34caa666e..224798a2fd2ee 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -134,6 +134,7 @@ function __construct($db) // '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 diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 34c3e90e54def..6743d415ff14f 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ function __construct($db) //$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 @@ function __construct($db) $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 @@ function __construct($db) $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 @@ function __construct($db) '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 @@ function __construct($db) '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++; diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 53d6198a84939..4e0b0192d7958 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -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; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql index 3bf5771811e45..ec10e64ac07ad 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql @@ -15,5 +15,4 @@ -- along with this program. If not, see . -- ============================================================================ -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); diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index f66fbcf5e795f..a8ee5031dc546 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -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; \ No newline at end of file diff --git a/htdocs/langs/ar_SA/opensurvey.lang b/htdocs/langs/ar_SA/opensurvey.lang index b51aaef6ac1a9..109ed7caf2821 100644 --- a/htdocs/langs/ar_SA/opensurvey.lang +++ b/htdocs/langs/ar_SA/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/bg_BG/opensurvey.lang b/htdocs/langs/bg_BG/opensurvey.lang index 2c7ca69a5937e..0cccd93ec2899 100644 --- a/htdocs/langs/bg_BG/opensurvey.lang +++ b/htdocs/langs/bg_BG/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/ca_ES/opensurvey.lang b/htdocs/langs/ca_ES/opensurvey.lang index 5efed00a27747..e00fb8efc9d3f 100644 --- a/htdocs/langs/ca_ES/opensurvey.lang +++ b/htdocs/langs/ca_ES/opensurvey.lang @@ -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.
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 %s no existeix. OpenSurveyNothingToSetup=No hi ha una configuració específica que fer. PollWillExpire=La seva enquesta expirarà automàticament %s 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:
- buit,
- "8h", "8H" o "8:00" per proporcionar una hora d'inici de la reunió,
- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" per proporcionar una hora d'inici i de fi de la reunió,
- "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 diff --git a/htdocs/langs/cs_CZ/opensurvey.lang b/htdocs/langs/cs_CZ/opensurvey.lang index e7f5271a36764..450c28d030647 100644 --- a/htdocs/langs/cs_CZ/opensurvey.lang +++ b/htdocs/langs/cs_CZ/opensurvey.lang @@ -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í.
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í %s neexistuje. OpenSurveyNothingToSetup=Neexistuje žádné specifické nastavení dělat. PollWillExpire=Váš průzkum skončí automaticky %s 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:
- Prázdné,
- "8h", "8H" nebo "8:00" dát schůzku v úvodní hodinu,
- "8-11", "8h-11h", "8H-11H" nebo "08:00-11:00" dát schůzku je začátek a konec hodiny,
- "8h15-11h15", "8H15-11h15" nebo "08:15-11:15" 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 diff --git a/htdocs/langs/da_DK/opensurvey.lang b/htdocs/langs/da_DK/opensurvey.lang index c4433d302a4f6..febbb811efbde 100644 --- a/htdocs/langs/da_DK/opensurvey.lang +++ b/htdocs/langs/da_DK/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/de_DE/opensurvey.lang b/htdocs/langs/de_DE/opensurvey.lang index cea800aa7ad9e..d77dae1b03f81 100644 --- a/htdocs/langs/de_DE/opensurvey.lang +++ b/htdocs/langs/de_DE/opensurvey.lang @@ -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.
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 %s existiert nicht. OpenSurveyNothingToSetup=Es gibt nichts Spezielles zu konfigurieren. PollWillExpire=Deine Abstimmung endet automatisch nach %s 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:
- leer,
- "8h", "8H" oder "8:00" für eine Besprechungs-Startzeit,
- "8-11", "8h-11h", "8H-11H" oder "8:00-11:00" für eine Besprechungs-Start und -Endzeit,
- "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 diff --git a/htdocs/langs/el_GR/opensurvey.lang b/htdocs/langs/el_GR/opensurvey.lang index c07d6c55970a3..0ffe017538464 100644 --- a/htdocs/langs/el_GR/opensurvey.lang +++ b/htdocs/langs/el_GR/opensurvey.lang @@ -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=Αφού έχετε επιβεβαιώσει τη δημιουργία της δημοσκόπησης σας, θα μεταφερθείτε αυτόματα στη σελίδα της δημοσκόπησης σας.
Θα πρέπει επίσης να λάβετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου με το σύνδεσμο στο δικό σας δημοψήφισμα για την αποστολή τους στους ψηφοφόρους. ExportSpreadsheet=Εξαγωγή αποτελεσμάτων σε υπολογιστικό φύλλο ExpireDate=Όριο ημερομηνίας NbOfVoters=Αριθμός ψηφοφόρων @@ -57,7 +52,6 @@ VoteNameAlreadyExists=Το όνομα αυτό χρησιμοποιείται ή ErrorPollDoesNotExists=Σφάλμα, δημοσκόπησης %s δεν υπάρχει. OpenSurveyNothingToSetup=Δεν υπάρχει συγκεκριμένη ρύθμιση να κάνετε. PollWillExpire=Δημοσκόπηση σας θα λήξει αυτόματα %s ημέρες μετά την τελευταία ημέρα της δημοσκόπησης σας. -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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Πίσω στον τρέχοντα μήνα -PublicLinkToCreateSurvey=Κοινόχρηστους σύνδεσμος για να επιτρέπει σε όλους να δημιουργούν μια έρευνα diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index ac4d439a208dd..0fec31bebdd89 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -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 : %s, but need at least one: llave,valores ErrorFieldCanNotContainSpecialCharacters=Field %s 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 %s 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 \ No newline at end of file diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 1e1900296dddc..a7b865454c6dd 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -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.
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 %s does not exists. OpenSurveyNothingToSetup=There is no specific setup to do. PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 \ No newline at end of file diff --git a/htdocs/langs/es_ES/opensurvey.lang b/htdocs/langs/es_ES/opensurvey.lang index 454fcbd45b496..b0c2806f262e4 100644 --- a/htdocs/langs/es_ES/opensurvey.lang +++ b/htdocs/langs/es_ES/opensurvey.lang @@ -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.
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 %s no existe. OpenSurveyNothingToSetup=No hay una configuración específica que hacer. PollWillExpire=Su encuesta expirará automáticamente %s 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:
- vacío,
- "8h", "8H" o "8:00" para proporcionar una hora de inicio de la reunión,
- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" para proporcionar una hora de inicio y de fin de la reunión,
- "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 diff --git a/htdocs/langs/et_EE/opensurvey.lang b/htdocs/langs/et_EE/opensurvey.lang index 3d7177305e181..4beac93c76695 100644 --- a/htdocs/langs/et_EE/opensurvey.lang +++ b/htdocs/langs/et_EE/opensurvey.lang @@ -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.
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 %s ei ole OpenSurveyNothingToSetup=Pole erilist seadistust, mida teha. PollWillExpire=Sinu küsitlus aegub automaatselt %s 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::
- tühi,
- "8h", "8H" või "8:00" kohtumise alustamise kellaajaks,
- "8-11", "8h-11h", "8H-11H" või "8:00-11:00" kohtumise alustamise ja lõpu kellaajaks,
- "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 diff --git a/htdocs/langs/fa_IR/opensurvey.lang b/htdocs/langs/fa_IR/opensurvey.lang index b51aaef6ac1a9..109ed7caf2821 100644 --- a/htdocs/langs/fa_IR/opensurvey.lang +++ b/htdocs/langs/fa_IR/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/fi_FI/opensurvey.lang b/htdocs/langs/fi_FI/opensurvey.lang index ef9cf6c9d7842..6cfaf5b49703b 100644 --- a/htdocs/langs/fi_FI/opensurvey.lang +++ b/htdocs/langs/fi_FI/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 19565c5226509..93cc778adcd36 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -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.
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 %s n'existe pas. OpenSurveyNothingToSetup=Aucune configuration particulière n'est requise. PollWillExpire=Ce sondage expirera automatiquement %s 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 :
- laisser vide,
- "8h", "8H" ou "8:00" pour définir uniquement une heure de début,
- "8-11", "8h-11h", "8H-11H" ou "8:00-11:00" pour définir une heure de début et de fin,
- "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 diff --git a/htdocs/langs/he_IL/opensurvey.lang b/htdocs/langs/he_IL/opensurvey.lang index 409a43f09cf5c..5b437693696b2 100644 --- a/htdocs/langs/he_IL/opensurvey.lang +++ b/htdocs/langs/he_IL/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/hu_HU/opensurvey.lang b/htdocs/langs/hu_HU/opensurvey.lang index 83389798df460..b6d41207ec6e7 100644 --- a/htdocs/langs/hu_HU/opensurvey.lang +++ b/htdocs/langs/hu_HU/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/is_IS/opensurvey.lang b/htdocs/langs/is_IS/opensurvey.lang index 42b395a7616e7..1d4f44ab5505d 100644 --- a/htdocs/langs/is_IS/opensurvey.lang +++ b/htdocs/langs/is_IS/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/it_IT/opensurvey.lang b/htdocs/langs/it_IT/opensurvey.lang index aa587bc00fbb6..eb05f88aa99f4 100644 --- a/htdocs/langs/it_IT/opensurvey.lang +++ b/htdocs/langs/it_IT/opensurvey.lang @@ -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.
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 %snon esiste. OpenSurveyNothingToSetup=Non ci sono configurazioni da fare. PollWillExpire=Il sondaggio scadrà automaticamente%sgiorni 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:
-vuoto,
-"8h", "8H" o "8:00"per definire un orario di inizio,
-"8-11", "8h-11h", "8H-11H" o "8:00-11:00" per fornire un orario di inizio e fine,
- "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 diff --git a/htdocs/langs/ja_JP/opensurvey.lang b/htdocs/langs/ja_JP/opensurvey.lang index bc15d390aed27..af5612cb9745e 100644 --- a/htdocs/langs/ja_JP/opensurvey.lang +++ b/htdocs/langs/ja_JP/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/ko_KR/opensurvey.lang b/htdocs/langs/ko_KR/opensurvey.lang index 409a43f09cf5c..5b437693696b2 100644 --- a/htdocs/langs/ko_KR/opensurvey.lang +++ b/htdocs/langs/ko_KR/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/lv_LV/opensurvey.lang b/htdocs/langs/lv_LV/opensurvey.lang index d50ec464b142f..464856c10c519 100644 --- a/htdocs/langs/lv_LV/opensurvey.lang +++ b/htdocs/langs/lv_LV/opensurvey.lang @@ -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ā.
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 %s neeksistē. OpenSurveyNothingToSetup=Nav īpašas uzstādīšanas darīt. PollWillExpire=Jūsu aptauja beigsies automātiski %s 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ā:
- Tukša,
- "8h", "8H" vai "08:00", lai sniegtu tikšanos s starta stundu,
- "8-11", "8h-11h", "8H-11H" vai "8:00-11:00", lai sniegtu sanāksmi sākuma un beigu stundu,
- "8h15-11h15", "8H15-11H15" vai "8:15-11:15" par to pašu, bet ar minūtes. BackToCurrentMonth=Atpakaļ uz tekošā mēneša -PublicLinkToCreateSurvey=Sabiedrības saites, lai ļautu ikvienam izveidot aptauju diff --git a/htdocs/langs/nb_NO/opensurvey.lang b/htdocs/langs/nb_NO/opensurvey.lang index 6f5416b45ec59..daecee4ffd155 100644 --- a/htdocs/langs/nb_NO/opensurvey.lang +++ b/htdocs/langs/nb_NO/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/nl_NL/opensurvey.lang b/htdocs/langs/nl_NL/opensurvey.lang index 324cacea4dc9a..aa84c1516f33c 100644 --- a/htdocs/langs/nl_NL/opensurvey.lang +++ b/htdocs/langs/nl_NL/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/pl_PL/opensurvey.lang b/htdocs/langs/pl_PL/opensurvey.lang index 34c13419d06b8..6ea6a71026810 100644 --- a/htdocs/langs/pl_PL/opensurvey.lang +++ b/htdocs/langs/pl_PL/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/pt_BR/opensurvey.lang b/htdocs/langs/pt_BR/opensurvey.lang index 8dcae1a6640cf..042fd02327c00 100644 --- a/htdocs/langs/pt_BR/opensurvey.lang +++ b/htdocs/langs/pt_BR/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/pt_PT/opensurvey.lang b/htdocs/langs/pt_PT/opensurvey.lang index 214d6b2f581e9..66f13a080960a 100644 --- a/htdocs/langs/pt_PT/opensurvey.lang +++ b/htdocs/langs/pt_PT/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/ro_RO/opensurvey.lang b/htdocs/langs/ro_RO/opensurvey.lang index c3a83fe6e7aab..735f9feb322de 100644 --- a/htdocs/langs/ro_RO/opensurvey.lang +++ b/htdocs/langs/ro_RO/opensurvey.lang @@ -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.
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 %s nu există. OpenSurveyNothingToSetup=Nu există setări specifice de făcut. PollWillExpire=Sondajul dvs. va expira în mod automat în % s 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:
- gol,
- "8h", "8H" or "8:00" pentru a da ora de start a întâlnirii,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" pentru a da startul și ora finală,
- ""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 diff --git a/htdocs/langs/ru_RU/opensurvey.lang b/htdocs/langs/ru_RU/opensurvey.lang index 2124efd63cec6..28e64b72c7eaa 100644 --- a/htdocs/langs/ru_RU/opensurvey.lang +++ b/htdocs/langs/ru_RU/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/sk_SK/opensurvey.lang b/htdocs/langs/sk_SK/opensurvey.lang index fe26c643c5545..3938e4a8b4de5 100644 --- a/htdocs/langs/sk_SK/opensurvey.lang +++ b/htdocs/langs/sk_SK/opensurvey.lang @@ -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.
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 %s neexistuje. OpenSurveyNothingToSetup=Neexistuje žiadne špecifické nastavenia robiť. PollWillExpire=Váš prieskum skončí automaticky %s 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:
- Prázdne,
- "8h", "8H" alebo "8:00" dať schôdzku v úvodnej hodinu,
- "8-11", "8h-11h", "8H-11H" alebo "08:00-11:00" dať schôdzku je začiatok a koniec hodiny,
- "8h15-11h15", "8H15-11h15" alebo "08:15-11:15" to isté, ale v minútach. BackToCurrentMonth=Späť na aktuálny mesiac -PublicLinkToCreateSurvey=Verejné odkaz dovoliť každý vytvoriť prieskum diff --git a/htdocs/langs/sl_SI/opensurvey.lang b/htdocs/langs/sl_SI/opensurvey.lang index a985d34ebbaa1..33411fbeacd99 100644 --- a/htdocs/langs/sl_SI/opensurvey.lang +++ b/htdocs/langs/sl_SI/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/sv_SE/opensurvey.lang b/htdocs/langs/sv_SE/opensurvey.lang index 982dddf9b533e..31cbcaf29dbb3 100644 --- a/htdocs/langs/sv_SE/opensurvey.lang +++ b/htdocs/langs/sv_SE/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/tr_TR/opensurvey.lang b/htdocs/langs/tr_TR/opensurvey.lang index e16a96fb10bca..0aceb11e1db3c 100644 --- a/htdocs/langs/tr_TR/opensurvey.lang +++ b/htdocs/langs/tr_TR/opensurvey.lang @@ -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.
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 %s mevcut değil. OpenSurveyNothingToSetup=Yapılacak özel ayar yok. PollWillExpire=Anketiniz, son tarihinden %s 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 :
- boş,
- "8h", "8H" or "8:00" toplantı başlama saatleri için,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" ttoplantı başlama ve bitiş saatleri için,
- "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ı diff --git a/htdocs/langs/uz_UZ/opensurvey.lang b/htdocs/langs/uz_UZ/opensurvey.lang index 409a43f09cf5c..5b437693696b2 100644 --- a/htdocs/langs/uz_UZ/opensurvey.lang +++ b/htdocs/langs/uz_UZ/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/vi_VN/opensurvey.lang b/htdocs/langs/vi_VN/opensurvey.lang index 409a43f09cf5c..5b437693696b2 100644 --- a/htdocs/langs/vi_VN/opensurvey.lang +++ b/htdocs/langs/vi_VN/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/zh_CN/opensurvey.lang b/htdocs/langs/zh_CN/opensurvey.lang index e48fcc63432b2..613f1869ca705 100644 --- a/htdocs/langs/zh_CN/opensurvey.lang +++ b/htdocs/langs/zh_CN/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/langs/zh_TW/opensurvey.lang b/htdocs/langs/zh_TW/opensurvey.lang index 5c35deb600482..0b0b7e0adf273 100644 --- a/htdocs/langs/zh_TW/opensurvey.lang +++ b/htdocs/langs/zh_TW/opensurvey.lang @@ -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.
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 %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s 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 :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "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 diff --git a/htdocs/opensurvey/admin/index.php b/htdocs/opensurvey/admin/index.php deleted file mode 100644 index d22c3f03cde8c..0000000000000 --- a/htdocs/opensurvey/admin/index.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * 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 . - */ - -/** - * \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=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("OpenSurveyArea"),$linkback,'setup'); -print '
'; - -echo $langs->trans("OpenSurveyNothingToSetup").'

'."\n"; - -// Link -print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':
'; - -// 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=''.$url.''; -print $urllink; - - -llxFooter(); - -$db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/card.php similarity index 55% rename from htdocs/opensurvey/adminstuds.php rename to htdocs/opensurvey/card.php index 39d804ee578ff..7bd3471c82567 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/card.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ // 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 @@ // 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 @@ // Update if ($action == 'update') { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); + $error=0; if (! GETPOST('nouveautitre')) @@ -81,20 +85,15 @@ $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 @@ $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 @@ $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 @@ * 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("°","'",$toutsujet); -print '
'."\n"; +print ''."\n"; print ''; -$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 @@ // Ref print ''.$langs->trans('Ref').''; print ''; -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 ''; print ''; // Type -$type=($object->format=="A"||$object->format=="A+")?'classic':'date'; +$type=($object->format=="A")?'classic':'date'; print ''.$langs->trans("Type").''; 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").''; @@ -219,42 +211,76 @@ print $langs->trans("Title") .''; if ($action == 'edit') { - print ''; + print ''; } -else print $object->titre; +else print dol_htmlentities($object->titre); print ''; -// Auteur +// Author print ''; print $langs->trans("Author") .''; -print $object->nom_admin; +if ($object->fk_user_creat) { + print $userstatic->getLoginUrl(1); +} else { + print dol_htmlentities($object->nom_admin); +} print ''; // Description print ''.$langs->trans("Description") .''; if ($action == 'edit') { - print ''."\n"; + print ''."\n"; } -else print dol_nl2br($object->commentaires); +else print dol_nl2br(dol_htmlentities($object->commentaires)); print ''; // EMail -print ''.$langs->trans("EMail") .''; +//If linked user, then emails are going to be sent to users' email +if (!$object->fk_user_creat) { + print ''.$langs->trans("EMail") .''; + if ($action == 'edit') + { + print ''; + } + else print dol_print_email($object->mail_admin); + print ''; +} + +// Receive an email with each vote +print ''.$langs->trans('ToReceiveEMailForEachVote').''; if ($action == 'edit') { - print ''; + print '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 ''; -// Can edit other votes -print ''.$langs->trans('CanEditVotes').''; +// Users can comment +print ''.$langs->trans('CanComment').''; if ($action == 'edit') { - print 'canedit?' checked="true"':'').'">'; + print 'allow_comments?' checked="true"':'').'">'; } -else print yn($object->canedit); +else print yn($object->allow_comments); +print ''; + +// Users can see others vote +print ''.$langs->trans('CanSeeOthersVote').''; +if ($action == 'edit') +{ + print 'allow_spy?' checked="true"':'').'">'; +} +else print yn($object->allow_spy); print ''; // Expire date @@ -272,7 +298,7 @@ $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=''.$url.''; print $urllink; @@ -290,15 +316,20 @@ */ print '
'; -if ($action != 'edit') print ''.$langs->trans("Modify") . ''; +if ($action != 'edit' && $user->rights->opensurvey->write) { + + //Modify button + print ''.$langs->trans("Modify") . ''; -if ($action != 'edit') print ''.$langs->trans('Delete').''; + //Delete button + print ''.$langs->trans('Delete').''; +} print '
'; 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_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 ' '.img_picto('', 'delete.png').' '; - print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; - $i++; +$comments = $object->getComments(); + +if ($comments) { + foreach ($comments as $comment) { + if ($user->rights->opensurvey->write) { + print ' '.img_picto('', 'delete.png').' '; + } + + print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))."
"; } } else @@ -336,12 +361,14 @@ print '
'; // Add comment -print $langs->trans("AddACommentForPoll") . '
'; -print '
'."\n"; -print $langs->trans("Name") .' :
'."\n"; -print '
'."\n"; -if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") { - print "" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . ""; +if ($object->allow_comments) { + print $langs->trans("AddACommentForPoll") . '
'; + print '
'."\n"; + print $langs->trans("Name") .':
'."\n"; + print '
'."\n"; + if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") { + print "" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . ""; + } } print '
'; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index cde370edd03c2..862381d232256 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ function __construct($db) */ 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 @@ function create($user, $notrigger=0) $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 @@ function create($user, $notrigger=0) 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 @@ function create($user, $notrigger=0) */ 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 @@ function fetch($id,$numsurvey='') { $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 @@ function update($user=0, $notrigger=0) $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 @@ function update($user=0, $notrigger=0) $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 @@ function update($user=0, $notrigger=0) * * @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 @@ function delete($user, $notrigger, $numsondageadmin) $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 @@ function fetch_lines() 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 @@ function initAsSpecimen() $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); + } } ?> diff --git a/htdocs/opensurvey/public/exportcsv.php b/htdocs/opensurvey/exportcsv.php similarity index 81% rename from htdocs/opensurvey/public/exportcsv.php rename to htdocs/opensurvey/exportcsv.php index 5fded4f5d32f1..ec48b65ce1778 100644 --- a/htdocs/opensurvey/public/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ $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 { diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 9dcc398fa3ada..c3c80a59b8605 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 ''; @@ -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&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); - } - elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode($mysoc->logo); - $width=128; + if ($mysoc->logo) { + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file=thumbs/'.urlencode($mysoc->logo_small); + } } - 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 '
'; - print 'Logo
'; - print ''.$langs->trans("OpenSurvey").''; - print '

'; + + print '
Logo
'; + print '
'; } @@ -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; - ?> diff --git a/htdocs/opensurvey/img/accept-32.png b/htdocs/opensurvey/img/accept-32.png deleted file mode 100755 index c94c066edee91..0000000000000 Binary files a/htdocs/opensurvey/img/accept-32.png and /dev/null differ diff --git a/htdocs/opensurvey/img/add.png b/htdocs/opensurvey/img/add.png deleted file mode 100755 index 7409ef332d243..0000000000000 Binary files a/htdocs/opensurvey/img/add.png and /dev/null differ diff --git a/htdocs/opensurvey/img/back-32.png b/htdocs/opensurvey/img/back-32.png deleted file mode 100755 index b44fbb2385acd..0000000000000 Binary files a/htdocs/opensurvey/img/back-32.png and /dev/null differ diff --git a/htdocs/opensurvey/img/csv.png b/htdocs/opensurvey/img/csv.png deleted file mode 100755 index f90ef25ec7f1c..0000000000000 Binary files a/htdocs/opensurvey/img/csv.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/date.png b/htdocs/opensurvey/img/date.png similarity index 100% rename from htdocs/opensurvey/public/images/date.png rename to htdocs/opensurvey/img/date.png diff --git a/htdocs/opensurvey/img/ical.png b/htdocs/opensurvey/img/ical.png deleted file mode 100755 index b092a75b6da3e..0000000000000 Binary files a/htdocs/opensurvey/img/ical.png and /dev/null differ diff --git a/htdocs/opensurvey/img/info.png b/htdocs/opensurvey/img/info.png deleted file mode 100755 index 4c665a4f0a106..0000000000000 Binary files a/htdocs/opensurvey/img/info.png and /dev/null differ diff --git a/htdocs/opensurvey/img/next-32.png b/htdocs/opensurvey/img/next-32.png deleted file mode 100755 index 934a254f307b0..0000000000000 Binary files a/htdocs/opensurvey/img/next-32.png and /dev/null differ diff --git a/htdocs/opensurvey/img/opensurvey_logo.png b/htdocs/opensurvey/img/opensurvey_logo.png deleted file mode 100644 index eb266ae05cf56..0000000000000 Binary files a/htdocs/opensurvey/img/opensurvey_logo.png and /dev/null differ diff --git a/htdocs/opensurvey/img/reload.png b/htdocs/opensurvey/img/reload.png deleted file mode 100755 index 9a2b2e82d3657..0000000000000 Binary files a/htdocs/opensurvey/img/reload.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/sondage2.png b/htdocs/opensurvey/img/sondage2.png similarity index 100% rename from htdocs/opensurvey/public/images/sondage2.png rename to htdocs/opensurvey/img/sondage2.png diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index a7f88631dd8c1..0f809f8e52fa3 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -25,7 +25,8 @@ 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 @@ echo $langs->trans("NoSurveysInDatabase",$nbsondages).'

'."\n"; - -// Link -print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':
'; - -// 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=''.$url.''; -print $urllink; - - - llxFooter(); $db->close(); diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 908a01db8fd25..a9b36ca7a1c77 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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(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 @@ $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_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 ''."\n"; -print ''."\n"; +print ''."\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 @@ $var=!$var; print ''; print ''; + print ''; print ''; print''."\n"; - print ''."\n"; print ''."\n"; $i++; diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php deleted file mode 100644 index e120bd7ec2061..0000000000000 --- a/htdocs/opensurvey/public/choix_autre.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * 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 . - */ - -/** - * \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 '
'."\n"; -print ''; - -print '
'. $langs->trans("CreatePoll")." (2 / 2)" .'
'."\n"; - -print '
'."\n"; -print '
'. $langs->trans("PollOnChoice") .'

'."\n"; -print '
'. $langs->trans("Survey").''. $langs->trans("Type") .''. $langs->trans("Title") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .'
'; - print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; - print ''; - $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; + print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; + print ''.dol_htmlentities($obj->titre).''; + $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 ''.$obj->titre.''.$obj->nom_admin.''; + + // 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 ''.dol_print_date($db->jdate($obj->date_fin),'day'); if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); } print ''.$nbuser.''.img_picto('', 'delete.png').'
'."\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 ''."\n"; -} - -print '
'. $langs->trans("TitleChoice") .' '.$j.' : '; - $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); - print '   '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); - print '
'."\n"; - -//ajout de cases supplementaires -print ''."\n"; -print ''."\n"; -print '
'. $langs->trans("5MoreChoices") .'
'."\n"; -print'
'."\n"; - -print ''."\n"; -print ''."\n"; -print '
'."\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 "
" . $langs->trans("Enter at least one choice") . "

"."\n"; - $erreur = true; -} - -//message d'erreur si mauvaise date -if ($testdate === false) { - print "
" . _("Date must be have the format DD/MM/YYYY") . "

"."\n"; -} - -if ($erreur_injection) { - print "" . _("Characters \" < and > are not permitted") . "

\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 '
'."\n"; - print '
'."\n"; - print '
'. _("Your poll will be automatically removed after 6 months.
You can fix another removal date for it.") .'

'."\n"; - print _("Removal date (optional)") .' : '. _("(DD/MM/YYYY)") ."\n"; - print '
'."\n"; - print '
'."\n"; - print ''. $langs->trans("InfoAfterCreate") .''."\n"; - print '
'."\n"; - print '
'."\n"; - print ''."\n"; - print ''."\n"; - print '
'. $langs->trans("CreatePoll") .'
'."\n"; -} - -//fin du formulaire et bandeau de pied -print ''."\n"; - - -print ''."\n"; -print '


'."\n"; -print ''."\n"; - -llxFooterSurvey(); - -$db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php deleted file mode 100644 index f601602144ce3..0000000000000 --- a/htdocs/opensurvey/public/create_survey.php +++ /dev/null @@ -1,197 +0,0 @@ - - * - * 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 . - */ - -/** - * \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 '
'. $langs->trans("CreatePoll").' (1 / 2)' .'
'."\n"; - - -//debut du formulaire -print '
'."\n"; -print ''; - -print '
'."\n"; -print '
'. $langs->trans("YouAreInPollCreateArea") .'

'."\n"; - -//Affichage des différents champs textes a remplir -print ''."\n"; - -print ''."\n"; -if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) -{ - print ""."\n"; -} - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; - -if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) -{ - print ""."\n"; -} - -print ''."\n"; -print ''."\n"; - -if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) -{ - print ""."\n"; -} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) -{ - print ""."\n"; -} - -print ''."\n"; -print '
'. $langs->trans("PollTitle") .'" . $langs->trans("FieldMandatory") . "
'. $langs->trans("Description") .'
'. $langs->trans("OpenSurveyYourName") .''; - -print '" . $langs->trans("FieldMandatory") . "
'. $langs->trans("OpenSurveyYourEMail") .''; - -print '" .$langs->trans("FieldMandatory") . " " . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . "
'."\n"; - -//focus javascript sur le premier champ -print ''."\n"; - -print '
'."\n"; - -// Check or not -$cocheplus=''; -if ($_SESSION["canedit"]) $cocheplus="checked"; - -print ' '. $langs->trans("VotersCanModify") .'
'."\n"; - -if ($_SESSION["mailsonde"]) $cochemail="checked"; - -print ' '. $langs->trans("ToReceiveEMailForEachVote") .'
'."\n"; - -if (GETPOST('choix_sondage')) -{ - if (GETPOST('choix_sondage') == 'date') print ''; - else print ''; - print ''; - print '
trans("TypeDate"):$langs->trans("TypeClassic")).')">'; -} -else -{ - //affichage des boutons pour choisir sondage date ou autre - print '
'."\n"; - print ' '."\n"; - print ''."\n"; - print ' '."\n"; - print ''."\n"; - print '
'. _("Schedule an event") .'
'. _("Make a choice") .'
'."\n"; -} -print '


'."\n"; -print '
'."\n"; -print '
'."\n"; - -llxFooterSurvey(); - -$db->close(); -?> diff --git a/htdocs/opensurvey/public/images/accept-24.png b/htdocs/opensurvey/public/images/accept-24.png deleted file mode 100755 index 65ca043ee1262..0000000000000 Binary files a/htdocs/opensurvey/public/images/accept-24.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/accept-32.png b/htdocs/opensurvey/public/images/accept-32.png deleted file mode 100755 index c94c066edee91..0000000000000 Binary files a/htdocs/opensurvey/public/images/accept-32.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/accept.png b/htdocs/opensurvey/public/images/accept.png deleted file mode 100755 index ada57a9ae60eb..0000000000000 Binary files a/htdocs/opensurvey/public/images/accept.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/add-16.png b/htdocs/opensurvey/public/images/add-16.png deleted file mode 100755 index 23d5bed776023..0000000000000 Binary files a/htdocs/opensurvey/public/images/add-16.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/add-24.png b/htdocs/opensurvey/public/images/add-24.png deleted file mode 100755 index c63af7f39062a..0000000000000 Binary files a/htdocs/opensurvey/public/images/add-24.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/add.png b/htdocs/opensurvey/public/images/add.png deleted file mode 100755 index 7409ef332d243..0000000000000 Binary files a/htdocs/opensurvey/public/images/add.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/back-32.png b/htdocs/opensurvey/public/images/back-32.png deleted file mode 100755 index b44fbb2385acd..0000000000000 Binary files a/htdocs/opensurvey/public/images/back-32.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/calendar-32.png b/htdocs/opensurvey/public/images/calendar-32.png deleted file mode 100644 index 89761150635ad..0000000000000 Binary files a/htdocs/opensurvey/public/images/calendar-32.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/cancel.png b/htdocs/opensurvey/public/images/cancel.png deleted file mode 100755 index c149c2bc017d5..0000000000000 Binary files a/htdocs/opensurvey/public/images/cancel.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/chart-32.png b/htdocs/opensurvey/public/images/chart-32.png deleted file mode 100644 index 1406b8da933f7..0000000000000 Binary files a/htdocs/opensurvey/public/images/chart-32.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/csv.png b/htdocs/opensurvey/public/images/csv.png deleted file mode 100755 index f90ef25ec7f1c..0000000000000 Binary files a/htdocs/opensurvey/public/images/csv.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/fforward.png b/htdocs/opensurvey/public/images/fforward.png deleted file mode 100755 index 369084cdf149b..0000000000000 Binary files a/htdocs/opensurvey/public/images/fforward.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/ical.png b/htdocs/opensurvey/public/images/ical.png deleted file mode 100755 index b092a75b6da3e..0000000000000 Binary files a/htdocs/opensurvey/public/images/ical.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/info.png b/htdocs/opensurvey/public/images/info.png deleted file mode 100755 index 4c665a4f0a106..0000000000000 Binary files a/htdocs/opensurvey/public/images/info.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/logo_uds_bandeau.gif b/htdocs/opensurvey/public/images/logo_uds_bandeau.gif deleted file mode 100755 index 3132c13a75a91..0000000000000 Binary files a/htdocs/opensurvey/public/images/logo_uds_bandeau.gif and /dev/null differ diff --git a/htdocs/opensurvey/public/images/logo_uds_lettre.jpg b/htdocs/opensurvey/public/images/logo_uds_lettre.jpg deleted file mode 100755 index d8a31692e0e86..0000000000000 Binary files a/htdocs/opensurvey/public/images/logo_uds_lettre.jpg and /dev/null differ diff --git a/htdocs/opensurvey/public/images/medaille.png b/htdocs/opensurvey/public/images/medaille.png deleted file mode 100755 index 97a22b72eea2e..0000000000000 Binary files a/htdocs/opensurvey/public/images/medaille.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/next-32.png b/htdocs/opensurvey/public/images/next-32.png deleted file mode 100755 index 934a254f307b0..0000000000000 Binary files a/htdocs/opensurvey/public/images/next-32.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/next.png b/htdocs/opensurvey/public/images/next.png deleted file mode 100755 index 24d94e830a331..0000000000000 Binary files a/htdocs/opensurvey/public/images/next.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/previous.png b/htdocs/opensurvey/public/images/previous.png deleted file mode 100755 index b4b79aeec517f..0000000000000 Binary files a/htdocs/opensurvey/public/images/previous.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/reload.png b/htdocs/opensurvey/public/images/reload.png deleted file mode 100755 index 9a2b2e82d3657..0000000000000 Binary files a/htdocs/opensurvey/public/images/reload.png and /dev/null differ diff --git a/htdocs/opensurvey/public/images/rewind.png b/htdocs/opensurvey/public/images/rewind.png deleted file mode 100755 index 99ed78c3c915e..0000000000000 Binary files a/htdocs/opensurvey/public/images/rewind.png and /dev/null differ diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 62e78f172ee47..3467988f99a47 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ // 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 @@ $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 @@ // Add comment if (GETPOST('ajoutcomment')) { + if (!$canbemodified) accessforbidden(); + $error=0; if (! GETPOST('comment')) @@ -83,17 +80,17 @@ $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 @@ $_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 @@ } else { - $err |= NAME_EMPTY; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors'); } } @@ -200,6 +204,8 @@ $nouveauchoix.="0"; } } + + if (!$canbemodified) accessforbidden(); $idtomodify=$_POST["idtomodify".$modifier]; $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs"; @@ -215,8 +221,9 @@ $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 @@ */ $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 @@ //affichage du titre du sondage $titre=str_replace("\\","",$object->titre); -print ''.$titre.'
'."\n"; - -//affichage du nom de l'auteur du sondage -print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'
'."\n"; +print ''.dol_htmlentities($titre).'
'."\n"; //affichage des commentaires du sondage if ($object->commentaires) { - print '
'.$langs->trans("Description") .' :
'."\n"; - $commentaires=dol_nl2br($object->commentaires); + $commentaires=dol_nl2br(dol_htmlentities($object->commentaires)); print $commentaires; print '
'."\n"; } print ''."\n"; -print '
'."\n"; +//The survey has expired, users can't vote or do any action +if (!$canbemodified) { + + print '

'.$langs->trans('SurveyExpiredInfo').'

'; + llxFooterSurvey(); + + $db->close(); + die; +} + +print ''."\n"; print ''; print '
'."\n"; @@ -285,7 +289,7 @@ print ''."\n"; // Show choice titles -if ($object->format=="D"||$object->format=="D+") +if ($object->format=="D") { //affichage des sujets du sondage print ''."\n"; @@ -358,7 +362,7 @@ for ($i=0; isset($toutsujet[$i]); $i++) { $heures=explode('@',$toutsujet[$i]); if (isset($heures[1])) { - print ''."\n"; + print ''."\n"; } else { print ''."\n"; } @@ -404,14 +408,18 @@ $ensemblereponses = $obj->reponses; - print ''."\n"; - // ligne d'un usager pré-authentifié - $mod_ok = ($object->canedit || (! empty($nombase) && in_array($nombase, $listofvoters))); + $mod_ok = (in_array($obj->nom, $listofvoters)); + + if (!$mod_ok && !$object->allow_spy) { + $compteur++; + continue; + } + + print ''."\n"; // Name - $nombase=str_replace("°","'",$obj->nom); - print ''."\n"; + print ''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -565,7 +573,7 @@ if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) { print ''."\n"; -print ''."\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 ''."\n"; -} -print ''; -// Show picto winner -if ($nbofcheckbox >= 2) -{ +if ($object->allow_spy) { + // Show line total print ''."\n"; - print ''."\n"; - for ($i=0; $i < $nbcolonnes; $i++) + print ''."\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 ''."\n"; + } + print ''; + // Show picto winner + if ($nbofcheckbox >= 2) { - //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 ''."\n"; + print ''."\n"; + for ($i=0; $i < $nbcolonnes; $i++) { - print ''."\n"; - } else { - print ''."\n"; + //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 ''."\n"; + } else { + print ''."\n"; + } } + print ''."\n"; } - print ''."\n"; } print '
'.$heures[1].''.dol_htmlentities($heures[1]).'
'.$nombase.''.dol_htmlentities($obj->nom).''. $langs->trans("Total") .''; - 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.'
'.$langs->trans("No").': '.$showsumagainst; - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'
'.$langs->trans("Against").': '.$showsumagainst; - print '
'. $langs->trans("Total") .''; + 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.'
'.$langs->trans("No").': '.$showsumagainst; + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'
'.$langs->trans("Against").': '.$showsumagainst; + print '
'."\n"; print '
'."\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]); } - } - else - { - $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= $tmps[0]; - } - $compteursujet++; + $compteursujet++; + } } -} -$meilleursujet=substr("$meilleursujet", 1); -$meilleursujet = str_replace("°", "'", $meilleursujet); + $meilleursujet=substr("$meilleursujet", 1); + $meilleursujet = str_replace("°", "'", $meilleursujet); -// Show best choice -if ($nbofcheckbox >= 2) -{ - $vote_str = $langs->trans('votes'); - print '

'."\n"; + // Show best choice + if ($nbofcheckbox >= 2) + { + $vote_str = $langs->trans('votes'); + print '

'."\n"; - if (isset($meilleurecolonne) && $compteursujet == "1") { - print ' ' . $langs->trans('TheBestChoice') . ": $meilleursujet " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; - } elseif (isset($meilleurecolonne)) { - print ' ' . $langs->trans('TheBestChoices') . ": $meilleursujet " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; - } + if (isset($meilleurecolonne) && $compteursujet == "1") { + print ' ' . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + } elseif (isset($meilleurecolonne)) { + print ' ' . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + } - print '


'."\n"; + print '


'."\n"; + } } print '
'; // 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 "
" . $langs->trans("CommentsOfVoters") . " :
\n"; - while ( $i < $num_rows) - { - $obj=$db->fetch_object($resql); + print "
" . $langs->trans("CommentsOfVoters") . ":
\n"; + + foreach ($comments as $obj) { print '
'; if (in_array($obj->usercomment, $listofvoters)) print ' '.img_picto('', 'delete.png').' '; - print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; - $i++; + print dol_htmlentities($obj->usercomment).': '.dol_nl2br(dol_htmlentities($obj->comment)).""; } } // Form to add comment -print '
' .$langs->trans("AddACommentForPoll") . "
\n"; +if ($object->allow_comments) { + print '
' .$langs->trans("AddACommentForPoll") . "
\n"; -print '
'."\n"; -print $langs->trans("Name") .' : '; -print '   '."\n"; -print '
'."\n"; -print ''."\n"; + print '
'."\n"; + print $langs->trans("Name") .': '; + print '   '."\n"; + print '
'."\n"; + print ''."\n"; -print '
'."\n"; // div add comment + print '
'."\n"; // div add comment +} print '

'; -/* -// 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=''.$url.''; -$message.=img_picto('','object_globe.png').' '.$langs->trans("UrlForSurvey").': '.$urlvcal; - -print '
'.$message.'
'; -*/ - - print ''."\n"; llxFooterSurvey(); diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/results.php similarity index 80% rename from htdocs/opensurvey/adminstuds_preview.php rename to htdocs/opensurvey/results.php index 62fbadda1acdd..365ea3cd9e350 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/results.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ // 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 @@ * 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 @@ } 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 @@ } // 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 @@ 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 @@ 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 @@ // 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 @@ // 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 @@ $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("°","'",$toutsujet); -print '
'."\n"; +print ''."\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 @@ // Ref print ''.$langs->trans('Ref').''; print ''; -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 ''; print ''; // Type -$type=($object->format=="A"||$object->format=="A+")?'classic':'date'; +$type=($object->format=="A")?'classic':'date'; print ''.$langs->trans("Type").''; 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").''; @@ -459,42 +464,42 @@ print ''; - -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 ''."\n"; - print ''; + print ''."\n"; print ''; print '
'."\n"; print "

"."\n"; // Add new column - if ($object->format=="A"||$object->format=="A+") + if ($object->format=="A") { - print $langs->trans("AddNewColumn") .' :

'; + print $langs->trans("AddNewColumn") .':

'; print $langs->trans("Title").'
'; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'

'; print ''; print '     '; - print ''; + print ''; print '

'."\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.
If you just want to add a new hour to an existant date, put the same date and choose a new hour.") .'

'."\n"; - print $langs->trans("AddADate") .' :

'."\n"; + print $langs->trans("AddADate") .':

'."\n"; print ''."\n"; - print ''."\n"; - + print $formother->select_month('', 'nouveaumois', 1); + + print ' '; + + print $formother->select_year('', 'nouvelleannee', 1, 0, 5, 0, 1); - print ''."\n"; - print '

'. $langs->trans("AddStartHour") .' :

'."\n"; + print '

'. $langs->trans("AddStartHour") .':

'."\n"; print ''."\n"; - print '

'. $langs->trans("AddEndHour") .' :

'."\n"; + print '

'. $langs->trans("AddEndHour") .':

'."\n"; print ''; +print ''."\n"; print '
'."\n"; -print '
'."\n"; // Start to show survey result print ''."\n"; @@ -604,15 +577,18 @@ print ''."\n"; //boucle pour l'affichage des boutons de suppression de colonne -for ($i = 0; isset($toutsujet[$i]); $i++) { - print ''."\n"; +if ($user->rights->opensurvey->write) { + for ($i = 0; isset($toutsujet[$i]); $i++) { + + print ''."\n"; + } } print ''."\n"; // Show choice titles -if ($object->format=="D"||$object->format=="D+") +if ($object->format=="D") { //affichage des sujets du sondage print ''."\n"; @@ -644,7 +620,11 @@ } } - print ''."\n"; + if ($user->rights->opensurvey->write) { + print ''."\n"; + } + print ''."\n"; print ''."\n"; print ''."\n"; @@ -670,7 +650,10 @@ } } - print ''."\n"; + if ($user->rights->opensurvey->write) { + print ''."\n"; + } + print ''."\n"; print ''."\n"; print ''."\n"; @@ -694,7 +677,9 @@ } } - print ''."\n"; + if ($user->rights->opensurvey->write) { + print ''."\n"; + } print ''."\n"; //affichage des horaires @@ -706,13 +691,16 @@ for ($i = 0; isset($toutsujet[$i]); $i++) { $heures=explode('@', $toutsujet[$i]); if (isset($heures[1])) { - print ''."\n"; + print ''."\n"; } else { print ''."\n"; } } - print ''."\n"; + if ($user->rights->opensurvey->write) { + print ''."\n"; + } + print ''."\n"; } } @@ -726,10 +714,10 @@ for ($i = 0; isset($toutsujet[$i]); $i++) { $tmp=explode('@',$toutsujet[$i]); - print ''."\n"; + print ''."\n"; } - print ''."\n"; + print ''."\n"; print ''."\n"; } @@ -755,12 +743,14 @@ $ensemblereponses = $obj->reponses; - print ''."\n"; - print ''."\n"; - + print ''."\n"; + print ''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -870,7 +860,7 @@ } // Button edit at end of line - if ($compteur != $ligneamodifier) + if ($compteur != $ligneamodifier && ($user->rights->opensurvey->write)) { print ''."\n"; } @@ -909,7 +899,7 @@ if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) { print ''."\n"; - print "'."\n"; +if (isset($_POST["boutonp"]) && $_POST["nom"] == "") { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors'); } if (isset($erreur_prenom) && $erreur_prenom) { - print ''."\n"; - print "\n"; - print ''."\n"; -} - -if (isset($erreur_injection) && $erreur_injection) { - print ''."\n"; - print "\n"; - print ''."\n"; + setEventMessage($langs->trans('VoteNameAlreadyExists'), 'errors'); } if (isset($erreur_ajout_date) && $erreur_ajout_date) { - print ''."\n"; - print "\n"; - print ''."\n"; + setEventMessage($langs->trans("ErrorWrongDate"), 'errors'); } //fin du tableau @@ -1026,7 +1004,7 @@ 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 @@ else { $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= $tmps[0]; + $meilleursujet .= dol_htmlentities($tmps[0]); } $compteursujet++; @@ -1056,9 +1034,9 @@ print '

'."\n"; if (isset($meilleurecolonne) && $compteursujet == "1") { - print " " . $langs->trans('TheBestChoice') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } elseif (isset($meilleurecolonne)) { - print " " . $langs->trans('TheBestChoices') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } print '


'."\n"; } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php new file mode 100644 index 0000000000000..c00ddf3838489 --- /dev/null +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -0,0 +1,164 @@ + + * Copyright (C) 2014 Marcos García + * + * 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 . + */ + +/** + * \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 ''."\n"; + +print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); + + +print '
'. $langs->trans("PollOnChoice") .'

'."\n"; + +print '
'."\n"; +print '
id_sondage_admin.'">'.$langs->trans("Add").''; + print 'id_sondage.'">'.$langs->trans("Add").'
id_sondage_admin.'">'.$langs->trans("Add").'id_sondage.'">'.$langs->trans("Add").'
id_sondage_admin.'">'.$langs->trans("Add").'id_sondage.'">'.$langs->trans("Add").'
'.$heures[1].''.dol_htmlentities($heures[1]).'id_sondage_admin.'">'.$langs->trans("Add").'id_sondage.'">'.$langs->trans("Add").'
'.$tmp[0].''.dol_htmlentities($tmp[0]).''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).'
'."\n"; + + if ($user->rights->opensurvey->write) { + print ''."\n"; + } + // Name - $nombase=str_replace("°","'",$obj->nom); - print ''.$nombase.''.dol_htmlentities($obj->nom).'" . _("Enter a name !") . "\n"; - print '
" . _("The name you've chosen already exist in this poll!") . "
" . _("Characters \" ' < et > are not permitted") . "
" . _("The date is not correct !") . "
'."\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 ''."\n"; +} + +print '
'. $langs->trans("TitleChoice") .' '.$j.': '; + $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); + print '   '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); + print '
'."\n"; + +//ajout de cases supplementaires +print ''."\n"; +print ''."\n"; +print '
'. $langs->trans("5MoreChoices") .'
'."\n"; +print'
'."\n"; + +print ''."\n"; +print ''."\n"; +print '
'."\n"; + +//fin du formulaire et bandeau de pied +print ''."\n"; + + +print ''."\n"; +print '


'."\n"; +print '
'."\n"; + +llxFooter(); + +$db->close(); +?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php similarity index 77% rename from htdocs/opensurvey/public/choix_date.php rename to htdocs/opensurvey/wizard/choix_date.php index f651a91899d31..3de7d10f8a175 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 (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 @@ * 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['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 @@ } //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 @@ } //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 @@ } //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 @@ $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 @@ //Debut du formulaire et bandeaux de tete -print '
'."\n"; -print ''; +print ''."\n"; -print '
'. $langs->trans("CreatePoll")." (2 / 2)" .'
'."\n"; +print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); //affichage de l'aide pour les jours print '
'."\n"; @@ -233,11 +335,11 @@ //debut du tableau qui affiche le calendrier print '
'."\n"; print ''."\n"; -print ''; +print ''; print ''; -print ''; +print ''."\n"; print '
'.$motmois.' '.$_SESSION["annee"].'
'; print ''; -print '
'; +print ''; print '
'."\n"; print ''."\n"; @@ -385,117 +487,14 @@ print '
'."\n"; print '
'."\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 '
'."\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 '
'."\n"; - print ''. $langs->trans("SelectedDays") .' :'."
\n"; + print ''. $langs->trans("SelectedDays") .':'."
\n"; print $langs->trans("SelectDayDesc")."
\n"; print ''."\n"; print ''."\n"; @@ -507,44 +506,29 @@ } if ($_SESSION["nbrecaseshoraires"] < 10) { - print ''."\n"; + print ''."\n"; } print ''."\n"; //affichage de la liste des jours choisis $nbofchoice=count($_SESSION["totalchoixjour"]); + for ($i=0; $i<$nbofchoice; $i++) { print ''."\n"; print ''; - $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 ''."\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 ''."\n"; } } - - if ($affichageerreurfindeligne) { - print ''."\n"; - } - print ''."\n"; } @@ -555,33 +539,7 @@ print ''."\n"; print ''."\n"; print''."\n"; - print ''."\n"; - print '
'.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' ('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')'. _("Bad format!") .'


'."\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 '
'. _("Enter more choices for the voters") .'
'."\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 '
'. $langs->trans("PollWillExpire",2) .'
'. $langs->trans("RemovalDate") .' : '.$date_fin.'
'."\n"; - print '
'."\n"; - print '
'."\n"; - print ''. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'
'."\n"; - print'
'."\n"; - // print'

'."\n"; - // print 'Pour finir la création du sondage, cliquez sur le bouton ajout ci-dessous'."\n"; - // print '

'."\n"; - print ''."\n"; - print ''."\n"; - print''."\n"; + print ''."\n"; print '
'. $langs->trans("BackToHoursSetup") .'
'. $langs->trans("CreatePoll") .'
'."\n"; } @@ -594,7 +552,7 @@ print '



'."\n"; print '
'."\n"; -llxFooterSurvey(); +llxFooter(); $db->close(); ?> \ No newline at end of file diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php new file mode 100644 index 0000000000000..26411fa18b5c6 --- /dev/null +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -0,0 +1,205 @@ + + * Copyright (C) 2014 Marcos García + * + * 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 . + */ + +/** + * \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 ''."\n"; + +//Affichage des différents champs textes a remplir +print ''."\n"; + +print ''."\n"; +if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) +{ + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PollTitle")), 'errors'); +} + +print ''."\n"; +print ''."\n"; +print ''."\n"; + +print ''."\n"; +print '
'. $langs->trans("PollTitle") .'
'. $langs->trans("Description") .'
'. $langs->trans("ExpireDate") .''; + +if (!GETPOST('champdatefin')) { + //172800 = 48 hours + $champdatefin = time() + 172800; +} else { + $champdatefin = -1; +} + +print $form->select_date($champdatefin,'champdatefin','','','',"add",1,0); + +print '
'."\n"; + +//focus javascript sur le premier champ +print ''."\n"; + +print '
'."\n"; + +// Check or not + +if ($_SESSION["mailsonde"]) $cochemail="checked"; + +print ' '. $langs->trans("ToReceiveEMailForEachVote") .'
'."\n"; + +if ($_SESSION['allow_comments']) $allow_comments = "checked"; + +print ' '.$langs->trans('CanComment').'
'."\n"; + +if ($_SESSION['allow_spy']) $allow_spy = "checked"; + +print ' '.$langs->trans('CanSeeOthersVote').'
'."\n"; + +if (GETPOST('choix_sondage')) +{ + if (GETPOST('choix_sondage') == 'date') print ''; + else print ''; + print ''; + print '
trans("TypeDate"):$langs->trans("TypeClassic")).')">'; +} +else +{ + //affichage des boutons pour choisir sondage date ou autre + print '
'."\n"; + print ' '."\n"; + print ''."\n"; + print ' '."\n"; + print ''."\n"; + print '
'. $langs->trans("CreateSurveyDate") .'
'. $langs->trans("CreateSurveyStandard") .'
'."\n"; +} +print '


'."\n"; +print ''."\n"; + +llxFooter(); + +$db->close(); +?> diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/wizard/index.php similarity index 58% rename from htdocs/opensurvey/public/index.php rename to htdocs/opensurvey/wizard/index.php index 2c78a86cb9d9a..87852231f807b 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 '
-
- -
-

'.$langs->trans("OpenSurveyDesc").' '.$langs->trans("OpenSurveyNoRegistration").'

-

'; -print $langs->trans("OrganizeYourMeetingEasily").' +'; +print '

'.$langs->trans("OrganizeYourMeetingEasily").'


-
-
+
+
'; -llxFooterSurvey(); +llxFooter(); $db->close(); ?>