Exemplo n.º 1
0
function show_page()
{
    global $use_rel_external_script;
    $use_rel_external_script = true;
    page_header('Contests');
    echo <<<HEREDOC
      <h1>Contests</h1>

HEREDOC;
    $text = file_get_contents('.content/Contests.txt');
    echo BBCode($text);
    if (user_access('A')) {
        echo <<<HEREDOC

      <div class="sidetab"><a href="Admin/Edit_Page?Contests">(edit this page)</a></div>
HEREDOC;
    }
}
Exemplo n.º 2
0
function kalender_listoutput()
{
    global $komsOK, $tpl, $eid, $data, $data_id, $gday, $month, $year, $days, $arr_day, $title_liste, $view, $allgAr;
    //Listbegin
    $tpl->set_ar_out(array('TITLE' => $eid ? $data_id[$eid]['title'] : $title_liste, 'TITLE_ALIGN' => $eid ? '' : ' align="center"'), "listbegin");
    //Detail
    if ($eid) {
        $aus['display'] = 'style="display:none"';
        $aus['DETAIL_DATE'] = date('d.m.Y', $data_id[$eid]['time']);
        $aus['DETAIL_TIME'] = date('H:i', $data_id[$eid]['time']);
        $aus['DETAIL_TEXT'] = BBcode($data_id[$eid]['text']);
        $aus['ID'] = $eid;
        $viewl = $allgAr['kalender_standard_list'];
        if (preg_match('%\\?kalender-v([0|1])%i', $_SERVER['HTTP_REFERER'], $match)) {
            $viewl = $match[1];
        }
        $aus['BACK_LINK'] = 'index.php?kalender-v' . $viewl . '-m' . date('m', $data_id[$eid]['time']) . '-y' . date('Y', $data_id[$eid]['time']);
        if (!$komsOK) {
            $tpl->set_ar_out($aus, 'detail');
        } else {
            if ((loggedin() or chk_antispam('kalender_komms')) and $komsOK and !empty($_POST['name']) and !empty($_POST['text'])) {
                if (loggedin()) {
                    $name = $_SESSION['authname'];
                    $userid = $_SESSION['authid'];
                } else {
                    $name = escape($_POST['name'], 'string') . ' (Gast)';
                    $userid = 0;
                }
                $text = escape($_POST['text'], 'string');
                db_query("INSERT INTO `prefix_koms` (`name`,`userid`,`text`,`time`,`uid`,`cat`) VALUES ('" . $name . "', " . $userid . ", '" . $text . "','" . time() . "', " . $eid . ", 'KALENDER')");
            }
            if (loggedin()) {
                $aus['uname'] = $_SESSION['authname'];
                $aus['readonly'] = 'readonly';
            } else {
                $aus['uname'] = '';
                $aus['readonly'] = '';
            }
            $aus['ANTISPAM'] = get_antispam('kalenderkom', 0);
            $aus['text'] = bbcode($aus['text']);
            $tpl->set_ar_out($aus, 'detail');
            $tpl->set_ar_out($aus, 'commentstart');
            $erg = db_query("SELECT `id`, `name`, `userid`, `text`, `time` FROM `prefix_koms` WHERE `uid` = " . $eid . " AND `cat` = 'KALENDER' ORDER BY `id` DESC");
            $anz = db_num_rows($erg);
            if ($anz == 0) {
                echo 'Keine Kommentare vorhanden';
            } else {
                while ($r1 = db_fetch_assoc($erg)) {
                    if (has_right(-7, 'kalender')) {
                        $del = ' <a href="index.php?kalender-v1-e' . $eid . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                    }
                    $r1['zahl'] = $anz;
                    $r1['avatar'] = get_avatar($r1['userid']);
                    $r1['time'] = post_date($r1['time'], 1) . $del;
                    $r1['text'] = bbcode($r1['text']);
                    $tpl->set_ar_out($r1, 'comments');
                    $anz--;
                }
            }
        }
        $tpl->out('commentend');
        // Kommentare Ende
    } elseif ($view == 0) {
        for ($i = 0; $i < $days; $i++) {
            $date = mktime(0, 0, 0, $month, $i + 1, $year);
            $text = '';
            if (isset($data[$date])) {
                foreach ($data[$date] as $eventinfo) {
                    $text .= eventlink($tpl, $view, $eventinfo);
                    // bbcode anwenden
                    $eventinfo["text"] = BBCode($eventinfo["text"]);
                    $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
                }
            }
            $aus['LIST_I'] = $i + 1;
            $aus['LIST_D'] = $arr_day[date('w', mktime(0, 0, 0, $month, $i + 1, $year))];
            $aus['LIST_T'] = $text;
            $class = $i % 2 ? 'Cnorm' : 'Cmite';
            $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
            $tpl->set_ar_out($aus, 'listitem');
            unset($aus);
        }
        showTooltips($tpl, $tooltips);
    } elseif ($view == 1) {
        // Nur ein Tag
        if (isset($data) && !empty($gday)) {
            $date = mktime(0, 0, 0, $month, $gday, $year);
            $i = 1;
            $tooltips = '';
            if (isset($data[$date])) {
                foreach ($data[$date] as $eventinfo) {
                    $text = '';
                    $text .= eventlink($tpl, $view, $eventinfo);
                    $aus['LIST_I'] = $arr_day[date('w', $date)];
                    $aus['LIST_D'] = date('H:i', $eventinfo['time']);
                    $aus['LIST_T'] = $text;
                    $class = $i % 2 ? 'Cnorm' : 'Cmite';
                    $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
                    $tpl->set_ar_out($aus, 'listitem');
                    unset($aus);
                    $i++;
                    // bbcode anwenden
                    $eventinfo["text"] = BBCode($eventinfo["text"]);
                    $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
                }
            }
            showTooltips($tpl, $tooltips);
            // Ganze Liste
        } elseif (isset($data)) {
            $i = 1;
            foreach ($data as $date => $data1) {
                $text = '';
                foreach ($data1 as $eventinfo) {
                    $text .= eventlink($tpl, $view, $eventinfo);
                }
                $aus['LIST_I'] = date('d.m.Y', $date);
                $aus['LIST_D'] = $arr_day[date('w', $date)];
                $aus['LIST_T'] = $text;
                $class = $i % 2 ? 'Cnorm' : 'Cmite';
                $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
                $tpl->set_ar_out($aus, 'listitem');
                unset($aus);
                $i++;
                // bbcode anwenden
                $eventinfo["text"] = BBCode($eventinfo["text"]);
                $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
            }
            showTooltips($tpl, $tooltips);
        } else {
            $aus['LIST_I'] = '-';
            $aus['LIST_D'] = '-';
            $aus['LIST_T'] = '-';
            $aus['LIST_CLASS'] = 'Cnorm';
            $tpl->set_ar_out($aus, 'listitem');
            unset($aus);
        }
    }
    $tpl->out('listend');
}
Exemplo n.º 3
0
    ?>
