Formatting
authorBot <bot@myigel.name>
Fri, 1 Dec 2017 15:21:45 +0000 (16:21 +0100)
committerIgor Scheller <igor.scheller@igorshp.de>
Fri, 1 Dec 2017 16:00:09 +0000 (17:00 +0100)
16 files changed:
README [deleted file]
README.md [new file with mode: 0644]
composer.json
include/cryptography.php
include/directdebit.php
include/earnings.php
include/events.php
include/expenses.php
include/fees.php
include/finances.php
include/members.php
include/misc.php
include/payments.php
include/xlsexport.php
index.php
src/.gitkeep [deleted file]

diff --git a/README b/README
deleted file mode 100644 (file)
index 6a2d8a9..0000000
--- a/README
+++ /dev/null
@@ -1,20 +0,0 @@
-Needs PEAR OLE and PEAR Spreadsheet_Excel_Writer in Subdirectory pear/ like:
-
-pear/
-pear/OLE
-pear/OLE/ChainedBlockStream.php
-pear/OLE/PPS
-pear/OLE/PPS/File.php
-pear/OLE/PPS/Root.php
-pear/OLE/PPS.php
-pear/OLE.php
-pear/Spreadsheet
-pear/Spreadsheet/Excel
-pear/Spreadsheet/Excel/Writer
-pear/Spreadsheet/Excel/Writer/BIFFwriter.php
-pear/Spreadsheet/Excel/Writer/Format.php
-pear/Spreadsheet/Excel/Writer/Parser.php
-pear/Spreadsheet/Excel/Writer/Validator.php
-pear/Spreadsheet/Excel/Writer/Workbook.php
-pear/Spreadsheet/Excel/Writer/Worksheet.php
-pear/Spreadsheet/Excel/Writer.php
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..64adaaa
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# MemberDB
+
+## Installation
+* `ìnstall.sql` einspielen
+* `config.sample.php` in `config.php` umbenennen und Zugangsdaten eintragen 
+
+## Update
+* `update.sql` einspielen
index 187aba2..84f076a 100644 (file)
@@ -6,9 +6,6 @@
     "require": {
         "pear/spreadsheet_excel_writer": "*"
     },
-    "require-dev": {
-        "sstalle/php7cc": "^1.2"
-    },
     "autoload": {
         "psr-4": {
             "MemberDB\\": "src/"
index 5615716..00cbb62 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-/* CRYPTOGRAPHY DOCUMENTATION {{{
+/* CRYPTOGRAPHY DOCUMENTATION
 
 Derived from http://clemens.endorphin.org/TKS1-draft.pdf
 
@@ -50,9 +50,9 @@ Derived from http://clemens.endorphin.org/TKS1-draft.pdf
 
 PROBLEM: AES uses a random initialization vector and creates different output for same parameters
 
-}}} */
+*/
 
-/* DB functions {{{ */
+/* DB functions */
 function db_get_crypto_keys()
 {
     return db_select_multi('SELECT * FROM `cryptography`');
@@ -65,17 +65,14 @@ function db_add_crypto_key($key)
     return (db_insert('cryptography', $key));
 }
 
-/* }}} */
-
-function validate_crypto_key($userdata, &$dbdata, &$validation)
-{/*{{{*/
+function validate_crypto_key($userdata, &$dbdata)
+{
     $fields = array(
         'description' => 'string',
         'masterkey'   => 'string',
         'salt'        => 'string',
         'control'     => 'string'
     );
-    $orig = $dbdata;
     foreach ($fields as $name => $type) {
         if (!isset($userdata[$name])) {
             continue;
@@ -83,12 +80,10 @@ function validate_crypto_key($userdata, &$dbdata, &$validation)
         $dbdata[$name] = $userdata[$name];
     }
     return true;
-}/*}}}*/
-
+}
 
 function action_cryptography()
-{/*{{{*/
-
+{
     $log_messages = array();
 
     if (isset($_POST['task'])) {
@@ -100,7 +95,7 @@ function action_cryptography()
                     'salt'        => '',
                     'control'     => ''
                 );
-                if (validate_crypto_key($_POST, $key, $log_messages)) {
+                if (validate_crypto_key($_POST, $key)) {
                     if (db_add_crypto_key($key)) {
                         redirect(link_to('cryptography'));
                     }
@@ -124,7 +119,7 @@ function action_cryptography()
         </tr>
         <?php foreach ($keys as $key) : ?>
             <tr>
-                <td><?= html_escape($key['description']) ?></td>
+                <td><?php echo html_escape($key['description']) ?></td>
             </tr>
         <?php endforeach ?>
     </table>
@@ -134,11 +129,10 @@ function action_cryptography()
     <?php
 
     form_cryptography($keys, $log_messages);
-}/*}}}*/
-
+}
 
 function form_cryptography($keys = array(), $log_messages = array())
-{/*{{{*/
+{
     ?>
     <?php if (empty($keys)) : ?>
     <div class="clearfix">
@@ -150,19 +144,19 @@ function form_cryptography($keys = array(), $log_messages = array())
         <fieldset class="clearfix">
             <legend>Ersteinrichtung</legend>
             <?php log_messages($log_messages); ?>
-            <?= html_text_field('Nickname', 'description_visible') ?>
-            <?= html_password_field('Passwort', 'password1') ?>
-            <?= html_password_field('Passwort (wdh.)', 'password2') ?>
+            <?php echo html_text_field('Nickname', 'description_visible') ?>
+            <?php echo html_password_field('Passwort', 'password1') ?>
+            <?php echo html_password_field('Passwort (wdh.)', 'password2') ?>
         </fieldset>
         <input class="submit" type="button" name="btn_initialize" value="Masterkey erzeugen und speichern"
                onclick="initialize()"/>
     </div>
     <form action="" method="post" id="keyform">
-        <?= html_hidden_field('description') ?>
-        <?= html_hidden_field('masterkey') ?>
-        <?= html_hidden_field('salt') ?>
-        <?= html_hidden_field('control') ?>
-        <?= html_hidden_field('task', 'add') ?>
+        <?php echo html_hidden_field('description') ?>
+        <?php echo html_hidden_field('masterkey') ?>
+        <?php echo html_hidden_field('salt') ?>
+        <?php echo html_hidden_field('control') ?>
+        <?php echo html_hidden_field('task', 'add') ?>
     </form>
 
     <?php js_modal_windows() ?>
@@ -177,8 +171,8 @@ function form_cryptography($keys = array(), $log_messages = array())
             });
         });
 
-        function initialize() {/*{{{*/
-//    var t1 = new Date().getTime()
+        function initialize() {
+            // var t1 = new Date().getTime() // Debugging/Benchmarking
 
             var description = $('#description_visible').val();
             if (description.length < 1) {
@@ -235,9 +229,9 @@ function form_cryptography($keys = array(), $log_messages = array())
                         "control: " + control
                     );
                     return;
+                    var t2 = new Date().getTime()
+                    alert((t2 - t1) / 1000); // benchmark
                 */
-                //    var t2 = new Date().getTime()
-                //    alert((t2 - t1) / 1000); // benchmark
 
                 // 1.9 Store data: key=1.7 salt=1.2, control=1.8
                 $('#masterkey').val(crypted_masterkey);
@@ -248,8 +242,6 @@ function form_cryptography($keys = array(), $log_messages = array())
                 $('#keyform').submit();
             }, 500);
         }
-
-        /*}}}*/
     </script>
 
 <?php else : ?>
@@ -263,21 +255,21 @@ function form_cryptography($keys = array(), $log_messages = array())
         <fieldset class="clearfix">
             <legend>Passwort hinzuf&uuml;gen</legend>
             <?php log_messages($log_messages); ?>
-            <?= html_password_field('Exist. Passwort', 'password1') ?>
+            <?php echo html_password_field('Exist. Passwort', 'password1') ?>
             <small>Bestehendes Passwort</small>
-            <?= html_text_field('Nickname', 'description_visible') ?>
-            <?= html_password_field('Passwort', 'password2') ?>
-            <?= html_password_field('Passwort (wdh.)', 'password3') ?>
+            <?php echo html_text_field('Nickname', 'description_visible') ?>
+            <?php echo html_password_field('Passwort', 'password2') ?>
+            <?php echo html_password_field('Passwort (wdh.)', 'password3') ?>
         </fieldset>
         <input class="submit" type="button" name="btn_add_new_key" value="Passwort hinzuf&uuml;gen"
                onclick="add_new_key()"/>
     </div>
     <form action="" method="post" id="keyform">
-        <?= html_hidden_field('description') ?>
-        <?= html_hidden_field('masterkey') ?>
-        <?= html_hidden_field('salt') ?>
-        <?= html_hidden_field('control') ?>
-        <?= html_hidden_field('task', 'add') ?>
+        <?php echo html_hidden_field('description') ?>
+        <?php echo html_hidden_field('masterkey') ?>
+        <?php echo html_hidden_field('salt') ?>
+        <?php echo html_hidden_field('control') ?>
+        <?php echo html_hidden_field('task', 'add') ?>
     </form>
 
     <?php js_modal_windows() ?>
@@ -293,8 +285,7 @@ function form_cryptography($keys = array(), $log_messages = array())
             });
         });
 
-        function add_new_key() {/*{{{*/
-
+        function add_new_key() {
             var description = $('#description_visible').val();
             if (description.length < 1) {
                 alert('Bitte einen Nickname angeben.');
@@ -321,7 +312,6 @@ function form_cryptography($keys = array(), $log_messages = array())
             }
 
             get_master_key(password1, function (masterkey) {
-
                 $('#password1').val('');
                 $('#password2').val('');
                 $('#password3').val('');
@@ -347,16 +337,13 @@ function form_cryptography($keys = array(), $log_messages = array())
                 $('#keyform').submit();
             }, 10);
         }
-
-        /*}}}*/
     </script>
-<?php endif ?>
-
-    <?php
-}/*}}}*/
+<?php
+endif;
+}
 
 function js_get_master_key($keys = null)
-{/*{{{*/
+{
     if (!isset($keys)) {
         $keys = db_get_crypto_keys();
     }
@@ -367,11 +354,10 @@ function js_get_master_key($keys = null)
     <script type="text/javascript">
 
         var keys = new Array(
-            <?=join(",\n", array_map('json_encode', $keys)) ?>
+            <?php echo join(",\n", array_map('json_encode', $keys)) ?>
         );
 
-        function get_master_key(password, callback) {/*{{{*/
-
+        function get_master_key(password, callback) {
             modal_window_show($("#please_wait"));
 
             // 4.2 iterate through valid keys
@@ -381,10 +367,7 @@ function js_get_master_key($keys = null)
 
         }
 
-        /*}}}*/
-
-        function check_master_key(idx, password, callback) {/*{{{*/
-
+        function check_master_key(idx, password, callback) {
             if (idx >= keys.length) {
                 modal_window_hide();
                 alert("Falsches Passwort");
@@ -416,9 +399,6 @@ function js_get_master_key($keys = null)
             }, 10);
 
         }
-
-        /*}}}*/
-
     </script>
     <?php
-}/*}}}*/
+}
index a00e79a..5243e37 100644 (file)
@@ -1,11 +1,9 @@
 <?php
 
-
 use MemberDB\Config\Config;
 
 function action_directdebit()
 {
-
     $config = Config::getInstance();
     $bank = $config['bank'];
 
@@ -61,7 +59,6 @@ function action_directdebit()
 
     js_modal_windows();
     js_get_master_key();
-
     ?>
     <noscript>
         <p class="error">
@@ -79,20 +76,20 @@ function action_directdebit()
         </tr>
         <?php foreach ($cash_payments as $payment) : ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('fees',
-                        array('member_id' => $payment['member_id']))) ?>"><?= html_escape($payment['member_number']) ?></a>
+                <td><a href="<?php echo html_escape(link_to('fees',
+                        array('member_id' => $payment['member_id']))) ?>"><?php echo html_escape($payment['member_number']) ?></a>
                 </td>
-                <td><?= html_escape($payment['nickname']) ?></td>
-                <td style="text-align: right;"><?= html_escape(format_money($payment['amount'])) ?></td>
+                <td><?php echo html_escape($payment['nickname']) ?></td>
+                <td style="text-align: right;"><?php echo html_escape(format_money($payment['amount'])) ?></td>
                 <td>
