<?
set_include_path("..");
require_once("offensive/assets/header.inc");
// Include, and check we've got a connection to the database.
require_once( 'admin/mysqlConnectionInfo.inc' );
if(!isset($link) || !$link) $link = openDbConnection();

mustLogIn(array("prompt" => "http",
                "token" => null));

require_once("offensive/assets/conditionalGet.inc");
require_once("offensive/assets/functions.inc");

require_once("offensive/assets/classes.inc");
require_once("offensive/assets/core.inc");
require_once("offensive/assets/id3.inc");

$sql = "SELECT offensive_uploads.timestamp
		FROM offensive_uploads USE KEY (t_t_id)
			LEFT JOIN users ON offensive_uploads.userid = users.userid
		WHERE type='audio' AND status='normal'
 		ORDER BY timestamp DESC
		LIMIT 1";
$res = tmbo_query($sql);
$row = mysql_fetch_array($res);
$lastBuildDate = array_pop($row);
$lastBuildTime = strtotime($lastBuildDate);
conditionalGet($lastBuildTime);

header( "Content-type: text/xml" ); 
?>
<?php

set_include_path("..");
require("offensive/assets/header.inc");
// Include, and check we've got a connection to the database.
require_once('admin/mysqlConnectionInfo.inc');
if(!isset($link) || !$link) $link = openDbConnection();
require_once('offensive/assets/functions.inc');
mustLogIn();

require_once("offensive/assets/classes.inc");

$p = array_key_exists("p", $_REQUEST) ? $_REQUEST['p'] : 0 ;

function poast($comment, $image, $upload) {
	$comment = new Comment($comment['commentid']);
	if(!me()->squelched($comment->commenter()->id())) {
		$com = $comment->HTMLcomment();
		$com = explode("\n", $com);
		if(count($com) <= 10) { 
			$com = implode("<br />", $com);
			echo $com;
		} else {
			for($i = 0; $i < 10; $i++) {
				echo $com[$i] . "<br />";
			}?>
				<blockquote>
					<span class="abbr">Comment too long. Click <a href="<?= Link::comment($comment) ?>">here</a> to view the full text.</span>
				</blockquote>
			<?
		}
Beispiel #3
0
<?php

set_include_path("../..");
// set up the normal TMBO environment
require_once( 'offensive/assets/header.inc' );
require_once( "offensive/assets/activationFunctions.inc" );
require_once( 'admin/mysqlConnectionInfo.inc' );
if(!isset($link) || !$link) $link = openDbConnection();
require_once("offensive/assets/functions.inc");
require_once("offensive/assets/argvalidation.inc");
require_once("offensive/assets/classes.inc");

mustLogIn(array("method" => "http",
                "token" => null));

$uri = $_SERVER["REQUEST_URI"];

$broken = explode("/", $uri);
$call = array_pop($broken);
list($func, $rtype) = explode(".", $call);

// validate the function call is valid
if(!is_callable("api_".$func)) {
	header("HTTP/1.0 404 Not Found");
	header("Content-type: text/plain");	
	echo "the function you requested ($func) was not found on this server.";
	exit;
}

call_user_func("api_".$func);