" class="pull-right btn btn-mini btn-danger">发表评论</a>
<?php 
}
?>
</th></tr>
<?php 
$sql = "select comments.*,userinfo.nickname,userinfo.uid,userinfo.email from comments,userinfo where userinfo.uid=comments.uid and comments.pid='{$d['pid']}' order by comments.cid asc";
$cnt = $q->dosql($sql);
for ($i = 0; $i < $cnt; $i++) {
    $e = $q->rtnrlt($i);
    ?>
<tr><td>
<div class="wrap">
<?php 
    echo BBCode($e['detail']);
    ?>
</div>
<div>
<a href="../user/detail.php?uid=<?php 
    echo $e['uid'];
    ?>
"><?php 
    echo gravatar::showImage($e['email']);
    echo $e['nickname'];
    ?>
</a>
<div class="pull-right">
<?php 
    if ($e['showcode']) {
        $sql = "select sid from submit where uid='{$e['uid']}' and pid='{$d['pid']}' order by subtime desc";
Exemplo n.º 4
0
    echo "</tr>";
    ?>
<div id='mail<?php 
    echo $d['mid'];
    ?>
' class='modal hide fade in'>
<div class='modal-header'>
<button class='close' data-dismiss='modal'>×</button>
<h3><?php 
    echo $d['title'];
    ?>
</h3>
</div>
<div class='modal-body'>
<?php 
    echo BBCode($d['msg']);
    ?>
</div>
<div class='modal-footer'>
<span class='pull-left'>
<a href='../user/detail.php?uid=<?php 
    echo $d['fromid'];
    ?>
' target='_blank'>
<?php 
    echo gravatar::showImage($d['email']);
    echo $d['nickname'];
    ?>
</a>
<?php 
    echo date('Y-m-d H:i:s', $d['time']);
Exemplo n.º 5
0
#Page title
$view->title = $bug['name'];
#Does not exist
if (!$bug) {
    $view->set404();
    return;
}
#Not approved
if ($bug['status'] == 5 && $bug['who'] != UID && !$rights) {
    header('Location: ' . URL . url('bugs'));
    return;
}
#BBCode
if (isset($cfg['bbcode'])) {
    require 'lib/bbcode.php';
    $bug['text'] = BBCode($bug['text']);
}
#Date, author
$bug['date'] = genDate($bug['date'], 1);
$bug['who'] = $bug['UID'] ? autor($bug['UID']) : $bug['who'];
$bug['text'] = nl2br(emots($bug['text']));
$bug['level'] = $lang['L' . $bug['level']];
$bug['status'] = $lang['S' . $bug['status']];
#Rate
if ($bug['rate'] == 2) {
    $bug['mark'] = $bug['pos'] ? $bug['pos'] : $lang['lack'];
    $bug['marks'] = $bug['neg'] ? $bug['neg'] : 0;
    $view->css(SKIN_DIR . 'rate.css');
}
#Template
$view->add('view', array('bug' => &$bug, 'edit' => $rights || $bug['poster'] == UID && isset($cfg['bugsEdit']) ? url('bugs/post/' . $id) : false, 'hands' => $bug['rate'] == 1, 'stars' => $bug['rate'] == 2, 'catURL' => url('bugs/list/' . $bug['cat']), 'mainURL' => url('bugs'), 'canVote' => $bug['rate'] && (UID || isset($cfg['bugsVote'])), 'editStatus' => $rights));
Exemplo n.º 6
0
 /*** verification securite ***/
 if (!$config['inscription_joueur']) {
     js_goto("?page=index");
 }
 if (!isset($ok) && $config['decharge']) {
     echo "<p class=title>.:: {$strConditionsGenerales} ::.</p>";
     $decharge = $config['decharge'];
     //
     $decharge = str_replace("..", "", $decharge);
     if ($isntafile_usesql == "no" && file_exists("./include/html/reglements/{$s_lang}/{$decharge}") && !is_dir("./include/html/reglements/{$s_lang}/{$decharge}")) {
         echo "<table border=0><tr><td>";
         include "include/html/reglements/{$s_lang}/{$decharge}";
         echo "</td></tr></table>";
     } else {
         //
         $decharge = BBCode($decharge);
         if ($decharge != NULL || $decharge != "") {
             echo "<table border=0><tr><td>";
             echo $decharge;
             echo "</td></tr></table>";
         }
     }
     echo "<br /><br /><table border=0><tr>";
     echo '<td><a href="?page=joueurs&op=inscription&ok=1"><span style="color:green;font-weight:bold;">' . $strJAccepte . '</span></a> -</td>';
     echo '<td><a href="?page=index"><span style="color:red;font-weight:bold;">' . $strJeRefuse . '</span></a></td>';
     echo "</tr></table><br>";
 } else {
     echo "<p class=title>.:: {$strNouveauJoueur} ::.</p>";
     /*** table du joueur ***/
     echo "<form method=post action=?page=joueurs&op=do_inscription name=insjoueur>";
     echo "<table border=0 cellpadding=0 cellspacing=0 class=bordure1><tr><td>";
Exemplo n.º 7
0
function preview_message()
{
    $mailing_message = '';
    $email_msgs = array('yes-captains' => 'Send to the mailing list, reply-to all captains, and post online', 'yes-you' => 'Send to the mailing list, reply-to only you, and post online', 'no' => 'Post online only');
    $mailing_message = $email_msgs[empty($_POST['email']) ? 'yes-you' : $_POST['email']];
    //For some reason, in html attributes you can't backslash escape; you have to use stuff like &quot;. Weird.
    ?>
<h1>Post a Message</h1>

<table class="spacious">
<tr>
  <td>By:</td>
  <td><span class="b"><?php 
    echo htmlentities($_SESSION['user_name'] . ' <' . $_SESSION['email'] . '>');
    ?>
</span></td>
</tr><tr>
  <td>Subject:</td>
  <td><span class="b">[LHS Math Club] <?php 
    echo htmlentities($_POST['subject']);
    ?>
</span><br /><br /></td>
</tr><tr>
  <td>Body:</td>
  <td><?php 
    echo BBCode($_POST['body']);
    ?>
<br /><br /></td>
</tr><tr>
  <td>Mailing:&nbsp;</td>
  <td><span class="b"><?php 
    echo $mailing_message;
    ?>
</span><br /><br /></td>
</tr><tr>
  <td></td>
  <td>
	<form id="composeMessage" method="post"><div>
	  <input type="hidden" name="subject" value="<?php 
    echo htmlentities($_POST['subject']);
    ?>
"/>
	  <input type="hidden" name="body" value="<?php 
    echo htmlentities($_POST['body']);
    ?>
"/>
	  <input type="hidden" name="email" value="<?php 
    echo htmlentities($_POST['email']);
    ?>
"/>
	  <input type="hidden" name="xsrf_token" value="<?php 
    echo $_SESSION['xsrf_token'];
    ?>
"/>
	  <input type="submit" name="do_reedit_message" value="Back to Editing"/>
	  <input type="submit" name="do_post_message" value="Post Message (takes about 30 seconds)"/>
	</div></form>
  </td>
</tr><tr>
  <td></td>
  <td><span class="small">Please do not click the &quot;Post Message&quot; button twice!</span></td>
</tr>
</table>
<?php 
}
Exemplo n.º 8
0
function strip_BB_tags($s)
{
    return BBCode($s, true);
}
Exemplo n.º 9
0
function showBBCode($txt, $str)
{
    echo "<div class='bs-docs-example'><span class='after'>" . $txt . "</span>\n";
    echo BBCode($str) . "</div>\n";
    echo "<pre class='prettyprint'>" . htmlspecialchars($str) . "</pre>\n";
}
Exemplo n.º 10
0
function comments($id, $type = 5, $mayPost = true, $url = '')
{
    global $db, $cfg, $view, $URL;
    #Page division
    if ($cfg['commNum']) {
        #Select page
        if (isset($_GET['page']) && $_GET['page'] > 1) {
            $page = $_GET['page'];
            $st = ($page - 1) * $cfg['commNum'];
        } else {
            $page = 1;
            $st = 0;
        }
        if (!$url) {
            $url = url($URL[0] . '/' . $id);
        }
        $total = dbCount('comms WHERE TYPE=' . $type . ' AND CID=' . $id);
        $CP = $total > $cfg['commNum'] ? pages($page, $total, $cfg['commNum'], $url) : null;
    } else {
        $total = null;
        $CP = null;
    }
    $comm = array();
    #May edit or delete
    $mayEdit = admit('CM');
    $mayDel = $mayEdit || $type == 10 && $id == UID;
    $comURL = url('comment/');
    $modURL = url('moderate/');
    $userURL = url('user/');
    #Get from database
    if ($total !== 0) {
        $res = $db->query('SELECT c.ID,c.access,c.name,c.author,c.ip,c.date,c.UA,c.text,u.login,u.photo,u.mail
			FROM ' . PRE . 'comms c LEFT JOIN ' . PRE . 'users u ON c.UID!=0 AND c.UID=u.ID
			WHERE c.TYPE=' . $type . ' AND c.CID=' . $id . ($mayEdit ? '' : ' AND c.access=1') . ($cfg['commSort'] == 2 ? '' : ' ORDER BY c.ID DESC') . ($total ? ' LIMIT ' . $st . ',' . $cfg['commNum'] : ''));
        $res->setFetchMode(3);
        #BBCode
        if (isset($cfg['bbcode'])) {
            include_once './lib/bbcode.php';
        }
        foreach ($res as $x) {
            $comm[] = array('text' => nl2br(emots(isset($cfg['bbcode']) ? BBCode($x[7]) : $x[7])), 'date' => genDate($x[5], 1), 'title' => $x[2], 'user' => $x[8] ? $x[8] : $x[3], 'ip' => $mayEdit ? $x[4] : null, 'edit' => $mayEdit ? $comURL . $x[0] : false, 'del' => $mayDel ? $comURL . $x[0] : false, 'agent' => $x[6], 'accept' => $mayEdit && $x[1] != 1 ? $comURL . $x[0] : false, 'findIP' => $mayEdit ? $modURL . $x[4] : false, 'profile' => $x[8] ? $userURL . urlencode($x[8]) : false, 'photo' => empty($cfg['commPhoto']) ? false : ($x[9] ? $x[9] : ($cfg['commPhoto'] == 2 ? PROTO . 'www.gravatar.com/avatar/' . md5(strtolower($x[10])) . '?d=' . $cfg['gdef'] : false)));
        }
        $res = null;
    }
    #Prepare template
    $data['comment'] =& $comm;
    $data['parts'] =& $CP;
    #Highlight code
    $data['color'] = isset($cfg['colorCode']);
    #May comment
    if (UID || isset($cfg['commGuest'])) {
        if (empty($_SESSION['post']) or $_SESSION['post'] < $_SERVER['REQUEST_TIME']) {
            $data['url'] = $comURL . $id . '/' . $type;
            $_SESSION['CV'][$type][$id] = true;
        } else {
            $data['url'] = null;
        }
        $data['mustLogin'] = false;
    } else {
        $data['mustLogin'] = true;
    }
    #Assign to template
    $view->add('comments', $data);
}
Exemplo n.º 11
0
<?php

require_once "../../../etc/koala.conf.php";
require_once PATH_LIB . "format_handling.inc.php";
//lms_steam::connect(); //http_auth function is used instead
require_once PATH_LIB . "http_auth_handling.inc.php";
if (http_auth()) {
    if (!($forum = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $_GET["id"]))) {
        include PATH_PUBLIC . "bad_link.php";
        exit;
    }
    $rss_channel = new RssChannel($forum->get_name(), PATH_URL . "/forums/" . $_GET["id"] . "/", "");
    $rss_channel->generate_http_header();
    print $rss_channel->generate_xml_header();
    $cache = get_cache_function($_GET["id"], 600);
    $discussions = $cache->call("lms_forum::get_discussions", $_GET["id"]);
    $max_items = 20;
    while ((list($id, $discussion) = each($discussions)) && $max_items > 0) {
        print $rss_channel->generate_item($discussion["OBJ_NAME"], "", BBCode($discussion["CONTENT"]), $discussion["LATEST_POST_AUTHOR"], $discussion["LATEST_POST_TS"], "", PATH_URL . "forums/" . $discussion["OBJ_ID"] . "/");
        $max_items--;
    }
    print $rss_channel->generate_xml_footer();
} else {
    $rss_channel = new PodcastRSS("Access denied", PATH_SERVER . $_SERVER["REQUEST_URI"], "You are not allowed to access this RSS Feed. Please check your username and password");
    $rss_channel->generate_http_header();
    $rss_channel->generate_xml_header(TRUE);
    exit;
}
Exemplo n.º 12
0
}
#Query
$q = $db->prepare('SELECT * FROM ' . PRE . 'users WHERE login=?');
$q->execute(array($login));
#If does not exist
if (!($u = $q->fetch(2))) {
    return;
}
#N/A
define('NA', $lang['na']);
#O sobie
$u['about'] = nl2br(emots($u['about']));
#BBCode
if (isset($cfg['bbcode']) && $u['about']) {
    include_once './lib/bbcode.php';
    $u['about'] = BBCode($u['about']);
}
#WWW
$u['www'] = $u['www'] && $u['www'] != 'http://' ? $u['www'] : null;
#E-mail
if ($u['opt'] & 1 && (UID || empty($cfg['hideMail']))) {
    $u['mail'] = str_replace('@', '&#64;', $u['mail']);
    $u['mail'] = str_replace('.', '&#46;', $u['mail']);
} else {
    $u['mail'] = null;
}
#P³eæ
switch ($u['sex']) {
    case 1:
        $u['sex'] = $lang['male'];
        break;
Exemplo n.º 13
0
<?php 
    if ($liste_message['prenom'] == $prenom) {
        ?>
                        <button class="icone_supprimer" onclick="DeleteComment(<?php 
        echo $liste_message['id'];
        ?>
)"><i class="fa fa-times"></i></button>
                        <a href="<?php 
        echo 'commentaire.php?id=' . $liste_message['id'];
        ?>
"><button class="icone_modifier"><i class="fa fa-pencil"></i></button></a>
<?php 
    }
    ?>
                    <p><?php 
    echo BBCode(nl2br($liste_message['contenu']));
    ?>
</p>
                    <em>par: <?php 
    echo $liste_message['prenom'];
    ?>
</em>
                </div>
<?php 
}
?>
        </section>
<?php 
include 'include/footer.php';
?>
       
Exemplo n.º 14
0
$total = dbCount('comms' . $q);
$com = array();
#Get comments from database
$res = $db->query('SELECT c.*,u.login FROM ' . PRE . 'comms c LEFT JOIN ' . PRE . 'users u ON c.UID!=0 AND c.UID=u.ID ' . $q . ' ORDER BY c.ID DESC LIMIT ' . $st . ',20');
#BBCode support
if (isset($cfg['bbcode'])) {
    include_once './lib/bbcode.php';
}
#Get category types
$type = parse_ini_file('cfg/types.ini', 1);
foreach ($res as $x) {
    switch ($x['TYPE']) {
        case '10':
            $co = 'user';
            break;
        case '59':
            $co = 'page';
            break;
        case '15':
            $co = 'poll';
            break;
        case '11':
            $co = 'group';
            break;
        default:
            $co = isset($type[$x['TYPE']]) ? $type[$x['TYPE']]['name'] : null;
    }
    $com[] = array('text' => nl2br(emots(isset($cfg['bbcode']) ? BBCode($x['text']) : $x['text'])), 'date' => genDate($x['date'], 1), 'url' => url('comment/' . $x['ID']), 'findIP' => url('moderate/' . $x['ip']), 'item' => $co ? url($co . '/' . $x['CID']) : null, 'id' => $x['ID'], 'title' => $x['name'], 'user' => $x['login'] ? $x['login'] : $x['author'], 'ip' => $x['ip'], 'access' => $x['access'], 'profile' => $x['login'] ? url('user/' . urlencode($x['login'])) : null);
}
#Prepare template
$view->add('moderate', array('comment' => $com, 'total' => $total, 'url' => url('moderate'), 'nourl' => url('moderate/hidden'), 'color' => isset($cfg['colorCode']), 'pages' => pages($page, $total, 20, url('moderate'), 1)));
Exemplo n.º 15
0
    <td><a href="report.php?ctid=<?php 
echo $d['ctid'];
?>
" target="_blank">查看</a></td>
    <td>导出代码</td>
    <td>
    <a href="export.php?ctid=<?php 
echo $d['ctid'];
?>
" class='btn btn-mini'>导出选手比赛代码</a>
    </td>
  </tr>
  <tr>
    <td>场次介绍</td>
    <td><?php 
echo BBCode($d[intro]);
?>
</td>
    <td>修改场次</td>
    <td><a href="editcomptime.php?action=edit&ctid=<?php 
echo $d[ctid];
?>
">修改</a></td>
  </tr>
</table>
<?php 
$sql = "select compscore.uid,userinfo.realname,userinfo.email,userinfo.nickname from compscore,userinfo where userinfo.uid=compscore.uid and compscore.ctid={$_GET[ctid]} order by uid asc";
$cnt = $p->dosql($sql);
if ($cnt) {
    ?>
<form method="post" action="judge.php">
Exemplo n.º 16
0
function show_page()
{
    global $header_noprint;
    $header_noprint = true;
    lmt_page_header('Score Sheets');
    $message = '';
    $lmt_year = intval(map_value('year'));
    $lmt_nextyear = $lmt_year + 1;
    $lmt_archive_url = URL::lmt() . "/{$lmt_year}_Archive";
    if (scoring_is_enabled()) {
        $message = '<div class="error noPrint">Score entry is still enabled! Disable it <a href="../Scoring/Refrigerator">here</a>.</div><br />';
    }
    echo <<<HEREDOC
      <h1 class="noPrint">Score Emails</h1>
      {$message}
\t  
\t  <style>textarea{width: 100%;height: 400px;}</style>
\t  
\t\t<form method="post" action="{$_SERVER['REQUEST_URI']}">
\t\t\t<input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}"/>
\t\t\t<input type="submit" name="Send" value="Send All Emails"/>
\t\t</form>
      
      <div>

HEREDOC;
    $individuals = DB::query('SELECT individuals.name as ind_name, individuals.grade as grade, ' . 'IFNULL(score_team_short, 0) + IFNULL(score_team_long, 0) AS score_team, ' . 'score_guts, teams.name AS team_name, score_individual as score_ind, score_theme, email ' . 'FROM individuals LEFT JOIN teams ON team=team_id ' . 'WHERE email != "" AND individuals.deleted = 0 ORDER BY ind_name');
    foreach ($individuals as $ind) {
        $if_not_eighth = "";
        if ($ind['grade'] != 8) {
            ", and we hope to see you at LMT {$lmt_nextyear}";
        }
        $body = <<<HEREDOC
Hello,

Thanks for coming to LMT {$lmt_year}; here are your individual results!
[b]Name:[/b] {$ind['ind_name']}
[b]Individual Score:[/b] {$ind['score_ind']}
[b]Theme Score:[/b] {$ind['score_theme']}

As an unaffiliated individual, you were also placed onto a team. Here's how you did:
[b]Team Name:[/b] {$ind['team_name']}
[b]Team Round Score:[/b] {$ind['score_team']}
[b]Guts Round Score:[/b] {$ind['score_guts']}

You can also find useful things such as overall results, photos, and problems and solutions at [url]{$lmt_archive_url}[/url].

Finally, we'd love to hear from you! Any feedback at all about how we did this year and how we might improve for next year is greatly appreciated.

Thanks for coming{$if_not_eighth}!
LHS Math Team Captains
HEREDOC;
        if (array_key_exists('Send', $_POST) && $_POST['xsrf_token'] == $_SESSION['xsrf_token']) {
            echo $ind['email'];
            $err = lmt_send_email($ind['email'], "Scores!", $body);
            if ($err !== true) {
                alert($err, -1);
                return;
            } else {
                alert("Sent to {$ind['email']}", 1);
            }
        }
        echo "<h2>{$ind['email']}</h2><div style='border:solid 1px #000'>" . BBCode($body) . "</div>";
    }
    $teams = DB::query('SELECT team_id, IFNULL(score_team_short, 0) + IFNULL(score_team_long, 0) AS score_team, ' . ' score_guts, teams.name AS team_name, teams.school AS school_id,' . ' schools.name AS school_name, coach_email ' . ' FROM teams RIGHT JOIN schools ON teams.school=schools.school_id ' . ' WHERE teams.deleted=0 ORDER BY school_name, team_name');
    for ($i = -1; $i + 1 < count($teams);) {
        $body = '';
        do {
            $i++;
            $team = $teams[$i];
            $school = htmlentities($team['school_name']);
            $coach_email = htmlentities($team['coach_email']);
            $team_id = htmlentities($team['team_id']);
            $team_name = htmlentities($team['team_name']);
            $score_team = htmlentities($team['score_team']);
            $score_guts = htmlentities($team['score_guts']);
            if ($body == '') {
                $body = <<<HEREDOC
Hello,

Thanks for coming to LMT {$lmt_year}; here are the results for your team(s)!

[b]School Name:[/b] {$school}

HEREDOC;
            }
            if (is_null($team['score_team'])) {
                $score_team = 'NONE';
            }
            if (is_null($team['score_guts'])) {
                $score_guts = 'NONE';
            }
            $body .= <<<HEREDOC

[b]Team Name:[/b] {$team_name}
[b]Team Round Score:[/b] {$score_team}
[b]Guts Round Score:[/b] {$score_guts}
HEREDOC;
            $members = DB::query('SELECT name, score_individual, score_theme, email FROM individuals WHERE team=%i AND deleted="0" ORDER BY name', $team_id);
            if (count($members) == 0) {
                $body .= "\n\nNo Team Members\n";
            } else {
                $body .= "\n\n[b]Individual Scores: Individual Round, Theme Round[/b]\n";
            }
            foreach ($members as $member) {
                $name = htmlentities($member['name']);
                $score_individual = htmlentities($member['score_individual']);
                $score_theme = htmlentities($member['score_theme']);
                if (is_null($member['score_individual'])) {
                    $score_individual = 'NONE';
                }
                if (is_null($member['score_theme'])) {
                    $score_theme = 'NONE';
                }
                $indiv_msg = '';
                if ($member['email'] != '') {
                    $indiv_msg = ' (Unaffiliated Individual)';
                }
                $body .= "{$name}{$indiv_msg}: {$score_individual}, {$score_theme}\n";
            }
            $body .= "\n";
        } while ($i + 1 < count($teams) && $teams[$i]['coach_email'] == $teams[$i + 1]['coach_email']);
        $body .= <<<HEREDOC

You can also find useful things such as overall results, photos, and problems and solutions at [url]{$lmt_archive_url}[/url].

Finally, we'd love to hear from you! Any feedback at all about how we did this year and how we might improve for next year is greatly appreciated.

Thanks for coming, and we hope to see you at LMT {$lmt_nextyear}!
LHS Math Team Captains
HEREDOC;
        if (array_key_exists('Send', $_POST) && $_POST['xsrf_token'] == $_SESSION['xsrf_token']) {
            echo $coach_email;
            $err = lmt_send_email($coach_email, "Scores!", $body);
            if ($err !== true) {
                alert($err, -1);
                return;
            } else {
                alert("Sent to {$coach_email}", 1);
            }
        }
        echo "<h2>{$coach_email}</h2><div style='border:solid 1px #000'>" . BBCode($body) . "</div>";
    }
    echo "      </div>";
}
Exemplo n.º 17
0
//lms_steam::connect(); //http_auth function is used instead
require_once PATH_LIB . "http_auth_handling.inc.php";
if (http_auth()) {
    if (!($discussion = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $_GET["id"]))) {
        include PATH_PUBLIC . "bad_link.php";
        exit;
    }
    $rss_channel = new RssChannel($discussion->get_name(), PATH_URL . "doc/" . $_GET["id"] . "/", "");
    $rss_channel->generate_http_header();
    print $rss_channel->generate_xml_header();
    $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $_GET["id"]);
    if (is_object($object)) {
        $data_tnr["ATTRIBUTES"] = $object->get_attributes(array(OBJ_NAME, OBJ_CREATION_TIME, OBJ_DESC), TRUE);
        $data_tnr["CREATOR"] = $object->get_creator(TRUE);
        $data_result = $GLOBALS["STEAM"]->buffer_flush();
        $creator = $data_result[$data_tnr["CREATOR"]];
        steam_factory::load_attributes($GLOBALS["STEAM"]->get_id(), array($creator), array(USER_FULLNAME, USER_FIRSTNAME));
        print $rss_channel->generate_item($data_result[$data_tnr["ATTRIBUTES"]][OBJ_NAME] . " " . gettext("by") . " " . $creator->get_attribute(USER_FIRSTNAME) . " " . $creator->get_attribute(USER_FULLNAME), "", BBCode($data_result[$data_tnr["ATTRIBUTES"]][OBJ_DESC]), $creator->get_attribute(USER_FIRSTNAME) . " " . $creator->get_attribute(USER_FULLNAME), $data_result[$data_tnr["ATTRIBUTES"]][OBJ_CREATION_TIME], "", PATH_URL . "doc/" . $_GET["id"] . "/#comment" . $object->get_id());
    }
    $cache = get_cache_function($_GET["id"], 600);
    $discussions = $cache->call("lms_steam::get_annotations", $_GET["id"]);
    foreach ($discussions as $discussion) {
        print $rss_channel->generate_item(gettext("Post by ") . $discussion["OBJ_CREATOR"], "", BBCode($discussion["CONTENT"]), $discussion["OBJ_CREATOR"], $discussion["OBJ_CREATION_TIME"], "", PATH_URL . "doc/" . $_GET["id"] . "/#comment" . $discussion["OBJ_ID"]);
    }
    print $rss_channel->generate_xml_footer();
} else {
    $rss_channel = new PodcastRSS("Access denied", PATH_SERVER . $_SERVER["REQUEST_URI"], "You are not allowed to access this RSS Feed. Please check your username and password");
    $rss_channel->generate_http_header();
    $rss_channel->generate_xml_header(TRUE);
    exit;
}
Exemplo n.º 18
0
</td>
</tr>
<tr>
<th>开放分组</th>
<td><a href="../user/index.php?gid=<?php 
echo $e['gid'];
?>
"><?php 
echo $e['gname'];
?>
</a></td>
</tr>
<tr>
<th>注释介绍</th>
<td class="wrap"><?php 
echo BBCode($e[intro]);
?>
</td>
</tr>
</table>
<table id="probinfo" class='table table-striped table-condensed table-bordered fiexd'>
<tr><th style="width: 5em;">题目名称</th>
<td><b><?php 
echo shortname($d['probname']);
?>
</b>
<?php 
if (time() > $e['endtime'] || 有此权限('查看比赛')) {
    ?>
<a href="../problem/problem.php?pid=<?php 
    echo $pid;
Exemplo n.º 19
0
    $reglement = $tournois->reglement;
    echo "<p class=title>.:: {$strReglement} {$nom_tournois} ::.</p>";
} else {
    if (!$config['reglement']) {
        js_goto('?page=index');
    } else {
        $reglement = $config['reglement'];
    }
    $isntafile_usesql = "no";
    echo "<p class=title>.:: {$strReglement} ::.</p>\n";
}
echo "<table cellspacing=2 cellpadding=2 border=0>";
echo "<tr>\n";
$reglement = str_replace("..", "", $reglement);
if ($isntafile_usesql == "no" && file_exists("./include/html/reglements/{$s_lang}/{$reglement}") && !is_dir("./include/html/reglements/{$s_lang}/{$reglement}")) {
    echo "<td>";
    include "include/html/reglements/{$s_lang}/{$reglement}";
    echo "</td>";
} else {
    $reglement = BBCode($reglement);
    if ($reglement != NULL || $reglement != "") {
        echo "<td>";
        echo $reglement;
        echo "</td>";
    } else {
        echo "<td class=title>{$strPasDeReglement}</td>";
    }
}
echo "</tr>\n";
echo "</table>";
echo "<br><img src=\"images/back.gif\" border=0 align=align=absmiddle> <a href=javascript:back() class=action>{$strRetour}</a><br>";
Exemplo n.º 20
0
  
  <h3 id="BBCode">BBCode</h3>
  Here is a list of BBCode that you can use in your text formatting for most purposes on the website.
  <pre>