-                    <form action="<?= link_to('create_earning') ?>" method="post" class="clearfix">
-                        <?= html_hidden_field('date', format_date(time())) ?>
-                        <?= html_hidden_field('type', 'fee') ?>
-                        <?= html_hidden_field('status', 'paid') ?>
-                        <?= html_hidden_field('value', format_money($payment['amount'])) ?>
-                        <?= html_hidden_field('member_id', $payment['member_id']) ?>
-                        <?= html_hidden_field('description', '') ?>
-                        <?= html_hidden_field('account', 'cash') ?>
+                    <form action="<?php echo link_to('create_earning') ?>" method="post" class="clearfix">
+                        <?php echo html_hidden_field('date', format_date(time())) ?>
+                        <?php echo html_hidden_field('type', 'fee') ?>
+                        <?php echo html_hidden_field('status', 'paid') ?>
+                        <?php echo html_hidden_field('value', format_money($payment['amount'])) ?>
+                        <?php echo html_hidden_field('member_id', $payment['member_id']) ?>
+                        <?php echo html_hidden_field('description', '') ?>
+                        <?php echo html_hidden_field('account', 'cash') ?>
                         <input class="submit" type="submit" name="submit" value="Einnahme verbuchen"/>
                     </form>
                 </td>
@@ -113,13 +110,13 @@ function action_directdebit()
         <?php $total = 0; ?>
         <?php foreach ($debits as $debit) : ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('fees',
-                        array('member_id' => $debit['member_id']))) ?>"><?= html_escape($debit['member_number']) ?></a>
+                <td><a href="<?php echo html_escape(link_to('fees',
+                        array('member_id' => $debit['member_id']))) ?>"><?php echo html_escape($debit['member_number']) ?></a>
                 </td>
-                <td><?= html_escape($debit['nickname']) ?></td>
-                <td><?= html_escape($debit['purpose']) ?></td>
-                <td><?= html_escape($debit['debittype']) ?></td>
-                <td style="text-align: right;"><?= html_escape(format_money($debit['amount'])) ?></td>
+                <td><?php echo html_escape($debit['nickname']) ?></td>
+                <td><?php echo html_escape($debit['purpose']) ?></td>
+                <td><?php echo html_escape($debit['debittype']) ?></td>
+                <td style="text-align: right;"><?php echo html_escape(format_money($debit['amount'])) ?></td>
             </tr>
             <?php $total = bcadd($total, $debit['amount']); ?>
         <?php endforeach ?>
@@ -128,38 +125,37 @@ function action_directdebit()
             <td></td>
             <td></td>
             <td></td>
-            <td style="text-align: right;"><?= html_escape(format_money($total)) ?></td>
+            <td style="text-align: right;"><?php echo html_escape(format_money($total)) ?></td>
         </tr>
     </table>
 
-    <!-- ?=html_hidden_field('directdebittype', 'pain')? -->
-    <?= html_list_box('Dateiformat', 'directdebittype', array('dtaus' => 'DTAUS', 'pain' => 'PAIN'), 'pain'); ?>
+    <?php echo html_list_box('Dateiformat', 'directdebittype', array('dtaus' => 'DTAUS', 'pain' => 'PAIN'), 'pain'); ?>
     <input class="submit" type="button" name="btn_directdebit" value="Datei erzeugen" onclick="ask_for_password()"
            id="btn_directdebit"/>
     <br/>
     <br/>
-    <form action="<?= link_to('create_earnings') ?>" method="post" class="clearfix">
+    <form action="<?php echo link_to('create_earnings') ?>" method="post" class="clearfix">
         <?php $count = 0; ?>
         <?php foreach ($debits as $debit) : ?>
-            <?= html_hidden_field(sprintf('earnings[%d][date]', $count), format_date(time())) ?>
-            <?= html_hidden_field(sprintf('earnings[%d][type]', $count), 'fee') ?>
-            <?= html_hidden_field(sprintf('earnings[%d][status]', $count), 'paid') ?>
-            <?= html_hidden_field(sprintf('earnings[%d][value]', $count), $debit['amount']) ?>
-            <?= html_hidden_field(sprintf('earnings[%d][member_id]', $count), $debit['member_id']) ?>
-            <?= html_hidden_field(sprintf('earnings[%d][description]', $count), $debit['purpose']) ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][date]', $count), format_date(time())) ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][type]', $count), 'fee') ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][status]', $count), 'paid') ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][value]', $count), $debit['amount']) ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][member_id]', $count), $debit['member_id']) ?>
+            <?php echo html_hidden_field(sprintf('earnings[%d][description]', $count), $debit['purpose']) ?>
             <?php $count++; ?>
         <?php endforeach ?>
         <input class="submit" type="submit" name="btn_create_earnings" value="Einnahmen verbuchen"/>
     </form>
     <hr/>
-    <form action="<?= link_to('export_ibanhin') ?>" method="POST" class="clearfix">
+    <form action="<?php echo link_to('export_ibanhin') ?>" method="POST" class="clearfix">
         <input class="submit" type="submit" name="btn_export_ibanhin" value="IBAN-hin Export"/>
     </form>
 
     <div id="password_popup" class="modal_window">
         <fieldset>
             <legend>Passwortabfrage</legend>
-            <?= html_password_field('Passwort', 'password') ?>
+            <?php echo html_password_field('Passwort', 'password') ?>
             <input class="submit" type="button" name="btn_generate_directdebit" value="Datei erzeugen"
                    onclick="generate_directdebit()"/>
             <input class="submit" type="button" name="btn_cancel" value="Abbrechen"
@@ -178,12 +174,10 @@ function action_directdebit()
     </div>
 
     <script type="text/javascript">
-
         var debits = new Array(
-            <?=join(",\n", array_map('json_encode', $debits)) ?>
+            <?php echo join(",\n", array_map('json_encode', $debits)) ?>
         );
 
-
         $(document).ready(function () {
             $('#password').keypress(function (event) {
                 if (event.keyCode == '13') {
@@ -193,26 +187,19 @@ function action_directdebit()
             $('#btn_directdebit').focus();
         });
 
-
-        function ask_for_password() {/*{{{*/
+        function ask_for_password() {
             modal_window_show($("#password_popup"));
             $("#password").focus();
             return;
         }
 
-        /*}}}*/
-
-        function cancel_ask_for_password() {/*{{{*/
+        function cancel_ask_for_password() {
             modal_window_hide();
             $("#btn_directdebit").focus();
             return;
         }
 
-        /*}}}*/
-
-
-        function generate_directdebit() {/*{{{*/
-
+        function generate_directdebit() {
             var password = $('#password').val();
             var directdebitcontent = "";
             var directdebitcontent2 = "Wird nur bei SEPA verwendet.";
@@ -256,7 +243,6 @@ function action_directdebit()
                         break;
 
                     case "pain":
-
                         // datejs.com MAGIC
                         var jetzt = new Date.today();
                         var collectiondate = new Date.parse('<?php echo $config->get('direct_debit')['day']; ?>');
@@ -265,64 +251,58 @@ function action_directdebit()
                         }
 
                         if (!SEPACORE.init(collectiondate, '<?php echo $bank['creditor_id']; ?>', '<?php echo $bank['holder']; ?>', '<?php echo $bank['iban']; ?>', '<?php echo $bank['bic']; ?>'')) {
-                            $('#directdebit_content').val(DTAUS.errormsg);
-                            return;
-                        }
+                        $('#directdebit_content').val(DTAUS.errormsg);
+                        return;
+                }
 
-                        for (var i = 0; i < debits.length; i++) {
+                for (var i = 0; i < debits.length; i++) {
 
-                            if (debits[i]['debittype'] != 'FRST' && debits[i]['debittype'] != 'RCUR') {
-                                continue;
-                            }
+                    if (debits[i]['debittype'] != 'FRST' && debits[i]['debittype'] != 'RCUR') {
+                        continue;
+                    }
 
-                            var accountholder = debits[i]['accountholder'];
-                            var accountnumber = debits[i]['accountnumber'];
-                            var bankcode = debits[i]['bankcode'];
+                    var accountholder = debits[i]['accountholder'];
+                    var accountnumber = debits[i]['accountnumber'];
+                    var bankcode = debits[i]['bankcode'];
 
-                            // Encrypt/Decrypt data using AES with masterkey
-                            if (accountholder != "") accountholder = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(accountholder, masterkey));
-                            if (accountnumber != "") accountnumber = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(accountnumber, masterkey));
-                            if (bankcode != "") bankcode = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(bankcode, masterkey));
+                    // Encrypt/Decrypt data using AES with masterkey
+                    if (accountholder != "") accountholder = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(accountholder, masterkey));
+                    if (accountnumber != "") accountnumber = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(accountnumber, masterkey));
+                    if (bankcode != "") bankcode = Crypto.charenc.UTF8.bytesToString(Crypto.AES.decrypt(bankcode, masterkey));
 
-                            // Mandatsreferenz '/V1/M:n/'; z.B. /V:1/M:2/
-                            var mandateref = '/V:1/M:' + debits[i]['member_number'] + '/';
-                            var e2eid = '/V:1/E2E:' + parseInt(SEPACORE.creationdate.getTime() / 1000) + '/S:' + debits[i]['debittype'][0] + '/I:' + i + '/';
-                            if (!SEPACORE.addDDTx(debits[i]['debittype'], accountholder, accountnumber, bankcode, mandateref, debits[i]['ddmandatesigdate'].substring(0, 10), debits[i]['amountcent'], debits[i]['purpose'], e2eid)) {
-                                $('#directdebit_content').val('Mitglied ' + debits[i]['member_number'] + ' ' + accountholder + '\n' + SEPACORE.errormsg);
-                                return;
-                            }
-                        }
+                    // Mandatsreferenz '/V1/M:n/'; z.B. /V:1/M:2/
+                    var mandateref = '/V:1/M:' + debits[i]['member_number'] + '/';
+                    var e2eid = '/V:1/E2E:' + parseInt(SEPACORE.creationdate.getTime() / 1000) + '/S:' + debits[i]['debittype'][0] + '/I:' + i + '/';
+                    if (!SEPACORE.addDDTx(debits[i]['debittype'], accountholder, accountnumber, bankcode, mandateref, debits[i]['ddmandatesigdate'].substring(0, 10), debits[i]['amountcent'], debits[i]['purpose'], e2eid)) {
+                        $('#directdebit_content').val('Mitglied ' + debits[i]['member_number'] + ' ' + accountholder + '\n' + SEPACORE.errormsg);
+                        return;
+                    }
+                }
 
-                        directdebitcontent = SEPACORE.getXMLContent('FRST');
-                        directdebitcontent2 = SEPACORE.getXMLContent('RCUR');
+                directdebitcontent = SEPACORE.getXMLContent('FRST');
+                directdebitcontent2 = SEPACORE.getXMLContent('RCUR');
 
-                        if (SEPACORE.errormsg.lenght > 0) {
-                            $('#directdebit_content').val(SEPACORE.errormsg);
-                            return;
-                        }
-                        break;
+                if (SEPACORE.errormsg.lenght > 0) {
+                    $('#directdebit_content').val(SEPACORE.errormsg);
+                    return;
                 }
-                $('#directdebit_content').val(directdebitcontent);
-                $('#directdebit_content2').val(directdebitcontent2);
-                $('#directdebit_content').focus();
-                $('#directdebit_content').select();
-            });
-
+            };
+            $('#directdebit_content').val(directdebitcontent);
+            $('#directdebit_content2').val(directdebitcontent2);
+            $('#directdebit_content').focus();
+            $('#directdebit_content').select();
         }
 
-        /*}}}*/
+        )
+        }
 
-        function directdebit_close() {/*{{{*/
+        function directdebit_close() {
             modal_window_hide();
             $("#directdebit_content").val('');
             $("#directdebit_content2").val('');
         }
-
-        /*}}}*/
-
-
     </script>
-    <?
+    <?php
 }
 
 // borrowed from PEARs Payment_DTA
@@ -541,7 +521,6 @@ function dtaus_string($string)
         'Ž' => 'Z',
     );
 
-
     $result = strtr($string, $special_chars);   // replace known special chars
     $result = strtoupper($result);                  // upper case
     // make sure every special char is replaced by one space, not two or three
index 22c28c2..d792760 100644 (file)
@@ -12,9 +12,7 @@ $EARNING_TYPES = array(
     'catering'         => 'Raum - Getraenke & Snacks'
 );
 
-
-/* DB functions {{{ */
-
+// DB functions
 function db_get_earning_with_id($earning_id)
 {
     return db_select_single('SELECT * FROM `earnings` WHERE id=? LIMIT 1', [$earning_id]);
@@ -46,7 +44,7 @@ function db_delete_earning($earning)
 }
 
 function validate_earning($userdata, &$dbdata, &$validation)
