} elseif ('/events' == $uri && isset($_SESSION['uid'])) { list_events_action($_SESSION['uid']); } elseif ('/tag/delete' == substr($uri, 0, 11) && isset($_GET['uid'])) { delete_tag_action($_SESSION['uid'], $_GET['uid']); } elseif ('/tag' == substr($uri, 0, 4) && isset($_GET['uid'])) { modify_tag_action($_SESSION['uid'], $_GET['uid']); } elseif ('/coffee' == substr($uri, 0, 7) && isset($_GET['uid'])) { coffee_order_action($_GET['uid']); } elseif ('/soda' == substr($uri, 0, 5) && isset($_GET['uid'])) { soda_order_action($_GET['uid']); } elseif ('/help' == $uri) { help_action(); } elseif ('/kfet' == $uri) { kfet_action(); } elseif ('/about' == $uri) { about_action(); } elseif ('/dashboards' == $uri) { dashboards_action(); } elseif ('/dashboard.json' == $uri) { dashboard_json_action(); } elseif ('/stats.json' == substr($uri, 0, 11) && isset($_GET['uid'])) { stats_json_action($_GET['uid']); } elseif ('/stats.tsv' == substr($uri, 0, 10) && isset($_GET['uid'])) { stats_tsv_action($_GET['uid']); } elseif ('/coffees.tsv' == substr($uri, 0, 12) && isset($_GET['months'])) { coffees_tsv_action($_GET['months']); } elseif ('/dashboard' == substr($uri, 0, 10)) { dashboard_action(); } elseif ('/energy.json' == substr($uri, 0, 12) && isset($_GET['power']) && isset($_GET['energy'])) { energy_json_action($_GET['power'], $_GET['energy']); } elseif ('/grid.json' == $uri) {
/** * точка входа в программу * подгружение model,controller. */ echo $_SERVER["REQUEST_URI"]; $uri = $_SERVER["REQUEST_URI"]; $u = explode('?', $uri); $uri = $u[0]; echo "<br>newUri=" . $uri; if ($uri == "/2ktvrp/subbotin/" or $uri == "/2ktvrp/subbotin/index.php") { $response = list_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/admin") { $response = admin_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/autor") { $response = autor_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/about") { $response = about_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/show") { $response = show_action($_REQUEST['id']); } elseif ($uri == "/2ktvrp/subbotin/index.php/edit") { $response = edit_action($_REQUEST['id']); } elseif ($uri == "/2ktvrp/subbotin/index.php/edit_submit") { $response = admin_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/delete") { $response = delete_action($_REQUEST['id']); } elseif ($uri == "/2ktvrp/subbotin/index.php/add") { $response = add_action(); } elseif ($uri == "/2ktvrp/subbotin/index.php/users") { $response = users_action(); }