<?php //WEBSITE STARTUP include_once '../../includes/class.init.php'; // include_once('../../includes/class.settings.php'); include_once '../../includes/class.competition.php'; include_once '../../includes/class.swiss.php'; include_once '../../includes/class.player.php'; $init = new init(1, 0, 0); include_once '../../includes/header.beheer.php'; include_once '../../includes/class.knsb.php'; $knsb = new knsb($settings, $init->errorClass, $init->notificationClass); $knsb->getRatings(92); ?> <body class="container" ng-app="svnKNSB"> <?php include "../../includes/menu.beheer.php"; ?> <div class="row hidden-print"> <div class="col-md-12" ng-controller="knsbLists"> <h1 class="hidden-print">KNSB Ratinglijst verwerken</h1> <h2>KNSB Rating</h2> <div class="form-group row"> <label for="knsbList" class="col-lg-2 control-label">Ratinglijst:</label> <div class="col-lg-3"> <select name="knsbList" class="form-control" ng-model="knsbList" ng-options="ratingList.value for ratingList in ratingLists track by ratingList.id" ng-change="knsbListGet(knsbList)"></select> </div> <button ng-click="knsbProcessExternalRatings(knsbList)" class="btn btn-primary pull-right">Verwerken</button> </div>
<?php include_once '../../includes/class.init.php'; $init = new init(1, 0, 0); include_once '../../includes/class.knsb.php'; $class = new knsb($settings, $init->errorClass, $init->notificationClass); include_once '../../includes/class.data.php'; $dataClass = new data(); $data = file_get_contents("php://input"); $objData = json_decode($data); if ($objData->action == "getLists") { echo json_encode($class->getRatingLists()); } if ($objData->action == "getList") { echo json_encode($class->getRatings($objData->list)); } if ($objData->action == "getKNSBList") { echo json_encode($class->getRatings($objData->list, $objData->club, $objData->date)); } if ($objData->action == "insertRating") { echo json_encode($class->insertRating($objData->date, $objData->player, $objData->rating)); } if ($objData->action == "insertKNSBRating") { echo json_encode($class->insertKNSBRating($objData->date, $objData->player, $objData->club, $objData->name, $objData->rating)); } if ($objData->action == "getClubs") { echo json_encode($dataClass->getClubs()); }