-{/*{{{*/
+{
     global $EARNING_TYPES, $ACCOUNT_TYPES;
     $fields = array(
         'id'          => 'number',
@@ -58,7 +56,6 @@ function validate_earning($userdata, &$dbdata, &$validation)
         'description' => 'text',
         //      'status'          -  See below...
     );
-    $orig = $dbdata;
     $dbdata['status'] = empty($userdata['status']) ? 'open' : 'paid';
     foreach ($fields as $name => $type) {
         if (!isset($userdata[$name])) {
@@ -75,11 +72,10 @@ function validate_earning($userdata, &$dbdata, &$validation)
     }
 
     return (count($validation) == 0);
-}/*}}}*/
-
+}
 
 function action_create_earning()
-{/*{{{*/
+{
     $earning = array();
     $earning['date'] = format_date(time());
     $earning['status'] = 'paid';
@@ -94,11 +90,10 @@ function action_create_earning()
         }
     }
     form_earning($earning, 'create', $log_messages);
-}/*}}}*/
-
+}
 
 function action_change_earning()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to('finances'));
     }
@@ -119,11 +114,10 @@ function action_change_earning()
     }
 
     form_earning($earning, 'change', $log_messages);
-}/*}}}*/
-
+}
 
 function action_delete_earning()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to('finances'));
     }
@@ -141,19 +135,18 @@ function action_delete_earning()
         echo db_error();
     }
     form_earning($earning, 'delete', $log_messages);
-}/*}}}*/
-
+}
 
 function form_earning($earning = array(), $task, $log_messages)
-{/*{{{*/
+{
     global $EARNING_TYPES, $ACCOUNT_TYPES;
 
     $readonly = ($task == 'delete');
 
     ?>
-    <form action="<?= link_to($task . '_earning') ?>" method="post" class="clearfix" id="earning_form"
+    <form action="<?php echo link_to($task . '_earning') ?>" method="post" class="clearfix" id="earning_form"
           style="<?php if ($_REQUEST['action'] == 'finances') : ?>float: left<?php else : ?>margin-top: 2em<?php endif ?>">
-        <?php if (isset($earning['id'])) : ?><?= html_hidden_field('id', $earning) ?><?php endif ?>
+        <?php if (isset($earning['id'])) : ?><?php echo html_hidden_field('id', $earning) ?><?php endif ?>
         <fieldset>
             <?php if ($task == 'create') : ?>
                 <legend>Neue Einnahme</legend>
@@ -163,13 +156,13 @@ function form_earning($earning = array(), $task, $log_messages)
                 <legend>Einnahme &auml;ndern</legend>
             <?php endif ?>
             <?php log_messages($log_messages); ?>
-            <?= html_text_field('Datum', 'date', $earning, $readonly) ?>
-            <?= html_list_box('Typ', 'type', $EARNING_TYPES, $earning, $readonly) ?>
-            <?= html_member_list_box('Mitglied', 'member_id', $earning, $readonly) ?>
-            <?= html_money_field('Betrag', 'value', $earning, $readonly) ?>
-            <?= html_text_field('Beschreibung', 'description', $earning, $readonly) ?>
-            <?= html_list_box('Ziel', 'account', $ACCOUNT_TYPES, $earning, $readonly) ?>
-            <?= html_checkbox('Bezahlt', 'status', $earning['status'] == 'paid', 1, $readonly) ?>
+            <?php echo html_text_field('Datum', 'date', $earning, $readonly) ?>
+            <?php echo html_list_box('Typ', 'type', $EARNING_TYPES, $earning, $readonly) ?>
+            <?php echo html_member_list_box('Mitglied', 'member_id', $earning, $readonly) ?>
+            <?php echo html_money_field('Betrag', 'value', $earning, $readonly) ?>
+            <?php echo html_text_field('Beschreibung', 'description', $earning, $readonly) ?>
+            <?php echo html_list_box('Ziel', 'account', $ACCOUNT_TYPES, $earning, $readonly) ?>
+            <?php echo html_checkbox('Bezahlt', 'status', $earning['status'] == 'paid', 1, $readonly) ?>
         </fieldset>
         <?php if ($task == 'delete') : ?>
             <input class="submit" type="submit" name="submit" value="L&ouml;schen"/>
@@ -179,18 +172,17 @@ function form_earning($earning = array(), $task, $log_messages)
     </form>
     <?php if ($task == 'change') : ?>
     <br/>
-    <a href="<?= html_escape(link_to('delete_earning', array('id' => $earning['id']))) ?>">Einnahme l&ouml;schen</a>
-    <a href="<?= html_escape(link_to('finances')) ?>">Neue Einnahme</a>
+    <a href="<?php echo html_escape(link_to('delete_earning', array('id' => $earning['id']))) ?>">Einnahme l&ouml;schen</a>
+    <a href="<?php echo html_escape(link_to('finances')) ?>">Neue Einnahme</a>
 <?php elseif ($task == 'delete') : ?>
     <br/>
-    <a href="<?= html_escape(link_to('finances')) ?>">Neue Einnahme</a>
+    <a href="<?php echo html_escape(link_to('finances')) ?>">Neue Einnahme</a>
 <?php endif ?>
     <?php
-}/*}}}*/
-
+}
 
 function action_create_earnings()
-{/*{{{*/
+{
     if (empty($_POST['earnings']) || !is_array($_POST['earnings'])) {
         redirect(link_to('finances'));
     }
@@ -229,4 +221,4 @@ function action_create_earnings()
     }
 
     redirect(link_to('finances'));
-}/*}}}*/
+}
index 8201349..ff1ae9f 100644 (file)
@@ -19,8 +19,7 @@ $MEMBER_TYPES = array(
     'honorary' => 'Ehrenmitglied'
 );
 
-/* DB functions {{{ */
-
+// DB functions
 function db_create_event($event)
 {
     unset($event['id']);
@@ -86,11 +85,8 @@ function db_get_event_with_id($event_id)
     return db_select_single($sql, [$event_id]);
 }
 
-/* }}} */
-
-
 function validate_event($userdata, &$dbdata, &$validation)
-{/*{{{*/
+{
     global $EVENT_TYPES, $MEMBER_TYPES, $PAYMENT_INTERVALS;
     $fields = array(
         'id'               => 'number',
@@ -108,10 +104,9 @@ function validate_event($userdata, &$dbdata, &$validation)
         $dbdata[$name] = $userdata[$name];
     }
 
-
-// ids must be equal
-// member_ids must be equal
-// date must be unique for given member
+    // ids must be equal
+    // member_ids must be equal
+    // date must be unique for given member
     if (isset($orig['id'])) {
         if ($dbdata['id'] != $orig['id']) {
             $validation[] = 'Irgendwas anderes ist sehr sehr komisch.';
@@ -129,11 +124,10 @@ function validate_event($userdata, &$dbdata, &$validation)
         $validation[] = 'An dem angegebenen Datum existiert schon ein Ereignis.';
     }
     return (count($validation) == 0);
-}/*}}}*/
-
+}
 
 function validate_event_date($member_id, $event_date, $event_id = null)
-{/*{{{*/
+{
     $event_date = db_unixtime2date(ui_date2unixtime($event_date));
     $event = db_get_event_with_member_and_date($member_id, $event_date);
 
@@ -148,11 +142,10 @@ function validate_event_date($member_id, $event_date, $event_id = null)
     }
 
     return false;
-}/*}}}*/
-
+}
 
 function action_list_events($member = null)
-{/*{{{*/
+{
     global $EVENT_TYPES, $MEMBER_TYPES, $PAYMENT_INTERVALS;
 
     if (!isset($member)) {
@@ -180,13 +173,13 @@ function action_list_events($member = null)
         </tr>
         <?php foreach ($events as $event) : ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('change_event',
-                        array('id' => $event['id']))) ?>#event_form"><?= html_escape(format_date(db_date2unixtime($event['event_date']))) ?></a>
+                <td><a href="<?php echo html_escape(link_to('change_event',
+                        array('id' => $event['id']))) ?>#event_form"><?php echo html_escape(format_date(db_date2unixtime($event['event_date']))) ?></a>
                 </td>
-                <td><?= html_escape($EVENT_TYPES[$event['event_type']]) ?></td>
-                <td><?= html_escape(isset($event['member_type']) ? $MEMBER_TYPES[$event['member_type']] : '-') ?></td>
-                <td><?= html_escape(isset($event['fee']) ? format_money($event['fee']) : '-') ?></td>
-                <td><?= html_escape(isset($event['payment_interval']) ? $PAYMENT_INTERVALS[$event['payment_interval']] : '-') ?></td>
+                <td><?php echo html_escape($EVENT_TYPES[$event['event_type']]) ?></td>
+                <td><?php echo html_escape(isset($event['member_type']) ? $MEMBER_TYPES[$event['member_type']] : '-') ?></td>
+                <td><?php echo html_escape(isset($event['fee']) ? format_money($event['fee']) : '-') ?></td>
+                <td><?php echo html_escape(isset($event['payment_interval']) ? $PAYMENT_INTERVALS[$event['payment_interval']] : '-') ?></td>
             </tr>
         <?php endforeach ?>
     </table>
@@ -194,11 +187,10 @@ function action_list_events($member = null)
     <p>Bisher gibt's noch keine Ereignisse.</p>
 <?php endif ?>
     <?php
-}/*}}}*/
-
+}
 
 function action_create_event($member = null)
-{/*{{{*/
+{
     if (!isset($member)) {
         if (!isset($_REQUEST['member_id'])) {
             redirect(link_to());
@@ -237,10 +229,10 @@ function action_create_event($member = null)
         }
     }
     form_event($event, 'create', $log_messages);
-}/*}}}*/
+}
 
 function action_change_event()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to());
     }
@@ -276,10 +268,10 @@ function action_change_event()
     form_member($member, true);
     action_list_events($member);
     form_event($event, 'change', $log_messages);
-}/*}}}*/
+}
 
 function action_delete_event()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to());
     }
@@ -303,19 +295,18 @@ function action_delete_event()
     form_member($member, true);
     action_list_events($member);
     form_event($event, 'delete', $log_messages);
-}/*}}}*/
-
+}
 
 function form_event($event = array(), $task, $log_messages)
