<?php
$str = '';
foreach ($mac_turleri as $turler) {
$str.= '<option value="'.$turler->get('betradar_id').'" '.(isset($_GET["sporttype"]) && $_GET["sporttype"] == $turler->get('tur_id') ? 'selected' : false).'>'.$turler->get('tur').'</option>';
}
$arr = array('result' => $str);
echo json_encode($arr);
?>
{readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}abort: ƒ (e)always: ƒ ()complete: ƒ ()done: ƒ ()error: ƒ ()fail: ƒ ()getAllResponseHeaders: ƒ ()getResponseHeader: ƒ (e)overrideMimeType: ƒ (e)pipe: ƒ ()progress: ƒ ()promise: ƒ (e)readyState: 4responseText: "↵↵↵ ↵<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.16/sl-1.2.3/datatables.min.css"/>↵ ↵<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.16/sl-1.2.3/datatables.min.js"></script>↵ <script type="text/javascript" src="/assets/js/json2.js"></script>↵ <script type="text/javascript" src="/assets/js/common_grid.js"></script>↵ ↵ <script type="text/javascript">↵ $(document).ready(function () {↵ //dateOffset_This = parseFloat($.cookie(timezone_cookie)) - dateOffset_Def;↵ $("#menu_bulten").addClass("active");↵ ↵ ↵ const myTable = $('#example').DataTable( {↵ "processing": true,↵ "serverSide": true,↵ ajax: {↵ url: "views/bulten/maclar?sporttype="+$("#MainContent_ddlSport").val()+"&country=0&lig=0",↵ type: "POST"↵ },↵ serverSide: true,↵ columns: [↵ { data: "ulke" },↵ { data: "lig" },↵ { data: "tarih" },↵ { data: "ev_sahibi" },↵ { data: "misafir" },↵ { data: "mbs" },↵ { data: "mac_id" },↵ { data: "toplam_oran" },↵ { data: "aktif" }↵ ],↵ ↵ ↵ } ); ↵ BindCountries(true,0,0);↵ BindLeauges(true,0,0,0);↵ ↵ });↵ </script>↵↵ <div class="container-fluid">↵ <div class="row-fluid">↵ <div class="span12">↵ ↵↵ ↵↵↵↵↵ <div class="row-fluid">↵ <div class="span12">↵ <div class="w-box w-box-blue">↵ <div class="w-box-header">↵ <h4>↵ Фильтр</h4>↵ </div>↵ <div class="w-box-content">↵<form method="GET" id="arama_form"> ↵ <div class="row-fluid">↵ <div class="span3">↵ <div class="formSep control-group">↵ <label for="" class="control-label">↵ Спорт</label>↵ <div class="controls">↵ <div>↵ ↵<select name="sporttype" id="MainContent_ddlSport" class="span8" onchange="$('#arama_form').submit()">↵ <option value="0" ID="liSelect">Seç</option>↵<!-- <br />↵<b>Notice</b>: Undefined variable: mac_turleri in <b>/var/www/belecky_web/data/www/belecky.online/panel/application/modules/bulten/controllers/Bulten.php</b> on line <b>97</b><br />↵<br />↵<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/belecky_web/data/www/belecky.online/panel/application/modules/bulten/controllers/Bulten.php</b> on line <b>97</b><br />↵ --> ↵<br />↵<b>Notice</b>: Undefined variable: mac_turleri in <b>/var/www/belecky_web/data/www/belecky.online/panel/application/modules/bulten/controllers/Bulten.php</b> on line <b>102</b><br />↵<br />↵<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/belecky_web/data/www/belecky.online/panel/application/modules/bulten/controllers/Bulten.php</b> on line <b>102</b><br />↵{"result":""}↵↵</select>↵ <label class="error hidden">↵ <span id="MainContent_lblSportReq"></span></label>↵ </div>↵ </div>↵ </div>↵ </div>↵ <div id="MainContent_dvBookMarker" class="span2" style="display:none;">↵ <div class="formSep">↵ <label for="ddlBookMarker" class="control-label">↵ Ставка компании</label>↵ <div class="controls">↵ ↵ </div>↵ </div>↵ </div>↵ <div class="span3">↵ <div class="formSep">↵ <label for="ddlCountry" class="control-label">↵ Страна</label>↵ <div class="controls">↵ <select name="country" id="ddlCountry" class="span8" onchange="$('#arama_form').submit()">↵ </select>↵ </div>↵ </div>↵ </div>↵ <div class="span3">↵ <div class="formSep">↵ <label for="ddlLeague" class="control-label">↵ Лига</label>↵ <div class="controls">↵ <select name="lig" id="ddlLeague" class="span8" onchange="$('#arama_form').submit()">↵ </select>↵ </div>↵ </div>↵ </div>↵ <div class="span1" style="margin-left: 0;">↵ <div class="formSep" style="padding-left: 0;">↵ <label for="ddlLeague" class="control-label">↵ </label>↵ <div class="controls">↵ <button type="submit" class="clsChangePrice btn btn-beoro-3" >Отправить</button>↵ </div>↵ </div>↵ </div>↵ </div>↵↵</form>↵ </div>↵ </div>↵ <div class="w-box w-box-green">↵ <div class="w-box-header">↵ <h4>↵ Список футбольных матчей</h4>↵ </div>↵ <div class="w-box-content">↵<table class="table" id="example">↵ <thead>↵<tr>↵<th>Страна</th>↵<th>Лига</th>↵<th>Дата начала</th>↵<th>Хозяин</th>↵<th>Гость</th>↵<th>МБС</th>↵<th>Betradar ID</th>↵<th>Ставки</th>↵<th>Состояние</th>↵</tr>↵</thead>↵↵ <tfoot>↵<tr>↵<th>Страна</th>↵<th>Лига</th>↵<th>Дата начала</th>↵<th>Хозяин</th>↵<th>Гость</th>↵<th>MBS</th>↵<th>Betradar ID</th>↵<th>Ставки</th>↵<th>Состояние</th>↵</tr>↵</tfoot>↵</table> ↵ <table id="jqGrid" class="ui-jqgrid">↵ </table>↵ <div id="jqPager" class="ui-jqgrid-pager">↵ </div>↵ </div>↵ </div>↵ </div>↵ </div>↵↵↵↵↵↵↵↵ </div></div></div>↵ </div>↵ "setRequestHeader: ƒ (e,t)state: ƒ ()status: 200statusCode: ƒ (e)statusText: "OK"success: ƒ ()then: ƒ ()__proto__: Object "parsererror" SyntaxError: Unexpected token < in JSON at position 8
at JSON.parse (<anonymous>)
at parseJSON (jquery.min.js:1)
at q (jquery.min.js:1)
at r (jquery.min.js:3)
at XMLHttpRequest.r (jquery.min.js:3)
function (stResponse) {
console.log(stResponse);
if (stResponse != '') { //stResponse.d != ''
var jsonData = stResponse;
if(seciliulke==0){
secilimi='Selected="selected" ';
console.log(secilimi);
}else{
secilimi='' ;
console.log("3");
}
var stHtmlSelect = '<option value="0" '+secilimi+'>Все страны</option>';
for (var i = 0; i < jsonData.length; i++) {
if(seciliulke==jsonData[i].Country_ID){
secilimi='Selected="selected" ';
}else{
secilimi='';
}
stHtmlSelect += '<option '+secilimi+' value="' + jsonData[i].Country_ID + '">' + jsonData[i].Country_Name + '</option>';
}
$('#ddlCountry').html(stHtmlSelect);
}
else {
window.location.href = '/';
}
}