Пример #1
0
function user_news()
{
    global $DISPLAY_NEWS, $privileges, $user;
    $html = '<div class="col-md-12"><h1>' . news_title() . '</h1>' . msg();
    if (isset($_POST["text"]) && isset($_POST["betreff"]) && in_array("admin_news", $privileges)) {
        if (!isset($_POST["treffen"]) || !in_array("admin_news", $privileges)) {
            $_POST["treffen"] = 0;
        }
        sql_query("INSERT INTO `News` (`Datum`, `Betreff`, `Text`, `UID`, `Treffen`) " . "VALUES ('" . sql_escape(time()) . "', '" . sql_escape($_POST["betreff"]) . "', '" . sql_escape($_POST["text"]) . "', '" . sql_escape($user['UID']) . "', '" . sql_escape($_POST["treffen"]) . "');");
        engelsystem_log("Created news: " . $_POST["betreff"] . ", treffen: " . $_POST["treffen"]);
        success(_("Entry saved."));
        redirect(page_link_to('news'));
    }
    if (isset($_REQUEST['page']) && preg_match("/^[0-9]{1,}\$/", $_REQUEST['page'])) {
        $page = $_REQUEST['page'];
    } else {
        $page = 0;
    }
    $news = sql_select("SELECT * FROM `News` ORDER BY `Datum` DESC LIMIT " . sql_escape($page * $DISPLAY_NEWS) . ", " . sql_escape($DISPLAY_NEWS));
    foreach ($news as $entry) {
        $html .= display_news($entry);
    }
    $dis_rows = ceil(sql_num_query("SELECT * FROM `News`") / $DISPLAY_NEWS);
    $html .= '<div class="text-center">' . '<ul class="pagination">';
    for ($i = 0; $i < $dis_rows; $i++) {
        if (isset($_REQUEST['page']) && $i == $_REQUEST['page']) {
            $html .= '<li class="active">';
        } elseif (!isset($_REQUEST['page']) && $i == 0) {
            $html .= '<li class="active">';
        } else {
            $html .= '<li>';
        }
        $html .= '<a href="' . page_link_to("news") . '&page=' . $i . '">' . ($i + 1) . '</a></li>';
    }
    $html .= '</ul></div>';
    if (in_array("admin_news", $privileges)) {
        $html .= '<hr />';
        $html .= '<h2>' . _("Create news:") . '</h2>';
        $html .= form(array(form_text('betreff', _("Subject"), ''), form_textarea('text', _("Message"), ''), form_checkbox('treffen', _("Meeting"), false, 1), form_submit('submit', _("Save"))));
    }
    return $html . '</div>';
}
    debug("Flickr images are disabled.");
    ?>
			<?php 
}
?>
			<?php 
if (!function_exists('dynamic_sidebar') or !dynamic_sidebar('Bottom Left')) {
}
?>
		</div>
		<div class="span4">
			<?php 
if ($options['enable_news']) {
    ?>
				<?php 
    display_news('h2');
    ?>
			<?php 
} else {
    ?>
&nbsp;
				<?php 
    debug("News feed is disabled.");
    ?>
			<?php 
}
?>
			<?php 
if (!function_exists('dynamic_sidebar') or !dynamic_sidebar('Bottom Center')) {
}
?>
Пример #3
0
    case 'index':
    default:
        $game->out('
<center>
<span class="caption">' . constant($game->sprache("TEXT16")) . '</span><br><br>');
        display_shoutbox();
        $game->out('
<br><br>            
<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">
  <tr valign="top">
    <td width="49%">
        ');
        display_poll();
        //      display_spenden();
        //       $game->out('<a href="http://www.pledgie.com/campaigns/15671"><img alt="Click here to lend your support to: Campagna donazioni 2012 and make a donation at www.pledgie.com !" src="http://www.pledgie.com/campaigns/15671.png?skin_name=chrome" border="0" /></a><br><br><span class="text_large" style="color: #23F025"><blink>Supporta anche tu STFC!</blink></span><br><br>');
        display_news();
        $game->out('
    </td>
    <td width="2%">&nbsp;</td>
    <td width="49%" valign="top" align="center">
        ');
        display_lastposts();
        $game->out('<br>');
        display_galaxymap();
        $game->out('<br>');
        //        display_usermap();
        //        $game->out('<br>');
        display_skins();
        $game->out('
    </td>
  </tr>
Пример #4
0
<?php

include 'library.php';
$rownewsfetched = array();
$rownewsfetched = display_news();
$count = sizeof($rownewsfetched);
$i = 0;
$flag = 0;
session_start();
if (isset($_SESSION['username'])) {
    $flag = 1;
} else {
    $flag = 0;
}
$s = "";
?>



<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>JSSATEN | Library</title>
        <meta name="description" content="WalksinDelhi will enthral you with the scintillating view of heart of 'Dilli' ">
        <meta name="viewport" content="width=device-width, initial-scale=1">