This commit is contained in:
Phyks 2014-08-31 14:27:57 +02:00
parent 498f20c97f
commit 6ea3c55ea7
34 changed files with 330 additions and 973 deletions

View File

@ -14,16 +14,19 @@ $i18n['balance'] = 'Balance';
$i18n['home_table_caption'] = 'Read <em>line</em> owes <em>case</em> € to column. You can click on links to confirm the payback.'; $i18n['home_table_caption'] = 'Read <em>line</em> owes <em>case</em> € to column. You can click on links to confirm the payback.';
$i18n['owes'] = 'Owes'; $i18n['owes'] = 'Owes';
$i18n['to'] = 'To'; $i18n['to'] = 'To';
$i18n['detailed_list_bills'] = 'Detailed list of bills for last month'; $i18n['detailed_list_bills'] = 'Detailed list of bills';
$i18n['for_last_month'] = 'for last month';
$i18n['display_all_bills'] = 'Display all bills'; $i18n['display_all_bills'] = 'Display all bills';
$i18n['only_last_month_bills'] = 'Display only last month bills';
$i18n['no_bills'] = 'No bills added yet'; $i18n['no_bills'] = 'No bills added yet';
$i18n['expense'] = 'Expense'; $i18n['expense'] = 'Expense';
$i18n['what'] = 'What'; $i18n['what'] = 'What';
$i18n['amount'] = 'Montant'; $i18n['amount'] = 'Amount';
$i18n['date'] = 'Date'; $i18n['date'] = 'Date';
$i18n['users_in'] = 'Users in'; $i18n['users_in'] = 'Users in';
$i18n['and'] = 'and'; $i18n['and'] = 'and';
$i18n['guest'] = 'guest'; $i18n['guest'] = 'guest';
$i18n['guests'] = 'guests';
$i18n['add'] = 'Add'; $i18n['add'] = 'Add';
$i18n['edit_password'] = 'Edit your password'; $i18n['edit_password'] = 'Edit your password';
$i18n['new_password'] = 'New password'; $i18n['new_password'] = 'New password';
@ -35,8 +38,10 @@ $i18n['notif_global_paybacks'] = 'global paybacks only';
$i18n['nothing'] = 'nothing'; $i18n['nothing'] = 'nothing';
$i18n['note_dont_edit_passwords'] = "Leave blank the password fields if you don't want to edit the password."; $i18n['note_dont_edit_passwords'] = "Leave blank the password fields if you don't want to edit the password.";
$i18n['update'] = 'Update'; $i18n['update'] = 'Update';
$i18n['personal_token_user'] = 'Personal token for this user';
$i18n['personal_token_title'] = 'Your personal token to use the API'; $i18n['personal_token_title'] = 'Your personal token to use the API';
$i18n['personal_token_is'] = 'Your personal token to use the API is'; $i18n['personal_token_is'] = 'Your personal token to use the API is';
$i18n['personal_token_user_is'] = 'The personal token for this user to be used with the API is';
$i18n['compromised_token'] = 'If you think it might be compromised, you can'; $i18n['compromised_token'] = 'If you think it might be compromised, you can';
$i18n['generate_new_one'] = 'generate a new one'; $i18n['generate_new_one'] = 'generate a new one';
$i18n['global_paybacks_list'] = 'Global paybacks list'; $i18n['global_paybacks_list'] = 'Global paybacks list';
@ -62,7 +67,7 @@ $i18n['mysql_password'] = 'MySQL password';
$i18n['note'] = 'Note'; $i18n['note'] = 'Note';
$i18n['mysql_password_note'] = "Leave the above field blank if you don't want to change your password."; $i18n['mysql_password_note'] = "Leave the above field blank if you don't want to change your password.";
$i18n['mysql_db'] = 'MySQL database to use'; $i18n['mysql_db'] = 'MySQL database to use';
$i18n['mysql_db_note'] = 'You must create this database first.'; $i18n['mysql_db_note'] = 'You <em>must</em> create this database first.';
$i18n['mysql_prefix'] = 'Prefix for the created tables'; $i18n['mysql_prefix'] = 'Prefix for the created tables';
$i18n['mysql_prefix_note'] = 'Leave the field blank to not use any. You must create the necessary tables manually.'; $i18n['mysql_prefix_note'] = 'Leave the field blank to not use any. You must create the necessary tables manually.';
$i18n['general_options'] = 'General options'; $i18n['general_options'] = 'General options';
@ -71,7 +76,51 @@ $i18n['base_url'] = 'Base URL';
$i18n['base_url_note'] = 'This is the base URL from which you access this page. You must keep the trailing "/" in the above address.'; $i18n['base_url_note'] = 'This is the base URL from which you access this page. You must keep the trailing "/" in the above address.';
$i18n['currency'] = 'Currency'; $i18n['currency'] = 'Currency';
$i18n['timezone'] = 'Timezone'; $i18n['timezone'] = 'Timezone';
$i18n['timezone_doc'] = 'For example: Europe/Paris. See the doc for more info.'; $i18n['timezone_doc'] = '<em>For example:</em> Europe/Paris. See the doc for more info.';
$i18n['update_settings'] = 'Update settings';
$i18n['template'] = 'Template'; $i18n['template'] = 'Template';
$i18n['lang'] = 'Lang'; $i18n['lang'] = 'Lang';
$i18n['webmaster_email'] = "Webmaster's email"; $i18n['webmaster_email'] = "Webmaster's email";
$i18n['connected_as'] = 'Connected as';
$i18n['go_back'] = 'Go back to previous page';
$i18n['connection'] = 'Connection';
$i18n['username'] = 'Username';
$i18n['password'] = 'Password';
$i18n['toggle_visible'] = 'Toggle visible';
$i18n['remember_me'] = 'Remember me';
$i18n['connect'] = 'Connect';
$i18n['forgotten_password'] = 'Forgotten password';
$i18n['users'] = 'Users';
$i18n['you_owe_him'] = 'You owe him';
$i18n['he_owes_you'] = 'He owes you';
$i18n['paid_by'] = 'Paid by';
$i18n['confirm_payback'] = 'Confirm payback';
$i18n['remains'] = 'Remains';
$i18n['delete_payback'] = 'Delete payback';
$i18n['paid'] = 'Paid';
$i18n['users_list'] = 'List of users';
$i18n['id'] = 'Id';
$i18n['login'] = 'Login';
$i18n['a_user'] = 'a user';
$i18n['list_previous_global_paybacks'] = 'List of previous global paybacks';
$i18n['closed'] = 'Closed';
$i18n['payback'] = 'Payback';
$i18n['number'] = 'n°';
$i18n['add_global_payback'] = 'Add a global payback';
$i18n['add_global_payback_text_1'] = 'You can add a global payback using this page. Such a payback aims at minimizing as much as possible the number of individual paybacks between users. So, the index page table will be resetted and a new table will be created. This new table will be available in the "see global paybacks" page and will contain as least exchange as possible.';
$i18n['add_global_payback_text_2'] = 'For example, if a user A owes 5'.CURRENCY.' to a user B and if B owes 5'.CURRENCY.' to C, after the global paybacks, these paybacks will simplify and A will owe 5'.CURRENCY.' to C only.';
$i18n['add_global_payback_strong'] = "It's not possible to revert this operation, unless you handle the restoration of data in your database manually. Be sure you want to launch this procedure before clicking on the button below.";
$i18n['add_global_payback_note'] = "A backup of your database right now will be made and stored in the db_backup folder at the root of your instance. You'll be able to restore the current status of your database in case of error from your part.";
$i18n['select_users_global_payback'] = "If you confirm the creation of a global payback, please select right below the users you want to include in the payback.";
$i18n['users_to_include'] = 'Users to include';
$i18n['select'] = 'Select';
$i18n['nobody'] = 'Nobody';
$i18n['everybody'] = 'Everybody';
$i18n['add_global_payback_confirm'] = "You are going to add a global payback which includes the selected user. Confirm?";
$i18n['confirm'] = 'Confirm';
$i18n['a_bill'] = 'a bill';
$i18n['doesnt_exist'] = "doesn't exist";
$i18n['deleted_user'] = 'Deleted user';
$i18n['confirm_payback'] = "Are you sure you want to confirm this payback? This action can't be undone easily.";
$i18n['go_back_list_global_paybacks'] = 'Go back to global paybacks list';
$i18n['submit'] = 'Submit';

View File

