<h1>Guestbook</h1> <?php $websiteProperty = new WebsiteProperty(); ##################################### ## © 2008 Wouter De Schuyter ## <*****@*****.**> ## Guestbook V1.0 ##################################### // SET VARIABLES ////////////////// $minName = 2; // minimum lenght name $maxName = 32; // maximum lenght name $minEmail = 8; // minimum lenght email $maxEmail = 256; // maximum lenght email $minMessage = 8; // minimum lenght message $maxMessage = 2560; // maximum lenght message /////////////////// $act = $_GET['action']; // UBB CODE function ubb($string) { $array1 = array('[b]', '[/b]', '[u]', '[/u]', '[center]', '[/center]', '[i]', '[/i]'); $array2 = array('<b>', '</b>', '<u>', '</u>', '<center>', '</center>', '<i>', '</i>'); $output = str_replace($array1, $array2, $string);
<?php /****************************************************************** * Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: get-connected.php * Last update: 22-02-2012 ******************************************************************/ $stats = getstats(); echo '<h1>Get Connected Now</h1><p>This server is 100% compatible with the Spire GUI. A guide on how to get the Spire GUI <a target="_blank" href="http://wouterds.be/2011/12/27/how-to-install-the-first-legal-siri-gui-spire/465/">can be found here</a>.<br />After you got the GUI running up and well then you will need a Spire Proxy address.<br />Spire Proxy address: <strong>https://'; $websiteProperty = new WebsiteProperty(); echo $websiteProperty->getProperty('hostname_or_ip'); echo '</strong> (note that it uses <strong>https</strong> and there is <strong>no</strong> port number)</p><p>You will also need a certificate in order to make a secure connection to the server.<br />You can download the certificate here: <a href="files/certs/certificate.pem">certificate.pem</a>.<br />Open it with Mobile Safari to install. If you are having trouble then download it via PC/Mac/Linux and email it to yourself.</p><p class="notification yellow">If the instructions are not clear to you, you might try <a href="http://wouterds.be/2012/02/03/tutorial-how-to-install-the-the-three-little-pigs-siri-proxy-on-your-idevice/479/">watching this video tutorial</a>.<br />The server is accepting new people in <b>'; $secondsLeft = $websiteProperty->getProperty("accepting_people_in") - $stats['happy_hour_elapsed']; if ($secondsLeft < 0) { echo '<p class="notification green minimal">Happy Hour!</p>'; } else { if ($secondsLeft > 3600) { echo floor($secondsLeft / 3600) . ' hours '; echo floor($secondsLeft % 3600 / 60) . ' minutes'; } elseif ($secondsLeft > 60) { echo floor($secondsLeft / 60) . ' minutes '; echo $secondsLeft % 60 . ' seconds'; } else { echo $secondsLeft . ' seconds'; }
echo '<tr>'; echo '<td>' . ++$i . '</td>'; echo '<td>' . $data['ip'] . '</td>'; echo '<td>' . stripslashes($data['reason']) . '</td>'; echo '<td>' . $data['dtime'] . '</td>'; echo '<td style="text-align: center;"><a class="image" href="?page=' . $_GET['page'] . '&action=' . $_GET['action'] . '&do=' . $_GET['do'] . '&delete=' . $data['id'] . '">'; echo '<img src="design/img/delete.png" alt="delete" /></a></td>'; } } echo '</table>'; } echo '</div></div>'; break; case "logs": $log = new Log(); $websiteProperty = new WebsiteProperty(); ?> <p>On this page you can see last performed actions by admins.</p> <table width="100%"> <tr> <th width="20px">#</th> <th width="150px">User</th> <th>Action</th> <th width="150px">When</th> </tr> <?php $pid = $_GET['page-id']; if (empty($pid)) { $pid = 1; }
<?php /****************************************************************** * Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: feed-the-piggy.php * Last update: 22-02-2012 ******************************************************************/ echo '<h1>Feed The Three Little Pigs</h1><h2>This procedure is only for an iPhone 4S</h2><p>Below is a guide how to feed the Piggy a 4S key</p><ol><li>Install this certificate on the iPhone 4S <a href="files/certs/certificate.pem">certificate.pem</a></li><li>If the above certificate doesn\'t install then download it to your PC/Mac/Linux, and mail it to yourself. </li><li>Go to Settings > Wifi, press the blue arrow and change the DNS field to <b>'; $websiteProperty = new WebsiteProperty(); echo gethostbyname($websiteProperty->getProperty('hostname_or_ip')); echo '</b></li><li>Use Siri.</li><li>Done! <b>If Siri replied back to you then you just fed the Piggy another key.</b> Now check the <a href="?page=server-status">server status</a> to see if the key has been added!</li><li>In order to rollback to your old DNS just put the old DNS back, renew the lease or delete the DNS and quit the Settings app.</li></ol><p class="notification yellow">Warning! This is a public server and the validation data will be shared with more than one device! Although this server has several protections it is still possible the key gets blacklisted, however you can easily unblacklist your device (read as "Search on Google how to unblacklist").<br />PS: I take no responsibility for using this server, you agree that you do this on your own risk.</p>';
<?php /****************************************************************** * Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: clients.php * Last update: 22-02-2012 ******************************************************************/ echo '<h1>Clients</h1><p>Clients are people that were able to generate an assistant. Once you were able to generate an assistant you will be able to connect with this server as long as the maximum connections are not reached. If you\'re not on the list, than you haven\'t got an assistant generated by one of the keys on this server. The fields are pretty much self explanatory so I won\'t explain them fully.</p>'; $websiteProperty = new WebsiteProperty(); $pid = $_GET['page-id']; if (empty($pid)) { $pid = 1; } $sql = "SELECT id FROM clients ORDER BY id DESC "; $dataQuery = mysql_query($sql); $rowsQuery = mysql_num_rows($dataQuery); $lastPage = ceil($rowsQuery / $websiteProperty->getProperty('max_client_entries_per_page')); if ($pid < 1) { $pid = 1; } elseif ($pid > $lastPage) { $pid = $lastPage; } $max = 'LIMIT ' . ($pid - 1) * $websiteProperty->getProperty('max_client_entries_per_page') . ',' . $websiteProperty->getProperty('max_client_entries_per_page'); echo "<div id='pagination'>"; if ($pid > 1) {
<?php /****************************************************************** * Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: server-status.php * Last update: 22-02-2012 ******************************************************************/ $websiteProperty = new WebsiteProperty(); $statistics = new Statistics(); $keys = getkeys(); $config = getconfig(); $stats = getstats(); $server_running = $statistics->checkServer($websiteProperty->getProperty("hostname_or_ip") . ':443'); //error_reporting(0); ?> <h1>Server Status and Statistics</h1> <p>Hover with your mouse over the table headers to get a detailed explantion of what it is.</p> <div style="overflow: hidden"> <div style="width:300px; float:left; margin-right: 25px;"> <?php $keyFactor = 0; if (count($keys[0]) > 0) { foreach ($keys[0] as $key) {
include_once "inc/Faq.class.php"; include_once "inc/Key.class.php"; include_once "inc/config.inc.php"; include_once "inc/Admin.class.php"; include_once "inc/Client.class.php"; include_once "inc/Layout.class.php"; include_once "inc/functions.inc.php"; include_once "inc/connection.inc.php"; include_once "inc/Statistics.class.php"; include_once "inc/PageManager.class.php"; include_once "inc/Announcement.class.php"; include_once "inc/WebsiteProperty.class.php"; /* Build content ******************************************************************/ $pMgr = new PageManager("pages", "page"); $websiteProperty = new WebsiteProperty(); $ban = new Ban(); $layout = new Layout($websiteProperty->getProperty('website_title') . ' :: ' . $pMgr->getTitle(), $pMgr->navigation()); echo $layout->buildTop(); if ($ban->checkBan()) { echo '<p class="notification red">Your IP has been banned on ' . $ban->checkBan("dtime") . '<br />Reason: ' . $ban->checkBan("reason") . '</p>'; } else { if ($_GET['page'] == 'admin') { $pMgr->getPageContent(); } else { $announcement = new Announcement(); $dataArr = $announcement->getAnnouncements(); if ($dataArr !== false) { foreach ($dataArr as $data) { echo '<p class="notification ' . strtolower($data['announcement_type']) . '">[' . $data['date_added'] . '] ' . stripslashes($data['announcement_text']) . '</p>'; }
<?php /****************************************************************** * Project: The Three Little Pigs - Siri Proxy | Web Interface * Project start date: 21-01-2012 * Author: Wouter De Schuyter * Website: www.wouterds.be * E: info[@]wouterds[.]be * T: www.twitter.com/wouterds * * File: contact.php * Last update: 22-02-2012 ******************************************************************/ echo '<h1>Contact</h1>'; $websiteProperty = new WebsiteProperty(); if ($_SERVER['REQUEST_METHOD'] == "POST") { if (empty($_POST['firstName']) || empty($_POST['lastName']) || empty($_POST['email']) || empty($_POST['subject']) || empty($_POST['message']) || empty($_POST['captcha'])) { echo '<p id="response" class="notification red">All fields except website are required to be filled in. Please correct the errors and try again.</p>'; } else { if (@eregi("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})\$", $_POST['email'])) { if ($_POST['captcha'] !== $_SESSION['captcha']) { echo '<p id="response" class="notification red">The captcha code is not correct. Please correct the errors and try again.</p>'; } else { $headers = "From: The Three Little Pigs <*****@*****.**>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= "Reply-To: " . $_POST['firstName'] . " " . $_POST['lastName'] . " <" . $_POST['email'] . ">\r\n"; $to = $websiteProperty->getProperty('contact_name') . " <" . $websiteProperty->getProperty('contact_email') . ">\r\n"; $subject = "[The Three Little Pigs :: Contact] " . $_POST['subject']; $message = ' <html>