} $up = array(); foreach ($_REQUEST as $k => $v) { if (substr($k, 0, 2) == 'd_') { $v = StrSafe_DB($v); list(, $field) = explode('_', $k); $up[] = "{$field}={$v} "; } } $up = implode(',', $up); $q = "\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\tTournament\r\n\t\t\t\tSET\r\n\t\t\t\t\t{$up}\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tToId={$_SESSION['TourId']}\r\n\t\t\t"; //print $q;Exit; $r = safe_r_sql($q); // Get the "extra" options Set_Tournament_Option('OlympicFont', $font = preg_replace('/[^a-z0-9_ -]+/sim', '', $_REQUEST['OlympicFont'])); Set_Tournament_Option('OlympicFont-use', !empty($_REQUEST['OlympicFont-use']) and $font); // Set the records in which this tournament is going to work // Start deleting the records type attributions! // debug_svela($_REQUEST); safe_w_sql("delete from TourRecords where TrTournament={$_SESSION['TourId']}"); if (!empty($_REQUEST['Records'])) { // recreates the tabl foreach ($_REQUEST['Records'] as $Val) { $Flags = array(); if (!empty($_REQUEST['RecBar'][$Val])) { $Flags[] = 'bar'; } if (!empty($_REQUEST['RecGap'][$Val])) { $Flags[] = 'gap'; } safe_w_sql("insert into TourRecords\r\n\t\t\t\t\t\tselect distinct '{$_SESSION['TourId']}'\r\n\t\t\t\t\t\t\t, ReType\r\n\t\t\t\t\t\t\t, ReCode\r\n\t\t\t\t\t\t\t, ReTeam\r\n\t\t\t\t\t\t\t, RePara\r\n\t\t\t\t\t\t\t, '" . substr($_REQUEST['RecColor'][$Val], 1) . "'\r\n\t\t\t\t\t\t\t, '" . implode(',', $Flags) . "'\r\n\t\t\t\t\t\tfrom Records where ReType='{$Val}' and RePara=" . ($_SESSION['TourLocRule'] == 'PAR' ? '1' : '0'));
<?php require_once '../../config.php'; Set_Tournament_Option('AwardBackColor', $_REQUEST['Page_BGColor']); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Content-type: text/xml; charset=' . PageEncode); echo '<response><error>0</error></response>';
} if ($off = @strpos($Value, '/', 9)) { $Value = substr($Value, 0, $off); } $UseAPI = true; } else { $Value = ''; $UseAPI = false; } break; } Set_Tournament_Option($Option, $Value); } Set_Tournament_Option('UseApi', $UseAPI); } Set_Tournament_Option('TargetsToHHt', !empty($_REQUEST['TargetsToHHt'])); header('Location: ' . $CFG->ROOT_DIR . 'Common/TourOn.php?ToId=' . $_SESSION['TourId'] . '&BackTo=' . $CFG->ROOT_DIR . 'Tournament/index.php'); exit; } } } else { $Arr_Values2Check_Index = array('d_ToCode' => array('Func' => 'StrNotEmpty', 'Error' => true), 'd_ToName' => array('Func' => 'StrNotEmpty', 'Error' => true), 'd_ToCommitee' => array('Func' => 'StrNotEmpty', 'Error' => true), 'd_ToComDescr' => array('Func' => 'StrNotEmpty', 'Error' => true), 'd_ToWhere' => array('Func' => 'StrNotEmpty', 'Error' => true), 'x_ToWhenFrom' => array('Func' => 'GoodDate', 'Error' => true, 'Value' => (isset($_REQUEST['xx_ToWhenFromYear']) ? $_REQUEST['xx_ToWhenFromYear'] : '0000') . '-' . (isset($_REQUEST['xx_ToWhenFromMonth']) ? $_REQUEST['xx_ToWhenFromMonth'] : '00') . '-' . (isset($_REQUEST['xx_ToWhenFromDay']) ? $_REQUEST['xx_ToWhenFromDay'] : '00')), 'x_ToWhenTo' => array('Func' => 'GoodDate', 'Error' => true, 'Value' => (isset($_REQUEST['xx_ToWhenToYear']) ? $_REQUEST['xx_ToWhenToYear'] : '0000') . '-' . (isset($_REQUEST['xx_ToWhenToMonth']) ? $_REQUEST['xx_ToWhenToMonth'] : '00') . '-' . (isset($_REQUEST['xx_ToWhenToDay']) ? $_REQUEST['xx_ToWhenToDay'] : '00')), 'd_ToType' => array('Func' => 'StrNotEmpty', 'Error' => true), 'd_Rule' => array('Func' => 'StrNotEmpty', 'Error' => true)); } } } // $JS_SCRIPT = array( // '<script type="text/javascript" src="../Common/ext-2.2/adapter/ext/ext-base.js"></script>', // '<script type="text/javascript" src="../Common/ext-2.2/ext-all-debug.js"></script>', // '<script type="text/javascript" src="../Common/ext-2.2/ext.util/ext.util.js"></script>', // '<script type="text/javascript" src="Fun_AJAX_index.js"></script>', // );
----- Events ----- Phase ----- Group flag */ require_once dirname(dirname(__FILE__)) . '/config.php'; CheckTourSession(true); if (!empty($_REQUEST['Activate'])) { if (empty($_SESSION['ActiveSession'])) { $_SESSION['ActiveSession'] = array(); } if (in_array($_REQUEST['Activate'], $_SESSION['ActiveSession'])) { unset($_SESSION['ActiveSession'][array_search($_REQUEST['Activate'], $_SESSION['ActiveSession'])]); } else { $_SESSION['ActiveSession'][] = $_REQUEST['Activate']; } Set_Tournament_Option('ActiveSession', $_SESSION['ActiveSession']); CD_redirect(basename(__FILE__)); } require_once 'Common/Lib/Fun_Scheduler.php'; require_once './LibScheduler.php'; $edit = empty($_REQUEST['key']) ? '' : preg_replace('#[^0-9:| -]#sim', '', $_REQUEST['key']); $JS_SCRIPT = array('<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Common/ajax/ObjXMLHttpRequest.js"></script>', '<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Scheduler/Fun_AJAX_Scheduler.js"></script>', '<link href="' . $CFG->ROOT_DIR . 'Scheduler/Scheduler.css" media="screen" rel="stylesheet" type="text/css">'); $JS_SCRIPT[] = '<style> </style>'; include 'Common/Templates/head.php'; echo '<table class="Tabella"> <tr><th class="Main" colspan="10">' . get_text('Scheduler') . '</th></tr> <tr class="Divider"><td colspan="10"></td></tr> <tr class="Divider"><td colspan="10"><form action="./PrnScheduler.php" target="PDF"> <b>' . get_text('MenuLM_PrintScheduling') . ':</b> <input type="checkbox" name="Finalists">' . get_text('SchIncFinalists', 'Tournament') . '