@ -1,2 +1,126 @@
<?php <?php
// Provided lang = Français // Provided lang = Français
$i18n = array();
$i18n['before_double_ponctuation'] = ' ';
$i18n['add_bill'] = 'Ajouter une dépense';
$i18n['change_password'] = 'Modifier votre mot de passe';
$i18n['see_global_paybacks'] = 'Voir les remboursements globaux';
$i18n['disconnect'] = 'Se déconnecter';
$i18n['manage_global_paybacks'] = 'Gérer les remboursement globaux';
$i18n['edit_users'] = 'Modifier les utilisateurs';
$i18n['edit_homepage_notice'] = "Modifier l'annonce d'accueil";
$i18n['settings'] = 'Préférences';
$i18n['balance'] = 'Bilan';
$i18n['home_table_caption'] = 'Lire <em>ligne</em> doit <em>case</em> '.CURRENCY.' à <em>colonne</em>. Vous pouvez cliquer sur les liens pour confirmer les remboursements.';
$i18n['owes'] = 'Doit';
$i18n['to'] = 'À';
$i18n['detailed_list_bills'] = 'Liste détaillée des dépenses';
$i18n['for_last_month'] = 'du dernier mois';
$i18n['display_all_bills'] = 'Afficher toutes les dépenses';
$i18n['only_last_month_bills'] = 'Afficher uniquement les dépenses du dernier mois';
$i18n['no_bills'] = 'Aucune dépense à afficher.';
$i18n['expense'] = 'Dépense';
$i18n['what'] = 'Quoi';
$i18n['amount'] = 'Montant';
$i18n['date'] = 'Date';
$i18n['users_in'] = 'Participants';
$i18n['and'] = 'et';
$i18n['guest'] = 'invité';
$i18n['guests'] = 'invités';
$i18n['add'] = 'Ajouter';
$i18n['edit_password'] = 'Modifier votre mot de passe';
$i18n['new_password'] = 'Nouveau mot de passe';
$i18n['confirm_new_password'] = 'Confirmation';
$i18n['email_address'] = 'Adresse email';
$i18n['notifications_for'] = 'Notifications pour';
$i18n['notif_everything'] = 'tout ce qui vous concerne';
$i18n['notif_global_paybacks'] = 'seulement les remboursement globaux';
$i18n['nothing'] = 'rien';
$i18n['note_dont_edit_passwords'] = "Laisser ce champ vide pour ne pas modifier le mot de passe.";
$i18n['update'] = 'Mettre à jour';
$i18n['personal_token_user'] = "Jeton d'authentification pour l'utilisateur";
$i18n['personal_token_title'] = "Votre jeton de connexion à l'API";
$i18n['personal_token_is'] = "Votre jeton personnel de connexion à l'API est";
$i18n['personal_token_user_is'] = "Le jeton personnel d'authentification pour cet utilisateur est";
$i18n['compromised_token'] = "Si vous pensez qu'il a pu être compromis, vous pouvez";
$i18n['generate_new_one'] = 'en générer un nouveau';
$i18n['global_paybacks_list'] = 'Liste des remboursements globaux';
$i18n['no_global_payback'] = 'Aucun remboursement global disponible';
$i18n['add_global_payback'] = 'Nouveau remboursement global';
$i18n['you_can_also'] = 'Vous pouvez aussi';
$i18n['add_user'] = 'ajouter un utilisateur';
$i18n['display_name'] = 'Nom affiché';
$i18n['is_admin'] = 'Administrateur';
$i18n['edit'] = 'Modifier';
$i18n['delete'] = 'Supprimer';
$i18n['optionnal'] = 'optionnel';
$i18n['give_admin_rights'] = 'Donnr des droits administrateurs à cet utilisateur';
$i18n['yes'] = 'Oui';
$i18n['no'] = 'Non';
$i18n['homepage_notice'] = "Annonce d'accueil";
$i18n['note_use_html'] = 'Vous pouvez utiliser du HTML pour la mise en forme dans ce formulaire.';
$i18n['database'] = 'Base de données';
$i18n['settings_note'] = "Utiliser ces paramètres avec attention. Votre base de données ne sera pas mise à jour par le script, comme ce fut le cas pendant l'installation et vous devrez le faire manuellement.";
$i18n['mysql_host'] = 'Hôte MySQL';
$i18n['mysql_login'] = 'Login MySQL';
$i18n['mysql_password'] = 'Mot de passe MySQL';
$i18n['note'] = 'Note';
$i18n['mysql_password_note'] = "Laisser le champ précédent vide si vous ne souhaitez pas modifier le mot de passe.";
$i18n['mysql_db'] = 'Base de données MySQL';
$i18n['mysql_db_note'] = "Vous <em>devez</em> créer cette base de données d'abord.";
$i18n['mysql_prefix'] = 'Préfixe pour les tables';
$i18n['mysql_prefix_note'] = 'Laisse ce champ vide pour ne pas en utiliser. Vous devrez recréer les tables nécessaires manuellement.';
$i18n['general_options'] = 'Options générales';
$i18n['instance_title'] = 'Titre à afficher sur les pages';
$i18n['base_url'] = 'URL de base';
$i18n['base_url_note'] = "Cela correspond à l'URL de base à partir de laquelle vous accédez à cette page. Vous devez laisser le '/' final.";
$i18n['currency'] = 'Devise';
$i18n['timezone'] = 'Timezone';
$i18n['timezone_doc'] = '<em>Par exemple:</em> Europe/Paris. Voir la doc pour plus d\'infos.';
$i18n['update_settings'] = 'Sauvegarder';
$i18n['template'] = 'Thème';
$i18n['lang'] = 'Langue';
$i18n['webmaster_email'] = "Email du webmaster";
$i18n['connected_as'] = 'Connecté en tant que';
$i18n['go_back'] = 'Retour à la page précédente';
$i18n['connection'] = 'Connexion';
$i18n['username'] = "Nom d'utilisateur";
$i18n['password'] = 'Mot de passe';
$i18n['toggle_visible'] = 'Afficher / Masquer';
$i18n['remember_me'] = 'Se souvenir de moi';
$i18n['connect'] = 'Connexion';
$i18n['forgotten_password'] = 'Mot de passe oublié';
$i18n['users'] = 'Utilisateurs';
$i18n['you_owe_him'] = 'Vous lui devez';
$i18n['he_owes_you'] = 'Il vous doit';
$i18n['paid_by'] = 'Payé par';
$i18n['confirm_payback'] = 'Confirmer le remboursement';
$i18n['remains'] = 'Reste';
$i18n['delete_payback'] = 'Supprimer le remboursement';
$i18n['paid'] = 'Payé';
$i18n['users_list'] = 'Liste des utilisateurs';
$i18n['id'] = 'Id';
$i18n['login'] = 'Login';
$i18n['a_user'] = 'un utilisateur';
$i18n['list_previous_global_paybacks'] = 'Liste des précédents remboursements globaux';
$i18n['closed'] = 'Soldé';
$i18n['payback'] = 'Remboursement';
$i18n['number'] = 'n°';
$i18n['add_global_payback'] = 'Nouveau remboursement global';
$i18n['add_global_payback_text_1'] = "Cette page vous permet d'ajouter un remboursement global. Un tel remboursement permet de simplifier au maximum les remboursements. Ainsi, le tableau de la page d'accueil sera remis à zéro et un nouveau tableau sera créé, tableau qui simplifiera les échanges.";
$i18n['add_global_payback_text_2'] = "Par exemple, si A doit 5".CURRENCY." à B et B doit 5".CURRENCY." à C, après remboursement global, ces remboursements se simplifieront en A doit 5".CURRENCY." à C.";
$i18n['add_global_payback_strong'] = "Cette opération est irréversible sans mettre les mains dans la base de données.";
$i18n['add_global_payback_note'] = "Un backup de votre base de données à l'heure actuelle sera effectué et stocké dans le répertoire db_backups à la racine de l'instance. Vous pourrez ainsi restaurer la base de données en cas d'erreur de votre part.";
$i18n['select_users_global_payback'] = "Si vous confirmez la création d'un remboursement global, veuillez sélectionner ci-dessous les utilisateurs que vous souhaitez inclure dans le remboursement.";
$i18n['users_to_include'] = 'Utilisateurs à inclure';
$i18n['select'] = 'Sélectionner';
$i18n['nobody'] = 'Personne';
$i18n['everybody'] = 'Tout le monde';
$i18n['add_global_payback_confirm'] = "Vous allez ajouter un remboursement global qui inclut les utilisateurs sélectionnés. Confirmer ?";
$i18n['confirm'] = 'Confirmer';
$i18n['a_bill'] = 'une dépense';
$i18n['doesnt_exist'] = "n'existe pas";
$i18n['deleted_user'] = 'Utilisateur supprimé';
$i18n['confirm_payback'] = "Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action ne peut pas être annulée simplement.";
$i18n['go_back_list_global_paybacks'] = 'Retour à la liste des remboursements globaux';
$i18n['submit'] = 'Envoyer';

View File