-{/*{{{*/
+{
     global $EVENT_TYPES, $MEMBER_TYPES, $PAYMENT_INTERVALS;
 
     $readonly = ($task == 'delete');
 
     ?>
     <form action="#event_form" method="post" class="clearfix" id="event_form">
-        <?php if (isset($event['id'])) : ?><?= html_hidden_field('id', $event) ?><?php endif ?>
-        <?= html_hidden_field('member_id', $event) ?>
+        <?php if (isset($event['id'])) : ?><?php echo html_hidden_field('id', $event) ?><?php endif ?>
+        <?php echo html_hidden_field('member_id', $event) ?>
         <fieldset>
             <?php if ($task == 'create') : ?>
                 <legend>Neues Ereignis</legend>
@@ -325,13 +316,14 @@ function form_event($event = array(), $task, $log_messages)
                 <legend>Ereignis &auml;ndern</legend>
             <?php endif ?>
             <?php log_messages($log_messages); ?>
-            <?= html_text_field('Datum', 'event_date', $event, $readonly) ?>
-            <?= html_list_box('Ereignistyp', 'event_type', $EVENT_TYPES, $event, $readonly) ?>
-            <?= html_list_box('Mitgliedstyp', 'member_type', array_merge(array(0 => 'unverändert'), $MEMBER_TYPES),
+            <?php echo html_text_field('Datum', 'event_date', $event, $readonly) ?>
+            <?php echo html_list_box('Ereignistyp', 'event_type', $EVENT_TYPES, $event, $readonly) ?>
+            <?php echo html_list_box('Mitgliedstyp', 'member_type',
+                array_merge(array(0 => 'unverändert'), $MEMBER_TYPES),
                 $event, $readonly) ?>
-            <?= html_money_field('Beitrag', 'fee', $event, $readonly) ?>
+            <?php echo html_money_field('Beitrag', 'fee', $event, $readonly) ?>
             <small>Leer lassen wenn unver&auml;ndert.</small>
-            <?= html_list_box('Zahlungsintervall', 'payment_interval',
+            <?php echo html_list_box('Zahlungsintervall', 'payment_interval',
                 array_merge(array(0 => 'unverändert'), $PAYMENT_INTERVALS), $event, $readonly) ?>
         </fieldset>
         <?php if ($task == 'delete') : ?>
@@ -341,13 +333,13 @@ function form_event($event = array(), $task, $log_messages)
         <?php endif ?>
     </form>
     <?php if ($task == 'change') : ?>
-    <a href="<?= html_escape(link_to('delete_event', array('id' => $event['id']))) ?>#event_form">Ereignis
+    <a href="<?php echo html_escape(link_to('delete_event', array('id' => $event['id']))) ?>#event_form">Ereignis
         l&ouml;schen</a>
-    <a href="<?= html_escape(link_to('view_member', array('id' => $event['member_id']))) ?>#event_form">Neues
+    <a href="<?php echo html_escape(link_to('view_member', array('id' => $event['member_id']))) ?>#event_form">Neues
         Ereignis</a>
 <?php elseif ($task == 'delete') : ?>
-    <a href="<?= html_escape(link_to('view_member', array('id' => $event['member_id']))) ?>#event_form">Neues
+    <a href="<?php echo html_escape(link_to('view_member', array('id' => $event['member_id']))) ?>#event_form">Neues
         Ereignis</a>
 <?php endif ?>
     <?php
-}/*}}}*/
+}
index 17939d6..e08a06b 100644 (file)
@@ -9,9 +9,7 @@ $EXPENSE_TYPES = array(
     'catering'         => 'Raum - Getraenke & Snacks'
 );
 
-
-/* DB functions {{{ */
-
+// DB functions
 function db_get_expense_with_id($expense_id)
 {
     $sql = 'SELECT * FROM `expenses` WHERE id=? LIMIT 1';
@@ -43,11 +41,8 @@ function db_delete_expense($expense)
     return db_delete('expenses', 'id=?', $expense['id']);
 }
 
-/* }}} */
-
-
 function validate_expense($userdata, &$dbdata, &$validation)
-{/*{{{*/
+{
     global $EXPENSE_TYPES, $ACCOUNT_TYPES;
     $fields = array(
         'id'          => 'number',
@@ -57,9 +52,8 @@ function validate_expense($userdata, &$dbdata, &$validation)
         'member_id'   => 'member',
         'value'       => 'money',
         'description' => 'text',
-        //      'status'          -  See below...
+        //'status'     -  See below...
     );
-    $orig = $dbdata;
     $dbdata['status'] = empty($userdata['status']) ? 'open' : 'paid';
     foreach ($fields as $name => $type) {
         if (!isset($userdata[$name])) {
@@ -76,11 +70,10 @@ function validate_expense($userdata, &$dbdata, &$validation)
     }
 
     return (count($validation) == 0);
-}/*}}}*/
-
+}
 
 function action_create_expense()
-{/*{{{*/
+{
     $expense = array();
     $expense['date'] = format_date(time());
     $expense['status'] = 'paid';
@@ -95,11 +88,10 @@ function action_create_expense()
         }
     }
     form_expense($expense, 'create', $log_messages);
-}/*}}}*/
-
+}
 
 function action_change_expense()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to('finances'));
     }
@@ -120,11 +112,10 @@ function action_change_expense()
     }
 
     form_expense($expense, 'change', $log_messages);
-}/*}}}*/
-
+}
 
 function action_delete_expense()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to('finances'));
     }
@@ -142,19 +133,18 @@ function action_delete_expense()
         echo db_error();
     }
     form_expense($expense, 'delete', $log_messages);
-}/*}}}*/
-
+}
 
 function form_expense($expense = array(), $task, $log_messages)
-{/*{{{*/
+{
     global $EXPENSE_TYPES, $ACCOUNT_TYPES;
 
     $readonly = ($task == 'delete');
 
     ?>
-    <form action="<?= link_to($task . '_expense') ?>" method="post" class="clearfix" id="expense_form"
+    <form action="<?php echo link_to($task . '_expense') ?>" method="post" class="clearfix" id="expense_form"
           style="<?php if ($_REQUEST['action'] == 'finances') : ?>float: left<?php else : ?>margin-top: 2em<?php endif ?>">
-        <?php if (isset($expense['id'])) : ?><?= html_hidden_field('id', $expense) ?><?php endif ?>
+        <?php if (isset($expense['id'])) : ?><?php echo html_hidden_field('id', $expense) ?><?php endif ?>
         <fieldset>
             <?php if ($task == 'create') : ?>
                 <legend>Neue Ausgabe</legend>
@@ -164,13 +154,13 @@ function form_expense($expense = array(), $task, $log_messages)
                 <legend>Ausgabe &auml;ndern</legend>
             <?php endif ?>
             <?php log_messages($log_messages); ?>
-            <?= html_text_field('Datum', 'date', $expense, $readonly) ?>
-            <?= html_list_box('Typ', 'type', $EXPENSE_TYPES, $expense, $readonly) ?>
-            <?= html_member_list_box('Mitglied', 'member_id', $expense, $readonly) ?>
-            <?= html_money_field('Betrag', 'value', $expense, $readonly) ?>
-            <?= html_text_field('Beschreibung', 'description', $expense, $readonly) ?>
-            <?= html_list_box('Quelle', 'account', $ACCOUNT_TYPES, $expense, $readonly) ?>
-            <?= html_checkbox('Bezahlt', 'status', $expense['status'] == 'paid', 1, $readonly) ?>
+            <?php echo html_text_field('Datum', 'date', $expense, $readonly) ?>
+            <?php echo html_list_box('Typ', 'type', $EXPENSE_TYPES, $expense, $readonly) ?>
+            <?php echo html_member_list_box('Mitglied', 'member_id', $expense, $readonly) ?>
+            <?php echo html_money_field('Betrag', 'value', $expense, $readonly) ?>
+            <?php echo html_text_field('Beschreibung', 'description', $expense, $readonly) ?>
+            <?php echo html_list_box('Quelle', 'account', $ACCOUNT_TYPES, $expense, $readonly) ?>
+            <?php echo html_checkbox('Bezahlt', 'status', $expense['status'] == 'paid', 1, $readonly) ?>
         </fieldset>
         <?php if ($task == 'delete') : ?>
             <input class="submit" type="submit" name="submit" value="L&ouml;schen"/>
@@ -180,11 +170,11 @@ function form_expense($expense = array(), $task, $log_messages)
     </form>
     <?php if ($task == 'change') : ?>
     <br/>
-    <a href="<?= html_escape(link_to('delete_expense', array('id' => $expense['id']))) ?>#expense_form">Ausgabe l&ouml;schen</a>
-    <a href="<?= html_escape(link_to('finances')) ?>#expense_form">Neue Ausgabe</a>
+    <a href="<?php echo html_escape(link_to('delete_expense', array('id' => $expense['id']))) ?>#expense_form">Ausgabe l&ouml;schen</a>
+    <a href="<?php echo html_escape(link_to('finances')) ?>#expense_form">Neue Ausgabe</a>
 <?php elseif ($task == 'delete') : ?>
     <br/>
-    <a href="<?= html_escape(link_to('finances')) ?>#expense_form">Neue Ausgabe</a>
-<?php endif ?>
-    <?php
-}/*}}}*/
+    <a href="<?php echo html_escape(link_to('finances')) ?>#expense_form">Neue Ausgabe</a>
+<?php
+endif;
+}
index 7b89f7c..976526a 100644 (file)
@@ -1,11 +1,10 @@
 <?php
 
+use MemberDB\Config\Config;
 
-/* HELPER functions FOR FEES {{{ */
+// HELPER functions FOR FEES
 
 // build an empty structure for holding monthly information
-use MemberDB\Config\Config;
-
 function _fees_build_month_array($start_date, $end_date, $preset = array())
 {
     $start_info = getdate($start_date);
@@ -114,7 +113,6 @@ function _fees_apply_event_information(&$info, $events)
 
 function fees_get_list_for_member($member_id, $end_date)
 {
-
     static $cache = array();
     $config = Config::getInstance();
 
@@ -137,7 +135,7 @@ function fees_get_list_for_member($member_id, $end_date)
 
     $ret = _fees_build_month_array($config->get('founding_date'), $end_date);
     if (empty($ret)) {
-        return;
+        return null;
     }
 
     _fees_apply_event_information($ret, db_get_events_for_member($member_id));
@@ -224,7 +222,6 @@ function fees_get_list_for_month($year, $month)
 
 function fee_next_directdebit_for_member($member_id, $max_date = null)
 {
-
     $config = Config::getInstance();
     $member = db_get_member_with_id($member_id);
     if (!$member['directdebit']) {
@@ -304,15 +301,11 @@ function fee_next_directdebit_for_member($member_id, $max_date = null)
         }
     }
 
-
+    return null;
 }
 
-/* }}} */
-
-
 function action_fees()
-{/*{{{*/
-
+{
     if (isset($_REQUEST['member_id'])) {
         render_fees_for_member($_REQUEST['member_id']);
         return;
@@ -326,11 +319,10 @@ function action_fees()
     render_accrued_fees_by_month();
     render_next_direct_debit();
     render_future_fees();
-
-}/*}}}*/
+}
 
 function render_fees_by_member()
-{/*{{{*/
+{
     $members = db_get_members();
     $config = Config::getInstance();
     ?>
@@ -360,20 +352,21 @@ function render_fees_by_member()
             $open_fees = bcadd(bcsub($sum_old_fees, $sum_old_paid), max(bcsub($sum_new_fees, $sum_new_paid), 0));
             ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('fees',
-                        array('member_id' => $member['id']))) ?>"><?= html_escape($member['number']) ?></a></td>
-                <td><?= html_escape($member['nickname']) ?></td>
-                <td style="text-align: right;"><?= format_money($sum_fees) ?></td>
-                <td style="text-align: right;"><?= isset($current_fee) ? format_money($current_fee) : '-' ?></td>
-                <td style="text-align: right;"><?= $open_fees > 0 ? format_money($open_fees) : '-' ?></td>
+                <td><a href="<?php echo html_escape(link_to('fees',
+                        array('member_id' => $member['id']))); ?>"><?php echo html_escape($member['number']); ?></a>
+                </td>
+                <td><?php echo html_escape($member['nickname']); ?></td>
+                <td style="text-align: right;"><?php echo format_money($sum_fees); ?></td>
+                <td style="text-align: right;"><?php echo isset($current_fee) ? format_money($current_fee) : '-'; ?></td>
+                <td style="text-align: right;"><?php echo $open_fees > 0 ? format_money($open_fees) : '-'; ?></td>
             </tr>
         <?php endforeach ?>
     </table>
     <?php
-}/*}}}*/
+}
 
 function render_future_fees()
-{/*{{{*/
+{
     $total_paid = finance_get_total_paid_fees();
     $this_year = date('Y');
     $this_month = date('m');
@@ -400,19 +393,19 @@ function render_future_fees()
             <?php $months = array_reverse($months, true); ?>
             <?php foreach ($months as $month => $data) : ?>
                 <tr<?php if ($year == $this_year && $month == $this_month) : ?> class="current"<?php endif ?>>
-                    <td><a href="<?= html_escape(link_to('fees',
-                            array('year' => $year, 'month' => $month))) ?>"><?= html_escape(format_month($year,
-                                $month)) ?></a></td>
-                    <td style="text-align: right;"><?= html_escape(format_money($data['fee'])) ?></td>
-                    <td style="text-align: right;"><?= html_escape(format_money($data['total'])) ?></td>
+                    <td><a href="<?php echo html_escape(link_to('fees',
+                            array('year' => $year, 'month' => $month))); ?>"><?php echo html_escape(format_month($year,
+                                $month)); ?></a></td>
+                    <td style="text-align: right;"><?php echo html_escape(format_money($data['fee'])); ?></td>
+                    <td style="text-align: right;"><?php echo html_escape(format_money($data['total'])); ?></td>
                     <td style="text-align: right;">
                         <?php if ($year == $this_year && $month == $this_month) : ?>
-                            <?= html_escape(format_money($total_paid)) ?>
+                            <?php echo html_escape(format_money($total_paid)); ?>
                         <?php endif ?>
                     </td>
                     <td style="text-align: right;">
                         <?php if ($year > $this_year || ($year >= $this_year && $month >= $this_month)) : ?>
-                            <?= html_escape(format_money(bcsub($data['total'], $total_paid))) ?>
+                            <?php echo html_escape(format_money(bcsub($data['total'], $total_paid))); ?>
                         <?php endif ?>
                     </td>
                 </tr>
@@ -420,10 +413,10 @@ function render_future_fees()
         <?php endforeach ?>
     </table>
     <?php
