本文整理汇总了PHP中AA_checkReference函数的典型用法代码示例。如果您正苦于以下问题:PHP AA_checkReference函数的具体用法?PHP AA_checkReference怎么用?PHP AA_checkReference使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AA_checkReference函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mysql_query
}
}
}
}
}
//
// Process del-request
//
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES serienstart READ, start WRITE, anmeldung WRITE, athlet WRITE");
// check if start data still used
$result = mysql_query("SELECT xStart FROM start" . " WHERE xAnmeldung=" . $_GET['item']);
$rc = 0;
// row counter
while ($row = mysql_fetch_row($result)) {
$rc = $rc + AA_checkReference("serienstart", "xStart", $row[0]);
}
mysql_free_result($result);
// OK: not used anymore
if ($rc == 0) {
// Delete starts
mysql_query("DELETE FROM start WHERE xAnmeldung=" . $_GET['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
// get xAthlet
$res = mysql_query("SELECT xAthlet FROM anmeldung WHERE xAnmeldung=" . $_GET['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$row = mysql_fetch_array($res);
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_entry.php
示例2: mysql_query
$row_activ = $row[1];
}
mysql_query("\r\n\t\t\t UPDATE disziplin SET \r\n\t\t\t\t Kurzname=\"" . strtoupper($_POST['short']) . "\"\r\n\t\t\t\t , Name=\"" . $_POST['name'] . "\"\r\n\t\t\t\t , Anzeige=" . $_POST['order'] . "\r\n\t\t\t\t , Seriegroesse=" . $_POST['heat'] . "\r\n\t\t\t\t , Staffellaeufer=" . $_POST['relay'] . "\r\n\t\t\t\t , Typ=" . $_POST['type'] . "\r\n\t\t\t\t , Appellzeit=SEC_TO_TIME(" . $_POST['time'] * 60 . ")\r\n\t\t\t\t , Stellzeit=SEC_TO_TIME(" . $_POST['mtime'] * 60 . ")\r\n , aktiv='" . $row_activ . "' \r\n\t\t\t WHERE xDisziplin=" . $_POST['item']);
if (mysql_errno() > 0) {
$GLOBALS['AA_ERROR'] = mysql_errno() . ": " . mysql_error();
}
}
}
}
}
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES wettkampf READ, disziplin WRITE");
// Check if not used anymore
if (AA_checkReference("wettkampf", "xDisziplin", $_GET['item']) == 0) {
mysql_query("DELETE FROM disziplin WHERE xDisziplin=" . $_GET['item']);
} else {
AA_printErrorMsg($strDiscipline . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
//
// Display current data
//
$page = new GUI_Page('admin_disciplines', TRUE);
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_disciplines.php
示例3: AA_printErrorMsg
// store selected group
$group = $_POST['group'];
}
//
// add team
//
if ($_POST['arg'] == "add") {
$name = $_POST['name'];
// Error: Empty fields
if (empty($_POST['name']) || empty($_POST['category']) || empty($_POST['club']) || empty($_POST['event'])) {
AA_printErrorMsg($strErrEmptyFields);
} else {
mysql_query("LOCK TABLES\r\n\t\t\t\tteamsm WRITE\r\n\t\t\t\t, wettkampf READ\r\n\t\t\t\t, kategorie READ\r\n , anmeldung READ\r\n , staffel READ\r\n , start as s READ\r\n , runde as r READ \r\n , runde WRITE \r\n , wettkampf as w READ \r\n\t\t\t\t, verein READ");
if (AA_checkReference("kategorie", "xKategorie", $_POST['category']) == 0) {
AA_printErrorMsg($strCategory . $strErrNotValid);
} elseif (AA_checkReference("wettkampf", "xWettkampf", $_POST['event']) == 0) {
AA_printErrorMsg($strEvent . $strErrNotValid);
} else {
// check startnumber
$lastnbr = AA_getLastStartnbrTeamsm();
$nbr = $_POST['startnumber'];
if ($nbr > 0) {
$res = mysql_query("SELECT * FROM teamsm \r\n WHERE Startnummer = {$nbr} \r\n AND xMeeting = " . $_COOKIE['meeting_id']);
if (mysql_num_rows($res) > 0) {
$nbr = $lastnbr;
$nbr++;
}
//mysql_free_result($res);
//
// check if startnumber is used for athletes
$res = mysql_query("SELECT * FROM anmeldung \r\n WHERE Startnummer = {$nbr} \r\n AND xMeeting = " . $_COOKIE['meeting_id']);
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_teamsm_add.php
示例4: mysql_query
$sql = "SELECT xAthlet \r\n\t\t\t FROM athlet;";
$query = mysql_query($sql);
while ($row = mysql_fetch_assoc($query)) {
$num = AA_checkReference('anmeldung', 'xAthlet', $row['xAthlet']);
if ($num > 0) {
$errors = true;
break;
}
}
if (!$errors) {
$sql = "SELECT xVerein \r\n\t\t\t\t FROM verein;";
$query = mysql_query($sql);
while ($row = mysql_fetch_assoc($query)) {
$num = AA_checkReference('team', 'xVerein', $row['xVerein']);
$num2 = AA_checkReference('teamsm', 'xVerein', $row['xVerein']);
$num3 = AA_checkReference('staffel', 'xVerein', $row['xVerein']);
if ($num > 0 || $num2 > 0 || $num3 > 0) {
$errors = true;
break;
}
}
}
if ($errors) {
echo $strEmptyCacheReference;
die;
} else {
// reset athletes
mysql_query("TRUNCATE TABLE athlet");
if (mysql_errno > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_base.php
示例5: AA_printErrorMsg
AA_printErrorMsg($strErrEmptyFields);
}
} elseif ($_POST['arg'] == "change") {
if (!empty($_POST['name']) && !empty($_POST['display']) && !empty($_POST['sortvalue']) && !empty($_POST['item'])) {
mysql_query("UPDATE region SET\r\n\t\t\t\t\tName = '" . $_POST['name'] . "'\r\n\t\t\t\t\t, Anzeige = '" . $_POST['display'] . "'\r\n\t\t\t\t\t, Sortierwert = '" . $_POST['sortvalue'] . "'\r\n\t\t\t\tWHERE xRegion = " . $_POST['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
} else {
AA_printErrorMsg($strErrEmptyFields);
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES athlet READ, region WRITE");
// Still in use?
$rows = AA_checkReference("athlet", "xRegion", $_GET['item']);
// OK: not used anymore
if ($rows == 0) {
mysql_query("DELETE FROM region WHERE xRegion=" . $_GET['item']);
} else {
AA_printErrorMsg($strRegion . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
//
// Display current data
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_region.php
示例6: mysql_query
} else {
mysql_query("\r\n\t\t\tLOCK TABLES\r\n\t\t\t\tteam WRITE\r\n\t\t");
mysql_query("\r\n\t\t\tUPDATE team SET\r\n\t\t\t\tName=\"" . $_POST['name'] . "\"\r\n\t\t\tWHERE xTeam=" . $_POST['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
mysql_query("UNLOCK TABLES");
}
}
//
// Process del-request
//
if ($_GET['arg'] == "del") {
mysql_query("\r\n\t\tLOCK TABLES\r\n\t\t\tanmeldung READ\r\n\t\t\t, team WRITE\r\n\t");
// Still in use?
if (AA_checkReference("anmeldung", "xTeam", $_GET['item']) > 0) {
AA_printErrorMsg($strTeam . $strErrStillUsed);
} else {
// delete team events
mysql_query("\r\n\t\t\tDELETE FROM team\r\n\t\t\tWHERE xTeam = " . $_GET['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
}
// ET DB error (still in use)
mysql_query("UNLOCK TABLES");
$_POST['item'] = $_GET['item'];
// show empty form after delete
}
//
// display data
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_team.php
示例7: AA_heats_changeInstallation
/**
* change installations
* --------------------
*/
function AA_heats_changeInstallation($round)
{
require './lib/common.lib.php';
if ($_POST['arg'] == 'change_inst' && empty($_POST['item'])) {
AA_printErrorMsg($GLOBALS['strErrEmptyFields']);
} else {
mysql_query("LOCK TABLES anlage READ, serie WRITE");
$installation = $_POST['installation'];
if (AA_checkReference("anlage", "xAnlage", $installation) == 0) {
$installation = 0;
}
if ($_POST['arg'] == 'change_inst') {
// only for one heat
$clause = " WHERE xSerie=" . $_POST['item'];
} else {
// all heats
$clause = " WHERE xRunde=" . $round;
}
mysql_query("UPDATE serie SET" . " xAnlage = {$installation}" . $clause);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
mysql_query("UNLOCK TABLES");
}
}
开发者ID:laiello,项目名称:athletica,代码行数:29,代码来源:heats.lib.php
示例8: mysql_query
} else {
if ($_POST['arg'] == "add") {
mysql_query("\r\n\t\t\tINSERT INTO verein SET\r\n\t\t\t\tName=\"" . $_POST['name'] . "\"\r\n\t\t\t\t, Sortierwert=\"" . $_POST['sortvalue'] . "\"\r\n\t\t");
} else {
if ($_POST['arg'] == "change") {
mysql_query("\r\n\t\t\tUPDATE verein SET\r\n\t\t\t\tName=\"" . $_POST['name'] . "\"\r\n\t\t\t\t, Sortierwert=\"" . $_POST['sortvalue'] . "\"\r\n\t\t\tWHERE xVerein=" . $_POST['item']);
}
}
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES athlet READ, staffel READ, team READ, verein WRITE");
// Still in use?
$rows = AA_checkReference("athlet", "xVerein", $_GET['item']);
$rows = $rows + AA_checkReference("staffel", "xVerein", $_GET['item']);
$rows = $rows + AA_checkReference("team", "xVerein", $_GET['item']);
// OK: not used anymore
if ($rows == 0) {
mysql_query("DELETE FROM verein WHERE xVerein=" . $_GET['item']);
} else {
AA_printErrorMsg($strClub . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
//
// Display current data
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_clubs.php
示例9: AA_meeting_deleteEvent
function AA_meeting_deleteEvent()
{
require './lib/common.lib.php';
mysql_query("LOCK TABLES runde READ, start READ, wettkampf WRITE");
// Still in use?
$rows = AA_checkReference("runde", "xWettkampf", $_POST['item']);
$rows = $rows + AA_checkReference("start", "xWettkampf", $_POST['item']);
// OK: not used anymore
if ($rows == 0) {
mysql_query("DELETE FROM wettkampf WHERE xWettkampf=" . $_POST['item']);
} else {
AA_printErrorMsg($GLOBALS['strEvent'] . $GLOBALS['strErrStillUsed']);
}
mysql_query("UNLOCK TABLES");
return;
}
开发者ID:laiello,项目名称:athletica,代码行数:16,代码来源:meeting.lib.php
示例10: mysql_query
}
}
?>
<tr>
<td>team</td>
<td><?php
echo $items;
?>
</td>
</tr>
<?php
$items = 0;
$sql = "SELECT * \r\n\t\t\t FROM staffel;";
$query = mysql_query($sql);
while ($staffel = mysql_fetch_assoc($query)) {
$ref = AA_checkReference('meeting', 'xMeeting', $staffel['xMeeting']);
if ($ref == 0) {
$sql2 = "DELETE FROM staffel \r\n\t\t\t\t\t\t WHERE xStaffel = " . $staffel['xStaffel'] . ";";
$query2 = mysql_query($sql2);
if ($query2 && mysql_affected_rows() == 1) {
$items++;
}
}
}
?>
<tr>
<td>staffel</td>
<td><?php
echo $items;
?>
</td>
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_delete.php
示例11: substr
$idcounter = "001";
} else {
$idcounter = substr($biggestId, 6, 3);
$idcounter++;
$idcounter = sprintf("%03d", $idcounter);
}
$xTeamSQL = ", xTeam = " . $eventnr . $idcounter . ", Athleticagen ='y' ";
}
}
if (AA_checkReference("kategorie", "xKategorie", $category) == 0) {
AA_printErrorMsg($strCategory . $strErrNotValid);
} else {
if (AA_checkReference("meeting", "xMeeting", $_COOKIE['meeting_id']) == 0) {
AA_printErrorMsg($strMeeting . $strErrNotValid);
} else {
if (AA_checkReference("verein", "xVerein", $_POST['club']) == 0) {
AA_printErrorMsg($strClub . $strErrNotValid);
} else {
if (!empty($_POST['id'])) {
// svm is added from base
$xTeamSQL = ", xTeam = " . $_POST['id'] . ", Athleticagen ='n' ";
}
mysql_query("\r\n\t\t\t\t\t\tINSERT INTO team SET \r\n\t\t\t\t\t\t\tName=\"" . $_POST['name'] . "\"\r\n\t\t\t\t\t\t\t, xMeeting=" . $_COOKIE['meeting_id'] . "\r\n\t\t\t\t\t\t\t, xKategorie = " . $category . "\r\n\t\t\t\t\t\t\t, xVerein=" . $_POST['club'] . " \r\n , xKategorie_svm = '" . $category_svm . "'" . $xTeamSQL);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
$xTeam = mysql_insert_id();
// get new ID
}
}
// ET Club valid; add or change
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_team_add.php
示例12: mysql_query
}
} else {
// in other language without name and short name
mysql_query("\r\n UPDATE rundentyp_it SET\r\n Typ=\"" . $_POST['type'] . "\" \r\n , Wertung=" . $_POST['valtype'] . "\r\n WHERE xRundentyp=" . $_POST['item']);
if (mysql_errno() > 0) {
$GLOBALS['AA_ERROR'] = mysql_errno() . ": " . mysql_error();
}
}
}
}
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES runde READ, rundentyp_de WRITE, rundentyp_fr WRITE, rundentyp_it WRITE");
// Still in use?
$rows = AA_checkReference("runde", "xRundentyp", $_GET['item']);
// OK: not used anymore
if ($rows == 0) {
mysql_query("DELETE FROM rundentyp_de WHERE xRundentyp=" . $_GET['item']);
mysql_query("DELETE FROM rundentyp_fr WHERE xRundentyp=" . $_GET['item']);
mysql_query("DELETE FROM rundentyp_it WHERE xRundentyp=" . $_GET['item']);
} else {
AA_printErrorMsg($strRoundtype . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_roundtypes.php
示例13: mysql_query
mysql_query("UPDATE athlet SET " . "xVerein='" . $_POST['club'] . "' WHERE xAthlet=" . $_POST['item']);
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
}
} else {
AA_printErrorMsg($strErrClubChange);
}
mysql_query("UNLOCK TABLES");
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES anmeldung READ, staffelathlet READ, athlet WRITE");
// Still in use?
$rows = AA_checkReference("anmeldung", "xAthlet", $_GET['item']);
// OK: not used anymore
if ($rows == 0) {
mysql_query("DELETE FROM athlet WHERE xAthlet=" . $_GET['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
} else {
AA_printErrorMsg($strAthlete . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
}
}
//
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_athletes.php
示例14: AA_printErrorMsg
}
}
} else {
AA_printErrorMsg($strErrInvalidResult);
}
}
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("DELETE FROM wertungstabelle_punkte WHERE xWertungstabelle_Punkte = " . $_GET['item']);
header('Location: admin_scoretables.php?xw=' . $_GET['xw'] . '&disc=' . $_GET['disc']);
exit;
} else {
if ($_GET['arg'] == "deltbl") {
// Check if not used anymore
if (AA_checkReference("wettkampf", "Punktetabelle", $_GET['item']) == 0) {
mysql_query("DELETE FROM wertungstabelle_punkte WHERE xWertungstabelle = " . $_GET['item']);
mysql_query("DELETE FROM wertungstabelle WHERE xWertungstabelle = " . $_GET['item']);
header('Location: admin_scoretables.php');
exit;
} else {
AA_printErrorMsg($strScoreTable . $strErrStillUsed);
}
}
}
}
// Check if any error returned from DB
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
//
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_scoretables.php
示例15: AA_printErrorMsg
if (AA_checkReference("verein", "xVerein", $_POST['club']) == 0) {
AA_printErrorMsg($strClub . $strErrNotValid);
} else {
// Team selected
if (!empty($_POST['team']) && AA_checkReference("team", "xTeam", $_POST['team']) == 0) {
AA_printErrorMsg($strTeam . $strErrNotValid);
} else {
if (AA_checkReference("wettkampf", "xWettkampf", $_POST['event']) == 0) {
AA_printErrorMsg($strEvent . $strErrNotValid);
} else {
$startcheck = TRUE;
$c = 0;
if ($_POST['starts'] > 0) {
foreach ($_POST['starts'] as $start) {
// position or athlete not valid
if ($_POST['positions'][$c] > 0 && AA_checkReference("start", "xStart", $start) == 0) {
$startcheck = FALSE;
}
$c++;
}
}
// ET any athletes
if ($startcheck == FALSE) {
AA_printErrorMsg($strAthlete . $strErrNotValid);
} else {
// check startnumber
$lastnbr = AA_getLastStartnbrRelay();
$nbr = $_POST['startnumber'];
if ($nbr > 0) {
$res = mysql_query("SELECT * FROM staffel \r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE Startnummer = {$nbr} \r\n\t\t\t\t\t\t\t\t\t\t\t\tAND xMeeting = " . $_COOKIE['meeting_id']);
if (mysql_num_rows($res) > 0) {
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_relay_add.php
示例16: mysql_query
$perf = 0;
}
mysql_query("\r\n\t\t\tUPDATE start SET\r\n\t\t\t\tBestleistung = {$perf}\r\n\t\t WHERE xStart = " . $_POST['start']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
}
mysql_query("UNLOCK TABLES");
} else {
if ($_POST['arg'] == "change_team") {
mysql_query("\r\n\t\tLOCK TABLES\r\n\t\t\tstaffelathlet READ\r\n\t\t\t, team READ\r\n\t\t\t, start WRITE\r\n\t\t\t, staffel WRITE");
$res = mysql_query("\r\n\t\t\t\tSELECT\r\n\t\t\t\t\tstaffelathlet.xAthletenstart\r\n\t\t\t\tFROM\r\n\t\t\t\t\tstaffelathlet\r\n\t\t\t\t\t, start AS start\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tstart.xStaffel = " . $_POST['item'] . "\r\n\t\t\t\t\tAND staffelathlet.xStaffelstart = start.xStart\r\n\t\t\t");
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
} else {
if (!empty($_POST['team']) && AA_checkReference("team", "xTeam", $_POST['team']) == 0) {
AA_printErrorMsg($strTeam . $strErrNotValid);
} else {
// relay data
mysql_query("\r\n\t\t\tUPDATE staffel SET\r\n\t\t\t\txTeam = " . $_POST['team'] . "\r\n\t\t\t WHERE xStaffel = " . $_POST['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
}
}
mysql_query("UNLOCK TABLES");
} else {
if ($_POST['arg'] == "change_pos") {
// Error: Empty fields
if (empty($_POST['item']) || empty($_POST['relay']) || empty($_POST['athlete']) || empty($_POST['round'])) {
AA_printErrorMsg($strErrEmptyFields);
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_relay.php
示例17: AA_printErrorMsg
// set checked automatic
} else {
AA_printErrorMsg($strMergeRoundsErr);
}
}
}
mysql_query("UNLOCK TABLES");
}
} elseif ($_POST['arg'] == "merge_del") {
if (!empty($_POST['mainRound']) && !empty($_POST['round']) && !empty($_POST['roundSet'])) {
//mysql_query("LOCK TABLES rundenset WRITE, serie READ");
mysql_query("LOCK TABLES rundenset WRITE, rundenset as rs READ,serie READ, runde AS r Read, Wettkampf AS w READ, meeting READ ");
$mr = $_POST['mainRound'];
$r = $_POST['round'];
$rs = $_POST['roundSet'];
if (AA_checkReference("serie", "xRunde", $mr) != 0 || AA_checkReference("serie", "xRunde", $r) != 0) {
$GLOBALS['AA_ERROR'] = $strErrHeatsAlreadySeeded;
} else {
// remove round from set
mysql_query("DELETE FROM rundenset WHERE\r\n\t\t\t\t\txRundenset = {$rs}\r\n\t\t\t\t\tAND xMeeting = " . $_COOKIE['meeting_id'] . "\r\n\t\t\t\t\tAND xRunde = {$r}");
if (mysql_errno() > 0) {
$GLOBALS['AA_ERROR'] = mysql_errno() . ": " . mysql_error();
} else {
// check if there are no more rounds in set
$res = mysql_query("SELECT * FROM rundenset WHERE\r\n\t\t\t\t\t\t\txRundenset = {$rs}");
if (mysql_errno() > 0) {
$GLOBALS['AA_ERROR'] = mysql_errno() . ": " . mysql_error();
} else {
if (mysql_num_rows($res) == 1) {
// mainround only
mysql_query("DELETE FROM rundenset WHERE\r\n\t\t\t\t\t\t\txRundenset = {$rs}\r\n\t\t\t\t\t\t\tAND xMeeting = " . $_COOKIE['meeting_id']);
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:meeting_definition_event.php
示例18: mysql_query
} else {
if ($_POST['arg'] == "change") {
mysql_query("\r\n\t\t\t\tUPDATE anlage SET \r\n\t\t\t\t\tBezeichnung=\"" . $_POST['name'] . "\"\r\n\t\t\t\t\t, xStadion = {$stadium_id}\r\n\t\t\t\t\t, Homologiert = '{$homo}'\r\n\t\t\t\tWHERE xAnlage=" . $_POST['item']);
}
}
}
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
mysql_query("UNLOCK TABLES");
}
} else {
if ($_GET['arg'] == "del") {
mysql_query("LOCK TABLES serie READ, anlage WRITE");
// Check if not used anymore
if (AA_checkReference("serie", "xAnlage", $_GET['item']) == 0) {
mysql_query("DELETE FROM anlage WHERE xAnlage=" . $_GET['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
} else {
AA_printErrorMsg($strInstallation . $strErrStillUsed);
}
mysql_query("UNLOCK TABLES");
}
}
// get stadium name
$result = mysql_query("\r\n\tSELECT\r\n\t\tName\r\n\tFROM\r\n\t\tstadion\r\n\tWHERE xStadion = {$stadium_id}\r\n");
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
$stadium_name = "";
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:admin_installations.php
示例19: USING
WHERE start.xWettkampf = wettkampf.xWettkampf
AND wettkampf.xKategorie = $cCat
AND wettkampf.Mehrkampfcode = $cCode
AND wettkampf.xMeeting = ".$_COOKIE['meeting_id']."
AND start.xAnmeldung='" . $_GET['entry'] . "'
");*/
$sql = "UPDATE\r\n\t\t\t\t\t\t\tstart\r\n\t\t\t\t\t\tLEFT JOIN \r\n\t\t\t\t\t\t\twettkampf USING(xWettkampf)\r\n\t\t\t\t\t\tSET \r\n\t\t\t\t\t\t\tstart.Anwesend = '" . $present . "' \t\t\t\t\t\t\t\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\twettkampf.xKategorie = " . $cCat . "\r\n\t\t\t\t\t\tAND\t\r\n\t\t\t\t\t\t\twettkampf.Mehrkampfcode = " . $cCode . "\r\n\t\t\t\t\t\tAND\t\r\n\t\t\t\t\t\t\twettkampf.xMeeting = " . $_COOKIE['meeting_id'] . "\r\n\t\t\t\t\t\tAND\t\r\n\t\t\t\t\t\t\tstart.xAnmeldung='" . $_GET['entry'] . "';";
mysql_query($sql);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
}
}
} else {
// single normal event
if (AA_checkReference("serienstart", "xStart", $_GET['item']) != 0) {
AA_printErrorMsg($strErrAthleteSeeded);
} else {
$sql = "UPDATE start SET \r\n\t\t\t\t\t\tAnwesend='{$present}'\t\t\t\t\t\t\r\n\t\t\t\t\t\tWHERE xStart='" . $_GET['item'] . "'";
mysql_query($sql);
/*
// relay: set present to start record from relay
if ($relay){
$sql = "SELECT DISTINCT
s.xStaffel
FROM
staffel AS st
LEFT JOIN start AS s USING(xStaffel)
LEFT JOIN verein AS v ON(st.xVerein = v.xVerein)
LEFT JOIN staffelathlet AS stat ON(stat.xStaffelstart = s.xStart)
LEFT JOIN start AS s2 ON(s2.xStart = stat.xAthletenstart)
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:event_enrolement.php
示例20: AA_results_update
function AA_results_update($performance, $info, $points = 0)
{
require './lib/common.lib.php';
if ($performance != NULL) {
if (!empty($_POST['item'])) {
if (AA_checkReference("resultat", "xResultat", $_POST['item']) == 0) {
AA_printErrorMsg($GLOBALS['strErrAthleteNotInHeat']);
} else {
mysql_query("\r\n\t\t\t\t\tUPDATE resultat SET\r\n\t\t\t\t\t\tLeistung = {$performance}\r\n\t\t\t\t\t\t, Info = '{$info}'\r\n\t\t\t\t\t\t, Punkte = {$points}\r\n\t\t\t\t\tWHERE xResultat = " . $_POST['item']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
AA_StatusChanged($_POST['item']);
}
} else {
mysql_query("\r\n\t\t\t\tINSERT INTO resultat SET\r\n\t\t\t\t\tLeistung = {$performance}\r\n\t\t\t\t\t, Info= '{$info}'\r\n\t\t\t\t\t, Punkte = {$points}\r\n\t\t\t\t\t, xSerienstart = " . $_POST['start']);
if (mysql_errno() > 0) {
AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
}
AA_StatusChanged(mysql_insert_id());
}
// ET add or change
}
// ET valid data provided
}
开发者ID:laiello,项目名称:athletica,代码行数:25,代码来源:results.lib.php
注:本文中的AA_checkReference函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论