From b9628f189b0ca2f7c411bd79566da37c73cc8e8f Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 21 Sep 2016 06:40:03 +0400 Subject: Demo in beta mode. --- demo/components/class-application.php | 106 ++++++++++++++++++++++++++++++++++ demo/components/communication.php | 16 +++++ demo/components/footer.php | 9 +++ demo/components/navbar.php | 24 ++++++++ demo/components/results.php | 12 ++++ demo/components/settings.php | 24 ++++++++ demo/index.php | 83 ++++++++++++++++++++++++++ demo/style.css | 40 +++++++++++++ test/components/communication.php | 17 ------ test/components/engine.php | 66 --------------------- test/components/footer.php | 9 --- test/components/navbar.php | 36 ------------ test/components/results.php | 20 ------- test/components/settings.php | 24 -------- test/index.php | 39 ------------- test/javascript.js | 3 - test/style.css | 38 ------------ 17 files changed, 314 insertions(+), 252 deletions(-) create mode 100644 demo/components/class-application.php create mode 100644 demo/components/communication.php create mode 100644 demo/components/footer.php create mode 100644 demo/components/navbar.php create mode 100644 demo/components/results.php create mode 100644 demo/components/settings.php create mode 100644 demo/index.php create mode 100644 demo/style.css delete mode 100644 test/components/communication.php delete mode 100644 test/components/engine.php delete mode 100644 test/components/footer.php delete mode 100644 test/components/navbar.php delete mode 100644 test/components/results.php delete mode 100644 test/components/settings.php delete mode 100644 test/index.php delete mode 100644 test/javascript.js delete mode 100644 test/style.css diff --git a/demo/components/class-application.php b/demo/components/class-application.php new file mode 100644 index 0000000..bdd6419 --- /dev/null +++ b/demo/components/class-application.php @@ -0,0 +1,106 @@ +session($_COOKIE['BOT_SESSION']); + } else { // Open a new one + $session = $bot->session(); + SetCookie("BOT_SESSION", $session); + } + + // We issue results + if (isset($session)) { + return $session; + } else { + return 0; + } +} + +/** +* The function returns the current ID. +* Returns zero if no ID is stored. +*/ +function GetID() { + // Search current ID... + if (isset($_COOKIE['CURRENT_ID'])) { + $id = (int)$_COOKIE['CURRENT_ID'] + 1; + // ...or returns zero + } else { + $id = 0; + } + // We issue results + return $id; +} + +/** +* The function overrides the current ID to +* the specified or the next. If any missing ID +* returns the one. +* @param $id - Current ID. +*/ +function SetID($id) { + // Process the specified ID... + if (isset($id)) { + $id = $id + 1; + // ...Or are saved... + } elseif (isset($_COOKIE['CURRENT_ID'])) { + $id = (int)$_COOKIE['CURRENT_ID'] + 1; + // ...Or return one + } else { + $id = 1; + } + SetCookie('CURRENT_ID', $id, time()+300); // Save the result + // We issue results + return $id; +} + +/** +* The function maintains a history of conversations, +* using a database of cookie files. +* @param $currentid - Message ID. +* @param $textarea - Message text. +* @param $type - Who said (Man / Bot). +*/ +function SavingStories($currentid, $textarea, $type) { + // We form an array with values + $cookie = array( + 'type' => $type, + 'textarea' => $textarea, + 'time' => time()); + // Save by encoding in JSON-string + SetCookie("TALK".$currentid, json_encode($cookie), time()+60); +} + +/** +* Function line formation. +* @param $id - Variable Message ID. +*/ +function ShowRecord($id) { + for ($i=0; $i < $id; $i++) { + if (isset($_COOKIE['TALK'.$i])) { + $cookie = json_decode($_COOKIE['TALK'.$i], true); + echo(""); + echo("".$cookie['type'].""); + echo("".$cookie['textarea'].""); + echo("".date("H:i:s", $cookie['time']).""); + echo(""); + } + } +} ?> diff --git a/demo/components/communication.php b/demo/components/communication.php new file mode 100644 index 0000000..e73be75 --- /dev/null +++ b/demo/components/communication.php @@ -0,0 +1,16 @@ + +
+
+ +
+ +
+ +
+ + +
+
+
+
+ diff --git a/demo/components/footer.php b/demo/components/footer.php new file mode 100644 index 0000000..b1df881 --- /dev/null +++ b/demo/components/footer.php @@ -0,0 +1,9 @@ + + + diff --git a/demo/components/navbar.php b/demo/components/navbar.php new file mode 100644 index 0000000..9fcb9ee --- /dev/null +++ b/demo/components/navbar.php @@ -0,0 +1,24 @@ + + + diff --git a/demo/components/results.php b/demo/components/results.php new file mode 100644 index 0000000..4ae9332 --- /dev/null +++ b/demo/components/results.php @@ -0,0 +1,12 @@ +
+
+ + + + + + + +
#TextDate
+
+
diff --git a/demo/components/settings.php b/demo/components/settings.php new file mode 100644 index 0000000..fe8e5ff --- /dev/null +++ b/demo/components/settings.php @@ -0,0 +1,24 @@ + + + diff --git a/demo/index.php b/demo/index.php new file mode 100644 index 0000000..29a3609 --- /dev/null +++ b/demo/index.php @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + Testing conversational bot + + + + +
+ + + + + + + + say($currenttext), 'bot'); // Save bot response + header("Location: ".$_SERVER["REQUEST_URI"]); // Reloading the page + } + + // Connecting the system interface + include("components/communication.php"); // Settings panel + include("components/results.php"); // Output messages + ?> +
+ + + diff --git a/demo/style.css b/demo/style.css new file mode 100644 index 0000000..abb8316 --- /dev/null +++ b/demo/style.css @@ -0,0 +1,40 @@ +html { + position: relative; + min-height: 100%; +} + +body { + margin-bottom: 60px; +} + +body > .container { + padding: 60px 15px 0; +} + +textarea.form-control { + resize: none; +} + +.footer { + background-color: #f5f5f5; + position: absolute; + height: 60px; + width: 100%; + bottom: 0; +} + +.container .text-muted { + margin: 20px 0; +} + +/* Loaded one icon from GitHub */ +.github-fork { + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJUAAACVCAYAAABRorhPAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHEFJREFUeNrsXWlwVNeVPg1aQCtowTaoJdSL1NrQhlgk7CSTmSR2pmpScWYs/0jAmYDzY5I4M7anagIkBqdSjrHH2K6UESJge2oMSZxMqmaM4wWDCcggQIAkJIGNrR3tG0JgS+p53319u1+/XtVPS7d0DzzU3WqJ061P3zn3nHO/q7NarSRsaqaTjN+0XYts12LpClNd4bgiIqMTV+qN/2U2GU2RERHU1t5OLa3tQfF6YmNjKMNsIu5Xc0vrswM9zbukT01I16Tto9V2m2y35Rtu8BMmIDIjgApXXhGRUcnRcckHc7Itpvj4eDr2wYf0+eefB81rys3JIu7Xndtjzw/0tvxK8fqmbAJUMwOoCP4xPCIq+Z5VxoOrUlYao6OjqaGhKWgAFSP5k6JfRdyv27fH9g72tjyj9fsKUE0voCIUoJIAtXRF3PK7KouK8o0T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bCNDIVBuySkxLpch3EMjrEtIGwwJkKvTxjehpFx8TQxYu1NDIsxDKEaQRV/pocKfQtpQ9PnhatF2HaQOUQy4hm+/IEoIRpAhVWeWuLC9kh1merL1B/fx8A9aINSAJQwqaeqEMsIzExgU0b9PR27+/vaX5BMJSwgJiKiWVkmpl464ULF6m3t2ffUF/bXhtwvlBdAlDCfIMqy5LJ9uW9L4tl/EYC1As2wIwrLgEoYf6BymLJoJjYaLrSwMQyXh7sa33OBppJG4DU4BKAEuYdVChsVp89TzdHR/dKgNqjABQHz4QCWAJQwnyD6uq1j2l4ePj5gd6WZ2yPWVWgUn8UgBLm1XTLk9N+PdDT/CvFY0pQqQHmBKjAlY2t3m87nQ7v/HW+7qu+XJgPGx7o0PT1bk98kK4Ycmgp8mdMKsAzqbpvdYMGYQvUPEleT6hA5esSgBLms6Qw6SYWuQORAJQwv0E14SXpsXpJgIQJ8wgqqx8ZtACUsIDDn6+lmjBhfoFKgEjYjIY/YcI02yLxFggToBIW/OFPtO6ECaYSJkAlTIBKmDABKmHBZ/8vwACkAXHUCodrdwAAAABJRU5ErkJggg=='); + background-size: cover; + position: absolute; + height: 149px; + width: 149px; + border: 0; + left: 0; + top: 0; +} diff --git a/test/components/communication.php b/test/components/communication.php deleted file mode 100644 index 3f00204..0000000 --- a/test/components/communication.php +++ /dev/null @@ -1,17 +0,0 @@ - -
-
- -
- -
- -
- - - -
-
-
-
- diff --git a/test/components/engine.php b/test/components/engine.php deleted file mode 100644 index bc89d8e..0000000 --- a/test/components/engine.php +++ /dev/null @@ -1,66 +0,0 @@ -"); - echo("".$cookie['type'].""); - echo("".$cookie['textarea'].""); - echo("".date("H:i:s", $cookie['time']).""); - echo(""); - } - return 0; -} - - if (isset($_COOKIE['BOT_TOKEN'])) { - $BOT_TOKEN = $_COOKIE['BOT_TOKEN']; - } - - if (isset($_POST['BOT_TOKEN'])) { - unset($_COOKIE); // Clear the session - SetCookie("BOT_TOKEN", htmlspecialchars($_POST['BOT_TOKEN'])); - $BOT_TOKEN = htmlspecialchars($_POST['BOT_TOKEN']); - } - - if (isset($BOT_TOKEN)) { - define('BOT_TOKEN', $BOT_TOKEN); - $bot = new Bot(BOT_TOKEN); - if (isset($_COOKIE['BOT_SESSION'])) { - $session = $bot->session($_COOKIE['BOT_SESSION']); - } else { - $session = $bot->session(); - SetCookie("BOT_SESSION", $session); - } - if (!isset($session)) { ?> -
- -
- 'user', - 'textarea' => $textarea, - 'time' => time() - ); - SetCookie("TALK".$current_id, json_encode($cookie)); - - $current_id = $current_id+1; - SetCookie('CURRENT_ID', $current_id+1); - $cookie = array( - 'type' => 'bot', - 'textarea' => $bot->say($textarea), - 'time' => time() - ); - SetCookie("TALK".$current_id, json_encode($cookie)); - } -?> diff --git a/test/components/footer.php b/test/components/footer.php deleted file mode 100644 index fa5a161..0000000 --- a/test/components/footer.php +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/test/components/navbar.php b/test/components/navbar.php deleted file mode 100644 index ed858b5..0000000 --- a/test/components/navbar.php +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/test/components/results.php b/test/components/results.php deleted file mode 100644 index def09b1..0000000 --- a/test/components/results.php +++ /dev/null @@ -1,20 +0,0 @@ -
-
- - - - - - - -
#TextDate
-
-
diff --git a/test/components/settings.php b/test/components/settings.php deleted file mode 100644 index fe8e5ff..0000000 --- a/test/components/settings.php +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/test/index.php b/test/index.php deleted file mode 100644 index dd44afc..0000000 --- a/test/index.php +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - Testing conversational bot - - - - -
- - -
- - - diff --git a/test/javascript.js b/test/javascript.js deleted file mode 100644 index 22e0185..0000000 --- a/test/javascript.js +++ /dev/null @@ -1,3 +0,0 @@ -jQuery(function () { - $('[data-toggle="popover"]').popover() -}) diff --git a/test/style.css b/test/style.css deleted file mode 100644 index a2058d8..0000000 --- a/test/style.css +++ /dev/null @@ -1,38 +0,0 @@ -html { - position: relative; - min-height: 100%; -} - -body { - margin-bottom: 60px; -} - -body > .container { - padding: 60px 15px 0; -} - -textarea.form-control { - resize: none; -} - -.footer { - background-color: #f5f5f5; - position: absolute; - height: 60px; - width: 100%; - bottom: 0; -} - -.container .text-muted { - margin: 20px 0; -} - -/* Loaded one icon from GitHub */ -.github { - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNTE3OEEyQTk5QTAxMUUyOUExNUJDMTA0NkE4OTA0RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNTE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EDRlCXQrmy50P1oDRKTSegmNbUsA0zDMwRhPJXeCE3vWLPQMvan6X8AgIa1vcR4AkGZkDR4ejJ1UHpsaVI0g2LInpOsNFUud1rhxSV+fzC9Woz2EZkWQuja7/B+jUrgtIMpy9YCW4n4K41YfzRneW5E1KJTe4B2Zq1Q5EHEtj4U3AfEzR5SVY4l7QYQPJdN2as7RKBF0BPZqqH4VgMAMBL8Byxr7y8zCZiDlnOcEKIPmUpgB5Z2ww5RdOiiRiNajUmWda5IG6WbhsyY2fx6m8gLcoJDJFkH219M3We1+cnda93pfycZpIJEL/s/wSYADmOAwAQgdpBAAAAABJRU5ErkJggg=='); - background-size: cover; - margin: 2px 5px; - height: 15px; - width: 15px; - float:left; -} -- cgit v1.2.3