function buylogs() { global $ir, $c, $userid, $db, $us; print "\r\n\r\n<div class='generalinfo_txt'>\r\n<div><img src='images/info_left.jpg' alt='' /></div>\r\n<div class='info_mid'><h2 style='padding-top:10px;'> Sales Log</h2></div>\r\n<div><img src='images/info_right.jpg' alt='' /></div> </div>\r\n<div class='generalinfo_simple'><br> <br><br>\r\n\r\n\r\n<table align=center class=table width=500>\r\n<tr><th>Date</th><th>Buyer</th><th>Item</th><th>Sale Price</th>"; $getlogs = $db->query("select * from usershoplogs where seller={$userid} order by date desc") or die(mysql_error()); while ($log = mysql_Fetch_array($getlogs)) { $date = date('F j, Y g:i:s a', $log['date']); $getbuyer = $db->query("select * from users where userid={$log['buyer']}"); $buy = mysql_fetch_array($getbuyer); print "<tr><td>{$date}</td><td align=center><a href=viewuser.php?u={$buy['userid']}>{$buy['username']}</a></td><td align=center>{$log['item']} x{$log['quantity']}</td><td align=center>\${$log['price']}</td></tr>"; } print "</table></div><div><img src='images/generalinfo_btm.jpg' alt='' /></div><br></div></div></div></div></div><center><br><br><a href=\"javascript: history.go(-1)\">Click here to go back</a></center>"; }
function DisplayParameterForm() { global $rsParameters; global $iQueryID; global $aErrorText; global $cnInfoCentral; //Start the form and the table echo '<form method="post" action="QueryView.php?QueryID=' . $iQueryID . '">'; echo '<table align="center" cellpadding="5" cellspacing="1" border="0">'; //Loop through the parameters and display an entry box for each one if (mysql_num_rows($rsParameters)) { mysql_data_seek($rsParameters, 0); } while ($aRow = mysql_fetch_array($rsParameters)) { extract($aRow); //Begin the row, giving the name of the parameter echo "<tr>"; echo "<td class=\"LabelColumn\">" . $qrp_Name . ":</td>"; //Determine the type of parameter we're dealing with switch ($qrp_Type) { //Standard INPUT box case 0: //Begin the table cell, disoplay the INPUT tag, close the table cell echo "<td class=\"TextColumn\">"; echo "<input size=\"" . $qrp_InputBoxSize . "\" name=\"" . $qrp_Alias . "\" type=\"text\" value=\"" . $qrp_Default . "\">"; echo "</td>"; break; //SELECT box with OPTION tags supplied in the queryparameteroptions_qpo table //SELECT box with OPTION tags supplied in the queryparameteroptions_qpo table case 1: //Get the query parameter options for this parameter $sSQL = "SELECT * FROM queryparameteroptions_qpo WHERE qpo_qrp_ID = " . $qrp_ID; $rsParameterOptions = RunQuery($sSQL); //Begin the table cell and the SELECT tag echo "<td class=\"TextColumn\">"; echo "<select name=\"" . $qrp_Alias . "\">"; //Loop through the parameter options while ($ThisRow = mysql_Fetch_array($rsParameterOptions)) { extract($ThisRow); //Display the OPTION tag echo "<option value=\"" . $qpo_Value . "\">" . $qpo_Display . "</option>"; } //Close the SELECT tag and table cell echo "</select>"; echo "</td>"; break; //SELECT box with OPTION tags provided via a SQL query //SELECT box with OPTION tags provided via a SQL query case 2: //Run the SQL to get the options $rsParameterOptions = RunQuery($qrp_OptionSQL); echo "<td class=\"TextColumn\">"; echo "<select name=\"" . $qrp_Alias . "\">"; while ($ThisRow = mysql_Fetch_array($rsParameterOptions)) { extract($ThisRow); echo "<option value=\"" . $Value . "\">" . $Display . "</option>"; } //Close the SELECT tag and table cell echo "</select>"; echo "</td>"; break; } //Display the query description and close the row echo "<td valign=\"top\" class=\"SmallText\">" . $qrp_Description . "</td>"; echo "</tr>"; //If we are re-rendering this form due to a validation error, display the error if (isset($aErrorText[$qrp_Alias])) { echo "<tr><td colspan=\"3\" style=\"color: red;\">" . $aErrorText[$qrp_Alias] . "</td></tr>"; } } ?> <td colspan="3" align="center"> <br> <input class="icButton" type="Submit" value="<?php echo gettext("Execute Query"); ?> " name="Submit"> </p> </table> </form> <?php }
function meeting_get_disciplines() { global $athlete_id, $cfgDisciplineType, $cfgEventType, $strEventTypeSingleCombined, $strEventTypeClubCombined, $strDiscTypeTrack, $strDiscTypeTrackNoWind, $strDiscTypeRelay, $strDiscTypeDistance, $discs_def, $combs_def, $first, $catcode, $birth_date, $athletesex; $combs_def = array(); // delete the selected disziplines from previous enrolement $order = "ASC"; if ($athletesex == 'w') { $order = "DESC"; } $sql = "SELECT\r\n d.Kurzname as DiszKurzname\r\n , d.Typ as DiszTyp\r\n , w.xWettkampf\r\n , w.Typ\r\n , k.Kurzname as KatKurzname\r\n , k.Name\r\n , d.Code as DiszCode\r\n , k.Code as KatCode\r\n , k.xKategorie\r\n , w.Info\r\n , w.Mehrkampfcode\r\n , k.Geschlecht\r\n , k.Alterslimite\r\n FROM\r\n disziplin_" . $_COOKIE['language'] . " AS d\r\n LEFT JOIN wettkampf as w ON (w.xDisziplin = d.xDisziplin)\r\n LEFT JOIN kategorie as k ON (w.xKategorie = k.xKategorie)\r\n WHERE \r\n w.xMeeting = " . $_COOKIE['meeting_id'] . " \r\n ORDER BY\r\n k.Geschlecht {$order}, k.Alterslimite, k.Kurzname, w.Mehrkampfcode, d.Anzeige"; $result = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg("Line " . __LINE__ . ": " . mysql_errno() . ": " . mysql_error()); } $i = 0; $d = 0; $k = 0; $last_cat = ""; $comb = 0; $combCat = 0; $combDiv = ""; // fetch all rows and put the disciplines of the entry category on top $event_rows = array(); $temp_rows = array(); // get age of athlete $age = 0; $currYear = date('Y'); $age = $currYear - substr($birth_date, 0, 4); $first = true; while ($event_row = mysql_fetch_row($result)) { $first = false; if ($catcode != '' && $event_row[8] == $catcode || $event_row[12] == $age && $event_row[11] == $athletesex) { $event_rows[] = $event_row; } elseif ($event_row[12] > $age && $event_row[11] == $athletesex) { if (sizeof($event_rows) == 0) { $event_rows[] = $event_row; } else { if (in_array($event_row[7], $event_rows[0])) { $event_rows[] = $event_row; } } } } $kName = $event_rows[0][4]; $sql = "SELECT DISTINCT\r\n d.Kurzname as DiszKurzname\r\n , d.Typ as DiszTyp\r\n , w.xWettkampf\r\n , w.Typ\r\n , k.Kurzname as KatKurzname\r\n , k.Name\r\n , d.Code as DiszCode\r\n , k.Code as KatCode\r\n , k.xKategorie\r\n , w.Info\r\n , w.Mehrkampfcode\r\n , k.Geschlecht\r\n , k.Alterslimite \r\n FROM\r\n disziplin_" . $_COOKIE['language'] . " AS d \r\n LEFT JOIN wettkampf as w ON (w.xDisziplin = d.xDisziplin) \r\n LEFT JOIN kategorie as k ON (w.xKategorie = k.xKategorie)\r\n WHERE \r\n w.xMeeting = " . $_COOKIE['meeting_id'] . " \r\n ORDER BY\r\n k.Geschlecht " . $order . ", k.Alterslimite DESC, k.Kurzname, w.Mehrkampfcode, d.Anzeige"; $result = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg("Line " . __LINE__ . ": " . mysql_errno() . ": " . mysql_error()); } while ($event_row = mysql_fetch_row($result)) { if ($event_row[4] != $kName) { $event_rows[] = $event_row; } } // display list of events // while ($event_row = mysql_fetch_row($result)) foreach ($event_rows as $event_row) { if ($last_cat != $event_row[4]) { // new row with title for separating categories $k++; // cat counter if ($comb > 0) { echo "</table></div></td>"; $comb = 0; } if ($last_cat != "") { printf("</tr>"); echo "</table></div>\n"; } echo "<div id='place{$k}'><table id='cat{$event_row['8']}'>\n"; printf("<tr><td colspan=6 class='cat'>{$event_row['5']}</td></tr><tr>"); $last_cat = $event_row[4]; $d = 0; } else { if ($d % 3 == 0) { // new row after three events if ($i != 0) { printf("</tr>"); // terminate previous row } $i++; printf("<tr>\n"); } } $class = 'meter'; if ($event_row[1] == $cfgDisciplineType[$strDiscTypeTrack] || $event_row[1] == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $event_row[1] == $cfgDisciplineType[$strDiscTypeRelay] || $event_row[1] == $cfgDisciplineType[$strDiscTypeDistance]) { $class = 'time'; } // // get performance from base data if searched for an athlete // $effort = 0; if ($athlete_id > 0) { $saison = $_SESSION['meeting_infos']['Saison']; if ($saison == '') { $saison = "O"; //if no saison is set take outdoor } $sql = "\r\n\t\t\t\tSELECT \r\n\t\t\t\t\tseason_effort, notification_effort \r\n\t\t\t\tFROM\r\n\t\t\t\t\tbase_performance\r\n\t\t\t\tWHERE\tid_athlete = {$athlete_id}\r\n\t\t\t\tAND\tdiscipline = " . $event_row[6] . "\r\n\t\t\t\tAND season = '{$saison}'"; $res = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg("Line " . __LINE__ . ": " . mysql_errno() . ": " . mysql_error()); echo $sql; } else { $rowPerf = mysql_fetch_array($res); $effort = $rowPerf['notification_effort']; // best effort current or previous year (Indoor: best of both / Outdoor: best of outdoor) } } $effort = ltrim($effort, "0:"); // // merge the disciplines for a combined event // if ($event_row[3] == $cfgEventType[$strEventTypeSingleCombined]) { $d = 1; if ($comb != $event_row[10]) { if ($comb > 0) { echo "</table></div>"; echo "</td></tr><tr>"; } $comb = $event_row[10]; $combCat = $event_row[8]; $comb_res = mysql_query("SELECT Name FROM disziplin_" . $_COOKIE['language'] . " WHERE Code = {$comb}"); $comb_row = mysql_Fetch_array($comb_res); global $AthReg; global $arr_checkedCombs; if ($AthReg) { if (in_array($event_row[2], $arr_checkedCombs)) { $checked = ' checked="checked"'; } else { $checked = ' '; } } else { $checked = isset($combs_def[$event_row[8] . "_" . $comb]) ? ' checked="checked"' : ''; } $val = isset($combs_def[$event_row[8] . "_" . $comb]) ? $combs_def[$event_row[8] . "_" . $comb] : ''; //get performance from base ----------------------------------------------------------------------- if ($val == '') { //dont overwrite value ... no guess what can be stored in $val before.. ***SBA*** $sql = "\r\n\t\t\t\t\t\tSELECT \r\n\t\t\t\t\t\t\tseason_effort, notification_effort \r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\tbase_performance\r\n\t\t\t\t\t\tWHERE\tid_athlete = {$athlete_id}\r\n\t\t\t\t\t\tAND\tdiscipline = " . $comb . "\r\n\t\t\t\t\t\tAND season = '{$saison}'"; $res_perf_comb = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg("Line " . __LINE__ . ": " . mysql_errno() . ": " . mysql_error()); echo $sql; } else { $row_perf_comb = mysql_fetch_array($res_perf_comb); $val = $row_perf_comb['notification_effort']; // best effort current or previous year (Indoor: best of both / Outdoor: best of outdoor) // $seasonval = $row_perf_comb['season_effort']; // base_performance feld wird von alabus noch defniniert im 2012 $seasonval = 0; $val = ltrim($val, "0:"); $val = substr($val, -2) == ".0" ? substr($val, 0, -2) : $val; $seasonval = ltrim($seasonval, "0:"); $seasonval = substr($seasonval, -2) == ".0" ? substr($seasonval, 0, -2) : $seasonval; } } //-------------------------------------------------------------------------------------------------- ?> <td class='dialog-top' nowrap="nowrap" id="topperftd<?php echo $combCat . $comb; ?> "> <input type="checkbox" value="<?php echo $event_row[8] . "_" . $comb; ?> " name="combined[]" id="combinedCheck<?php echo $event_row[8]; ?> _<?php echo $comb; ?> " onclick="check_combined('<?php echo $event_row[8] . "_" . $comb; ?> ', this); validate_discipline(<?php echo "'" . $combCat . $comb . "', '" . $event_row[11] . "', " . $event_row[12]; ?> ,this.checked);"<?php echo $checked; ?> > <?php echo $comb_row['Name']; ?> </td> <td class='dialog-top' nowrap="nowrap"> <input type="text" name="topcomb_<?php echo $event_row[8] . "_" . $comb; ?> " id="topcomb<?php echo $event_row[8] . "_" . $comb; ?> " size="5" value="<?php echo $val; ?> "> <input type="hidden" name="hidden_topcomb_<?php echo $event_row[8] . "_" . $comb; ?> " id="hidden_topcomb<?php echo $event_row[8] . "_" . $comb; ?> " value="<?php echo $seasonval; ?> "> </td> <td class='dialog' nowrap="nowrap" colspan="4" id='td_<?php echo $event_row[8] . "_" . $comb; ?> '> <div id="div_<?php echo $event_row[8]; ?> _<?php echo $comb; ?> " style="position: relative; display: none;"> <?php if ($checked == ' checked="checked"') { ?> <script type="text/javascript"> check_combined('<?php echo $event_row[8]; ?> _<?php echo $comb; ?> ', document.getElementById('combinedCheck<?php echo $event_row[8]; ?> _<?php echo $comb; ?> ')); validate_discipline('<?php echo $combCat; echo $comb; ?> ', '<?php echo $event_row[11]; ?> ', <?php echo $event_row[12]; ?> ,this.checked); </script> <?php } ?> <table> <?php } $effort = isset($discs_def[$event_row[2]]) && $effort == '' ? $discs_def[$event_row[2]] : $effort; // create text nodes for adding with javascript echo "<tr><td class='dialog'>\r\n\t\t\t\t\t<input name='start_{$event_row['2']}' type='checkbox' id='start{$event_row['2']}'\r\n\t\t\t\t\t\t\t\tvalue='start_{$event_row['0']}' checked/>\r\n\t\t\t\t\t\t\t\t{$event_row['0']}\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class='forms' nowrap=\"nowrap\">\r\n\t\t\t\t\t<input type=\"hidden\" name=\"eventscombtemp[]\" value=\"{$event_row['2']}\">\r\n\t\t\t\t\t<input class='perf{$class}' type=\"text\" name=\"topperf_{$event_row['2']}\" value='{$effort}'\r\n\t\t\t\t\t\tid='topperf{$event_row['2']}' >\r\n\t\t\t\t\t<input name='type_{$event_row['2']}' type='hidden' value='{$class}' />\r\n\t\t\t\t</td></tr>\n"; } else { if ($comb > 0) { echo "</table></div>"; $comb = 0; } global $AthReg; global $arr_checkedDisc; if ($AthReg) { if (in_array($event_row[2], $arr_checkedDisc)) { $checked = ' checked="checked"'; } else { $checked = ' '; } } else { $checked = isset($discs_def[$event_row[2]]) && $first != '' ? ' checked="checked"' : ''; } $info = strlen($event_row[9]) == 0 ? "" : "(" . $event_row[9] . ")"; ?> <td class="dialog-top" nowrap="nowrap" id='topperftd<?php echo $event_row[2]; ?> '> <input name='start_<?php echo $event_row[2]; ?> ' type='hidden' id='start<?php echo $event_row[2]; ?> ' value='start_<?php echo $event_row[0]; ?> '/> <input name='events[]' type='checkbox' value='<?php echo $event_row['2']; ?> ' onclick="validate_discipline(<?php echo $event_row[2] . ',\'' . $event_row[11] . '\',' . $event_row[12] . ','; ?> this.checked)" <?php echo $checked; ?> /><?php echo $event_row[0] . $info; ?> </td> <?php $effort = isset($discs_def[$event_row[2]]) && $effort == '' && $first != '' ? $discs_def[$event_row[2]] : $effort; printf("<td class=\"dialog-top\" nowrap=\"nowrap\">\r\n\t\t\t\t<input name='type_{$event_row['2']}' type='hidden' value='{$class}' />\r\n\t\t\t\t<input class='perf{$class}' name='topperf_{$event_row['2']}' type='text'\r\n\t\t\t\tvalue='{$effort}' maxlength='12' id='topperf{$event_row['2']}' /></td>"); $d++; } // end if not combiend } // end loop if ($comb > 0) { echo "</table></div></td>"; } echo "</tr></table></div>\n"; echo $combDiv; mysql_free_result($result); }
</div> <div class="col-lg-4"> <div class="panel panel-primary text-center no-boder"> <div class="panel-footer"> <i class="fa fa-bar-chart-o fa-3x"></i><br/> <span class="panel-eyecandy-title">Online Kullanıcılar </span> </div> <div class="panel-body blue"> <?php $sayac = 0; $aktif_sorgu = mysql_query("Select kul_adi from uyeler_adi where aktif='1' "); while ($aktif_kul = mysql_Fetch_array($aktif_sorgu)) { echo $aktif_kul['kul_adi'] . "<br/>"; $sayac++; } echo '<hr style="height:2px;border:none;color:#FFF;background-color:#444;" />'; echo "Online Kişi Sayısı= " . $sayac; ?> </div> </div> <!-- <div class="panel panel-primary text-center no-boder"> <div class="panel-body blue"> <i class="fa fa-pencil-square-o fa-3x"></i> <h3>2,060 </h3> </div>
$svm = AA_checkSVM(0, $round); // decide whether to show club or team name $cLast = 0; if ($combined) { // determine if this is the last discipline -> take combined top performance of previously made events /*$res_c = mysql_query("SELECT w.Mehrkampfende FROM wettkampf as w , runde as r WHERE r.xRunde = $round AND r.xWettkampf = w.xWettkampf");*/ $sql = "SELECT\r\n\t\t\t\t\tw.Mehrkampfende\r\n\t\t\t\tFROM\r\n\t\t\t\t\twettkampf AS w\r\n\t\t\t\tLEFT JOIN \r\n\t\t\t\t\trunde AS r USING(xWettkampf)\r\n\t\t\t\tWHERE r.xRunde " . $SqlRound . ";"; $res_c = mysql_query($sql); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $row_c = mysql_Fetch_array($res_c); $cLast = $row_c[0]; } } // No action yet if ($status == $cfgRoundStatus['open'] || $status == $cfgRoundStatus['enrolement_done']) { $btn = new GUI_Button("dlg_heat_seeding.php?round={$round}", $strHeatSeeding); $btn->printButton(); } else { if ($status == $cfgRoundStatus['enrolement_pending']) { $btn = new GUI_Button("event_enrolement.php?category=" . $presets['category'] . "&event=" . $presets['event'], $strEnrolement); $btn->printButton(); } else { if ($status == $cfgRoundStatus['heats_in_progress'] || $status == $cfgRoundStatus['heats_done']) { // add form to add new athletes/relays AA_heats_printNewStart($presets['event'], $round, "event_heats.php");
AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } } } mysql_query("UNLOCK TABLES"); } elseif ($_POST['arg'] == "teamsm_remove") { mysql_query("LOCK TABLES runde as r WRITE, wettkampf as w READ, runde WRITE, serie READ"); // if there are already rounds with groups, remove all but the one with the lowest group $res = mysql_query("SELECT r.xRunde, r.Gruppe FROM\r\n\t\t\t\trunde as r\r\n\t\t\t\t, wettkampf as w\r\n\t\t\tWHERE\r\n\t\t\t\tr.xWettkampf = w.xWettkampf\r\n\t\t\tAND\tw.xWettkampf = {$disc}\r\n\t\t\tORDER BY\r\n\t\t\t\tr.Gruppe ASC"); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if (mysql_num_rows($res) > 0) { $g = 0; $del = false; while ($row = mysql_Fetch_array($res)) { if (AA_utils_checkReference("serie", "xRunde", $row[0]) != 0) { $error = $GLOBALS['strRound'] . $GLOBALS['strErrStillUsed']; AA_printErrorMsg($error); $_POST['arg'] = ""; break; } if ($g != 0 && $g != $row[1]) { // first group over $del = true; } if ($del) { mysql_query("DELETE FROM runde WHERE xRunde = {$row['0']}"); } else { mysql_query("UPDATE runde as r SET Gruppe = '' WHERE xRunde = {$row['0']}"); }
function AA_rankinglist_Single($category, $event, $round, $formaction, $break, $cover, $biglist = false, $cover_timing = false, $date = '%', $show_efforts = 'none', $heatSeparate, $catFrom, $catTo, $discFrom, $discTo, $heatFrom, $heatTo, $athleteCat, $content_navi) { require './lib/cl_gui_page.lib.php'; require './lib/common.lib.php'; require './config.inc.php'; require './config.inc.end.php'; if (AA_connectToDB() == FALSE) { // invalid DB connection return; // abort } if (AA_checkMeetingID() == FALSE) { // no meeting selected return; // abort } $p = "./tmp"; $fp = @fopen($p . "/live" . $round . ".html", 'w'); if (!$fp) { AA_printErrorMsg($GLOBALS['strErrFileOpenFailed']); return; } // set up ranking list selection $selection = ''; $eventMerged = false; $catMerged = false; $flagSubtitle = false; $flagInfoLine1 = false; $flagInfoLine2 = false; $selectionHeats = ''; $orderAthleteCat = ''; $saison = $_SESSION['meeting_infos']['Saison']; if ($saison == '') { $saison = "O"; //if no saison is set take outdoor } if ($round > 0) { // show a specific round $eventMerged = false; $sqlEvents = AA_getMergedEventsFromEvent($event); if ($sqlEvents != '') { $selection = "w.xWettkampf IN " . $sqlEvents . " AND "; $eventMerged = true; } else { $selection = "w.xWettkampf =" . $event . " AND "; } } else { if ($category == 0) { // show all disciplines for every category $catMerged = true; } else { if ($event == 0) { // show all disciplines for a specific category $catMerged = false; $mergedCat = AA_mergedCat($category); if ($mergedCat != '') { $selection = "w.xKategorie =" . $category . " AND "; $catMerged = true; } else { $selection = "w.xKategorie =" . $category . " AND "; } } else { if ($round == 0) { // show all rounds for a specific event $eventMerged = false; $sqlEvents = AA_getMergedEventsFromEvent($event); if ($sqlEvents != '') { $selection = "w.xWettkampf IN " . $sqlEvents . " AND "; $eventMerged = true; } else { $selection = "w.xWettkampf =" . $event . " AND "; } } } } } if ($catFrom > 0) { // $getSortCat = AA_getSortCat($catFrom, $catTo); if ($getSortCat[0]) { if ($catTo > 0) { $selection = "k.Anzeige >=" . $getSortCat[$catFrom] . " AND k.Anzeige <=" . $getSortCat[$catTo] . " AND "; } else { $selection = "k.Anzeige =" . $getSortCat[$catFrom] . " AND "; } } } if ($discFrom > 0) { // $getSortDisc = AA_getSortDisc($discFrom, $discTo); if ($getSortDisc[0]) { if ($discTo > 0) { $selection .= "d.Anzeige >=" . $getSortDisc[$discFrom] . " AND d.Anzeige <=" . $getSortDisc[$discTo] . " AND "; } else { $selection .= "d.Anzeige =" . $getSortDisc[$discFrom] . " AND "; } } } if ($heatFrom > 0) { $selectionHeats = ' AND s.xSerie >= ' . $heatFrom . ' AND s.xSerie <= ' . $heatTo . ' '; } if ($athleteCat) { $orderAthleteCat = ' k1.Anzeige, '; } if ($catMerged & !$heatSeparate || $eventMerged & !$heatSeparate) { // get event rounds from DB $results = mysql_query("\r\n\tSELECT \r\n\t\tr.xRunde\r\n\t\t, k.Name\r\n\t\t, d.Name\r\n\t\t, d.Typ\r\n\t\t, w.xWettkampf\r\n\t\t, r.QualifikationSieger\r\n\t\t, r.QualifikationLeistung\r\n\t\t, w.Punkteformel\r\n\t\t, w.Windmessung\r\n\t\t, r.Speakerstatus\r\n\t\t, d.Staffellaeufer\r\n\t\t, CONCAT(DATE_FORMAT(r.Datum,'{$cfgDBdateFormat}'), ' ', TIME_FORMAT(r.Startzeit, '{$cfgDBtimeFormat}'))\r\n\t\t, w.xDisziplin \r\n\tFROM\r\n\t\tathletica.wettkampf AS w\r\n\t\tLEFT JOIN athletica.kategorie AS k ON (k.xKategorie = w.xKategorie)\r\n \t\tLEFT JOIN athletica.disziplin_" . $_COOKIE['language'] . " as d ON (d.xDisziplin = w.xDisziplin) \r\n \t\tLEFT JOIN athletica.runde AS r ON (r.xWettkampf = w.xWettkampf) \r\n\tWHERE " . $selection . "\r\n\tw.xMeeting = " . $_COOKIE['meeting_id'] . " \t\r\n\tAND (r.Status = " . $cfgRoundStatus['results_done'] . " OR r.Status = " . $cfgRoundStatus['results_in_progress'] . ") \r\n\tAND r.Datum LIKE '" . $date . "'\r\n\tORDER BY\r\n\t\tk.Anzeige\r\n\t\t, d.Anzeige\r\n\t\t, r.Datum\r\n\t\t, r.Startzeit\r\n"); } else { // heats separate $results = mysql_query("\r\n SELECT DISTINCT \r\n r.xRunde , \r\n k.Name , \r\n d.Name , \r\n d.Typ , \r\n w.xWettkampf , \r\n r.QualifikationSieger , \r\n r.QualifikationLeistung , \r\n w.Punkteformel , \r\n w.Windmessung , \r\n r.Speakerstatus , \r\n d.Staffellaeufer , \r\n CONCAT(DATE_FORMAT(r.Datum,'%d.%m.%y'), \r\n ' ', \r\n TIME_FORMAT(r.Startzeit, '%H:%i')) ,\r\n w.xDisziplin , \r\n rs.Hauptrunde \r\n FROM \r\n athletica.wettkampf AS w \r\n LEFT JOIN athletica.kategorie AS k ON (k.xKategorie = w.xKategorie) \r\n LEFT JOIN athletica.disziplin_" . $_COOKIE['language'] . " as d ON (d.xDisziplin = w.xDisziplin) \r\n LEFT JOIN athletica.runde AS r ON (r.xWettkampf = w.xWettkampf) \r\n LEFT JOIN athletica.rundenset as rs ON (r.xRunde=rs.xRunde ) \r\n WHERE \r\n " . $selection . " \r\n w.xMeeting = " . $_COOKIE['meeting_id'] . " \r\n AND (r.Status = " . $cfgRoundStatus['results_done'] . " OR r.Status = " . $cfgRoundStatus['results_in_progress'] . ") \r\n AND r.Datum LIKE '%' \r\n ORDER BY\r\n k.Anzeige\r\n , d.Anzeige\r\n , r.Datum\r\n , r.Startzeit\r\n "); } if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $limitRankSQL = ""; $limitRank = false; if ($_GET['limitRank'] == "yes") { // check if ranks are limited, but limitRankSQL will set only if export is pressed if (!empty($_GET['limitRankFrom']) && !empty($_GET['limitRankTo'])) { $limitRank = true; } } // get url $url = ''; $result = mysql_query("\r\n SELECT\r\n url\r\n FROM\r\n athletica_liveResultate.config"); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $row = mysql_fetch_row($result); $url = $row[0]; } // start a new HTML display page if ($formaction == 'view' || $formaction == 'speaker') { // display page $list = new GUI_RankingList($_COOKIE['meeting']); $list->content = $cfgHtmlStart1; if (empty($GLOBALS['cfgDir'])) { $list->content .= "<meta http-equiv='refresh' content='" . $GLOBALS['cfgMonitorReload'] . "; url=http://" . $url . "/live" . $round . ".html'>"; } else { $list->content .= "<meta http-equiv='refresh' content='" . $GLOBALS['cfgMonitorReload'] . "; url=http://" . $url . "/" . $GLOBALS['cfgDir'] . "/live" . $round . ".html'>"; } $list->content .= $cfgHtmlStart2; $list->content .= $content_navi; $list->content .= "</div ><div id='content_pc'><div id='content_pda'>"; $list->printPageTitle("{$strRankingLists} " . $_COOKIE['meeting']); } elseif ($formaction == "print") { $list = new PRINT_RankingList($_COOKIE['meeting']); if ($cover == true) { // print cover page $list->printCover($GLOBALS['strResults'], $cover_timing); } } elseif ($formaction == "exportpress") { $list = new EXPORT_RankingListPress($_COOKIE['meeting'], 'txt'); if ($limitRank) { $limitRankSQL = " AND ss.Rang <= " . $_GET['limitRankTo'] . " AND ss.Rang >= " . $_GET['limitRankFrom'] . " "; } } elseif ($formaction == "exportdiplom") { $list = new EXPORT_RankingListDiplom($_COOKIE['meeting'], 'csv'); if ($limitRank) { $limitRankSQL = " AND ss.Rang <= " . $_GET['limitRankTo'] . " AND ss.Rang >= " . $_GET['limitRankFrom'] . " "; } } // initialize variables $cat = ''; $evnt = 0; while ($row = mysql_fetch_row($results)) { // for a combined event, the rounds are merged, so jump until the next event if ($cRounds > 1) { $cRounds--; continue; } $roundSQL = "s.xRunde = {$row['0']}"; $cRounds = 0; // check page break if (is_a($list, "PRINT_RankingList") && $cat != '' && ($break == 'discipline' || $break == 'category' && $row[1] != $cat)) { $list->insertPageBreak(); } if ($row[3] == $cfgDisciplineType[$strDiscTypeTrackTrack] || $row[3] == $cfgDisciplineType[$strDiscTypeTrackNoWind] || $row[3] == $cfgDisciplineType[$strDiscTypeRelay]) { $eval = $cfgEvalType[$strEvalTypeHeat]; } else { $eval = $cfgEvalType[$strEvalTypeAll]; } $roundName = ''; $type = ''; $res = mysql_query("\r\n\t\t\tSELECT\r\n rt.Name\r\n , rt.Typ\r\n , rt.Wertung\r\n FROM\r\n athletica.runde\r\n LEFT JOIN athletica.rundentyp_" . $_COOKIE['language'] . " AS rt ON (rt.xRundentyp = runde.xRundentyp)\r\n WHERE \r\n runde.xRunde = {$row['0']} \r\n\t\t"); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if (mysql_num_rows($res) > 0) { $row_rt = mysql_fetch_row($res); if ($row_rt[1] == '0') { $type = " "; $row_rt[0] = ''; } else { $type = $row_rt[0] . " "; } $eval = $row_rt[2]; if ($round != 0) { // specific round selected $roundName = $row_rt[0]; } } mysql_free_result($res); } if ($evnt != $row[4]) { // if this is a combined event, dont fragment list by rounds $combined = AA_checkCombined($row[4]); // not selectet a specific round if ($round == 0 && $combined) { $res_c = mysql_query("SELECT \r\n\t\t\t\t\t\t\t\tr.xRunde\r\n\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t\tathletica.wettkampf as w\r\n\t\t\t\t\t\t\t\t LEFT JOIN athletica.runde as r ON (r.xWettkampf = w.xWettkampf)\r\n\t\t\t\t\t\t\tWHERE\tw.xWettkampf = " . $row[4]); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $cRounds = mysql_num_rows($res_c); $roundSQL = "s.xRunde IN ("; while ($row_c = mysql_Fetch_array($res_c)) { $roundSQL .= $row_c[0] . ","; } $roundSQL = substr($roundSQL, 0, -1) . ")"; } } // set up category and discipline title information $flagSubtitle = true; // set flag to print the subtitle later if ($formaction == 'speaker' && AA_getNextRound($row[4], $row[0]) == 0) { // last round: show ceremony status $list->printCeremonyStatus($row[0], $row[9]); } // print qualification mode if round selected $info = ''; if ($round > 0 && ($row[5] > 0 || $row[6] > 0)) { //$info = $GLOBALS['strQualification'] .": " // . $row[5] . " " . $GLOBALS['$strQualifyTop'] .", " // . $row[6] . " " . $GLOBALS['strQualifyPerformance']; $info = "{$strQualification}: " . $row[5] . " {$strQualifyTop}, " . $row[6] . " {$strQualifyPerformance}"; $flagInfoLine1 = true; // set flag to print later the qualification mode if round selected $info_save1 = $info; //$list->printInfoLine($info); $qual_mode = TRUE; } // print qualification descriptions if required $info = ''; if ($row[5] > 0 || $row[6] > 0) { //foreach($GLOBALS['cfgQualificationType'] as $qt) foreach ($cfgQualificationType as $qt) { $info = $info . $qt['token'] . " =" . $qt['text'] . " "; } $flagInfoLine2 = true; // set flag to print later the qualification descriptions if required $info_save2 = $info; //$list->printInfoLine($info); $qual_mode = TRUE; } $evnt = $row[4]; // keep event ID //$roundM = $row[13]; } // ET new event //else { // if ($roundM!=$row[13]){ // set up subtitle when merged round are separated // $flagSubtitle=true; // set flag to print the subtitle later // } //} $relay = AA_checkRelay($row[4]); // check, if this is a relay event $svm = AA_checkSVM($row[4]); // If round evaluated per heat, group results accordingly $order_heat = ""; if ($eval == $cfgEvalType[$strEvalTypeHeat]) { // eval per heat $order_heat = "heatid, "; } $valid_result = ""; // Order performance depending on discipline type if ($row[3] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[3] == $cfgDisciplineType[$strDiscTypeThrow]) { $order_perf = "DESC"; } else { if ($row[3] == $cfgDisciplineType[$strDiscTypeJump]) { if ($row[8] == 1) { // with wind $order_perf = "DESC, r.Info ASC"; } else { // without wind $order_perf = "DESC"; } } else { if ($row[3] == $cfgDisciplineType[$strDiscTypeHigh]) { $order_perf = "DESC"; $valid_result = " AND (r.Info LIKE '%O%'" . " OR r.Leistung < 0)"; } else { $order_perf = "ASC"; } } } $sqlSeparate = ''; if (($catMerged || $eventMerged) & $heatSeparate) { if ($row[0] > 0 && $row[13] != NULL) { $roundSQL = ''; if (empty($limitRankSQL) && empty($valid_result)) { $sqlSeparate = " ss.RundeZusammen = " . $row[0]; } else { if (empty($limitRankSQL)) { $valid_result = substr($valid_result, 4, strlen($valid_result)); } elseif (empty($valid_result)) { $limitRankSQL = substr($limitRankSQL, 4, strlen($limitRankSQL)); } $sqlSeparate = " AND ss.RundeZusammen = " . $row[0]; } } } // get all results ordered by ranking; for invalid results (Rang=0), the // rank is set to max_rank to put them to the end of the list. $max_rank = 999999999; $sql_leistung = $order_perf == 'ASC' ? "r.Leistung" : "IF(r.Leistung<0, (If(r.Leistung = -99, -9, (If (r.Leistung = -98, -8,r.Leistung))) * -1), r.Leistung)"; $order = $order_heat; if ($relay == FALSE) { if ($athleteCat) { $order = $orderAthleteCat . $order_heat; } $query = "SELECT ss.xSerienstart, \r\n\t\t\t\t\t\t\t IF(ss.Rang=0, {$max_rank}, ss.Rang) AS rank, \r\n\t\t\t\t\t\t\t ss.Qualifikation, \r\n\t\t\t\t\t\t\t " . $sql_leistung . " AS leistung_neu, \r\n\t\t\t\t\t\t\t r.Info, \r\n\t\t\t\t\t\t\t s.Bezeichnung, \r\n\t\t\t\t\t\t\t s.Wind, \r\n\t\t\t\t\t\t\t r.Punkte, \r\n\t\t\t\t\t\t\t IF('" . $svm . "', t.Name, IF(a.Vereinsinfo = '', v.Name, a.Vereinsinfo)), \r\n\t\t\t\t\t\t\t at.Name, \r\n\t\t\t\t\t\t\t at.Vorname, \r\n\t\t\t\t\t\t\t at.Jahrgang, \r\n\t\t\t\t\t\t\t LPAD(s.Bezeichnung, 5, '0') AS heatid, \r\n\t\t\t\t\t\t\t IF(at.xRegion = 0, at.Land, re.Anzeige) AS Land, \r\n\t\t\t\t\t\t\t at.xAthlet, \r\n\t\t\t\t\t\t\t ru.Datum, \r\n\t\t\t\t\t\t\t ru.Startzeit ,\r\n\t\t\t\t\t\t\t ss.RundeZusammen,\r\n\t\t\t\t\t\t\t ru.xRunde, \r\n\t\t\t\t\t\t\t k.Name , \r\n\t\t\t\t\t\t\t k1.Name , \t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t k1.Anzeige ,\r\n ss.Bemerkung ,\r\n w.Punkteformel,\r\n w.info,\r\n a.Startnummer \r\n\t\t\t\t\t\tFROM athletica.serie AS s USE INDEX(Runde)\r\n\t\t\t\t LEFT JOIN athletica.serienstart AS ss USING(xSerie) \r\n\t\t\t\t LEFT JOIN athletica.resultat AS r USING(xSerienstart) \r\n\t\t\t\t LEFT JOIN athletica.start AS st ON(ss.xStart = st.xStart) \r\n\t\t\t\t LEFT JOIN athletica.anmeldung AS a USING(xAnmeldung) \r\n\t\t\t\t LEFT JOIN athletica.athlet AS at USING(xAthlet) \r\n\t\t\t\t LEFT JOIN athletica.verein AS v USING(xVerein) \r\n\t\t\t\t LEFT JOIN athletica.region AS re ON(at.xRegion = re.xRegion) \r\n\t\t\t\t LEFT JOIN athletica.team AS t ON(a.xTeam = t.xTeam) \r\n\t\t\t\t LEFT JOIN athletica.runde AS ru ON(s.xRunde = ru.xRunde) \r\n\t\t\t\t LEFT JOIN athletica.wettkampf AS w On (w.xWettkampf= st.xWettkampf) \r\n\t\t\t\t LEFT JOIN athletica.kategorie AS k On (w.xKategorie= k.xKategorie)\r\n\t\t\t\t LEFT JOIN athletica.kategorie AS k1 ON (a.xKategorie = k1.xKategorie) \r\n\t\t\t\t\t WHERE " . $roundSQL . " \r\n\t\t\t\t\t " . $limitRankSQL . " \r\n\t\t\t\t\t " . $valid_result . " \r\n\t\t\t\t\t " . $sqlSeparate . " \r\n\t\t\t\t\t " . $selectionHeats . " \r\n\t\t\t\t\tORDER BY " . $order . " \t\t\t\t\t \r\n\t\t\t\t\t\t\t rank, \r\n\t\t\t\t\t\t\t at.Name, \r\n\t\t\t\t\t\t\t at.Vorname,\r\n\t\t\t\t\t\t\t leistung_neu " . $order_perf; } else { // relay event $query = "SELECT ss.xSerienstart, \t\t\t\t\t\t\r\n\t\t\t\t\t\t\t IF(r.Leistung < 0 , {$max_rank}, if (ss.Rang=0, {$max_rank}-1, ss.Rang)) AS rank, \r\n\t\t\t\t\t\t\t ss.Qualifikation, \r\n\t\t\t\t\t\t\t " . $sql_leistung . " AS leistung_neu, \r\n\t\t\t\t\t\t\t r.Info, \r\n\t\t\t\t\t\t\t s.Bezeichnung, \r\n\t\t\t\t\t\t\t s.Wind, \r\n\t\t\t\t\t\t\t r.Punkte, \r\n\t\t\t\t\t\t\t IF('" . $svm . "', t.Name, v.Name), \r\n\t\t\t\t\t\t\t sf.Name, \r\n\t\t\t\t\t\t\t LPAD(s.Bezeichnung, 5, '0') AS heatid, \r\n\t\t\t\t\t\t\t st.xStart, \r\n\t\t\t\t\t\t\t ru.Datum, \r\n\t\t\t\t\t\t\t ru.Startzeit, \r\n\t\t\t\t\t\t\t ss.RundeZusammen,\r\n\t\t\t\t\t\t\t ru.xRunde,\r\n\t\t\t\t\t\t\t k.Name ,\r\n ss.Bemerkung \r\n\t\t\t\t\t\tFROM athletica.serie AS s USE INDEX(Runde) \r\n\t\t\t\t LEFT JOIN athletica.serienstart AS ss USING(xSerie) \r\n\t\t\t\t LEFT JOIN athletica.resultat AS r USING(xSerienstart) \r\n\t\t\t\t LEFT JOIN athletica.start AS st ON(ss.xStart = st.xStart) \r\n\t\t\t\t LEFT JOIN athletica.staffel AS sf USING(xStaffel) \r\n\t\t\t\t LEFT JOIN athletica.verein AS v USING(xVerein) \r\n\t\t\t\t LEFT JOIN athletica.team AS t ON(sf.xTeam = t.xTeam) \r\n\t\t\t\t LEFT JOIN athletica.runde AS ru ON(s.xRunde = ru.xRunde) \r\n\t\t\t\t LEFT JOIN athletica.wettkampf AS w On (w.xWettkampf= st.xWettkampf) \r\n\t\t\t\t LEFT JOIN athletica.kategorie AS k On (w.xKategorie= k.xKategorie) \r\n\t\t\t\t\t WHERE " . $roundSQL . " \r\n\t\t\t\t\t " . $limitRankSQL . " \r\n\t\t\t\t\t " . $valid_result . " \r\n\t\t\t\t\t " . $sqlSeparate . " \r\n\t\t\t\t\tGROUP BY r.xSerienstart \r\n\t\t\t\t\tORDER BY " . $order . " \r\n\t\t\t\t\t\t\t rank, \r\n\t\t\t\t\t\t\t r.Leistung \r\n\t\t\t\t\t\t\t " . $order_perf . ", \r\n\t\t\t\t\t\t\t sf.Name;"; } $res = mysql_query($query); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if (mysql_num_rows($res) == 0) { continue; } // initialize variables $heat = ''; $h = 0; $info = ''; $id = ''; $r = ''; $count_rank = 0; $perf_save = ''; //$list->startList(); $nr = 0; $atCat = ''; // process every result while ($row_res = mysql_fetch_array($res)) { if ($flagSubtitle) { $nr = 0; if ($heatSeparate) { if ($relay) { $list->printSubTitle($row_res[16], $row[2], $roundName); } else { if (!$athleteCat) { $list->printSubTitle($row_res[19], $row[2], $roundName); } } } else { if (!$athleteCat) { $list->printSubTitle($row[1], $row[2], $roundName); } } $flagSubtitle = false; } if (!$athleteCat) { if ($flagInfoLine1) { $list->printInfoLine($info_save1); $flagInfoLine1 = false; } } if (!$athleteCat) { if ($flagInfoLine2) { $list->printInfoLine($info_save2); $flagInfoLine2 = false; } } $row_res[3] = $row_res[3] == 1 || $row_res[3] == 2 || $row_res[3] == 3 || $row_res[3] == 4 ? $row_res[3] * -1 : ($row_res[3] == 9 ? -99 : $row_res[3]); if ($row_res[0] != $id) { if ($h == 0 || $row_res[5] != $heat && $eval == $cfgEvalType[$strEvalTypeHeat] || $athleteCat && $row_res[21] != $atCat) { $count_rank = 0; $nr = 0; // heat name if ($eval == $cfgEvalType[$strEvalTypeHeat]) { if (empty($type)) { // no round type defined $type = $strFinalround . " "; } $title = $type . $row_res[5]; // heat name with nbr. } else { $title = $type; // heat name withour nbr. } $title = trim($title); // wind per heat if ($row[3] == $cfgDisciplineType[$strDiscTypeTrack] && $row[8] == 1 && $eval == $cfgEvalType[$strEvalTypeHeat]) { $heatwind = $row_res[6]; // wind per heat } else { $heatwind = ''; // no wind } $wind = FALSE; if ($row[8] == 1 && $row[3] == $cfgDisciplineType[$strDiscTypeJump] || $row[3] == $cfgDisciplineType[$strDiscTypeTrack] && $eval == $cfgEvalType[$strEvalTypeAll]) { $wind = TRUE; } // add column header 'points' if required $points = FALSE; if ($row[7] != '0') { $points = TRUE; } if ($show_efforts == 'sb_pb') { $base_perf = true; } if ($athleteCat && !$relay) { if ($formaction == 'print') { if ($row_res[20] != $atCatName) { $list->printSubTitle($row_res[20], $row[2], $roundName, $row_res[24]); $atCatName_keep = $atCatName; if ($flagInfoLine1) { $list->printInfoLine($info_save1); $flagInfoLine1 = false; } if ($flagInfoLine2) { $list->printInfoLine($info_save2); $flagInfoLine2 = false; } } } } $list->startList(); $list->printHeaderLine($title, $relay, $points, $wind, $heatwind, $row[11], $svm, $base_perf, $qual_mode); if ($athleteCat && !$relay) { if ($formaction == 'view') { if ($row_res[20] != $atCatName) { $list->printSubTitle($row_res[20], $row[2], $roundName, $row_res[24]); $atCatName_keep = $atCatName; if ($flagInfoLine1) { $list->printInfoLine($info_save1, $athleteCat); $flagInfoLine1 = false; } if ($flagInfoLine2) { $list->printInfoLine($info_save2, $athleteCat); $flagInfoLine2 = false; } } } } $heat = $row_res[5]; // keep heat description $atCat = $row_res[21]; // keep athlete category $h++; // increment if evaluation per heat } $count_rank++; // rank if ($row_res[1] == $max_rank || $row_res[1] == $max_rank - 1 || $r == $row_res[1] && $heat_keep == $row_res[5]) { // same rank as previous $rank = ''; } else { $rank = $row_res[1]; } $r = $row_res[1]; // keep rank $heat_keep = $row_res[5]; // keep rank $atCatName = $row_res[20]; // keep athlete category name // name $name = $row_res[9]; if ($relay == FALSE) { $name = $name . " " . $row_res[10]; } // year of birth if ($relay == FALSE) { $year = AA_formatYearOfBirth($row_res[11]); } else { $year = ''; } // year of birth if ($relay == FALSE) { $land = $row_res[13] != '' && $row_res[13] != '-' ? $row_res[13] : ''; } else { $year = ''; } // performance if ($row_res[3] < 0) { // invalid result foreach ($cfgInvalidResult as $value) { if ($value['code'] == $row_res[3]) { $perf = $value['short']; } } } else { if ($row[3] == $cfgDisciplineType[$strDiscTypeJump] || $row[3] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[3] == $cfgDisciplineType[$strDiscTypeThrow] || $row[3] == $cfgDisciplineType[$strDiscTypeHigh]) { $perf = AA_formatResultMeter($row_res[3]); } else { if ($row[3] == $cfgDisciplineType[$strDiscTypeTrack] || $row[3] == $cfgDisciplineType[$strDiscTypeTrackNoWind]) { $perf = AA_formatResultTime($row_res[3], true, true); } else { $perf = AA_formatResultTime($row_res[3], true); } } } $qual = ''; if ($row_res[2] > 0) { // Athlete qualified foreach ($cfgQualificationType as $qtype) { if ($qtype['code'] == $row_res[2]) { $qual = $qtype['token']; } } } // ET athlete qualified // points for performance $points = ''; if ($row[7] != '0') { $points = $row_res[7]; } // wind info $wind = ''; $secondResult = false; if ($r != $max_rank) { if ($row[3] == $cfgDisciplineType[$strDiscTypeJump] && $row[8] == 1) { $wind = $row_res[4]; // // if wind bigger than max wind (2.0) show the next best result without wind too // if ($wind > 2) { $res_wind = mysql_query("\r\n\t\t\t\t\t\t\t\t\t\tSELECT Info, Leistung FROM\r\n\t\t\t\t\t\t\t\t\t\t\tresultat\r\n\t\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\t\txSerienstart = {$row_res['0']}\r\n\t\t\t\t\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t\t\t\t\t\tLeistung ASC"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row_wind = mysql_fetch_array($res_wind)) { if ($row_wind[0] <= 2) { $secondResult = true; $wind2 = $row_wind[0] . ")"; $perf2 = "(" . AA_formatResultMeter($row_wind[1]); } } } } } else { if ($row[3] == $cfgDisciplineType[$strDiscTypeTrack] && $row[8] == 1 && $eval == $cfgEvalType[$strEvalTypeAll]) { $wind = $row_res[6]; } } } // ioc country code $ioc = ''; if ($relay == false) { $ioc = $row_res[13]; } //show performances from base if ($show_efforts == 'sb_pb' && $relay == false) { $saison = $_SESSION['meeting_infos']['Saison']; if ($saison == '') { $saison = "O"; //if no saison is set take outdoor } $sql = "SELECT \r\n\t\t\t\t\t\t\t\t\tseason_effort\r\n\t\t\t\t\t\t\t\t\t, DATE_FORMAT(season_effort_date, '%d.%m.%Y') AS sb_date\r\n\t\t\t\t\t\t\t\t\t, season_effort_event\r\n\t\t\t\t\t\t\t\t\t, best_effort\r\n\t\t\t\t\t\t\t\t\t, DATE_FORMAT(best_effort_date, '%d.%m.%Y') AS pb_date\r\n\t\t\t\t\t\t\t\t\t, best_effort_event\r\n\t\t\t\t\t\t\t\t\t, season\r\n\t\t\t\t\t\t\t\t\t, xAnmeldung\r\n\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\tathletica.base_performance\r\n\t\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\t\tathletica.base_athlete USING (id_athlete)\r\n\t\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\t\tathletica.disziplin_" . $_COOKIE['language'] . " ON (discipline = Code)\r\n\t\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\t\tathletica.athlet ON (license = Lizenznummer)\r\n\t\t\t\t\t\tLEFT JOIN\r\n\t\t\t\t\t\t\tathletica.anmeldung USING(xAthlet) \r\n\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\tathlet.xAthlet = {$row_res['14']}\r\n\t\t\t\t\t\t\tAND xDisziplin = {$row['12']}\r\n\t\t\t\t\t\t\tAND season = '{$saison}' \r\n\t\t\t\t\t\t\tAND xMeeting = " . $_COOKIE['meeting_id'] . ";"; $res_perf = mysql_query($sql); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { if ($res_perf) { $row_perf = mysql_fetch_array($res_perf); $is_jump = $row[3] == $cfgDisciplineType[$strDiscTypeJump] || $row[3] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[3] == $cfgDisciplineType[$strDiscTypeThrow] || $row[3] == $cfgDisciplineType[$strDiscTypeHigh]; $order = $is_jump ? 'DESC' : 'ASC'; $best_previous = ''; $previous_date = ''; if ($row_perf !== false) { $best_previous = AA_getBestPrevious($row[12], $row_perf['xAnmeldung'], $order, $row_res['Datum'], $row_res['Startzeit'], &$previous_date); } if ($is_jump) { $sb_perf = AA_formatResultMeter(str_replace(".", "", $row_perf['season_effort'])); $pb_perf = AA_formatResultMeter(str_replace(".", "", $row_perf['best_effort'])); $bp_perf = AA_formatResultMeter(str_replace(".", "", $best_previous)); if ($bp_perf > 0 && $bp_perf > $sb_perf) { $sb_perf = $bp_perf; $row_perf['season_effort_event'] = $_SESSION['meeting_infos']['Name']; $row_perf['sb_date'] = date('d.m.Y', strtotime($previous_date)); } if ($bp_perf > 0 && $bp_perf > $pb_perf) { $pb_perf = $bp_perf; $row_perf['best_effort_event'] = $_SESSION['meeting_infos']['Name']; $row_perf['pb_date'] = date('d.m.Y', strtotime($previous_date)); } //highlight sb or pb if new performance is better if (is_numeric($perf)) { //prevent special-codes (disq, n.a. usw) if ($formaction != 'print') { if ($pb_perf != '' && $perf > $pb_perf) { $perf = "<b>PB {$perf}</b> "; } else { if ($sb_perf != '' && $perf > $sb_perf) { $perf = "<b>SB {$perf}</b>"; } } } else { if ($pb_perf != '' && $perf > $pb_perf) { $perf = "<b>PB</b> {$perf}"; } else { if ($sb_perf != '' && $perf > $sb_perf) { $perf = "<b>SB</b> {$perf}"; } } } } } else { //convert performance-time to milliseconds $timepices = explode(":", $row_perf['season_effort']); $season_effort = $timepices[0] * 360 * 1000 + $timepices[1] * 60 * 1000 + $timepices[2] * 1000 + $timepices[3]; $timepices = explode(":", $row_perf['best_effort']); $best_effort = $timepices[0] * 360 * 1000 + $timepices[1] * 60 * 1000 + $timepices[2] * 1000 + $timepices[3]; $previous_effort = intval($best_previous); if ($previous_effort > 0 && $previous_effort < $season_effort) { $season_effort = $previous_effort; $row_perf['season_effort_event'] = $_SESSION['meeting_infos']['Name']; $row_perf['sb_date'] = date('d.m.Y', strtotime($previous_date)); } if ($previous_effort > 0 && $previous_effort < $best_effort) { $best_effort = $previous_effort; $row_perf['best_effort_event'] = $_SESSION['meeting_infos']['Name']; $row_perf['pb_date'] = date('d.m.Y', strtotime($previous_date)); } if ($row[3] == $cfgDisciplineType[$strDiscTypeTrack] || $row[3] == $cfgDisciplineType[$strDiscTypeTrackNoWind]) { $sb_perf = AA_formatResultTime($season_effort, true, true); $pb_perf = AA_formatResultTime($best_effort, true, true); } else { $sb_perf = AA_formatResultTime($season_effort, true); $pb_perf = AA_formatResultTime($best_effort, true); } if ($formaction != 'print') { //highlight sb or pb if new performance is better if ($pb_perf != '' && $perf < $pb_perf) { $perf = "<b>PB {$perf}</b>"; } else { if ($sb_perf != '' && $perf < $sb_perf) { $perf = "<b>SB {$perf}</b>"; } } } else { if ($pb_perf != '' && $perf < $pb_perf) { $perf = "<b>PB</b> {$perf}"; } else { if ($sb_perf != '' && $perf < $sb_perf) { $perf = "<b>SB</b> {$perf}"; } } } } if (!empty($row_perf['season_effort'])) { $sb = "<a href=\"#\" class=\"info\">{$sb_perf}<span>{$row_perf['sb_date']}<br>{$row_perf['season_effort_event']}</span></a>"; } else { $sb = " "; } if (!empty($row_perf['best_effort'])) { $pb = "<a href=\"#\" class=\"info\">{$pb_perf}<span>{$row_perf['pb_date']}<br>{$row_perf['best_effort_event']}</span></a>"; } else { $pb = " "; } } } } if ($heatSeparate) { $rank = $count_rank; if ($perf == $perf_save || $row_res[3] < 0) { // same rank or invalid result $rank = ''; } } if ($athleteCat && !$relay) { $nr++; if ($rank != '') { if ($formaction == "print") { $rank = $nr . ". (" . $rank . ")"; } else { $rank = $nr . " (" . $rank . ")"; } } } else { if ($formaction == "print") { if ($rank != '') { $rank .= "."; } } } if ($relay) { $remark = $row_res[17]; } else { $remark = $row_res[22]; } $list->printLine($rank, $name, $year, $row_res[8], $perf, $wind, $points, $qual, $ioc, $sb, $pb, $qual_mode, $athleteCat, $remark); if ($secondResult) { $list->printLine("", "", "", "", $perf2, $wind2, "", "", "", "", "", $qual_mode); } $perf_save = $perf; // keep performance // // if relay, show started ahtletes in right order under the result // if ($relay) { if ($row_res[14] > 0) { $sqlRound = $row_res[14]; } else { $sqlRound = $row[0]; } $res_at = mysql_query("\r\n\t\t\t\t\t\t\t\tSELECT at.Vorname, at.Name, at.Jahrgang FROM\r\n\t\t\t\t\t\t\t\t\tathletica.staffelathlet as sfat\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN athletica.start as st ON sfat.xAthletenstart = st.xStart\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN athletica.anmeldung as a USING(xAnmeldung)\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN athletica.athlet as at USING(xAthlet)\r\n\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\tsfat.xStaffelstart = {$row_res['11']}\r\n\t\t\t\t\t\t\t\tAND\tsfat.xRunde = {$sqlRound} \r\n\t\t\t\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\t\t\t\tsfat.Position\r\n\t\t\t\t\t\t\t\tLIMIT {$row['10']}\r\n\t\t\t\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $text_at = ""; while ($row_at = mysql_fetch_array($res_at)) { $text_at .= $row_at[1] . " " . $row_at[0] . " " . AA_formatYearOfBirth($row_at[2]) . " / "; } $text_at = substr($text_at, 0, strlen($text_at) - 2); $text_at = trim($text_at) != '' ? '(' . $text_at . ')' : ''; $list->printAthletesLine($text_at); } } // // if biglist, show all attempts // if ($biglist) { if ($row[3] == $cfgDisciplineType[$strDiscTypeJump] || $row[3] == $cfgDisciplineType[$strDiscTypeJumpNoWind] || $row[3] == $cfgDisciplineType[$strDiscTypeThrow] || $row[3] == $cfgDisciplineType[$strDiscTypeHigh]) { $query_sort = $row[3] == $cfgDisciplineType[$strDiscTypeHigh] ? "ORDER BY Leistung ASC" : ""; $res_att = mysql_query("\r\n\t\t\t\t\t\t\t\tSELECT * FROM \r\n\t\t\t\t\t\t\t\t\tathletica.resultat \r\n\t\t\t\t\t\t\t\tWHERE xSerienstart = {$row_res['0']}\r\n\t\t\t\t\t\t\t\t" . $query_sort . "\r\n\t\t\t\t\t\t\t\t"); if (mysql_errno() > 0) { // DB error AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { $text_att = ""; while ($row_att = mysql_fetch_array($res_att)) { if ($row_att['Leistung'] < 0) { $perf3 = $row_att['Leistung']; if ($perf3 == $GLOBALS['cfgMissedAttempt']['db']) { // $perf3 = '-'; $perf3 = $GLOBALS['cfgMissedAttempt']['code']; } elseif ($perf3 == $GLOBALS['cfgMissedAttempt']['dbx']) { $perf3 = $GLOBALS['cfgMissedAttempt']['codeX']; } foreach ($cfgInvalidResult as $value) { if ($value['code'] == $perf3) { $text_att .= $value['short']; } } $text_att .= " / "; } else { $text_att .= $row_att['Leistung'] == '-' ? '-' : AA_formatResultMeter($row_att['Leistung']); if ($saison == "O" || $saison == "I" && $row[3] != $cfgDisciplineType[$strDiscTypeJump]) { // outdoor or (indoor and not jump) if ($row_att['Info'] != "-" && !empty($row_att['Info']) && $row[3] != $cfgDisciplineType[$strDiscTypeThrow]) { if ($row[3] == $cfgDisciplineType[$strDiscTypeHigh]) { $text_att .= " , " . $row_att['Info']; } else { if ($row[8] != 0) { $text_att .= " , " . $row_att['Info']; } } } elseif ($row_att['Info'] == "-" && $row[3] != $cfgDisciplineType[$strDiscTypeThrow] && $row_att['Leistung'] > 0) { $text_att .= " , " . $row_att['Info']; } } $text_att .= " / "; } } $text_att = substr($text_att, 0, strlen($text_att) - 2); $list->printAthletesLine("{$strAttempts}: ( {$text_att} )"); } } } } // ET athlete processed $id = $row_res[0]; // keep current athletes ID if ($relay) { $catM = $row_res[16]; } else { $catM = $row_res[19]; } // keep merged category } // END WHILE result lines mysql_free_result($res); $list->endList(); } // ET DB error result rows $cat = $row[1]; // keep category } // END WHILE event rounds mysql_free_result($results); $list->endPage(); // end HTML page for printing $list->content .= $cfgHtmlFooter; $list->content .= " </div ></div>"; $list->content .= $cfgHtmlEnd; if (!fwrite($fp, $list->content)) { AA_printErrorMsg($GLOBALS['strErrFileWriteFailed']); return; } fclose($fp); } // ET DB error event rounds // will not be uploaded the next time per ftp AA_UpdateStatusChanged($round); }
mysql_query("UNLOCK TABLES"); } else { if ($_POST['arg'] == "del_event" || $_POST['arg'] == "del_combined") { $item = $_POST['item']; $events = array(); $evt = array(); if ($_POST['arg'] == "del_event") { $events[] = $_POST['event']; } else { // delete a combined event, get starts for each discipline list($cCat, $cCode) = split('_', $_POST['event']); $res_comb = mysql_query("SELECT xStart, a.Gruppe, w.xWettkampf FROM\r\n start as s\r\n LEFT JOIN wettkampf as w USING (xWettkampf)\r\n LEFT JOIN anmeldung as a ON (a.xAnmeldung=s.xAnmeldung)\r\n WHERE w.Mehrkampfcode = {$cCode}\r\n AND w.xKategorie = {$cCat}\r\n AND s.xAnmeldung = {$item}\r\n AND w.xMeeting = " . $_COOKIE['meeting_id']); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error()); } else { while ($row_comb = mysql_Fetch_array($res_comb)) { $events[] = $row_comb[0]; $group = $row_comb[1]; // keep group $evt[] = $row_comb[2]; } } } mysql_query("LOCK TABLES serienstart READ, staffelathlet READ, start WRITE, runde AS r READ, \r\n runde WRITE, wettkampf AS w READ, start AS st READ, anmeldung AS a READ"); foreach ($events as $start) { // Meeting does not exist (anymore) if (AA_checkReference("serienstart", "xStart", $start) == 0 && AA_checkReference("staffelathlet", "xAthletenstart", $start) == 0) { // Delete starts mysql_query("DELETE FROM start WHERE xStart=" . $start); if (mysql_errno() > 0) { AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
<?php $_zb_path = "../"; include "../lib.php"; $connect = dbconn(); $member = member_info(); $s_keyword = $keyword; if (!$member[no] || $member[is_admin] > 1 || $member[level] > 1) { Error("최고 관리자만이 사용할수 있습니다"); } if ($keykind[5]) { $userno = mysql_Fetch_array(mysql_query("select no from zetyx_member_table where user_id='{$keyword}'", $connect)); $userno = $userno[0]; } // 실제 검색부분 if ($keyword) { $comment_search = 1; $s_que = ""; for ($i = 0; $i < 6; $i++) { if ($keykind[$i]) { if ($keykind[$i] != "ismember") { if (!$s_que) { $s_que .= " where {$keykind[$i]} like '%{$keyword}%' "; } else { $s_que .= " and {$keykind[$i]} like '%{$keyword}%' "; } } else { if ($userno) { if (!$s_que) { $s_que .= " where {$keykind[$i]} = '{$userno}' "; } else {
$res2 = mysql_query($sql2); $count = mysql_num_rows($res2); echo "<set label='{$ln['2']}' value='{$count}' /> "; } } else { if ($id == '2') { $sql = "select * from position"; $res = mysql_query($sql); $i = 0; while ($ln = mysql_Fetch_array($res)) { $sql2 = "select * from user , send where send.user_id=user.user_id and user.position_id='{$ln['0']}' and send.send_date Like '%{$m}%' and send.send_date Like '%{$y}%' "; $res2 = mysql_query($sql2); $count = mysql_num_rows($res2); echo "<set label='{$ln['2']}' value='{$count}' /> "; } } else { $sql = "select * from user"; $res = mysql_query($sql); $i = 0; while ($ln = mysql_Fetch_array($res)) { $sql2 = "select * from send where send.user_id='{$ln['0']}' and send.send_date Like '%{$m}%' and send.send_date Like '%{$y}%' "; $res2 = mysql_query($sql2); $count = mysql_num_rows($res2); echo "<set label='{$ln['3']}' value='{$count}' /> "; } } } ?> </chart>
#Сила Великана } if ($db["level"] >= 4) { if ($db["level"] >= 4) { $item_str = "(1163, 1165, 1531, 1164, 1162, 1034, 1037, 1529, 1530)"; } else { if ($db["level"] == 9) { $item_str = "(1163, 1165, 1531, 1164, 1162, 1034, 1037, 1529, 1530)"; } else { if ($db["level"] >= 10) { $item_str = "(1163, 1165, 1531, 1164, 1162, 1034, 1037, 1529, 1530)"; } } } $buy_item_sql = mysql_query("SELECT * FROM paltar WHERE id in {$item_str}"); while ($buy_item = @mysql_Fetch_array($buy_item_sql)) { mysql_query("INSERT INTO `inv` (`id`, `owner`, `img`, `gift`, `gift_author` , `object_id`, `object_type`, `object_razdel`, `name`, `mass`, `price`, `gos_price`, `min_sila`, `min_lovkost`, `min_udacha`, `min_power`, `min_intellekt`, `min_vospriyatie`, `min_level`, `min_sword_vl`, `min_staff_vl`, `min_axe_vl`, `min_fail_vl`, `min_knife_vl`, `min_spear_vl`,`min_fire`,`min_water`,`min_air`,`min_earth`,`min_svet`,`min_tma`,`min_gray`,`add_fire`, `add_water`, `add_air`, `add_earth`, `add_svet`, `add_tma`, `add_gray`, `add_sila`, `add_lovkost`, `add_udacha`, `add_intellekt`, `add_duxovnost`, `add_hp`, `add_mana`, `protect_head`, `protect_arm`, `protect_corp`, `protect_poyas`, `protect_legs`, `protect_rej`, `protect_drob`, `protect_kol`, `protect_rub`, `protect_fire`, `protect_water`, `protect_air`, `protect_earth`, `protect_svet`, `protect_tma`, `protect_gray`,`protect_mag`,`protect_udar`, `shieldblock`, `krit`, `akrit`, `uvorot`, `auvorot`, `parry`, `counter`, `add_rej`, `add_drob`, `add_kol`, `add_rub`, `ms_udar`, `ms_krit`, `ms_mag`, `ms_fire`, `ms_water`, `ms_air`, `ms_earth`, `ms_svet`, `ms_tma`, `ms_gray`, `ms_rej`, `ms_drob`, `ms_kol`, `ms_rub`, `iznos_max`, `min_attack`, `max_attack`, `proboy`, `add_oruj`, `add_sword_vl`, `add_staff_vl`, `add_axe_vl`, `add_fail_vl`, `add_knife_vl`, `add_spear_vl`, `need_orden`, `sex`, `art`, `podzemka`, `is_personal`, `personal_owner`, `noremont`, `two_hand`, `second_hand`, `add_fire_att`, `add_air_att`, `add_watet_att`, `add_earth_att`, `edited`) \n\t\t\t\t\tVALUES (NULL, '" . $login . "','" . $buy_item["img"] . "' ,'1','Администрации WWW.OlDmeydan.Pe.Hu' ,'" . $buy_item["id"] . "', '" . $buy_item["object"] . "', 'obj', '" . $buy_item["name"] . "', '" . $buy_item["mass"] . "', '" . $buy_item["price"] . "', '" . $buy_item["price"] . "', '" . $buy_item["min_sila"] . "', '" . $buy_item["min_lovkost"] . "', '" . $buy_item["min_udacha"] . "', '" . $buy_item["min_power"] . "', '" . $buy_item["min_intellekt"] . "', '" . $buy_item["min_vospriyatie"] . "', '" . $buy_item["min_level"] . "', '" . $buy_item["min_sword_vl"] . "', '" . $buy_item["min_staff_vl"] . "', '" . $buy_item["min_axe_vl"] . "', '" . $buy_item["min_fail_vl"] . "', '" . $buy_item["min_knife_vl"] . "', '" . $buy_item["min_spear_vl"] . "', '" . $buy_item["min_fire"] . "','" . $buy_item["min_water"] . "','" . $buy_item["min_air"] . "','" . $buy_item["min_earth"] . "','" . $buy_item["min_svet"] . "','" . $buy_item["min_tma"] . "','" . $buy_item["min_gray"] . "', '" . $buy_item["add_fire"] . "', '" . $buy_item["add_water"] . "', '" . $buy_item["add_air"] . "', '" . $buy_item["add_earth"] . "', '" . $buy_item["add_svet"] . "', '" . $buy_item["add_tma"] . "', '" . $buy_item["add_gray"] . "', '" . $buy_item["add_sila"] . "', '" . $buy_item["add_lovkost"] . "', '" . $buy_item["add_udacha"] . "', '" . $buy_item["add_intellekt"] . "', '" . $buy_item["add_duxovnost"] . "', '" . $buy_item["add_hp"] . "', '" . $buy_item["add_mana"] . "', '" . $buy_item["protect_head"] . "', '" . $buy_item["protect_arm"] . "', '" . $buy_item["protect_corp"] . "', '" . $buy_item["protect_poyas"] . "', '" . $buy_item["protect_legs"] . "', '" . $buy_item["protect_rej"] . "', '" . $buy_item["protect_drob"] . "', '" . $buy_item["protect_kol"] . "', '" . $buy_item["protect_rub"] . "', '" . $buy_item["protect_fire"] . "', '" . $buy_item["protect_water"] . "', '" . $buy_item["protect_air"] . "', '" . $buy_item["protect_earth"] . "', '" . $buy_item["protect_svet"] . "', '" . $buy_item["protect_tma"] . "', '" . $buy_item["protect_gray"] . "', '" . $buy_item["protect_mag"] . "', '" . $buy_item["protect_udar"] . "','" . $buy_item["shieldblock"] . "','" . $buy_item["krit"] . "', '" . $buy_item["akrit"] . "', '" . $buy_item["uvorot"] . "', '" . $buy_item["auvorot"] . "', '" . $buy_item["parry"] . "', '" . $buy_item["counter"] . "', '" . $buy_item["add_rej"] . "', '" . $buy_item["add_drob"] . "', '" . $buy_item["add_kol"] . "', '" . $buy_item["add_rub"] . "', '" . $buy_item["ms_udar"] . "', '" . $buy_item["ms_krit"] . "', '" . $buy_item["ms_mag"] . "', '" . $buy_item["ms_fire"] . "', '" . $buy_item["ms_water"] . "', '" . $buy_item["ms_air"] . "', '" . $buy_item["ms_earth"] . "', '" . $buy_item["ms_svet"] . "', '" . $buy_item["ms_tma"] . "', '" . $buy_item["ms_gray"] . "', '" . $buy_item["ms_rej"] . "', '" . $buy_item["ms_drob"] . "', '" . $buy_item["ms_kol"] . "', '" . $buy_item["ms_rub"] . "', '5', '" . $buy_item["min_attack"] . "', '" . $buy_item["max_attack"] . "', '" . $buy_item["proboy"] . "','" . $buy_item["add_oruj"] . "' ,'" . $buy_item["add_sword_vl"] . "', '" . $buy_item["add_staff_vl"] . "', '" . $buy_item["add_axe_vl"] . "', '" . $buy_item["add_fail_vl"] . "', '" . $buy_item["add_knife_vl"] . "', '" . $buy_item["add_spear_vl"] . "', '" . $buy_item["need_orden"] . "', '" . $buy_item["sex"] . "', '" . $buy_item["art"] . "', '1', '" . $buy_item["is_personal"] . "', '" . $buy_item["personal_owner"] . "', '1', '" . $buy_item["two_hand"] . "', '" . $buy_item["second_hand"] . "', '" . $buy_item["add_fire_att"] . "', '" . $buy_item["add_air_att"] . "', '" . $buy_item["add_watet_att"] . "', '" . $buy_item["add_earth_att"] . "', '" . $buy_item["edited"] . "');"); } } if ($veteran == 1) { mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','250','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')"); #Izlomdakilar mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','251','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')"); #Izlomdakilar mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','252','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')"); #Izlomdakilar mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','253','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')"); #Izlomdakilar mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','254','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')"); #Izlomdakilar mysql_query("INSERT INTO inv(owner, object_id, object_type, object_razdel, iznos_max, gift, gift_author) VALUES ('" . $login . "','255','scroll','magic','5','1','Администрации WWW.OlDmeydan.Pe.Hu')");