switch ($action) { case 'saverequest': require_once "model/Request.php"; $game = $_POST['game']; $money = $_POST['money']; $adena = $_POST['adena']; $server = $_POST['server']; $col = $_POST['col']; $nickname = $_POST['nickname']; $contact = $_POST['contact']; $comment = $_POST['comment']; $link = $connection->getLink(); $request = new Request($game, $server, $col, $money, $adena, $nickname, $contact, $comment, $link); if ($request->isValid()) { echo "OK"; saveRequest($link, $request); die; } else { echo "ERROR"; die; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Luxory-trade.ru</title> <link rel="shortcut icon" href="Favicon.ico" type="image/x-icon">
<?php include '../../settings.php'; include '../../inc/login_functions.php'; include '../../inc/helper.php'; include 'functions.php'; $logedIn = access($mysqli); $result = saveRequest($mysqli, $_SESSION['userId'], getUserData($mysqli, $_SESSION['userId'], "email")); /* direkt zu thanl You direkten */ if ($result === 1) { header("Location: ../Request/thankYou.php"); exit; } if ($result === 2) { header("Location: ../../404.php"); exit; } $placeholder = "Hi advilist, \nich bin auf der Suche nach einem neuen Multimedia Notebook. Ich würde gerne Blu Rays darauf schauen und das Notebook an meinen Fernseher anschließen können. Außerdem wäre es super, wenn neue PC-Spiele darauf laufen würden... \n\nViele Grüße Martin"; include "../../inc/head.php"; ?> <section id="Content" role="main"> <div class="container"> <!-- SECTION EMPHASIS 1 --> <!-- FULL WIDTH --> </div><!-- !container --> <div class="full-width section-emphasis-1 page-header"> <div class="container"> <header class="row"> <div class="col-md-12">
} $query = urlclean($query); // Save query saveRequest($query); $app->render('layout.php', ['page' => 'search', 'results' => search($query), 'query' => $query, 'video' => getVideo($query), 'title' => ucwords($query) . ' download mp3 music | Mp3Cooll.com', 'description' => 'Download ' . ucwords($query) . ' mp3 and listen online song ' . ucwords($query) . ' just now unlimited. Watch video ']); })->conditions(['query' => '.+']); /** * Search route */ $app->get('/search', function () use($app) { $query = urlclean($_GET['q']); if (strlen($query) < 1) { $app->redirect('/'); } // Save query saveRequest($query); $app->render('layout.php', ['page' => 'search', 'results' => search($query), 'query' => $query, 'video' => getVideo($query), 'title' => ucwords($query) . ' download mp3 music | Mp3Cooll.com', 'description' => 'Download ' . ucwords($query) . ' mp3 and listen online song ' . ucwords($query) . ' just now unlimited. Watch video ']); }); /** * Autocomplete route */ $app->get('/autocomplete', function () use($app) { //$_GET['query'] echo json_encode(['query' => $_GET['query'], 'suggestions' => getAutocompleteData($_GET['query'])]); }); /** * Search route */ $app->get('/:query', function ($query) use($app) { $app->redirect('/' . urlclean($query, '-') . '.html'); })->conditions(['query' => '.+']);
$message = 'channel is not set.'; error($message); exit; } //------------------------------------------------------------------- $inputPath = 'php://input'; // 動作検証様に取得したファイルを使用する場合はここを設定してください //$inputPath = "./tmp/request_xxxxxxxxxxxxxx.txt"; $rawJson = file_get_contents($inputPath); if (!$rawJson) { $message = 'request body is not set. request channel:' . $channel; error($message); exit; } // リクエストを保存 saveRequest($rawJson); $aryJson = json_decode($rawJson, true); //var_dump($aryJson); // リクエストされた内容を整形 $message = RequestDataFormatter($aryJson); if (!$message) { $message = 'request is not supported. request channel:' . $channel . " request data:" . $file; error($message); exit; } systemLog($message); // slackにメッセージ送信 $messageData = SlackApiSendMessage($message, $channel); if ($messageData['ok'] !== true) { // メッセージ送信でエラーの場合 $message = 'send message_error:' . "\n" . $message . "\n" . var_export($messageData, true);
<?php session_start(); require "database/connect.php"; require "database/requests.php"; $userID = $_SESSION["id"]; if (isset($_POST["request_type"])) { saveRequest($userID, $_POST["request_type"], $_POST["request_start"], $_POST["request_end"], $_POST["request_message"]); header('Location: main.php'); } $pageTitle = "Requests"; $javascript = "calendar.js"; if ($_SESSION["type"] == "3") { require 'includes/adminHeader.php'; } else { require 'includes/userHeader.php'; } ?> <table style="margin:16px"> <tr> <td>Type</td> <td> <select name="request_type" id="request_type"> <option value="1">Vacation</option> <option value="2">Sick</option> <option value="3">Shift Change</option> <option value="4">Other</option> </select> </td> </tr>