Ignore:
Timestamp:
Feb 15, 2009, 6:53:26 PM (16 years ago)
Author:
george
Message:
  • Upraveno: Nezobrazovat seznam účastníků a jejich financí. Zobrazovat pouze informace vlastníka IP adresy.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/finance/clenove.php

    r143 r145  
    99switch($_GET['show'])
    1010{
    11   case 'user':
    12     ShowHeader('Seznam účastníků sítě', 'Seznam účastníků');
     11  default:
     12    ShowHeader('Finance účastníka', 'Finance účastníka');
     13        $UserID = GetMemberByIP('192.168.1.7');
     14
    1315    $DbResult = $Database->query("SELECT *,CONCAT(second_name, ' ', first_name) as fullname FROM users WHERE id=".$UserID);
    1416    $Row2 = $DbResult->fetch_array();
     
    2022    echo('<table style="font-size: smaller;" border="1" cellspacing="0" cellpadding="3"><tr><th>Datum</th><th>Popis</th><th>Částka [Kč]</th><th>Doklad</th></tr>');
    2123    $Operations = array();
    22     $DbResult = $Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$_GET['id'].') UNION ALL '.
    23       '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$_GET['id'].') ORDER BY Time DESC');
     24    $DbResult = $Database->query('(SELECT Time, Value, Text, Bill FROM FinanceCashFlow WHERE Subject='.$UserID.') UNION ALL '.
     25      '(SELECT TimeCreation as Time, (-Value) as Value, Text, Bill FROM FinanceClaimsLiabilities WHERE Subject='.$UserID.') ORDER BY Time DESC');
    2426    while($DbRow = $DbResult->fetch_array())
    2527      $Operations[] = $DbRow;
     
    3234    //echo('<tr><td>&nbsp;</td><td>-'.$Row2['network_device'].'</td><td>Proměnná cena za zařízení</td></tr>
    3335    echo('</table>');
    34     $DbResult = $Database->query('SELECT ((SELECT COALESCE(SUM(Value), 0) FROM FinanceCashFlow WHERE Subject='.$_GET['id'].') + '.
    35       '(SELECT COALESCE(SUM(-Value), 0) FROM FinanceClaimsLiabilities WHERE Subject='.$_GET['id'].')) as Total');
     36    $DbResult = $Database->query('SELECT ((SELECT COALESCE(SUM(Value), 0) FROM FinanceCashFlow WHERE Subject='.$UserID.') + '.
     37      '(SELECT COALESCE(SUM(-Value), 0) FROM FinanceClaimsLiabilities WHERE Subject='.$UserID.')) as Total');
    3638    $DbRow = $DbResult->fetch_array();
    3739    $Total = $DbRow['Total'];
     
    124126    $InvoiceGenerator->ShowStoredBill($_GET['id']);
    125127    break;
    126   default:
     128  case 'admin_user_list':
    127129    ShowHeader('Seznam účastníků sítě', 'Seznam účastníků');
    128130    // Seznam členů
Note: See TracChangeset for help on using the changeset viewer.