@ -31,6 +31,8 @@
require_once('inc/CSRF.inc.php'); require_once('inc/CSRF.inc.php');
session_start(); session_start();
$i18n = array();
require_once(LANG);
// Long lasting session inspired by the work from sbgodin for shaarli // Long lasting session inspired by the work from sbgodin for shaarli
define('WEB_PATH', substr($_SERVER["REQUEST_URI"], 0, 1+strrpos($_SERVER["REQUEST_URI"], '/', 0))); define('WEB_PATH', substr($_SERVER["REQUEST_URI"], 0, 1+strrpos($_SERVER["REQUEST_URI"], '/', 0)));
@ -54,6 +56,7 @@
$tpl->assign('base_url', htmlspecialchars(BASE_URL)); $tpl->assign('base_url', htmlspecialchars(BASE_URL));
$tpl->assign('currency', htmlspecialchars(CURRENCY)); $tpl->assign('currency', htmlspecialchars(CURRENCY));
$tpl->assign('email_webmaster', htmlspecialchars(EMAIL_WEBMASTER)); $tpl->assign('email_webmaster', htmlspecialchars(EMAIL_WEBMASTER));
$tpl->assign('i18n', $i18n);
$current_user = new User(); $current_user = new User();
if(isset($_SESSION['current_user'])) { if(isset($_SESSION['current_user'])) {

View File

@ -1,13 +1,13 @@
{include="header"} {include="header"}
<h1 id="title">{$instance_title} - Connection</h1> <h1 id="title">{$instance_title} - {$i18n['connection']}</h1>
<form method="post" action="index.php?do=connect" id="connexion_form"> <form method="post" action="index.php?do=connect" id="connexion_form">
<p><label for="login" class="label-block">Username : </label><input type="text" name="login" id="login" value="{$user_post}"/></p> <p><label for="login" class="label-block">{$i18n['username']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="login" id="login" value="{$user_post}"/></p>
<p><label for="password" class="label-block">Password : </label><input type="password" name="password" id="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a></p> <p><label for="password" class="label-block">{$i18n['password']}{$i18n['before_double_ponctuation']}: </label><input type="password" name="password" id="password"/> <a title="{$i18n['toggle_visible']}" href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="{$i18n['toggle_visible']}"/></a></p>
<p><input type="checkbox" name="remember_me" id="remember_me" value="1"/><label for="remember_me"> Remember me ?</label></p> <p><input type="checkbox" name="remember_me" id="remember_me" value="1"/><label for="remember_me"> {$i18n['remember_me']}{$i18n['before_double_ponctuation']}?</label></p>
<p><input type="submit" value="Connect"/><input type="hidden" name="token" value="{$token}"/></p> <p><input type="submit" value="{$i18n['connect']}"/><input type="hidden" name="token" value="{$token}"/></p>
<p><a href="mailto:{$email_webmaster}?subject={$instance_title}%20password">Forgotten password ?</a></p> <p><a href="mailto:{$email_webmaster}?subject={$instance_title}%20password">{$i18n['forgotten_password']}?</a></p>
</form> </form>
{include="footer"} {include="footer"}

View File

@ -1,17 +1,17 @@
{include="header"} {include="header"}
{if condition="$view == 'list_users'"} {if condition="$view == 'list_users'"}
<h2>List of users</h2> <h2>{$i18n['users_list']}</h2>
<p class="center">You can also <a href="?do=add_user">add a user</a>.</p> <p class="center">{$i18n['you_can_also']} <a href="?do=add_user">{$i18n['add_user']}</a>.</p>
<table id="edit_users"> <table id="edit_users">
<tr> <tr>
<th>Id</th> <th>{$i18n['id']}</th>
<th>Login</th> <th>{$i18n['login']}</th>
<th>Display Name</th> <th>{$i18n['display_name']}</th>
<th>E-mail address</th> <th>{$i18n['email_address']}</th>
<th>Is admin ?</th> <th>{$i18n['is_admin']}{$i18n['before_double_ponctuation']}?</th>
<th>Edit</th> <th>{$i18n['edit']}</th>
<th>Delete</th> <th>{$i18n['delete']}</th>
</tr> </tr>
{loop="users"} {loop="users"}
<tr> <tr>
@ -20,75 +20,75 @@
<td>{$value->getDisplayName()}</td> <td>{$value->getDisplayName()}</td>
<td>{$value->getEmail()}</td> <td>{$value->getEmail()}</td>
<td>{$value->getAdmin() ? "Yes" : "No"}</td> <td>{$value->getAdmin() ? "Yes" : "No"}</td>
<td><a href="index.php?do=edit_users&user_id={$value->getId()}">Edit</a></td> <td><a href="index.php?do=edit_users&user_id={$value->getId()}">{$i18n['edit']}</a></td>
<td>{if condition="$value->getId() != $current_user->getId()"}<a href="index.php?do=delete_user&amp;user_id={$value->getId()}&amp;token={$token}">Delete</a>{/if}</td> <td>{if condition="$value->getId() != $current_user->getId()"}<a href="index.php?do=delete_user&amp;user_id={$value->getId()}&amp;token={$token}">{$i18n['delete']}</a>{/if}</td>
</tr> </tr>
{/loop} {/loop}
</table> </table>
{elseif condition="$view == 'edit_user'"} {elseif condition="$view == 'edit_user'"}
<h2>{$user_id != -1 ? 'Edit' : 'Add'} a user</h2> <h2>{$user_id != -1 ? $i18n['edit'] : $i18n['add']} {$i18n['a_user']}</h2>
<form method="post" action="index.php?do={$user_id != -1 ? 'edit_users' : 'add_user'}" id="edit_user_form"> <form method="post" action="index.php?do={$user_id != -1 ? 'edit_users' : 'add_user'}" id="edit_user_form">
<p> <p>
<label for="login" class="label-block">Login: </label><input type="text" name="login" id="login" {if condition="$login_post != ''"} value="{$login_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getLogin().'"' : ''} {/if}/> <label for="login" class="label-block">{$i18n['login']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="login" id="login" {if condition="$login_post != ''"} value="{$login_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getLogin().'"' : ''} {/if}/>
</p> </p>
<p> <p>
<label for="display_name" class="label-block">Displayed name (optionnal): </label><input type="text" name="display_name" id="display_name" {if condition="$display_name_post != ''"} value="{$display_name_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getDisplayName().'"' : ''} {/if}/> <label for="display_name" class="label-block">{$i18n['display_name']} ({$i18n['optionnal']}){$i18n['before_double_ponctuation']}: </label><input type="text" name="display_name" id="display_name" {if condition="$display_name_post != ''"} value="{$display_name_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getDisplayName().'"' : ''} {/if}/>
</p> </p>
<p> <p>
<label for="email" class="label-block">E-mail address (optionnal): </label><input type="text" name="email" id="email" {if condition="$email_post != ''"} value="{$email_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getEmail().'"' : ''} {/if}/> <label for="email" class="label-block">{$i18n['email_address']} ({$i18n['optionnal']}){$i18n['before_double_ponctuation']}: </label><input type="text" name="email" id="email" {if condition="$email_post != ''"} value="{$email_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getEmail().'"' : ''} {/if}/>
</p> </p>
<p> <p>
<label for="notifications" class="label-block">Notifications for </label> <label for="notifications" class="label-block">{$i18n['notifications_for']} </label>
<select name="notifications" id="notifications"> <select name="notifications" id="notifications">
<option value="1" {if condition="$user_id != -1 && $user_data->getNotifications() == 1"}selected="selected"{/if}>nothing.</option> <option value="1" {if condition="$user_id != -1 && $user_data->getNotifications() == 1"}selected="selected"{/if}>{$i18n['nothing']}.</option>
<option value="2" {if condition="$user_id != -1 && $user_data->getNotifications() == 2"}selected="selected"{/if}>global paybacks only.</option> <option value="2" {if condition="$user_id != -1 && $user_data->getNotifications() == 2"}selected="selected"{/if}>{$i18n['notif_global_paybacks']}.</option>
<option value="3" {if condition="$user_id != -1 && $user_data->getNotifications() == 3"}selected="selected"{/if}>everything involving this user.</option> <option value="3" {if condition="$user_id != -1 && $user_data->getNotifications() == 3"}selected="selected"{/if}>{$i18n['notif_everything']}.</option>
</select> </select>
</p> </p>
<p> <p>
<label for="password" class="label-block">Password: </label><input type="password" name="password" id="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a> <label for="password" class="label-block">{$i18n['password']}{$i18n['before_double_ponctuation']}: </label><input type="password" name="password" id="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a>
{if condition="$user_id != -1"} {if condition="$user_id != -1"}
<br/><em>Note:</em> Leave blank this field if you don't want to edit password. <br/><em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['note_dont_edit_passwords']}
{/if} {/if}
</p> </p>
<p id="edit_user_admin_rights"> <p id="edit_user_admin_rights">
Give admin rights to this user ?<br/> {$i18n['give_admin_rights']}{$i18n['before_double_ponctuation']}?<br/>
<input type="radio" id="admin_yes" value="1" name="admin" {if condition="$admin_post == 1 || ($admin_post == -1 && $user_id != -1 && $user_data->getAdmin())"} checked{/if}/><label for="admin_yes">Yes</label><br/> <input type="radio" id="admin_yes" value="1" name="admin" {if condition="$admin_post == 1 || ($admin_post == -1 && $user_id != -1 && $user_data->getAdmin())"} checked{/if}/><label for="admin_yes">{$i18n['yes']}</label><br/>
<input type="radio" id="admin_no" value="0" name="admin" {if condition="$admin_post == 0 || ($admin_post == -1 && ($user_id == -1 || !$user_data->getAdmin()))"} checked{/if}/><label for="admin_no">No</label> <input type="radio" id="admin_no" value="0" name="admin" {if condition="$admin_post == 0 || ($admin_post == -1 && ($user_id == -1 || !$user_data->getAdmin()))"} checked{/if}/><label for="admin_no">{$i18n['no']}</label>
</p> </p>
<p class="center"> <p class="center">
<input type="submit" value="{$user_id != -1 ? 'Edit' : 'Add'}"/> <input type="submit" value="{$user_id != -1 ? $i18n['edit'] : $i18n['add']}"/>
{if condition="$user_id != -1"}<input type="hidden" name="user_id" value="{$user_id}"/>{/if} {if condition="$user_id != -1"}<input type="hidden" name="user_id" value="{$user_id}"/>{/if}
<input type="hidden" name="token" value="{$token}"/> <input type="hidden" name="token" value="{$token}"/>
</p> </p>
</form> </form>
{if condition="$user_id != -1"} {if condition="$user_id != -1"}
<h2>Personal token for this user</h2> <h2>{$i18n['personal_token_user']}</h2>
<p>The personal token for this user to be used with the API is: {$user_data->getJsonToken()}.<br/>If you think it might be compromised, you can <a href="index.php?do=new_token&user_id={$user_data->getId()}&amp;token={$token}">generate a new one</a>.</p> <p>{$i18n['personal_token_user_is']}{$i18n['before_double_ponctuation']}: {$user_data->getJsonToken()}.<br/>{$i18n['compromised_token']} <a href="index.php?do=new_token&user_id={$user_data->getId()}&amp;token={$token}">{$i18n['generate_new_one']}</a>.</p>
{/if} {/if}
{elseif condition="$view == 'password'"} {elseif condition="$view == 'password'"}
<h2>Edit your password</h2> <h2>{$i18n['edit_password']}</h2>
<form method="post" action="index.php?do=password" id="edit_password_form"> <form method="post" action="index.php?do=password" id="edit_password_form">
<p><label for="password" class="label-block">New password: </label><input type="password" id="password" name="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a></p> <p><label for="password" class="label-block">{$i18n['new_password']}{$i18n['before_double_ponctuation']}: </label><input type="password" id="password" name="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="{$i18n['toggle_visible']}"/></a></p>
<p><label for="password_confirm" class="label-block">Confirm new password: </label><input type="password" id="password_confirm" name="password_confirm"/> <a href="" onclick="toggle_password('password_confirm'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a></p> <p><label for="password_confirm" class="label-block">{$i18n['confirm_new_password']}{$i18n['before_double_ponctuation']}: </label><input type="password" id="password_confirm" name="password_confirm"/> <a href="" onclick="toggle_password('password_confirm'); return false;"><img src="img/toggleVisible.png" alt="{$i18n['toggle_visible']}"/></a></p>
<p> <p>
<label for="email" class="label-block">E-mail address: </label><input type="text" name="email" id="email" value="{$current_user->getEmail()}"/> <label for="email" class="label-block">{$i18n['email_address']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="email" id="email" value="{$current_user->getEmail()}"/>
</p> </p>
<p> <p>
<label for="notifications" class="label-block">Notifications for </label> <label for="notifications" class="label-block">{$i18n['notifications_for']} </label>
<select name="notifications" id="notifications"> <select name="notifications" id="notifications">
<option value="1" {if condition="$current_user->getNotifications() == 1"}selected="selected"{/if}>nothing.</option> <option value="1" {if condition="$current_user->getNotifications() == 1"}selected="selected"{/if}>{$i18n['nothing']}.</option>
<option value="2" {if condition="$current_user->getNotifications() == 2"}selected="selected"{/if}>global paybacks only.</option> <option value="2" {if condition="$current_user->getNotifications() == 2"}selected="selected"{/if}>{$i18n['notif_global_paybacks']}.</option>
<option value="3" {if condition="$current_user->getNotifications() == 3"}selected="selected"{/if}>everything involving you.</option> <option value="3" {if condition="$current_user->getNotifications() == 3"}selected="selected"{/if}>{$i18n['notif_everything']}.</option>
</select> </select>
</p> </p>
<p><em>Note:</em> Leave blank the password fields if you don't want to edit password.</p> <p><em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['note_dont_edit_passwords']}</p>
<p class="center"><input type="submit" value="Update"/><input type="hidden" name="token" value="{$token}"</p> <p class="center"><input type="submit" value="{$i18n['update']}"/><input type="hidden" name="token" value="{$token}"</p>
</form> </form>
<h2>Your personal token to use the API</h2> <h2>{$i18n['personal_token_title']}</h2>
<p>Your personal token to use the API is: {$json_token}.<br/>If you think it might be compromised, you can <a href="index.php?do=new_token&amp;token={$token}">generate a new one</a>.</p> <p>{$i18n['personal_token_is']}{$i18n['before_double_ponctuation']}: {$json_token}.<br/>{$i18n['compromised_token']} <a href="index.php?do=new_token&amp;token={$token}">{$i18n['generate_new_one']}</a>.</p>
{/if} {/if}
{include="footer"} {include="footer"}

View File

@ -1,6 +1,7 @@
{if condition="!$connection"} {if condition="!$connection"}
<p id="user_connected">Connected as {$current_user->getDisplayName()}.</p> <p id="user_connected">{$i18n['connected_as']} {$current_user->getDisplayName()}.</p>
{/if} {/if}
<script type="text/javascript" src="js/main.min.js"></script> <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body> </body>
</html> </html>

View File

@ -16,20 +16,20 @@
<div id="menu"> <div id="menu">
<ul> <ul>
<li><a href="index.php?do=new_invoice">Add a bill</a></li> <li><a href="index.php?do=new_invoice">{$i18n['add_bill']}</a></li>
<li><a href="index.php?do=password">Change your password</a></li> <li><a href="index.php?do=password">{$i18n['change_password']}</a></li>
<li><a href="index.php?do=see_paybacks">See global paybacks</a></li> <li><a href="index.php?do=see_paybacks">{$i18n['see_global_paybacks']}</a></li>
<li><a href="index.php?do=disconnect">Disconnect</a></li> <li><a href="index.php?do=disconnect">{$i18n['disconnect']}</a></li>
</ul> </ul>
{if condition="$current_user->getAdmin() == 1"} {if condition="$current_user->getAdmin() == 1"}
<ul> <ul>
<li><a href="index.php?do=manage_paybacks">Manage global paybacks</a></li> <li><a href="index.php?do=manage_paybacks">{$i18n['manage_global_paybacks']}</a></li>
<li><a href="index.php?do=edit_users">Edit users</a></li> <li><a href="index.php?do=edit_users">{$i18n['edit_users']}</a></li>
<li><a href="index.php?do=edit_notice">Edit notice on homepage</a></li> <li><a href="index.php?do=edit_notice">{$i18n['edit_homepage_notice']}</a></li>
<li><a href="index.php?do=settings">Settings</a></li> <li><a href="index.php?do=settings">{$i18n['settings']}</a></li>
</ul> </ul>
{/if} {/if}
</div> </div>
{/if} {/if}
{if condition="!empty($error)"}<p class="error">{$error}</p> {if condition="!empty($error)"}<p class="error">{$error}</p>
{if condition="!empty($block_error) && $block_error"}<p class="center"><a href="{$base_url}" onclick="window.history.back(); return false;">Go back to previous page</a></p></body></html>{function="exit();"}{/if}{/if} {if condition="!empty($block_error) && $block_error"}<p class="center"><a href="{$base_url}" onclick="window.history.back(); return false;">{$i18n['go_back']}</a></p></body></html>{function="exit();"}{/if}{/if}

View File

@ -5,12 +5,12 @@
{/if} {/if}
<div id="quick_summary"> <div id="quick_summary">
<h2>Balance</h2> <h2>{$i18n['balance']}</h2>
{if condition="$current_user->getAdmin()"} {if condition="$current_user->getAdmin()"}
<p class="center">Read <em>line</em> owes <em>case</em> {$currency} to <em>column</em>. You can click on links to confirm the payback. <p class="center">{$i18n['home_table_caption']}
<table id="balance_table"> <table id="balance_table">
<tr> <tr>
<th>Owes\To</th> <th>{$i18n['owes']}\{$i18n['to']}</th>
{loop="users"} {loop="users"}
<th>{$value->getDisplayName()}</th> <th>{$value->getDisplayName()}</th>
{/loop} {/loop}
@ -33,9 +33,9 @@
{else} {else}
<table> <table>
<tr> <tr>
<th>Users</th> <th>{$i18n['users']}</th>
<th>You owe him</th> <th>{$i18n['you_owe_him']}</th>
<th>He owes you</th> <th>{$i18n['he_owes_you']}/th>
</tr> </tr>
{loop="$users"} {loop="$users"}
{if condition="$balances[$value->getId()][$current_user->getId()] !== 'X' && $balances[$value->getId()][$current_user->getId()] !== '-'"} {if condition="$balances[$value->getId()][$current_user->getId()] !== 'X' && $balances[$value->getId()][$current_user->getId()] !== '-'"}
@ -53,28 +53,28 @@
{/if} {/if}
{/loop} {/loop}
</table> </table>
<p class="center">Balance : {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}</p> <p class="center">{$i18n['balance']}{$i18n['before_double_ponctuation']}: {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}</p>
{/if} {/if}
</div> </div>
<div id="detailed_summary"> <div id="detailed_summary">
<h2>Detailed list of bills{if condition="$all == 0"} for last month{/if}</h2> <h2>{$i18n['detailed_list_bills']}{if condition="$all == 0"} {$i18n['for_last_month']}{/if}</h2>
{if condition="$all == 0"} {if condition="$all == 0"}
<p class="center"><a href="?all=1">Display all bills</a></p> <p class="center"><a href="?all=1">{$i18n['display_all_bills']}</a></p>
{else} {else}
<p class="center"><a href="?all=0">Only display bills for last month</a></p> <p class="center"><a href="?all=0">{$i18n['only_last_month_bills']}</a></p>
{/if} {/if}
{if condition="$invoices !== false && count($invoices)>=1"} {if condition="$invoices !== false && count($invoices)>=1"}
<table id="list_expenses"> <table id="list_expenses">
<tr> <tr>
<th>Date</th> <th>{$i18n['date']}</th>
<th>Paid by</th> <th>{$i18n['paid_by']}</th>
<th>Users in</th> <th>{$i18n['users_in']}</th>
<th>Amount</th> <th>{$i18n['amount']}</th>
<th>What ?</th> <th>{$i18n['what']}{$i18n['before_double_ponctuation']}?</th>
<th>Edit</th> <th>{$i18n['edit']}</th>
<th>Delete</th> <th>{$i18n['delete']}</th>
</tr> </tr>
{loop="invoices"} {loop="invoices"}
<tr> <tr>
@ -84,34 +84,34 @@
{loop="$value->getUsersIn()->get()"} {loop="$value->getUsersIn()->get()"}
{$users[$key2]->getDisplayName()} {$users[$key2]->getDisplayName()}
{if condition="$value2 > 1"} {if condition="$value2 > 1"}
({$value2} guests) ({$value2} {$i18n['guests']})
{elseif condition="$value2 == 1"} {elseif condition="$value2 == 1"}
({$value2} guest) ({$value2} {$i18n['guest']})
{/if} {/if}
{if condition="$value1->getBuyer() != $key2"} {if condition="$value1->getBuyer() != $key2"}
- -
{if condition="$paybacks[$value1->getId()] === false || !in_array($key2, array_keys($paybacks[$value1->getId()]))"} {if condition="$paybacks[$value1->getId()] === false || !in_array($key2, array_keys($paybacks[$value1->getId()]))"}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="Confirm payback"> <a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="{$i18n['confirm_payback']}">
{/if} {/if}
Remains {$value1->getAmountPerPerson($key2)} {$currency} {$i18n['remains']} {$value1->getAmountPerPerson($key2)} {$currency}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a> </a>
{/if} {/if}
{else} {else}
{if condition="$paybacks[$value1->getId()][$key2]->getAmount() == $value1->getAmountPerPerson($key2)"} {if condition="$paybacks[$value1->getId()][$key2]->getAmount() == $value1->getAmountPerPerson($key2)"}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=delete_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="Delete payback"> <a href="?do=delete_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="{$i18n['delete_payback']}">
{/if} {/if}
Paid {$i18n['paid']}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a> </a>
{/if} {/if}
{else} {else}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;payback_id={$paybacks[$value1->getId()][$key2]->getId()}&amp;token={$token}" title="Confirm payback"> <a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;payback_id={$paybacks[$value1->getId()][$key2]->getId()}&amp;token={$token}" title="{$i18n['confirm_payback']}">
{/if} {/if}
Remains {$value1->getAmountPerPerson($key2) - $paybacks[$value1->getId()][$key2]->getAmount()}{$currency} {$i18n['remains']} {$value1->getAmountPerPerson($key2) - $paybacks[$value1->getId()][$key2]->getAmount()}{$currency}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"} {if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a> </a>
{/if} {/if}
@ -125,14 +125,14 @@
<td>{$value->getWhat()}</td> <td>{$value->getWhat()}</td>
<td> <td>
{if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"} {if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"}
<a href="index.php?do=edit_invoice&id={$value->getId()}">Edit</a> <a href="index.php?do=edit_invoice&id={$value->getId()}">{$i18n['edit']}</a>
{else} {else}
- -
{/if} {/if}
</td> </td>
<td> <td>
{if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"} {if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"}
<a href="index.php?do=delete_invoice&id={$value->getId()}&token={$token}">Delete</a> <a href="index.php?do=delete_invoice&id={$value->getId()}&token={$token}">{$i18n['delete']}</a>
{else} {else}
- -
{/if} {/if}
@ -141,7 +141,7 @@
{/loop} {/loop}
</table> </table>
{else} {else}
<p class="center">No bills added.</p> <p class="center">{$i18n['no_bills']}.</p>
{/if} {/if}
</div> </div>
{include="footer"} {include="footer"}

View File

@ -27,14 +27,14 @@ function set_days_month_year() {
function guest_user_label(id) { function guest_user_label(id) {
if(document.getElementById('guest_user_'+id).value > 1) { if(document.getElementById('guest_user_'+id).value > 1) {
document.getElementById('guest_user_'+id+'_label').innerHTML = ' guests'; document.getElementById('guest_user_'+id+'_label_plural').innerHTML = 's';
if(!document.getElementById('users_in_'+id).checked) { if(!document.getElementById('users_in_'+id).checked) {
document.getElementById('users_in_'+id).checked = true; document.getElementById('users_in_'+id).checked = true;
} }
} }
else else
document.getElementById('guest_user_'+id+'_label').innerHTML = ' guest'; document.getElementById('guest_user_'+id+'_label_plural').innerHTML = '';
} }
function toggle_password(id) { function toggle_password(id) {

File diff suppressed because one or more lines are too long

View File

@ -1,43 +1,43 @@
{include="header"} {include="header"}
{if condition="!empty($list)"} {if condition="!empty($list)"}
<h2>Manage global paybacks</h2> <h2>{$i18n['manage_global_paybacks']}</h2>
<p class="center"><a href="?do=manage_paybacks&new=1">Add a new global payback</a></p> <p class="center"><a href="?do=manage_paybacks&new=1">{$i18n['add_global_payback']}</a></p>
{if condition="$global_paybacks !== FALSE"} {if condition="$global_paybacks !== FALSE"}
<p>List of previous global paybacks :</p> <p>{$i18n['list_previous_global_paybacks']}{$i18n['before_double_ponctuation']}:</p>
<dl> <dl>
{loop="$global_paybacks"} {loop="$global_paybacks"}
<dt>{$value->getDate()}</dt> <dt>{$value->getDate()}</dt>
<dd>{if condition="$value->getClosed() === true"}[Closed] {/if}<a href="?do=see_paybacks&id={$value->getId()}">Payback n°{$value->getId()}</a></dd> <dd>{if condition="$value->getClosed() === true"}[{$i18n['closed']}] {/if}<a href="?do=see_paybacks&id={$value->getId()}">{$i18n['payback']} {$i18n['number']}{$value->getId()}</a></dd>
{/loop} {/loop}
</dl> </dl>
{/if} {/if}
{else} {else}
<h2>Add a global paybck</h2> <h2>{$i18n['add_global_payback']}</h2>
<p>You can add a global payback using this page. Such a payback aims at minimizing as much as possible the number of individual paybacks between users. So, the index page table will be resetted and a new table will be created. This new table will be available in the "see global paybacks" page and will contain as least exchange as possible.</p> <p>{$i18n['add_global_payback_text_1']}</p>
<p>For eample, if a user A owes 5{$currency} to a user B and if B owes 5{$currency} to C, after the global paybacks, these paybacks will simplify and A will owe 5{$currency} to C only.</p> <p>{$i18n['add_global_payback_text_2']}</p>
<p><strong>Note : <span class="red">It's not possible to revert this operation, unless you handle the restoration of data in your database manually. Be sure you want to launch this procedure before clicking on the button below.</span></strong></p> <p><strong>{$i18n['note']}{$i18n['before_double_ponctuation']}: <span class="red">{$i18n['add_global_payback_strong']}</span></strong></p>
<p><strong>Note :</strong> A backup of your database right now will be made and stored in the db_backup folder at the root of your instance. You'll be able to restore the current status of your database in case of error from your part.</p> <p><strong>{$i18n['note']}{$i18n['before_double_ponctuation']}:</strong> {$i18n['add_global_payback_note']}</p>
<hr/> <hr/>
<p>If you confirm the creation of a global payback, please select right below the users you want to include in the payback.</p> <p>{$i18n['select_users_global_payback']}</p>
<form method="post" action="?do=manage_paybacks&new=1" id="global_payback_form"> <form method="post" action="?do=manage_paybacks&new=1" id="global_payback_form">
<fieldset> <fieldset>
<legend>Users to include</legend> <legend>{$i18n['users_to_include']}</legend>
{loop="$users"} {loop="$users"}
<input type="checkbox" id="users_in_{$value->getId()}" name="users_in[]" class="users_in" value="{$value->getId()}" checked="checked"/> <input type="checkbox" id="users_in_{$value->getId()}" name="users_in[]" class="users_in" value="{$value->getId()}" checked="checked"/>
<label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label><br/> <label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label><br/>
{/loop}<br/> {/loop}<br/>
Select : <a href="" onclick="return payback_nobody();">Nobody</a> / <a href="" onclick="return payback_everybody();">Everybody</a> {$i18n['select']}{$i18n['before_double_ponctuation']}: <a href="" onclick="return payback_nobody();">{$i18n['nobody']}</a> / <a href="" onclick="return payback_everybody();">{$i18n['everybody']}</a>
</fieldset> </fieldset>
<p> <p>
<input type="submit" onclick="return confirm('You are going to add a global payback which includes the selected user. Confirm ?');" value="Confirm"/> <input type="submit" onclick="return confirm('{$i18n['add_global_payback_confirm']}');" value="{$i18n['confirm']}"/>
<input type="hidden" name="token" value="{$token}"/> <input type="hidden" name="token" value="{$token}"/>
</p> </p>
</form> </form>

View File

@ -1,20 +1,20 @@
{include="header"} {include="header"}
<h2>{if condition="$id != 0"}Edit{else}Add{/if} a bill</h2> <h2>{if condition="$id != 0"}{$i18n['edit']}{else}{$i18n['add']}{/if} {$i18n['a_bill']}</h2>
<form method="post" action="index.php?do=new_invoice" id="invoice_form"> <form method="post" action="index.php?do=new_invoice" id="invoice_form">
<fieldset> <fieldset>
<legend>Expense</legend> <legend>{$i18n['expense']}</legend>
<p> <p>
<label for="what">What ? </label> <label for="what">{$i18n['what']}{$i18n['before_double_ponctuation']}? </label>
</p> </p>
<textarea name="what" id="what" rows="10">{$what_post}</textarea> <textarea name="what" id="what" rows="10">{$what_post}</textarea>
<p> <p>
<label for="amount">Amount : </label> <label for="amount">{$i18n['amount']}{$i18n['before_double_ponctuation']}: </label>
<input type="text" name="amount" id="amount" {if condition="$amount_post != 0"} value="{$amount_post}" {/if} size="5"/> {$currency} <input type="text" name="amount" id="amount" {if condition="$amount_post != 0"} value="{$amount_post}" {/if} size="5"/> {$currency}
</p> </p>
<p> <p>
<label for="date_day">Date : </label> <label for="date_day">{$i18n['date']}{$i18n['before_double_ponctuation']}: </label>
<select name="date_day" id="date_day"> <select name="date_day" id="date_day">
{loop="days"} {loop="days"}
<option value="{$value}" {if condition="$value == $day_post"}selected{/if}>{$value}</option> <option value="{$value}" {if condition="$value == $day_post"}selected{/if}>{$value}</option>
@ -37,13 +37,13 @@
</p> </p>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Users in ?</legend> <legend>{$i18n['users_in']}{$i18n['before_double_ponctuation']}?</legend>
{loop="users"} {loop="users"}
<input type="checkbox" name="users_in[]" value="{$value->getId()}" id="users_in_{$value->getId()}" {if condition="($current_user->getId() == $value->getId() && empty($users_in)) || in_array($value->getId(), array_keys($users_in))"} checked {/if}/> <label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label> and <input type="text" name="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}" size="1" {if condition="in_array($value->getId(), array_keys($users_in))"} value="{$users_in[$value->getId()]}" {else} value="0" {/if} onkeyup="guest_user_label({$value->getId()});"/><label for="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}_label"> guest</label>.<br/> <input type="checkbox" name="users_in[]" value="{$value->getId()}" id="users_in_{$value->getId()}" {if condition="($current_user->getId() == $value->getId() && empty($users_in)) || in_array($value->getId(), array_keys($users_in))"} checked {/if}/> <label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label> {$i18n['and']} <input type="text" name="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}" size="1" {if condition="in_array($value->getId(), array_keys($users_in))"} value="{$users_in[$value->getId()]}" {else} value="0" {/if} onkeyup="guest_user_label({$value->getId()});"/><label for="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}_label"> {$i18n['guest']}<span id="guest_user_{$value->getId()}_label_plural"></span></label>.<br/>
{/loop} {/loop}
</fieldset> </fieldset>
<p class="center"> <p class="center">
<input type="submit" value="{if condition="$id != 0"}Edit{else}Add{/if}"/> <input type="submit" value="{if condition="$id != 0"}{$i18n['edit']}{else}{$i18n['add']}{/if}"/>
{if condition="$id != 0"}<input type="hidden" name="id" value="{$id}"/>{/if} {if condition="$id != 0"}<input type="hidden" name="id" value="{$id}"/>{/if}
<input type="hidden" name="token" value="{$token}"/> <input type="hidden" name="token" value="{$token}"/>
</p> </p>

View File

@ -1,47 +1,47 @@
{include="header"} {include="header"}
{if condition="empty($id)"} {if condition="empty($id)"}
<h2>Global paybacks list</h2> <h2>{$i18n['global_paybacks_list']}</h2>
{if condition="$global_paybacks !== FALSE"} {if condition="$global_paybacks !== FALSE"}
<dl> <dl>
{loop="$global_paybacks"} {loop="$global_paybacks"}
<dt>{$value->getDate()}</dt> <dt>{$value->getDate()}</dt>
<dd> <dd>
{if condition="$value->getClosed() === false"} {if condition="$value->getClosed() === false"}
<a href="?do=see_paybacks&id={$value->getId()}">Payback n°{$value->getId()}</a> <a href="?do=see_paybacks&id={$value->getId()}">{$i18n['payback']} {$i18n['number']}{$value->getId()}</a>
{else} {else}
[Closed] Payback n°{$value->getId()} [{$i18n['closed']}] {$i18n['payback']} {$i18n['number']}{$value->getId()}
{/if} {/if}
</dd> </dd>
{/loop} {/loop}
</dl> </dl>
{else} {else}
<p>No global paybacks available.</p> <p>{$i18n['no_global_payback']}.</p>
{/if} {/if}
{else} {else}
{if condition="$global_paybacks === false"} {if condition="$global_paybacks === false"}
Payback doesn't exist. {$i18n['payback']} {$i18n['doesnt_exist']}.
{else} {else}
<h2>Payback n°{$global_paybacks->getId()}</h2> <h2>{$i18n['payback']} {$i18n['number']}{$global_paybacks->getId()}</h2>
{$table=$global_paybacks->getUsersIn()->get()} {$table=$global_paybacks->getUsersIn()->get()}
<table id="global_paybacks_table"> <table id="global_paybacks_table">
<tr> <tr>
<th>Owes / To</th> <th>{$i18n['owes']} / {$i18n['to']}</th>
{loop="$global_paybacks->getUsersIn()->get()"} {loop="$global_paybacks->getUsersIn()->get()"}
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Deleted user{/if}</th> <th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}{$i18n['deleted_user']}{/if}</th>
{/loop} {/loop}
</tr> </tr>
{loop="$global_paybacks->getUsersIn()->get()"} {loop="$global_paybacks->getUsersIn()->get()"}
<tr> <tr>
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Deleted user{/if}</th> <th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}{$i18n['deleted_user']}{/if}</th>
{loop="$global_paybacks->getUsersIn()->get()"} {loop="$global_paybacks->getUsersIn()->get()"}
{if condition="$key1 == $key2"} {if condition="$key1 == $key2"}
<td class="cell-disabled"></td> <td class="cell-disabled"></td>
{else} {else}
<td> <td>
{if condition="$table[$key1][$key2] != 0"} {if condition="$table[$key1][$key2] != 0"}
<a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirm payback" onclick="return confirm("Are you sure you want to confirm this payback ? This action can't be undone easily");">{$table[$key1][$key2]}</a> <a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirm payback" onclick="return confirm("{$i18n['confirm_payback']}");">{$table[$key1][$key2]}</a>
{else} {else}
- -
{/if} {/if}
@ -53,6 +53,6 @@
</table> </table>
{/if} {/if}
<p class="center"><a href="?do=see_paybacks">Go back to global paybacks list</a></p> <p class="center"><a href="?do=see_paybacks">{$i18n['go_back_list_global_paybacks']}</a></p>
{/if} {/if}
{include="footer"} {include="footer"}

View File

@ -1,54 +1,54 @@
{include="header"} {include="header"}
{if condition="!$show_settings"} {if condition="!$show_settings"}
<h2>Edit homepage notice</h2> <h2>{$i18n['edit_homepage_notice']}</h2>
<form method="post" id="notice_form" action="index.php?do=edit_notice"> <form method="post" id="notice_form" action="index.php?do=edit_notice">
<p> <p>
<label for="textarea_notice">Homepage notice:</label><br/> <label for="textarea_notice">{$i18n['homepage_notice']}{$i18n['before_double_ponctuation']}:</label><br/>
<textarea name="notice" rows="15" id="textarea_notice">{$notice}</textarea> <textarea name="notice" rows="15" id="textarea_notice">{$notice}</textarea>
</p> </p>
<p><em>Note:</em> You can use HTML formatting in this form.</p> <p><em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['note_use_html']}</p>
<p class="center"> <p class="center">
<input type="submit" value="Submit"/> <input type="submit" value="{$i18n['submit']}"/>
<input type="hidden" name="token" value="{$token}"/> <input type="hidden" name="token" value="{$token}"/>
</p> </p>
</form> </form>
{else} {else}
<h2>Change settings of your Bouffe@Ulm installation</h2> <h2>{$i18n['settings']}</h2>
<form method="post" action="index.php?do=settings" id="settings_form"> <form method="post" action="index.php?do=settings" id="settings_form">
<fieldset> <fieldset>
<legend>Database</legend> <legend>{$i18n['database']}</legend>
<p><em>Note:</em> Use these settings carefully. Your database won't be updated by the script as it was during install and you'll have to manually update it.</p> <p><em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['settings_note']}</p>
<p><label for="mysql_host">MySQL host: </label><input type="text" name="mysql_host" id="mysql_host" value="{$mysql_host}"/></p> <p><label for="mysql_host">{$i18n['mysql_host']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="mysql_host" id="mysql_host" value="{$mysql_host}"/></p>
<p><label for="mysql_login">MySQL login: </label><input type="text" name="mysql_login" id="mysql_login" value="{$mysql_login}"/></p> <p><label for="mysql_login">{$i18n['mysql_login']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="mysql_login" id="mysql_login" value="{$mysql_login}"/></p>
<p> <p>
<label for="mysql_password">MySQL password: </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="img/toggleVisible.png" alt="Toggle visible"/></a><br/> <label for="mysql_password">{$i18n['mysql_password']}{$i18n['before_double_ponctuation']}: </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="img/toggleVisible.png" alt="{$i18n['before_double_ponctuation']}"/></a><br/>
<em>Note:</em> Leave the above field blank if you don't want to change your password. <em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['mysql_password_note']}
</p> </p>
<p> <p>
<label for="mysql_db">Name of the MySQL database to use: </label><input type="text" name="mysql_db" id="mysql_db" value="{$mysql_db}"/><br/> <label for="mysql_db">{$i18n['mysql_db']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="mysql_db" id="mysql_db" value="{$mysql_db}"/><br/>
<em>Note:</em> You <em>must</em> create this database first. <em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['mysql_db_note']}
</p> </p>
<p> <p>
<label for="mysql_prefix">Prefix for the created tables: </label><input type="text" name="mysql_prefix" id="mysql_prefix" value="{$mysql_prefix}"/><br/> <label for="mysql_prefix">{$i18n['mysql_prefix']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="mysql_prefix" id="mysql_prefix" value="{$mysql_prefix}"/><br/>
<em>Note:</em> Leave the field blank to not use any. You must create the necessary tables manually.</p> <em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['mysql_prefix_note']}</p>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>General options</legend> <legend>{$i18n['general_options']}</legend>
<p><label for="instance_title">Title to display in pages: </label><input type="text" name="instance_title" id="instance_title" value="{$instance_title}"/></p> <p><label for="instance_title">{$i18n['instance_title']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="instance_title" id="instance_title" value="{$instance_title}"/></p>
<p> <p>
<label for="base_url">Base URL: </label><input type="text" size="30" name="base_url" id="base_url" value="{$base_url}"/><br/> <label for="base_url">{$i18n['base_url']}{$i18n['before_double_ponctuation']}: </label><input type="text" size="30" name="base_url" id="base_url" value="{$base_url}"/><br/>
<em>Note:</em> This is the base URL from which you access this page. You must keep the trailing "/" in the above address. <em>{$i18n['note']}{$i18n['before_double_ponctuation']}:</em> {$i18n['base_url_note']}
</p> </p>
<p><label for="currency">Currency: </label><input type="text" name="currency" id="currency" size="3" value="{$currency}"/></p> <p><label for="currency">{$i18n['currency']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="currency" id="currency" size="3" value="{$currency}"/></p>
<p> <p>
<label for="timezone">Timezone: </label><input type="text" name="timezone" id="timezone" value="{$timezone}"/><br/> <label for="timezone">{$i18n['timezone']}{$i18n['before_double_ponctuation']}: </label><input type="text" name="timezone" id="timezone" value="{$timezone}"/><br/>
<em>For example:</em> Europe/Paris. See the doc for more info. {$i18n['timezone_doc']}
</p> </p>
<p> <p>
<label for="template">Template: </label> <label for="template">{$i18n['template']}{$i18n['before_double_ponctuation']}: </label>
<select name="template" id="template"> <select name="template" id="template">
{loop="templates"} {loop="templates"}
<option value="{$value['value']}" {if condition="$value['value'] == $current_template"} selected="selected" {/if}>{$value['option']}</option> <option value="{$value['value']}" {if condition="$value['value'] == $current_template"} selected="selected" {/if}>{$value['option']}</option>
@ -56,16 +56,16 @@
</select </select
</p> </p>
<p> <p>
<label for="lang">Lang: </label> <label for="lang">{$i18n['lang']}{$i18n['before_double_ponctuation']}: </label>
<select name="lang" id="lang"> <select name="lang" id="lang">
{loop="$available_lang"} {loop="$available_lang"}
<option value="{$value['value']}" {if="$value['value'] == $current_lang"}selected="selected"{/if}>{$value['option']}</option> <option value="{$value['value']}" {if="$value['value'] == $current_lang"}selected="selected"{/if}>{$value['option']}</option>
{/loop} {/loop}
</select> </select>
</p> </p>
<p><label for="email_webmaster">Webmaster's email (optionnal): </label><input type="text" name="email_webmaster" id="email_webmaster" value="{$email_webmaster}"/></p> <p><label for="email_webmaster">{$i18n['webmaster_email']} ({$i18n['optionnal']}){$i18n['before_double_ponctuation']}: </label><input type="text" name="email_webmaster" id="email_webmaster" value="{$email_webmaster}"/></p>
</fieldset> </fieldset>
<p class="center"><input type="submit" value="Update settings"><input type="hidden" name="token" value="{$token}"/></p> <p class="center"><input type="submit" value="{$i18n['update_settings']}"><input type="hidden" name="token" value="{$token}"/></p>
</form> </form>
{/if} {/if}

View File

@ -1,13 +0,0 @@
{include="header"}
<h1 id="title">{$instance_title} - Connexion</h1>
<form method="post" action="index.php?do=connect" id="connexion_form">
<p><label for="login" class="label-block">Identifiant : </label><input type="text" name="login" id="login" value="{$user_post}"/></p>
<p><label for="password" class="label-block">Mot de passe : </label><input type="password" name="password" id="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Afficher / Masquer"/></a></p>
<p><input type="checkbox" name="remember_me" id="remember_me" value="1"/><label for="remember_me"> Se souvenir de moi ?</label></p>
<p><input type="submit" value="Connexion"/><input type="hidden" name="token" value="{$token}"/></p>
<p><a href="mailto:{$email_webmaster}?subject={$instance_title}%20password">Mot de passe oublié ?</a></p>
</form>
{include="footer"}

View File

@ -1,197 +0,0 @@
html {
height: 100%;
}
body {
position: relative;
padding-bottom: 2em;
min-height: calc(100% - 2em);
font-family: sans-serif;
margin: 0;
}
body>p, body>ul, body>dl {
margin-left: 1em;
margin-right: 1em;
}
fieldset {
border: 1px solid #999;
margin-bottom: 1em;
}
form a {
position: relative;
}
form img {
height: 1.5em;
vertical-align: middle;
position: absolute;
left: .5em;
}
table {
margin: auto;
text-align: center;
max-width: 100%;
border-collapse: collapse;
}
table td, table th {
padding: 0.75em;
border: 1px solid black;
}
table th {
background-color: #DDD;
}
h2 {
background-color: #333;
padding: 0.5em;
text-align: right;
color: white;
border-top-right-radius: 1em;
border-bottom-right-radius: 1em;
display: inline-block;
padding-left: 3em;
border: 0.3em solid green;
border-left: none;
}
hr {
width: 33%;
margin-top: 2em;
margin-bottom: 2em;
}
input[type="checkbox"] {
margin-left: 2em;
}
.red {
color: red;
}
.center {
text-align: center;
}
.label-block {
display: inline-block;
text-align: right;
margin-right: 10px;
width: 200px;
}
.cell-disabled {
background-color: rgb(221, 221, 221);
}
input[type=submit] {
background-color: green;
color: white;
border-radius: 10px;
}
#title, #title a, #title a:visited, #install h1 {
background-color: #333;
border-bottom: 0.3em solid green;
color: white;
padding: 0.5em;
margin: 0;
text-align: center;
}
#title a {
text-decoration: none;
}
#menu ul {
text-align: center;
}
#menu li {
display: inline-block;
margin-left: 1em;
margin-right: 1em;
margin-bottom: 0.5em;
}
#notice {
text-align: center;
font-size: 1.5em;
background-color: green;
padding: 0.1em;
}
#detailed_summary {
margin-top: 2.5em;
}
#connexion_form {
margin: auto;
width: 67%;
text-align: center
}
#connexion_form .label-block {
width: 150px;
}
#edit_password_form, #edit_user_form, #invoice_form, #notice_form, #global_payback_form {
width: 67%;
margin: auto;
}
#global_payback_form fieldset {
margin-top: 2em;
}
#edit_password_form p, #edit_user_form p, #notice_form p, #global_payback_form p {
text-align: center;
}
#edit_user_admin_rights {
text-align: center;
}
#textarea_notice {
width: 75%;
}
textarea#what {
width: 75%;
}
#list_expenses tr:hover, #balance_table tr:not(:first-child):hover *, #global_paybacks_table tr:not(:first-child):hover *, .highlight_td {
background-color: green;
}
#user_connected {
text-align: right;
margin-right: 1em;
position: absolute;
bottom: 0;
height: 1em;
font-size: 0.75em;
right: 0;
font-style: italic;
}
#install {
margin: 0;
}
#install form, #settings_form {
width: 67%;
margin: auto;
}
.error {
font-size: 1.5em;
color: red;
font-weight: bold;
text-align: center;
}

