Exemple #1
0
function acumulus_update_client($vars)
{
    $vars = array_merge($vars, getAddonVars());
    updateCustomer($vars, $vars['userid']);
}
Exemple #2
0
* 	 2007-07-19
*
* License:
*	 GPL v2 or above
*
* Website:
* 	http://www.simpleinvoices.org
*/
//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
# Deal with op and add some basic sanity checking
$op = !empty($_POST['op']) ? addslashes($_POST['op']) : NULL;
#insert customer
$saved = false;
if ($op === "insert_customer") {
    if (insertCustomer()) {
        $saved = true;
        // saveCustomFieldValues($_POST['categorie'],lastInsertId());
    }
}
if ($op === 'edit_customer') {
    if (isset($_POST['save_customer'])) {
        if (updateCustomer()) {
            $saved = true;
            //updateCustomFieldValues($_POST['categorie'],$_GET['customer']);
        }
    }
}
$smarty->assign('saved', $saved);
$smarty->assign('pageActive', 'customer');
$smarty->assign('active_tab', '#people');
Exemple #3
0
{
    $c = new Customer();
    return $c->getFields();
}
/* </functions> */
$action = Functions::get('action');
Functions::checkRights(__FILE__, $action, Functions::get('token'));
switch ($action) {
    case 'fields_info':
        $data = infoFields();
        break;
    case 'new':
        $data = addCustomer();
        break;
    case 'update':
        $data = updateCustomer(Functions::get('id'));
        break;
    case 'info':
        $data = infoCustomer(Functions::get('id'));
        break;
    case 'delete':
        $data = deleteCustomer(Functions::get('id'));
        break;
    case 'total_entries':
        $data = getTotalEntries(Functions::get('id'));
        break;
    case 'total_sells':
        $data = getTotalSells(Functions::get('id'));
        break;
    case 'balance':
        $data = getBalance(Functions::get('id'));