=0){ $data['PageName'].= " [".strtoupper($data['TransactionType'][$post['type']])."]"; } ############################################################################### if($post['action']=='confirm'){ update_transaction_status(-1, $post['gid'], 1); $post['action']='select'; }elseif($post['action']=='cancel'){ update_transaction_status(-1, $post['gid'], 2); $post['action']='select'; } ############################################################################### if($post['action']=='select'){ $status=''; if($post['status']>=0){ $status="`status`={$post['status']}"; if($post['type']>=0)$status=" AND {$status}";else $status=" WHERE {$status}"; } $count=get_trans_count(($post['type']>=0?"WHERE `type`={$post['type']}":'').$status); for($i=0; $i<$count; $i+=$data['MaxRowsByPage'])$data['Pages'][]=$i; $data['TransactionsList']=get_transactions( 0, 'both', $post['type'], $post['status'], $post['StartPage'], $data['MaxRowsByPage'], "ORDER BY `status` ASC,`tdate` DESC" ); }elseif($post['action']=='details'){ $post['TransactionDetails']=get_transaction_detail($post['gid'], -1); list($wtype, $total, $email, $ecomments)=explode("#", $post['TransactionDetails']['ecomments']); if($wtype&&$total&&$email&&$ecomments){ $post['TransactionDetails']['ecomments']=$ecomments; $post['wtype']=$wtype; $post['payee']=$email; $post['total']=$total; } }elseif($post['action']=='summary'){ $now=getdate(); if(!isset($post['month']))$post['month']=$now['mon']; if(!isset($post['day']))$post['day']=$now['mday']; if(!isset($post['year']))$post['year']=$now['year']; if(!$post['month'])$post['day']=0; $data['StatDays']=array('--'); for($i=1;$i<=31;$i++)$data['StatDays'][$i]=$i; $data['StatMonth']=array('--'); for($i=1;$i<=12;$i++)$data['StatMonth'][$i]=strtoupper(date('F', mktime(0,0,0,$i,1,0))); $years=get_transactions_year(); $data['StatYear']=array(); for($i=$years['min'];$i<=$years['max'];$i++)$data['StatYear'][$i]=$i; $dateA=mktime(0, 0, 0, $post['month'], $post['day'], $post['year']); $dateB=mktime(0, 0, 0, $post['month'], $post['day']+1, $post['year']); $post['Daily']=get_transactions_summary($dateA, $dateB); $dateA=mktime(0, 0, 0, $post['month'], 1, $post['year']); $dateB=mktime(0, 0, 0, $post['month']+1, 1, $post['year']); $post['Monthly']=get_transactions_summary($dateA, $dateB); $dateA=mktime(0, 0, 0, 1, 1, $post['year']); $dateB=mktime(0, 0, 0, 1, 1, $post['year']+1); $post['Yearly']=get_transactions_summary($dateA, $dateB); } $post['ViewMode']=$post['action']; ############################################################################### $data['SystemBalance']=select_balance(-1); ############################################################################### display('admins'); ############################################################################### ?>