View File

@ -1 +0,0 @@
html{height:100%}body{position:relative;padding-bottom:2em;min-height:calc(100% - 2em);font-family:sans-serif;margin:0}body>p,body>ul,body>dl{margin-left:1em;margin-right:1em}fieldset{border:1px solid #999;margin-bottom:1em}form a{position:relative}form img{height:1.5em;vertical-align:middle;position:absolute;left:.5em}table{margin:auto;text-align:center;max-width:100%;border-collapse:collapse}table td,table th{padding:.75em;border:1px solid black}table th{background-color:#DDD}h2{background-color:#333;padding:.5em;text-align:right;color:white;border-top-right-radius:1em;border-bottom-right-radius:1em;display:inline-block;padding-left:3em;border:.3em solid green;border-left:0}hr{width:33%;margin-top:2em;margin-bottom:2em}input[type="checkbox"]{margin-left:2em}.red{color:red}.center{text-align:center}.label-block{display:inline-block;text-align:right;margin-right:10px;width:200px}.cell-disabled{background-color:#ddd}input[type=submit]{background-color:green;color:white;border-radius:10px}#title,#title a,#title a:visited,#install h1{background-color:#333;border-bottom:.3em solid green;color:white;padding:.5em;margin:0;text-align:center}#title a{text-decoration:none}#menu ul{text-align:center}#menu li{display:inline-block;margin-left:1em;margin-right:1em;margin-bottom:.5em}#notice{text-align:center;font-size:1.5em;background-color:green;padding:.1em}#detailed_summary{margin-top:2.5em}#connexion_form{margin:auto;width:67%;text-align:center}#connexion_form .label-block{width:150px}#edit_password_form,#edit_user_form,#invoice_form,#notice_form,#global_payback_form{width:67%;margin:auto}#global_payback_form fieldset{margin-top:2em}#edit_password_form p,#edit_user_form p,#notice_form p,#global_payback_form p{text-align:center}#edit_user_admin_rights{text-align:center}#textarea_notice{width:75%}textarea#what{width:75%}#list_expenses tr:hover,#balance_table tr:not(:first-child):hover *,#global_paybacks_table tr:not(:first-child):hover *,.highlight_td{background-color:green}#user_connected{text-align:right;margin-right:1em;position:absolute;bottom:0;height:1em;font-size:.75em;right:0;font-style:italic}#install{margin:0}#install form,#settings_form{width:67%;margin:auto}.error{font-size:1.5em;color:red;font-weight:bold;text-align:center}

View File

@ -1,95 +0,0 @@
{include="header"}
{if condition="$view == 'list_users'"}
<h2>Liste des utilisateurs</h2>
<p class="center">Vous pouvez également <a href="?do=add_user">ajouter un utilisateur</a>.</p>
<table id="edit_users">
<tr>
<th>Id</th>
<th>Identifiant</th>
<th>Nom affiché</th>
<th>Adresse e-mail</th>
<th>Administrateur ?</th>
<th>Modifier</th>
<th>Supprimer</th>
</tr>
{loop="users"}
<tr>
<td>{$value->getId()}</td>
<td>{$value->getLogin()}</td>
<td>{$value->getDisplayName()}</td>
<td>{$value->getEmail()}</td>
<td>{$value->getAdmin() ? "Oui" : "Non"}</td>
<td><a href="index.php?do=edit_users&user_id={$value->getId()}">Modifier</a></td>
<td>{if condition="$value->getId() != $current_user->getId()"}<a href="index.php?do=delete_user&amp;user_id={$value->getId()}&amp;token={$token}">Supprimer</a>{/if}</td>
</tr>
{/loop}
</table>
{elseif condition="$view == 'edit_user'"}
<h2>{$user_id != -1 ? 'Modifier' : 'Ajouter'} un utilisateur</h2>
<form method="post" action="index.php?do={$user_id != -1 ? 'edit_users' : 'add_user'}" id="edit_user_form">
<p>
<label for="login" class="label-block">Identifiant : </label><input type="text" name="login" id="login" {if condition="$login_post != ''"} value="{$login_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getLogin().'"' : ''} {/if}/>
</p>
<p>
<label for="display_name" class="label-block">Nom affiché : </label><input type="text" name="display_name" id="display_name" {if condition="$display_name_post != ''"} value="{$display_name_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getDisplayName().'"' : ''} {/if}/>
</p>
<p>
<label for="email" class="label-block">Adresse e-mail : </label><input type="text" name="email" id="email" {if condition="$email_post != ''"} value="{$email_post}" {else} {$user_id != -1 ? 'value="'.$user_data->getEmail().'"' : ''} {/if}/>
</p>
<p>
<label for="notifications" class="label-block">Notifications pour </label>
<select name="notifications" id="notifications">
<option value="1" {if condition="$user_id != -1 && $user_data->getNotifications() == 1"}selected="selected"{/if}>rien.</option>
<option value="2" {if condition="$user_id != -1 && $user_data->getNotifications() == 2"}selected="selected"{/if}>les remboursements globaux uniquement.</option>
<option value="3" {if condition="$user_id != -1 && $user_data->getNotifications() == 3"}selected="selected"{/if}>tout ce qui concerne cet utilisateur.</option>
</select>
</p>
<p>
<label for="password" class="label-block">Mot de passe : </label><input type="password" name="password" id="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Afficher / Masquer"/></a>
{if condition="$user_id != -1"}
<br/><em>Note :</em> Laissez ce champ vide pour ne pas modifier le mot de passe.
{/if}
</p>
<p id="edit_user_admin_rights">
Donner des droits administateurs à cet utilisateur ?<br/>
<input type="radio" id="admin_yes" value="1" name="admin" {if condition="$admin_post == 1 || ($admin_post == -1 && $user_id != -1 && $user_data->getAdmin())"} checked{/if}/><label for="admin_yes">Oui</label><br/>
<input type="radio" id="admin_no" value="0" name="admin" {if condition="$admin_post == 0 || ($admin_post == -1 && ($user_id == -1 || !$user_data->getAdmin()))"} checked{/if}/><label for="admin_no">Non</label>
</p>
<p class="center">
<input type="submit" value="{$user_id != -1 ? 'Modifier' : 'Ajouter'}"/>
{if condition="$user_id != -1"}<input type="hidden" name="user_id" value="{$user_id}"/>{/if}
<input type="hidden" name="token" value="{$token}"/>
</p>
</form>
{if condition="$user_id != -1"}
<h2>Jeton d'identification pour l'utilisateur</h2>
<p>Le jeton personnel d'identification à utiliser pour la connection à l'API est : {$user_data->getJsonToken()}.<br/>Si vous pensez qu'il a pu être compromis, vous pouvez <a href="index.php?do=new_token&user_id={$user_data->getId()}&amp;token={$token}">en générer un nouveau</a>.</p>
{/if}
{elseif condition="$view == 'password'"}
<h2>Modifier votre mot de passe</h2>
<form method="post" action="index.php?do=password" id="edit_password_form">
<p><label for="password" class="label-block">Nouveau mot de passe : </label><input type="password" id="password" name="password"/> <a href="" onclick="toggle_password('password'); return false;"><img src="img/toggleVisible.png" alt="Afficher / Masquer"/></a></p>
<p><label for="password_confirm" class="label-block">Confirmation : </label><input type="password" id="password_confirm" name="password_confirm"/> <a href="" onclick="toggle_password('password_confirm'); return false;"><img src="img/toggleVisible.png" alt="Afficher / Masquer"/></a></p>
<p>
<label for="email" class="label-block">Adresse e-mail : </label><input type="text" name="email" id="email" value="{$current_user->getEmail()}"/>
</p>
<p>
<label for="notifications" class="label-block">Notifications pour </label>
<select name="notifications" id="notifications">
<option value="1" {if condition="$current_user->getNotifications() == 1"}selected="selected"{/if}>rien.</option>
<option value="2" {if condition="$current_user->getNotifications() == 2"}selected="selected"{/if}>les remboursements globaux uniquement.</option>
<option value="3" {if condition="$current_user->getNotifications() == 3"}selected="selected"{/if}>tout ce qui vous concerne.</option>
</select>
</p>
<p><em>Note :</em> Laissez les champs mot de passe vides pour ne pas modifier le mot de passe.</p>
<p class="center"><input type="submit" value="Enregistrer"/><input type="hidden" name="token" value="{$token}"</p>
</form>
<h2>Votre jeton de connexion à l'API</h2>
<p>Votre jeton personnel de connexion à l'API est : {$json_token}.<br/>Si vous pensez qu'il a pu être compromis, vous pouvez <a href="index.php?do=new_token&amp;token={$token}">en générer un nouveau</a>.</p>
{/if}
{include="footer"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,6 +0,0 @@
{if condition="!$connection"}
<p id="user_connected">Connecté en tant que {$current_user->getDisplayName()}.</p>
{/if}
<script type="text/javascript" src="js/main.min.js"></script>
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>{$instance_title}</title>
<link rel="stylesheet" media="screen" type="text/css" href="css/style.min.css" />
<meta name="viewport" content="width=device-width"/>
<link rel="icon" href="favicon-32.png" sizes="32x32">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<meta name="msapplication-TileColor" content="#333333">
<meta name="msapplication-TileImage" content="favicon-144.png">
</head>
<body>
{if condition="!$connection"}
<h1 id="title"><a href="{$base_url}">{$instance_title}</a></h1>
<div id="menu">
<ul>
<li><a href="index.php?do=new_invoice">Ajouter une dépense</a></li>
<li><a href="index.php?do=password">Modifier votre mot de passe</a></li>
<li><a href="index.php?do=see_paybacks">Voir les remboursements globaux</a></li>
<li><a href="index.php?do=disconnect">Se déconnecter</a></li>
</ul>
{if condition="$current_user->getAdmin() == 1"}
<ul>
<li><a href="index.php?do=manage_paybacks">Gérer les remboursements globaux</a></li>
<li><a href="index.php?do=edit_users">Modifier les utilisateurs</a></li>
<li><a href="index.php?do=edit_notice">Modifier l'annonce d'accueil</a></li>
<li><a href="index.php?do=settings">Préférences</a></li>
</ul>
{/if}
</div>
{/if}
{if condition="!empty($error)"}<p class="error">{$error}</p>
{if condition="!empty($block_error) && $block_error"}<p class="center"><a href="{$base_url}" onclick="window.history.back(); return false;">Go back to previous page</a></p></body></html>{function="exit();"}{/if}{/if}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

View File

@ -1,147 +0,0 @@
{include="header"}
{if condition="$notice != ''"}
<div id="notice"><p>{$notice}</p></div>
{/if}
<div id="quick_summary">
<h2>Bilan</h2>
{if condition="$current_user->getAdmin()"}
<p class="center">Lire <em>ligne</em> doit <em>case</em> {$currency} à <em>colonne</em>. Vous pouvez cliquer sur les liens pour confirmer les remboursements.
<table id="balance_table">
<tr>
<th>Doit\À</th>
{loop="users"}
<th>{$value->getDisplayName()}</th>
{/loop}
</tr>
{loop="users"}
<tr>
<th>{$value->getDisplayName()}</th>
{loop="users"}
{if condition="$balances[$value1->getId()][$value2->getId()] === 'X'"}
<td class="cell-disabled"></td>
{elseif condition="$balances[$value1->getId()][$value2->getId()] === '-' || ($value2->getId() != $current_user->getId() && !$current_user->getAdmin())"}
<td>{$balances[$value1->getId()][$value2->getId()]}</td>
{else}
<td><a href="?do=payall&amp;from={$value1->getId()}&amp;to={$value2->getId()}&amp;token={$token}">{$balances[$value1->getId()][$value2->getId()]}</a></td>
{/if}
{/loop}
</tr>
{/loop}
</table>
{else}
<table>
<tr>
<th>Utilisateurs</th>
<th>Vous devez</th>
<th>Il vous doit</th>
</tr>
{loop="$users"}
{if condition="$balances[$value->getId()][$current_user->getId()] !== 'X' && $balances[$value->getId()][$current_user->getId()] !== '-'"}
</tr>
<td>{$value->getDisplayName()}</td>
<td>-</td>
<td>{$balances[$value->getId()][$current_user->getId()]}{$currency}</td>
</tr>
{elseif condition="$balances[$current_user->getId()][$value->getId()] !== 'X' && $balances[$current_user->getId()][$value->getId()] !== '-'"}
</tr>
<td>{$value->getDisplayName()}</td>
<td>{$balances[$current_user->getId()][$value->getId()]}{$currency}</td>
<td>-</td>
</tr>
{/if}
{/loop}
</table>
<p class="center">Solde : {if condition="$user_balance > 0"}+{/if}{$user_balance}{$currency}</p>
{/if}
</div>
<div id="detailed_summary">
<h2>Liste détaillée des dépenses{if condition="$all == 0"} du dernier mois{/if}</h2>
{if condition="$all == 0"}
<p class="center"><a href="?all=1">Afficher toutes les dépenses</a></p>
{else}
<p class="center"><a href="?all=0">Afficher uniquement les dépenses du dernier mois</a></p>
{/if}
{if condition="$invoices !== false && count($invoices)>=1"}
<table id="list_expenses">
<tr>
<th>Date</th>
<th>Payé par</th>
<th>Participants</th>
<th>Montant</th>
<th>Quoi ?</th>
<th>Modifier</th>
<th>Supprimer</th>
</tr>
{loop="invoices"}
<tr>
<td>{$value->getDate('d/m/Y A')}</td>
<td>{$users[$value->getBuyer()]->getDisplayName()}</td>
<td>
{loop="$value->getUsersIn()->get()"}
{$users[$key2]->getDisplayName()}
{if condition="$value2 > 1"}
({$value2} invités)
{elseif condition="$value2 == 1"}
({$value2} invité)
{/if}
{if condition="$value1->getBuyer() != $key2"}
-
{if condition="$paybacks[$value1->getId()] === false || !in_array($key2, array_keys($paybacks[$value1->getId()]))"}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="Confirmer le remboursement">
{/if}
Reste {$value1->getAmountPerPerson($key2)} {$currency}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a>
{/if}
{else}
{if condition="$paybacks[$value1->getId()][$key2]->getAmount() == $value1->getAmountPerPerson($key2)"}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=delete_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;token={$token}" title="Supprimer le remboursement">
{/if}
Payé
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a>
{/if}
{else}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
<a href="?do=confirm_payback&amp;from={$key2}&amp;to={$value1->getBuyer()}&amp;invoice_id={$value1->getId()}&amp;payback_id={$paybacks[$value1->getId()][$key2]->getId()}&amp;token={$token}" title="Confirmer le remboursement">
{/if}
Reste {$value1->getAmountPerPerson($key2) - $paybacks[$value1->getId()][$key2]->getAmount()}{$currency}
{if condition="$current_user->getId() == $value1->getBuyer() || $current_user->getAdmin()"}
</a>
{/if}
{/if}
{/if}
{/if}
<br/>
{/loop}
</td>
<td>{$value->getAmount()}{$currency}</td>
<td>{$value->getWhat()}</td>
<td>
{if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"}
<a href="index.php?do=edit_invoice&id={$value->getId()}">Modifier</a>
{else}
-
{/if}
</td>
<td>
{if condition="$value->getBuyer() == $current_user->getId() || $current_user->getAdmin()"}
<a href="index.php?do=delete_invoice&id={$value->getId()}&amp;token={$token}">Supprimer</a>
{else}
-
{/if}
</td>
</tr>
{/loop}
</table>
{else}
<p class="center">Aucune dépense à afficher.</p>
{/if}
</div>
{include="footer"}

File diff suppressed because one or more lines are too long

View File

@ -1,92 +0,0 @@
function set_days_month_year() {
var date_day = $('#date_day option:selected').val();
var date_month = $('#date_month option:selected').val();
var date_year = $('#date_year option:selected').val();
// Handle day for month
if(["4", "6", "9", "11"].indexOf(date_month) > -1) {
(! $('#date_day options[value=29]').length) && $('#date_day').append('<option value="29">29</option>');
(! $('#date_day options[value=30]').length) && $('#date_day').append('<option value="30">30</option>');
$('#date_day option[value=31]').remove();
}
else if(date_month == "2") {
// Handle bissextile years
$('#date_day option[value=30]').remove();
$('#date_day option[value=31]').remove();
if(date_year % 4 != 0 || date_year % 400 == 0) {
$('#date_day option[value=29]').remove();
}
}
else {
(! $('#date_day options[value=29]').length) && $('#date_day').append('<option value="29">29</option>');
(! $('#date_day options[value=30]').length) && $('#date_day').append('<option value="30">30</option>');
(! $('#date_day options[value=31]').length) && $('#date_day').append('<option value="31">31</option>');
}
}
function guest_user_label(id) {
if(document.getElementById('guest_user_'+id).value > 1) {
document.getElementById('guest_user_'+id+'_label').innerHTML = ' invités';
if(!document.getElementById('users_in_'+id).checked) {
document.getElementById('users_in_'+id).checked = true;
}
}
else
document.getElementById('guest_user_'+id+'_label').innerHTML = ' invité';
}
function toggle_password(id) {
if(document.getElementById(id).type == 'password')
document.getElementById(id).type = 'text';
else
document.getElementById(id).type = 'password';
}
function payback_nobody() {
var users = document.getElementById('global_payback_form').getElementsByClassName("users_in");
for(var index = 0; index < users.length; index ++) {
users[index].checked = false;
}
return false;
}
function payback_everybody() {
var users = document.getElementById('global_payback_form').getElementsByClassName("users_in");
for(var index = 0; index < users.length; index ++) {
users[index].checked = true;
}
return false;
}
$(document).ready(function() {
$('#balance_table td, #global_paybacks_table td').hover(function() {
$(this).closest('tr').find('td,th').addClass('highlight_td');
var col = $(this).index()+1;
$(this).closest('table').find('tr :nth-child('+col+')').addClass('highlight_td');
}, function() {
$(this).closest('tr').find('td,th').removeClass('highlight_td');
var col = $(this).index()+1;
$(this).closest('table').find('tr :nth-child('+col+')').removeClass('highlight_td');
});
$('#balance_table tr:first-child th:not(:first-child), #global_paybacks_table tr:first-child th:not(:first-child)').hover(function() {
var col = $(this).index()+1;
$(this).closest('table').find('tr :nth-child('+col+')').addClass('highlight_td');
}, function() {
var col = $(this).index()+1;
$(this).closest('table').find('tr :nth-child('+col+')').removeClass('highlight_td');
});
if($('#invoice_form').length) {
$('#invoice_form input[id^=users_in]').each(function () {
var id = $(this).attr('id').replace('users_in_', '');
guest_user_label(id);
});
}
});

File diff suppressed because one or more lines are too long

View File

@ -1,45 +0,0 @@
{include="header"}
{if condition="!empty($list)"}
<h2>Gérer les remboursements globaux</h2>
<p class="center"><a href="?do=manage_paybacks&new=1">Ajouter un remboursement global</a></p>
{if condition="$global_paybacks !== FALSE"}
<p>Liste des remboursements globaux précédents :</p>
<dl>
{loop="$global_paybacks"}
<dt>{$value->getDate()}</dt>
<dd>{if condition="$value->getClosed() === true"}[Terminé] {/if}<a href="?do=see_paybacks&id={$value->getId()}">Remboursement n°{$value->getId()}</a></dd>
{/loop}
</dl>
{/if}
{else}
<h2>Ajouter un remboursement global</h2>
<p>Cette page vous permet d'ajouter un remboursement global. Un tel remboursement permet de simplifier au maximum les remboursements. Ainsi, le tableau de la page d'accueil sera remis à zéro et un nouveau tableau sera créé, tableau qui simplifiera les échanges.</p>
<p>Par exemple, si A doit 5{$currency} à B et B doit 5{$currency} à C, après remboursement global, ces remboursements se simplifieront en A doit 5{$currency} à C.</p>
<p><strong>Note : <span class="red">Cette opération est irréversible sans mettre les mains dans la base de données.</span></strong></p>
<p><strong>Note :</strong> Un backup de votre base de données à l'heure actuelle sera effectué et stocké dans le répertoire db_backups à la racine de l'instance. Vous pourrez ainsi restaurer la base de données en cas d'erreur de votre part.</p>
<hr/>
<p>Si vous confirmez la création d'un remboursement global, veuillez sélectionner ci-dessous les utilisateurs que vous souhaitez inclure dans le remboursement.</p>
<form method="post" action="?do=manage_paybacks&new=1" id="global_payback_form">
<fieldset>
<legend>Utilisateurs à inclure</legend>
{loop="$users"}
<input type="checkbox" id="users_in_{$value->getId()}" name="users_in[]" class="users_in" value="{$value->getId()}" checked="checked"/>
<label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label><br/>
{/loop}<br/>
Sélectionner : <a href="" onclick="return payback_nobody();">Personne</a> / <a href="" onclick="return payback_everybody();">Tout le monde</a>
</fieldset>
<p>
<input type="submit" onclick="return confirm('Vous êtes sur le point d\'ajouter un remboursement global incluant les utilisateurs sélectionnés.');" value="Valider"/>
<input type="hidden" name="token" value="{$token}"/>
</p>
</form>
{/if}
{include="footer"}

View File

@ -1,52 +0,0 @@
{include="header"}
<h2>{if condition="$id != 0"}Modifier{else}Ajouter{/if} une dépense</h2>
<form method="post" action="index.php?do=new_invoice" id="invoice_form">
<fieldset>
<legend>Dépense</legend>
<p>
<label for="what">Quoi ? </label>
</p>
<textarea name="what" id="what" rows="10">{$what_post}</textarea>
<p>
<label for="amount">Montant : </label>
<input type="text" name="amount" id="amount" {if condition="$amount_post != 0"} value="{$amount_post}" {/if} size="5"/> {$currency}
</p>
<p>
<label for="date_day">Date : </label>
<select name="date_day" id="date_day">
{loop="days"}
<option value="{$value}" {if condition="$value == $day_post"}selected{/if}>{$value}</option>
{/loop}
</select> /
<select name="date_month" id="date_month" onchange="set_days_month_year();">
{loop="months"}
<option value="{$value}" {if condition="$value == $month_post"}selected{/if}>{$value}</option>
{/loop}
</select> /
<select name="date_year" id="date_year" onchange="set_days_month_year();">
{loop="years"}
<option value="{$value}" {if condition="$value == $year_post"}selected{/if}>{$value}</option>
{/loop}
</select>
<select name="date_hour" id="date_hour">
<option value="0" {if condition="$hour_post == 0"}selected{/if}>AM</option>
<option value="1" {if condition="$hour_post == 1"}selected{/if}>PM</option>
</select>
</p>
</fieldset>
<fieldset>
<legend>Participants ?</legend>
{loop="users"}
<input type="checkbox" name="users_in[]" value="{$value->getId()}" id="users_in_{$value->getId()}" {if condition="($current_user->getId() == $value->getId() && empty($users_in)) || in_array($value->getId(), array_keys($users_in))"} checked {/if}/> <label for="users_in_{$value->getId()}">{$value->getDisplayName()}</label> et <input type="text" name="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}" size="1" {if condition="in_array($value->getId(), array_keys($users_in))"} value="{$users_in[$value->getId()]}" {else} value="0" {/if} onkeyup="guest_user_label({$value->getId()});"/><label for="guest_user_{$value->getId()}" id="guest_user_{$value->getId()}_label"> invité</label>.<br/>
{/loop}
</fieldset>
<p class="center">
<input type="submit" value="{if condition="$id != 0"}Modifier{else}Ajouter{/if}"/>
{if condition="$id != 0"}<input type="hidden" name="id" value="{$id}"/>{/if}
<input type="hidden" name="token" value="{$token}"/>
</p>
</form>
{include="footer"}

View File

@ -1,57 +0,0 @@
{include="header"}
{if condition="empty($id)"}
<h2>Liste des remboursements globaux</h2>
{if condition="$global_paybacks !== FALSE"}
<dl>
{loop="$global_paybacks"}
<dt>{$value->getDate()}</dt>
<dd>
{if condition="$value->getClosed() === false"}
<a href="?do=see_paybacks&id={$value->getId()}">Remboursement n°{$value->getId()}</a>
{else}
[Terminé] Remboursement n°{$value->getId()}
{/if}
</dd>
{/loop}
</dl>
{else}
<p>Aucun remboursement global disponible pour l'instant.</p>
{/if}
{else}
{if condition="$global_paybacks === false"}
Remboursement inexistant.
{else}
<h2>Remboursement n°{$global_paybacks->getId()}</h2>
{$table=$global_paybacks->getUsersIn()->get()}
<table id="global_paybacks_table">
<tr>
<th>Doit / À</th>
{loop="$global_paybacks->getUsersIn()->get()"}
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Utilisateur supprimé{/if}</th>
{/loop}
</tr>
{loop="$global_paybacks->getUsersIn()->get()"}
<tr>
<th>{if condition="!empty($users[$key1])"}{$users[$key1]->getDisplayName()}{else}Utilisateur supprimé{/if}</th>
{loop="$global_paybacks->getUsersIn()->get()"}
{if condition="$key1 == $key2"}
<td class="cell-disabled"></td>
{else}
<td>
{if condition="$table[$key1][$key2] != 0"}
<a href="?do=confirm_global_paybacks&amp;from={$key1}&amp;to={$key2}&amp;payback_id={$global_paybacks->getId()}&amp;token={$token}" title="Confirmer le remboursement" onclick="return confirm('Êtes-vous sûr de vouloir confirmer ce remboursement ? Cette action est irréversible.');">{$table[$key1][$key2]}</a>
{else}
-
{/if}
</td>
{/if}
{/loop}
</tr>
{/loop}
</table>
{/if}
<p class="center"><a href="?do=see_paybacks">Retour à la liste des remboursements</a></p>
{/if}
{include="footer"}

View File

@ -1,65 +0,0 @@
{include="header"}
{if condition="!$show_settings"}
<h2>Modifier l'annonce d'accueil</h2>
<form method="post" id="notice_form" action="index.php?do=edit_notice">
<p>
<label for="textarea_notice">Annonce d'accueil :</label><br/>
<textarea name="notice" rows="15" id="textarea_notice">{$notice}</textarea>
</p>
<p><em>Note :</em> Vous pouvez utiliser du balisage HTML dans ce champ.</p>
<p class="center">
<input type="submit" value="Submit"/>
<input type="hidden" name="token" value="{$token}"/>
</p>
</form>
{else}
<h2>Change settings of your Bouffe@Ulm installation</h2>
<form method="post" action="index.php?do=settings" id="settings_form">
<fieldset>
<legend>Base de données</legend>
<p><em>Note :</em> Utilisez ces paramètres avec précaution. Votre base de données ne sera pas mise à jour par le script comme elle l'a été durant l'étape d'installation et vous devrez donc vous en occuper manuellement.</p>
<p><label for="mysql_host">Hôte MySQL : </label><input type="text" name="mysql_host" id="mysql_host" value="{$mysql_host}"/></p>
<p><label for="mysql_login">Login MySQL : </label><input type="text" name="mysql_login" id="mysql_login" value="{$mysql_login}"/></p>
<p>
<label for="mysql_password">Mot de passe MySQL : </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="img/toggleVisible.png" alt="Afficher / masque"/></a><br/>
<em>Note :</em> Laissez ce champ vide pour ne pas le modifier.
</p>
<p>
<label for="mysql_db">Base de données à utiliser : </label><input type="text" name="mysql_db" id="mysql_db" value="{$mysql_db}"/><br/>
<em>Note :</em> Vous <em>devez</em> créer cette base de données d'abord.
</p>
<p>
<label for="mysql_prefix">Préfixe à utiliser pour les tables : </label><input type="text" name="mysql_prefix" id="mysql_prefix" value="{$mysql_prefix}"/><br/>
<em>Note :</em> Laissez ce champ vide pour ne pas en utiliser. Vous devez créer les tables manuellement.</p>
</fieldset>
<fieldset>
<legend>Options générales</legend>
<p><label for="instance_title">Titre de l'instance : </label><input type="text" name="instance_title" id="instance_title" value="{$instance_title}"/></p>
<p>
<label for="base_url">URL de base : </label><input type="text" size="30" name="base_url" id="base_url" value="{$base_url}"/><br/>
<em>Note :</em> Correspond à l'URL de base à partir de laquelle vous visitez cette instance. Vous devez conserver le slash ("/") final dans l'adresse.
</p>
<p><label for="currency">Devise : </label><input type="text" name="currency" id="currency" size="3" value="{$currency}"/></p>
<p>
<label for="timezone">Fuseau horaire : </label><input type="text" name="timezone" id="timezone" value="{$timezone}"/><br/>
<em>Par exemple :</em> Europe/Paris. Voir la doc pour plus d'infos.
</p>
<p>
<label for="template">Template : </label>
<select name="template" id="template">
{loop="templates"}
<option value="{$value['value']}" {if condition="$value['value'] == $current_template"} selected="selected" {/if}>{$value['option']}</option>
{/loop}
</select
</p>
<p><label for="email_webmaster">Adresse e-mail du webmaster : </label><input type="text" name="email_webmaster" id="email_webmaster" value="{$email_webmaster}"/></p>
</fieldset>
<p class="center"><input type="submit" value="Enregistrer"><input type="hidden" name="token" value="{$token}"/></p>
</form>
{/if}
{include="footer"}