Ignore:
Timestamp:
Jun 3, 2006 7:47:48 PM (18 years ago)
Author:
scdev
Message:

Q - Merged branches/2.0singleton into trunk. Completed updating classes to use singleton methods. Implemented tests. Fixed some bugs. Changed some interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/file_importer.php

    r111 r136  
    77
    88require realpath(dirname(__FILE__) . '/..') . '/config/cli_config.inc.php';
     9
     10$app =& App::getInstance();
     11$db =& DB::getInstance();
     12   
    913
    1014// Test arguments.
     
    3135            preg_match('/BALANCE:\s*\$([\.\d]+)/', $file_text, $amt);
    3236            $file_date = date('Y-m-d', strtotime(preg_replace('|[^_]*_|', '', basename($file))));
    33 //             DB::query("
     37//             $db->query("
    3438//                 INSERT INTO invoice_tbl (
    3539//                     client_id,
     
    4347//                     added_datetime
    4448//                 ) VALUES (
    45 //                     '" . DB::escapeString(0) . "',
    46 //                     '" . DB::escapeString('hosting') . "',
    47 //                     '" . DB::escapeString($file_date) . "',
    48 //                     '" . DB::escapeString($amt[1]) . "',
    49 //                     '" . DB::escapeString('Paid') . "',
    50 //                     '" . DB::escapeString('') . "',
    51 //                     '" . DB::escapeString($file_text) . "',
    52 //                     '" . DB::escapeString($file_date) . "',
     49//                     '" . $db->escapeString(0) . "',
     50//                     '" . $db->escapeString('hosting') . "',
     51//                     '" . $db->escapeString($file_date) . "',
     52//                     '" . $db->escapeString($amt[1]) . "',
     53//                     '" . $db->escapeString('Paid') . "',
     54//                     '" . $db->escapeString('') . "',
     55//                     '" . $db->escapeString($file_text) . "',
     56//                     '" . $db->escapeString($file_date) . "',
    5357//                     NOW()
    5458//                 )
     
    5660
    5761        } else {
    58             App::logMsg('Could not open file: ' . $file, LOG_INFO, __FILE__, __LINE__);
     62            $app->logMsg('Could not open file: ' . $file, LOG_INFO, __FILE__, __LINE__);
    5963        }
    6064    }
    61     App::logMsg('Proccessing complete: ' . $file_count . ' files total.', LOG_INFO, __FILE__, __LINE__);
     65    $app->logMsg('Proccessing complete: ' . $file_count . ' files total.', LOG_INFO, __FILE__, __LINE__);
    6266} else {
    63     App::logMsg('No files available in that directory.', LOG_INFO, __FILE__, __LINE__);
     67    $app->logMsg('No files available in that directory.', LOG_INFO, __FILE__, __LINE__);
    6468}
    6569
Note: See TracChangeset for help on using the changeset viewer.