-}/*}}}*/
+}
 
 function render_accrued_fees_by_month()
-{/*{{{*/
+{
     $fees = fees_sum_by_month(time());
     $fees = array_reverse($fees, true);
     ?>
@@ -437,22 +430,22 @@ function render_accrued_fees_by_month()
             <?php $months = array_reverse($months, true); ?>
             <?php foreach ($months as $month => $fee) : ?>
                 <tr>
-                    <td><a href="<?= html_escape(link_to('fees',
-                            array('year' => $year, 'month' => $month))) ?>"><?= html_escape(format_month($year,
+                    <td><a href="<?php echo html_escape(link_to('fees',
+                            array('year' => $year, 'month' => $month))); ?>"><?php echo html_escape(format_month($year,
                                 $month)) ?></a></td>
-                    <td style="text-align: right;"><?= html_escape(format_money($fee)) ?></td>
+                    <td style="text-align: right;"><?php echo html_escape(format_money($fee)) ?></td>
                 </tr>
             <?php endforeach ?>
         <?php endforeach ?>
     </table>
     <?php
-}/*}}}*/
+}
 
 function render_accrued_fees_for_month($year, $month)
-{/*{{{*/
+{
     $fees = fees_get_list_for_month($year, $month);
     ?>
-    <h2>Angefallene Mitgliedsbeitr&auml;ge f&uuml;r <?= format_month($year, $month) ?></h2>
+    <h2>Angefallene Mitgliedsbeitr&auml;ge f&uuml;r <?php echo format_month($year, $month) ?></h2>
     <table>
         <tr>
             <th>Mitgliedsnummer</th>
@@ -461,19 +454,19 @@ function render_accrued_fees_for_month($year, $month)
         </tr>
         <?php foreach ($fees as $info) : ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('fees',
-                        array('member_id' => $info['id']))) ?>"><?= html_escape($info['number']) ?></a></td>
-                <td><?= html_escape($info['nickname']) ?></td>
-                <td style="text-align: right;"><?= html_escape($info['is_member'] ? format_money($info['fee']) : '-') ?></td>
+                <td><a href="<?php echo html_escape(link_to('fees',
+                        array('member_id' => $info['id']))) ?>"><?php echo html_escape($info['number']) ?></a></td>
+                <td><?php echo html_escape($info['nickname']) ?></td>
+                <td style="text-align: right;"><?php echo html_escape($info['is_member'] ? format_money($info['fee']) : '-') ?></td>
             </tr>
         <?php endforeach ?>
     </table>
-    <p><a href="<?= html_escape(link_to('fees')) ?>">Alle angefallenen Mitgliedsbeitr&auml;ge</a></p>
+    <p><a href="<?php echo html_escape(link_to('fees')) ?>">Alle angefallenen Mitgliedsbeitr&auml;ge</a></p>
     <?php
-}/*}}}*/
+}
 
 function render_next_direct_debit()
-{/*{{{*/
+{
     $members = db_get_members();
     ?>
     <h2>Nächste Abbuchungen nach Mitglied</h2>
@@ -490,15 +483,15 @@ function render_next_direct_debit()
         <?php foreach ($members as $member) : ?>
             <?php $next_debit = fee_next_directdebit_for_member($member['id']); ?>
             <tr>
-                <td><a href="<?= html_escape(link_to('fees',
-                        array('member_id' => $member['id']))) ?>"><?= html_escape($member['number']) ?></a></td>
-                <td><?= html_escape($member['nickname']) ?></td>
+                <td><a href="<?php echo html_escape(link_to('fees',
+                        array('member_id' => $member['id']))) ?>"><?php echo html_escape($member['number']) ?></a></td>
+                <td><?php echo html_escape($member['nickname']) ?></td>
                 <?php if (empty($next_debit)) : ?>
                     <td>-</td>
                     <td style="text-align: right;">-</td>
                 <?php else : ?>
-                    <td><?= html_escape($next_debit['info']) ?></td>
-                    <td style="text-align: right;"><?= format_money($next_debit['value']) ?></td>
+                    <td><?php echo html_escape($next_debit['info']) ?></td>
+                    <td style="text-align: right;"><?php echo format_money($next_debit['value']) ?></td>
                 <?php endif ?>
             </tr>
         <?php endforeach ?>
@@ -507,7 +500,7 @@ function render_next_direct_debit()
 }
 
 function render_fees_for_member($member_id)
-{/*{{{*/
+{
     global $MEMBER_TYPES, $EARNING_TYPES, $EXPENSE_TYPES;
     $config = Config::getInstance();
     /** @var DateTime $direct_debit */
@@ -521,7 +514,7 @@ function render_fees_for_member($member_id)
     $membership_info = fees_get_list_for_member($member_id, time());
     $membership_info = array_reverse($membership_info, true);
 
-    $paid_fees = finance_list_paid_fees_for_member($member_id, time(), true);
+    $paid_fees = finance_list_paid_fees_for_member($member_id);
 
     $sum_new_paid = finance_get_paid_fees_for_member($member_id);
     $sum_old_paid = finance_get_paid_fees_for_member($member_id, true);
@@ -550,15 +543,17 @@ function render_fees_for_member($member_id)
         $state = sprintf('Es sind noch %1$s Mitgliedsbeitrag offen.',
             format_money(bcsub($sum_new_fees, $sum_new_paid)));
     } elseif ($old_open) {
-        $state = sprintf('Für die Zeit vor dem %1$s sind noch %2$s Mitgliedsbeitrag offen.',
-            format_date($direct_debit->getTimestamp()), format_money(bcsub($sum_old_fees, $sum_old_paid)));
+        $state = sprintf(
+            'Für die Zeit vor dem %1$s sind noch %2$s Mitgliedsbeitrag offen.',
+            format_date($direct_debit->getTimestamp()), format_money(bcsub($sum_old_fees, $sum_old_paid))
+        );
     }
 
     $next_debit = fee_next_directdebit_for_member($member_id);
 
     ?>
     <h2>Mitgliedsbeitr&auml;ge
-        von <?= html_escape(!empty($member['nickname']) ? $member['nickname'] : sprintf('Mitglied Nr. %d',
+        von <?php echo html_escape(!empty($member['nickname']) ? $member['nickname'] : sprintf('Mitglied Nr. %d',
             $member['number'])) ?></h2>
     <h3>Mitgliedsdetails</h3>
     <table>
@@ -568,14 +563,14 @@ function render_fees_for_member($member_id)
             <th>Status</th>
         </tr>
         <tr>
-            <td><a href="<?= html_escape(link_to('view_member',
-                    array('id' => $member['id']))) ?>"><?= html_escape($member['number']) ?></a></td>
-            <td><?= html_escape($member['nickname']) ?></strong></p></td>
+            <td><a href="<?php echo html_escape(link_to('view_member',
+                    array('id' => $member['id']))) ?>"><?php echo html_escape($member['number']) ?></a></td>
+            <td><?php echo html_escape($member['nickname']) ?></strong></p></td>
             <td>
                 <?php if (empty($state)) : ?>
                     Kein Beitragsrückstand
                 <?php else : ?>
-                    <?= wordwrap(html_escape($state), 70, '<br/>') ?>
+                    <?php echo wordwrap(html_escape($state), 70, '<br/>') ?>
                 <?php endif ?>
             </td>
         </tr>
@@ -592,14 +587,14 @@ function render_fees_for_member($member_id)
                 <?php $months = array_reverse($months, true); ?>
                 <?php foreach ($months as $month => $info) : ?>
                     <tr>
-                        <td><?= html_escape(format_month($year, $month)) ?></td>
-                        <td><?= html_escape($info['is_member'] ? $MEMBER_TYPES[$info['member_type']] : 'Kein Mitglied') ?></td>
-                        <td style="text-align: right;"><?= html_escape($info['is_member'] ? format_money($info['fee']) : '-') ?></td>
+                        <td><?php echo html_escape(format_month($year, $month)) ?></td>
+                        <td><?php echo html_escape($info['is_member'] ? $MEMBER_TYPES[$info['member_type']] : 'Kein Mitglied') ?></td>
+                        <td style="text-align: right;"><?php echo html_escape($info['is_member'] ? format_money($info['fee']) : '-') ?></td>
                     </tr>
                 <?php endforeach ?>
             <?php endforeach ?>
         </table>
-        <p><a href="<?= html_escape(link_to('fees')) ?>">Alle angefallenen Mitgliedsbeitr&auml;ge</a></p>
+        <p><a href="<?php echo html_escape(link_to('fees')) ?>">Alle angefallenen Mitgliedsbeitr&auml;ge</a></p>
     </div>
     <div style="float: left; margin-left: 1em;">
         <h3>Nächste Abbuchung</h3>
@@ -612,8 +607,8 @@ function render_fees_for_member($member_id)
                 <td>-</td>
                 <td style="text-align: right;">-</td>
             <?php else : ?>
-                <td><?= html_escape($next_debit['info']) ?></td>
-                <td style="text-align: right;"><?= format_money($next_debit['value']) ?></td>
+                <td><?php echo html_escape($next_debit['info']) ?></td>
+                <td style="text-align: right;"><?php echo format_money($next_debit['value']) ?></td>
             <?php endif ?>
         </table>
         <h3>Bezahlte Mitgliedsbeitr&auml;ge</h3>
@@ -625,13 +620,13 @@ function render_fees_for_member($member_id)
             </tr>
             <?php foreach ($paid_fees as $payment) : ?>
                 <tr>
-                    <td><?= html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
-                    <td><?= ($payment['value'] < 0) ? $EXPENSE_TYPES[$payment['type']] : $EARNING_TYPES[$payment['type']] ?></td>
-                    <td style="text-align: right;"><?= format_money($payment['value']) ?></td>
+                    <td><?php echo html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
+                    <td><?php echo ($payment['value'] < 0) ? $EXPENSE_TYPES[$payment['type']] : $EARNING_TYPES[$payment['type']] ?></td>
+                    <td style="text-align: right;"><?php echo format_money($payment['value']) ?></td>
                 </tr>
             <?php endforeach ?>
         </table>
     </div>
     <br style="clear: left;"/>
     <?php
-}/*}}}*/
+}
index b314aa7..77496ef 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 
-
 use MemberDB\Config\Config;
 
 function finance_get_total_paid_fees()
@@ -11,7 +10,6 @@ function finance_get_total_paid_fees()
     return bcsub($paid['paid_fees'], $refunded['refunded_fees']);
 }
 
-
 function finance_get_paid_fees_for_member($member_id, $old_fees = false)
 {
     // $old_fees: Beiträge die nicht durch Lastschrift eingezogen werden.
@@ -29,7 +27,7 @@ function finance_get_paid_fees_for_member($member_id, $old_fees = false)
     }
 
     /** @var DateTime $direct_debit */
-    $direct_debit = Config::getInstance()->get('direct_debit')['date']
+    $direct_debit = Config::getInstance()->get('direct_debit')['date'];
     $invoiced_fees = fees_sum_for_member($member_id, $direct_debit->getTimestamp() - 86400);
     $paid_invoiced_fees = finance_get_paid_fees_for_member($member_id, true);
     if (bccomp($paid_invoiced_fees, $invoiced_fees) == 1) {
@@ -56,7 +54,7 @@ function finance_list_paid_fees_for_member($member_id)
 }
 
 function action_finances()
-{/*{{{*/
+{
     ?>
     <h2>Finanzen</h2>
     <?php
@@ -66,4 +64,4 @@ function action_finances()
     render_open_payments();
     render_finished_payments();
     echo '<a href="' . link_to('export') . '">.xls runterladen</a>';
-}/*}}}*/
+}
index df11e84..92fcffc 100644 (file)
@@ -7,8 +7,7 @@ $DIRECTDEBIT_STATES = array(
     3  => 'SEPA Folgeeinzug'
 );
 
-/* DB functions {{{ */
-
+// DB functions
 function db_create_member($member)
 {
     unset($member['id']);
@@ -40,7 +39,7 @@ function db_get_member_with_id($member_id)
 }
 
 function db_get_next_free_member_number()
