コード例 #1
0
ファイル: qb_export.php プロジェクト: nanoprime/sureinvoice
	fatal_error("Export mode must be specified!");
}elseif(strtolower($_REQUEST['mode']) == 'company'){
	$company = new SI_Company();
	$output = $company->exportQB();
	if($output === FALSE){
		fatal_error("Error getting company export data!\n".$company->getLastError());
	}
}elseif(strtolower($_REQUEST['mode']) == 'item_code'){
	$code = new SI_ItemCode();
	$output = $code->exportQB();
	if($output === FALSE){
		fatal_error("Error getting item code export data!\n".$code->getLastError());
	}
}elseif(strtolower($_REQUEST['mode']) == 'account'){
	$account = new SI_Account();
	$output = $account->exportQB();
	if($output === FALSE){
		fatal_error("Error getting account export data!\n".$account->getLastError());
	}
}elseif(strtolower($_REQUEST['mode']) == 'payment'){
	$payment = new SI_Payment();
	$output = $payment->exportQB();
	if($output === FALSE){
		fatal_error("Error getting payment export data!\n".$payment->getLastError());
	}
}elseif(strtolower($_REQUEST['mode']) == 'invoice'){
	$invoice = new SI_Invoice();
	$output = $invoice->exportQB();
	if($output === FALSE){
		fatal_error("Error getting invoice export data!\n".$invoice->getLastError());
	}
コード例 #2
0
		}
	}
	
	if(isset($_POST['export_item_codes']) && is_array($_POST['export_item_codes'])){
		$item_code = new SI_ItemCode();
		$item_code_output = $item_code->exportQB("WHERE id IN (".join(',', $_POST['export_item_codes']).")");
		if($item_code_output === FALSE){
			fatal_error("Error getting item_code export data!\n".$item_code->getLastError());
		}else{
			$output .= $item_code_output;
		}
	}

	if(isset($_POST['export_accounts']) && is_array($_POST['export_accounts'])){
		$account = new SI_Account();
		$account_output = $account->exportQB("WHERE id IN (".join(',', $_POST['export_accounts']).")");
		if($account_output === FALSE){
			fatal_error("Error getting account export data!\n".$account->getLastError());
		}else{
			$output .= $account_output;
		}
	}

	if(isset($_POST['export_invoices']) && is_array($_POST['export_invoices'])){
		$invoice = new SI_Invoice();
		$invoice_output = $invoice->exportQB("WHERE id IN (".join(',', $_POST['export_invoices']).")");
		if($invoice_output === FALSE){
			fatal_error("Error getting invoice export data!\n".$invoice->getLastError());
		}else{
			$output .= $invoice_output;
		}