Exemplo n.º 1
0
if (!IsBlocked(BIT_BLOCK_ACCREDITATION)) {
    foreach ($_REQUEST['New_Division'] as $DivKey => $DivValue) {
        foreach ($_REQUEST['New_Class'] as $ClKey => $ClValue) {
            $Tuple[$Tuple_Index] = "(" . "''," . StrSafe_DB($_SESSION['TourId']) . ", " . StrSafe_DB($DivValue . $ClValue) . ", " . StrSafe_DB(str_replace(",", ".", $_REQUEST['New_Price'])) . "" . ")";
            $Rules[$Tuple_Index] = $DivValue . $ClValue;
            ++$Tuple_Index;
        }
    }
    foreach ($Tuple as $Key => $Value) {
        $Insert = "INSERT INTO AccPrice (APId,APTournament,APDivClass,APPrice) " . "VALUES" . $Value;
        $RsIns = safe_w_sql($Insert);
        if (debug) {
            print $Insert . '<br>';
        }
        if (safe_w_affected_rows() == 1) {
            $xml .= '<new_rule>' . $Rules[$Key] . '</new_rule>' . "\n";
        }
    }
}
if ($xml == '') {
    $Errore = 1;
}
if (!debug) {
    header('Content-Type: text/xml');
}
print '<response>' . "\n";
print '<error>' . $Errore . '</error>' . "\n";
print '<confirm_msg>' . get_text('MsgAreYouSure') . '</confirm_msg>' . "\n";
print '<new_price>' . NumFormat(str_replace(",", ".", $_REQUEST['New_Price']), 2) . '</new_price>' . "\n";
print $xml;
print '</response>' . "\n";
Exemplo n.º 2
0
            $TotalPrice = 0;
            $ShowStatusLegend = false;
        }
        $pdf->SetFont($pdf->FontStd, '', 7);
        $pdf->Cell(10, 4, '', 0, 0, 'C', 0);
        $pdf->Cell(10, 4, $MyRow->Session, 1, 0, 'R', 0);
        $pdf->Cell(15, 4, $MyRow->TargetNo, 1, 0, 'R', 0);
        $pdf->Cell(10, 4, $MyRow->Bib, 1, 0, 'R', 0);
        $pdf->Cell(45, 4, $MyRow->FirstName . ' ' . $MyRow->Name, 1, 0, 'L', 0);
        $pdf->Cell(15, 4, $MyRow->AgeClass, 1, 0, 'C', 0);
        $pdf->Cell(10, 4, $MyRow->SubClass, 1, 0, 'C', 0);
        $pdf->Cell(15, 4, $MyRow->DivCode, 1, 0, 'C', 0);
        $pdf->Cell(15, 4, $MyRow->ClassCode, 1, 0, 'C', 0);
        //Disegna i Pallini per la partecipazione
        $pdf->DrawParticipantDetails($MyRow->IC, $MyRow->IF, $MyRow->TC, $MyRow->TF, $MyRow->TM);
        $pdf->SetDefaultColor();
        $pdf->SetFont($pdf->FontStd, '', 7);
        $ShowStatusLegend = $ShowStatusLegend || $MyRow->Status != 0;
        $pdf->Cell(10, 4, $MyRow->Status == 0 ? '' : $MyRow->Status, 1, 0, 'C', 0);
        $pdf->Cell(20, 4, ($MyRow->EnPays == 1 ? NumFormat($MyRow->APPrice, 2) : NumFormat(0, 2)) . " " . $pdf->writeCurrency(), 1, 1, 'R', 0);
        $TotalPrice += $MyRow->EnPays == 1 ? $MyRow->APPrice : 0;
    }
    $pdf->SetFont($pdf->FontStd, '', 8);
    $pdf->Cell(165, 15, get_text('Cash', 'Tournament') . ":", 0, 0, 'R', 0);
    $pdf->SetFont($pdf->FontStd, 'B', 12);
    $pdf->Cell(25, 15, NumFormat($TotalPrice, 2) . " " . $pdf->writeCurrency(), 0, 1, 'R', 0);
    safe_free_result($Rs);
}
if (!isset($isCompleteResultBook)) {
    $pdf->Output();
}
Exemplo n.º 3
0
?>
</table>
<?php 
if (!$Error) {
    $rank->read();
    $data = $rank->getData();
    $NumDist = $data['meta']['numDist'];
    $curEvent = '';
    if (count($data['sections']) > 0) {
        print '<form name="Frm" method="post" action="">' . "\n";
        if (isset($_REQUEST['EventCode'])) {
            print '<input type="hidden" name="EventCode" value="' . $_REQUEST['EventCode'] . '">' . "\n";
        }
        foreach ($data['sections'] as $section) {
            $Colonne = 8 + $NumDist;
            $PercPunti = NumFormat(55 / ($NumDist + 3));
            print '<table class="Tabella">' . "\n";
            print '<tr class="Divider"><td colspan="' . $Colonne . '"></td></tr>' . "\n";
            print '<tr><th class="Title" colspan="' . $Colonne . '">' . $section['meta']['descr'] . ' (' . $section['meta']['event'] . ')</th></tr>';
            print '<tr>';
            print '<th width="5%">' . get_text('Rank') . '</th>';
            print '<th width="20%">' . get_text('Archer') . '</th>';
            print '<th width="20%" colspan="2">' . get_text('Country') . '</th>';
            for ($i = 1; $i <= $NumDist; ++$i) {
                print '<th width="8%">Score ' . $i . '</th>';
            }
            print '<th width="8%">' . get_text('Total') . '</th>';
            print '<th width="8%">G</th>';
            print '<th width="8%">X</th>';
            print '<th>' . get_text('TieArrows') . '</th>';
            print '</tr>' . "\n";
Exemplo n.º 4
0
        $pdf->Cell(30, 5, '', 0, 0, 'C', 0);
        if ($isFirstTime) {
            $pdf->Cell(30, 5, $MyRow->Data, 1, 0, 'R', 0);
        } else {
            $pdf->Cell(30, 5, '', 0, 0, 'R', 0);
        }
        $pdf->Cell(25, 5, $MyRow->Turno, 1, 0, 'R', 0);
        $pdf->Cell(30, 5, $MyRow->Accreditati, 1, 0, 'R', 0);
        $pdf->Cell(30, 5, $MyRow->Prezzo == 'NoPay' ? get_text('NoPay', 'Tournament') : $MyRow->Prezzo . " " . $pdf->writeCurrency(), 1, 0, 'R', 0);
        $pdf->Cell(45, 5, NumFormat($MyRow->Totale, 2) . " " . $pdf->writeCurrency(), 1, 1, 'R', 0);
        $TotalDay += $MyRow->Totale;
        $Total += $MyRow->Totale;
        $isFirstTime = false;
    }
    $pdf->SetFont($pdf->FontStd, '', 8);
    $pdf->Cell(30, 6, '', 0, 0, 'L', 0);
    $pdf->Cell(115, 6, get_text('Total') . " " . $OldDate, 0, 0, 'R', 0);
    $pdf->SetFont($pdf->FontStd, 'B', 8);
    $pdf->Cell(45, 6, NumFormat($TotalDay, 2) . " " . $pdf->writeCurrency(), 1, 1, 'R', 0);
    //Totale Globale
    $pdf->SetXY(10, $pdf->GetY() + 5);
    $pdf->SetFont($pdf->FontStd, '', 8);
    $pdf->Cell(30, 6, '', 0, 0, 'L', 0);
    $pdf->Cell(115, 6, get_text('Total'), 1, 0, 'R', 1);
    $pdf->SetFont($pdf->FontStd, 'B', 8);
    $pdf->Cell(45, 6, NumFormat($Total, 2) . " " . $pdf->writeCurrency(), 1, 1, 'R', 0);
    safe_free_result($Rs);
}
if (!isset($isCompleteResultBook)) {
    $pdf->Output();
}
Exemplo n.º 5
0
            ?>
</td>
<td class="Title" width="5%"><?php 
            print get_text('Div');
            ?>
</td>
<td class="Title" width="5%"><?php 
            print get_text('Cl');
            ?>
</td>
<td class="Title" width="5%"><?php 
            print get_text('Country');
            ?>
</td>
<?php 
            $PercPunti = NumFormat(45 / ($RowTour->TtNumDist + 5));
            for ($i = 1; $i <= $RowTour->TtNumDist; ++$i) {
                print '<td class="Title" width="' . $PercPunti . '%"><a class="LinkRevert" href="javascript:ChangeDist(' . $i . ',\'OK\');">Score (' . $i . ')</a></td>';
                if ($i == $_REQUEST['x_Dist'] || $_REQUEST['x_Dist'] == -1) {
                    print '<td class="Title" width="' . $PercPunti . '%"><a class="LinkRevert" href="javascript:ChangeGoldXNine(\'OK\');">' . $RowTour->TtGolds . ' (' . $i . ')</a></td>';
                    print '<td class="Title" width="' . $PercPunti . '%"><a class="LinkRevert" href="javascript:ChangeGoldXNine(\'OK\');">' . $RowTour->TtXNine . ' (' . $i . ')</a></td>';
                }
            }
            ?>
<td class="Title" width="<?php 
            print $PercPunti;
            ?>
%">Score</td>
<td class="Title" width="<?php 
            print $PercPunti;
            ?>
Exemplo n.º 6
0
 /*print '<pre>';
 		print_r($data);
 		print '</pre>';exit;*/
 $NumDist = 0;
 if (array_key_exists('numDist', $data['meta'])) {
     $NumDist = $data['meta']['numDist'];
 }
 $curEvent = '';
 if (count($data['sections']) > 0) {
     print '<form name="Frm" method="post" action="">' . "\n";
     if (isset($_REQUEST['EventCode'])) {
         print '<input type="hidden" name="EventCode" value="' . $_REQUEST['EventCode'] . '">' . "\n";
     }
     foreach ($data['sections'] as $section) {
         $Colonne = 8 + $NumDist;
         $PercPunti = NumFormat(40 / ($NumDist + 3));
         print '<table class="Tabella">' . "\n";
         print '<tr class="Divider"><td colspan="' . $Colonne . '"></td></tr>' . "\n";
         print '<tr><th class="Title" colspan="' . $Colonne . '">' . $section['meta']['descr'] . ' (' . $section['meta']['event'] . ')</th></tr>';
         print '<tr>';
         print '<th width="5%">' . get_text('Rank') . '</th>';
         print '<th width="20%">' . get_text('Archer') . '</th>';
         print '<th width="20%" colspan="2">' . get_text('Country') . '</th>';
         for ($i = 1; $i <= $NumDist; ++$i) {
             print '<th width="' . $PercPunti . '%">Score' . ($NumDist == 0 ? '' : ' ' . $i) . '</th>';
         }
         print '<th width="' . $PercPunti . '%">' . get_text('Total') . '</th>';
         print '<th width="' . $PercPunti . '%">G</th>';
         print '<th width="' . $PercPunti . '%">X</th>';
         print '<th>' . get_text('TieArrows') . '</th>';
         print '</tr>' . "\n";
Exemplo n.º 7
0
$RsSel = safe_r_sql($Select);
if (safe_num_rows($RsSel) > 0) {
    while ($Row = safe_fetch($RsSel)) {
        $ComboCl .= '<option value="' . $Row->ClId . '">' . $Row->ClId . '</option>' . "\n";
    }
}
$ComboCl .= '</select>' . "\n";
// qui l'elenco dei prezzi
$Select = "SELECT AccPrice.*,ToCurrency FROM AccPrice " . "LEFT JOIN Tournament on ToId=APTournament " . "WHERE APTournament=" . StrSafe_DB($_SESSION['TourId']) . " " . "ORDER BY APId ASC ";
$Rs = safe_r_sql($Select);
//	print $Select;
if (safe_num_rows($Rs) > 0) {
    while ($MyRow = safe_fetch($Rs)) {
        print '<tr id="Row_' . $MyRow->APDivClass . '">';
        print '<td class="Center" colspan="2">' . $MyRow->APDivClass . '</td>';
        print '<td class="Right">' . NumFormat($MyRow->APPrice, 2) . '&nbsp;' . $MyRow->ToCurrency . '</td>';
        print '<td class="Center"><a href="javascript:DeletePrice(\'' . $MyRow->APDivClass . '\');"><img src="' . $CFG->ROOT_DIR . 'Common/Images/drop.png" border="0" alt="#" title="#"></a></td>';
        print '</tr>' . "\n";
    }
}
print '<tr id="RowDiv" class="Divider"><td colspan="4"></td></tr>' . "\n";
print '<tr><td colspan="4" class="Center">' . get_text('PressCtrl2SelectAll') . '</td></tr>' . "\n";
print '<tr id="NewRow">' . "\n";
print '<td class="Center" valign="top">' . $ComboDiv . '<br><br><a class="Link" href="javascript:SelectAllOpt(\'New_Division\');">' . get_text('SelectAll') . '</a></td>' . "\n";
print '<td class="Center" valign="top">' . $ComboCl . '<br><br><a class="Link" href="javascript:SelectAllOpt(\'New_Class\');">' . get_text('SelectAll') . '</a></td>' . "\n";
print '<td class="Center" valign="top"><input type="text" name="New_Price" id="New_Price" size="5" maxlength="10"></td>';
print '<td class="Center" valign="top">';
print '<input type="button" name="Command" id="Command" value="' . get_text('CmdSave') . '" onclick="javascript:AddPrice();">';
print '</td>';
print '</tr>' . "\n";
?>
Exemplo n.º 8
0
    if ($SetRap == 1) {
        // 		$Select
        // 			= "SELECT SUM(APPrice) AS Quanto "
        // 			. "FROM "
        // 			. "Entries INNER JOIN AccEntries ON EnId=AEId AND EnPays=1 AND EnTournament=AETournament AND EnTournament= " . StrSafe_DB($_SESSION['TourId']) . " "
        // 			. "INNER JOIN AccPrice ON CONCAT(EnDivision,EnClass) LIKE APDivClass AND APTournament= " . StrSafe_DB($_SESSION['TourId']) . " AND AERapp='1' "
        // 			. "WHERE EnTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND AEOperation=" . StrSafe_DB($_SESSION['AccOp']) . " AND AEFromIP=INET_ATON(" . StrSafe_DB($_SERVER['REMOTE_ADDR']) .") ";
        // il conto vale solo per l'accredito (Operazione 1)
        $Select = "SELECT SUM(APPrice) AS Quanto, ToCurrency " . "FROM " . "Entries INNER JOIN AccEntries ON EnId=AEId AND EnPays=1 AND EnTournament=AETournament AND EnTournament= " . StrSafe_DB($_SESSION['TourId']) . " " . "INNER JOIN AccPrice ON CONCAT(EnDivision,EnClass) LIKE APDivClass AND APTournament= " . StrSafe_DB($_SESSION['TourId']) . " AND AERapp='1' " . "LEFT JOIN Tournament on EnTournament=ToID " . "WHERE EnTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND AEOperation='1' AND AEFromIP=INET_ATON(" . StrSafe_DB($_SERVER['REMOTE_ADDR'] == '::1' ? '127.0.0.1' : $_SERVER['REMOTE_ADDR']) . ") " . "GROUP BY ToId ";
        $Rs = safe_r_sql($Select);
        //print $Select;exit;
        if (safe_num_rows($Rs) == 1) {
            $Euro = NumFormat(0, 2);
            $row = safe_fetch($Rs);
            if (!is_null($row->Quanto)) {
                $Euro = NumFormat($row->Quanto, 2);
            }
            $StrConto = get_text('Bill', 'Tournament') . ': ' . $Euro . '&nbsp;' . $row->ToCurrency;
        }
    }
}
$ONLOAD = ' onLoad="javascript:document.Frm.bib.focus()"';
$JS_SCRIPT = array('<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Accreditation/Fun_JS.js"></script>', '<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Common/Fun_JS.inc.js"></script>');
include 'Common/Templates/head.php';
$Counter = "SELECT\r\n\t\t\tSUM(IF(AEOperation IS NULL,0,1)) as Presenti,\r\n\t\t\tSUM(IF(EnStatus=7,0,IF(AEOperation IS NULL,1,0))) as Assenti,\r\n\t\t\tSUM(IF(EnStatus=7,1,0)) as NonAccreditati,\r\n\t\t\tCOUNT(*) as Totale\r\n\t\t\tFROM Entries\r\n\t\t\tINNER JOIN Qualifications ON EnId=QuId AND EnTournament=" . StrSafe_DB($_SESSION['TourId']) . "\r\n\t\t\tLEFT JOIN AccEntries ON EnId=AEId AND EnTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND AEOperation=" . StrSafe_DB($_SESSION['AccOp']) . "\r\n\t\t\tLEFT JOIN Photos ON EnId=PhEnId WHERE QuSession IN (" . $Turni . ")";
$Rs = safe_r_sql($Counter);
$MyRowCounter = safe_fetch($Rs);
?>
<form name="Frm" method="get" action="">
<table class="Tabella">
    <tr>
Exemplo n.º 9
0
            $cur = $MyRow->ToCurrency;
        }
        print '<tr>';
        print '<td>' . $MyRow->EnCode . '</td>';
        print '<td>' . $MyRow->EnFirstName . ' ' . $MyRow->EnName . '</td>';
        print '<td>' . $MyRow->CoCode . ' - ' . $MyRow->CoName . '</td>';
        print '<td class="Center">' . $MyRow->EnDivision . '</td>';
        print '<td class="Center">' . $MyRow->EnClass . '</td>';
        print '<td class="Right">' . ($MyRow->EnPays == 1 ? NumFormat($MyRow->APPrice, 2) : NumFormat(0, 2)) . '&nbsp;' . $MyRow->ToCurrency . '</td>';
        print '</tr>' . "\n";
        $Tot += $MyRow->EnPays == 1 ? $MyRow->APPrice : 0;
    }
    print '<tr>';
    print '<td class="Bold" colspan="2">' . $_SESSION['TourWhere'] . ', ' . date(get_text('DateFmt')) . '</td>';
    print '<td class="Bold Right" colspan="3">' . get_text('Total') . '</td>';
    print '<td class="Bold Right">' . NumFormat($Tot, 2) . '&nbsp;' . $cur . '</td>';
    print '</tr>' . "\n";
}
?>
<tr class="Divider"><td colspan="11"></td></tr>
<tr><td class="Center" colspan="11"><input class="noPrint" type="button" value="<?php 
echo get_text('Close');
?>
" onClick="javascript:window.close();"></td></tr>
<tr><td class="Center" colspan="11"><input class="noPrint" type="button" value="<?php 
echo get_text('CmdPrintBill', 'Tournament');
?>
" onClick="javascript:window.print();"></td></tr>
</table>
<?php 
include 'Common/Templates/tail-popup.php';