$company = new SI_Company(); $companies = $company->retrieveSet("WHERE updated_ts > $last_update_ts"); if($companies === FALSE){ $error_msg .= "Error getting companies updated since ".date('m-d-Y', $last_update_ts); debug_message($company->getLastError()); } $item_code = new SI_ItemCode(); $item_codes = $item_code->retrieveSet("WHERE updated_ts > $last_update_ts"); if($item_codes === FALSE){ $error_msg .= "Error getting item codes updated since ".date('m-d-Y', $last_update_ts); debug_message($item_code->getLastError()); } $account = new SI_Account(); $accounts = $account->retrieveSet("WHERE updated_ts > $last_update_ts"); if($accounts === FALSE){ $error_msg .= "Error getting accounts updated since ".date('m-d-Y', $last_update_ts); debug_message($account->getLastError()); } $invoice = new SI_Invoice(); $invoices = $invoice->retrieveSet("WHERE updated_ts > $last_update_ts"); if($invoices === FALSE){ $error_msg .= "Error getting invoices updated since ".date('m-d-Y', $last_update_ts); debug_message($invoice->getLastError()); } $payment = new SI_Payment(); $payments = $payment->retrieveSet("WHERE updated_ts > $last_update_ts"); if($payments === FALSE){
function getIDForName($name){ global $db_conn; $accounts = SI_Account::retrieveSet("WHERE name LIKE '".$db_conn->escapeString($name)."'"); if(is_array($accounts) && count($accounts) > 0){ return $accounts[0]->id; } return 0; }
* * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * */ require_once('includes/common.php'); require_once('includes/SI_User.php'); checkLogin("admin"); require_once('includes/SI_Account.php'); $account = new SI_Account(); $accounts = $account->retrieveSet("ORDER BY name"); if($accounts === FALSE){ $error_msg .= "Error getting accounts!\n"; debug_message($account->getLastError()); } $title = "Account Administration"; require('header.php') ?> <div class="tableContainer"> <a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Accounts</a><div> <div class="gridToolbar"> <a href="account.php?mode=add" style="background-image:url(images/new_invoice.png);">New Account</a> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr>