File: public/whip/index.php

Recommend this page to a friend!
  Classes of FN  >  PHP Typo3 Slack Channel Bot  >  public/whip/index.php  >  Download  
File: public/whip/index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Typo3 Slack Channel Bot
Chat bot to interact in Typo3 Slack channel
Author: By
Last change:
Date: 2 years ago
Size: 4,839 bytes


Class file image Download
<!DOCTYPE html>
function cmd($command)
exec($command, $output);

$action = $_GET['action'] ?? null;
    if (
in_array($action, ['start', 'stop', 'restart'], true)) {
$result = cmd('sudo /etc/init.d/botty ' . $action);
<html lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="I am in each channel on slack, even if you do not see me. Talk to me by start a message with @T3Bot or with the command prefix.">
    <meta name="author" content="Frank Nägler">
    <link rel="apple-touch-icon" sizes="57x57" href="/Resources/Public/Assets/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/Resources/Public/Assets/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/Resources/Public/Assets/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/Resources/Public/Assets/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/Resources/Public/Assets/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/Resources/Public/Assets/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/Resources/Public/Assets/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/Resources/Public/Assets/apple-touch-icon-152x152.png">
    <link rel="icon" type="image/png" href="/Resources/Public/Assets/favicon-196x196.png" sizes="196x196">
    <link rel="icon" type="image/png" href="/Resources/Public/Assets/favicon-160x160.png" sizes="160x160">
    <link rel="icon" type="image/png" href="/Resources/Public/Assets/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/Resources/Public/Assets/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/Resources/Public/Assets/favicon-32x32.png" sizes="32x32">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/Resources/Public/Assets/mstile-144x144.png">


    <!-- Bootstrap core CSS -->
    <link href="/Resources/Public/Css/bootstrap.min.css" rel="stylesheet">
    <link href="//" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/Resources/Public/Css/cover.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src=""></script>
    <script src=""></script>
<a href=""><img style="position: absolute; top: 0; right: 0; border: 0;" src="" alt="Fork me on GitHub" data-canonical-src=""></a>
<div class="site-wrapper">
    <div class="site-wrapper-inner">
            <div class="inner cover">
                <h1>Botty Control Center</h1>
                <a href="index.php?action=start" class="btn btn-success col-lg-4">Start</a>
                <a href="index.php?action=restart" class="btn btn-warning col-lg-4">Restart</a>
                <a href="index.php?action=stop" class="btn btn-danger col-lg-4">Stop</a>
                <?php if ($result !== null) {
<div class="result" style="text-align: left;">
<pre><?php foreach ($result as $row) {
<?= $row
. chr(10) ?>
} ?></pre>
} ?>
            <div class="mastfoot">
                <div class="inner">
                    <p>Cover template for <a href="">Bootstrap</a>, by <a href="">@mdo</a>.</p>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src=""></script>
<script src="/Resources/Public/JavaScript/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="/Resources/Public/JavaScript/ie10-viewport-bug-workaround.js"></script>

For more information send a message to info at phpclasses dot org.