-{/*{{{*/
+{
     $row = db_select_single('SELECT MAX(number) AS number FROM `members`');
     if (!isset($row)) {
         return 2;
@@ -61,18 +60,13 @@ function db_get_next_free_member_number()
     return $number;
 }
 
-;/*}}}*/
-
-
 function db_get_member_with_number($member_number)
 {
     return db_select_single('SELECT * FROM `members` WHERE NUMBER=? LIMIT 1', [$member_number]);
 }
 
-/* }}} */
-
 function validate_member($userdata, &$dbdata, &$validation)
-{/*{{{*/
+{
     $fields = array(
         'id'               => 'number',
         'number'           => 'number',
@@ -113,8 +107,8 @@ function validate_member($userdata, &$dbdata, &$validation)
         }
         $dbdata[$name] = $userdata[$name];
     }
-//      ids must be equal
-//      number must be equal. if changed - check if free and allowed
+    // ids must be equal
+    // number must be equal. if changed - check if free and allowed
     if (isset($orig['id'])) {
         if ($dbdata['id'] != $orig['id']) {
             $validation[] = 'Irgendwas ist sehr sehr komisch.';
@@ -128,10 +122,10 @@ function validate_member($userdata, &$dbdata, &$validation)
         $validation[] = 'Die Mitgliedsnummer ist schon vergeben.';
     }
     return (count($validation) == 0);
-}/*}}}*/
+}
 
 function validate_member_number($member_number, $member_id = null)
-{/*{{{*/
+{
     $member = db_get_member_with_number($member_number);
 
     // theres no member with this number
@@ -145,10 +139,10 @@ function validate_member_number($member_number, $member_id = null)
     }
 
     return false;
-}/*}}}*/
+}
 
 function action_export_ibanhin()
-{/*{{{*/
+{
     $members = db_get_members();
     if (empty($members)) {
         return;
@@ -172,7 +166,7 @@ function action_export_ibanhin()
     <div id="password_popup" class="modal_window">
         <fieldset>
             <legend>Passwortabfrage</legend>
-            <?= html_password_field('Passwort', 'password') ?>
+            <?php echo html_password_field('Passwort', 'password') ?>
             <input class="submit" type="button" name="btn_export_ibanhin" value="IBAN-hin erzeugen"
                    onclick="export_ibanhin()"/>
             <input class="submit" type="button" name="btn_cancel" value="Abbrechen"
@@ -188,9 +182,7 @@ function action_export_ibanhin()
     </div>
 
     <script type="text/javascript">
-
-        var members = new Array(<?=join(",\n", array_map('json_encode', $members)) ?>);
-
+        var members = new Array(<?php echo join(",\n", array_map('json_encode', $members)) ?>);
 
         $(document).ready(function () {
             $('#password').keypress(function (event) {
@@ -201,26 +193,19 @@ function action_export_ibanhin()
             $('#btn_ibanhin').focus();
         });
 
-
-        function ask_for_password() {/*{{{*/
+        function ask_for_password() {
             modal_window_show($("#password_popup"));
             $("#password").focus();
             return;
         }
 
-        /*}}}*/
-
-        function cancel_ask_for_password() {/*{{{*/
+        function cancel_ask_for_password() {
             modal_window_hide();
             $("#btn_ibanhin").focus();
             return;
         }
 
-        /*}}}*/
-
-
-        function export_ibanhin() {/*{{{*/
-
+        function export_ibanhin() {
             var ibanhin_content = "";
 
             var password = $('#password').val();
@@ -258,35 +243,26 @@ function action_export_ibanhin()
                     }
                 }
 
-                $('#ibanhin_content').val(ibanhin_content);
-                $('#ibanhin_content').focus();
-                $('#ibanhin_content').select();
+                var iban_hin_content = $('#ibanhin_content');
+                iban_hin_content.val(ibanhin_content);
+                iban_hin_content.focus();
+                iban_hin_content.select();
 
             });
 
         }
 
-        /*}}}*/
-
-        function ibanhin_close() {/*{{{*/
+        function ibanhin_close() {
             modal_window_hide();
             $("#ibanhin_content").val('');
         }
-
-        /*}}}*/
-
-
     </script>
-
     <?php
-
-}/*}}}*/
-
+}
 
 function action_list_members()
-{/*{{{*/
+{
     $members = db_get_members();
-    $count = 0;
     $regular = 0;
     $patron = 0;
     $honorary = 0;
@@ -318,11 +294,11 @@ function action_list_members()
             }
             ?>
             <tr <?php if (empty($membership_info['is_member'])) : ?>class="inactive"<?php endif ?>>
-                <td><a href="<?= html_escape(link_to('view_member',
-                        array('id' => $member['id']))) ?>"><?= html_escape($member['number']) ?></a></td>
-                <td><?= html_escape($member['nickname']) ?></td>
-                <td><?= html_escape($member['firstname']) ?></td>
-                <td><?= html_escape($member['lastname']) ?></td>
+                <td><a href="<?php echo html_escape(link_to('view_member',
+                        array('id' => $member['id']))) ?>"><?php echo html_escape($member['number']) ?></a></td>
+                <td><?php echo html_escape($member['nickname']) ?></td>
+                <td><?php echo html_escape($member['firstname']) ?></td>
+                <td><?php echo html_escape($member['lastname']) ?></td>
             </tr>
         <?php endforeach ?>
     </table>
@@ -332,22 +308,22 @@ function action_list_members()
 endif;
     $count = $regular + $honorary + $patron;
     ?>
-    <p>Derzeit gibt es <?= $count ?> Vereinsmitglieder. Davon:
+    <p>Derzeit gibt es <?php echo $count ?> Vereinsmitglieder. Davon:
     <ul>
-        <li><?= $regular ?> ordentliche Mitglieder</li>
-        <li><?= $honorary ?> Ehrenmitglieder</li>
-        <li style="font-weight: bold;"><?= $regular + $honorary ?> stimmberechtigte Mitglieder</li>
-        <li><?= $patron ?> Fördermitglieder</li>
+        <li><?php echo $regular ?> ordentliche Mitglieder</li>
+        <li><?php echo $honorary ?> Ehrenmitglieder</li>
+        <li style="font-weight: bold;"><?php echo $regular + $honorary ?> stimmberechtigte Mitglieder</li>
+        <li><?php echo $patron ?> Fördermitglieder</li>
     </ul>
     </p>
-    <a href="<?= link_to('create_member') ?>">Neues Mitglied</a>
-    <a href="<?= link_to('export_email') ?>">E-Mail-Adressen</a>
-    <a href="<?= link_to('export_members') ?>">XLS Export</a>
+    <a href="<?php echo link_to('create_member') ?>">Neues Mitglied</a>
+    <a href="<?php echo link_to('export_email') ?>">E-Mail-Adressen</a>
+    <a href="<?php echo link_to('export_members') ?>">XLS Export</a>
     <?php
-}/*}}}*/
+}
 
 function action_view_member()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to());
     }
@@ -358,10 +334,10 @@ function action_view_member()
     form_member($member, true);
     action_list_events($member);
     action_create_event($member);
-}/*}}}*/
+}
 
 function action_create_member()
-{/*{{{*/
+{
     $member = array();
     $log_messages = array();
     if (isset($_POST['submit'])) {
@@ -386,10 +362,10 @@ function action_create_member()
         }
     }
     form_member($member, false, $log_messages);
-}/*}}}*/
+}
 
 function action_change_member()
-{/*{{{*/
+{
     if (!isset($_REQUEST['id'])) {
         redirect(link_to());
     }
@@ -418,11 +394,10 @@ function action_change_member()
         }
     }
     form_member($member, false, $log_messages);
-}/*}}}*/
-
+}
 
 function action_export_email()
