Changeset 136 for trunk/bin/file_importer.php
- Timestamp:
- Jun 3, 2006 7:47:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/file_importer.php
r111 r136 7 7 8 8 require realpath(dirname(__FILE__) . '/..') . '/config/cli_config.inc.php'; 9 10 $app =& App::getInstance(); 11 $db =& DB::getInstance(); 12 9 13 10 14 // Test arguments. … … 31 35 preg_match('/BALANCE:\s*\$([\.\d]+)/', $file_text, $amt); 32 36 $file_date = date('Y-m-d', strtotime(preg_replace('|[^_]*_|', '', basename($file)))); 33 // DB::query("37 // $db->query(" 34 38 // INSERT INTO invoice_tbl ( 35 39 // client_id, … … 43 47 // added_datetime 44 48 // ) 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) . "', 53 57 // NOW() 54 58 // ) … … 56 60 57 61 } 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__); 59 63 } 60 64 } 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__); 62 66 } 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__); 64 68 } 65 69
Note: See TracChangeset
for help on using the changeset viewer.