├── .editorconfig ├── .fossil-settings ├── allow-symlinks ├── ignore-glob ├── manifest └── pgp-command ├── .travis.yml ├── COPYING ├── README.md ├── SECURITY.md ├── archives ├── 0.7.0_migration.sql ├── 0.7.2_migration.sql ├── 0.8.0_migration.sql ├── 0.8.0_schema.sql ├── 0.8.3_migration.sql ├── 0.8.3_schema.sql ├── 0.8.4_migration.sql ├── 0.9.0_migration.sql ├── 0.9.0_schema.sql ├── 0.9.1_migration.sql ├── 0.9.1_schema.sql ├── 0.9.5_schema.sql ├── 1.0.0_schema.sql └── plan_comptable.json ├── build ├── debian │ ├── config.system.php │ ├── config.user.php │ ├── makedeb.sh │ ├── manpage.txt │ ├── paheko │ ├── paheko.desktop │ ├── paheko.menu │ └── paheko.png ├── kd2fw.version ├── modules.version ├── plugins.version └── windows │ ├── Makefile │ ├── README.md │ ├── config.local.php │ ├── launch.bat │ ├── paheko.ico │ ├── paheko.nsis │ └── php.ini ├── doc ├── admin │ ├── api.md │ ├── brindille.md │ ├── brindille_functions.md │ ├── brindille_modifiers.md │ ├── brindille_sections.md │ ├── keyboard.md │ ├── markdown.md │ ├── markdown_quickref.md │ ├── modules.md │ ├── skriv.md │ ├── sql.md │ └── web.md ├── conf │ └── snuffleupagus_paheko.rules ├── icon.png ├── index.css ├── index.md ├── selfhost2.png └── skrivml.html ├── src ├── .htaccess.www ├── Makefile ├── VERSION ├── apache-bots.conf ├── apache-htaccess.conf ├── apache-vhost.conf ├── bin │ └── paheko ├── config.dist.php ├── data │ └── index.html ├── include │ ├── data │ │ ├── 1.1.0_schema.sql │ │ ├── 1.1.21_migration.sql │ │ ├── 1.1.25_migration.sql │ │ ├── 1.1.29_migration.sql │ │ ├── charts │ │ │ ├── be_pcmn_2019.csv │ │ │ ├── ch_asso.csv │ │ │ ├── fr_cse_2015.csv │ │ │ ├── fr_pca_1999.csv │ │ │ ├── fr_pca_2018.csv │ │ │ ├── fr_pca_2025.csv │ │ │ ├── fr_pcc_2020.csv │ │ │ ├── fr_pcg_2014.csv │ │ │ ├── fr_pcg_2025.csv │ │ │ └── fr_pcs_2018.csv │ │ ├── locales │ │ │ └── fr │ │ │ │ └── dictionary.txt │ │ ├── schema.sql │ │ └── users_fields_presets.ini │ ├── init.php │ ├── lib │ │ ├── Paheko │ │ │ ├── API.php │ │ │ ├── API_Credentials.php │ │ │ ├── Accounting │ │ │ │ ├── Accounts.php │ │ │ │ ├── AdvancedSearch.php │ │ │ │ ├── AssistedReconciliation.php │ │ │ │ ├── Charts.php │ │ │ │ ├── Export.php │ │ │ │ ├── Graph.php │ │ │ │ ├── Import.php │ │ │ │ ├── Projects.php │ │ │ │ ├── Reports.php │ │ │ │ ├── Transactions.php │ │ │ │ └── Years.php │ │ │ ├── AdvancedSearch.php │ │ │ ├── Backup.php │ │ │ ├── CLI.php │ │ │ ├── CSV.php │ │ │ ├── CSV_Custom.php │ │ │ ├── Config.php │ │ │ ├── DB.php │ │ │ ├── DynamicList.php │ │ │ ├── Email │ │ │ │ ├── Emails.php │ │ │ │ ├── Mailings.php │ │ │ │ └── Templates.php │ │ │ ├── Entities │ │ │ │ ├── API_Credentials.php │ │ │ │ ├── Accounting │ │ │ │ │ ├── Account.php │ │ │ │ │ ├── Chart.php │ │ │ │ │ ├── Line.php │ │ │ │ │ ├── Project.php │ │ │ │ │ ├── Transaction.php │ │ │ │ │ ├── TransactionLinksTrait.php │ │ │ │ │ ├── TransactionSubscriptionsTrait.php │ │ │ │ │ ├── TransactionUsersTrait.php │ │ │ │ │ └── Year.php │ │ │ │ ├── Email │ │ │ │ │ ├── Email.php │ │ │ │ │ └── Mailing.php │ │ │ │ ├── Extension.php │ │ │ │ ├── Files │ │ │ │ │ ├── File.php │ │ │ │ │ ├── FilePermissionsTrait.php │ │ │ │ │ ├── FileSharingTrait.php │ │ │ │ │ ├── FileThumbnailTrait.php │ │ │ │ │ ├── FileVersionsTrait.php │ │ │ │ │ ├── FileWOPITrait.php │ │ │ │ │ └── Share.php │ │ │ │ ├── Module.php │ │ │ │ ├── Plugin.php │ │ │ │ ├── Search.php │ │ │ │ ├── Services │ │ │ │ │ ├── Fee.php │ │ │ │ │ ├── Reminder.php │ │ │ │ │ ├── ReminderMessage.php │ │ │ │ │ ├── Service.php │ │ │ │ │ └── Service_User.php │ │ │ │ ├── Signal.php │ │ │ │ ├── Users │ │ │ │ │ ├── Category.php │ │ │ │ │ ├── DynamicField.php │ │ │ │ │ └── User.php │ │ │ │ └── Web │ │ │ │ │ └── Page.php │ │ │ ├── Entity.php │ │ │ ├── Extensions.php │ │ │ ├── Files │ │ │ │ ├── Conversion.php │ │ │ │ ├── Files.php │ │ │ │ ├── Shares.php │ │ │ │ ├── Storage.php │ │ │ │ ├── Storage │ │ │ │ │ ├── FileSystem.php │ │ │ │ │ ├── SQLite.php │ │ │ │ │ └── StorageInterface.php │ │ │ │ ├── Transactions.php │ │ │ │ ├── Trash.php │ │ │ │ ├── Users.php │ │ │ │ └── WebDAV │ │ │ │ │ ├── NextCloud.php │ │ │ │ │ ├── Server.php │ │ │ │ │ ├── Session.php │ │ │ │ │ ├── Storage.php │ │ │ │ │ └── WebDAV.php │ │ │ ├── Form.php │ │ │ ├── Install.php │ │ │ ├── Log.php │ │ │ ├── Plugins.php │ │ │ ├── Search.php │ │ │ ├── Services │ │ │ │ ├── Fees.php │ │ │ │ ├── Reminders.php │ │ │ │ ├── Services.php │ │ │ │ └── Services_User.php │ │ │ ├── Static_Cache.php │ │ │ ├── Template.php │ │ │ ├── Upgrade.php │ │ │ ├── UserException.php │ │ │ ├── UserTemplate │ │ │ │ ├── CommonFunctions.php │ │ │ │ ├── CommonModifiers.php │ │ │ │ ├── Functions.php │ │ │ │ ├── Modifiers.php │ │ │ │ ├── Modules.php │ │ │ │ ├── Sections.php │ │ │ │ └── UserTemplate.php │ │ │ ├── Users │ │ │ │ ├── AdvancedSearch.php │ │ │ │ ├── Categories.php │ │ │ │ ├── DynamicFields.php │ │ │ │ ├── Export.php │ │ │ │ ├── Import.php │ │ │ │ ├── LocalAddressFinder.php │ │ │ │ ├── Session.php │ │ │ │ └── Users.php │ │ │ ├── Utils.php │ │ │ └── Web │ │ │ │ ├── Cache.php │ │ │ │ ├── Render │ │ │ │ ├── AbstractRender.php │ │ │ │ ├── Encrypted.php │ │ │ │ ├── Extensions.php │ │ │ │ ├── Markdown.php │ │ │ │ ├── Render.php │ │ │ │ └── Skriv.php │ │ │ │ ├── Router.php │ │ │ │ ├── Sync.php │ │ │ │ └── Web.php │ │ └── dependencies.list │ ├── migrations │ │ └── 1.3 │ │ │ ├── 1.3.0_schema.sql │ │ │ ├── 1.3.10.sql │ │ │ ├── 1.3.11.php │ │ │ ├── 1.3.12.sql │ │ │ ├── 1.3.13.sql │ │ │ ├── 1.3.14.sql │ │ │ ├── 1.3.14_recus.sql │ │ │ ├── 1.3.2.sql │ │ │ ├── 1.3.3.sql │ │ │ ├── 1.3.5.sql │ │ │ ├── 1.3.7.sql │ │ │ ├── 1.3.8.php │ │ │ ├── 1.3.8.sql │ │ │ ├── 1.3.9.php │ │ │ ├── 1.3.9.sql │ │ │ └── schema.sql │ └── test_required.php ├── index.php ├── pubkey.asc ├── pubkey_old.asc ├── pubkey_signed.asc ├── scripts │ ├── cron.php │ ├── emails.php │ ├── handle_bounce.php │ ├── storage.php │ └── upgrade.php ├── sous-domaine.html ├── templates │ ├── _foot.tpl │ ├── _head.tpl │ ├── acc │ │ ├── _table_actions.tpl │ │ ├── _year_select.tpl │ │ ├── accounts │ │ │ ├── _nav.tpl │ │ │ ├── all.tpl │ │ │ ├── deposit.tpl │ │ │ ├── index.tpl │ │ │ ├── journal.tpl │ │ │ ├── reconcile.tpl │ │ │ ├── reconcile_assist.tpl │ │ │ ├── simple.tpl │ │ │ └── users.tpl │ │ ├── charts │ │ │ ├── _country_input.tpl │ │ │ ├── _nav.tpl │ │ │ ├── accounts │ │ │ │ ├── _account_form.tpl │ │ │ │ ├── _nav.tpl │ │ │ │ ├── all.tpl │ │ │ │ ├── delete.tpl │ │ │ │ ├── edit.tpl │ │ │ │ ├── index.tpl │ │ │ │ ├── new.tpl │ │ │ │ └── selector.tpl │ │ │ ├── delete.tpl │ │ │ ├── edit.tpl │ │ │ └── index.tpl │ │ ├── index.tpl │ │ ├── projects │ │ │ ├── _list.tpl │ │ │ ├── _nav.tpl │ │ │ ├── config.tpl │ │ │ ├── delete.tpl │ │ │ ├── edit.tpl │ │ │ └── index.tpl │ │ ├── reports │ │ │ ├── _header.tpl │ │ │ ├── _journal.tpl │ │ │ ├── _journal_diff.tpl │ │ │ ├── _statement.tpl │ │ │ ├── _statement_table.tpl │ │ │ ├── balance_sheet.tpl │ │ │ ├── graphs.tpl │ │ │ ├── journal.tpl │ │ │ ├── ledger.tpl │ │ │ ├── statement.tpl │ │ │ └── trial_balance.tpl │ │ ├── search.tpl │ │ ├── transactions │ │ │ ├── _form.tpl │ │ │ ├── _lines_form.tpl │ │ │ ├── _pending_message.tpl │ │ │ ├── action_project.tpl │ │ │ ├── actions_delete.tpl │ │ │ ├── creator.tpl │ │ │ ├── delete.tpl │ │ │ ├── details.tpl │ │ │ ├── edit.tpl │ │ │ ├── lock.tpl │ │ │ ├── new.tpl │ │ │ ├── pending.tpl │ │ │ ├── selector.tpl │ │ │ ├── service_user.tpl │ │ │ └── user.tpl │ │ └── years │ │ │ ├── _provisional_table.tpl │ │ │ ├── balance.tpl │ │ │ ├── close.tpl │ │ │ ├── delete.tpl │ │ │ ├── download.tpl │ │ │ ├── edit.tpl │ │ │ ├── export.tpl │ │ │ ├── first_setup.tpl │ │ │ ├── import.tpl │ │ │ ├── index.tpl │ │ │ ├── links.tpl │ │ │ ├── lock.tpl │ │ │ ├── new.tpl │ │ │ ├── provisional.tpl │ │ │ ├── reopen.tpl │ │ │ ├── select.tpl │ │ │ ├── split.tpl │ │ │ └── unlock.tpl │ ├── common │ │ ├── _csv_help.tpl │ │ ├── _csv_match_columns.tpl │ │ ├── _sql_table.tpl │ │ ├── delete_form.tpl │ │ ├── dynamic_list_head.tpl │ │ ├── files │ │ │ ├── _context_list.tpl │ │ │ ├── _file_render_encrypted.tpl │ │ │ ├── _preview.tpl │ │ │ ├── _share_nav.tpl │ │ │ ├── delete.tpl │ │ │ ├── edit_code.tpl │ │ │ ├── edit_web.tpl │ │ │ ├── history.tpl │ │ │ ├── history_rename.tpl │ │ │ ├── rename.tpl │ │ │ ├── share.tpl │ │ │ ├── shares_list.tpl │ │ │ └── upload.tpl │ │ └── search │ │ │ ├── advanced.tpl │ │ │ └── saved_searches.tpl │ ├── config │ │ ├── _menu.tpl │ │ ├── advanced │ │ │ ├── api.tpl │ │ │ ├── audit.tpl │ │ │ ├── errors.tpl │ │ │ ├── index.tpl │ │ │ ├── reset.tpl │ │ │ ├── sql.tpl │ │ │ └── sql_debug.tpl │ │ ├── backup │ │ │ ├── _menu.tpl │ │ │ ├── auto.tpl │ │ │ ├── documents.tpl │ │ │ ├── index.tpl │ │ │ ├── restore.tpl │ │ │ ├── versions.tpl │ │ │ └── versions_delete.tpl │ │ ├── categories │ │ │ ├── delete.tpl │ │ │ ├── edit.tpl │ │ │ └── index.tpl │ │ ├── custom.tpl │ │ ├── desktop.tpl │ │ ├── disk_usage.tpl │ │ ├── edit_image.tpl │ │ ├── ext │ │ │ ├── _details.tpl │ │ │ ├── _nav.tpl │ │ │ ├── delete.tpl │ │ │ ├── details.tpl │ │ │ ├── diff.tpl │ │ │ ├── edit.tpl │ │ │ ├── import.tpl │ │ │ ├── index.tpl │ │ │ └── new.tpl │ │ ├── fields │ │ │ ├── delete.tpl │ │ │ ├── edit.tpl │ │ │ ├── index.tpl │ │ │ └── new.tpl │ │ ├── index.tpl │ │ ├── server │ │ │ └── index.tpl │ │ ├── upgrade.tpl │ │ └── users │ │ │ ├── field_selector.tpl │ │ │ └── index.tpl │ ├── docs │ │ ├── _nav.tpl │ │ ├── action_delete.tpl │ │ ├── action_move_to_transaction.tpl │ │ ├── action_zip.tpl │ │ ├── index.tpl │ │ ├── move.tpl │ │ ├── new_dir.tpl │ │ ├── new_doc.tpl │ │ ├── new_file.tpl │ │ ├── search.tpl │ │ ├── shares.tpl │ │ ├── trash.tpl │ │ └── trash_delete.tpl │ ├── emails │ │ ├── login_changed.tpl │ │ ├── password_changed.tpl │ │ ├── password_recovery.tpl │ │ └── verify_email.tpl │ ├── error.tpl │ ├── index.html │ ├── index.tpl │ ├── install.tpl │ ├── legal.tpl │ ├── login.tpl │ ├── login_app.tpl │ ├── login_otp.tpl │ ├── me │ │ ├── _nav.tpl │ │ ├── _security_confirm_password.tpl │ │ ├── edit.tpl │ │ ├── export.tpl │ │ ├── index.tpl │ │ ├── preferences.tpl │ │ ├── security.tpl │ │ ├── security_otp.tpl │ │ ├── security_otp_recovery.tpl │ │ ├── security_password.tpl │ │ ├── security_pgp.tpl │ │ └── services.tpl │ ├── open_db.tpl │ ├── optout.tpl │ ├── password.tpl │ ├── password_change.tpl │ ├── services │ │ ├── _nav.tpl │ │ ├── _service_form.tpl │ │ ├── delete.tpl │ │ ├── details.tpl │ │ ├── edit.tpl │ │ ├── fees │ │ │ ├── _fee_form.tpl │ │ │ ├── delete.tpl │ │ │ ├── details.tpl │ │ │ ├── edit.tpl │ │ │ └── index.tpl │ │ ├── import.tpl │ │ ├── index.tpl │ │ ├── reminders │ │ │ ├── _form.tpl │ │ │ ├── delete.tpl │ │ │ ├── details.tpl │ │ │ ├── edit.tpl │ │ │ ├── index.tpl │ │ │ ├── new.tpl │ │ │ ├── preview.tpl │ │ │ └── user.tpl │ │ └── user │ │ │ ├── _choice_form.tpl │ │ │ ├── _service_user_form.tpl │ │ │ ├── add.tpl │ │ │ ├── delete.tpl │ │ │ ├── edit.tpl │ │ │ ├── index.tpl │ │ │ ├── link.tpl │ │ │ ├── payment.tpl │ │ │ └── subscribe.tpl │ ├── share.tpl │ ├── share_password.tpl │ ├── static │ │ └── upgrade_post.html │ ├── users │ │ ├── _details.tpl │ │ ├── _import_list.tpl │ │ ├── _list_actions.tpl │ │ ├── _log_list.tpl │ │ ├── _nav.tpl │ │ ├── _nav_user.tpl │ │ ├── _password_form.tpl │ │ ├── action.tpl │ │ ├── delete.tpl │ │ ├── details.tpl │ │ ├── edit.tpl │ │ ├── edit_security.tpl │ │ ├── import.tpl │ │ ├── index.tpl │ │ ├── log.tpl │ │ ├── mailing │ │ │ ├── block.tpl │ │ │ ├── delete.tpl │ │ │ ├── details.tpl │ │ │ ├── index.tpl │ │ │ ├── new.tpl │ │ │ ├── recipient_data.tpl │ │ │ ├── recipients.tpl │ │ │ ├── rejected.tpl │ │ │ ├── send.tpl │ │ │ ├── verify.tpl │ │ │ └── write.tpl │ │ ├── message.tpl │ │ ├── new.tpl │ │ ├── search.tpl │ │ └── selector.tpl │ └── web │ │ ├── _attach.tpl │ │ ├── _history.tpl │ │ ├── _list.tpl │ │ ├── _page.tpl │ │ ├── _selector.tpl │ │ ├── all.tpl │ │ ├── delete.tpl │ │ ├── edit.tpl │ │ ├── index.tpl │ │ ├── new.tpl │ │ ├── search.tpl │ │ └── sitemap.tpl └── www │ ├── _route.php │ ├── admin │ ├── _inc.php │ ├── _serviceworker.js │ ├── acc │ │ ├── _inc.php │ │ ├── accounts │ │ │ ├── all.php │ │ │ ├── deposit.php │ │ │ ├── index.php │ │ │ ├── journal.php │ │ │ ├── reconcile.php │ │ │ ├── reconcile_assist.php │ │ │ ├── simple.php │ │ │ └── users.php │ │ ├── charts │ │ │ ├── accounts │ │ │ │ ├── _inc.php │ │ │ │ ├── all.php │ │ │ │ ├── delete.php │ │ │ │ ├── edit.php │ │ │ │ ├── index.php │ │ │ │ ├── new.php │ │ │ │ └── selector.php │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ ├── export.php │ │ │ └── index.php │ │ ├── index.php │ │ ├── projects │ │ │ ├── config.php │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ └── index.php │ │ ├── reports │ │ │ ├── _inc.php │ │ │ ├── balance_sheet.php │ │ │ ├── graph_pie.php │ │ │ ├── graph_plot.php │ │ │ ├── graph_plot_all.php │ │ │ ├── graphs.php │ │ │ ├── journal.php │ │ │ ├── ledger.php │ │ │ ├── statement.php │ │ │ └── trial_balance.php │ │ ├── saved_searches.php │ │ ├── search.php │ │ ├── transactions │ │ │ ├── actions.php │ │ │ ├── creator.php │ │ │ ├── delete.php │ │ │ ├── details.php │ │ │ ├── edit.php │ │ │ ├── lock.php │ │ │ ├── new.php │ │ │ ├── pending.php │ │ │ ├── selector.php │ │ │ ├── service_user.php │ │ │ └── user.php │ │ └── years │ │ │ ├── balance.php │ │ │ ├── close.php │ │ │ ├── delete.php │ │ │ ├── download.php │ │ │ ├── edit.php │ │ │ ├── export.php │ │ │ ├── first_setup.php │ │ │ ├── import.php │ │ │ ├── index.php │ │ │ ├── links.php │ │ │ ├── lock.php │ │ │ ├── new.php │ │ │ ├── provisional.php │ │ │ ├── reopen.php │ │ │ ├── select.php │ │ │ ├── split.php │ │ │ └── unlock.php │ ├── common │ │ ├── autocomplete_address.php │ │ ├── files │ │ │ ├── _preview.php │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ ├── history.php │ │ │ ├── preview.php │ │ │ ├── rename.php │ │ │ ├── share.php │ │ │ ├── shares_list.php │ │ │ └── upload.php │ │ ├── saved_searches.php │ │ └── search.php │ ├── config │ │ ├── _inc.php │ │ ├── advanced │ │ │ ├── api.php │ │ │ ├── audit.php │ │ │ ├── errors.php │ │ │ ├── index.php │ │ │ ├── reset.php │ │ │ ├── sql.php │ │ │ └── sql_debug.php │ │ ├── backup │ │ │ ├── auto.php │ │ │ ├── documents.php │ │ │ ├── index.php │ │ │ ├── restore.php │ │ │ └── versions.php │ │ ├── categories │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ └── index.php │ │ ├── custom.php │ │ ├── desktop.php │ │ ├── disk_usage.php │ │ ├── donnees │ │ │ └── import.php │ │ ├── edit_file.php │ │ ├── ext │ │ │ ├── delete.php │ │ │ ├── details.php │ │ │ ├── diff.php │ │ │ ├── edit.php │ │ │ ├── import.php │ │ │ ├── index.php │ │ │ └── new.php │ │ ├── fields │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ ├── index.php │ │ │ └── new.php │ │ ├── index.php │ │ ├── server │ │ │ └── index.php │ │ ├── upgrade.php │ │ └── users │ │ │ ├── field_selector.php │ │ │ └── index.php │ ├── convert.php │ ├── docs │ │ ├── _inc.php │ │ ├── _move.php │ │ ├── action.php │ │ ├── index.php │ │ ├── move.php │ │ ├── new_dir.php │ │ ├── new_doc.php │ │ ├── new_file.php │ │ ├── search.php │ │ ├── shares.php │ │ └── trash.php │ ├── handle_bounce.php │ ├── index.php │ ├── install.php │ ├── legal.php │ ├── login.php │ ├── login_app.php │ ├── login_otp.php │ ├── logout.php │ ├── manifest.php │ ├── me │ │ ├── _inc.php │ │ ├── edit.php │ │ ├── export.php │ │ ├── index.php │ │ ├── preferences.php │ │ ├── security.php │ │ ├── security_otp.php │ │ ├── security_otp_recovery.php │ │ ├── security_password.php │ │ ├── security_pgp.php │ │ └── services.php │ ├── open_db.php │ ├── optout.php │ ├── password.php │ ├── services │ │ ├── _inc.php │ │ ├── delete.php │ │ ├── details.php │ │ ├── edit.php │ │ ├── fees │ │ │ ├── delete.php │ │ │ ├── details.php │ │ │ ├── edit.php │ │ │ └── index.php │ │ ├── import.php │ │ ├── index.php │ │ ├── reminders │ │ │ ├── delete.php │ │ │ ├── details.php │ │ │ ├── edit.php │ │ │ ├── index.php │ │ │ ├── new.php │ │ │ ├── preview.php │ │ │ └── user.php │ │ └── user │ │ │ ├── _form.php │ │ │ ├── add.php │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ ├── index.php │ │ │ ├── link.php │ │ │ ├── payment.php │ │ │ └── subscribe.php │ ├── share.php │ ├── share_legacy.php │ ├── static │ │ ├── admin.css │ │ ├── bg.png │ │ ├── bg_dev.png │ │ ├── doc │ │ │ ├── api.html │ │ │ ├── brindille.html │ │ │ ├── brindille_functions.html │ │ │ ├── brindille_modifiers.html │ │ │ ├── brindille_sections.html │ │ │ ├── keyboard.html │ │ │ ├── markdown.html │ │ │ ├── markdown_quickref.html │ │ │ ├── modules.html │ │ │ ├── shapes.png │ │ │ ├── skriv.html │ │ │ ├── sql.html │ │ │ └── web.html │ │ ├── favicon.png │ │ ├── font │ │ │ ├── config.json │ │ │ ├── paheko.css │ │ │ ├── paheko.eot │ │ │ ├── paheko.svg │ │ │ ├── paheko.ttf │ │ │ ├── paheko.woff │ │ │ └── paheko.woff2 │ │ ├── handheld.css │ │ ├── icon.png │ │ ├── pics │ │ │ ├── img_center.png │ │ │ ├── img_flow.png │ │ │ ├── img_left.png │ │ │ └── img_right.png │ │ ├── print.css │ │ ├── scripts │ │ │ ├── accounting.js │ │ │ ├── accounting_setup.js │ │ │ ├── accounts_list.js │ │ │ ├── advanced_search.js │ │ │ ├── auto_logout.js │ │ │ ├── code_editor.css │ │ │ ├── code_editor.js │ │ │ ├── color_helper.js │ │ │ ├── config_fields.js │ │ │ ├── dragdrop-table.js │ │ │ ├── erdiagram.js │ │ │ ├── file_drag.js │ │ │ ├── global.js │ │ │ ├── homescreen.js │ │ │ ├── inputs │ │ │ │ ├── datalist.js │ │ │ │ └── file.js │ │ │ ├── lib │ │ │ │ ├── code_editor.js │ │ │ │ ├── datepicker2.min.js │ │ │ │ ├── gibberish-aes.min.js │ │ │ │ ├── query_builder.js │ │ │ │ ├── text_editor.js │ │ │ │ ├── unzipit.min.js │ │ │ │ ├── webdav.css │ │ │ │ ├── webdav.fr.js │ │ │ │ └── webdav.js │ │ │ ├── password.js │ │ │ ├── selector.js │ │ │ ├── service_form.js │ │ │ ├── unzip_restore.js │ │ │ ├── web_editor.css │ │ │ ├── web_editor.js │ │ │ ├── web_encryption.js │ │ │ ├── web_files.js │ │ │ ├── web_gallery.js │ │ │ └── zip.js │ │ └── styles │ │ │ ├── 00-reset.css │ │ │ ├── 01-layout.css │ │ │ ├── 02-common.css │ │ │ ├── 03-forms.css │ │ │ ├── 04-dialogs.css │ │ │ ├── 05-navigation.css │ │ │ ├── 06-tables-common.css │ │ │ ├── 07-tables.css │ │ │ ├── 10-accounting.css │ │ │ ├── config.css │ │ │ ├── tables_export.css │ │ │ └── web.css │ ├── upgrade.php │ ├── users │ │ ├── _inc.php │ │ ├── action.php │ │ ├── delete.php │ │ ├── details.php │ │ ├── edit.php │ │ ├── edit_security.php │ │ ├── import.php │ │ ├── index.php │ │ ├── log.php │ │ ├── mailing │ │ │ ├── _inc.php │ │ │ ├── block.php │ │ │ ├── delete.php │ │ │ ├── details.php │ │ │ ├── index.php │ │ │ ├── new.php │ │ │ ├── recipient_data.php │ │ │ ├── recipients.php │ │ │ ├── rejected.php │ │ │ ├── send.php │ │ │ ├── verify.php │ │ │ └── write.php │ │ ├── message.php │ │ ├── new.php │ │ ├── saved_searches.php │ │ ├── search.php │ │ └── selector.php │ └── web │ │ ├── _attach.php │ │ ├── _inc.php │ │ ├── _selector.php │ │ ├── all.php │ │ ├── delete.php │ │ ├── edit.php │ │ ├── index.php │ │ ├── new.php │ │ ├── search.php │ │ └── sitemap.php │ └── index.php ├── tests ├── phpstan.config.php ├── phpstan.neon ├── psalm.xml ├── run.php ├── selenium │ ├── Makefile │ └── paheko.side └── unit_tests │ ├── 01_basic │ ├── db.php │ ├── entity.php │ ├── paths.php │ └── version.php │ ├── 02_accounting │ ├── charts.php │ └── money.php │ └── 03_api │ ├── _inc.php │ ├── accounting.php │ └── user.php └── tools ├── build_accounting_chart.php ├── build_address_database_fr.php ├── categories_as_projects.sh ├── compare_chart_csv.php ├── config └── brindille.sublime-syntax ├── doc_md_to_html.php ├── extract-credit-mutuel-csv.php ├── extract-paypal-csv.php ├── factory ├── config.local.php ├── factory_cron.sh ├── factory_cron_emails.sh └── factory_upgrade.sh ├── fossil_get_branch_hash.php ├── fossil_verify.sh ├── make_installer.php └── plugin_check_0.8.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | indent_style = tab 9 | indent_size = tab 10 | tab_width = 4 11 | -------------------------------------------------------------------------------- /.fossil-settings/allow-symlinks: -------------------------------------------------------------------------------- 1 | on -------------------------------------------------------------------------------- /.fossil-settings/ignore-glob: -------------------------------------------------------------------------------- 1 | src/data/* 2 | src/*.tar.gz 3 | src/*.asc 4 | src/*.log 5 | src/include/lib/KD2 6 | src/debug_sql.sqlite 7 | src/modules/* 8 | src/config.local.php 9 | build/windows/*.exe 10 | build/windows/php.zip 11 | build/windows/install_dir 12 | build/*.tar.gz* 13 | build/debian/*.deb 14 | src/psalm.phar -------------------------------------------------------------------------------- /.fossil-settings/manifest: -------------------------------------------------------------------------------- 1 | on -------------------------------------------------------------------------------- /.fossil-settings/pgp-command: -------------------------------------------------------------------------------- 1 | gpg -u DA0CE7BF68353D06C57041EE262CAB21E6A19229 --clearsign -o -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - '7.2' 4 | - '7.3' 5 | - '7.4' 6 | 7 | install: 8 | - make -C src deps 9 | 10 | script: 11 | - php tests/run.php 12 | 13 | notifications: 14 | irc: 15 | channels: 16 | - "chat.freenode.net#garradin" 17 | template: 18 | - "%{build_number} by %{author} on %{branch}: %{message} " 19 | - "Build details: %{build_url}" 20 | use_notice: false 21 | skip_join: true -------------------------------------------------------------------------------- /archives/0.7.2_migration.sql: -------------------------------------------------------------------------------- 1 | -- Colonne manquante 2 | ALTER TABLE rappels_envoyes ADD COLUMN id_rappel INTEGER NULL REFERENCES rappels (id); 3 | 4 | -- Un bug a permis d'insérer des comptes avec des lettres minuscules, créant des problèmes 5 | -- corrigeons donc les comptes pour les mettre en majuscules. 6 | 7 | UPDATE compta_comptes SET id = UPPER(id); 8 | 9 | -- Le champ id_auteur était à NOT NULL, il faut corriger ça pour pouvoir avoir un rapprochement anonyme 10 | -- une fois que le membre a été supprimé 11 | 12 | CREATE TABLE compta_rapprochement2 13 | -- Rapprochement entre compta et relevés de comptes 14 | ( 15 | id_operation INTEGER NOT NULL PRIMARY KEY REFERENCES compta_journal (id), 16 | date TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, 17 | id_auteur INTEGER NULL REFERENCES membres (id) 18 | ); 19 | 20 | INSERT INTO compta_rapprochement2 SELECT operation, date, auteur FROM compta_rapprochement; 21 | 22 | DROP TABLE compta_rapprochement; 23 | 24 | ALTER TABLE compta_rapprochement2 RENAME TO compta_rapprochement; -------------------------------------------------------------------------------- /archives/0.8.3_migration.sql: -------------------------------------------------------------------------------- 1 | -- Ajout d'une clause ON DELETE SET NULL sur la table cotisations 2 | ALTER TABLE cotisations_membres RENAME TO cotisations_membres_old; 3 | 4 | -- Création des tables mises à jour (et de leurs index) 5 | .read 0.8.3_schema.sql 6 | 7 | -- Copie des données 8 | INSERT INTO cotisations_membres SELECT * FROM cotisations_membres_old; 9 | 10 | -- Suppression des anciennes tables 11 | DROP TABLE cotisations_membres_old; 12 | -------------------------------------------------------------------------------- /archives/0.8.4_migration.sql: -------------------------------------------------------------------------------- 1 | -- Mise à jour des URI du wiki pour ne pas inclure les tirets en début et fin de chaîne 2 | -- (problème de concordance entre API PHP et données SQLite) 3 | UPDATE wiki_pages SET uri = trim(uri, '-') WHERE uri != trim(uri, '-'); 4 | -------------------------------------------------------------------------------- /archives/0.9.1_migration.sql: -------------------------------------------------------------------------------- 1 | -- Il manquait une clause ON DELETE SET NULL sur la foreign key 2 | -- de cotisations quand on faisait une mise à jour depuis une 3 | -- ancienne version 4 | ALTER TABLE cotisations RENAME TO cotisations_old; 5 | 6 | .read 0.9.1_schema.sql 7 | 8 | INSERT INTO cotisations SELECT * FROM cotisations_old; 9 | 10 | DROP TABLE cotisations_old; 11 | 12 | -- Changer le compte des reports automatiques 13 | UPDATE compta_journal SET compte_debit = '890' WHERE compte_debit IS NULL; 14 | UPDATE compta_journal SET compte_credit = '890' WHERE compte_credit IS NULL; 15 | -------------------------------------------------------------------------------- /build/debian/config.system.php: -------------------------------------------------------------------------------- 1 | NUL 18 | -------------------------------------------------------------------------------- /build/windows/paheko.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/build/windows/paheko.ico -------------------------------------------------------------------------------- /doc/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/doc/icon.png -------------------------------------------------------------------------------- /doc/selfhost2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/doc/selfhost2.png -------------------------------------------------------------------------------- /src/VERSION: -------------------------------------------------------------------------------- 1 | 1.3.15 2 | -------------------------------------------------------------------------------- /src/apache-htaccess.conf: -------------------------------------------------------------------------------- 1 | 2 | # FallbackResource has a bug before Apache 2.4.15, requiring to disable DirectoryIndex 3 | # see https://bz.apache.org/bugzilla/show_bug.cgi?id=58292 4 | # and https://serverfault.com/questions/559067/apache-hangs-for-five-seconds-with-fallbackresource-when-accessing 5 | DirectoryIndex disabled 6 | DirectoryIndex index.php 7 | 8 | # Redirect non-existing URLs to the router 9 | FallbackResource /_route.php 10 | 11 | # FallbackResource does not work for URLs ending with ".php" 12 | # see https://stackoverflow.com/a/66136226 13 | ErrorDocument 404 /_route.php 14 | 15 | # NextCloud/ownCloud clients cannot work without mod_rewrite 16 | 17 | Redirect 501 /remote.php 18 | Redirect 501 /status.php 19 | 20 | 21 | 22 | Require all denied 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/bin/paheko: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | run($args); 16 | -------------------------------------------------------------------------------- /src/data/index.html: -------------------------------------------------------------------------------- 1 | 404 Not Found

Not Found

The requested URL was not found on this server.

-------------------------------------------------------------------------------- /src/include/data/1.1.21_migration.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE services_fees ADD COLUMN id_analytical INTEGER NULL REFERENCES acc_accounts (id) ON DELETE SET NULL; 2 | 3 | UPDATE acc_charts SET code = 'PCA_2018' WHERE code = 'PCA2018'; 4 | UPDATE acc_charts SET code = 'PCA_1999' WHERE code = 'PCA1999'; 5 | -------------------------------------------------------------------------------- /src/include/data/1.1.25_migration.sql: -------------------------------------------------------------------------------- 1 | UPDATE plugins_signaux SET signal = 'home.banner' WHERE signal = 'accueil.banniere'; 2 | UPDATE plugins_signaux SET signal = 'reminder.send.after' WHERE signal = 'rappels.auto'; 3 | UPDATE plugins_signaux SET signal = 'email.send.before' WHERE signal = 'email.envoi'; 4 | -------------------------------------------------------------------------------- /src/include/data/1.1.29_migration.sql: -------------------------------------------------------------------------------- 1 | CREATE TEMP TABLE tmp_new_accounts (id_chart, code, label, position); 2 | 3 | -- Add missing accounts 4 | INSERT INTO tmp_new_accounts (code, label, position) VALUES 5 | ('438', 'Organismes sociaux - Charges à payer et produits à recevoir', 2), 6 | ('4382', 'Charges sociales sur congés à payer', 2), 7 | ('4386', 'Autres charges à payer', 2), 8 | ('4387', 'Produits à recevoir', 2); 9 | 10 | UPDATE tmp_new_accounts SET id_chart = (SELECT id FROM acc_charts WHERE code = 'PCA_2018'); 11 | 12 | INSERT OR IGNORE INTO acc_accounts (id_chart, code, label, position, user) SELECT *, 0 FROM tmp_new_accounts WHERE id_chart IS NOT NULL; 13 | 14 | DROP TABLE tmp_new_accounts; 15 | 16 | CREATE TEMP TABLE IF NOT EXISTS su_fix_fee (id); 17 | 18 | INSERT INTO su_fix_fee 19 | SELECT su.id FROM services_users su LEFT JOIN services_fees sf ON sf.id = su.id_fee AND sf.id_service = sf.id_service 20 | WHERE sf.id IS NULL AND su.id_fee IS NOT NULL; 21 | 22 | -- Remove id_fee from subscriptions where it belongs to another service 23 | UPDATE services_users SET id_fee = NULL WHERE id IN (SELECT id FROM su_fix_fee); -------------------------------------------------------------------------------- /src/include/data/schema.sql: -------------------------------------------------------------------------------- 1 | ../migrations/1.3/schema.sql -------------------------------------------------------------------------------- /src/include/lib/Paheko/Web/Render/Encrypted.php: -------------------------------------------------------------------------------- 1 | assign('admin_url', ADMIN_URL); 15 | $tpl->assign(compact('content')); 16 | return $tpl->fetch('common/files/_file_render_encrypted.tpl'); 17 | } 18 | 19 | public function outputHTML(string $content): string 20 | { 21 | return $content; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/include/lib/Paheko/Web/Render/Skriv.php: -------------------------------------------------------------------------------- 1 | resolveAttachment($match[1]); 23 | return $a ? $a->url() : $match[1]; 24 | }, $str); 25 | 26 | if (!isset(self::$skriv)) { 27 | self::$skriv = new SkrivLite; 28 | 29 | self::$skriv->registerExtensions(Extensions::getList()); 30 | } 31 | 32 | Extensions::setRenderer($this); 33 | 34 | $str = CommonModifiers::typo($str); 35 | $str = self::$skriv->render($str); 36 | 37 | return $str; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.10.sql: -------------------------------------------------------------------------------- 1 | UPDATE config_users_fields 2 | SET type = 'textarea', system = system | (0x01 << 6) 3 | WHERE name = 'adresse' AND (system & (0x01 << 5)); -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.11.php: -------------------------------------------------------------------------------- 1 | reload(); 10 | $df->rebuildSearchTable(); 11 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.13.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE searches RENAME COLUMN created TO updated; 2 | ALTER TABLE searches ADD COLUMN description TEXT NULL; 3 | 4 | INSERT INTO config (key, value) VALUES ('analytical_mandatory', 0); 5 | 6 | -- Put 580 account into "internal" 7 | UPDATE acc_accounts SET type = 16 WHERE code = '580'; 8 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.14.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX IF NOT EXISTS acc_transactions_creator ON acc_transactions (id_creator); 2 | 3 | CREATE TABLE IF NOT EXISTS acc_years_provisional 4 | -- Provisional (prévisionnel) 5 | ( 6 | id_year INTEGER NOT NULL REFERENCES acc_years (id) ON DELETE CASCADE, 7 | id_account INTEGER NOT NULL REFERENCES acc_accounts (id) ON DELETE CASCADE, 8 | amount INTEGER NOT NULL 9 | ); 10 | 11 | CREATE UNIQUE INDEX IF NOT EXISTS acc_years_provisional_id_year ON acc_years_provisional (id_year, id_account); 12 | 13 | UPDATE acc_charts SET label = 'Plan comptable associatif (2018, révision 2024)' WHERE code = 'fr_pca_2018'; 14 | UPDATE acc_charts SET label = 'Plan comptable général, pour entreprises (2014, révision 2024)' WHERE code = 'fr_pcg_2014'; 15 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.14_recus.sql: -------------------------------------------------------------------------------- 1 | -- In previous version of reçus fiscaux, the transaction ID 2 | -- was saved in id_year instead of the real year ID, let's try to fix this 3 | CREATE TEMP TABLE recus_years (id, id_year); 4 | 5 | INSERT INTO recus_years 6 | SELECT r.id, t.id_year 7 | FROM module_data_recus_fiscaux r 8 | LEFT JOIN acc_years y ON y.id = json_extract(r.document, '$.id_year') 9 | LEFT JOIN acc_transactions t ON t.id = json_extract(r.document, '$.id_year') 10 | WHERE 11 | json_extract(r.document, '$.id_year') IS NOT NULL 12 | AND y.id IS NULL; 13 | 14 | UPDATE module_data_recus_fiscaux AS m 15 | SET document = json_patch(document, json_object('id_year', (SELECT id_year FROM recus_years WHERE id = m.id))) 16 | WHERE EXISTS(SELECT id FROM recus_years WHERE id = m.id); 17 | 18 | DROP TABLE recus_years; 19 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.2.sql: -------------------------------------------------------------------------------- 1 | UPDATE config_users_fields SET default_value = 'NOW()' WHERE default_value = '''=NOW''' OR default_value = '=NOW'; 2 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.5.sql: -------------------------------------------------------------------------------- 1 | CREATE VIEW IF NOT EXISTS users_view AS SELECT * FROM users; 2 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.8.php: -------------------------------------------------------------------------------- 1 | rebuildSearchTable(); 16 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.8.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE acc_charts RENAME TO acc_charts_old; 2 | 3 | -- Make country code nullable 4 | CREATE TABLE IF NOT EXISTS acc_charts 5 | -- Accounting charts (plans comptables) 6 | ( 7 | id INTEGER NOT NULL PRIMARY KEY, 8 | country TEXT NULL, 9 | code TEXT NULL, -- the code is NULL if the chart is user-created or imported 10 | label TEXT NOT NULL, 11 | archived INTEGER NOT NULL DEFAULT 0 -- 1 = archived, cannot be changed 12 | ); 13 | 14 | INSERT INTO acc_charts SELECT * FROM acc_charts_old; 15 | DROP TABLE acc_charts_old; 16 | 17 | UPDATE files_search 18 | SET title = (SELECT title FROM web_pages WHERE path = 'web/' || uri) 19 | WHERE EXISTS (SELECT title FROM web_pages WHERE path = 'web/' || uri); 20 | 21 | UPDATE config SET value = NULL WHERE value = '' AND key IN ('color1', 'color2'); 22 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.9.php: -------------------------------------------------------------------------------- 1 | getLocalFile($name)) { 14 | $text = $file->fetch(); 15 | $replaced = preg_replace('/(?setContent($replaced); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/include/migrations/1.3/1.3.9.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX IF NOT EXISTS plugins_menu ON plugins(menu, enabled); 2 | CREATE INDEX IF NOT EXISTS modules_menu ON modules(menu, enabled); 3 | -------------------------------------------------------------------------------- /src/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Erreur

4 |

Paheko n'est pas installé sur un sous-domaine dédié.

5 |

Ce mode de fonctionnement n'est pas supporté officiellement.

6 | 7 |

Installation conseillée

8 |

Le mode conseillé est de positionner un sous-domaine dédié (virtual host ou vhost) sur le répertoire www/

9 |

Voir la documentation.

10 | 11 |

Installation dans un sous-répertoire, sans virtual host (non conseillé)

12 | 13 |

Voir la documentation dédiée pour configurer Paheko correctement et faire disparaître ce message d'erreur.

-------------------------------------------------------------------------------- /src/templates/_foot.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | {if $is_logged} 4 | {* Keep session alive by requesting renewal every before it expires *} 5 | 21 | {/if} 22 | 23 | 26 | 27 | {if $layout === 'public'} 28 | 33 | {/if} 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/templates/acc/_table_actions.tpl: -------------------------------------------------------------------------------- 1 | Pour les écritures cochées : 2 | 3 | {csrf_field key="projects_action"} 4 | 9 | 12 | -------------------------------------------------------------------------------- /src/templates/acc/_year_select.tpl: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /src/templates/acc/accounts/_nav.tpl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/templates/acc/charts/_nav.tpl: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/templates/acc/charts/accounts/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un compte" current="acc/years"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce plan comptable ?" 5 | warning="Êtes-vous sûr de vouloir supprimer le compte « %s — %s » ?"|args:$account.code,$account.label 6 | } 7 | 8 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/charts/accounts/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier un compte" current="acc/years"} 2 | 3 | {include file="acc/charts/accounts/_nav.tpl" current="new"} 4 | 5 | {form_errors} 6 | 7 |
8 | 9 | {if !$can_edit} 10 |

11 | Il n'est pas possible de modifier le libellé, le numéro ou la position de ce compte car il {if $account.user}est utilisé dans des exercices clôturés{else}fait partie du plan comptable officiel{/if}.
12 | Pour pouvoir modifier ce compte pour un nouvel exercice, il est conseillé de créer un nouveau plan comptable en y recopiant l'ancien plan comptable. 13 |

14 | {/if} 15 | 16 |
17 | Modifier un compte 18 | {include file="acc/charts/accounts/_account_form.tpl" create=false} 19 |
20 | 21 |

22 | {csrf_field key="acc_accounts_edit_%s"|args:$account.id} 23 | {button type="submit" name="edit" label="Enregistrer" shape="right" class="main"} 24 |

25 | 26 |
27 | 28 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/charts/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un plan comptable" current="acc/years"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce plan comptable ?" 5 | warning="Êtes-vous sûr de vouloir supprimer le plan comptable « %s » ?"|args:$chart.label 6 | csrf_key="acc_charts_delete_%s"|args:$chart.id 7 | } 8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/charts/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier un plan comptable" current="acc/years"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Modifier un plan comptable 8 |
9 | {input type="text" name="label" label="Libellé" required=1 source=$chart disabled=$chart.code} 10 | {if !$chart.code && !$chart.country} 11 | {include file="./_country_input.tpl"} 12 | {/if} 13 |
14 | {input type="checkbox" name="archived" value="1" source=$chart label="Plan comptable archivé" help="Ce plan comptable ne pourra plus être modifié ni utilisé dans un nouvel exercice"} 15 |
16 |

17 | {csrf_field key="acc_charts_edit_%d"|args:$chart.id} 18 | {button type="submit" name="save" label="Enregistrer" shape="right" class="main"} 19 |

20 |
21 |
22 | 23 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/projects/_nav.tpl: -------------------------------------------------------------------------------- 1 | {if !$dialog} 2 | 25 | {/if} -------------------------------------------------------------------------------- /src/templates/acc/projects/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un projet" current="acc/years"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce projet ?" 5 | warning="Êtes-vous sûr de vouloir supprimer le projet « %s » ?"|args:$project.label 6 | info="Le contenu des écritures comptables ne sera pas modifiées, seule l'affectation à ce projet sera supprimée."} 7 | 8 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/projects/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Projet" current="acc/years"} 2 | 3 | {include file="./_nav.tpl" current=null} 4 | 5 | {form_errors} 6 | 7 |
8 |
9 | {if $project->exists()}Modifier un projet{else}Créer un projet{/if} 10 |
11 | {input type="text" required=true name="label" label="Libellé du projet" source=$project} 12 | {input type="text" name="code" label="Code du projet" source=$project help="Utile pour retrouver le projet rapidement. Ne peut contenir que des chiffres et des lettres majuscules." pattern="[0-9A-Z_]+"} 13 | {input type="textarea" name="description" label="Description du projet" source=$project} 14 |
Archivage
15 | {input type="checkbox" name="archived" label="Archiver ce projet" value=1 source=$project help="Si coché, ce projet ne sera plus proposé dans la sélection de projets lors de la saisie d'une écriture."} 16 |
17 |
18 | 19 |

20 | {csrf_field key=$csrf_key} 21 | {button type="submit" name="save" label="Enregistrer" shape="right" class="main"} 22 |

23 |
24 | 25 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/reports/_statement_table.tpl: -------------------------------------------------------------------------------- 1 | 2 | {if !empty($caption)} 3 | 4 | {/if} 5 | {if !empty($year2)} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {/if} 16 | 17 | {foreach from=$accounts item="account"} 18 | 19 | 24 | 25 | {if isset($year2)} 26 | 27 | {/if} 28 | 29 | {if isset($year2)} 30 | 31 | {/if} 32 | 33 | {/foreach} 34 | 35 |

{$caption}

{$year2->label_years()}{$year->label_years()}Écart
20 | {if !empty($year) && $account.id}{$account.code} 21 | {else}{$account.code} 22 | {/if} 23 | {$account.label}{$account.balance2|raw|money:false}{$account.balance|raw|money:false}{$account.change|raw|money:false:true}
-------------------------------------------------------------------------------- /src/templates/acc/reports/balance_sheet.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%sBilan"|args:$title current="acc/years" prefer_landscape=true} 2 | 3 | {include file="acc/reports/_header.tpl" current="balance_sheet" title="Bilan" allow_compare=true allow_filter=true} 4 | 5 |

Le bilan représente une image de votre organisation : l'actif étant ce que l'organisation possède comme ressources (immeubles, comptes en banque, outillage, etc.), et le passif représente comment l'organisation a obtenu ces ressources (dettes, fonds de réserve, résultat…). En gros : à gauche = ce qu'on a, à droite = comment on l'a obtenu.

6 | 7 | {if $balance.sums.asset != $balance.sums.liability} 8 |

9 | Le bilan n'est pas équilibré !
10 | Vérifiez que vous n'avez pas oublié de reporter des soldes depuis le précédent exercice. 11 |

12 | {/if} 13 | 14 | {include file="acc/reports/_statement.tpl" statement=$balance} 15 | 16 |

Toutes les écritures sont libellées en {$config.currency}.

17 | 18 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/reports/graphs.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%sGraphiques"|args:$title current="acc/years" prefer_landscape=true} 2 | 3 | {include file="acc/reports/_header.tpl" current="graphs" title="Graphiques" allow_filter=false} 4 | 5 | {if $nb_transactions < 3} 6 |

Il n'y a pas encore suffisamment d'écritures dans cet exercice pour pouvoir afficher les statistiques.

7 | {else} 8 |
9 |
10 | {foreach from=$graphs key="url" item="label"} 11 |
12 | 13 |
{$label}
14 |
15 | {/foreach} 16 |
17 |
18 | 19 |

20 | En raison des arrondis, la somme des pourcentages peut ne pas être égale à 100%. 21 |

22 | {/if} 23 | 24 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/reports/journal.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%sJournal général"|args:$title current="acc/years" prefer_landscape=true} 2 | 3 | {include file="acc/reports/_header.tpl" current="journal" title="Journal général" allow_filter=true} 4 | 5 | {include file="acc/reports/_journal.tpl"} 6 | 7 |

Toutes les écritures sont libellées en {$config.currency}.

8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/reports/statement.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%sCompte de résultat"|args:$title current="acc/years" prefer_landscape=true} 2 | 3 | {include file="acc/reports/_header.tpl" current="statement" title="Compte de résultat" allow_compare=true allow_filter=true} 4 | 5 |

Le compte de résultat indique les dépenses (charges) et recettes (produits), ainsi que le résultat réalisé.

6 | 7 | {include file="acc/reports/_statement.tpl" statement=$general} 8 | 9 | {if !empty($volunteering.body_left) || !empty($volunteering.body_right)} 10 |

Contributions bénévoles en nature

11 | {include file="acc/reports/_statement.tpl" statement=$volunteering header=false caption1="Emplois des contributions volontaires en nature" caption2="Contributions volontaires en nature" caption="Contributions bénévoles en nature"} 12 | {/if} 13 | 14 |

Toutes les écritures sont libellées en {$config.currency}.

15 | 16 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/_pending_message.tpl: -------------------------------------------------------------------------------- 1 |

2 | { 3 | {Il y a une dette ou créance à régler dans un autre exercice.} 4 | {Il y a %n dettes ou créances à régler dans d'autres exercices.} 5 | n=$pending_count 6 | }
7 | {linkbutton href="!acc/transactions/pending.php" label="Voir les dettes et créances en attente" shape="menu"} 8 |

9 | -------------------------------------------------------------------------------- /src/templates/acc/transactions/actions_delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer %d écritures"|args:$count current="acc"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ces écritures ?" 5 | warning="Êtes-vous sûr de vouloir supprimer %d écritures ?"|args:$count 6 | confirm="Cocher cette case pour confirmer la suppression" 7 | csrf_key=$csrf_key 8 | extra=$extra 9 | } 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/creator.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Écritures créées par %s"|args:$transaction_creator->name() current="acc/accounts"} 2 | 3 |

4 | De la plus récente à la plus ancienne. 5 |

6 | 7 | {include file="acc/reports/_journal.tpl"} 8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer l'écriture n°%d"|args:$transaction.id current="acc"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer cette écriture ?" 5 | warning="Êtes-vous sûr de vouloir supprimer l'écriture n°%d « %s » ?"|args:$transaction.id,$transaction.label 6 | csrf_key=$csrf_key 7 | } 8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modification d'une écriture" current="acc/simple"} 2 | 3 | {include file="./_form.tpl"} 4 | 5 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/lock.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Verrouiller une écriture" current="acc"} 2 | 3 |
4 | {form_errors} 5 | 6 |
7 | Verrouiller une écriture 8 |

9 | Le verrouillage (aussi appelé validation) d'écritures permet d'empêcher leur modification. 10 |

11 |

12 | Attention : une fois verrouillée, l'écriture ne pourra plus être modifiée ni supprimée. 13 |

14 |
15 | 16 |

17 | {csrf_field key=$csrf_key} 18 | {button type="submit" name="lock" label="Verrouiller" shape="right" class="main"} 19 |

20 | 21 |
22 | 23 | 24 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/transactions/new.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Saisie d'une écriture" current="acc/new"} 2 | 3 | {include file="acc/_year_select.tpl"} 4 | 5 | {if !empty($duplicate_from)} 6 |

7 | Cette saisie est dupliquée depuis l'écriture {link class="num" href="details.php?id=%d"|args:$duplicate_from label="#%d"|args:$duplicate_from} 8 |

9 | {/if} 10 | 11 | {if isset($snippets)} 12 | {$snippets|raw} 13 | {/if} 14 | 15 | {include file="./_form.tpl"} 16 | 17 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/years/_provisional_table.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {if $edit} 6 | 7 | 8 | 9 | {else} 10 | 11 | 12 | {/if} 13 | 14 | 15 | 16 | {foreach from=$table item="row"} 17 | 18 | {if $edit} 19 | 22 | 23 | 24 | {else} 25 | 28 | 29 | 30 | {/if} 31 | 32 | {/foreach} 33 | 34 |
CompteMontantCompteMontant
20 | {input type="list" target="!acc/charts/accounts/selector.php?types=%s&id_year=%d"|args:$type:$year.id name="lines[account][]" default=$row.account_selector} 21 | {input type="money" name="lines[amount][]" default=$row.amount}{button type="button" shape="minus" class="remove" title="Supprimer cette ligne"} 26 | {link class="num" href="!acc/accounts/journal.php?id=%d&year=%d"|args:$row.id_account:$year.id label=$row.code} 27 | {$row.label}{$row.amount|raw|money}
-------------------------------------------------------------------------------- /src/templates/acc/years/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un exercice" current="acc/years"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer cet exercice ?" 5 | warning="Êtes-vous sûr de vouloir supprimer l'exercice « %s » et ses %d écritures ?"|args:$year.label,$nb_transactions 6 | alert="Attention, il ne sera pas possible de récupérer les écritures supprimées." 7 | confirm="Cocher cette case pour confirmer la suppression de cet exercice et des %d écritures liées."|args:$nb_transactions 8 | csrf_key="acc_years_delete_%s"|args:$year.id 9 | } 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/years/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier un exercice" current="acc/years"} 2 | 3 | {form_errors} 4 | 5 |
6 | 7 |
8 | Modifier un exercice 9 |
10 | {input type="text" label="Libellé" name="label" source=$year required=true} 11 |
12 |
13 |
14 | Dates 15 |
16 | {input type="date" label="Début de l'exercice" name="start_date" source=$year required=true} 17 | {input type="date" label="Fin de l'exercice" name="end_date" source=$year required=true} 18 |
19 |
20 | 21 |

22 | {csrf_field key=$csrf_key} 23 | {button type="submit" name="edit" label="Enregistrer" shape="right" class="main"} 24 |

25 | 26 |
27 | 28 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/years/lock.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Verrouiller un exercice" current="config"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Verrouiller un exercice 8 |

Verrouiller l'exercice « {$year.label} » ?

9 |

L'exercice ne pourra plus être modifié, aucune écriture ne pourra être modifiée ou supprimée. Mais il pourra être déverrouillé à tout moment.

10 |

Le verrouillage permet de préparer la clôture de l'exercice, en s'assurant qu'il n'est pas modifié par erreur si on travaille sur plusieurs exercices en même temps.

11 |
12 |

13 | {csrf_field key=$csrf_key} 14 | {button type="submit" name="lock" label="Verrouiller cet exercice" shape="lock" class="main"} 15 |

16 |
17 | 18 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/years/reopen.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Réouvrir un exercice clôturé" current="config"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Réouvrir un exercice clôturé 8 |

Ré-ouvrir l'exercice « {$year.label} » ?

9 |

10 | L'exercice sera réouvert, mais une écriture sera ajoutée au journal général indiquant que celui-ci a été réouvert après clôture. Cette écriture ne peut pas être supprimée. 11 |

12 |

Cette opération est sensée être exceptionnelle, et inhabituelle.

13 |
14 | {input type="checkbox" name="confirm" label="Je confirme la réouverture de cet exercice" value=1} 15 |
16 |
17 |

18 | {csrf_field key=$csrf_key} 19 | {button type="submit" name="reopen" label="Réouvrir cet exercice" shape="reset" class="main"} 20 |

21 |
22 | 23 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/acc/years/unlock.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Réouvrir un exercice clôturé" current="config"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Déverrouiller un exercice 8 |

Déverrouiller l'exercice « {$year.label} » ?

9 |
10 |

11 | {csrf_field key=$csrf_key} 12 | {button type="submit" name="unlock" label="Déverrouiller cet exercice" shape="unlock" class="main"} 13 |

14 |
15 | 16 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/common/_csv_help.tpl: -------------------------------------------------------------------------------- 1 |
2 | Merci de respecter les règles suivantes : 3 | 19 |
-------------------------------------------------------------------------------- /src/templates/common/files/_file_render_encrypted.tpl: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |

Cette page est chiffrée. 9 | 10 |

11 |
12 | -------------------------------------------------------------------------------- /src/templates/common/files/_preview.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title=$file.name layout="raw preview" hide_title=true custom_css=["/content.css"]} 2 | 3 | {$content|raw} 4 | 5 | {include file="_foot.tpl"} 6 | -------------------------------------------------------------------------------- /src/templates/common/files/_share_nav.tpl: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/templates/common/files/edit_code.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Édition de fichier"} 2 | 3 | {form_errors} 4 | 5 |
6 |

7 | {input type="textarea" name="content" cols="90" rows="50" default=$content} 8 |

9 | 10 |

11 | {csrf_field key=$csrf_key} 12 | {button type="submit" name="save" label="Enregistrer et fermer" shape="right" class="main"} 13 |

14 |
15 | 16 | 17 | 18 | {include file="_foot.tpl"} 19 | -------------------------------------------------------------------------------- /src/templates/common/files/edit_web.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Édition de fichier" custom_js=['web_editor.js']} 2 | 3 |
4 | 5 |

6 | {input type="textarea" name="content" cols="70" rows="30" default=$content data-preview-url="!common/files/_preview.php?f=%s"|local_url|args:$path data-fullscreen="1" data-attachments="0" data-savebtn="1" data-format=$format} 7 |

8 | 9 |

10 | {csrf_field key=$csrf_key} 11 | {button type="submit" name="save" label="Enregistrer et fermer" shape="right" class="main"} 12 |

13 | 14 |
15 | 16 | {include file="_foot.tpl"} 17 | -------------------------------------------------------------------------------- /src/templates/common/files/history_rename.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Nommer une version" current=null} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Nommer une version 8 |
9 |
Nom actuel
10 |
11 | {input type="text" name="new_name" required="required" label="Nouveau nom" default=$version.name} 12 |
13 |

14 | {csrf_field key=$csrf_key} 15 | {button type="submit" name="rename" value=$version.version label="Renommer" shape="right" class="main"} 16 |

17 |
18 |
19 | 20 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/common/files/rename.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Renommer" current=null} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Renommer 8 |
9 |
Nom actuel
10 |
11 | {input type="text" name="new_name" required="required" label="Nouveau nom" default=$file.name} 12 |
13 |

14 | {csrf_field key=$csrf_key} 15 | {button type="submit" name="rename" label="Renommer" shape="right" class="main"} 16 |

17 |
18 |
19 | 20 | 28 | 29 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/common/files/shares_list.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Partages existants" current="docs"} 2 | 3 | {include file="./_share_nav.tpl" current="list"} 4 | 5 | {form_errors} 6 | 7 |
8 | {if $list->count()} 9 | {include file="common/dynamic_list_head.tpl"} 10 | {foreach from=$list->iterate() item="row"} 11 | 12 | {$row.user_name} 13 | {$sharing_options[$row.option]} 14 | {if !$row.expiry}jamais{else}{$row.expiry|relative_date:true}{/if} 15 | {if $row.password}{tag label="Oui" color="indianred"}{/if} 16 | {$row.created|relative_date:true} 17 | 18 | {button shape="delete" name="delete" type="submit" value=$row.hash_id label="Supprimer"} 19 | {linkbutton shape="link" label="Lien" href="share.php?h=%s&s=%s"|args:$file.hash_id:$row.hash_id} 20 | 21 | 22 | {/foreach} 23 | 24 | 25 | {csrf_field key=$csrf_key} 26 | {else} 27 |

Il n'y a aucun lien de partage existant pour ce fichier.

28 | {/if} 29 |
30 | 31 | 32 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/common/files/upload.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Envoi de fichier"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Téléverser des fichiers 8 |
9 | {input type="file" name="file[]" multiple=$multiple label="Fichiers à envoyer" data-enhanced=1} 10 |
11 |

12 | {csrf_field key=$csrf_key} 13 | {button type="submit" name="upload" label="Envoyer" shape="upload" class="main"} 14 |

15 |
16 |
17 | 18 | {include file="_foot.tpl"} 19 | -------------------------------------------------------------------------------- /src/templates/config/advanced/audit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Journal d'audit — Historique des actions des membres" current="config"} 2 | 3 | {include file="../_menu.tpl" current="advanced" sub_current="audit"} 4 | 5 |

6 | Cette page liste les tentatives de connexion, les modifications de mot de passe ou d'identifiant, et toutes les actions de création, suppression ou modification effectuées par tous les membres. 7 |

8 | 9 | {if $list->count()} 10 | {include file="users/_log_list.tpl"} 11 | {else} 12 |

13 | Aucune activité trouvée. 14 |

15 | {/if} 16 | 17 | 18 | 19 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/config/backup/_menu.tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/config/backup/versions_delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Suppression des anciennes versions" current="config"} 2 | 3 | {include file="config/_menu.tpl"} 4 | 5 | {assign var="size_bytes" value=$disk_use|size_in_bytes} 6 | 7 | {include file="common/delete_form.tpl" 8 | legend="Supprimer les anciennes versions ?" 9 | warning="Libérer %s d'espace disque en supprimant toutes les anciennes versions ?"|args:$size_bytes 10 | alert="Après cette action, seule la dernière version de chaque fichier sera conservée." 11 | info="Même les versions nommées seront supprimées."} 12 | 13 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/config/categories/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer une catégorie de membre" current="config"} 2 | 3 | {include file="config/_menu.tpl" current="categories"} 4 | 5 | {include file="common/delete_form.tpl" 6 | legend="Supprimer cette catégorie de membres ?" 7 | warning="Êtes-vous sûr de vouloir supprimer la catégorie « %s » ?"|args:$cat.name 8 | alert="Attention, la catégorie ne doit plus contenir de membres pour pouvoir être supprimée." 9 | info="Les écritures comptables liées à l'historique des membres inscrits à cette activité ne seront pas supprimées, et la comptabilité demeurera inchangée."} 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/config/edit_image.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Envoi d'image"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Téléverser un fichier 8 |
9 | {input type="file" name="file" label="Fichier à envoyer" data-enhanced=1} 10 |
11 |

12 | {csrf_field key=$csrf_key} 13 | {button type="submit" name="upload" label="Envoyer" shape="upload" class="main"} 14 | {button type="submit" name="reset" label="Supprimer" shape="delete"} 15 |

16 |
17 |
18 | 19 | {include file="_foot.tpl"} 20 | -------------------------------------------------------------------------------- /src/templates/config/ext/diff.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Différences" current="config" hide_title=true} 2 | 3 |

Différences avec le fichier d'origine

4 | 5 | {diff old=$dist new=$local} 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/config/ext/index.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Extensions" current="config"} 2 | 3 | {include file="config/_menu.tpl" current="ext"} 4 | 5 | {include file="./_nav.tpl" current=$current ext=null} 6 | 7 |

Les extensions apportent des fonctionnalités supplémentaires, et peuvent être activées selon vos besoins.

8 | 9 | {form_errors} 10 | 11 |
12 | {foreach from=$list item="item"} 13 | {include file="./_details.tpl" item=$item} 14 | {/foreach} 15 |
16 | 17 |

18 | La mention Modifiable indique que cette extension est un module que vous pouvez modifier. 19 |

20 | 21 |

22 | {linkbutton shape="help" label="Comment modifier et développer des modules" href="!static/doc/modules.html" target="_dialog"} 23 | {linkbutton shape="plus" label="Créer un module" href="new.php" target="_dialog"} 24 | {linkbutton shape="import" label="Importer un module" href="import.php" target="_dialog"} 25 |

26 | 27 | 28 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/config/fields/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un champ" current="config"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce champ ?" 5 | confirm="Cocher cette case pour supprimer le champ, cela effacera de manière permanente cette donnée de toutes les fiches membres." 6 | warning="Êtes-vous sûr de vouloir supprimer le champ « %s » ?"|args:$field.label 7 | alert="Attention, ce champ ainsi que les données qu'il contient seront supprimés de toutes les fiches membres existantes." 8 | } 9 | 10 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/docs/action_delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer %d fichiers"|args:$count current="docs"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ces fichiers ?" 5 | warning="Êtes-vous sûr de vouloir mettre %d fichiers à la corbeille ?"|args:$count 6 | csrf_key=$csrf_key 7 | extra=$extra 8 | } 9 | 10 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/docs/action_move_to_transaction.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Déplacer des fichiers vers une écriture" current="docs"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Déplacer des fichiers vers une écriture 8 |

{{%n fichier sélectionné.}{%n fichiers sélectionnés.} n=$count}

9 |
10 | {input type="number" label="Numéro d'écriture" required=true name="id"} 11 |
12 |

13 | {button shape="right" label="Déplacer" name="move" type="submit" class="main"} 14 |

15 |
16 | {csrf_field key=$csrf_key} 17 | 18 | {foreach from=$check key="key" item="value"} 19 | 20 | {/foreach} 21 | 22 | 23 | 24 |
25 | 26 | {include file="_foot.tpl"} 27 | -------------------------------------------------------------------------------- /src/templates/docs/action_zip.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Télécharger des fichiers" current="acc/docs"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Télécharger {$count} fichiers en ZIP… 8 | 9 |

10 | Vous allez télécharger un fichier ZIP de {$size|size_in_bytes}. 11 |

12 |
13 | 14 |

15 | {csrf_field key=$csrf_key} 16 | {button type="submit" name="zip" label="Télécharger" shape="right" class="main"} 17 | 18 | {if isset($extra)} 19 | {foreach from=$extra key="key" item="value"} 20 | {if is_array($value)} 21 | {foreach from=$value key="subkey" item="subvalue"} 22 | 23 | {/foreach} 24 | {else} 25 | 26 | {/if} 27 | {/foreach} 28 | {/if} 29 |

30 | 31 |
32 | 33 | 36 | 37 | {include file="_foot.tpl"} 38 | -------------------------------------------------------------------------------- /src/templates/docs/new_dir.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Créer un dossier"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Créer un dossier 8 |
9 | {input type="text" minlength="1" name="name" required="required" label="Nom du dossier à créer"} 10 |
11 |

12 | {csrf_field key=$csrf_key} 13 | {button type="submit" name="create" label="Créer le dossier" shape="plus" class="main"} 14 |

15 |
16 |
17 | 18 | {include file="_foot.tpl"} 19 | -------------------------------------------------------------------------------- /src/templates/docs/new_doc.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Créer un document"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Créer un document 8 |
9 | {input type="text" minlength="1" name="name" required="required" label="Nom du document à créer"} 10 |
11 |

12 | {csrf_field key=$csrf_key} 13 | {button type="submit" name="create" label=$submit_name shape="plus" class="main"} 14 |

15 |
16 |
17 | 18 | 33 | 34 | {include file="_foot.tpl"} 35 | -------------------------------------------------------------------------------- /src/templates/docs/new_file.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Créer un fichier texte"} 2 | 3 | {form_errors} 4 | 5 |
6 |
7 | Créer un fichier texte 8 |
9 | {input type="text" minlength="1" name="name" required="required" label="Nom du fichier à créer"} 10 |
11 |

12 | {csrf_field key=$csrf_key} 13 | {button type="submit" name="create" label="Créer le fichier" shape="plus" class="main"} 14 |

15 |
16 |
17 | 18 | 37 | 38 | {include file="_foot.tpl"} 39 | -------------------------------------------------------------------------------- /src/templates/docs/search.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Rechercher dans les fichiers" current="docs"} 2 | 3 |
4 |
5 | Rechercher un fichier 6 |

7 | 8 | {button type="submit" name="search" label="Chercher" shape="search" class="main"} 9 |

10 |
11 |
12 | 13 | {if $query} 14 |

15 | {$results_count} fichiers trouvés pour « {$query} » 16 |

17 | 18 |
19 | {foreach from=$results item="result"} 20 |
21 |

{$result.breadcrumbs}

22 |

{$result.title_snippet|escape|restore_snippet_markup}

23 |

{$result.snippet|escape|restore_snippet_markup}

24 |
25 | {/foreach} 26 |
27 | {/if} 28 | 29 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/docs/trash_delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer %d fichiers"|args:$count current="docs"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ces fichiers ?" 5 | warning="Êtes-vous sûr de vouloir supprimer définitivement %d fichiers ?"|args:$count 6 | confirm="Cocher cette case pour confirmer la suppression" 7 | csrf_key=$csrf_key 8 | extra=$extra 9 | } 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/emails/login_changed.tpl: -------------------------------------------------------------------------------- 1 | {assign var="subject" value="Votre identifiant de connexion a été modifié"} 2 | 3 | Vos informations de connexion ont été modifiées. 4 | 5 | Votre nouvel identifiant de connexion est le suivant : 6 | 7 | {$new_login} 8 | 9 | Vous pouvez utiliser cet identifiant pour vous connecter 10 | à votre association à l'adresse suivante : 11 | 12 | {$admin_url} 13 | 14 | Ce message est envoyé automatiquement lorsque votre identifiant est modifié. -------------------------------------------------------------------------------- /src/templates/emails/password_changed.tpl: -------------------------------------------------------------------------------- 1 | {assign var="subject" value="Mot de passe modifié"} 2 | 3 | Le mot de passe de votre compte a bien été modifié, conformément à votre demande. 4 | 5 | La demande émanait de l'adresse IP : 6 | {$ip} 7 | 8 | Si vous n'avez pas demandé à changer votre mot de passe, merci de nous le signaler. 9 | 10 | Pour rappel, votre identifiant de connexion est : 11 | {$login} 12 | 13 | Pour vous reconnecter, utilisez cette adresse : 14 | {$admin_url} 15 | 16 | Ce message est envoyé automatiquement lorsque votre mot de passe est modifié. -------------------------------------------------------------------------------- /src/templates/emails/password_recovery.tpl: -------------------------------------------------------------------------------- 1 | {assign var="subject" value="Mot de passe perdu ?"} 2 | 3 | Vous avez oublié votre mot de passe ? Pas de panique ! 4 | 5 | Il vous suffit de cliquer sur le lien ci-dessous pour modifier votre mot de passe : 6 | 7 | {$recovery_url} 8 | 9 | Si vous n'avez pas demandé à recevoir ce message, ignorez-le, votre mot de passe restera inchangé. 10 | -------------------------------------------------------------------------------- /src/templates/emails/verify_email.tpl: -------------------------------------------------------------------------------- 1 | {assign var="subject" value="Confirmez votre adresse e-mail"} 2 | 3 | Pour vérifier votre adresse e-mail pour notre association, 4 | merci de bien vouloir cliquer sur le lien ci-dessous : 5 | 6 | {$verify_url} 7 | -------------------------------------------------------------------------------- /src/templates/index.html: -------------------------------------------------------------------------------- 1 | 404 Not Found

Not Found

The requested URL was not found on this server.

-------------------------------------------------------------------------------- /src/templates/login_otp.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Connexion — double facteur" current="login"} 2 | 3 | {form_errors} 4 | 5 |
6 | 7 |
8 | Double authentification (second facteur TOTP) 9 |
10 | {input type="text" class="otp" minlength=6 maxlength=6 label="Code TOTP" name="code" help="Entrez ici le code donné par l'application de de double authentification." required=true} 11 |
Si vous avez perdu votre téléphone, vous pouvez indiquer un code de secours à la place.
12 |
13 |
14 | 15 |

16 | {csrf_field key=$csrf_key} 17 | {button type="submit" name="login" label="Se connecter" shape="right" class="main"} 18 |

19 | 20 |
21 | 22 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/me/_nav.tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/me/_security_confirm_password.tpl: -------------------------------------------------------------------------------- 1 | {if !isset($help)} 2 | {assign var="help" value="Entrez votre mot de passe actuel pour confirmer les changements."} 3 | {/if} 4 | 5 | {if !isset($name)} 6 | {assign var="name" value="confirm"} 7 | {/if} 8 | 9 |
10 | Confirmation 11 | {if isset($warning)} 12 |

{$warning}

13 | {/if} 14 |
15 | {input type="password" name="password_check" label="Mot de passe actuel" help=$help autocomplete="current-password" required=true} 16 |
17 |
18 | 19 |

20 | {csrf_field key=$csrf_key} 21 | {button type="submit" name=$name label="Confirmer" shape="right" class="main"} 22 |

23 | -------------------------------------------------------------------------------- /src/templates/me/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Mes informations personnelles" current="me"} 2 | 3 | {include file="./_nav.tpl" current="me"} 4 | 5 | {form_errors} 6 | 7 |
8 | 9 |
10 | Informations personnelles 11 |
12 | {foreach from=$fields item="field"} 13 | {edit_user_field field=$field user=$user context="user_edit"} 14 | {/foreach} 15 |
16 |
17 | 18 |
19 | Changer mon mot de passe 20 |

{link href="!me/security.php" label="Modifier mon mot de passe ou autres informations de sécurité"}

21 |
22 | 23 |

24 | {csrf_field key=$csrf_key} 25 | {button type="submit" name="save" label="Enregistrer" shape="right" class="main"} 26 |

27 | 28 |
29 | 30 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/me/index.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Mes informations personnelles" current="me"} 2 | 3 | {include file="./_nav.tpl" current="me"} 4 | 5 | {if $ok !== null} 6 |

7 | Les modifications ont bien été enregistrées. 8 |

9 | {/if} 10 | 11 |
12 |
{linkbutton href="!me/edit.php" label="Modifier mes informations" shape="edit"}
13 |
14 | 15 | 16 | {if $user->isChild() || count($children)} 17 | 30 | {/if} 31 | 32 | {include file="users/_details.tpl" data=$user show_message_button=false context="user"} 33 | 34 |
35 |
{linkbutton href="!me/export.php" label="Télécharger toutes les données détenues sur moi" shape="download"}
36 |
37 | 38 | {$snippets|raw} 39 | 40 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/me/security_password.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Changement du mot de passe" current="me"} 2 | 3 | {include file="./_nav.tpl" current="security"} 4 | 5 | {form_errors} 6 | 7 |
8 |
9 | Changer mon mot de passe 10 | {include file="users/_password_form.tpl" required=true} 11 |
12 | {include file="./_security_confirm_password.tpl"} 13 |
14 | 15 | {include file="_foot.tpl"} 16 | -------------------------------------------------------------------------------- /src/templates/open_db.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Ouvrir une base de données" current=""} 2 | 3 | {form_errors} 4 | 5 |

6 | Base de données actuelle : {$current_db} 7 | {linkbutton shape="left" label="Retour" href="!"} 8 |

9 | 10 | {if $error} 11 |

{$error}

12 | {/if} 13 | 14 | 27 | 28 | 43 | 44 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/password_change.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Changement de mot de passe"} 2 | 3 | 4 | {form_errors} 5 | 6 |
7 | 8 |
9 | Choisir un nouveau mot de passe 10 | {include file="users/_password_form.tpl" required=true} 11 |
12 | 13 |

14 | {csrf_field key=$csrf_key} 15 | {button type="submit" name="change" label="Modifier mon mot de passe" shape="right" class="main"} 16 |

17 | 18 | 19 |
20 | 21 | 22 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer une activité" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="index"} 4 | 5 | {include file="common/delete_form.tpl" 6 | legend="Supprimer cette activité ?" 7 | confirm_label=$confirm_label 8 | confirm_text=$confirm_text 9 | warning="Êtes-vous sûr de vouloir supprimer l'activité « %s » et toutes les inscriptions ?"|args:$service.label 10 | error="Attention, cela supprimera également les tarifs, les inscriptions des membres à cette activité, ainsi que les rappels associés !" 11 | info="Les écritures comptables liées à l'historique des membres inscrits à cette activité ne seront pas supprimées, et la comptabilité demeurera inchangée."} 12 | 13 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier une activité" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="index"} 4 | 5 | {include file="services/_service_form.tpl" legend="Modifier une activité"} 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/fees/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un tarif" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="index"} 4 | 5 | {include file="common/delete_form.tpl" 6 | legend="Supprimer ce tarif ?" 7 | confirm_label=$confirm_label 8 | confirm_text=$confirm_text 9 | warning="Êtes-vous sûr de vouloir supprimer le tarif « %s » ?"|args:$fee.label 10 | error="Attention, cela supprimera également les inscriptions des membres à ce tarif !" 11 | info="Les écritures comptables liées à l'historique des membres ayant réglé ce tarif ne seront pas supprimées, et la comptabilité demeurera inchangée."} 12 | 13 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/fees/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%s — Modifier le tarif"|args:$fee.label current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="index" current_service=$service service_page="index"} 4 | 5 | {include file="services/fees/_fee_form.tpl" legend="Modifier un tarif" submit_label="Enregistrer"} 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/reminders/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un rappel automatique" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="reminders"} 4 | 5 | {include file="common/delete_form.tpl" 6 | legend="Supprimer ce rappel automatique ?" 7 | warning="Êtes-vous sûr de vouloir supprimer le rappel « %s » ?"|args:$reminder.subject 8 | alert="Attention, cela supprimera également l'historique des emails envoyés par ce rappel."} 9 | 10 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/reminders/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier un rappel automatique" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="reminders"} 4 | 5 | {include file="services/reminders/_form.tpl" legend="Modifier un rappel automatique" default_subject=null default_body=null} 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/reminders/new.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Ajouter un rappel automatique" current="users/services"} 2 | 3 | {include file="services/_nav.tpl" current="reminders"} 4 | 5 | {include file="services/reminders/_form.tpl" legend="Ajouter un rappel automatique" 6 | delay_type=0 delay_before=15 delay_after=5} 7 | 8 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/reminders/preview.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Prévisualisation" current="users/services"} 2 | 3 | 4 | {$body|escape|nl2br} 5 | 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/reminders/user.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Rappels envoyés à un membre" current="users/services"} 2 | 3 | {include file="users/_nav_user.tpl" id=$user_id current="reminders"} 4 | 5 | {if $list->count()} 6 | 7 | {include file="common/dynamic_list_head.tpl"} 8 | 9 | {foreach from=$list->iterate() item="row"} 10 | 11 | {$row.label} 12 | {if $row.delay > 0}{$row.delay} jours après l'expiration{elseif $row.delay < 0}{$row.delay|abs} jours avant l'expiration{else}le jour de l'expiration{/if} 13 | {$row.date|date_short} 14 | 15 | {linkbutton shape="menu" label="Inscriptions après ce rappel" href="!services/user/?id=%d&after=%s"|args:$user_id,$row.date} 16 | 17 | 18 | {/foreach} 19 | 20 | 21 | 22 | 23 | {$list->getHTMLPagination()|raw} 24 | 25 | 26 | {else} 27 | 28 |

Aucun rappel n'a été envoyé à ce membre.

29 | 30 | {/if} 31 | 32 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/user/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="%s : Supprimer une inscription"|args:$user_name current="users/services"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer l'inscription ?" 5 | warning="Êtes-vous sûr de vouloir supprimer l'inscription ?" 6 | alert="Les écritures comptables liées à cette inscription ne seront pas supprimées, la comptabilité demeurera inchangée." 7 | info="%s – à « %s — %s »"|args:$user_name,$service_name,$fee_name} 8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/user/edit.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Modifier une inscription" current="users/services"} 2 | 3 | {form_errors} 4 | 5 | {include file="services/user/_service_user_form.tpl" create=false} 6 | 7 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/user/link.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Lier une inscription à une écriture" current="acc/accounts"} 2 | 3 | {form_errors} 4 | 5 |
6 | 7 |
8 | Lier à une écriture 9 | 10 |
11 | {input type="number" label="Numéro de l'écriture" name="id_transaction" required=true} 12 |
13 |
14 | 15 |

16 | {csrf_field key=$csrf_key} 17 | {button type="submit" name="save" label="Enregistrer" shape="right" class="main"} 18 |

19 | 20 |
21 | 22 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/services/user/subscribe.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Inscrire à une activité" current="users/services"} 2 | 3 | {if !$dialog} 4 | {include file="services/_nav.tpl" current="save" fee=null service=null} 5 | {/if} 6 | 7 | {form_errors} 8 | 9 | {include file="services/user/_service_user_form.tpl" create=true} 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/share_password.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Accès document" current=null layout="public"} 2 | 3 | {if $has_password} 4 |

5 | Le mot de passe fourni ne correspond pas.
Merci de vérifier la saisie. 6 |

7 | {else} 8 |

Un mot de passe est nécessaire pour accéder à ce document.

9 | {/if} 10 | 11 |
12 |
13 | Accès au document 14 |
15 | {input type="password" name="p" required=true label="Mot de passe"} 16 |
17 |

18 | {button type="submit" label="Accéder au document" shape="right" class="main"} 19 |

20 |
21 |
22 | 23 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/static/upgrade_post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mise à jour en cours 5 | 9 | 10 | 11 | 12 | 13 |

Une mise à jour est en cours

14 |

Ne fermez pas cette fenêtre !

15 |

Si vous fermez cette fenêtre, les données du formulaire seront perdues.

16 |

Attendez que la mise à jour soit terminée dans la fenêtre ci-dessous pour cliquer sur le bouton Recharger :

17 |

18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/templates/users/_import_list.tpl: -------------------------------------------------------------------------------- 1 | {foreach from=$list item="user"} 2 | exists() && $user->isModified(); ?> 3 |

{$user->name()}

4 | 5 |
6 | {if $user->exists() && $user->isModified()} 7 | {foreach from=$user->diff() key="key" item="diff"} 8 |
{$csv->getColumnLabel($key)}
9 |
10 | {user_field name=$key value=$diff[0]} 11 | {user_field name=$key value=$diff[1]} 12 |
13 | {/foreach} 14 | {else} 15 | 18 | {foreach from=$user->asDetailsArray() key="key" item="value"} 19 | {if $key === $number_field} 20 | {* Don't show number field when creating user*} 21 | {continue} 22 | {/if} 23 |
{$csv->getColumnLabel($key)}
24 |
25 | {user_field name=$key value=$value} 26 |
27 | {/foreach} 28 | {/if} 29 |
30 | {/foreach} 31 | -------------------------------------------------------------------------------- /src/templates/users/_nav.tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/templates/users/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un membre" current="users"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce membre ?" 5 | warning=$warning 6 | alert="Cette action est irréversible et effacera toutes les données et l'historique de ce membre." 7 | info="Alternativement, il est aussi possible de déplacer le membre dans une catégorie « Anciens membres », plutôt que de le supprimer complètement." 8 | csrf_key=$csrf_key 9 | } 10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/users/log.tpl: -------------------------------------------------------------------------------- 1 | {if $params.history} 2 | {include file="_head.tpl" title="Historique des modifications de la fiche membre"} 3 | {else} 4 | {include file="_head.tpl" title="Journal d'audit du membre"} 5 | {/if} 6 | 7 | {if $params.id_user} 8 | {include file="users/_nav_user.tpl" id=$params.id_user} 9 | {elseif $params.history} 10 | {include file="users/_nav_user.tpl" id=$params.history} 11 | {else} 12 | {include file="me/_nav.tpl" current="security"} 13 | {/if} 14 | 15 | {if !$params.history} 16 |

17 | Cette page liste les tentatives de connexion, les modifications de mot de passe ou d'identifiant, et toutes les actions de création, suppression ou modification effectuées par ce membre. 18 |

19 | {/if} 20 | 21 | {if $list->count()} 22 | {include file="users/_log_list.tpl"} 23 | {else} 24 |

25 | Aucune activité trouvée. 26 |

27 | {/if} 28 | 29 | 30 | 31 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/users/mailing/block.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Désinscription d'adresse" current="users/mailing"} 2 | 3 |
4 |
5 | Désinscrire une adresse 6 |

Désinscrire l'adresse {$address} ?

7 |

8 | Une fois cette adresse désinscrite, elle ne pourra plus recevoir aucun message de votre association (rappels, notifications, messages collectifs, etc.). 9 |

10 |

11 | {csrf_field key=$csrf_key} 12 | {button type="submit" name="send" label="Désinscrire cette adresse" shape="right" class="main"} 13 |

14 |
15 |
16 | 17 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/users/mailing/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Supprimer un envoi de message collectif" current="users/mailing"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend="Supprimer ce message collectif ?" 5 | warning="Êtes-vous sûr de vouloir supprimer le message « %s » ?"|args:$mailing.subject 6 | info="La liste des destinataires sera également supprimée."} 7 | 8 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/users/mailing/recipient_data.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Données du destinataire" current="users/mailing"} 2 | 3 |

Vous pouvez copier la variable (colonne de gauche) dans le corps du message : 4 | elle sera remplacée dans le message par le contenu (colonne à droite) spécifique à chaque destinataire.

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {foreach from=$data key="name" item="value"} 15 | 16 | 17 | 18 | 19 | {/foreach} 20 | 21 |
VariableContenu
{ldelim}{ldelim}${$name}{rdelim}{rdelim}{$value|escape|nl2br}
22 | 23 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/users/mailing/send.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Message collectif : %s"|args:$mailing.subject current="users/mailing"} 2 | 3 |
4 |
5 | Envoyer un message collectif 6 |

Envoyer le message "{$mailing.subject}" à {$mailing->countRecipients()} destinataires ?

7 | {csrf_field key=$csrf_key} 8 |

{button class="main" type="submit" name="send" label="Envoyer" shape="right"}

9 |
10 |
11 | 12 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/web/_list.tpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | {include file="common/dynamic_list_head.tpl"} 6 | 7 | {foreach from=$list->iterate() item="p"} 8 | 9 | {link label=$p.title href="?id=%d"|args:$p.id} 10 | {$p.published|relative_date} 11 | {$p.modified|relative_date:true} 12 | 13 | {linkbutton shape="image" label="Lire" href="./?id=%d"|args:$p.id} 14 | {if $session->canAccess($session::SECTION_WEB, $session::ACCESS_WRITE)} 15 | {linkbutton shape="edit" label="Éditer" href="edit.php?id=%d"|args:$p.id} 16 | {if $session->canAccess($session::SECTION_WEB, $session::ACCESS_ADMIN)} 17 | {linkbutton shape="delete" label="Supprimer" target="_dialog" href="delete.php?id=%d"|args:$p.id} 18 | {/if} 19 | {/if} 20 | 21 | 22 | {/foreach} 23 | 24 | 25 | 26 | {$list->getHTMLPagination()|raw} -------------------------------------------------------------------------------- /src/templates/web/all.tpl: -------------------------------------------------------------------------------- 1 | {use Paheko\Entities\Web\Page} 2 | {include file="_head.tpl" title="Toutes les pages du site web" current="web"} 3 | 4 | 7 | 8 | {if $list->count()} 9 | 10 |

{exportmenu name="_dl_export" class="menu-btn-right"}

11 | 12 | {include file="common/dynamic_list_head.tpl"} 13 | 14 | {foreach from=$list->iterate() item="p"} 15 | 16 | {link label=$p.title href="./?id=%d"|args:$p.id} 17 | {$p.path} 18 | status]?> 19 | {$p.published|relative_date} 20 | {$p.modified|relative_date:true} 21 | 22 | {if $can_edit} 23 | {linkbutton shape="edit" label="Éditer" href="edit.php?id=%d"|args:$p.id} 24 | {/if} 25 | 26 | 27 | {/foreach} 28 | 29 | 30 | 31 | {$list->getHTMLPagination()|raw} 32 | {else} 33 |

Il n'y a aucune page dans le site.

34 | {/if} 35 | 36 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/web/delete.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title=$title current="web"} 2 | 3 | {include file="common/delete_form.tpl" 4 | legend=$title 5 | warning="Êtes-vous sûr de vouloir supprimer « %s » ?"|args:$page.title 6 | alert=$alert 7 | } 8 | 9 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/web/new.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title=$title current="web"} 2 | 3 | {form_errors} 4 | 5 |
6 | 7 |
8 | Informations générales 9 |
10 | {input type="text" name="title" required=true label="Titre"} 11 |
12 |
13 | 14 |

15 | {csrf_field key=$csrf_key} 16 | {button type="submit" name="create" label="Créer" shape="plus" class="main"} 17 |

18 | 19 |
20 | 21 | 22 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/web/search.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Rechercher dans le site web" current="web"} 2 | 3 |
4 |
5 | Rechercher une page ou catégorie 6 |

7 | 8 | {button type="submit" name="search" label="Chercher" shape="search" class="main"} 9 |

10 |
11 |
12 | 13 | {if $query} 14 |

15 | {{%n résultat trouvé.}{%n résultats trouvés.} n=$results_count} 16 |

17 | 18 |
19 | {foreach from=$results item="result"} 20 |
21 |

{$result.title_snippet|escape|restore_snippet_markup}

22 |

{$result.snippet|escape|restore_snippet_markup}

23 |
24 | {/foreach} 25 |
26 | {/if} 27 | 28 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/templates/web/sitemap.tpl: -------------------------------------------------------------------------------- 1 | {include file="_head.tpl" title="Plan du site" current="web"} 2 | 3 | 6 | 7 |
8 | {$list|display_sitemap|raw} 9 |
10 | 11 | {include file="_foot.tpl"} -------------------------------------------------------------------------------- /src/www/admin/_inc.php: -------------------------------------------------------------------------------- 1 | assign_by_ref('form', $form); 29 | 30 | $session = Session::getInstance(); 31 | $config = Config::getInstance(); 32 | 33 | if (!defined('Paheko\LOGIN_PROCESS')) 34 | { 35 | if (!$session->isLogged()) 36 | { 37 | if ($session->isOTPRequired()) 38 | { 39 | Utils::redirect(ADMIN_URL . 'login_otp.php'); 40 | } 41 | else 42 | { 43 | Utils::redirect(ADMIN_URL . 'login.php'); 44 | } 45 | } 46 | 47 | $tpl->assign('current', ''); 48 | 49 | $tpl->assign('plugins_menu', Extensions::listMenu($session)); 50 | } 51 | 52 | // Make sure we allow frames to work 53 | header('X-Frame-Options: SAMEORIGIN', true); 54 | -------------------------------------------------------------------------------- /src/www/admin/_serviceworker.js: -------------------------------------------------------------------------------- 1 | self.addEventListener("fetch", function(event) { 2 | // this is doing nothing on purpose 3 | // this is only there to enable "add to home screen" feature in Chrome 4 | }); -------------------------------------------------------------------------------- /src/www/admin/acc/accounts/all.php: -------------------------------------------------------------------------------- 1 | CURRENT_YEAR_ID]; 13 | $tpl->assign('balance', Reports::getTrialBalance($criterias, true)); 14 | 15 | $tpl->display('acc/accounts/all.tpl'); 16 | -------------------------------------------------------------------------------- /src/www/admin/acc/accounts/index.php: -------------------------------------------------------------------------------- 1 | count(); 14 | 15 | $tpl->assign(compact('pending_count')); 16 | 17 | $tpl->assign('chart_id', $current_year->id_chart); 18 | $tpl->assign('grouped_accounts', Reports::getClosingSumsFavoriteAccounts(['year' => CURRENT_YEAR_ID])); 19 | 20 | $tpl->display('acc/accounts/index.tpl'); 21 | -------------------------------------------------------------------------------- /src/www/admin/acc/accounts/users.php: -------------------------------------------------------------------------------- 1 | id_chart); 13 | 14 | $all = qg('all') !== '0'; 15 | 16 | $list = $accounts->listUserAccounts($current_year->id, !$all); 17 | $list->loadFromQueryString(); 18 | 19 | $tpl->assign('chart_id', $current_year->id_chart); 20 | 21 | $tpl->assign(compact('list', 'all')); 22 | 23 | $tpl->display('acc/accounts/users.tpl'); 24 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/accounts/_inc.php: -------------------------------------------------------------------------------- 1 | assign(compact('types_arg', 'dialog_target', 'types_names')); 26 | 27 | function chart_reload_or_redirect(string $url) 28 | { 29 | global $types_arg; 30 | 31 | $dialog = Utils::getDialogTarget(); 32 | 33 | if ($types_arg) { 34 | $url .= '&' . $types_arg; 35 | } 36 | 37 | if ($dialog === 'manage') { 38 | Utils::reloadParentFrame($url); 39 | } 40 | else { 41 | Utils::reloadSelfFrame($url); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/accounts/all.php: -------------------------------------------------------------------------------- 1 | chart(); 18 | } 19 | 20 | if (!$chart) { 21 | throw new UserException('Aucun plan comptable spécifié'); 22 | } 23 | 24 | $accounts = $chart->accounts(); 25 | 26 | $form->runIf('bookmark', function () use ($accounts) { 27 | $b = f('bookmark'); 28 | 29 | if (!is_array($b) || empty($b)) { 30 | return; 31 | } 32 | 33 | $id = key($b); 34 | $value = current($b); 35 | $a = $accounts->get($id); 36 | $a->bookmark = (bool) $value; 37 | $a->save(); 38 | }, null, Utils::getSelfURI()); 39 | 40 | 41 | $list = $accounts->list($types); 42 | $list->loadFromQueryString(); 43 | 44 | $target = !isset($_GET['_dialog']) ? '_dialog=manage' : null; 45 | 46 | $tpl->assign(compact('chart', 'list', 'target')); 47 | 48 | $tpl->display('acc/charts/accounts/all.tpl'); 49 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/accounts/index.php: -------------------------------------------------------------------------------- 1 | chart(); 18 | } 19 | 20 | if (!$chart) { 21 | throw new UserException('Aucun plan comptable spécifié'); 22 | } 23 | 24 | if (!$chart->country) { 25 | Utils::redirect('!acc/charts/accounts/all.php?id=' . $chart->id); 26 | } 27 | 28 | $accounts = $chart->accounts(); 29 | 30 | $tpl->assign(compact('chart')); 31 | $tpl->assign('accounts_grouped', $accounts->listCommonGrouped(compact('types'), false)); 32 | $tpl->display('acc/charts/accounts/index.tpl'); 33 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 9 | 10 | $chart = Charts::get((int) qg('id')); 11 | 12 | if (!$chart) { 13 | throw new UserException("Le plan comptable demandé n'existe pas."); 14 | } 15 | 16 | if (!$chart->canDelete()) { 17 | throw new UserException("Ce plan comptable ne peut être supprimé car il est lié à des exercices"); 18 | } 19 | 20 | $csrf_key = 'acc_charts_delete_' . $chart->id(); 21 | 22 | $form->runIf('delete', function () use ($chart) { 23 | $chart->delete(); 24 | }, $csrf_key, '!acc/charts/'); 25 | 26 | $tpl->assign(compact('chart')); 27 | 28 | $tpl->display('acc/charts/delete.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/edit.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $chart = Charts::get((int) qg('id')); 12 | 13 | if (!$chart) { 14 | throw new UserException("Le plan comptable demandé n'existe pas."); 15 | } 16 | 17 | $csrf_key = 'acc_charts_edit_' . $chart->id(); 18 | 19 | $form->runIf('save', function() use ($chart) { 20 | $chart->importForm(); 21 | $chart->set('archived', (bool) f('archived')); 22 | $chart->save(); 23 | }, $csrf_key, '!acc/charts/'); 24 | 25 | $tpl->assign(compact('chart')); 26 | 27 | $tpl->display('acc/charts/edit.tpl'); 28 | -------------------------------------------------------------------------------- /src/www/admin/acc/charts/export.php: -------------------------------------------------------------------------------- 1 | get('org_name'), $chart->label), 17 | $chart->export(), 18 | $chart::COLUMNS 19 | ); 20 | -------------------------------------------------------------------------------- /src/www/admin/acc/index.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 11 | 12 | if (!Charts::count()) { 13 | Utils::redirect('!acc/years/first_setup.php'); 14 | } 15 | 16 | $tpl->assign('graphs', array_slice(Graph::URL_LIST, 0, 3)); 17 | 18 | $years = Years::listOpen(true); 19 | $tpl->assign('years', $years); 20 | $tpl->assign('first_year', count($years) ? current($years)->id : null); 21 | $tpl->assign('all_years', Years::listAssoc()); 22 | $tpl->assign('last_transactions', Years::listLastTransactions(10, $years)); 23 | 24 | $tpl->display('acc/index.tpl'); 25 | -------------------------------------------------------------------------------- /src/www/admin/acc/projects/config.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 7 | 8 | $form->runIf('save_config', function () { 9 | $config = Config::getInstance(); 10 | $config->importForm([ 11 | 'analytical_set_all' => f('analytical_set_all'), 12 | 'analytical_mandatory' => (bool)f('analytical_mandatory'), 13 | ]); 14 | $config->save(); 15 | }, 'save_config', Utils::getSelfURI(['msg' => 'SAVED'])); 16 | 17 | 18 | $tpl->display('acc/projects/config.tpl'); 19 | -------------------------------------------------------------------------------- /src/www/admin/acc/projects/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $project = Projects::get((int)qg('id')); 12 | 13 | if (!$project) { 14 | throw new UserException('Projet introuvable'); 15 | } 16 | 17 | $csrf_key = 'project_delete'; 18 | 19 | $form->runIf('delete', function () use ($project) { 20 | $project->delete(); 21 | }, $csrf_key, '!acc/projects/'); 22 | 23 | $tpl->assign(compact('csrf_key', 'project')); 24 | 25 | $tpl->display('acc/projects/delete.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/acc/projects/edit.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | if ($id = (int)qg('id')) { 12 | $project = Projects::get($id); 13 | } 14 | else { 15 | $project = new Project; 16 | } 17 | 18 | $csrf_key = 'project_edit'; 19 | 20 | $form->runIf('save', function () use ($project) { 21 | $project->importForm(); 22 | $project->save(); 23 | }, $csrf_key, '!acc/projects/'); 24 | 25 | $tpl->assign(compact('csrf_key', 'project')); 26 | 27 | $tpl->display('acc/projects/edit.tpl'); 28 | -------------------------------------------------------------------------------- /src/www/admin/acc/projects/index.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 9 | 10 | $by_year = (bool)qg('by_year'); 11 | 12 | $list = Projects::getBalances($by_year); 13 | 14 | $tpl->assign(compact('by_year', 'list')); 15 | $tpl->assign('export', false); 16 | 17 | $tpl->assign('projects_count', Projects::count()); 18 | 19 | $tpl->display('acc/projects/index.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/balance_sheet.php: -------------------------------------------------------------------------------- 1 | assign('balance', $balance); 13 | 14 | if (!empty($criterias['year'])) { 15 | $years = Years::listAssocExcept($criterias['year']); 16 | $tpl->assign('other_years', $years); 17 | } 18 | 19 | $tpl->display('acc/reports/balance_sheet.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/graph_pie.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 11 | 12 | $year = Years::get((int)qg('year')); 13 | 14 | $tpl->assign('graphs', Graph::URL_LIST); 15 | $tpl->assign('year', $year); 16 | 17 | $tpl->assign('nb_transactions', Reports::countTransactions($criterias)); 18 | 19 | $tpl->display('acc/reports/graphs.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/journal.php: -------------------------------------------------------------------------------- 1 | assign(compact('journal')); 12 | 13 | $tpl->display('acc/reports/journal.tpl'); 14 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/ledger.php: -------------------------------------------------------------------------------- 1 | preferences->accounting_expert ?? false; 11 | $tpl->assign('ledger', Reports::getGeneralLedger($criterias, !$expert)); 12 | 13 | $tpl->display('acc/reports/ledger.tpl'); 14 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/statement.php: -------------------------------------------------------------------------------- 1 | [Account::TYPE_VOLUNTEERING_REVENUE, Account::TYPE_VOLUNTEERING_EXPENSE]]); 12 | $volunteering = Reports::getVolunteeringStatement($criterias, $general); 13 | 14 | $tpl->assign(compact('general', 'volunteering')); 15 | 16 | if (!empty($criterias['year'])) { 17 | $years = Years::listAssocExcept($criterias['year']); 18 | $tpl->assign('other_years', $years); 19 | } 20 | 21 | $tpl->display('acc/reports/statement.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/acc/reports/trial_balance.php: -------------------------------------------------------------------------------- 1 | user()->preferences->accounting_expert) ? false : true; 10 | $balance = Reports::getTrialBalance($criterias, (bool) $simple); 11 | 12 | $tpl->assign(compact('simple', 'balance')); 13 | 14 | $tpl->display('acc/reports/trial_balance.tpl'); 15 | -------------------------------------------------------------------------------- /src/www/admin/acc/saved_searches.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 10 | 11 | $u = Users::get((int)qg('id')); 12 | 13 | if (!$u) { 14 | throw new UserException('Ce membre n\'existe pas'); 15 | } 16 | 17 | $criterias = ['creator' => $u->id]; 18 | 19 | $tpl->assign('journal', Reports::getJournal($criterias, true)); 20 | $tpl->assign('transaction_creator', $u); 21 | 22 | $tpl->display('acc/transactions/creator.tpl'); 23 | -------------------------------------------------------------------------------- /src/www/admin/acc/transactions/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $transaction = Transactions::get((int) qg('id')); 12 | 13 | if (!$transaction) { 14 | throw new UserException('Cette écriture n\'existe pas'); 15 | } 16 | 17 | $transaction->assertCanBeModified(); 18 | 19 | $csrf_key = 'acc_delete_' . $transaction->id; 20 | 21 | $form->runIf('delete', function () use ($transaction) { 22 | $transaction->delete(); 23 | Utils::redirectParent('!acc/'); 24 | }, $csrf_key); 25 | 26 | $tpl->assign(compact('transaction', 'csrf_key')); 27 | 28 | $tpl->display('acc/transactions/delete.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/acc/transactions/lock.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 11 | 12 | $transaction = Transactions::get((int) qg('id')); 13 | 14 | if (!$transaction) { 15 | throw new UserException('Cette écriture n\'existe pas'); 16 | } 17 | 18 | $transaction->assertCanBeModified(); 19 | 20 | $csrf_key = 'acc_transaction_lock_' . $transaction->id(); 21 | 22 | $form->runIf('lock', function() use ($transaction) { 23 | $transaction->lock(); 24 | }, $csrf_key, '!acc/transactions/details.php?id=' . $transaction->id()); 25 | 26 | $tpl->assign(compact('csrf_key', 'transaction')); 27 | 28 | $tpl->display('acc/transactions/lock.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/acc/transactions/pending.php: -------------------------------------------------------------------------------- 1 | loadFromQueryString(); 11 | 12 | $tpl->assign(compact('list')); 13 | 14 | $tpl->display('acc/transactions/pending.tpl'); 15 | -------------------------------------------------------------------------------- /src/www/admin/acc/transactions/selector.php: -------------------------------------------------------------------------------- 1 | assign(compact('query', 'list', 'years')); 20 | 21 | $tpl->display('acc/transactions/selector.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/acc/transactions/user.php: -------------------------------------------------------------------------------- 1 | $u->id]; 21 | 22 | $simple = !empty($session->user()->preferences->accounting_expert) ? false : true; 23 | 24 | $tpl->assign('balance', Reports::getTrialBalance($criterias + ['year' => $year], $simple, false)); 25 | $tpl->assign('journal', Reports::getJournal($criterias, true)); 26 | $tpl->assign(compact('years', 'year', 'simple')); 27 | $tpl->assign('transaction_user', $u); 28 | 29 | $tpl->display('acc/transactions/user.tpl'); 30 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/close.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 11 | 12 | $year = Years::get((int)qg('id')); 13 | 14 | if (!$year) { 15 | throw new UserException('Exercice inconnu.'); 16 | } 17 | 18 | $year->assertCanBeModified(); 19 | 20 | $csrf_key = 'acc_years_close_' . $year->id(); 21 | 22 | $form->runIf('close', function () use ($year, $user, $session) { 23 | $year->close($user->id); 24 | $year->save(); 25 | 26 | $user = Session::getLoggedUser(); 27 | 28 | // Year is closed, remove it from preferences 29 | if ($user->getPreference('accounting_year') == $year->id()) { 30 | $user->setPreference('accounting_year', null); 31 | } 32 | $session->save(); 33 | }, $csrf_key, ADMIN_URL . 'acc/years/new.php?from=' . $year->id()); 34 | 35 | $tpl->assign(compact('year', 'csrf_key')); 36 | 37 | $tpl->display('acc/years/close.tpl'); 38 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 9 | 10 | $year = Years::get((int)qg('id')); 11 | 12 | if (!$year) { 13 | throw new UserException('Exercice inconnu.'); 14 | } 15 | 16 | $year->assertCanBeModified(); 17 | 18 | $form->runIf(f('delete') && f('confirm_delete'), function () use ($year) { 19 | $year->delete(); 20 | }, 'acc_years_delete_' . $year->id(), ADMIN_URL . 'acc/years/'); 21 | 22 | $tpl->assign('nb_transactions', $year->countTransactions()); 23 | $tpl->assign('year', $year); 24 | 25 | $tpl->display('acc/years/delete.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/edit.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $year = Years::get((int)qg('id')); 12 | 13 | if (!$year) { 14 | throw new UserException('Exercice inconnu.'); 15 | } 16 | 17 | $year->assertCanBeModified(); 18 | 19 | $csrf_key = 'acc_years_edit_' . $year->id(); 20 | 21 | $form->runIf('edit', function () use ($year) { 22 | $year->importForm(); 23 | $year->save(); 24 | }, $csrf_key, ADMIN_URL . 'acc/years/'); 25 | 26 | $tpl->assign(compact('year', 'csrf_key')); 27 | 28 | $tpl->display('acc/years/edit.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/index.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 11 | 12 | if (!Years::count()) { 13 | Utils::redirect('!acc/years/first_setup.php'); 14 | } 15 | 16 | $has_enough_transactions = Transactions::countAll() >= 3; 17 | $list = Years::listWithStats(); 18 | $tpl->assign(compact('list', 'has_enough_transactions')); 19 | 20 | $tpl->display('acc/years/index.tpl'); 21 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/links.php: -------------------------------------------------------------------------------- 1 | id(); 16 | 17 | $form->runIf('link', function () use ($year) { 18 | $id = intval($_POST['target'] ?? 0); 19 | $target = Years::get($id); 20 | 21 | if (!$target) { 22 | throw new UserException('Invalid target year'); 23 | } 24 | 25 | $changed = Fees::updateYear($year, $target); 26 | 27 | if (!$changed) { 28 | throw new UserException('L\'exercice sélectionné utilise un plan comptable différent, il n\'est pas possible de l\'utiliser pour les tarifs sélectionnés. Merci de modifier manuellement chaque tarif.'); 29 | } 30 | }, $csrf_key, '!acc/years/'); 31 | 32 | $fees = Fees::listByYearId($year->id()); 33 | $years = Years::listOpenAssocExcept($year->id()); 34 | 35 | $tpl->assign(compact('year', 'fees', 'years', 'csrf_key')); 36 | 37 | $tpl->display('acc/years/links.tpl'); 38 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/lock.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $year = Years::get((int)qg('id')); 12 | 13 | if (!$year) { 14 | throw new UserException('Exercice inconnu.'); 15 | } 16 | 17 | if (!$year->isOpen()) { 18 | throw new UserException('Cet exercice n\'est pas ouvert.'); 19 | } 20 | 21 | $csrf_key = 'lock_' . $year->id(); 22 | 23 | $form->runIf('lock', function () use ($year) { 24 | $year->set('status', $year::LOCKED); 25 | $year->save(); 26 | }, $csrf_key, '!acc/years/'); 27 | 28 | $tpl->assign(compact('year', 'csrf_key')); 29 | 30 | $tpl->display('acc/years/lock.tpl'); 31 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/new.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 12 | 13 | // FIXME: remove in 1.3.15 (move to upgrade) 14 | Charts::migrateTo2025(); 15 | 16 | $year = new Year; 17 | 18 | $form->runIf('new', function () use ($year) { 19 | $year->importForm(); 20 | $year->save(); 21 | }, 'acc_years_new', '!acc/years/'); 22 | 23 | $new_dates = Years::getNewYearDates(); 24 | $year->start_date = $new_dates[0]; 25 | $year->end_date = $new_dates[1]; 26 | $year->label = sprintf('Exercice %s', $year->label_years()); 27 | 28 | $tpl->assign(compact('year')); 29 | 30 | $tpl->assign('charts', Charts::listByCountry(true)); 31 | 32 | $tpl->display('acc/years/new.tpl'); 33 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/reopen.php: -------------------------------------------------------------------------------- 1 | canAccess(Session::SECTION_CONFIG, Session::ACCESS_ADMIN)) { 10 | throw new UserException('Seul un administrateur ayant accès à la configuration peut réouvrir un exercice.'); 11 | } 12 | 13 | $year = Years::get((int)qg('id')); 14 | 15 | if (!$year) { 16 | throw new UserException('Exercice inconnu.'); 17 | } 18 | 19 | if (!$year->isClosed()) { 20 | throw new UserException('Cet exercice n\'est pas clôturé.'); 21 | } 22 | 23 | $csrf_key = 'reopen_' . $year->id(); 24 | 25 | $form->runIf('reopen', function () use ($year) { 26 | if (!boolval($_POST['confirm'] ?? false)) { 27 | throw new UserException('Merci de cocher la case pour confirmer la réouverture.'); 28 | } 29 | 30 | $year->reopen(Session::getUserId()); 31 | }, $csrf_key, '!acc/years/'); 32 | 33 | $tpl->assign(compact('year', 'csrf_key')); 34 | 35 | $tpl->display('acc/years/reopen.tpl'); 36 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/select.php: -------------------------------------------------------------------------------- 1 | runIf('switch', function () { 14 | $year = Years::get((int)f('switch')); 15 | 16 | if (!$year) { 17 | throw new UserException('Exercice inconnu'); 18 | } 19 | 20 | $user = Session::getLoggedUser(); 21 | $user->setPreference('accounting_year', $year->id()); 22 | $user->save(); 23 | }, $csrf_key, $url); 24 | 25 | $tpl->assign('years', Years::list()); 26 | $tpl->assign('from', qg('from')); 27 | $tpl->assign('msg', qg('msg')); 28 | $tpl->assign(compact('csrf_key')); 29 | 30 | $tpl->display('acc/years/select.tpl'); 31 | -------------------------------------------------------------------------------- /src/www/admin/acc/years/unlock.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN); 10 | 11 | $year = Years::get((int)qg('id')); 12 | 13 | if (!$year) { 14 | throw new UserException('Exercice inconnu.'); 15 | } 16 | 17 | if (!$year->isLocked()) { 18 | throw new UserException('Cet exercice n\'est pas verrouillé.'); 19 | } 20 | 21 | $csrf_key = 'unlock_' . $year->id(); 22 | 23 | $form->runIf('unlock', function () use ($year) { 24 | $year->set('status', $year::OPEN); 25 | $year->save(); 26 | }, $csrf_key, '!acc/years/'); 27 | 28 | $tpl->assign(compact('year', 'csrf_key')); 29 | 30 | $tpl->display('acc/years/unlock.tpl'); 31 | -------------------------------------------------------------------------------- /src/www/admin/common/autocomplete_address.php: -------------------------------------------------------------------------------- 1 | canMoveToTrash()) { 18 | throw new UserException('Vous n\'avez pas le droit de mettre ce fichier à la corbeille.'); 19 | } 20 | elseif (!$trash && !$file->canDelete()) { 21 | throw new UserException('Vous n\'avez pas le droit de supprimer ce fichier.'); 22 | } 23 | 24 | $csrf_key = 'file_delete_' . $file->hash_id; 25 | $parent = $file->parent; 26 | 27 | $form->runIf('delete', function () use ($file, $trash) { 28 | if ($trash) { 29 | $file->moveToTrash(); 30 | } 31 | else { 32 | $file->delete(); 33 | } 34 | }, $csrf_key, '!docs/?path=' . $parent); 35 | 36 | $tpl->assign(compact('file', 'csrf_key', 'trash')); 37 | 38 | $tpl->display('common/files/delete.tpl'); -------------------------------------------------------------------------------- /src/www/admin/common/files/edit.php: -------------------------------------------------------------------------------- 1 | canWrite()) { 27 | throw new UserException('Vous n\'avez pas le droit de modifier ce fichier.'); 28 | } 29 | 30 | // Handle all the file editor 31 | $saved = $file->editor($content, Session::getInstance()); 32 | 33 | if ($saved && ($_SERVER['HTTP_ACCEPT'] ?? null) === 'application/json') { 34 | http_response_code(204); 35 | return; 36 | } 37 | elseif ($saved) { 38 | Utils::redirect(Utils::getSelfURI()); 39 | } 40 | -------------------------------------------------------------------------------- /src/www/admin/common/files/preview.php: -------------------------------------------------------------------------------- 1 | canRead()) { 17 | throw new UserException('Vous n\'avez pas le droit de lire ce fichier.'); 18 | } 19 | 20 | $file->preview(Session::getInstance()); 21 | -------------------------------------------------------------------------------- /src/www/admin/common/files/rename.php: -------------------------------------------------------------------------------- 1 | parent(); 18 | 19 | if (!$file->canRename($session)) { 20 | throw new UserException('Vous n\'avez pas le droit de modifier ce fichier.'); 21 | } 22 | 23 | $csrf_key = 'file_rename_' . $file->pathHash(); 24 | 25 | $form->runIf('rename', function () use ($file) { 26 | $file->changeFileName(f('new_name'), Session::getInstance(), true); 27 | }, $csrf_key, '!docs/?id=' . $file->getParentHashID()); 28 | 29 | $tpl->assign(compact('file', 'csrf_key')); 30 | 31 | $tpl->display('common/files/rename.tpl'); -------------------------------------------------------------------------------- /src/www/admin/common/files/shares_list.php: -------------------------------------------------------------------------------- 1 | canShare()) { 18 | throw new UserException('Vous n\'avez pas le droit de partager ce fichier.'); 19 | } 20 | 21 | $csrf_key = 'file_share_' . $file->hash_id; 22 | 23 | $form->runIf('delete', function () { 24 | $share = Shares::getByHashID($_POST['delete']); 25 | 26 | if (!$share) { 27 | throw new UserException('Ce partage n\'existe pas'); 28 | } 29 | 30 | $share->delete(); 31 | }, $csrf_key, Utils::getSelfURI()); 32 | 33 | 34 | $list = Shares::getListForFile($file); 35 | 36 | $sharing_options = Share::OPTIONS; 37 | 38 | $tpl->assign(compact('file', 'csrf_key', 'list', 'sharing_options')); 39 | 40 | $tpl->display('common/files/shares_list.tpl'); 41 | -------------------------------------------------------------------------------- /src/www/admin/common/files/upload.php: -------------------------------------------------------------------------------- 1 | runIf('upload', function () use ($parent) { 19 | Files::uploadMultiple($parent, 'file', Session::getInstance()); 20 | }, $csrf_key, '!docs/?path=' . $parent); 21 | 22 | $max = (int) qg('max'); 23 | $multiple = $max > 1; 24 | 25 | $tpl->assign(compact('parent', 'csrf_key', 'multiple')); 26 | 27 | $tpl->display('common/files/upload.tpl'); 28 | -------------------------------------------------------------------------------- /src/www/admin/config/_inc.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN); 8 | 9 | $tpl->assign('custom_css', ['config.css']); 10 | -------------------------------------------------------------------------------- /src/www/admin/config/advanced/api.php: -------------------------------------------------------------------------------- 1 | runIf('add', function () { 13 | API_Credentials::create(); 14 | }, $csrf_key, Utils::getSelfURI()); 15 | 16 | $form->runIf('delete', function () { 17 | API_Credentials::delete((int)f('id')); 18 | }, $csrf_key, Utils::getSelfURI()); 19 | 20 | $list = API_Credentials::list(); 21 | $default_key = API_Credentials::generateKey(); 22 | $secret = API_Credentials::generateSecret(); 23 | $access_levels = API_Entity::ACCESS_LEVELS; 24 | 25 | $tpl->assign('website', WEBSITE); 26 | $tpl->assign(compact('list', 'csrf_key', 'default_key', 'secret', 'access_levels')); 27 | 28 | $tpl->display('config/advanced/api.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/config/advanced/audit.php: -------------------------------------------------------------------------------- 1 | loadFromQueryString(); 11 | 12 | $tpl->assign(compact('list')); 13 | 14 | $tpl->display('config/advanced/audit.tpl'); 15 | -------------------------------------------------------------------------------- /src/www/admin/config/advanced/index.php: -------------------------------------------------------------------------------- 1 | display('config/advanced/index.tpl'); 7 | -------------------------------------------------------------------------------- /src/www/admin/config/advanced/reset.php: -------------------------------------------------------------------------------- 1 | password)) { 12 | throw new UserException('Votre compte ne dispose pas de mot de passe, cette fonctionnalité est désactivée.'); 13 | } 14 | 15 | $form->runIf('reset_ok', function () use ($session) { 16 | Install::reset($session, f('password_check') ?? ''); 17 | }, 'reset'); 18 | 19 | $tpl->display('config/advanced/reset.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/config/advanced/sql_debug.php: -------------------------------------------------------------------------------- 1 | disableLog(); 13 | 14 | if (qg('id')) 15 | { 16 | $tpl->assign('debug', DB::getDebugSession(qg('id'))); 17 | } 18 | else 19 | { 20 | $tpl->assign('list', DB::getDebugSessionsList()); 21 | } 22 | 23 | $tpl->display('config/advanced/sql_debug.tpl'); 24 | -------------------------------------------------------------------------------- /src/www/admin/config/backup/index.php: -------------------------------------------------------------------------------- 1 | runIf('download', function () { 13 | Backup::dump(); 14 | exit; 15 | }, $csrf_key); 16 | 17 | // Create local backup 18 | $form->runIf('create', function () { 19 | Backup::create(); 20 | }, $csrf_key, '!config/backup/?msg=BACKUP_CREATED'); 21 | 22 | // Download all files as ZIP 23 | $form->runIf('zip', function () { 24 | Files::zipAll(); 25 | exit; 26 | }, $csrf_key); 27 | 28 | $ok = qg('ok'); // return message 29 | $db_size = Backup::getDBSize(); 30 | $files_size = Files::getUsedQuota(); 31 | 32 | $tpl->assign(compact('ok', 'db_size', 'files_size', 'csrf_key')); 33 | 34 | $tpl->display('config/backup/index.tpl'); 35 | -------------------------------------------------------------------------------- /src/www/admin/config/categories/delete.php: -------------------------------------------------------------------------------- 1 | getUser(); 15 | 16 | $csrf_key = 'cat_delete_' . $cat->id(); 17 | 18 | if ($cat->id() == $user->id_category) { 19 | throw new UserException("Vous ne pouvez pas supprimer votre catégorie."); 20 | } 21 | 22 | $form->runIf('delete', function () use($cat) { 23 | $cat->delete(); 24 | }, $csrf_key, '!config/categories/'); 25 | 26 | $tpl->assign(compact('cat', 'csrf_key')); 27 | 28 | $tpl->display('config/categories/delete.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/config/categories/index.php: -------------------------------------------------------------------------------- 1 | runIf('save', function() { 13 | $cat = new Category; 14 | 15 | $cat->importForm([ 16 | 'name' => f('name'), 17 | 'hidden' => 0, 18 | ]); 19 | $cat->setAllPermissions(Session::ACCESS_NONE); 20 | 21 | $cat->save(); 22 | }, $csrf_key, Utils::getSelfURI()); 23 | 24 | $list = Categories::listWithStats(); 25 | 26 | $tpl->assign(compact('list', 'csrf_key')); 27 | 28 | $tpl->display('config/categories/index.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/config/custom.php: -------------------------------------------------------------------------------- 1 | runIf('save', function () use ($config) { 13 | $config->importForm(); 14 | 15 | if (f('admin_background') == 'RESET') { 16 | $config->setFile('admin_background', null); 17 | } 18 | elseif (f('admin_background')) { 19 | $config->setFile('admin_background', base64_decode(f('admin_background'))); 20 | } 21 | 22 | $config->save(); 23 | }, 'config_custom', Utils::getSelfURI(['ok' => ''])); 24 | 25 | $tpl->assign([ 26 | 'color1' => ADMIN_COLOR1, 27 | 'color2' => ADMIN_COLOR2, 28 | ]); 29 | 30 | $tpl->assign('background_image_current', $config->fileURL('admin_background')); 31 | $tpl->assign('background_image_default', ADMIN_BACKGROUND_IMAGE); 32 | 33 | $tpl->assign('custom_js', ['color_helper.js']); 34 | $tpl->display('config/custom.tpl'); 35 | -------------------------------------------------------------------------------- /src/www/admin/config/disk_usage.php: -------------------------------------------------------------------------------- 1 | Files::getUsedQuota(), 14 | 'quota_max' => Files::getQuota(), 15 | 'quota_left' => Files::getRemainingQuota(), 16 | 'contexts' => Files::getContextsDiskUsage(), 17 | 'db_backups' => Backup::getAllBackupsTotalSize(), 18 | 'db' => Backup::getDBSize(), 19 | ]; 20 | 21 | $sizes['db_total'] = $sizes['db'] + $sizes['db_backups']; 22 | $tpl->assign($sizes); 23 | 24 | $tpl->assign(compact('csrf_key', 'versioning_policy')); 25 | 26 | $tpl->display('config/disk_usage.tpl'); 27 | -------------------------------------------------------------------------------- /src/www/admin/config/donnees/import.php: -------------------------------------------------------------------------------- 1 | display('config/donnees/import.tpl'); 7 | -------------------------------------------------------------------------------- /src/www/admin/config/ext/diff.php: -------------------------------------------------------------------------------- 1 | assign([ 17 | 'local' => $module->fetchLocalFile($path), 18 | 'dist' => $module->fetchDistFile($path), 19 | ]); 20 | 21 | $tpl->display('config/ext/diff.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/config/ext/edit.php: -------------------------------------------------------------------------------- 1 | export(Session::getInstance()); 17 | return; 18 | } 19 | 20 | $path = qg('p'); 21 | $parent_path_uri = rawurlencode($module->path($path)); 22 | $list = $module->listFiles($path); 23 | 24 | $url_help_modules = sprintf(HELP_PATTERN_URL, 'modules'); 25 | $tpl->assign(compact('list', 'url_help_modules', 'module', 'path', 'parent_path_uri')); 26 | 27 | $tpl->display('config/ext/edit.tpl'); 28 | -------------------------------------------------------------------------------- /src/www/admin/config/ext/import.php: -------------------------------------------------------------------------------- 1 | runIf('import', function () use (&$exists) { 14 | if (empty($_FILES['zip']['tmp_name'])) { 15 | throw new UserException('Aucun fichier reçu.'); 16 | } 17 | 18 | try { 19 | $m = Modules::import($_FILES['zip']['tmp_name'], !empty($_POST['overwrite'])); 20 | } 21 | catch (\InvalidArgumentException $e) { 22 | throw new UserException($e->getMessage(), 0, $e); 23 | } 24 | 25 | if (!$m) { 26 | $exists = true; 27 | throw new UserException('Un module avec ce nom unique existe déjà. Pour écraser ce module, recommencer en cochant la case en bas du formulaire.'); 28 | } 29 | 30 | $i = (int)!$m->enabled; 31 | Utils::redirectDialog(sprintf('!config/ext/?install=%d&focus=%s', $i, $m->name)); 32 | }, $csrf_key); 33 | 34 | $tpl->assign(compact('csrf_key', 'exists')); 35 | 36 | $tpl->display('config/ext/import.tpl'); 37 | -------------------------------------------------------------------------------- /src/www/admin/config/ext/index.php: -------------------------------------------------------------------------------- 1 | addError('Module ' . $error); 17 | } 18 | 19 | foreach (Plugins::refresh() as $error) { 20 | // Errors are not used currently 21 | $form->addError('Plugin ' . $error); 22 | } 23 | 24 | $list = Extensions::listDisabled(); 25 | $tpl->assign('url_plugins', ENABLE_TECH_DETAILS ? WEBSITE . 'wiki?name=Extensions' : null); 26 | $tpl->assign('installable', true); 27 | } 28 | else { 29 | Modules::refreshEnabledModules(); 30 | $list = Extensions::listEnabled(); 31 | $tpl->assign('installable', false); 32 | } 33 | 34 | $url_help_modules = sprintf(HELP_PATTERN_URL, 'modules'); 35 | $tpl->assign(compact('list', 'csrf_key', 'url_help_modules')); 36 | 37 | $tpl->display('config/ext/index.tpl'); 38 | 39 | flush(); 40 | Plugins::upgradeAllIfRequired(); 41 | -------------------------------------------------------------------------------- /src/www/admin/config/ext/new.php: -------------------------------------------------------------------------------- 1 | runIf('create', function () { 13 | $module = new Module; 14 | $module->importForm(); 15 | $module->set('web', false); 16 | $module->save(); 17 | $module->exportToIni(); 18 | 19 | Utils::redirectDialog(sprintf('!config/ext/edit.php?module=%s', $module->name)); 20 | }, $csrf_key); 21 | 22 | 23 | $types = [0 => 'Module normal', 1 => 'Site web']; 24 | $sections = [null => '— Pas de restriction —']; 25 | 26 | foreach (Category::PERMISSIONS as $section => $details) { 27 | $sections[$details['label']] = []; 28 | 29 | foreach ($details['options'] as $l => $label) { 30 | $sections[$details['label']][$section . '_' . $l] = $label; 31 | } 32 | } 33 | 34 | $tpl->assign(compact('csrf_key', 'sections', 'types')); 35 | 36 | $tpl->display('config/ext/new.tpl'); 37 | -------------------------------------------------------------------------------- /src/www/admin/config/fields/delete.php: -------------------------------------------------------------------------------- 1 | fieldById((int)qg('id')); 14 | 15 | if (!$field) { 16 | throw new UserException('Le champ indiqué n\'existe pas.'); 17 | } 18 | 19 | $form->runIf('delete', function () use ($field, $fields) { 20 | if (!f('confirm_delete')) { 21 | throw new UserException('Merci de bien vouloir cocher la case pour confirmer la suppression.'); 22 | } 23 | 24 | $fields->delete($field->name); 25 | $fields->save(); 26 | }, $csrf_key, '!config/fields/?msg=DELETED'); 27 | 28 | $tpl->assign(compact('csrf_key', 'field')); 29 | 30 | $tpl->display('config/fields/delete.tpl'); 31 | -------------------------------------------------------------------------------- /src/www/admin/config/fields/edit.php: -------------------------------------------------------------------------------- 1 | fieldById((int)qg('id')); 14 | } 15 | else { 16 | $field = new DynamicField; 17 | } 18 | 19 | if (!$field) { 20 | throw new UserException('Le champ indiqué n\'existe pas.'); 21 | } 22 | 23 | $form->runIf('save', function () use ($field, $fields) { 24 | $field->importForm(); 25 | 26 | if (!$field->exists()) { 27 | $field->sort_order = $fields->getLastOrderIndex(); 28 | $fields->add($field); 29 | } 30 | 31 | $fields->save(); 32 | }, $csrf_key, '!config/fields/?msg=SAVED'); 33 | 34 | $user_field_types = DynamicField::TYPES; 35 | 36 | $tpl->assign(compact('csrf_key', 'field', 'user_field_types')); 37 | 38 | $tpl->display('config/fields/edit.tpl'); 39 | -------------------------------------------------------------------------------- /src/www/admin/config/fields/index.php: -------------------------------------------------------------------------------- 1 | runIf('save', function () use ($fields) { 12 | $fields->setOrderAll(f('sort_order')); 13 | $fields->save(); 14 | }, $csrf_key, '!config/fields/?msg=SAVED_ORDER'); 15 | 16 | $tpl->assign('fields', $fields->all()); 17 | $tpl->assign(compact('csrf_key')); 18 | 19 | $tpl->display('config/fields/index.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/config/fields/new.php: -------------------------------------------------------------------------------- 1 | getInstallablePresets(); 13 | 14 | // No presets left to install 15 | if (!count($presets)) { 16 | Utils::redirect('!config/fields/edit.php'); 17 | } 18 | 19 | $form->runIf('add', function () use ($fields) { 20 | $preset = f('preset'); 21 | 22 | if (!$preset) { 23 | Utils::redirect('!config/fields/edit.php'); 24 | } 25 | 26 | $field = $fields->installPreset(f('preset')); 27 | 28 | if (!$field->exists()) { 29 | $field->sort_order = $fields->getLastOrderIndex(); 30 | $fields->add($field); 31 | } 32 | 33 | $fields->save(); 34 | }, $csrf_key, '!config/fields/?msg=SAVED'); 35 | 36 | $tpl->assign(compact('csrf_key', 'presets')); 37 | 38 | $tpl->display('config/fields/new.tpl'); 39 | -------------------------------------------------------------------------------- /src/www/admin/config/server/index.php: -------------------------------------------------------------------------------- 1 | runIf('import', function () { 17 | Storage::migrate(FILE_STORAGE_BACKEND, 'SQLite', FILE_STORAGE_CONFIG, null); 18 | }, $csrf_key, '?msg=OK'); 19 | 20 | $form->runIf('export', function () { 21 | Storage::migrate('SQLite', FILE_STORAGE_BACKEND, null, FILE_STORAGE_CONFIG); 22 | Storage::truncate('SQLite', null); 23 | }, $csrf_key, '?msg=OK'); 24 | 25 | $form->runIf('scan', function () { 26 | Storage::sync(null); 27 | }, $csrf_key, '?msg=OK'); 28 | } 29 | 30 | $constants = Install::getConstants(); 31 | 32 | $db_size = DB::getInstance()->firstColumn('SELECT SUM(LENGTH(content)) FROM files_contents;'); 33 | 34 | $tpl->assign(compact('constants', 'db_size', 'csrf_key')); 35 | 36 | $tpl->display('config/server/index.tpl'); 37 | -------------------------------------------------------------------------------- /src/www/admin/config/users/field_selector.php: -------------------------------------------------------------------------------- 1 | assign([ 11 | 'list' => $df->listEligibleNameFields(), 12 | ]); 13 | 14 | $tpl->display('config/users/field_selector.tpl'); 15 | -------------------------------------------------------------------------------- /src/www/admin/convert.php: -------------------------------------------------------------------------------- 1 | requireAccess(Session::SECTION_DOCUMENTS, Session::ACCESS_READ); 10 | -------------------------------------------------------------------------------- /src/www/admin/docs/move.php: -------------------------------------------------------------------------------- 1 | runIf('create', function () use ($parent, $default_ext) { 21 | $name = trim((string) f('name')); 22 | 23 | if ($default_ext && !strpos($name, '.')) { 24 | $name .= '.' . $default_ext; 25 | } 26 | 27 | $name = File::filterName($name); 28 | $target = $parent . '/' . $name; 29 | 30 | if (Files::exists($target)) { 31 | throw new UserException('Un fichier existe déjà avec ce nom : ' . $name); 32 | } 33 | 34 | $file = Files::createFromString($target, '', Session::getInstance()); 35 | 36 | Utils::redirect('!common/files/edit.php?fallback=code&p=' . rawurlencode($file->path)); 37 | }, $csrf_key); 38 | 39 | $tpl->assign(compact('csrf_key', 'parent')); 40 | 41 | $tpl->display('docs/new_file.tpl'); 42 | -------------------------------------------------------------------------------- /src/www/admin/docs/search.php: -------------------------------------------------------------------------------- 1 | assign('query', $q); 12 | 13 | if ($q) { 14 | $r = Files::search($q, File::CONTEXT_DOCUMENTS . '%'); 15 | $tpl->assign('results', $r); 16 | $tpl->assign('results_count', count($r)); 17 | } 18 | 19 | $tpl->display('docs/search.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/docs/shares.php: -------------------------------------------------------------------------------- 1 | canAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN)) { 15 | $session->requireAccess($session::SECTION_DOCUMENTS, $session::ACCESS_ADMIN); 16 | } 17 | 18 | Shares::prune(); 19 | 20 | $csrf_key = 'shares'; 21 | 22 | $form->runIf('delete', function () { 23 | $share = Shares::getByHashID($_POST['delete']); 24 | 25 | if (!$share) { 26 | throw new UserException('Ce partage n\'existe pas'); 27 | } 28 | 29 | $share->delete(); 30 | }, $csrf_key, Utils::getSelfURI()); 31 | 32 | $sharing_options = Share::OPTIONS; 33 | $list = Shares::getList(); 34 | $list->loadFromQueryString(); 35 | 36 | $tpl->assign(compact('csrf_key', 'list', 'sharing_options')); 37 | 38 | $tpl->display('docs/shares.tpl'); 39 | -------------------------------------------------------------------------------- /src/www/admin/legal.php: -------------------------------------------------------------------------------- 1 | display('legal.tpl'); 16 | -------------------------------------------------------------------------------- /src/www/admin/logout.php: -------------------------------------------------------------------------------- 1 | logout(qg('all') !== null); 8 | Utils::redirect('!login.php?logout'); 9 | -------------------------------------------------------------------------------- /src/www/admin/manifest.php: -------------------------------------------------------------------------------- 1 | $config->color2 ?? ADMIN_COLOR2, 11 | 'theme_color' => $config->color1 ?? ADMIN_COLOR1, 12 | 'description' => 'Gestion de l\'association', 13 | 'display' => 'standalone', 14 | 'name' => $config->org_name, 15 | 'start_url' => ADMIN_URL, 16 | 'icons' => [ 17 | [ 18 | 'sizes' => '32x32', 19 | 'src' => $config->fileURL('favicon'), 20 | 'type' => 'image/png', 21 | 'purpose' => 'any maskable', 22 | ], 23 | [ 24 | 'sizes' => '256x256', 25 | 'src' => $config->fileURL('icon', 'crop-256px'), 26 | 'type' => 'image/png', 27 | 'purpose' => 'any maskable', 28 | ], 29 | ], 30 | ]; 31 | 32 | $body = json_encode($manifest, JSON_PRETTY_PRINT); 33 | 34 | Utils::HTTPCache(md5($body), max($config->files['icon'], $config->files['favicon'], strtotime('2011-11-11'))); 35 | 36 | header('Content-Type: text/json; charset=utf-8'); 37 | echo $body; 38 | -------------------------------------------------------------------------------- /src/www/admin/me/_inc.php: -------------------------------------------------------------------------------- 1 | getUser(); 10 | 11 | if (!$user->exists()) { 12 | throw new UserException('Only existing users can change their info'); 13 | } 14 | -------------------------------------------------------------------------------- /src/www/admin/me/edit.php: -------------------------------------------------------------------------------- 1 | user(); 10 | $csrf_key = 'edit_my_info'; 11 | 12 | $form->runIf('save', function () use ($user) { 13 | $user->importForm(); 14 | $user->checkLoginFieldForUserEdit(); 15 | $user->save(); 16 | }, $csrf_key, '!me/?ok'); 17 | 18 | $fields = DynamicFields::getInstance()->all(); 19 | 20 | $tpl->assign(compact('csrf_key', 'user', 'fields')); 21 | 22 | $tpl->display('me/edit.tpl'); 23 | -------------------------------------------------------------------------------- /src/www/admin/me/export.php: -------------------------------------------------------------------------------- 1 | downloadExport(); 10 | -------------------------------------------------------------------------------- /src/www/admin/me/index.php: -------------------------------------------------------------------------------- 1 | getParentName(); 12 | $children = $user->listChildren(); 13 | 14 | $user = Session::getInstance()->user(); 15 | 16 | $variables = compact('user', 'parent_name', 'children', 'ok'); 17 | $tpl->assign('snippets', Modules::snippetsAsString(Modules::SNIPPET_MY_DETAILS, $variables)); 18 | 19 | $tpl->assign($variables); 20 | 21 | $tpl->display('me/index.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/me/preferences.php: -------------------------------------------------------------------------------- 1 | preferences; 13 | $csrf_key = 'my_preferences'; 14 | 15 | $form->runIf('save', function () use ($user) { 16 | foreach ($user::PREFERENCES as $key => $v) { 17 | $user->setPreference($key, f($key)); 18 | } 19 | $user->save(); 20 | }, $csrf_key, '!me/preferences.php?ok'); 21 | 22 | $folders_options = [ 23 | true => 'En galerie', 24 | false => 'En liste', 25 | ]; 26 | 27 | $page_size_options = [ 28 | 25 => 25, 29 | 50 => 50, 30 | 100 => 100, 31 | 200 => 200, 32 | 500 => 500, 33 | ]; 34 | 35 | $themes_options = [ 36 | false => 'Thème clair', 37 | true => 'Thème sombre', 38 | ]; 39 | 40 | $handheld_options = [ 41 | false => 'S\'adapter automatiquement à la taille de l\'écran', 42 | true => 'Toujours utiliser la disposition pour petit écran', 43 | ]; 44 | 45 | $tpl->assign(compact('preferences', 'ok', 'csrf_key', 'folders_options', 'page_size_options', 'themes_options', 'handheld_options')); 46 | 47 | $tpl->display('me/preferences.tpl'); 48 | -------------------------------------------------------------------------------- /src/www/admin/me/security.php: -------------------------------------------------------------------------------- 1 | password) { 13 | throw new UserException('You cannot change your security settings, as you don\'t have a password'); 14 | } 15 | 16 | $can_use_pgp = \KD2\Security::canUseEncryption(); 17 | $pgp_fingerprint = $user->getPGPKeyFingerprint(null, true); 18 | 19 | $tpl->assign('ok', qg('ok') !== null); 20 | $sessions_count = $session->countActiveSessions(); 21 | 22 | $id_field = current(DynamicFields::getInstance()->fieldsBySystemUse('login')); 23 | $id = $user->{$id_field->name}; 24 | $can_change_password = $user->canChangePassword($session); 25 | 26 | $tpl->assign(compact('id', 'id_field', 'user', 'sessions_count', 'can_change_password', 'can_use_pgp', 'pgp_fingerprint')); 27 | 28 | $tpl->display('me/security.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/me/security_otp.php: -------------------------------------------------------------------------------- 1 | password); 13 | 14 | $form->runIf('disable', function () use ($user) { 15 | $user->setOTPSecret(null); 16 | $user->save(false); // Don't self-check other fields 17 | }, $csrf_key, '!me/security.php?ok'); 18 | 19 | $form->runIf('enable', function () use ($user) { 20 | $user->verifyPassword(f('password_check')); 21 | $user->setOTPSecret(f('otp_secret'), f('otp_code')); 22 | $user->save(false); // Don't self-check other fields 23 | }, $csrf_key, '!me/security.php?ok'); 24 | 25 | $otp = null; 26 | 27 | if (!$user->otp_secret) { 28 | $otp = $user->createOTPSecret(); 29 | } 30 | 31 | $tpl->assign(compact('user', 'csrf_key', 'otp')); 32 | 33 | $tpl->display('me/security_otp.tpl'); 34 | -------------------------------------------------------------------------------- /src/www/admin/me/security_otp_recovery.php: -------------------------------------------------------------------------------- 1 | user(); 11 | 12 | if (!$user->canChangePassword($session)) { 13 | throw new UserException('Vous ne pouvez pas changer votre mot de passe.'); 14 | } 15 | 16 | $csrf_key = 'edit_recovery_' . md5($user->password); 17 | $generate = qg('generate') !== null; 18 | $verified = false; 19 | 20 | $form->runIf('generate', function () use ($user, &$verified, &$generate) { 21 | $user->verifyPassword(f('password_check')); 22 | $user->generateOTPRecoveryCodes(); 23 | $user->save(false); 24 | $verified = true; 25 | $generate = false; 26 | }, $csrf_key); 27 | 28 | $form->runIf('verify', function () use ($user, &$verified) { 29 | $user->verifyPassword(f('password_check')); 30 | $verified = true; 31 | }, $csrf_key); 32 | 33 | $codes = $user->otp_recovery_codes ? implode("\n", $user->otp_recovery_codes) : null; 34 | 35 | $tpl->assign(compact('user', 'csrf_key', 'generate', 'codes', 'verified')); 36 | 37 | $tpl->display('me/security_otp_recovery.tpl'); 38 | -------------------------------------------------------------------------------- /src/www/admin/me/security_password.php: -------------------------------------------------------------------------------- 1 | user(); 11 | 12 | if (!$user->canChangePassword($session)) { 13 | throw new UserException('Vous ne pouvez pas changer votre mot de passe.'); 14 | } 15 | 16 | $csrf_key = 'edit_password_' . md5($user->password); 17 | 18 | $form->runIf('confirm', function () use ($user) { 19 | $user->setNewPassword($_POST, true); 20 | $user->save(false); 21 | }, $csrf_key, '!me/security.php?ok'); 22 | 23 | $tpl->assign(compact('user', 'csrf_key')); 24 | 25 | $tpl->display('me/security_password.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/me/security_pgp.php: -------------------------------------------------------------------------------- 1 | password); 17 | 18 | $form->runIf('confirm', function () use ($user) { 19 | $user->verifyPassword(f('password_check')); 20 | $user->setPGPKey($user->pgp_key ? null : f('pgp_key')); 21 | $user->save(false); 22 | }, $csrf_key, '!me/security.php?ok'); 23 | 24 | $tpl->assign(compact('user', 'csrf_key')); 25 | 26 | $tpl->display('me/security_pgp.tpl'); 27 | -------------------------------------------------------------------------------- /src/www/admin/me/services.php: -------------------------------------------------------------------------------- 1 | assign('membre', $user); 12 | 13 | $list = Services_User::perUserList($user->id); 14 | $list->loadFromQueryString(); 15 | 16 | $tpl->assign(compact('list')); 17 | 18 | $services = Services_User::listDistinctForUser($user->id); 19 | $accounts = Reports::getAccountsBalances(['user' => $user->id, 'type' => Account::TYPE_THIRD_PARTY]); 20 | 21 | $variables = compact('list', 'services', 'accounts'); 22 | $tpl->assign($variables); 23 | $tpl->assign('snippets', Modules::snippetsAsString(Modules::SNIPPET_MY_SERVICES, $variables)); 24 | 25 | $tpl->display('me/services.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/services/_inc.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_READ); -------------------------------------------------------------------------------- /src/www/admin/services/details.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_READ); 8 | 9 | $service = Services::get((int) qg('id')); 10 | 11 | if (!$service) { 12 | throw new UserException("Cette activité n'existe pas"); 13 | } 14 | 15 | $type = qg('type'); 16 | $include_hidden_categories = $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN) && qg('hidden'); 17 | 18 | if ('unpaid' == $type) { 19 | $list = $service->unpaidUsersList($include_hidden_categories); 20 | } 21 | elseif ('expired' == $type) { 22 | $list = $service->expiredUsersList($include_hidden_categories); 23 | } 24 | elseif ('active' == $type) { 25 | $list = $service->activeUsersList($include_hidden_categories); 26 | } 27 | else { 28 | $type = 'all'; 29 | $list = $service->allUsersList($include_hidden_categories); 30 | } 31 | 32 | $list->loadFromQueryString(); 33 | 34 | $tpl->assign(compact('list', 'service', 'type', 'include_hidden_categories')); 35 | 36 | $tpl->display('services/details.tpl'); 37 | -------------------------------------------------------------------------------- /src/www/admin/services/edit.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 9 | 10 | $service = Services::get((int) qg('id')); 11 | 12 | if (!$service) { 13 | throw new UserException("Cette activité n'existe pas"); 14 | } 15 | 16 | $csrf_key = 'service_edit_' . $service->id(); 17 | 18 | $form->runIf('save', function () use ($service) { 19 | $service->importForm(); 20 | $service->save(); 21 | }, $csrf_key, ADMIN_URL . 'services/'); 22 | 23 | if ($service->duration) { 24 | $period = 1; 25 | } 26 | elseif ($service->start_date) { 27 | $period = 2; 28 | } 29 | else { 30 | $period = 0; 31 | } 32 | 33 | $tpl->assign(compact('service', 'period', 'csrf_key')); 34 | 35 | $tpl->display('services/edit.tpl'); 36 | -------------------------------------------------------------------------------- /src/www/admin/services/fees/details.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_READ); 8 | 9 | $fee = Fees::get((int) qg('id')); 10 | 11 | if (!$fee) { 12 | throw new UserException("Ce tarif n'existe pas"); 13 | } 14 | 15 | $type = qg('type'); 16 | $include_hidden_categories = $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN) && qg('hidden'); 17 | 18 | if ('unpaid' == $type) { 19 | $list = $fee->unpaidUsersList($include_hidden_categories); 20 | } 21 | elseif ('expired' == $type) { 22 | $list = $fee->expiredUsersList($include_hidden_categories); 23 | } 24 | elseif ('active' == $type) { 25 | $list = $fee->activeUsersList($include_hidden_categories); 26 | } 27 | else { 28 | $type = 'all'; 29 | $list = $fee->allUsersList($include_hidden_categories); 30 | } 31 | 32 | $list->loadFromQueryString(); 33 | 34 | $service = $fee->service(); 35 | 36 | $tpl->assign(compact('list', 'fee', 'type', 'service', 'include_hidden_categories')); 37 | 38 | $tpl->display('services/fees/details.tpl'); 39 | -------------------------------------------------------------------------------- /src/www/admin/services/fees/index.php: -------------------------------------------------------------------------------- 1 | fees(); 18 | 19 | $form->runIf($session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN) && f('save'), function () use ($service) { 20 | $fee = new Fee; 21 | $fee->id_service = $service->id(); 22 | $fee->importForm(); 23 | $fee->save(); 24 | }, 'fee_add', ADMIN_URL . 'services/fees/?id=' . $service->id()); 25 | 26 | $accounting_enabled = false; 27 | $years = Years::listOpen(); 28 | $list = $fees->listWithStats(); 29 | $list->loadFromQueryString(); 30 | 31 | $tpl->assign(compact('service', 'accounting_enabled', 'years')); 32 | $tpl->assign('list', $list); 33 | $tpl->assign('projects', Projects::listAssoc()); 34 | 35 | $tpl->display('services/fees/index.tpl'); 36 | -------------------------------------------------------------------------------- /src/www/admin/services/index.php: -------------------------------------------------------------------------------- 1 | runIf($session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN) && f('save'), function () { 12 | $service = new Service; 13 | $service->importForm(); 14 | $service->save(); 15 | Utils::redirect(ADMIN_URL . 'services/fees/?id=' . $service->id()); 16 | }, $csrf_key); 17 | 18 | $has_old_services = Services::countOldServices(); 19 | $show_old_services = $_GET['old'] ?? false; 20 | 21 | $list = Services::listWithStats(!$show_old_services); 22 | $list->loadFromQueryString(); 23 | 24 | $tpl->assign(compact('csrf_key', 'has_old_services', 'show_old_services', 'list')); 25 | 26 | $tpl->display('services/index.tpl'); 27 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 11 | 12 | $reminder = Reminders::get((int) qg('id')); 13 | 14 | if (!$reminder) { 15 | throw new UserException("Ce rappel n'existe pas"); 16 | } 17 | 18 | $csrf_key = 'reminder_delete_' . $reminder->id(); 19 | 20 | $form->runIf('delete', function () use ($reminder) { 21 | $reminder->delete(); 22 | }, $csrf_key, ADMIN_URL . 'services/reminders/'); 23 | 24 | $tpl->assign(compact('reminder', 'csrf_key')); 25 | 26 | $tpl->display('services/reminders/delete.tpl'); 27 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/details.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 10 | 11 | $reminder = Reminders::get((int) qg('id')); 12 | 13 | if (!$reminder) { 14 | throw new UserException("Ce rappel n'existe pas"); 15 | } 16 | 17 | $service = $reminder->service(); 18 | 19 | if (qg('list') === 'pending') { 20 | $current_list = 'pending'; 21 | $list = $reminder->pendingList(); 22 | } 23 | else { 24 | $current_list = 'sent'; 25 | $list = $reminder->sentList(); 26 | } 27 | 28 | $list->loadFromQueryString(); 29 | 30 | $tpl->assign(compact('current_list', 'list', 'reminder', 'service')); 31 | 32 | $tpl->display('services/reminders/details.tpl'); 33 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/index.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 10 | 11 | $services_list = Services::listAssoc(); 12 | 13 | if (!count($services_list)) { 14 | Utils::redirect(ADMIN_URL . 'services/?CREATE'); 15 | } 16 | 17 | $list = Reminders::getList(); 18 | $list->loadFromQueryString(); 19 | 20 | $tpl->assign(compact('list')); 21 | 22 | $tpl->display('services/reminders/index.tpl'); 23 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/new.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 10 | 11 | $csrf_key = 'reminder_add'; 12 | $reminder = new Reminder; 13 | $services_list = Services::listAssoc(); 14 | 15 | $form->runIf('save', function () use ($reminder) { 16 | $reminder->importForm(); 17 | $reminder->save(); 18 | }, $csrf_key, '!services/reminders/'); 19 | 20 | $reminder->subject = $reminder::DEFAULT_SUBJECT; 21 | $reminder->body = $reminder::DEFAULT_BODY; 22 | 23 | $tpl->assign(compact('csrf_key', 'reminder', 'services_list')); 24 | 25 | $tpl->display('services/reminders/new.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/preview.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 10 | 11 | $reminder = Reminders::get((int) qg('id_reminder')); 12 | 13 | if (!$reminder) { 14 | throw new UserException("Ce rappel n'existe pas"); 15 | } 16 | 17 | $body = $reminder->getPreview((int) qg('id_user')); 18 | 19 | $tpl->assign(compact('body')); 20 | 21 | $tpl->display('services/reminders/preview.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/services/reminders/user.php: -------------------------------------------------------------------------------- 1 | assign(compact('list', 'user_id')); 14 | 15 | $tpl->display('services/reminders/user.tpl'); 16 | -------------------------------------------------------------------------------- /src/www/admin/services/user/add.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 11 | 12 | // This controller allows to either select a user if none has been provided in the query string 13 | // or subscribe a user to an activity (create a new Service_User entity) 14 | // If $user_id is null then the form is just a select to choose a user 15 | 16 | $count_all = Services::count(); 17 | 18 | if (!$count_all) { 19 | Utils::redirect(ADMIN_URL . 'services/?CREATE'); 20 | } 21 | 22 | $services = Services::listGroupedWithFeesForSelect(); 23 | $categories = Categories::listAssoc(); 24 | 25 | $tpl->assign(compact('services', 'categories')); 26 | 27 | $tpl->display('services/user/add.tpl'); 28 | -------------------------------------------------------------------------------- /src/www/admin/services/user/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 10 | 11 | $su = Services_User::get((int) qg('id')); 12 | 13 | if (!$su) { 14 | throw new UserException("Cette inscription n'existe pas"); 15 | } 16 | 17 | $csrf_key = 'su_delete_' . $su->id(); 18 | $user_id = $su->id_user; 19 | 20 | $form->runIf('delete', function () use ($su) { 21 | $su->delete(); 22 | }, $csrf_key, ADMIN_URL . 'services/user/?id=' . $user_id); 23 | 24 | $user_name = Users::getName($su->id_user); 25 | 26 | $service_name = $su->service()->label; 27 | $fee_name = $su->id_fee ? $su->fee()->label : null; 28 | 29 | $tpl->assign(compact('csrf_key', 'user_name', 'fee_name', 'service_name')); 30 | 31 | $tpl->display('services/user/delete.tpl'); 32 | -------------------------------------------------------------------------------- /src/www/admin/services/user/edit.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 10 | 11 | $su = Services_User::get((int) qg('id')); 12 | 13 | if (!$su) { 14 | throw new UserException("Cette inscription n'existe pas"); 15 | } 16 | 17 | $csrf_key = 'su_edit_' . $su->id(); 18 | $users = [$su->id_user => Users::getName($su->id_user)]; 19 | $form_url = sprintf('edit.php?id=%d&', $su->id()); 20 | $create = false; 21 | 22 | require __DIR__ . '/_form.php'; 23 | 24 | $form->runIf('save', function () use ($su) { 25 | $su->importForm(); 26 | $su->importForm(['paid' => (bool)f('paid')]); 27 | $su->updateExpectedAmount(); 28 | $su->save(); 29 | }, $csrf_key, ADMIN_URL . 'services/user/?id=' . $su->id_user); 30 | 31 | $service_user = $su; 32 | 33 | $tpl->assign(compact('csrf_key', 'service_user')); 34 | 35 | $tpl->display('services/user/edit.tpl'); 36 | -------------------------------------------------------------------------------- /src/www/admin/services/user/link.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 10 | $session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ); 11 | 12 | $su = Services_User::get((int)qg('id')); 13 | 14 | if (!$su) { 15 | throw new UserException("Cette inscription n'existe pas"); 16 | } 17 | 18 | $csrf_key = 'service_link'; 19 | 20 | $form->runIf('save', function () use ($su) { 21 | $id = (int)f('id_transaction'); 22 | $transaction = Transactions::get($id); 23 | 24 | if (!$transaction) { 25 | throw new UserException('Impossible de trouver l\'écriture #' . $id); 26 | } 27 | 28 | $transaction->linkToSubscription($su->id); 29 | }, $csrf_key, '!acc/transactions/service_user.php?id=' . $su->id . '&user=' . $su->id_user); 30 | 31 | $tpl->assign(compact('csrf_key')); 32 | 33 | $tpl->display('services/user/link.tpl'); 34 | -------------------------------------------------------------------------------- /src/www/admin/share_legacy.php: -------------------------------------------------------------------------------- 1 | checkShareLink($hash, $password)) { 28 | $file->serve(); 29 | } 30 | elseif ($file->checkShareLinkRequiresPassword($hash)) { 31 | $tpl = Template::getInstance(); 32 | $has_password = (bool) $password; 33 | 34 | $tpl->assign(compact('has_password')); 35 | $tpl->display('share_password.tpl'); 36 | } 37 | else { 38 | throw new UserException('Ce lien de partage est invalide.', 404); 39 | } 40 | -------------------------------------------------------------------------------- /src/www/admin/static/admin.css: -------------------------------------------------------------------------------- 1 | @import url("styles/00-reset.css"); 2 | @import url("styles/01-layout.css"); 3 | @import url("styles/02-common.css"); 4 | @import url("styles/03-forms.css"); 5 | @import url("styles/04-dialogs.css"); 6 | @import url("styles/05-navigation.css"); 7 | @import url("styles/06-tables-common.css"); 8 | @import url("styles/07-tables.css"); 9 | @import url("styles/10-accounting.css"); 10 | -------------------------------------------------------------------------------- /src/www/admin/static/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/bg.png -------------------------------------------------------------------------------- /src/www/admin/static/bg_dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/bg_dev.png -------------------------------------------------------------------------------- /src/www/admin/static/doc/shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/doc/shapes.png -------------------------------------------------------------------------------- /src/www/admin/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/favicon.png -------------------------------------------------------------------------------- /src/www/admin/static/font/paheko.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/font/paheko.eot -------------------------------------------------------------------------------- /src/www/admin/static/font/paheko.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/font/paheko.ttf -------------------------------------------------------------------------------- /src/www/admin/static/font/paheko.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/font/paheko.woff -------------------------------------------------------------------------------- /src/www/admin/static/font/paheko.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/font/paheko.woff2 -------------------------------------------------------------------------------- /src/www/admin/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/icon.png -------------------------------------------------------------------------------- /src/www/admin/static/pics/img_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/pics/img_center.png -------------------------------------------------------------------------------- /src/www/admin/static/pics/img_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/pics/img_flow.png -------------------------------------------------------------------------------- /src/www/admin/static/pics/img_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/pics/img_left.png -------------------------------------------------------------------------------- /src/www/admin/static/pics/img_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paheko/paheko/1ca7d2b8e8f3bbc3b25c262c7a3194e55f8de5e1/src/www/admin/static/pics/img_right.png -------------------------------------------------------------------------------- /src/www/admin/static/scripts/lib/webdav.fr.js: -------------------------------------------------------------------------------- 1 | var lang_strings = { 2 | 'Rename': 'Renommer', 3 | 'Delete': 'Supprimer', 4 | 'Edit': 'Éditer', 5 | 'Directory name': 'Nom du répertoire', 6 | 'File name': 'Nom du fichier', 7 | 'New file name': 'Nom du nouveau fichier', 8 | 'Upload this file?': 'Envoyer ce fichier ?', 9 | 'Confirm delete?': 'Confirmer la suppression ?', 10 | 'Close': 'Fermer', 11 | 'Files': 'Fichiers', 12 | 'New directory': 'Nouveau répertoire', 13 | 'New text file': 'Nouveau fichier texte', 14 | 'Upload file': 'Envoyer un fichier', 15 | 'Download': 'Télécharger', 16 | 'B': 'o', // Bytes unit 17 | '%d minutes ago': 'il y a %d minutes', 18 | '%d hours ago': 'il y a %d heures', 19 | 'Yesterday, %s': 'Hier à %s', 20 | 'OK': 'OK', 21 | 'Back': 'Retour', 22 | 'Sort by name': 'Trier par nom', 23 | 'Sort by date': 'Trier par date', 24 | 'Sort by size': 'Trier par taille', 25 | 'Download all files': 'Tout télécharger' 26 | }; 27 | -------------------------------------------------------------------------------- /src/www/admin/static/styles/tables_export.css: -------------------------------------------------------------------------------- 1 | td { 2 | -spreadsheet-cell-type: string; 3 | } 4 | 5 | td.money { 6 | -spreadsheet-cell-type: currency; 7 | } 8 | 9 | table.statement td, table.statement th { 10 | border: 1pt solid #666666; 11 | } 12 | 13 | table.autofilter { 14 | -spreadsheet-autofilter: true; 15 | } 16 | 17 | table.autofilter thead tr { 18 | position: fixed; 19 | } 20 | 21 | table.statement thead th, table.statement thead td { 22 | background-color: #cccccc; 23 | } 24 | 25 | table.statement tbody tr.even td, table.statement tbody tr.even th { 26 | background-color: #eeeeee; 27 | } 28 | 29 | table.statement tfoot td, table.statement tfoot th { 30 | background-color: #dddddd; 31 | } 32 | -------------------------------------------------------------------------------- /src/www/admin/upgrade.php: -------------------------------------------------------------------------------- 1 | version(), paheko_version()) 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/www/admin/users/_inc.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_READ); 7 | -------------------------------------------------------------------------------- /src/www/admin/users/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 9 | 10 | $user = Users::get((int) qg('id')); 11 | 12 | if (!$user) { 13 | throw new UserException("Ce membre n'existe pas."); 14 | } 15 | 16 | if ($user->id === $session->getUser()->id) { 17 | throw new UserException("Il n'est pas possible de supprimer votre propre compte, merci de demander à un administrateur de le faire."); 18 | } 19 | 20 | // Protect against admin users being deleted/modified by less powerful users 21 | $user->validateCanBeModifiedBy($session); 22 | 23 | $csrf_key = 'delete_user_' . $user->id; 24 | 25 | $form->runIf('delete', function () use ($user) { 26 | $user->delete(); 27 | }, $csrf_key, '!users/?msg=DELETE', true); 28 | 29 | $name = $user->name(); 30 | $warning = sprintf("Êtes-vous sûr de vouloir supprimer le membre « %s » ?", $name); 31 | 32 | $tpl->assign(compact('user', 'csrf_key', 'warning')); 33 | 34 | $tpl->display('users/delete.tpl'); 35 | -------------------------------------------------------------------------------- /src/www/admin/users/log.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 13 | $params['history'] = $id; 14 | } 15 | elseif (($id = (int)qg('id'))) { 16 | $session->requireAccess($session::SECTION_USERS, $session::ACCESS_ADMIN); 17 | $params['id_user'] = $id; 18 | } 19 | else { 20 | $params['id_self'] = Session::getUserId(); 21 | 22 | if (!$params['id_self']) { 23 | throw new UserException('Access forbidden'); 24 | } 25 | } 26 | 27 | $tpl->assign('current', isset($params['id_self']) ? 'me' : 'users'); 28 | 29 | $list = Log::list($params); 30 | $list->loadFromQueryString(); 31 | 32 | $tpl->assign(compact('list', 'params')); 33 | 34 | $tpl->display('users/log.tpl'); 35 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/_inc.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 11 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/block.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 9 | 10 | $address = qg('address'); 11 | $email = Emails::getOrCreateEmail($address); 12 | 13 | $csrf_key = 'block_email'; 14 | 15 | $form->runIf('send', function () use ($email) { 16 | $email->setOptout('Désinscription manuelle par un administrateur'); 17 | $email->save(); 18 | }, $csrf_key, '!users/'); 19 | 20 | $tpl->assign(compact('csrf_key', 'email', 'address')); 21 | $tpl->display('users/mailing/block.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/delete.php: -------------------------------------------------------------------------------- 1 | runIf('delete', function () use ($mailing) { 18 | $mailing->delete(); 19 | }, $csrf_key, '!users/mailing/?msg=DELETE'); 20 | 21 | $tpl->assign(compact('mailing', 'csrf_key')); 22 | $tpl->display('users/mailing/delete.tpl'); 23 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/details.php: -------------------------------------------------------------------------------- 1 | getHTMLPreview((int)qg('preview') ?: null, true); 17 | return; 18 | } 19 | 20 | $tpl->assign(compact('mailing')); 21 | 22 | $tpl->assign('custom_css', [BASE_URL . 'content.css']); 23 | $tpl->assign('sent', null !== qg('sent')); 24 | 25 | $tpl->display('users/mailing/details.tpl'); 26 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/index.php: -------------------------------------------------------------------------------- 1 | loadFromQueryString(); 12 | 13 | 14 | $tpl->assign(compact('list')); 15 | 16 | $tpl->display('users/mailing/index.tpl'); 17 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/recipient_data.php: -------------------------------------------------------------------------------- 1 | getRecipientExtraData((int)qg('r')); 16 | 17 | if (!$data) { 18 | throw new UserException('Ce destinataire n\'a aucune donnée.'); 19 | } 20 | 21 | $tpl->assign(compact('mailing', 'data')); 22 | 23 | $tpl->display('users/mailing/recipient_data.tpl'); 24 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/recipients.php: -------------------------------------------------------------------------------- 1 | sent) { 18 | $form->runIf('delete', function () use ($mailing) { 19 | $mailing->deleteRecipient((int)f('delete')); 20 | }, $csrf_key, '!users/mailing/recipients.php?id=' . $mailing->id); 21 | } 22 | 23 | $list = $mailing->getRecipientsList(); 24 | $list->loadFromQueryString(); 25 | 26 | $tpl->assign(compact('mailing', 'list', 'csrf_key')); 27 | 28 | $tpl->display('users/mailing/recipients.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/rejected.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 10 | 11 | $limit_date = new \DateTime(Email::RESEND_VERIFICATION_DELAY); 12 | 13 | $form->runIf(f('force_queue') && !USE_CRON, function () use ($session) { 14 | $session->requireAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN); 15 | 16 | Emails::runQueue(); 17 | }, null, '!membres/emails.php?forced'); 18 | 19 | $list = Emails::listRejectedUsers(); 20 | $list->loadFromQueryString(); 21 | 22 | $max_fail_count = Emails::FAIL_LIMIT; 23 | $queue_count = Emails::countQueue(); 24 | $tpl->assign(compact('list', 'max_fail_count', 'queue_count', 'limit_date')); 25 | 26 | $tpl->display('users/mailing/rejected.tpl'); 27 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/send.php: -------------------------------------------------------------------------------- 1 | sent) { 17 | throw new UserException('This message has already been sent.'); 18 | } 19 | 20 | $csrf_key = 'mailing_send'; 21 | 22 | $form->runIf('send', function() use ($mailing) { 23 | $mailing->send(); 24 | }, $csrf_key, '!users/mailing/details.php?sent&id=' . $mailing->id); 25 | 26 | $tpl->assign(compact('mailing', 'csrf_key')); 27 | 28 | $tpl->display('users/mailing/send.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/users/mailing/verify.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_USERS, $session::ACCESS_WRITE); 9 | 10 | $address = qg('address'); 11 | $email = Emails::getOrCreateEmail($address); 12 | 13 | if (!$email->canSendVerificationAfterFail()) { 14 | if ($email->optout) { 15 | $message = 'Il n\'est pas possible de renvoyer une vérification à cette adresse pour le moment, il faut attendre 3 jours.'; 16 | } 17 | else { 18 | $message = 'Il n\'est pas possible de renvoyer une vérification à cette adresse pour le moment, il faut attendre 15 jours.'; 19 | } 20 | 21 | throw new UserException($message); 22 | } 23 | 24 | $csrf_key = 'send_verification'; 25 | 26 | $form->runIf('send', function () use ($email, $address) { 27 | $email->sendVerification($address); 28 | }, $csrf_key, '!users/mailing/rejected.php?sent', true); 29 | 30 | $tpl->assign(compact('csrf_key', 'email')); 31 | $tpl->display('users/mailing/verify.tpl'); 32 | -------------------------------------------------------------------------------- /src/www/admin/users/saved_searches.php: -------------------------------------------------------------------------------- 1 | assign(compact('query', 'list')); 19 | 20 | $tpl->display('users/selector.tpl'); 21 | -------------------------------------------------------------------------------- /src/www/admin/web/_inc.php: -------------------------------------------------------------------------------- 1 | requireAccess(Session::SECTION_WEB, $session::ACCESS_READ); 10 | 11 | $tpl->assign('custom_css', ['web.css']); 12 | -------------------------------------------------------------------------------- /src/www/admin/web/_selector.php: -------------------------------------------------------------------------------- 1 | id_parent; 23 | $current_cat_id = $current->id(); 24 | $current_cat_title = $current->title; 25 | $breadcrumbs = $current->getBreadcrumbs(); 26 | } 27 | else { 28 | $parent_id = null; 29 | $current_cat_id = null; 30 | $current_cat_title = 'Racine du site'; 31 | $breadcrumbs = []; 32 | } 33 | 34 | // used to avoid being able to put a category inside itself 35 | $id_page = (int) qg('id_page'); 36 | 37 | $breadcrumbs = [null => 'Racine du site'] + $breadcrumbs; 38 | $categories = Web::listCategories($current_cat_id, $id_page); 39 | 40 | $tpl->assign(compact('breadcrumbs', 'parent_id', 'categories', 'current_cat_id', 'current_cat_title', 'id_page')); 41 | 42 | $tpl->display('web/_selector.tpl'); 43 | -------------------------------------------------------------------------------- /src/www/admin/web/all.php: -------------------------------------------------------------------------------- 1 | loadFromQueryString(); 14 | 15 | $can_edit = $session->canAccess($session::SECTION_WEB, $session::ACCESS_WRITE); 16 | 17 | $tpl->assign('custom_css', ['web.css']); 18 | 19 | $tpl->assign(compact('list', 'can_edit')); 20 | 21 | $tpl->display('web/all.tpl'); 22 | -------------------------------------------------------------------------------- /src/www/admin/web/delete.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_WEB, $session::ACCESS_ADMIN); 10 | 11 | $page = Web::get((int)qg('id')); 12 | 13 | if (!$page) { 14 | throw new UserException('Page inconnue'); 15 | } 16 | 17 | $csrf_key = 'web_delete_' . $page->id(); 18 | 19 | $form->runIf('delete', function () use ($page) { 20 | $page->delete(); 21 | Utils::redirectDialog('!web/?id=' . $page->id_parent); 22 | }, $csrf_key); 23 | 24 | $tpl->assign(compact('page', 'csrf_key')); 25 | $tpl->assign('title', $page->type == Page::TYPE_CATEGORY ? 'Supprimer une catégorie' : 'Supprimer une page'); 26 | $tpl->assign('alert', $page->type == Page::TYPE_CATEGORY ? 'Attention ceci supprimera toutes les sous-catégories, pages et fichiers dans cette catégorie.' : 'Attention ceci supprimera tous les fichiers liés dans cette page.'); 27 | 28 | $tpl->display('web/delete.tpl'); 29 | -------------------------------------------------------------------------------- /src/www/admin/web/new.php: -------------------------------------------------------------------------------- 1 | requireAccess($session::SECTION_WEB, $session::ACCESS_WRITE); 13 | 14 | $csrf_key = 'web_page_new'; 15 | 16 | $parent = qg('parent') ?: ''; 17 | 18 | $form->runIf('create', function () use ($parent) { 19 | $type = (int) qg('type'); 20 | $page = Page::create($type, $parent ?: null, f('title'), $type === Page::TYPE_PAGE ? Page::STATUS_DRAFT : Page::STATUS_ONLINE); 21 | $page->save(); 22 | 23 | if ($page->type === Page::TYPE_CATEGORY) { 24 | $url = '!web/?id=' . $page->id(); 25 | } 26 | else { 27 | $url = '!web/edit.php?new&id=' . $page->id(); 28 | } 29 | 30 | if (null !== qg('_dialog')) { 31 | Utils::reloadParentFrame($url); 32 | } 33 | else { 34 | Utils::redirect($url); 35 | } 36 | }, $csrf_key); 37 | 38 | $title = qg('type') == Page::TYPE_CATEGORY ? 'Nouvelle catégorie' : 'Nouvelle page'; 39 | 40 | $tpl->assign(compact('title', 'csrf_key')); 41 | 42 | $tpl->display('web/new.tpl'); 43 | -------------------------------------------------------------------------------- /src/www/admin/web/search.php: -------------------------------------------------------------------------------- 1 | assign('query', $q); 12 | 13 | if ($q) { 14 | $r = Web::search($q); 15 | $tpl->assign('results', $r); 16 | $tpl->assign('results_count', count($r)); 17 | } 18 | 19 | $tpl->display('web/search.tpl'); 20 | -------------------------------------------------------------------------------- /src/www/admin/web/sitemap.php: -------------------------------------------------------------------------------- 1 | canAccess($session::SECTION_WEB, $session::ACCESS_WRITE); 14 | 15 | $tpl->assign(compact('list', 'can_edit')); 16 | 17 | function display_sitemap($list, $level = 3): string 18 | { 19 | $out = ''; 30 | return $out; 31 | } 32 | 33 | $tpl->register_modifier('display_sitemap', 'Paheko\display_sitemap'); 34 | 35 | $tpl->display('web/sitemap.tpl'); 36 | -------------------------------------------------------------------------------- /src/www/index.php: -------------------------------------------------------------------------------- 1 | $label) { 12 | $chart = Charts::install($code); 13 | Test::isInstanceOf(Chart::class, $chart); 14 | Test::assert($chart->exists()); 15 | Test::assert($chart->id() >= 1); 16 | } 17 | -------------------------------------------------------------------------------- /tests/unit_tests/02_accounting/money.php: -------------------------------------------------------------------------------- 1 | setAccessLevelByName('admin'); 15 | return $api->route(); 16 | } 17 | -------------------------------------------------------------------------------- /tests/unit_tests/03_api/user.php: -------------------------------------------------------------------------------- 1 | 0); 12 | $c = current($c); 13 | Test::isInstanceOf(\stdClass::class, $c); 14 | Test::assert(isset($c->name)); 15 | Test::assert(isset($c->id)); 16 | 17 | $c = api('POST', 'user/new', ['nom' => 'Coucou']); 18 | Test::isArray($c); 19 | Test::assert(count($c) > 0); 20 | $c = (object) $c; 21 | 22 | Test::assert(isset($c->nom)); 23 | Test::strictlyEquals('Coucou', $c->nom); 24 | Test::assert(isset($c->id)); 25 | -------------------------------------------------------------------------------- /tools/factory/factory_cron.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Répertoire où sont stockées les données des utilisateurs 4 | # veiller à ce que ce soit le même que dans config.local.php 5 | FACTORY_USER_DIRECTORY="users" 6 | 7 | # Chemin vers le script bin/paheko 8 | PAHEKO_BIN="bin/paheko" 9 | 10 | for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */) 11 | do 12 | PAHEKO_FACTORY_USER=$(basename "$user") php $PAHEKO_BIN cron 13 | echo $PAHEKO_FACTORY_USER 14 | done 15 | -------------------------------------------------------------------------------- /tools/factory/factory_cron_emails.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Répertoire où sont stockées les données des utilisateurs 4 | # veiller à ce que ce soit le même que dans config.local.php 5 | FACTORY_USER_DIRECTORY="users" 6 | 7 | # Chemin vers le script bin/paheko 8 | PAHEKO_BIN="bin/paheko" 9 | 10 | for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */) 11 | do 12 | PAHEKO_FACTORY_USER=$(basename "$user") php $PAHEKO_BIN queue run 13 | echo $PAHEKO_FACTORY_USER 14 | done 15 | -------------------------------------------------------------------------------- /tools/factory/factory_upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Répertoire où sont stockées les données des utilisateurs 4 | # veiller à ce que ce soit le même que dans config.local.php 5 | FACTORY_USER_DIRECTORY="users" 6 | 7 | # Chemin vers le script upgrade.php de Paheko 8 | PAHEKO_UPGRADE_SCRIPT="scripts/cron.php" 9 | 10 | for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */) 11 | do 12 | PAHEKO_FACTORY_USER=$(basename "$user") 13 | php $PAHEKO_UPGRADE_SCRIPT 14 | done 15 | -------------------------------------------------------------------------------- /tools/fossil_get_branch_hash.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | (.*?)!', $html, $match)) { 15 | echo "Cannot find hash\n"; 16 | exit(1); 17 | } 18 | 19 | $hash = trim(strip_tags($match[1])); 20 | 21 | if (strlen($hash) !== 40 && strlen($hash) !== 64) { 22 | echo "Wrong hash length\n"; 23 | exit(1); 24 | } 25 | 26 | if (!preg_match('!^[0-9a-f]+$!', $hash)) { 27 | echo "Wrong hash: " . $hash . "\n"; 28 | exit(1); 29 | } 30 | 31 | echo $hash; 32 | --------------------------------------------------------------------------------