예제 #1
0
 eval("\$clanwars_head = \"" . gettemplate("clanwars_head") . "\";");
 echo $clanwars_head;
 $n = 1;
 while ($ds = mysql_fetch_array($ergebnis)) {
     if ($n % 2) {
         $bg1 = BG_1;
         $bg2 = BG_2;
     } else {
         $bg1 = BG_3;
         $bg2 = BG_4;
     }
     $date = date("d.m.y", $ds['date']);
     $squad = '<a href="index.php?site=clanwars&amp;action=showonly&amp;id=' . $ds['squad'] . '&amp;page=' . $page . '&amp;sort=game&amp;type=' . $type . '&amp;only=squad"><b>' . $ds['squadname'] . '</b></a>';
     $league = '<a href="' . getinput($ds['leaguehp']) . '" target="_blank">' . $ds['league'] . '</a>';
     $oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]";
     $country = flags($oppcountry);
     $opponent = '<a href="' . getinput($ds['opphp']) . '" target="_blank"><b>' . $ds['opptag'] . '</b></a>';
     $hometeam = $ds['hometeam'];
     $oppteam = $ds['oppteam'];
     $server = $ds['server'];
     if (file_exists('images/games/' . $ds['game'] . '.gif')) {
         $pic = $ds['game'] . '.gif';
     }
     $game = '<a href="index.php?site=clanwars&amp;action=showonly&amp;id=' . $ds['game'] . '&amp;page=' . $page . '&amp;sort=game&amp;type=' . $type . '&amp;only=game"><img src="images/games/' . $pic . '" width="13" height="13" border="0" alt="" /></a>';
     $homescr = array_sum(unserialize($ds['homescore']));
     $oppscr = array_sum(unserialize($ds['oppscore']));
     if ($homescr > $oppscr) {
         $results = '<font color="' . $wincolor . '">' . $homescr . ':' . $oppscr . '</font>';
     } elseif ($homescr < $oppscr) {
         $results = '<font color="' . $loosecolor . '">' . $homescr . ':' . $oppscr . '</font>';
     } else {
예제 #2
0
function htmloutput($text)
{
    $text = smileys($text);
    $text = insertlinks($text);
    $text = flags($text);
    $text = replacement($text);
    $text = htmlnl($text);
    $text = nl2br($text);
    $text = $text;
    return $text;
}
예제 #3
0
     $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
 } else {
     $posts = getuserforumposts($ds['userID']);
     $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE " . $posts . " >= postmin AND " . $posts . " <= postmax AND postmax >0");
     $ds = mysql_fetch_array($ergebnis);
     $usertype = $ds['rank'];
     $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
 }
 $lastvisits = "";
 $visitors = safe_query("SELECT v.*, u.nickname, u.country FROM " . PREFIX . "user_visitors v JOIN " . PREFIX . "user u ON u.userID = v.visitor WHERE v.userID='" . $id . "' ORDER BY v.date DESC LIMIT 0,8");
 if (mysql_num_rows($visitors)) {
     $n = 1;
     while ($dv = mysql_fetch_array($visitors)) {
         $n % 2 ? $bgcolor = BG_1 : ($bgcolor = BG_2);
         $flag = '[flag]' . $dv['country'] . '[/flag]';
         $country = flags($flag);
         $nicknamevisitor = $dv['nickname'];
         if (isonline($dv['visitor']) == "offline") {
             $statuspic = '<img src="images/icons/offline.gif" alt="' . $_language->module['offline'] . '" />';
         } else {
             $statuspic = '<img src="images/icons/online.gif" alt="' . $_language->module['online'] . '" />';
         }
         $time = time();
         $visittime = $dv['date'];
         $sec = $time - $visittime;
         $days = $sec / 86400;
         // sekunden / (60*60*24)
         $days = mb_substr($days, 0, mb_strpos($days, "."));
         // kommastelle
         $sec = $sec - $days * 86400;
         $hours = $sec / 3600;
예제 #4
0
function print_termine($tag, $month, $year)
{
    global $wincolor;
    global $loosecolor;
    global $drawcolor;
    global $userID;
    global $_language;
    $_language->read_module('calendar');
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $start_date = mktime(0, 0, 0, $month, $tag, $year);
    $end_date = mktime(23, 59, 59, $month, $tag, $year);
    unset($termin);
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "upcoming");
    $anz = mysql_num_rows($ergebnis);
    if ($anz) {
        while ($ds = mysql_fetch_array($ergebnis)) {
            if ($ds['type'] == "c") {
                if ($ds['date'] >= $start_date && $ds['date'] <= $end_date) {
                    $date = date("d.m.Y", $ds['date']);
                    $time = date("H:i", $ds['date']);
                    $squad = getsquadname($ds['squad']);
                    $oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]";
                    $oppcountry = flags($oppcountry);
                    $opponent = $oppcountry . ' <a href="' . $ds['opphp'] . '" target="_blank">' . clearfromtags($ds['opptag']) . ' / ' . clearfromtags($ds['opponent']) . '</a>';
                    $maps = clearfromtags($ds['maps']);
                    $server = clearfromtags($ds['server']);
                    $league = '<a href="' . $ds['leaguehp'] . '" target="_blank">' . clearfromtags($ds['league']) . '</a>';
                    if (isclanmember($userID)) {
                        $warinfo = cleartext($ds['warinfo']);
                    } else {
                        $warinfo = $_language->module['you_have_to_be_clanmember'];
                    }
                    $players = "";
                    $announce = "";
                    $adminaction = '';
                    if (isclanmember($userID) or isanyadmin($userID)) {
                        $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'");
                        if (mysql_num_rows($anmeldung)) {
                            $i = 1;
                            while ($da = mysql_fetch_array($anmeldung)) {
                                if ($da['status'] == "y") {
                                    $fontcolor = $wincolor;
                                } elseif ($da['status'] == "n") {
                                    $fontcolor = $loosecolor;
                                } else {
                                    $fontcolor = $drawcolor;
                                }
                                if ($i > 1) {
                                    $players .= ', <a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                } else {
                                    $players .= '<a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                }
                                $i++;
                            }
                        } else {
                            $players = $_language->module['no_announced'];
                        }
                        if (issquadmember($userID, $ds['squad']) and $ds['date'] > time()) {
                            $announce = '&#8226; <a href="index.php?site=calendar&amp;action=announce&amp;upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>';
                        } else {
                            $announce = "";
                        }
                        if (isclanwaradmin($userID)) {
                            $adminaction = '<div align="right">
            <input type="button" onclick="MM_openBrWindow(\'clanwars.php?action=new&amp;upID=' . $ds['upID'] . '\',\'Clanwars\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=490\')" value="' . $_language->module['add_clanwars'] . '" />
            <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&amp;action=editwar&amp;upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
            <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&amp;upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>';
                        } else {
                            $adminaction = '';
                        }
                    } else {
                        $players = $_language->module['access_member'];
                    }
                    $bg1 = BG_1;
                    $bg2 = BG_2;
                    $bg3 = BG_3;
                    $bg4 = BG_4;
                    eval("\$upcoming_war_details = \"" . gettemplate("upcoming_war_details") . "\";");
                    echo $upcoming_war_details;
                }
            } else {
                if ($start_date <= $ds['date'] && $end_date >= $ds['date'] || $start_date >= $ds['date'] && $end_date <= $ds['enddate'] || $start_date <= $ds['enddate'] && $end_date >= $ds['enddate']) {
                    $date = date("d.m.Y", $ds['date']);
                    $time = date("H:i", $ds['date']);
                    $enddate = date("d.m.Y", $ds['enddate']);
                    $endtime = date("H:i", $ds['enddate']);
                    $title = clearfromtags($ds['title']);
                    $location = '<a href="' . $ds['locationhp'] . '" target="_blank">' . clearfromtags($ds['location']) . '</a>';
                    $dateinfo = cleartext($ds['dateinfo']);
                    $dateinfo = toggle($dateinfo, $ds['upID']);
                    $country = "[flag]" . $ds['country'] . "[/flag]";
                    $country = flags($country);
                    $players = "";
                    if (isclanmember($userID)) {
                        $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'");
                        if (mysql_num_rows($anmeldung)) {
                            $i = 1;
                            while ($da = mysql_fetch_array($anmeldung)) {
                                if ($da['status'] == "y") {
                                    $fontcolor = $wincolor;
                                } elseif ($da['status'] == "n") {
                                    $fontcolor = $loosecolor;
                                } else {
                                    $fontcolor = $drawcolor;
                                }
                                if ($i > 1) {
                                    $players .= ', <a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                } else {
                                    $players .= '<a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                }
                                $i++;
                            }
                        } else {
                            $players = $_language->module['no_announced'];
                        }
                        if (isclanmember($userID) and $ds['date'] > time()) {
                            $announce = '&#8226; <a href="index.php?site=calendar&amp;action=announce&amp;upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>';
                        } else {
                            $announce = '';
                        }
                        if (isclanwaradmin($userID)) {
                            $adminaction = '<div align="right"><input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&amp;action=editdate&amp;upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /><input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&amp;upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>';
                        } else {
                            $adminaction = '';
                        }
                    } else {
                        $players = $_language->module['access_member'];
                        $announce = '';
                        $adminaction = '';
                    }
                    $bg1 = BG_1;
                    $bg2 = BG_2;
                    $bg3 = BG_3;
                    $bg4 = BG_4;
                    eval("\$upcoming_date_details = \"" . gettemplate("upcoming_date_details") . "\";");
                    echo $upcoming_date_details;
                }
            }
        }
    } else {
        echo $_language->module['no_entries'];
    }
}
예제 #5
0
    </tr>
    <tr>
      <td><input type="hidden" name="captcha_hash" value="' . $hash . '" /></td>
      <td><input type="submit" name="save" value="' . $_language->module['add_language'] . '" /></td>
    </tr>
  </table>
  </form>';
} elseif ($action == "edit") {
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    echo '<h1>&curren; <a href="admincenter.php?site=newslanguages" class="white">' . $_language->module['news_languages'] . '</a> &raquo; ' . $_language->module['edit_language'] . '</h1>';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "news_languages WHERE langID='" . $_GET['langID'] . "'");
    $ds = mysql_fetch_array($ergebnis);
    $flag = '[flag]' . $ds['lang'] . '[/flag]';
    $country = flags($flag, 'admin');
    $country = str_replace("<img", "<img id='getcountry'", $country);
    $langs = str_replace(' selected="selected"', '', $langs);
    $langs = str_replace('value="' . $ds['lang'] . '"', 'value="' . $ds['lang'] . '" selected="selected"', $langs);
    echo '<form method="post" action="admincenter.php?site=newslanguages">
  <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
      <td width="15%"><b>' . $_language->module['language'] . '</b></td>
      <td width="85%"><input type="text" name="language" value="' . getinput($ds['language']) . '" size="60" /></td>
    </tr>
    <tr>
      <td width="15%"><b>' . $_language->module['title'] . '</b></td>
      <td width="85%"><input type="text" name="alt" value="' . getinput($ds['alt']) . '" size="60" /></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['flag'] . '</b></td>
예제 #6
0
function top5()
{
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    global $_language;
    $_language->read_module('demos');
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="49%">';
    // RATING
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "demos ORDER BY rating DESC LIMIT 0,5");
    $top = 'TOP 5 DEMOS (' . $_language->module['rating'] . ')';
    eval("\$top5_head = \"" . gettemplate("top5_head") . "\";");
    echo $top5_head;
    $n = 1;
    while ($ds = mysql_fetch_array($ergebnis)) {
        if ($n % 2) {
            $bg1 = BG_1;
            $bg2 = BG_2;
        } else {
            $bg1 = BG_3;
            $bg2 = BG_4;
        }
        $country1 = "[flag]" . $ds['country1'] . "[/flag]";
        $country1 = flags($country1);
        $country2 = "[flag]" . $ds['country2'] . "[/flag]";
        $country2 = flags($country2);
        $link = '<a href="index.php?site=demos&amp;action=showdemo&amp;demoID=' . $ds['demoID'] . '">' . $country1 . ' ' . $ds['clantag1'] . ' vs. ' . $ds['clantag2'] . ' ' . $country2 . '</a>';
        $ratings = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
        for ($i = 0; $i < $ds['rating']; $i++) {
            $ratings[$i] = 1;
        }
        $ratingpic = '<img src="images/icons/rating_' . $ratings[0] . '_start.gif" width="1" height="5" alt="" />';
        foreach ($ratings as $pic) {
            $ratingpic .= '<img src="images/icons/rating_' . $pic . '.gif" width="4" height="5" alt="" />';
        }
        echo '<tr>
        <td bgcolor="' . $bg1 . '" align="center"><b>' . $n . '.</b></td>
        <td bgcolor="' . $bg2 . '" align="center">' . $ratingpic . '</td>
        <td bgcolor="' . $bg1 . '">' . $link . '</td>
      </tr>';
        unset($ratingpic);
        $n++;
    }
    echo '</table>
      </td>
      <td width="2%">&nbsp;</td>
      <td width="49%">';
    // POINTS
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "demos ORDER BY downloads DESC LIMIT 0,5");
    $top = 'TOP 5 DEMOS (' . $_language->module['downloaded'] . ')';
    eval("\$top5_head = \"" . gettemplate("top5_head") . "\";");
    echo $top5_head;
    $n = 1;
    while ($ds = mysql_fetch_array($ergebnis)) {
        if ($n % 2) {
            $bg1 = BG_1;
            $bg2 = BG_2;
        } else {
            $bg1 = BG_3;
            $bg2 = BG_4;
        }
        $country1 = "[flag]" . $ds['country1'] . "[/flag]";
        $country1 = flags($country1);
        $country2 = "[flag]" . $ds['country2'] . "[/flag]";
        $country2 = flags($country2);
        $link = '<a href="index.php?site=demos&amp;action=showdemo&amp;demoID=' . $ds['demoID'] . '">' . $country1 . ' ' . $ds['clantag1'] . ' vs. ' . $ds['clantag2'] . ' ' . $country2 . '</a>';
        echo '<tr>
        <td bgcolor="' . $bg1 . '" align="center"><b>' . $n . '.</b></td>
        <td bgcolor="' . $bg2 . '" align="center">' . $ds['downloads'] . '</td>
        <td bgcolor="' . $bg1 . '">' . $link . '</td>
      </tr>';
        $n++;
    }
    echo '</table>
      </td>
    </tr>
  </table><br />';
}
예제 #7
0
파일: members.php 프로젝트: Blaz3r/webSPELL
     echo '<tr>
   <td width="30%" class="td_head"><b>' . $_language->module['country_nickname'] . '</b></td>
   <td width="30%" class="td_head"><b>' . $_language->module['position'] . '</b></td>
   <td width="12%" class="td_head"><b>' . $_language->module['activity'] . '</b></td>
   <td width="20%" class="td_head"><b>' . $_language->module['actions'] . '</b></td>
   <td width="8%" class="td_head"><b>' . $_language->module['sort'] . '</b></td>
 </tr>';
     $i = 1;
     while ($dm = mysql_fetch_array($members)) {
         if ($i % 2) {
             $td = 'td1';
         } else {
             $td = 'td2';
         }
         $country = '[flag]' . getcountry($dm['userID']) . '[/flag]';
         $country = flags($country);
         $country = str_replace("images/", "../images/", $country);
         $nickname = '<a href="../index.php?site=profile&amp;id=' . $dm['userID'] . '" target="_blank">' . strip_tags(stripslashes(getnickname($dm['userID']))) . '</a>';
         if ($dm['activity']) {
             $activity = '<font color="green">' . $_language->module['active'] . '</font>';
         } else {
             $activity = '<font color="red">' . $_language->module['inactive'] . '</font>';
         }
         echo '<tr>
     <td class="' . $td . '">' . $country . ' ' . $nickname . '</td>
     <td class="' . $td . '">' . $dm['position'] . '</td>
     <td class="' . $td . '" align="center">' . $activity . '</td>
     <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=members&amp;action=edit&amp;id=' . $dm['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
     <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=members&amp;delete=true&amp;id=' . $dm['userID'] . '&amp;squadID=' . $dm['squadID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
     <td class="' . $td . '" align="center"><select name="sort[]">';
         for ($j = 1; $j <= $anzmembers; $j++) {
예제 #8
0
파일: news.php 프로젝트: Blaz3r/webSPELL
 }
 $message_array = array();
 $query = safe_query("SELECT * FROM " . PREFIX . "news_contents WHERE newsID='" . $ds['newsID'] . "'");
 while ($qs = mysql_fetch_array($query)) {
     $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content']);
 }
 $showlang = select_language($message_array);
 $langs = '';
 $x = 0;
 foreach ($message_array as $val) {
     if ($showlang != $x) {
         $langs .= '<span style="padding-left:2px"><a href="index.php?site=news_comments&amp;newsID=' . $ds['newsID'] . '&amp;lang=' . $val['lang'] . '">[flag]' . $val['lang'] . '[/flag]</a></span>';
     }
     $x++;
 }
 $langs = flags($langs);
 $headline = $message_array[$showlang]['headline'];
 $content = $message_array[$showlang]['message'];
 $newsID = $ds['newsID'];
 if ($ds['intern'] == 1) {
     $isintern = '(' . $_language->module['intern'] . ')';
 } else {
     $isintern = '';
 }
 $content = htmloutput($content);
 $content = toggle($content, $ds['newsID']);
 $headline = clearfromtags($headline);
 $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> ';
예제 #9
0
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   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                                                   #
#                                                                        #
##########################################################################
*/
$result = safe_query("SELECT * FROM " . PREFIX . "user ORDER BY registerdate DESC LIMIT 0,5");
echo '<table width="100%" cellspacing="4" cellpadding="0">';
while ($row = mysql_fetch_array($result)) {
    $username = '******' . $row['userID'] . '">' . $row['nickname'] . '</a>';
    $country = flags('[flag]' . $row['country'] . '[/flag]');
    $registerdate = date('d.m.y', $row['registerdate']);
    eval("\$sc_lastregistered = \"" . gettemplate("sc_lastregistered") . "\";");
    echo $sc_lastregistered;
}
echo '</table>';
예제 #10
0
    $file = path(APP_PATH, 'config', 'environments', "{$what}.php");
} elseif (arg('p prod')) {
    $what = 'production';
    $title = "Configuration for {$what}";
    $file = path(APP_PATH, 'config', 'environments', "{$what}.php");
} elseif (arg('a app')) {
    $what = 'application';
    $title = 'Application options';
    $file = path(APP_PATH, 'config', "{$what}.php");
} elseif (arg('g global')) {
    $title = 'Main options';
    $file = path(APP_PATH, 'config.php');
    $what = 'default';
}
$config = isset($file) ? $trap($file) : config();
$params = array_diff_key(flags(), array_flip(array('global', 'app', 'dev', 'prod', 'd', 'p', 'a', 'g')));
if (!empty($params)) {
    success("\n  {$title} updated");
    $code = '';
    $params = array_merge($config, $params);
    foreach ($params as $item => $value) {
        if (!is_numeric($item)) {
            $sub = explode('.', $item);
            $key = "['" . join("']['", $sub) . "']";
            $value = var_export($value, TRUE);
            $code .= "\$config{$key} = {$value};\n";
        }
    }
    if (isset($file)) {
        !is_file($file) && mkdir(dirname($file), 0755, TRUE);
        write($file, "<?php\n{$code}\n");