-{/*{{{*/
+{
     $members = db_get_members();
     $first = true;
     ?>
@@ -431,13 +406,12 @@ function action_export_email()
     <?php foreach ($members as $member) : ?><?php $membership_info = fees_info_for_member($member['id'],
         time()); ?><?php if (!empty($membership_info['is_member'])) : ?><?php if (empty($member['email'])) {
         continue;
-    } ?><?php if ($first) : $first = false; else : ?>,<?php endif ?> <?= $member['email'] ?><?php endif ?><?php endforeach ?>
+    } ?><?php if ($first) : $first = false; else : ?>,<?php endif ?><?php echo $member['email'] ?><?php endif ?><?php endforeach ?>
 <?php else : ?>
     <p>Bisher gibt's noch keine Mitglieder.</p>
 <?php endif ?>
     <?php
-}/*}}}*/
-
+}
 
 function html_member_list_box($label, $name, $selected, $readonly = false, $id = null, $tag_params = '')
 {
@@ -452,15 +426,15 @@ function html_member_list_box($label, $name, $selected, $readonly = false, $id =
 }
 
 function form_member($member = array(), $readonly = false, $log_messages = array())
-{/*{{{*/
-
+{
     global $DIRECTDEBIT_STATES;
 
     $keys = db_get_crypto_keys();
     if (empty($keys)) {
         ?>
         <p class="error">
-            <strong>Achtung:</strong> Bitte zuerst <a href="<?= link_to('cryptography') ?>">Kryptographie einrichten</a>.
+            <strong>Achtung:</strong> Bitte zuerst <a href="<?php echo link_to('cryptography') ?>">Kryptographie
+                einrichten</a>.
         </p>
         <?php
         return;
@@ -484,21 +458,21 @@ function form_member($member = array(), $readonly = false, $log_messages = array
 <?php endif ?>
     <?php log_messages($log_messages); ?>
     <form action="" method="post" class="clearfix">
-        <?php if (isset($member['id']) && !$readonly) : ?><?= html_hidden_field('id', $member) ?><?php endif ?>
+        <?php if (isset($member['id']) && !$readonly) : ?><?php echo html_hidden_field('id', $member) ?><?php endif ?>
         <fieldset>
             <legend>Allgemein</legend>
-            <?= html_text_field('Mitgliedsnummer', 'number', $member, $readonly) ?>
+            <?php echo html_text_field('Mitgliedsnummer', 'number', $member, $readonly) ?>
             <?php if (!$readonly) : ?>
                 <small>Wird automatisch vergeben wenn leer.</small><?php endif ?>
-            <?= html_text_field('Nickname', 'nickname', $member, $readonly) ?>
-            <?= html_text_field('E-Mail', 'email', $member, $readonly) ?>
+            <?php echo html_text_field('Nickname', 'nickname', $member, $readonly) ?>
+            <?php echo html_text_field('E-Mail', 'email', $member, $readonly) ?>
         </fieldset>
         <fieldset id="bank_details">
             <legend>Bankverbindung</legend>
-            <?= html_text_field('Kontoinhaber', 'accountholder', $member, true) ?>
-            <?= html_text_field('Kontonummer/IBAN', 'accountnumber', $member, true) ?>
-            <?= html_text_field('Bankleitzahl/BIC', 'bankcode', $member, true) ?>
-            <?= html_text_field('Name der Bank', 'bankname', $member, true) ?>
+            <?php echo html_text_field('Kontoinhaber', 'accountholder', $member, true) ?>
+            <?php echo html_text_field('Kontonummer/IBAN', 'accountnumber', $member, true) ?>
+            <?php echo html_text_field('Bankleitzahl/BIC', 'bankcode', $member, true) ?>
+            <?php echo html_text_field('Name der Bank', 'bankname', $member, true) ?>
             <?php if (!isset($member['id'])) : ?>
                 <input class="submit" type="button" name="btn_bank_details" value="Bankverbindung erfassen"
                        onclick="bank_details_ask_pass()" id="btn_bank_details"/>
@@ -509,7 +483,7 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 <input class="submit" type="button" name="btn_bank_details" value="Bankverbindung &auml;ndern"
                        onclick="bank_details_ask_pass()" id="btn_bank_details"/>
             <?php endif ?>
-            <?= html_list_box('Beitragseinzug', 'directdebit', $DIRECTDEBIT_STATES, $member, $readonly) ?>
+            <?php echo html_list_box('Beitragseinzug', 'directdebit', $DIRECTDEBIT_STATES, $member, $readonly) ?>
             <?php
             if ((!isset($member['ddmandatesigdate'])) ||
                 ($member['ddmandatesigdate'] == '') ||
@@ -519,36 +493,36 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 $member['ddmandatesigdate'] = html_escape(format_date(db_date2unixtime($member['ddmandatesigdate'])));
             }
             ?>
-            <?= html_text_field('Mandatsunterschrift', 'ddmandatesigdate', $member, $readonly) ?>
+            <?php echo html_text_field('Mandatsunterschrift', 'ddmandatesigdate', $member, $readonly) ?>
         </fieldset>
         <fieldset style="clear: left;">
             <legend>Anschrift</legend>
-            <?= html_text_field('Vorname', 'firstname', $member, $readonly) ?>
-            <?= html_text_field('Nachname', 'lastname', $member, $readonly) ?>
-            <?= html_text_field('Straße', 'street', $member, $readonly) ?>
-            <?= html_text_field('Hausnummer', 'housenumber', $member, $readonly) ?>
-            <?= html_text_field('PLZ', 'postcode', $member, $readonly) ?>
-            <?= html_text_field('Ort', 'city', $member, $readonly) ?>
-            <?= html_text_field('Land', 'country', $member, $readonly) ?>
+            <?php echo html_text_field('Vorname', 'firstname', $member, $readonly) ?>
+            <?php echo html_text_field('Nachname', 'lastname', $member, $readonly) ?>
+            <?php echo html_text_field('Straße', 'street', $member, $readonly) ?>
+            <?php echo html_text_field('Hausnummer', 'housenumber', $member, $readonly) ?>
+            <?php echo html_text_field('PLZ', 'postcode', $member, $readonly) ?>
+            <?php echo html_text_field('Ort', 'city', $member, $readonly) ?>
+            <?php echo html_text_field('Land', 'country', $member, $readonly) ?>
         </fieldset>
         <fieldset>
             <legend>Sonstiges</legend>
-            <?= html_text_field('Telefon', 'phone', $member, $readonly) ?>
-            <?= html_text_field('Fax', 'fax', $member, $readonly) ?>
-            <?= html_text_field('Handy', 'mobile', $member, $readonly) ?>
-            <?= html_text_field('Jabber', 'jabber', $member, $readonly) ?>
-            <?= html_text_field('ICQ', 'icq', $member, $readonly) ?>
-            <?= html_text_field('MSN', 'msn', $member, $readonly) ?>
-            <?= html_text_field('AIM', 'aim', $member, $readonly) ?>
-            <?= html_text_field('Skype', 'skype', $member, $readonly) ?>
-            <?= html_text_field('Website', 'url', $member, $readonly) ?>
-            <?= html_text_field('Twitter', 'twitter', $member, $readonly) ?>
+            <?php echo html_text_field('Telefon', 'phone', $member, $readonly) ?>
+            <?php echo html_text_field('Fax', 'fax', $member, $readonly) ?>
+            <?php echo html_text_field('Handy', 'mobile', $member, $readonly) ?>
+            <?php echo html_text_field('Jabber', 'jabber', $member, $readonly) ?>
+            <?php echo html_text_field('ICQ', 'icq', $member, $readonly) ?>
+            <?php echo html_text_field('MSN', 'msn', $member, $readonly) ?>
+            <?php echo html_text_field('AIM', 'aim', $member, $readonly) ?>
+            <?php echo html_text_field('Skype', 'skype', $member, $readonly) ?>
+            <?php echo html_text_field('Website', 'url', $member, $readonly) ?>
+            <?php echo html_text_field('Twitter', 'twitter', $member, $readonly) ?>
         </fieldset>
         <?php if (!$readonly) : ?>
             <input class="submit" type="submit" name="submit" value="Speichern"/>
         <?php else : ?>
             <br style="clear: left;"/>
-            <a href="<?= html_escape(link_to('change_member', array('id' => $member['id']))) ?>">Mitglied
+            <a href="<?php echo html_escape(link_to('change_member', array('id' => $member['id']))) ?>">Mitglied
                 &auml;ndern</a>
         <?php endif ?>
     </form>
@@ -558,7 +532,7 @@ function form_member($member = array(), $readonly = false, $log_messages = array
     <div id="password_popup2" class="modal_window">
         <fieldset>
             <legend>Passwortabfrage</legend>
-            <?= html_password_field('Passwort', 'password2') ?>
+            <?php echo html_password_field('Passwort', 'password2') ?>
             <input class="submit" type="button" name="btn_import_qrcode2" value="QR-Code importieren"
                    onclick="import_qrcode()"/>
             <input class="submit" type="button" name="btn_cancel_import_qrcode" value="Abbrechen"
@@ -577,7 +551,7 @@ function form_member($member = array(), $readonly = false, $log_messages = array
     <div id="password_popup" class="modal_window">
         <fieldset>
             <legend>Passwortabfrage</legend>
-            <?= html_password_field('Passwort', 'password1') ?>
+            <?php echo html_password_field('Passwort', 'password1') ?>
             <input class="submit" type="button" name="btn_decrypt_bank_details" value="Bankdaten entschl&uuml;sseln"
                    onclick="decrypt_bank_details()"/>
             <input class="submit" type="button" name="btn_cancel" value="Abbrechen"
@@ -587,10 +561,10 @@ function form_member($member = array(), $readonly = false, $log_messages = array
     <div id="bank_detail_popup" class="modal_window">
         <fieldset>
             <legend>Bankverbindung</legend>
-            <?= html_text_field('Kontoinhaber', 'tmp_accountholder', $member, $readonly) ?>
-            <?= html_text_field('Kontonummer/IBAN', 'tmp_accountnumber', $member, $readonly) ?>
-            <?= html_text_field('Bankleitzahl/BIC', 'tmp_bankcode', $member, $readonly) ?>
-            <?= html_text_field('Name der Bank', 'tmp_bankname', $member, $readonly) ?>
+            <?php echo html_text_field('Kontoinhaber', 'tmp_accountholder', $member, $readonly) ?>
+            <?php echo html_text_field('Kontonummer/IBAN', 'tmp_accountnumber', $member, $readonly) ?>
+            <?php echo html_text_field('Bankleitzahl/BIC', 'tmp_bankcode', $member, $readonly) ?>
+            <?php echo html_text_field('Name der Bank', 'tmp_bankname', $member, $readonly) ?>
             <?php if (!isset($member['id'])) : ?>
                 <input class="submit" type="button" name="btn_bank_details_save" value="&Uuml;bernehmen"
                        onclick="bank_details_save()"/>
@@ -608,8 +582,6 @@ function form_member($member = array(), $readonly = false, $log_messages = array
         </fieldset>
     </div>
     <script type="text/javascript">
-
-
         var the_masterkey;
 
         $(document).ready(function () {
@@ -643,42 +615,32 @@ function form_member($member = array(), $readonly = false, $log_messages = array
             <?php endif ?>
         });
 
-        function bank_details_ask_pass() {/*{{{*/
+        function bank_details_ask_pass() {
             modal_window_show($("#password_popup"));
             $("#password1").focus();
             return;
         }
 
-        /*}}}*/
-
-
-        function import_qrcode_ask_pass() {/*{{{*/
+        function import_qrcode_ask_pass() {
             modal_window_show($("#password_popup2"));
             $("#password2").focus();
             return;
         }
 
-        /*}}}*/
-
-        function cancel_change_bank_details() {/*{{{*/
+        function cancel_change_bank_details() {
             modal_window_hide();
             $("#btn_bank_details").focus();
             $("#password1").val('');
             return;
         }
 
-        /*}}}*/
-
-        function cancel_import_qrcode() {/*{{{*/
+        function cancel_import_qrcode() {
             modal_window_hide();
             $("#password2").val('');
             return;
         }
 
-        /*}}}*/
-
-        function decrypt_bank_details() {/*{{{*/
-
+        function decrypt_bank_details() {
             var password = $('#password1').val();
             $("#password1").val('');
 
@@ -712,13 +674,9 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 }
                 the_masterkey = masterkey; // cache masterkey until popup is closed
             });
-
         }
 
-        /*}}}*/
-
-        function import_qrcode() {/*{{{*/
-
+        function import_qrcode() {
             var password = $('#password2').val();
             $("#password2").val('');
 
@@ -728,13 +686,9 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 modal_window_replace($("#qrcode_popup"));
                 the_masterkey = masterkey; // cache masterkey until popup is closed
             });
-
         }
 
-        /*}}}*/
-
-        function qrcode_close() {/*{{{*/
-
+        function qrcode_close() {
             modal_window_hide();
 
             var qrcode_content = $('#qrcode_content').val();
@@ -761,7 +715,6 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 // XXX amount unused - wurde erst am 4.5. ergänzt, war vorher leer.
             }
 
-
             // 4.2 Encrypt/Decrypt data using AES with masterkey
             if (accountholder != "") {
                 $('#accountholder').val(Crypto.AES.encrypt(Crypto.charenc.UTF8.stringToBytes(accountholder), the_masterkey));
@@ -784,13 +737,9 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 $('#bankname').val('');
             }
             the_masterkey = '';
-
         }
 
-        /*}}}*/
-
-        function bank_details_save() {/*{{{*/
-
+        function bank_details_save() {
             modal_window_hide();
 
             var accountholder = $('#tmp_accountholder').val();
@@ -826,13 +775,9 @@ function form_member($member = array(), $readonly = false, $log_messages = array
                 $('#bankname').val('');
             }
             the_masterkey = '';
-
         }
 
-        /*}}}*/
-
-        function bank_details_cancel() {/*{{{*/
-
+        function bank_details_cancel() {
             modal_window_hide();
 
             $("#tmp_accountholder").val('');
@@ -842,9 +787,6 @@ function form_member($member = array(), $readonly = false, $log_messages = array
 
             the_masterkey = '';
         }
-
-        /*}}}*/
-
     </script>
     <?php
-}/*}}}*/
+}
index 9fe56f4..5f4b4ba 100644 (file)
@@ -1,23 +1,23 @@
 <?php
 
 function action_404()
-{/*{{{*/
+{
     header('HTTP/1.0 404 Not Found');
     ?>
     <h2>Seite nicht gefunden!</h2>
     <p>Was immer du auch suchst, es ist nicht hier.</p>
     <?php
-}/*}}}*/
+}
 
 function redirect($url)
-{/*{{{*/
+{
     header('HTTP/1.1 301 Moved Permanently');
     header('Location: ' . $url);
     die();
-}/*}}}*/
+}
 
 function link_to($action = '', $params = array())
-{/*{{{*/
+{
     if (!empty($action)) {
         $params = array_merge(array('action' => $action), $params);
     }
@@ -33,21 +33,21 @@ function link_to($action = '', $params = array())
         $query_string .= urlencode($key) . '=' . urlencode($val);
     }
     return $base . '?' . $query_string;
-}/*}}}*/
+}
 
 function log_messages($log_messages)
-{/*{{{*/
+{
     if (empty($log_messages)) {
         return;
     }
     ?>
     <ul class="log_messages">
         <?php foreach ($log_messages as $log_message) : ?>
-            <li><?= html_escape($log_message) ?></li>
+            <li><?php echo html_escape($log_message) ?></li>
         <?php endforeach ?>
     </ul>
     <?php
-}/*}}}*/
+}
 
 function format_date($unixtime)
 {
@@ -93,10 +93,10 @@ function paginate($url, $current, $max)
     <?php if ($max > 1) : ?>
     <div class="pagination">
         <?php if ($current != 1) : ?>
-            <div class="prev"><a href="<?= html_escape(sprintf($url, $current - 1)) ?>">&laquo;</a></div>
+            <div class="prev"><a href="<?php echo html_escape(sprintf($url, $current - 1)) ?>">&laquo;</a></div>
         <?php endif ?>
         <?php if ($current != $max) : ?>
-            <div class="next"><a href="<?= html_escape(sprintf($url, $current + 1)) ?>">&raquo;</a></div>
+            <div class="next"><a href="<?php echo html_escape(sprintf($url, $current + 1)) ?>">&raquo;</a></div>
         <?php endif ?>
 
         <?php $skipped = false; ?>
@@ -108,20 +108,19 @@ function paginate($url, $current, $max)
             } ?>
             <?php if ($skipped) : ?> ... <?php endif ?>
             <?php if ($page == $current) : ?>
-                <?= html_escape($page) ?>
+                <?php echo html_escape($page) ?>
             <?php else : ?>
-                <a href="<?= html_escape(sprintf($url, $page)) ?>"><?= html_escape($page) ?></a>
+                <a href="<?php echo html_escape(sprintf($url, $page)) ?>"><?php echo html_escape($page) ?></a>
             <?php endif ?>
             <?php $skipped = false; ?>
         <?php endfor ?>
     </div>
-<?php endif ?>
-    <?
+<?php
+endif;
 }
 
-
 function js_modal_windows()
-{/*{{{*/
+{
     ?>
     <script type="text/javascript">
 
@@ -137,7 +136,7 @@ function js_modal_windows()
             });
         });
 
-        var modal_windows = new Array();
+        var modal_windows = [];
 
         function modal_window_show(modal_window) {
             var length = modal_windows.length;
@@ -177,6 +176,4 @@ function js_modal_windows()
         <img src="images/activity_indicator.gif"/>
     </div>
     <?php
-}/*}}}*/
-
-
+}
index 5156f27..ee7b683 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
 // NOTE: combination of earnings and expenses
-
 $ACCOUNT_TYPES = array(
     'bank' => 'Konto',
     'cash' => 'Kasse'
 );
 
-/* DB functions {{{ */
+// DB functions
 function db_get_payments($offset, $count, $where)
 {
     $limit = '';
@@ -89,11 +88,9 @@ function db_get_open_payments($offset, $count)
     return db_get_payments($offset, $count, " WHERE status='open'");
 }
 
-/* }}} */
-
 function render_finished_payments($count = 100)
-{/*{{{*/
-    global $EXPENSE_TYPES, $EARNING_TYPES, $ACCOUNT_TYPES;
+{
+    global $EXPENSE_TYPES, $EARNING_TYPES;
     $page = 1;
     if (!empty($_REQUEST['page'])) {
         $page = max(1, (int)$_REQUEST['page']);
@@ -116,19 +113,19 @@ function render_finished_payments($count = 100)
             <th>Gesamt</th>
         </tr>
         <?php foreach ($payments as $payment) : ?>
-            <tr class="<?= $payment['ptype'] ?>">
-                <td style="text-align: right;"><a href="<?= html_escape(link_to('change_' . $payment['ptype'],
-                        array('id' => $payment['id']))) ?>"><?= html_escape($payment['id']) ?></a></td>
-                <td><?= html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
-                <td><?= html_escape($payment['ptype'] == 'earning' ? $EARNING_TYPES[$payment['type']] : $EXPENSE_TYPES[$payment['type']]) ?></td>
-                <td><?php if ($payment['member_id'] != 0) : ?><a href="<?= html_escape(link_to('view_member',
-                        array('id' => $payment['member_id']))) ?>"><?= html_escape($payment['nickname']) ?><?php endif ?></a>
+            <tr class="<?php echo $payment['ptype'] ?>">
+                <td style="text-align: right;"><a href="<?php echo html_escape(link_to('change_' . $payment['ptype'],
+                        array('id' => $payment['id']))) ?>"><?php echo html_escape($payment['id']) ?></a></td>
+                <td><?php echo html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
+                <td><?php echo html_escape($payment['ptype'] == 'earning' ? $EARNING_TYPES[$payment['type']] : $EXPENSE_TYPES[$payment['type']]) ?></td>
+                <td><?php if ($payment['member_id'] != 0) : ?><a href="<?php echo html_escape(link_to('view_member',
+                        array('id' => $payment['member_id']))) ?>"><?php echo html_escape($payment['nickname']) ?><?php endif ?></a>
                 </td>
-                <td style="text-align: right;"><?= html_escape(format_money(($payment['ptype'] == 'earning' ? 1 : -1) * $payment['value'])) ?></td>
-                <td><?= html_escape($payment['description']) ?></td>
-                <td style="text-align: right;<?php if ($payment['account'] == 'bank') : ?> text-decoration:underline;<?php endif ?>"><?= html_escape(format_money($payment['bank'])) ?></td>
-                <td style="text-align: right;<?php if ($payment['account'] == 'cash') : ?> text-decoration:underline;<?php endif ?>"><?= html_escape(format_money($payment['cash'])) ?></td>
-                <td style="text-align: right;"><?= html_escape(format_money($payment['total'])) ?></td>
+                <td style="text-align: right;"><?php echo html_escape(format_money(($payment['ptype'] == 'earning' ? 1 : -1) * $payment['value'])) ?></td>
+                <td><?php echo html_escape($payment['description']) ?></td>
+                <td style="text-align: right;<?php if ($payment['account'] == 'bank') : ?> text-decoration:underline;<?php endif ?>"><?php echo html_escape(format_money($payment['bank'])) ?></td>
+                <td style="text-align: right;<?php if ($payment['account'] == 'cash') : ?> text-decoration:underline;<?php endif ?>"><?php echo html_escape(format_money($payment['cash'])) ?></td>
+                <td style="text-align: right;"><?php echo html_escape(format_money($payment['total'])) ?></td>
             </tr>
         <?php endforeach ?>
     </table>
@@ -137,13 +134,11 @@ function render_finished_payments($count = 100)
     <p>Bisher gibt's noch keine abgeschlossenen Zahlungen.</p>
 <?php endif ?>
     <?php
-
-}/*}}}*/
+}
 
 function render_open_payments($offset = 0, $count = 25)
