* * 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_Company.php'); $company = new SI_Company(); $companies = $company->retrieveSet("WHERE deleted = 'N' ORDER BY name"); if($companies === FALSE){ $error_msg .= "Error getting companies!\n"; debug_message($company->getLastError()); } $title = "Company Administration"; require('header.php') ?> <div class="tableContainer"> <a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Companies</a> <div> <div class="gridToolbar"> <a href="company.php?mode=add" style="background-image:url(images/new_invoice.png);">New Company</a> </div> <table border="0" cellspacing="0" cellpadding="0">
function soap_get_companies($username, $password) { $user = auth_user($username, $password); if ($user === FALSE) { return new soap_fault('Client', '', 'Access Denied'); } $company = new SI_Company(); $companies = $company->retrieveSet("WHERE deleted = 'N' ORDER BY name"); return object_to_data($companies, array('id', 'name')); }
require_once('includes/SI_Payment.php'); checkLogin(); if(isset($_REQUEST['last_update_ts'])){ $_REQUEST['update_ts'] = getTSFromInput($_REQUEST['last_update_ts']); } if(isset($_REQUEST['update_ts'])){ $last_update_ts = $_REQUEST['update_ts']; }else{ $last_update_ts = time() - (60 * 60 * 24 * 30); } $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){