Exemplo n.º 1
0
function scheduleview($schedule)
{
    $truetime = explode(" ", $schedule['schedule_date']);
    $hourminute = explode(":", $truetime[1]);
    echo '<table border="0" cellpadding="1" align="center" id="scheduleheader">' . "\n";
    echo '<tr><th>' . $schedule['player_name'] . " scheduled, <br>" . "On " . $truetime[0] . " at " . $hourminute[0] . ":" . $hourminute[1] . "<br/>" . '<font size="5">' . ($schedule["schedule_title"] ? "{$schedule['schedule_title']}" : "No title.") . "</font></th></tr>";
    echo '<tr><td width="400"><hr>' . ($schedule["schedule_desc"] ? ansi2html($schedule['schedule_desc']) : "No description.") . "</td></tr>\n";
    echo "</table>";
}
Exemplo n.º 2
0
function poseview($scene)
{
    global $rownum, $posecount;
    echo "\n<tr class=\"{$rownum}\" id=\"" . $scene['pose_id'] . " pose" . ($scene['pose_ignore'] ? ' ignore' : '') . "\">";
    $views = array('order_id' => $_REQUEST['showid'], 'player_name' => '1', 'pose_time' => $_REQUEST['showtime'], 'pose' => '1');
    foreach ($views as $view => $value) {
        if ($value != false && $value != "false") {
            echo "\n\t<td class=\"{$view} pose\">" . ansi2html($scene[$view]) . "</td>";
        }
    }
    echo "\n</tr>";
    $rownum = $rownum == "even" ? "odd" : "even";
    $posecount++;
}
Exemplo n.º 3
0
function sceneview($scene, $ownername)
{
    switch ($scene['scene_state']) {
        case 0:
            $state = 'Active';
            break;
        case 1:
            $state = 'Paused';
            break;
        case 2:
            $state = 'Unfinished';
            break;
        case 3:
            $state = 'Finished';
            break;
    }
    echo '<tr class="' . $scene['scene_id'] . '">';
    echo '<td class="sceneid">' . $scene['scene_id'] . '</td>';
    echo '<td class="scenestate state_' . $state . '">' . $state . '</td>';
    echo '<td class="sceneowner"><a href="view.php?owner=' . $scene['player_id'] . '">' . str_replace(' ', '&nbsp;', $ownername) . '</a></td>';
    echo '<td class="scenetitle"><a href="view.php?id=' . $scene['scene_id'] . '">' . ($scene['scene_title'] ? $scene['scene_title'] : 'No Title Set') . '</a></td>';
    echo '<td class="scenedesc">' . ansi2html($scene['scene_desc'] ? $scene['scene_desc'] : 'No Description Set') . '</td>';
    echo '</tr>';
}
Exemplo n.º 4
0
<?php

header("Content-Type: application/rss+xml");
require 'ansi.php';
require 'db.php';
$q = $scenedb->query("select `schedule_id`, `schedule_title`, `schedule_time`, `schedule_description` from `{$db_prefix}{$db_schedule}` ORDER BY `schedule_time` DESC");
while ($line = mysqli_fetch_assoc($q)) {
    $return[] = $line;
}
$now = str_ireplace('UTC', 'UT', date("D, d M Y H:i:s T"));
$output = "<?xml version=\"1.0\"?>\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n\t<title>Scene Schedule</title>\n\t<link>http://" . $_SERVER['HTTP_HOST'] . "/scene/scheduleRSS.php</link>\n\t<description>The schedule for upcoming scenes</description>\n\t<language>en-us</language>\n\t<pubDate>{$now}</pubDate>\n\t<lastBuildDate>{$now}</lastBuildDate>\n\t<managingEditor>mcmush@gmail.com</managingEditor>\n\t<webMaster>mcmush@gmail.com (Oathkeeper)</webMaster>\n\n\t<atom:link href=\"http://" . $_SERVER['HTTP_HOST'] . "/scene/scheduleRSS.php\" rel=\"self\" type=\"application/rss+xml\" />\n";
foreach ($return as $line) {
    $truetime = explode(" ", $line['time']);
    $shorttime = explode(':', $truetime[1]);
    $output .= "\t<item>\n" . "\t\t<title>" . htmlentities(preg_replace('/<span>|<\\/span>/', '', ansi2html($line['title']))) . "</title>\n" . "\t\t<link>http://" . $_SERVER['HTTP_HOST'] . "/scene/schedule.php?id=" . $line['id'] . "</link>\n" . "\t\t<description>\n" . "<![CDATA[" . "<b>Player: </b>" . htmlentities(strip_tags(ansi2html($line['name']))) . nl2br("\n") . "\n" . "<b>Date: </b>" . $truetime[0] . nl2br("\n") . "\n" . "<b>Time: </b>" . $shorttime[0] . ':' . $shorttime[1] . nl2br("\n") . "\n" . htmlentities(strip_tags(ansi2html($line['description']))) . "]]>" . "\n\t\t</description>\n" . "\t\t<guid>http://" . $_SERVER['HTTP_HOST'] . "/scene/schedule.php?id=" . $line['id'] . "</guid>\n" . "\t</item>\n";
}
$output .= "</channel>\n</rss>";
echo $output;