Example #1
0
File: send.php Project: arturu/sbot
	<div id="content" class="clearfix">
		<div class="content-row">
			<h1>
<?php 
include "config.php";
include "init.php";
include "functions/function.php";
include "functions/functionDb.php";
//Recupero il valore del parametro "nome"
$testo_ricevuto = filter_input(INPUT_POST, 'testo', FILTER_SANITIZE_STRING);
/******
 * questa fase cicla sugli utenti attivi inseriti nel database e per ciascun id
 * richiama la funzione sendMessage per spedire il testo passato con post
 * ogni chat_id una singola spedizione messaggio
 ******/
$activeUsers = dbActiveUsers();
foreach ($activeUsers as $user) {
    sendMessage($user, $testo_ricevuto);
}
$numeroInvi = dbCountActiveUsers();
dbLogTextSend($testo_ricevuto, $_SESSION['username'], '', '');
echo '<p>Hai inviato il seguente testo: <br> "<strong>' . $testo_ricevuto . '</strong>"</p>';
echo '<p>Ha inviato il testo a <strong>' . $numeroInvi . '</strong> utenti del servizio.</p>';
?>
				</h1>
			</div>			
	</div>

<?php 
include 'theme/footer.php';
Example #2
0
File: user.php Project: arturu/sbot
<?php

include 'theme/verification.php';
include 'theme/header.php';
include 'functions/function.php';
include 'functions/functionDb.php';
include 'config.php';
include 'init.php';
$userActive = dbCountActiveUsers();
?>

	<div id="content" class="clearfix">
            <div align="center">
                <!-- Utenti attivi inseriti nel database  -->
                <h2>Ci sono attualmente <strong> <?php 
echo $userActive;
?>
 </strong> utenti attivi in {S}BOT.</h2>
                <table border="1" align="center">
                    <tr>
                        <td>ID utente</td>
                        <td>First name</td>
                        <td>Last name</td>
                        <td>Date add user</td>
                    </tr>
                    <?php 
$activeUsers = dbActiveUsersFull();
foreach ($activeUsers as $user) {
    echo '<tr>';
    echo '<td>' . $user['UserID'] . '</td>';
    echo '<td>' . $user['FirstName'] . '</td>';