templates

This commit is contained in:
Tóth Richárd
2018-09-18 23:38:14 +02:00
parent 1db830ca71
commit 59c984dd9b
16 changed files with 646 additions and 229 deletions

View File

@@ -0,0 +1,26 @@
<?php
//tag listánál ez adja vissza a keresés eredményét
ini_set('include_path', '../_class/');
include('class_sql.php');
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach');
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
if (empty($_GET['template_id'])) {
echo json_encode(null);
}
else {
$template_query = "SELECT * FROM training_template WHERE tt_id = " . $_GET['template_id'];
$template_assoc_array = $sql->assoc_array($template_query);
if (isset($template_assoc_array[0])) {
echo json_encode($template_assoc_array[0]);
}
else {
echo json_encode(null);
}
}
?>