GetCustomerIDByARAID($_GET['aid']); } if(!eregi("^[0-9]+$",$_GET['id'])) { $SESSION->redirect('?m=customerlist'); } if($LMS->CustomerExists($_GET['id']) == 0) { $SESSION->redirect('?m=customerlist'); } include_once("lib/dBug.php"); $expired = isset($_GET['expired']) ? $_GET['expired'] : false; $customerinfo = $LMS->GetCustomer($_GET['id']); $assigments = $LMS->GetCustomerAssignments($_GET['id'], $expired); $customergroups = $LMS->CustomergroupGetForCustomer($_GET['id']); $othercustomergroups = $LMS->GetGroupNamesWithoutCustomer($_GET['id']); $balancelist = $LMS->GetCustomerBalanceList($_GET['id']); //new dBug($balancelist); //print_r($balancelist); $araid=$LMS->GetAraId($_GET['id']); if ($araid) { $balancelist2 = $LMS->SybaseGetCustomerBalanceList($_GET['id'],$araid); //new dBug($balancelist2); } //print_r($balancelist2); // LOGI => DODAC TO WYWO��ANIE $loglist = $LMS->GetCustomerLogList($_GET['id']); $zgloszenia=$LMS->GetCustomerZgloszenia($_GET['id']); $customernodes = $LMS->GetCustomerNodes($_GET['id']); $customervoipaccounts = $LMS->GetCustomerVoipAccounts($_GET['id']); $tariffs = $LMS->GetTariffs(); $documents = $LMS->GetDocuments($_GET['id'], 10); $taxeslist = $LMS->GetTaxes(); $allnodegroups = $LMS->GetNodeGroupNames(); //$danekarty=$LMS->GetKartaZestawienieByOwnerid($_GET['id']); $danekarty=$LMS->GetMagazynZestawienieByOwnerid($_GET['id']); //$dane=$LMS->GetDekoderZestawienieByOwnerid($_GET['id']); //new dBug($danekarty); if($customerinfo['cutoffstop'] > mktime(0,0,0)) $customerinfo['cutoffstopnum'] = floor(($customerinfo['cutoffstop'] - mktime(23,59,59))/86400); if(isset($CONFIG['phpui']['ewx_support']) && chkconfig($CONFIG['phpui']['ewx_support'])) { $SMARTY->assign('ewx_channelid', $DB->GetOne('SELECT MAX(channelid) FROM ewx_stm_nodes, nodes WHERE nodeid = nodes.id AND ownerid = ?', array($_GET['id']))); } $time = $SESSION->get('addbt'); $value = $SESSION->get('addbv'); $taxid = $SESSION->get('addbtax'); $comment = $SESSION->get('addbc'); $SESSION->save('backto', $_SERVER['QUERY_STRING']); $layout['pagetitle'] = trans('Customer Info: $0',$customerinfo['customername']); $customernodes['ownerid'] = $_GET['id']; $SMARTY->assign( array( 'customernodes' => $customernodes, 'customervoipaccounts' => $customervoipaccounts, 'balancelist' => $balancelist, 'balancelist2' => $balancelist2, 'loglist' => $loglist, // LOGI => DODAC TO PRZYPISANIE 'assignments' => $assigments, 'customergroups' => $customergroups, 'allnodegroups' => $allnodegroups, 'othercustomergroups' => $othercustomergroups, 'customerinfo' => $customerinfo, 'tariffs' => $tariffs, 'documents' => $documents, 'taxeslist' => $taxeslist, 'expired' => $expired, 'time' => $time, 'value' => $value, 'taxid' => $taxid, 'comment' => $comment, // 'dane' => $dane, 'danekarty' => $danekarty, ) ); //$SMARTY->debugging = true;; $SMARTY->assign('zgloszenia',$zgloszenia); $SMARTY->assign('zalogowany',$AUTH->login); $SMARTY->assign('ps_login',$AUTH->ps_login); $SMARTY->display('customerinfo.html'); ?>