@@ -29,7 +29,7 @@ |
||
29 | 29 | <br /> |
30 | 30 | <h3><strong>Internal Error</strong></h3> |
31 | 31 | <?php |
32 | - echo '<h4> Version '.costant::app_version().'</h4>'; |
|
32 | + echo '<h4> Version '.costant::app_version().'</h4>'; |
|
33 | 33 | ?> |
34 | 34 | <br /> |
35 | 35 | <h4> Please contact developer Gabriele [Gabriele-V]</h4> |
@@ -550,58 +550,58 @@ discard block |
||
550 | 550 | $db = null; |
551 | 551 | } |
552 | 552 | |
553 | - //Select all bank accounts |
|
554 | - public static function bankaccount_select_all() |
|
555 | - { |
|
556 | - $const_dbpath = costant::database_path(); |
|
557 | - $db = new PDO("sqlite:${const_dbpath}"); |
|
558 | - |
|
559 | - $results = $db->query('SELECT AccountName FROM Account_list ORDER BY AccountName COLLATE nocase;'); |
|
560 | - $resultarray = []; |
|
561 | - if ($results !== false) { |
|
562 | - $resultarray = $results->fetchAll(PDO::FETCH_COLUMN, 0); |
|
563 | - } |
|
564 | - $db = null; |
|
565 | - |
|
566 | - return $resultarray; |
|
567 | - } |
|
553 | + //Select all bank accounts |
|
554 | + public static function bankaccount_select_all() |
|
555 | + { |
|
556 | + $const_dbpath = costant::database_path(); |
|
557 | + $db = new PDO("sqlite:${const_dbpath}"); |
|
558 | + |
|
559 | + $results = $db->query('SELECT AccountName FROM Account_list ORDER BY AccountName COLLATE nocase;'); |
|
560 | + $resultarray = []; |
|
561 | + if ($results !== false) { |
|
562 | + $resultarray = $results->fetchAll(PDO::FETCH_COLUMN, 0); |
|
563 | + } |
|
564 | + $db = null; |
|
565 | + |
|
566 | + return $resultarray; |
|
567 | + } |
|
568 | 568 | |
569 | 569 | //Select all payee |
570 | - public static function payee_select_all_name() |
|
571 | - { |
|
572 | - $const_dbpath = costant::database_path(); |
|
573 | - $db = new PDO("sqlite:${const_dbpath}"); |
|
570 | + public static function payee_select_all_name() |
|
571 | + { |
|
572 | + $const_dbpath = costant::database_path(); |
|
573 | + $db = new PDO("sqlite:${const_dbpath}"); |
|
574 | 574 | |
575 | - $results = $db->query('SELECT PayeeName FROM Payee_List ORDER BY PayeeName COLLATE nocase;'); |
|
576 | - $resultarray = []; |
|
577 | - if ($results !== false) { |
|
578 | - $resultarray = $results->fetchAll(PDO::FETCH_COLUMN, 0); |
|
579 | - } |
|
575 | + $results = $db->query('SELECT PayeeName FROM Payee_List ORDER BY PayeeName COLLATE nocase;'); |
|
576 | + $resultarray = []; |
|
577 | + if ($results !== false) { |
|
578 | + $resultarray = $results->fetchAll(PDO::FETCH_COLUMN, 0); |
|
579 | + } |
|
580 | 580 | |
581 | - $db = null; |
|
581 | + $db = null; |
|
582 | 582 | |
583 | - return $resultarray; |
|
584 | - } |
|
583 | + return $resultarray; |
|
584 | + } |
|
585 | 585 | |
586 | 586 | //Select one payee |
587 | - public static function payee_select_one($PayeeName) |
|
588 | - { |
|
589 | - $const_dbpath = costant::database_path(); |
|
590 | - $db = new PDO("sqlite:${const_dbpath}"); |
|
587 | + public static function payee_select_one($PayeeName) |
|
588 | + { |
|
589 | + $const_dbpath = costant::database_path(); |
|
590 | + $db = new PDO("sqlite:${const_dbpath}"); |
|
591 | 591 | |
592 | - $statement = $db->prepare('SELECT * FROM Payee_List WHERE PayeeName = :TrPayeeName COLLATE nocase;'); |
|
593 | - $statement->bindParam(':TrPayeeName', $PayeeName); |
|
594 | - $statement->execute(); |
|
595 | - $resultarray = []; |
|
596 | - $resultarray = $statement->fetch(PDO::FETCH_ASSOC); |
|
597 | - if (!$resultarray) { |
|
598 | - $resultarray = []; |
|
599 | - } |
|
592 | + $statement = $db->prepare('SELECT * FROM Payee_List WHERE PayeeName = :TrPayeeName COLLATE nocase;'); |
|
593 | + $statement->bindParam(':TrPayeeName', $PayeeName); |
|
594 | + $statement->execute(); |
|
595 | + $resultarray = []; |
|
596 | + $resultarray = $statement->fetch(PDO::FETCH_ASSOC); |
|
597 | + if (!$resultarray) { |
|
598 | + $resultarray = []; |
|
599 | + } |
|
600 | 600 | |
601 | - $db = null; |
|
601 | + $db = null; |
|
602 | 602 | |
603 | - return $resultarray; |
|
604 | - } |
|
603 | + return $resultarray; |
|
604 | + } |
|
605 | 605 | |
606 | 606 | // Insert single payee account |
607 | 607 | public static function payee_insert_single($Payee, $Category, $SubCategory) |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | return $resultarray; |
736 | 736 | } |
737 | 737 | |
738 | - // Insert all categories |
|
738 | + // Insert all categories |
|
739 | 739 | public static function category_insert_json($CategoryJSON) |
740 | 740 | { |
741 | 741 | $categories_json_list = json_decode($CategoryJSON, true); |
@@ -31,8 +31,8 @@ |
||
31 | 31 | <br /> |
32 | 32 | <h2><strong>Money Manager Ex - Web App</strong></h2> |
33 | 33 | <?php |
34 | - echo '<h4> Version '.costant::app_version().'</h4>'; |
|
35 | - echo '<h5> API Version '.costant::api_version().'</h5>'; |
|
34 | + echo '<h4> Version '.costant::app_version().'</h4>'; |
|
35 | + echo '<h5> API Version '.costant::api_version().'</h5>'; |
|
36 | 36 | ?> |
37 | 37 | <br /> |
38 | 38 | <h4> Developer: Gabriele [Gabriele-V]</h4> |