<?php 
$bbString = "[b]this is bold[/b]\n\t[i]this is italic[/i]\n\t[u]this is underlined[/u]\n\t[img]url of image[/img]\n\t[url]url of website[/url]\n\t[url=url of website]some label[/url]\n\t[email]email address[/email]\n\t[heading]title[/heading]\n\t[subheading]subtitle[/subheading]\n\t[bullets]\n\t\t[item]item 1 of list[/item]\n\t\t[item]item 2 of list[/item]\n\t[/bullets]\n\t[pi] displays pi symbol\n\t[sqrt] displays sqrt symbol";
echo $bbString;
?>
  </pre>
  
  which will display as
  <br>
  <br>
  <div style="background-color:white;border:dashed 1px black;padding:50px;">
	<?php 
echo BBCode($bbString);
?>
  </div>
  <br>
  <br>
  <p>
	And that's it! Good luck with captainhood, don't mess up, and always, always do math.
  </p>
  <br>
  <h3>Cheers!</h3>
  ~<a href="Webmaster#Cheers">LHS Math Webmasters</a>
  
  
  
  
  
Exemplo n.º 21
0
        $MPL = db_make_sites($page, "", $limit, "?gbook", 'gbook');
        $anfang = ($page - 1) * $limit;
        $tpl = new tpl('gbook.htm');
        $ei1 = @db_query("SELECT COUNT(ID) FROM prefix_gbook");
        $ein = @db_result($ei1, 0);
        $ar = array('EINTRAGE' => $ein);
        $tpl->set_ar_out($ar, 0);
        $erg = db_query("SELECT * FROM prefix_gbook ORDER BY time DESC LIMIT " . $anfang . "," . $limit) or die(db_error());
        while ($row = db_fetch_object($erg)) {
            $page = '';
            $mail = '';
            if ($row->page) {
                $row->page = get_homepage($row->page);
                $page = ' &nbsp; <a href="' . $row->page . '" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage ' . $lang['from'] . ' ' . $row->name . '"></a>';
            }
            if ($row->mail) {
                $mail = ' &nbsp; <a href="mailto:' . escape_email_to_show($row->mail) . '"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail ' . $lang['from'] . ' ' . $row->name . '"></a>';
            }
            $koms = '';
            if ($allgAr['gbook_koms_for_inserts'] == 1) {
                $koms = db_result(db_query("SELECT COUNT(*) FROM prefix_koms WHERE uid = " . $row->id . " AND cat = 'GBOOK'"), 0, 0);
                $koms = '<a href="index.php?gbook-show-' . $row->id . '">' . $koms . ' ' . $lang['comments'] . '</a>';
            }
            $ar = array('NAME' => $row->name, 'DATE' => date("d.m.Y", $row->time), 'koms' => $koms, 'MAIL' => $mail, 'ID' => $row->id, 'PAGE' => $page, 'TEXT' => BBCode($row->txt));
            $tpl->set_ar_out($ar, 1);
        }
        $tpl->set_out('SITELINK', $MPL, 2);
        break;
}
//-----------------------------------------------------------|
$design->footer();
Exemplo n.º 22
0
            break;
        case '4':
            (require './mod/edit/link.php') or $view->set404();
            break;
        case 'gallery':
            (require './mod/edit/photos.php') or $view->set404();
            break;
        default:
            if (file_exists('./mod/edit/' . $TYPE . '.php')) {
                (require './mod/edit/' . $TYPE . '.php') or $view->set404();
            } else {
                return;
            }
    }
    unset($_POST);
    return 1;
}
#Tytul
$view->title = $lang['mantxt'];
#Ostatni komentarz
if (admit('CM') && ($c = $db->query('SELECT name,date,text FROM ' . PRE . 'comms ORDER BY ID DESC LIMIT 1')->fetch(3))) {
    if (isset($cfg['bbcode'])) {
        require_once './lib/bbcode.php';
        $c[2] = BBCode($c[2]);
    }
    $last = array('title' => $c[0], 'date' => genDate($c[1], 1), 'text' => emots($c[2]), 'color' => isset($cfg['colorCode']));
} else {
    $last = array();
}
#Wolne strony
$view->add('content', array('comment' => &$last, 'page' => admit('P') ? url('editPage', '', 'admin') : null, 'pages' => admit('P') ? url('pages', '', 'admin') : null));
Exemplo n.º 23
0
        print $rss_channel->generate_xml_header();
        $max_items = 20;
        $discussion = lms_weblog::get_item_data($object);
        print $rss_channel->generate_item($discussion["OBJ_NAME"] . " " . gettext("by") . " " . $discussion["AUTHOR"], "", BBCode($discussion["CONTENT"]), $discussion["AUTHOR"], $discussion["DATE_START_DATE"], "", PATH_URL . "weblog/" . $_GET["id"] . "/#comment" . $discussion["OBJ_ID"]);
        $cache = get_cache_function($_GET["id"], 600);
        $discussions = $cache->call("lms_steam::get_annotations", $_GET["id"]);
        while ((list($id, $discussion) = each($discussions)) && $max_items > 0) {
            print $rss_channel->generate_item(gettext("Comment by ") . $discussion["OBJ_CREATOR"], "", BBCode($discussion["CONTENT"]), $discussion["OBJ_CREATOR"], $discussion["OBJ_CREATION_TIME"], "", PATH_URL . "weblog/" . $_GET["id"] . "/#comment" . $forum->get_id());
            $max_items--;
        }
        print $rss_channel->generate_xml_footer();
    } else {
        // Generate RSS for the Weblog container
        $rss_channel = new RssChannel($forum->get_name(), PATH_URL . "weblog/" . $_GET["id"] . "/", "");
        $rss_channel->generate_http_header();
        print $rss_channel->generate_xml_header();
        $cache = get_cache_function($_GET["id"], 600);
        $discussions = $cache->call("lms_weblog::get_items", $_GET["id"]);
        $max_items = 20;
        while ((list($id, $discussion) = each($discussions)) && $max_items > 0) {
            print $rss_channel->generate_item($discussion["OBJ_NAME"], "", BBCode($discussion["CONTENT"]), $discussion["AUTHOR"], $discussion["DATE_START_DATE"], "", PATH_URL . "weblog/" . $discussion["OBJ_ID"] . "/");
            $max_items--;
        }
        print $rss_channel->generate_xml_footer();
    }
} else {
    $rss_channel = new PodcastRSS("Access denied", PATH_SERVER . $_SERVER["REQUEST_URI"], "You are not allowed to access this RSS Feed. Please check your username and password");
    $rss_channel->generate_http_header();
    $rss_channel->generate_xml_header(TRUE);
    exit;
}
Exemplo n.º 24
0
                $q->execute($post);
                #Set time lock
                $_SESSION['postTime'] = $_SERVER['REQUEST_TIME'];
                #Redirect to guestbook
                header('Location: ' . URL . url('guestbook'));
                #Show OK message
                $view->message($lang['saved']);
            } catch (PDOException $e) {
                $view->info($lang['error'] . $e);
            }
        }
    } elseif (!$error) {
        $preview = nl2br(emots($post['txt']));
        if (isset($cfg['bbcode'])) {
            include './lib/bbcode.php';
            $preview = BBCode($preview);
        }
    }
} elseif ($id) {
    if (!($post = $db->query('SELECT * FROM ' . PRE . 'guestbook WHERE ID=' . $id)->fetch(2))) {
        return;
    }
} else {
    $post = array('who' => UID ? $user['login'] : '', 'mail' => '', 'www' => 'http://', 'gg' => '', 'icq' => '', 'tlen' => '', 'skype' => '', 'jabber' => '', 'txt' => '');
}
#Show errors
if ($error) {
    $view->info('<ul><li>' . join('</li><li>', $error) . '</li></ul>');
    if (!$_POST) {
        return 1;
    }
Exemplo n.º 25
0
         if ($noSPAM) {
             if ($noSPAM->verify()) {
                 $noSPAM = false;
             } else {
                 $error[] = $lang[$noSPAM->errorId];
             }
         }
     }
 }
 #Preview
 if (isset($_POST['prev']) && !$error) {
     $preview = nl2br(Emots($c['text']));
     if (isset($cfg['bbcode'])) {
         try {
             include './lib/bbcode.php';
             $preview = BBCode($preview, 1);
         } catch (Exception $e) {
             $error[] = $lang['unclosed'];
         }
     }
 } elseif (isset($_POST['save'])) {
     if ($type) {
         #Anty-flood
         if (isset($_SESSION['post']) && $_SESSION['post'] > time()) {
             $error[] = $lang['c3'];
         }
         #Moderować? + IP
         $c['access'] = !isset($cfg['moderate']) || IS_EDITOR || admit('CM') ? 1 : 0;
         $c['IP'] = $_SERVER['REMOTE_ADDR'];
         $c['UA'] = clean($_SERVER['HTTP_USER_AGENT']);
         $c['date'] = $_SERVER['REQUEST_TIME'];
Exemplo n.º 26
0
    $db->select("information");
    $db->from("{$dbprefix}tournois");
    $db->where("id = {$id}");
} else {
    $db->select("information");
    $db->from("{$dbprefix}config");
}
$res = $db->exec();
$infos_sql = $db->fetch($res);
$information = $infos_sql->information;
echo "<p class=title>.:: {$strInformations} / {$strPresentation} ::.</p>";
echo "<table cellspacing=2 cellpadding=2 border=0>";
echo "<tr>";
$information = str_replace("..", "", $information);
if ($isntafile_usesql == "no" && file_exists("./include/html/informations/{$s_lang}/{$information}") && !is_dir("./include/html/informations/{$s_lang}/{$information}")) {
    echo "<td>";
    include "include/html/informations/{$s_lang}/{$information}";
    echo "</td>";
} else {
    $information = BBCode($information);
    if ($information != NULL || $information != "") {
        echo "<td>";
        echo $information;
        echo "</td>";
    } else {
        echo "<td class=title>{$strPasDInformation}</td>";
    }
}
echo "</tr>";
echo "</table>";
echo "<br><img src=\"images/back.gif\" border=0 align=align=absmiddle> <a href=javascript:back() class=action>{$strRetour}</a><br>";
Exemplo n.º 27
0
function get_formatted_output($text, $chars = 0, $br = "\n")
{
    return BBCode($text);
}
Exemplo n.º 28
0
提交:<?php 
        echo $d['accepted'];
        ?>
 / <?php 
        echo $d['submited'];
        ?>
</div>
</td>
<td>
<div>
<?php 
        echo BBCode($d['detail']);
        ?>
<div class='tou muted wrap' style="text-align: right; width: 50%; position:relative; left: 50%;"><small>
<?php 
        echo BBCode($d['memo']);
        ?>
</small></div>
</div>
<br />
<div style="vertical-align:text-bottom;">
<span class="pull-left">
<?php 
        if ($d['pid']) {
            ?>
<a href='problem.php?pid=<?php 
            echo $d['pid'];
            ?>
' target='_blank'><span class='icon-share'></span></a>
<a href="?pid=<?php 
            echo $d['pid'];
Exemplo n.º 29
0
                    $o->send();
                    //Nowa kopia robocza
                }
            }
            $db->commit();
            #Przekieruj do w±tku
            header('Location: ' . URL . url('pms/view/' . ($th ? $th : $db->lastInsertId())));
            return 1;
        } catch (Exception $e) {
            $view->info($e->getMessage());
        }
    } else {
        #BBCode
        if (isset($cfg['bbcode'])) {
            require './lib/bbcode.php';
            $preview = emots(BBCode($pm['txt']));
        } else {
            $preview = emots($pm['txt']);
        }
    }
    $url = url('pms/edit/' . $id, 'th=' . $th);
} elseif ($id) {
    $pm = $db->query('SELECT p.*,u.login as `to` FROM ' . PRE . 'pms p LEFT JOIN ' . PRE . 'users u ON p.usr=u.ID WHERE p.ID=' . $id . ' AND p.owner=' . UID)->fetch(2);
    #Nie istnieje?
    if (!$pm or !is_numeric($pm['usr'])) {
        return;
    }
    #Dodaj Re: lub Fwd: do tytu³u
    if (isset($_GET['fwd'])) {
        if (strpos($pm['topic'], 'Fwd:') === false) {
            $pm['topic'] = 'Fwd: ' . $pm['topic'];
Exemplo n.º 30
0
    $page = 1;
    $st = 0;
}
#Total
$total = dbCount('guestbook WHERE lang="' . LANG . '"');
$num = 0;
$all = array();
#Get posts
$query = $db->prepare('SELECT * FROM ' . PRE . 'guestbook WHERE lang=? ORDER BY ID DESC LIMIT ?,?');
$query->bindValue(1, LANG);
$query->bindValue(2, $st, 1);
$query->bindValue(3, $cfg['gbNum'], 1);
//PARAM_INT
$query->execute();
#BBCode
if (isset($cfg['bbcode'])) {
    require './lib/bbcode.php';
}
#Posts
foreach ($query as $x) {
    $all[] = array('id' => $x['ID'], 'who' => $x['UID'] ? '<a href="' . url('user/' . urlencode($x['who'])) . '">' . $x['who'] . '</a>' : $x['who'], 'date' => genDate($x['date'], true), 'www' => $x['www'], 'text' => emots(isset($cfg['bbcode']) ? BBCode($x['txt']) : $x['txt']), 'gg' => $x['gg'], 'icq' => $x['icq'], 'tlen' => $x['tlen'], 'skype' => $x['skype'], 'jabber' => $x['jabber'], 'mail' => str_replace('@', '&#64;', $x['mail']), 'ip' => $right ? $x['ip'] : false, 'edit' => $right ? url('guestbook/post/' . $x['ID']) : false);
    ++$num;
}
#Pages
if ($total > $num) {
    $pages = pages($page, $total, $cfg['gbNum'], url('guestbook'));
} else {
    $pages = false;
}
#Template
$view->add($cfg['gbSkin'], array('post' => &$all, 'pages' => &$pages, 'intro' => &$cfg['gbIntro'], 'rights' => $right, 'postURL' => ($cfg['gbPost'] == 1 || UID && $cfg['gbPost'] == 2) && stripos($cfg['gbBan'], $_SERVER['REMOTE_ADDR']) === false ? url('guestbook/post') : false));