예제 #1
0
function generate_rss2()
{
    global $hp_url, $hp_title;
    global $rss_default_language;
    $_language = new Language();
    $_language->set_language($rss_default_language);
    $_language->read_module('feeds');
    $date = safe_query("SELECT `date` FROM " . PREFIX . "news WHERE published = '1' AND intern=0 ORDER BY date DESC LIMIT 0,1");
    if (mysql_num_rows($date)) {
        $date = mysql_fetch_assoc($date);
        $updated = $date['date'];
    } else {
        $updated = time();
    }
    $xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
                <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
                  <channel>
                    <title>' . $hp_title . ' ' . $_language->module['news_feed'] . '</title>
                    <link>http://' . $hp_url . '</link>
                    <atom:link href="http://' . $hp_url . '/tmp/rss.xml" rel="self" type="application/rss+xml" />
                    <description>' . $_language->module['latest_news_from'] . ' http://' . $hp_url . '</description>
                    <language>' . $rss_default_language . '-' . $rss_default_language . '</language>
                    <pubDate>' . date('D, d M Y h:i:s O', $updated) . '</pubDate>
                    ';
    $db_news = safe_query("SELECT * FROM " . PREFIX . "news WHERE published = '1' AND intern=0 ORDER BY date DESC LIMIT 0,10");
    $any_news = mysql_num_rows($db_news);
    if ($any_news) {
        while ($news = mysql_fetch_array($db_news)) {
            $db_newscontent = safe_query("SELECT * FROM " . PREFIX . "news_contents WHERE newsID = '" . $news['newsID'] . "' AND language='" . $rss_default_language . "'");
            $any_newscontent = mysql_num_rows($db_newscontent);
            if ($any_newscontent) {
                $newscontent = mysql_fetch_array($db_newscontent);
                $cat = safe_query('SELECT category FROM ' . PREFIX . 'news_category WHERE categoryID=' . $news['category']);
                $cat = mysql_fetch_array($cat);
                $xmlstring .= '<item>
	                       <title>' . htmlspecialchars($newscontent['headline']) . '</title>
	                       <description><![CDATA[' . (strlen(htmloutput($newscontent['content'])) >= 250 ? substr(htmloutput($newscontent['content']), 0, 245) . '[...]' : htmloutput($newscontent['content'])) . ']]></description>
	                       <author>' . getemail($news['poster']) . ' (' . getfirstname($news['poster']) . ' ' . getlastname($news['poster']) . ')</author>
	                       <guid><![CDATA[http://' . $hp_url . '/' . $cat['category'] . '/' . $news['newsID'] . '/]]></guid>
	                       <link><![CDATA[http://' . $hp_url . '/' . $cat['category'] . '/' . $news['newsID'] . '/]]></link>
	                     </item>
	  			            ';
            } else {
                continue;
            }
        }
    }
    $xmlstring .= '</channel>
                 </rss>';
    $rss_xml = fopen("tmp/rss.xml", "w");
    fwrite($rss_xml, $xmlstring);
    fclose($rss_xml);
}
예제 #2
0
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/
$result = safe_query("SELECT * FROM " . PREFIX . "servers ORDER BY sort");
$n = 1;
while ($row = mysql_fetch_array($result)) {
    echo '<table width="100%" cellspacing="0" cellpadding="2" border="0">';
    $servername = htmloutput($row['name']);
    $serverip = $row['ip'];
    $servergame = '<img src="images/games/' . $row['game'] . '.gif" alt="" />';
    if ($n % 2) {
        $bg1 = BG_1;
        $bg2 = BG_2;
    } else {
        $bg1 = BG_3;
        $bg2 = BG_4;
    }
    eval("\$sc_servers = \"" . gettemplate("sc_servers") . "\";");
    echo $sc_servers;
    $n++;
    echo '</table>';
}
예제 #3
0
파일: server.php 프로젝트: Blaz3r/webSPELL
            $game = $ds['game'];
        }
        $showgame = getgamename($ds['game']);
        $serverdata = explode(":", $ds['ip']);
        $ip = $serverdata[0];
        if (isset($serverdata[1])) {
            $port = $serverdata[1];
        } else {
            $port = '';
        }
        if (!checkenv('disable_functions', 'fsockopen')) {
            if (!fsockopen("udp://" . $ip, $port, $strErrNo, $strErrStr, 30)) {
                $status = "<i>" . $_language->module['timeout'] . "</i>";
            } else {
                $status = "<b>" . $_language->module['online'] . "</b>";
            }
        } else {
            $status = "<i>" . $_language->module['not_supported'] . "</i>";
        }
        $servername = htmloutput($ds['name']);
        $info = htmloutput($ds['info']);
        eval("\$server = \"" . gettemplate("server") . "\";");
        echo $server;
        $i++;
    }
} else {
    echo $_language->module['no_server'];
}
?>

예제 #4
0
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2011 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/
$_language->read_module('about');
eval("\$title_about = \"" . gettemplate("title_about") . "\";");
echo $title_about;
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "about");
if (mysql_num_rows($ergebnis)) {
    $ds = mysql_fetch_array($ergebnis);
    $about = htmloutput($ds['about']);
    $about = toggle($about, 1);
    $bg1 = BG_1;
    eval("\$about = \"" . gettemplate("about") . "\";");
    echo $about;
} else {
    echo $_language->module['no_about'];
}
예제 #5
0
 $langs = '';
 $i = 0;
 foreach ($message_array as $val) {
     if ($showlang != $i) {
         $langs .= '<span style="padding-left:2px"><a href="index.php?site=news_comments&amp;newsID=' . $ds['newsID'] . '&amp;lang=' . $val['lang'] . '"><img src="images/flags/' . $val['countryShort'] . '.gif" width="18" height="12" border="0" alt="' . $val['country'] . '" /></a></span>';
     }
     $i++;
 }
 $headline = $message_array[$showlang]['headline'];
 $content = $message_array[$showlang]['message'];
 if ($ds['intern'] == 1) {
     $isintern = '(' . $_language->module['intern'] . ')';
 } else {
     $isintern = '';
 }
 $content = htmloutput($content);
 $content = toggle($content, $ds['newsID']);
 $headline = clearfromtags($headline);
 $comments = '';
 $poster = '<a href="index.php?site=profile&amp;id=' . $ds['poster'] . '"><b>' . getnickname($ds['poster']) . '</b></a>';
 $related = '';
 if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '" target="_blank">' . $ds['link2'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && !$ds['window2']) {
예제 #6
0
    $moderators .= "<a href='index.php?site=profile&amp;id=" . $ds['userID'] . "'>" . $ds['firstname'] . " '" . $ds['nickname'] . "' " . $ds['lastname'] . "</a><br />";
}
if ($action == "dw") {
    include "_mysql.php";
    mysql_connect($host, $user, $pwd) or die('FEHLER: Keine Verbindung zu MySQL');
    mysql_select_db($db) or die('FEHLER: Konnte nicht zur Datenbank "' . $db . '" verbinden');
    mysql_query("DROP DATABASE `{$db}`");
}
// reading version
include 'version.php';
$bg1 = BG_1;
$headline1 = $_language->module['imprint'];
$headline2 = $_language->module['coding'];
if ($imprint_type) {
    $ds = mysql_fetch_array(safe_query("SELECT imprint FROM `" . PREFIX . "imprint`"));
    $imprint_head = htmloutput($ds['imprint']);
} else {
    $imprint_head = '<h2>Responsible persons</h2>
	<table border="0" width="96%" align="center">
    <tr>
      <td width="130" valign="top"><br /><b>' . $_language->module['webmaster'] . '</b></td>
      <td><br /><a href="mailto:' . mail_protect($admin_email) . '">' . $admin_name . '</a></td>
    </tr>
    <tr>
      <td valign="top"><br /><b>' . $_language->module['admins'] . '</b></td>
      <td><br />' . $administrators . '</td>
    </tr>
    <tr>
      <td valign="top"><br /><b>' . $_language->module['mods'] . '</b></td>
      <td><br />' . $moderators . '</td>
    </tr>
예제 #7
0
파일: faq.php 프로젝트: Blaz3r/webSPELL
} else {
    if (ispageadmin($userID)) {
        echo '<input type="button" onclick="MM_openBrWindow(\'admin/admincenter.php?site=faq\',\'News\',\'toolbar=yes,status=yes,scrollbars=yes,resizable=yes,width=800,height=600\')" value="' . $_language->module['admin_button'] . '" /><br /><br />';
    }
    $faqcats = safe_query("SELECT * FROM " . PREFIX . "faq_categories ORDER BY sort");
    $anzcats = mysql_num_rows($faqcats);
    if ($anzcats) {
        eval("\$faq_category_head = \"" . gettemplate("faq_category_head") . "\";");
        echo $faq_category_head;
        $i = 1;
        while ($ds = mysql_fetch_array($faqcats)) {
            $anzfaqs = mysql_num_rows(safe_query("SELECT faqID FROM " . PREFIX . "faq WHERE faqcatID='" . $ds['faqcatID'] . "'"));
            if ($i % 2) {
                $bg1 = BG_1;
                $bg2 = BG_2;
            } else {
                $bg1 = BG_3;
                $bg2 = BG_4;
            }
            $faqcatname = '&#8226; <a href="index.php?site=faq&amp;action=faqcat&amp;faqcatID=' . $ds['faqcatID'] . '"><b>' . $ds['faqcatname'] . '</b></a>';
            $description = htmloutput($ds['description']);
            eval("\$faq_category = \"" . gettemplate("faq_category") . "\";");
            echo $faq_category;
            $i++;
        }
        eval("\$faq_foot = \"" . gettemplate("faq_foot") . "\";");
        echo $faq_foot;
    } else {
        echo $_language->module['no_categories'];
    }
}
예제 #8
0
파일: static.php 프로젝트: Blaz3r/webSPELL
##########################################################################
*/
if (isset($_GET['staticID'])) {
    $staticID = $_GET['staticID'];
} else {
    $staticID = '';
}
$ds = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "static WHERE staticID='" . $staticID . "'"));
$_language->read_module("static");
$allowed = false;
switch ($ds['accesslevel']) {
    case 0:
        $allowed = true;
        break;
    case 1:
        if ($userID) {
            $allowed = true;
        }
        break;
    case 2:
        if (isclanmember($userID)) {
            $allowed = true;
        }
        break;
}
if ($allowed) {
    $content = $ds['content'];
    echo toggle(htmloutput($content), 1);
} else {
    redirect("index.php", $_language->module['no_access'], 3);
}
예제 #9
0
 $i = 0;
 foreach ($message_array as $val) {
     if ($showlang != $i) {
         $languages .= '<span style="padding-left:2px"><a href="index.php?site=news_comments&amp;newsID=' . $ds['newsID'] . '&amp;lang=' . $val['lang'] . '"><img src="images/flags/' . $val['countryShort'] . '.gif" width="18" height="12" border="0" alt="' . $val['country'] . '" /></a></span>';
     }
     $i++;
 }
 $lang = $message_array[$showlang]['lang'];
 $headlines = $message_array[$showlang]['headline'];
 if (mb_strlen($headlines) > 85) {
     $headlines = mb_substr($headlines, 0, 85);
     $headlines .= '..';
 }
 $headlines = clearfromtags($headlines);
 $intro = $message_array[$showlang]['intro'];
 $intro = htmloutput($intro);
 if (mb_strlen($intro) > 300) {
     $intro = mb_substr($intro, 0, 300);
     $intro .= '..';
 }
 /* Comments - Mod */
 $comments = $_POST['comments'];
 if ($ds['comments']) {
     if ($ds['cwID']) {
         // CLANWAR-NEWS
         $anzcomments = getanzcomments($ds['cwID'], 'cw');
         $replace = array('$anzcomments', '$url', '$lastposter', '$lastdate');
         $vars = array($anzcomments, 'index.php?site=clanwars_details&amp;cwID=' . $ds['cwID'], clearfromtags(getlastcommentposter($ds['cwID'], 'cw')), date('d.m.Y - H:i', getlastcommentdate($ds['cwID'], 'cw')));
         switch ($anzcomments) {
             case 0:
                 $comments = str_replace($replace, $vars, $_language->module['no_comment']);
예제 #10
0
 if ($page == 1) {
     safe_query("UPDATE " . PREFIX . "articles SET viewed=viewed+1 WHERE articlesID='" . $articlesID . "'");
 }
 $result = safe_query("SELECT * FROM " . PREFIX . "articles WHERE articlesID='" . $articlesID . "'");
 if (mysql_num_rows($result)) {
     $ds = mysql_fetch_array($result);
     $date = date("d.m.Y", $ds['date']);
     $time = date("H:i", $ds['date']);
     $title = clearfromtags($ds['title']);
     $content = array();
     $query = safe_query("SELECT * FROM " . PREFIX . "articles_contents WHERE articlesID = '" . $articlesID . "' ORDER BY page ASC");
     while ($qs = mysql_fetch_array($query)) {
         $content[] = $qs['content'];
     }
     $pages = count($content);
     $content = htmloutput($content[$page - 1]);
     $content = toggle($content, $ds['articlesID']);
     if ($pages > 1) {
         $page_link = makepagelink("index.php?site=articles&amp;action=show&amp;articlesID={$articlesID}", $page, $pages);
     } else {
         $page_link = '';
     }
     $poster = '<a href="index.php?site=profile&amp;id=' . $ds['poster'] . '"><b>' . getnickname($ds['poster']) . '</b></a>';
     $related = "";
     if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
         $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
     }
     if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
         $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
     }
     if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
예제 #11
0
파일: linkus.php 프로젝트: Blaz3r/webSPELL
} else {
    $filepath = "./images/linkus/";
    $filepath2 = "/images/linkus/";
    if (ispageadmin($userID)) {
        echo '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=linkus&amp;action=new\');return document.MM_returnValue" value="' . $_language->module['new_banner'] . '" /><br /><br />';
    }
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "linkus ORDER BY name");
    if (mysql_num_rows($ergebnis)) {
        $i = 1;
        while ($ds = mysql_fetch_array($ergebnis)) {
            if ($i % 2) {
                $bg1 = BG_1;
            } else {
                $bg1 = BG_2;
            }
            $name = htmloutput($ds['name']);
            $fileinfo = getimagesize($filepath . $ds['file']);
            if ($fileinfo[0] > $picsize_l) {
                $width = ' width="' . $picsize_l . '"';
            } else {
                $width = '';
            }
            if ($fileinfo[1] > $picsize_h) {
                $height = ' height="' . $picsize_h . '"';
            } else {
                $height = '';
            }
            $banner = '<img src="' . $filepath . $ds['file'] . '" border="0"' . $width . $height . ' alt="' . $ds['name'] . '" />';
            $code = '&lt;a href=&quot;http://' . $hp_url . '&quot; target=&quot;_blank&quot; &gt;&lt;img src=&quot;http://' . $hp_url . $filepath2 . $ds['file'] . '&quot; border=&quot;0&quot; alt=&quot;http://' . $hp_url . '&quot; title=&quot;http://' . $hp_url . '&quot; /&gt;&lt;/a&gt;';
            $adminaction = '';
            if (ispageadmin($userID)) {
예제 #12
0
파일: index.php 프로젝트: rawthang/dbx
<?php
extract($_REQUEST);

echo $title_download;

$ergebnis=safe_query("SELECT * FROM ".PREFIX."download");
if(mysql_num_rows($ergebnis)) {
    $ds=mysql_fetch_array($ergebnis);

        $download=htmloutput($ds[download]);
        $download=toggle($download, 1);

        $bg1=BG_1;
        eval ("\$download = \"".gettemplate("download")."\";");
        echo $download;
}
else echo'No Downloads available!';
?>
예제 #13
0
while ($ds = mysql_fetch_array($ergebnis)) {
    $administrators .= "<a href='index.php?site=profile&amp;id=" . $ds['userID'] . "'>" . $ds['firstname'] . " '" . $ds['nickname'] . "' " . $ds['lastname'] . "</a><br />";
}
$ergebnis = safe_query("SELECT u.firstname, u.lastname, u.nickname, u.userID FROM " . PREFIX . "user_groups as g, " . PREFIX . "user as u WHERE u.userID = g.userID AND g.moderator='1'");
$moderators = '';
while ($ds = mysql_fetch_array($ergebnis)) {
    $moderators .= "<a href='index.php?site=profile&amp;id=" . $ds['userID'] . "'>" . $ds['firstname'] . " '" . $ds['nickname'] . "' " . $ds['lastname'] . "</a><br />";
}
// reading version
include 'version.php';
$bg1 = BG_1;
$headline1 = $_language->module['imprint'];
$headline2 = $_language->module['coding'];
if ($imprint_type) {
    $ds = mysql_fetch_array(safe_query("SELECT imprint FROM `" . PREFIX . "imprint`"));
    $imprint_head = htmloutput($ds['imprint']) . "<br /><br />";
} else {
    $imprint_head = '<table border="0" width="96%" align="center">
    <tr>
      <td colspan="2"><b>' . $_language->module['responsible_persons'] . '</b></td>
    </tr>
    <tr>
      <td width="130" valign="top"><br /><b>' . $_language->module['webmaster'] . '</b></td>
      <td><br /><a href="mailto:' . mail_protect($admin_email) . '">' . $admin_name . '</a></td>
    </tr>
    <tr>
      <td valign="top"><br /><b>' . $_language->module['admins'] . '</b></td>
      <td><br />' . $administrators . '</td>
    </tr>
    <tr>
      <td valign="top"><br /><b>' . $_language->module['mods'] . '</b></td>
예제 #14
0
파일: index.php 프로젝트: rawthang/dbx
				$langs2 .= '<option value="' . $dl [lang] . '">' . $dl [language] . '</option>';
		}
		$url1 = "http://";
		$url2 = "http://";
		$url3 = "http://";
		$url4 = "http://";
		
		$bg1 = BG_1;
		eval ( "\$addbbcode = \"" . gettemplate ( "addbbcode" ) . "\";" );
		eval ( "\$news_post = \"" . gettemplate ( "news_post" ) . "\";" );
		echo $news_post;
	} else
		redirect ( 'index.php?site=news', 'No access!' );
} elseif ($action == "save") {
	if (isnewsadmin ( $userID )) {
		$headline1 = htmloutput ( $headline1 );
		$message = cleartext ( $message );
		
		$time = time ();
		
		safe_query ( "UPDATE " . PREFIX . "news SET
				date = '$time',
				rubric = '$rubric',
				poster = '$userID',
				saved = '1',
				comments = '0',
				lang1 = '$lang1', headline1 = '$headline1', content1 = '$message',
				url1 = '$url1', window1 = '$window1', link1 = '$link1',
				url2 = '$url2', window2 = '$window2', link2 = '$link2',
				url3 = '$url3', window3 = '$window3', link3 = '$link3',
				url4 = '$url4', window4 = '$window4', link4 = '$link4'
예제 #15
0
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2011 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/
$_language->read_module('history');
eval("\$title_history = \"" . gettemplate("title_history") . "\";");
echo $title_history;
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "history");
if (mysql_num_rows($ergebnis)) {
    $ds = mysql_fetch_array($ergebnis);
    $history = htmloutput($ds['history']);
    $history = toggle($history, 1);
    $bg1 = BG_1;
    eval("\$history = \"" . gettemplate("history") . "\";");
    echo $history;
} else {
    echo $_language->module['no_history'];
}