-{/*{{{*/
+{
     global $EXPENSE_TYPES, $EARNING_TYPES, $ACCOUNT_TYPES;
-    global $EXPENSE_TYPES, $EARNING_TYPES;
     $payments = db_get_open_payments($offset, $count);
     ?>
     <h3>Offene Zahlungen</h3>
@@ -159,17 +154,17 @@ function render_open_payments($offset = 0, $count = 25)
             <th>Beschreibung</th>
         </tr>
         <?php foreach ($payments as $payment) : ?>
-            <tr class="<?= $payment['ptype'] ?>">
-                <td style="text-align: right;"><a href="<?= html_escape(link_to('change_' . $payment['ptype'],
-                        array('id' => $payment['id']))) ?>"><?= html_escape($payment['id']) ?></a></td>
-                <td><?= html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
-                <td><?= html_escape($payment['ptype'] == 'earning' ? $EARNING_TYPES[$payment['type']] : $EXPENSE_TYPES[$payment['type']]) ?></td>
-                <td><?php if ($payment['member_id'] != 0) : ?><a href="<?= html_escape(link_to('view_member',
-                        array('id' => $payment['member_id']))) ?>"><?= html_escape($payment['nickname']) ?><?php endif ?></a>
+            <tr class="<?php echo $payment['ptype'] ?>">
+                <td style="text-align: right;"><a href="<?php echo html_escape(link_to('change_' . $payment['ptype'],
+                        array('id' => $payment['id']))) ?>"><?php echo html_escape($payment['id']) ?></a></td>
+                <td><?php echo html_escape(format_date(db_date2unixtime($payment['date']))) ?></td>
+                <td><?php echo html_escape($payment['ptype'] == 'earning' ? $EARNING_TYPES[$payment['type']] : $EXPENSE_TYPES[$payment['type']]) ?></td>
+                <td><?php if ($payment['member_id'] != 0) : ?><a href="<?php echo html_escape(link_to('view_member',
+                        array('id' => $payment['member_id']))) ?>"><?php echo html_escape($payment['nickname']) ?><?php endif ?></a>
                 </td>
-                <td><?= html_escape($ACCOUNT_TYPES[$payment['account']]) ?></td>
-                <td style="text-align: right;"><?= html_escape(format_money(($payment['ptype'] == 'earning' ? 1 : -1) * $payment['value'])) ?></td>
-                <td><?= html_escape($payment['description']) ?></td>
+                <td><?php echo html_escape($ACCOUNT_TYPES[$payment['account']]) ?></td>
+                <td style="text-align: right;"><?php echo html_escape(format_money(($payment['ptype'] == 'earning' ? 1 : -1) * $payment['value'])) ?></td>
+                <td><?php echo html_escape($payment['description']) ?></td>
             </tr>
         <?php endforeach ?>
     </table>
@@ -177,5 +172,4 @@ function render_open_payments($offset = 0, $count = 25)
     <p>Bisher gibt's noch keine abgeschlossenen Zahlungen.</p>
 <?php endif ?>
     <?php
-
-}/*}}}*/
+}
index 3ccfd4b..2f98536 100644 (file)
@@ -2,10 +2,7 @@
 
 function action_export_members()
 {
-    global $EARNING_TYPES, $EXPENSE_TYPES;
-
     error_reporting(error_reporting() & ~E_DEPRECATED & ~E_STRICT);
-    require_once 'vendor/autoload.php';
 
     // Creating a workbook
     $workbook = new Spreadsheet_Excel_Writer();
@@ -15,16 +12,13 @@ function action_export_members()
     $workbook->send('Mitglieder.xls');
 
     // Creating a worksheet
-
     $members = db_get_members();
 
-
     $row = 0;
     $col = 0;
 
     $worksheet =& $workbook->addWorksheet('Mitglieder');
     $worksheet->setInputEncoding('UTF-8');
-    $row = 0;
     $worksheet->write($row, $col++, 'Mitgliedsnummer');
     $worksheet->write($row, $col++, 'Nickname');
     $worksheet->write($row, $col++, 'E-Mail');
@@ -47,7 +41,7 @@ function action_export_members()
     $worksheet->write($row, $col++, 'Twitter');
     $worksheet->write($row, $col++, 'Lastschrifteinzug');
     $worksheet->write($row, $col++, 'Mandatunterschriftsdatum');
-    $worksheet->write($row, $col++, 'Status');
+    $worksheet->write($row, $col, 'Status');
     $row++;
 
     foreach ($members as $member) {
@@ -75,8 +69,7 @@ function action_export_members()
         $worksheet->write($row, $col++, $member['directdebit']);
         $worksheet->write($row, $col++, $member['ddmandatesigdate']);
         $membership_info = fees_info_for_member($member['id'], time());
-        $worksheet->write($row, $col++, $membership_info['is_member']);
-        $col = 0;
+        $worksheet->write($row, $col, $membership_info['is_member']);
         $row++;
     }
 
@@ -94,7 +87,6 @@ function action_export_payments()
     global $EARNING_TYPES, $EXPENSE_TYPES;
 
     error_reporting(error_reporting() & ~E_DEPRECATED & ~E_STRICT);
-    require_once 'vendor/autoload.php';
 
     // Creating a workbook
     $workbook = new Spreadsheet_Excel_Writer();
@@ -104,14 +96,12 @@ function action_export_payments()
     $workbook->send('Finanzen.xls');
 
     // Creating a worksheet
-
     $payments = db_get_finished_payments(0, 1000000000);
 
 
     $row = 0;
     $col = 0;
     $current_year = '';
-
     foreach ($payments as $payment) {
         $year = substr($payment['date'], 0, 4);
         if ($year != $current_year) {
@@ -128,7 +118,7 @@ function action_export_payments()
             $worksheet->write($row, $col++, 'Mitglied');
             $worksheet->write($row, $col++, 'Kontostand');
             $worksheet->write($row, $col++, 'Kassenstand');
-            $worksheet->write($row, $col++, 'Gesamt');
+            $worksheet->write($row, $col, 'Gesamt');
             $row++;
             $col = 0;
         }
@@ -141,7 +131,7 @@ function action_export_payments()
         $worksheet->write($row, $col++, $payment['nickname']);
         $worksheet->write($row, $col++, $payment['bank']);
         $worksheet->write($row, $col++, $payment['cash']);
-        $worksheet->write($row, $col++, $payment['total']);
+        $worksheet->write($row, $col, $payment['total']);
 
         $col = 0;
         $row++;
index 03fca91..509473f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -24,7 +24,6 @@ $config = Config::getInstance();
 $config->set(require(__DIR__ . '/config.php'));
 require_once(__DIR__ . '/include/includes.php');
 
-
 db_connect();
 
 $action = 'list_members';
@@ -107,7 +106,6 @@ switch ($action) {
 
 $content = ob_get_contents();
 ob_end_clean();
-
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -426,14 +424,14 @@ ob_end_clean();
 </div>
 <div id="pagemenu">
     <ul class="content clearfix">
-        <li><a href="<?= link_to() ?>">Mitglieder</a></li>
-        <li><a href="<?= link_to('finances') ?>">Finanzen</a></li>
-        <li><a href="<?= link_to('fees') ?>">Mitgliedsbeitr&auml;ge</a></li>
-        <li><a href="<?= link_to('directdebit') ?>">Bankeinzug</a></li>
-        <li><a href="<?= link_to('cryptography') ?>">Kryptographie</a></li>
+        <li><a href="<?php echo link_to(); ?>">Mitglieder</a></li>
+        <li><a href="<?php echo link_to('finances'); ?>">Finanzen</a></li>
+        <li><a href="<?php echo link_to('fees'); ?>">Mitgliedsbeitr&auml;ge</a></li>
+        <li><a href="<?php echo link_to('directdebit'); ?>">Bankeinzug</a></li>
+        <li><a href="<?php echo link_to('cryptography'); ?>">Kryptographie</a></li>
     </ul>
 </div>
-<div id="content" class="content"><?= $content ?></div>
+<div id="content" class="content"><?php echo $content; ?></div>
 <div id="footer"></div>
 </body>
 </html>
diff --git a/src/.gitkeep b/src/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000