Example #1
0
function AuraCMSSEO($string)
{
    $string = str_replace(' ', '-', $string);
    $string = preg_replace('/[^0-9a-zA-Z-_]/', '', $string);
    $string = str_replace('-', ' ', $string);
    $string = preg_replace('/^\\s+|\\s+$/', '', $string);
    $string = preg_replace('/\\s+/', ' ', $string);
    $string = str_replace(' ', '-', $string);
    return strtolower(cleartext($string));
}
Example #2
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'];
    }
}
Example #3
0
			else
				$headline = $ds [headline1];
			
			if ($ds [content2])
				$content = $ds [content2];
			else
				$content = '[b]no version in selected language available![/b].[br][br]' . $ds [content1];
			
			if ($ds [headline1]) {
				$langs = '<a href="index.php?site=news_comments&newsID=' . $ds [newsID] . '&lang=' . $ds [lang1] . '">' . $language1 . '</a>';
				$language = getlanguage ( $ds [lang1] );
				$langs = eregi_replace ( '(alt=")(.*)(")', "\\1 News in $language\\3", $langs );
			} else
				$langs = '';
		}
		$content = cleartext ( $content );
		$content = toggle ( $content, $ds [newsID] );
		$poster = '' . getnickname ( $ds [poster] ) . '';
		if ($ds [link1] && $ds [url1] != "http://" && $ds [window1])
			$related .= '&#8226; <a href="' . $ds [url1] . '" target="_blank">' . $ds [link1] . '</a><br> ';
		if ($ds [link1] && $ds [url1] != "http://" && ! $ds [window1])
			$related .= '&#8226; <a href="' . $ds [url1] . '">' . $ds [link1] . '</a><br> ';
		
		if ($ds [link2] && $ds [url2] != "http://" && $ds [window2])
			$related .= '&#8226; <a href="' . $ds [url2] . '" target="_blank">' . $ds [link2] . '</a><br> ';
		if ($ds [link2] && $ds [url2] != "http://" && ! $ds [window2])
			$related .= '&#8226; <a href="' . $ds [url2] . '">' . $ds [link2] . '</a><br> ';
		
		if ($ds [link3] && $ds [url3] != "http://" && $ds [window3])
			$related .= '&#8226; <a href="' . $ds [url3] . '" target="_blank">' . $ds [link3] . '</a><br> ';
		if ($ds [link3] && $ds [url3] != "http://" && ! $ds [window3])
Example #4
0
 /******HardwareMod******/
 /************************************************/
 $anznewsposts = getusernewsposts($ds['userID']);
 $anzforumtopics = getuserforumtopics($ds['userID']);
 $anzforumposts = getuserforumposts($ds['userID']);
 $comments = array();
 $comments[] = getusercomments($ds['userID'], 'ne');
 $comments[] = getusercomments($ds['userID'], 'cw');
 $comments[] = getusercomments($ds['userID'], 'ar');
 $comments[] = getusercomments($ds['userID'], 'de');
 $pmgot = 0;
 $pmgot = $ds['pmgot'];
 $pmsent = 0;
 $pmsent = $ds['pmsent'];
 if ($ds['about']) {
     $about = '' . cleartext($ds['about']) . '';
 } else {
     $about = 'No user data.';
 }
 if (isforumadmin($ds['userID'])) {
     $usertype = $_language->module['administrator'];
     $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
 } elseif (isanymoderator($ds['userID'])) {
     $usertype = $_language->module['moderator'];
     $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="" />';
Example #5
0
 *		http://www.iwan.or.id
 *		http://www.ridwan.or.id
 *		http://www.auracms.opensource-indonesia.com
 *
 */
if (!defined('AURACMS_CONTENT')) {
    Header("Location: ../index.php");
    exit;
}
if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
    header("HTTP/1.1 404 Not Found");
    exit;
}
global $koneksi_db, $maxdata;
$tengah = '<h4 class="bg">Hasil Pencarian</h4>';
$query = cleartext($_GET['query']);
if ($query == '' or !isset($query)) {
    $tengah .= "<div class=\"error\">Tidak Ada Pencarian</div>";
} else {
    $limit = 10;
    $s1 = '';
    $query = htmlentities($query);
    $hasil = $koneksi_db->sql_query("SELECT * FROM artikel WHERE ((judul LIKE '%{$query}%' OR konten LIKE '%{$query}%' OR user LIKE '%{$query}%')AND publikasi=1)");
    $jumlah = $koneksi_db->sql_numrows($hasil);
    if ($jumlah < 1) {
        $s1 = "tidak ada";
    }
    $a = new paging($limit);
    if (!$s1) {
        $tengah .= '<div class="border">';
        $tengah .= "Yang dicari <b>\"{$query}\"</b>";
Example #6
0
 <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
   <tr>
     <td width="72%" class="title"><b>' . $_language->module['faq'] . '</b></td>
     <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
     <td width="8%" class="title"><b>' . $_language->module['sort'] . '</b></td>
   </tr>';
   $ergebnis = safe_query("SELECT * FROM " . PREFIX . "faq_categories ORDER BY sort");
   $anz = safe_query("SELECT count(faqcatID) FROM " . PREFIX . "faq_categories");
   $anz = mysql_result($anz, 0);
   $CAPCLASS = new Captcha();
   $CAPCLASS->create_transaction();
   $hash = $CAPCLASS->get_hash();
   while ($ds = mysql_fetch_array($ergebnis)) {
       echo '<tr>
     <td class="td_head" colspan="3"><b>' . $ds['faqcatname'] . '</b>
     <br /><small>' . cleartext($ds['description'], 1, 'admin') . '</small></td>
   </tr>';
       $faq = safe_query("SELECT * FROM " . PREFIX . "faq WHERE faqcatID='{$ds['faqcatID']}' ORDER BY sort");
       $anzfaq = safe_query("SELECT count(faqID) FROM " . PREFIX . "faq WHERE faqcatID='{$ds['faqcatID']}'");
       $anzfaq = mysql_result($anzfaq, 0);
       $i = 1;
       while ($db = mysql_fetch_array($faq)) {
           if ($i % 2) {
               $td = 'td1';
           } else {
               $td = 'td2';
           }
           echo '<tr>
       <td class="' . $td . '"><b>- ' . getinput($db['question']) . '</b></td>
       <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=faq&amp;action=edit&amp;faqID=' . $db['faqID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
       <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=faq&amp;delete=true&amp;faqID=' . $db['faqID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
Example #7
0
<?php
Example #8
0
 $ergebnis = safe_query("SELECT * FROM " . PREFIX . "faq_categories ORDER BY sort");
 $anz = safe_query("SELECT count(faqcatID) FROM " . PREFIX . "faq_categories");
 $anz = mysql_result($anz, 0);
 $i = 1;
 $CAPCLASS = new Captcha();
 $CAPCLASS->create_transaction();
 $hash = $CAPCLASS->get_hash();
 while ($ds = mysql_fetch_array($ergebnis)) {
     if ($i % 2) {
         $td = 'td1';
     } else {
         $td = 'td2';
     }
     echo '<tr>
   <td class="' . $td . '"><b>' . getinput($ds['faqcatname']) . '</b>
   <br />' . cleartext($ds['description'], 1, 'admin') . '</td>
   <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=faqcategories&amp;action=editcat&amp;faqcatID=' . $ds['faqcatID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
   <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=faqcategories&amp;delcat=true&amp;faqcatID=' . $ds['faqcatID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
   <td class="' . $td . '" align="center"><select name="sortfaqcat[]">';
     for ($n = 1; $n <= $anz; $n++) {
         if ($ds['sort'] == $n) {
             echo '<option value="' . $ds['faqcatID'] . '-' . $n . '" selected="selected">' . $n . '</option>';
         } else {
             echo '<option value="' . $ds['faqcatID'] . '-' . $n . '">' . $n . '</option>';
         }
     }
     echo '</select></td>
 </tr>';
     $i++;
 }
 echo '<tr>
Example #9
0
#   - 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                                                   #
#   addon by esport-project.net                                          #
#                                                                        #
 ########################################################################
*/
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "awards ORDER BY date DESC LIMIT 0,4");
while ($ds = mysql_fetch_array($ergebnis)) {
    $date = date("d.m.Y", $ds[date]);
    $squad = '' . getsquadname($ds[squadID]) . '';
    $award = cleartext($ds[award]);
    $rangz = $ds['rang'];
    if ($rangz == '1') {
        $rang = '<img class="awards" src="images/awards/gold.png" alt="1st" title="1st" />';
    } elseif ($rangz == '2') {
        $rang = '<img class="awards" src="images/awards/silver.png" alt="2nd" title="2nd" />';
    } elseif ($rangz == '3') {
        $rang = '<img class="awards" src="images/awards/bronze.png" alt="3rd" title="3rd" />';
    } elseif ($rangz == '4') {
        $rang = '<img class="awards" src="images/awards/7th.png" alt="4th" title="4th" />';
    } elseif ($rangz == '5') {
        $rang = '<img class="awards" src="images/awards/7th.png" alt="5th" title="5th" />';
    } elseif ($rangz == '6') {
        $rang = '<img class="awards" src="images/awards/7th.png" alt="6th" title="6th" />';
    } elseif ($rangz == '7') {
        $rang = '<img class="awards" src="images/awards/7th.png" alt="7th" title="7th" />';
Example #10
0
               $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
               if (isset($_POST['sticky'])) {
                   $_sticky = 'checked="checked"';
               }
           }
       } else {
           $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax");
           $ds = mysql_fetch_array($ergebnis);
           $usertype = $ds['rank'];
           $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
       }
       $actions = '';
       $quote = '';
       echo '<table width="100%" cellspacing="1" cellpadding="2" bgcolor="' . BORDER . '">
 <tr bgcolor="' . BGHEAD . '">
   <td colspan="2" class="title" align="center">' . cleartext($topicname) . '</td>
 </tr>
 <tr bgcolor="' . PAGEBG . '"><td colspan="2"></td></tr>';
       eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
       echo $forum_topic_content;
       echo '</table>';
   } else {
       $topicname = "";
   }
   eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
   if (isforumadmin($userID) || ismoderator($userID, $board)) {
       if (isset($_sticky)) {
           $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
       } else {
           $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" /> ' . $_language->module['make_sticky'];
       }
Example #11
0
            $oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]";
            $country = flags($oppcountry);
            $opponent = '<a href="' . $ds['opphp'] . '" target="_blank">' . clearfromtags($ds['opponent']) . '</a>';
            $league = clearfromtags($ds['league']);
            $map = clearfromtags($ds['map']);
            $server = clearfromtags($ds['server']);
            $info = cleartext($ds['info']);
            $email = '<a href="mailto:' . mail_protect(cleartext($ds['email'])) . '">' . $ds['email'] . '</a>';
            if (isset($ds['hp'])) {
                if (!validate_url($ds['hp'])) {
                    $homepage = '';
                } else {
                    $homepage = '<a href="' . $ds['hp'] . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="homepage" /></a>';
                }
            }
            if (isset($ds['name'])) {
                $name = cleartext($ds['name']);
            }
            if (isset($ds['comment'])) {
                $message = cleartext($ds['comment']);
            }
            $actions = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&amp;action=addwar&amp;chID=' . $ds['chID'] . '\');return document.MM_returnValue" value="' . $_language->module['insert_in_calendar'] . '" /> <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=challenge&amp;action=delete&amp;chID=' . $ds['chID'] . '\');return document.MM_returnValue" value="' . $_language->module['delete_challenge'] . '" />';
            eval("\$challenges = \"" . gettemplate("challenges") . "\";");
            echo $challenges;
            $i++;
        }
        echo '<br />';
    } else {
        echo $_language->module['no_entries'];
    }
}
Example #12
0
   }
   $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='{$dt['boardID']}' ");
   $db = mysql_fetch_array($ergebnis);
   $boardname = $db['name'];
   echo '<div style="width:640px;">
 <table width="640" cellpadding="2" cellspacing="0" border="0" bgcolor="#CCCCCC">
   <tr bgcolor="FFFFFF">
     <td><b>' . $boardname . '</b> &#8226; <b>' . getinput($dt['topic']) . '</b></td>
   </tr>
 </table><hr size="1" /><br />';
   echo '<table width="100%" cellpadding="4" cellspacing="1" border="0">';
   $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date");
   while ($dr = mysql_fetch_array($replys)) {
       $date = date("d.m.Y", $dr['date']);
       $time = date("H:i", $dr['date']);
       $message = cleartext($dr['message']);
       $username = getnickname($dr['poster']);
       if (getsignatur($dr['poster'])) {
           $signatur = '<br /><br />' . getsignatur($dr['poster']);
       } else {
           $signatur = '';
       }
       $posts = getuserforumposts($dr['poster']);
       if (isforumadmin($dr['poster']) || ismoderator($dr['poster'], $dt['boardID'])) {
           if (ismoderator($dr['poster'], $dt['boardID'])) {
               $usertype = "Moderator";
               $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
           }
           if (isforumadmin($dr['poster'])) {
               $usertype = "Administrator";
               $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
Example #13
0
        function print_cashbox($squadID, $id)
        {
            global $_language;
            $_language->read_module('cash_box');
            $bg1 = BG_1;
            $bg2 = BG_2;
            $pagebg = PAGEBG;
            $border = BORDER;
            $bghead = BGHEAD;
            $bgcat = BGCAT;
            global $wincolor;
            global $loosecolor;
            global $drawcolor;
            global $userID;
            if ($id) {
                $squadergebnis = safe_query("SELECT squad FROM " . PREFIX . "cash_box WHERE cashID='" . $id . "'");
                $dv = mysql_fetch_array($squadergebnis);
                $squadID = $dv['squad'];
            }
            $costs_squad = '';
            if ($squadID == 0) {
                $usersquad = $_language->module['clan'];
            } else {
                $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed, " . PREFIX . "cash_box WHERE " . PREFIX . "cash_box_payed.payed='1' AND " . PREFIX . "cash_box_payed.cashID=" . PREFIX . "cash_box.cashID AND " . PREFIX . "cash_box.squad = '" . $squadID . "'");
                $anz_squad = mysql_num_rows($ergebnis_squad);
                $costs_squad = 0.0;
                if ($anz_squad) {
                    while ($dss = mysql_fetch_array($ergebnis_squad)) {
                        $costs_squad += $dss['costs'];
                    }
                }
                $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='{$squadID}'");
                $anz_squad = mysql_num_rows($ergebnis_squad);
                if ($anz_squad) {
                    while ($dss = mysql_fetch_array($ergebnis_squad)) {
                        $costs_squad -= $dss['totalcosts'];
                    }
                }
                $costs_squad = ' (' . $costs_squad . ' euro)';
                $usersquad = $_language->module['squad'] . ": " . getsquadname($squadID);
            }
            $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC LIMIT 0,1");
            echo '<br /><br /><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top" width="180"><b>' . $usersquad . $costs_squad . '</b></td>
        </tr>
        <tr>
          <td height="1" bgcolor="' . BG_1 . '" width="100%" colspan="4"></td>
        </tr>
        <tr><td height="15"></td></tr>';
            echo '<tr>
							<td valign="top" width="180">';
            if (mysql_num_rows($ergebnis)) {
                $ds = mysql_fetch_array($ergebnis);
                if (!$id) {
                    $id = $ds['cashID'];
                }
                $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE cashID='{$id}'");
                $ds = mysql_fetch_array($ergebnis);
                $date = date("d.m.Y", $ds['date']);
                $paydate = date("d.m.Y", $ds['paydate']);
                $bezahlen = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE cashID='{$id}' AND payed='1' ");
                $payed = mysql_num_rows($bezahlen);
                $konto = cleartext($ds['konto']);
                $usage = $ds['usedfor'];
                if (iscashadmin($userID)) {
                    $adminaction = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=cash_box&amp;action=edit&amp;id=' . $id . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /> <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'cash_box.php?delete=true&amp;id=' . $id . '\')" value="' . $_language->module['delete'] . '" />';
                }
                eval("\$cash_box_usage = \"" . gettemplate("cash_box_usage") . "\";");
                echo $cash_box_usage;
                $all = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC");
                echo '<br /><br />';
                while ($ds = mysql_fetch_array($all)) {
                    echo '&#8226; <a href="index.php?site=cash_box&amp;id=' . $ds['cashID'] . '&amp;squad=' . $squadID . '"><b>' . $ds['usedfor'] . '</b></a><br />';
                }
                echo '</td><td width="10">&nbsp;</td>
					<td valign="top">';
                $members = array();
                $ergebnis = safe_query("SELECT * FROM " . PREFIX . "user ORDER BY nickname");
                while ($du = mysql_fetch_array($ergebnis)) {
                    if ($squadID == 0) {
                        if (isclanmember($du['userID'], $squadID)) {
                            $members[] = $du['userID'];
                        }
                    } else {
                        if (issquadmember($du['userID'], $squadID)) {
                            $members[] = $du['userID'];
                        }
                    }
                }
                eval("\$cash_box_head = \"" . gettemplate("cash_box_head") . "\";");
                echo $cash_box_head;
                if (count($members)) {
                    foreach ($members as $usID) {
                        $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE userID='{$usID}' AND cashID='{$id}'");
                        $du = mysql_fetch_array($ergebnis);
                        $user = '******' . $usID . '"><b>' . getnickname($usID) . '</b></a>';
                        if ($du['payed']) {
                            $paydate = date("d.m.Y", $du['date']);
                            $payed = '<font color="' . $wincolor . '">' . $_language->module['paid'] . ': ' . $paydate . '</font>';
                        } else {
                            $payed = '<font color="' . $loosecolor . '">' . $_language->module['not_paid'] . '</font>';
                        }
                        if (iscashadmin($userID)) {
                            if ($du['costs']) {
                                $bg = BG_1;
                                $costs = $du['costs'];
                            } else {
                                $costs = "";
                                $bg = BG_2;
                            }
                            $payment = '<input type="text" size="7" name="payid[' . $usID . ']" value="' . $costs . '" dir="rtl" /> &#8364;';
                        } else {
                            if ($du['costs']) {
                                $costs = '<font color="' . $wincolor . '"><b>' . $du['costs'] . ' &#8364;</b></font>';
                                $bg = BG_1;
                            } else {
                                $costs = '<font color="' . $loosecolor . '">0.00 &#8364;</font>';
                                $bg = BG_2;
                            }
                            $payment = $costs;
                        }
                        eval("\$cash_box_content = \"" . gettemplate("cash_box_content") . "\";");
                        echo $cash_box_content;
                    }
                }
                if (iscashadmin($userID)) {
                    $admin = '<input type="hidden" name="id" value="' . $id . '" /><input type="submit" name="pay" value="' . $_language->module['update'] . '" />';
                }
                eval("\$cash_box_foot = \"" . gettemplate("cash_box_foot") . "\";");
                echo $cash_box_foot;
            } else {
                echo $_language->module['no_entries'];
            }
            echo '</td></tr></table>';
        }
Example #14
0
function showtopic($topic, $edit, $addreply, $quoteID, $type)
{
    global $userID;
    global $loggedin;
    global $page;
    global $maxposts;
    global $preview;
    global $message;
    global $picsize_l;
    global $_language;
    $_language->read_module('forum');
    $_language->read_module('bbcode', true);
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $thread = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE topicID='{$topic}' ");
    $dt = mysql_fetch_array($thread);
    $usergrp = 0;
    $writer = 0;
    $ismod = ismoderator($userID, $dt['boardID']);
    if ($dt['writegrps'] != "" and !$ismod) {
        $writegrps = explode(";", $dt['writegrps']);
        foreach ($writegrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                $writer = 1;
                break;
            }
        }
    } else {
        $writer = 1;
    }
    if ($dt['readgrps'] != "" and !$usergrp and !$ismod) {
        $readgrps = explode(";", $dt['readgrps']);
        foreach ($readgrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                break;
            }
        }
        if (!$usergrp) {
            echo $_language->module['no_permission'];
            redirect('index.php?site=forum', $_language->module['no_permission'], 2);
            return;
        }
    }
    $gesamt = mysql_num_rows(safe_query("SELECT topicID FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}'"));
    if ($gesamt == 0) {
        die($_language->module['topic_not_found'] . " <a href=\"javascript:history.back()\">back</a>");
    }
    $pages = 1;
    if (!isset($page) || ($site = '')) {
        $page = 1;
    }
    if (isset($type)) {
        if (!($type == 'ASC' || $type == 'DESC')) {
            $type = "ASC";
        }
    } else {
        $type = "ASC";
    }
    $max = $maxposts;
    $pages = ceil($gesamt / $maxposts);
    $page_link = '';
    if ($pages > 1) {
        $page_link = makepagelink("index.php?site=forum_topic&amp;topic={$topic}&amp;type={$type}", $page, $pages);
    }
    if ($type == "ASC") {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=DESC">' . $_language->module['sort'] . ':</a> <img src="images/icons/asc.gif" alt="" />';
    } else {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=ASC">' . $_language->module['sort'] . ':</a> <img src="images/icons/desc.gif" alt="" />';
    }
    $start = 0;
    if ($page > 1) {
        $start = $page * $max - $max;
    }
    safe_query("UPDATE " . PREFIX . "forum_topics SET views=views+1 WHERE topicID='{$topic}' ");
    // viewed topics
    if (mysql_num_rows(safe_query("SELECT userID FROM " . PREFIX . "user WHERE topics LIKE '%|" . $topic . "|%'"))) {
        $gv = mysql_fetch_array(safe_query("SELECT topics FROM " . PREFIX . "user WHERE userID='{$userID}'"));
        $array = explode("|", $gv['topics']);
        $new = '|';
        foreach ($array as $split) {
            if ($split != "" and $split != $topic) {
                $new = $new . $split . '|';
            }
        }
        safe_query("UPDATE " . PREFIX . "user SET topics='" . $new . "' WHERE userID='{$userID}'");
    }
    // end viewed topics
    $topicname = getinput($dt['topic']);
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='" . $dt['boardID'] . "' ");
    $db = mysql_fetch_array($ergebnis);
    $boardname = $db['name'];
    $moderators = getmoderators($dt['boardID']);
    $topicactions = '<a href="printview.php?board=' . $dt['boardID'] . '&amp;topic=' . $topic . '" target="_blank"><img src="images/icons/printview.gif" border="0" alt="printview" /></a> ';
    if ($loggedin and $writer) {
        $topicactions .= '<a href="index.php?site=forum&amp;addtopic=true&amp;action=newtopic&amp;board=' . $dt['boardID'] . '">' . $_language->module['newtopic_image'] . '</a> <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;addreply=true&amp;page=' . $pages . '&amp;type=' . $type . '">' . $_language->module['newreply_image'] . '</a>';
    }
    if ($dt['closed']) {
        $closed = $_language->module['closed_image'];
    } else {
        $closed = '';
    }
    $posttype = 'topic';
    $kathname = getcategoryname($db['category']);
    eval("\$forum_topics_title = \"" . gettemplate("forum_topics_title") . "\";");
    echo $forum_topics_title;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    if ($dt['closed']) {
        echo '<br /><br />' . $_language->module['closed_image'] . '<br /><br />';
    }
    if ($edit && !$dt['closed']) {
        $id = $_GET['id'];
        $dr = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE postID='" . $id . "'"));
        $topic = $_GET['topic'];
        $bg1 = BG_1;
        $_sticky = $dt['sticky'] == '1' ? 'checked="checked"' : '';
        $anz = mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='" . $dt['topicID'] . "' AND postID='" . $id . "' AND poster='" . $userID . "' ORDER BY date ASC LIMIT 0,1"));
        if ($anz or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            if (istopicpost($dt['topicID'], $id)) {
                $bg1 = BG_1;
                // topicmessage
                $message = getinput($dr['message']);
                $post = $id;
                $board = $dt['boardID'];
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'] . '<br />';
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'] . '<br />';
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                // topic icon list
                $iconlist = '<tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="ausrufezeichen.gif" />
          <img src="images/icons/topicicons/ausrufezeichen.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="biggrin.gif" />
          <img src="images/icons/topicicons/biggrin.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="boese.gif" />
          <img src="images/icons/topicicons/boese.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="bored.gif" />
          <img src="images/icons/topicicons/bored.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="cool.gif" />
          <img src="images/icons/topicicons/cool.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="eek.gif" />
          <img src="images/icons/topicicons/eek.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frage.gif" />
          <img src="images/icons/topicicons/frage.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frown.gif" />
          <img src="images/icons/topicicons/frown.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="lampe.gif" />
          <img src="images/icons/topicicons/lampe.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="mad.gif" />
          <img src="images/icons/topicicons/mad.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="pfeil.gif" />
          <img src="images/icons/topicicons/pfeil.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="smile.gif" />
          <img src="images/icons/topicicons/smile.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="text.gif" />
          <img src="images/icons/topicicons/text.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_down.gif" />
          <img src="images/icons/topicicons/thumb_down.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_up.gif" />
          <img src="images/icons/topicicons/thumb_up.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="wink.gif" />
          <img src="images/icons/topicicons/wink.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
            <td colspan="4"><input type="radio" class="input" name="icon" value="0" /> ' . $_language->module['no_icon'] . '</td>
          </tr>';
                if ($dt['icon']) {
                    $iconlist = str_replace('value="' . $dt['icon'] . '"', 'value="' . $dt['icon'] . '" checked="checked"', $iconlist);
                } else {
                    $iconlist = str_replace('value="0"', 'value="0" checked="checked"', $iconlist);
                }
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_edittopic = \"" . gettemplate("forum_edittopic") . "\";");
                echo $forum_edittopic;
            } else {
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'];
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'];
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $dr['message'] = getinput($dr['message']);
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_editpost = \"" . gettemplate("forum_editpost") . "\";");
                echo $forum_editpost;
            }
        } else {
            echo $_language->module['permission_denied'] . '<br /><br />';
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT {$start}, {$max}");
    } elseif ($addreply && !$dt['closed']) {
        if ($loggedin and $writer) {
            if (isset($_POST['preview'])) {
                $bg1 = BG_1;
                $bg2 = BG_2;
                $time = date("H:i", time());
                $date = $_language->module['today'];
                $message_preview = getforminput($_POST['message']);
                $postID = 0;
                $message = cleartext(getforminput($_POST['message']));
                $message = toggle($message, 'xx');
                $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>';
                if (isclanmember($userID)) {
                    $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
                } else {
                    $member = '';
                }
                if ($getavatar = getavatar($userID)) {
                    $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
                } else {
                    $avatar = '';
                }
                if ($getsignatur = getsignatur($userID)) {
                    $signatur = cleartext($getsignatur);
                } else {
                    $signatur = '';
                }
                if ($getemail = getemail($userID) and !getemailhide($userID)) {
                    $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
                } else {
                    $email = '';
                }
                if (isset($_POST['notify'])) {
                    $notify = 'checked="checked"';
                } else {
                    $notify = '';
                }
                $pm = '';
                $buddy = '';
                $statuspic = '<img src="images/icons/online.gif" alt="online" />';
                if (!validate_url(gethomepage($userID))) {
                    $hp = '';
                } else {
                    $hp = '<a href="' . gethomepage($userID) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
                }
                $registered = getregistered($userID);
                $posts = getuserforumposts($userID);
                if (isset($_POST['sticky'])) {
                    $post_sticky = $_POST['sticky'];
                } else {
                    $post_sticky = null;
                }
                $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
                if (isforumadmin($userID)) {
                    $usertype = $_language->module['admin'];
                    $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
                } elseif (isanymoderator($userID)) {
                    $usertype = $_language->module['moderator'];
                    $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
                } else {
                    $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="" />';
                }
                if (isforumadmin($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } elseif (isanymoderator($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $quote = "";
                $actions = "";
                echo '<table width="100%" cellspacing="1" cellpadding="2" bgcolor="' . BORDER . '">
          <tr bgcolor="' . BGHEAD . '">
            <td colspan="2" class="title" align="center">' . $_language->module['preview'] . '</td>
          </tr>
          <tr bgcolor="' . PAGEBG . '"><td colspan="2"></td></tr>';
                eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
                echo $forum_topic_content;
                echo '</table>';
                $message = $message_preview;
            } else {
                if ($quoteID) {
                    $ergebnis = safe_query("SELECT poster,message FROM " . PREFIX . "forum_posts WHERE postID='{$quoteID}'");
                    $ds = mysql_fetch_array($ergebnis);
                    $message = '[quote=' . getnickname($ds['poster']) . ']' . getinput($ds['message']) . '[/quote]';
                }
            }
            if (isset($_POST['sticky'])) {
                $post_sticky = $_POST['sticky'];
            } else {
                $post_sticky = null;
            }
            $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
            if (isforumadmin($userID) || ismoderator($userID, $dt['boardID'])) {
                $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
            } else {
                $chk_sticky = '';
            }
            if (isset($_POST['notify'])) {
                $post_notify = $_POST['notify'];
            } else {
                $post_notify = null;
            }
            $mysql_notify = mysql_num_rows(safe_query("SELECT notifyID FROM " . PREFIX . "forum_notify WHERE userID='" . $userID . "' AND topicID='" . $topic . "'"));
            $notify = $mysql_notify || $post_notify == '1' ? 'checked="checked"' : '';
            $bg1 = BG_1;
            $board = $dt['boardID'];
            eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
            eval("\$forum_newreply = \"" . gettemplate("forum_newreply") . "\";");
            echo $forum_newreply;
        } elseif ($loggedin) {
            echo '<br /><br />' . $_language->module['no_access_write'] . '<br /><br />';
        } else {
            echo $_language->module['not_logged_msg'];
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT 0, " . $max . "");
    } else {
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date {$type} LIMIT " . $start . ", " . $max . "");
    }
    eval("\$forum_topic_head = \"" . gettemplate("forum_topic_head") . "\";");
    echo $forum_topic_head;
    $i = 1;
    while ($dr = mysql_fetch_array($replys)) {
        if ($i % 2) {
            $bg1 = BG_1;
            $bg2 = BG_2;
        } else {
            $bg1 = BG_3;
            $bg2 = BG_4;
        }
        $date = date("d.m.Y", $dr['date']);
        $time = date("H:i", $dr['date']);
        $today = date("d.m.Y", time());
        $yesterday = date("d.m.Y", time() - 3600 * 24);
        if ($date == $today) {
            $date = $_language->module['today'];
        } elseif ($date == $yesterday && $date < $today) {
            $date = $_language->module['yesterday'];
        } else {
            $date = $date;
        }
        $message = cleartext($dr['message']);
        $message = toggle($message, $dr['postID']);
        $postID = $dr['postID'];
        $username = '******' . $dr['poster'] . '"><b>' . stripslashes(getnickname($dr['poster'])) . '</b></a>';
        if (isclanmember($dr['poster'])) {
            $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
        } else {
            $member = '';
        }
        if ($getavatar = getavatar($dr['poster'])) {
            $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
        } else {
            $avatar = '';
        }
        if ($getsignatur = getsignatur($dr['poster'])) {
            $signatur = cleartext($getsignatur);
        } else {
            $signatur = '';
        }
        if ($getemail = getemail($dr['poster']) and !getemailhide($dr['poster'])) {
            $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
        } else {
            $email = '';
        }
        $pm = '';
        $buddy = '';
        if ($loggedin && $dr['poster'] != $userID) {
            $pm = '<a href="index.php?site=messenger&amp;action=touser&amp;touser='******'poster'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['messenger'] . '" /></a>';
            if (isignored($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=readd&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" border="0" alt="' . $_language->module['back_buddy'] . '" /></a>';
            } elseif (isbuddy($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=ignore&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="' . $_language->module['ignore'] . '" /></a>';
            } else {
                $buddy = '<a href="buddys.php?action=add&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_add.gif" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
            }
        }
        if (isonline($dr['poster']) == "offline") {
            $statuspic = '<img src="images/icons/offline.gif" alt="offline" />';
        } else {
            $statuspic = '<img src="images/icons/online.gif" alt="online" />';
        }
        if (!validate_url(gethomepage($dr['poster']))) {
            $hp = '';
        } else {
            $hp = '<a href="' . gethomepage($dr['poster']) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
        }
        if (!$dt['closed']) {
            $quote = '<a href="index.php?site=forum_topic&amp;addreply=true&amp;board=' . $dt['boardID'] . '&amp;topic=' . $topic . '&amp;quoteID=' . $dr['postID'] . '&amp;page=' . $page . '&amp;type=' . $type . '"><img src="images/icons/quote.gif" border="0" alt="' . $_language->module['quote'] . '" /></a>';
        } else {
            $quote = "";
        }
        $registered = getregistered($dr['poster']);
        $posts = getuserforumposts($dr['poster']);
        if (isforumadmin($dr['poster'])) {
            $usertype = $_language->module['admin'];
            $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
        } elseif (isanymoderator($dr['poster'])) {
            $usertype = $_language->module['moderator'];
            $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
        } else {
            $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="" />';
        }
        $actions = '';
        if (($userID == $dr['poster'] or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) && !$dt['closed']) {
            $actions = ' <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;edit=true&amp;id=' . $dr['postID'] . '&amp;page=' . $page . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit'] . '" /></a> ';
        }
        if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            $actions .= '<input class="input" type="checkbox" name="postID[]" value="' . $dr['postID'] . '" />';
        }
        eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
        echo $forum_topic_content;
        unset($actions);
        $i++;
    }
    $adminactions = "";
    if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
        if ($dt['closed']) {
            $close = '<option value="opentopic">- ' . $_language->module['reopen_topic'] . '</option>';
        } else {
            $close = '<option value="closetopic">- ' . $_language->module['close_topic'] . '</option>';
        }
        $adminactions = '<input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> ' . $_language->module['select_all'] . '
		<select name="admaction">
      <option value="0">' . $_language->module['admin_actions'] . ':</option>
      <option value="delposts">- ' . $_language->module['delete_posts'] . '</option>
      <option value="stickytopic">- ' . $_language->module['make_topic_sticky'] . '</option>
      <option value="unstickytopic">- ' . $_language->module['make_topic_unsticky'] . '</option>
      <option value="movetopic">- ' . $_language->module['move_topic'] . '</option>
      ' . $close . '
      <option value="deletetopic">- ' . $_language->module['delete_topic'] . '</option>
    </select>
    <input type="hidden" name="topicID" value="' . $topic . '" />
    <input type="hidden" name="board" value="' . $dt['boardID'] . '" />
    <input type="submit" name="submit" value="' . $_language->module['go'] . '" />';
    }
    eval("\$forum_topic_foot = \"" . gettemplate("forum_topic_foot") . "\";");
    echo $forum_topic_foot;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    echo '<div align="right">' . $adminactions . '</div></form>';
    if ($dt['closed']) {
        echo $_language->module['closed_image'];
    } else {
        if (!$loggedin && !$edit) {
            echo $_language->module['not_logged_msg'];
        }
    }
}
Example #15
0
        }
        $sem = '/[0-9]{6,11}/si';
        $icq_number = str_replace('-', '', $ds['icq']);
        if (preg_match($sem, $ds['icq'])) {
            $icq = '<a href="http://www.icq.com/people/about_me.php?uin=' . $icq_number . '" target="_blank"><img src="http://online.mirabilis.com/scripts/online.dll?icq=' . $ds['icq'] . '&amp;img=5" border="0" alt="icq" /></a>';
        } else {
            $icq = "";
        }
        $guestbookID = 'id_' . $ds['gbID'];
        $name = strip_tags($ds['name']);
        $message = cleartext($ds['comment']);
        $message = toggle($message, $ds['gbID']);
        unset($admincomment);
        if ($ds['admincomment'] != "") {
            $admincomment = '<hr />
			<small><b>' . $_language->module['admin_comment'] . ':</b><br />' . cleartext($ds['admincomment']) . '</small>';
        } else {
            $admincomment = '';
        }
        $actions = '';
        $ip = 'logged';
        $quote = '<a href="index.php?site=guestbook&amp;action=add&amp;messageID=' . $ds['gbID'] . '"><img src="images/icons/quote.gif" border="0" alt="quote" /></a>';
        if (isfeedbackadmin($userID)) {
            $actions = ' <a href="index.php?site=guestbook&amp;action=comment&amp;guestbookID=' . $ds['gbID'] . '"><img src="images/icons/admincomment.gif" border="0" alt="Admincomment" /></a> <input class="input" type="checkbox" name="gbID[]" value="' . $ds['gbID'] . '" />';
            $ip = $ds['ip'];
        }
        eval("\$guestbook = \"" . gettemplate("guestbook") . "\";");
        echo $guestbook;
        if ($type == "DESC") {
            $n--;
        } else {
Example #16
0
 if ($ds['readgrps'] != "") {
     $usergrps = explode(";", $ds['readgrps']);
     $usergrp = 0;
     foreach ($usergrps as $value) {
         if (isinusergrp($value, $userID)) {
             $usergrp = 1;
             break;
         }
     }
     if (!$usergrp and !ismoderator($userID, $ds['boardID'])) {
         continue;
     }
 }
 $topicID = $ds['topicID'];
 $res_title[$i] = getinput($ds['topicname']);
 $res_message[$i] = cleartext($ds['message'], false);
 $res_link[$i] = '<a href="index.php?site=forum_topic&amp;topic=' . $topicID . '">' . $_language->module['forum_link'] . '</a>';
 $res_occurr[$i] = substr_count(strtolower($ds['message']), strtolower(stripslashes($text))) + substr_count(strtolower($ds['topic']), strtolower(stripslashes($text)));
 $res_date[$i] = $ds['date'];
 $res_type[$i] = $_language->module['forum'];
 if (isset($alreadythere)) {
     unset($alreadythere);
 }
 $key = array_search($res_link[$i], $res_link);
 if ($key !== null && $key !== false) {
     if ($key != $i) {
         $res_occurr[$key] += $res_occurr[$i];
         $alreadythere = true;
     }
 }
 if (isset($alreadythere)) {
Example #17
0
     $headdate = '<a class="titlelink" href="index.php?site=awards&amp;page=' . $page . '&amp;sort=date&amp;type=' . $type . '">' . $_language->module['date'] . ':</a>';
     $headsquad = '<a class="titlelink" href="index.php?site=awards&amp;page=' . $page . '&amp;sort=squadID&amp;type=' . $type . '">' . $_language->module['squad'] . ':</a>';
     eval("\$awards_head = \"" . gettemplate("awards_head") . "\";");
     echo $awards_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=members&amp;action=showsquad&amp;squadID=' . $ds['squadID'] . '&amp;page=' . $page . '&amp;sort=' . $sort . '&amp;type=' . $type . '">' . getsquadname($ds['squadID']) . '</a>';
         $award = cleartext($ds['award']);
         $homepage = $ds['homepage'];
         $rang = $ds['rang'];
         if (isclanwaradmin($userID) || isnewsadmin($userID)) {
             $adminaction = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=awards&amp;action=edit&amp;awardID=' . $ds['awardID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
   <input type="button" onclick="MM_confirm(\'really delete this award?\',\'index.php?site=awards&amp;delete=true&amp;awardID=' . $ds['awardID'] . '\')" value="' . $_language->module['delete'] . '" />';
         } else {
             $adminaction = '';
         }
         eval("\$awards_content = \"" . gettemplate("awards_content") . "\";");
         echo $awards_content;
         $n++;
     }
     eval("\$awards_foot = \"" . gettemplate("awards_foot") . "\";");
     echo $awards_foot;
 } else {
Example #18
0
 $filesize = $file['filesize'];
 if (!$filesize) {
     $filesize = 0;
 }
 $downloads = $file['downloads'];
 if (!$downloads) {
     $downloads = 0;
 }
 $filevotes = $file['votes'];
 $filevotes ? $filevotes = ', ' . $filevotes . ' votes' : ($filevotes = ', unrated');
 $traffic = detectfilesize($filesize * $downloads);
 $filesize = detectfilesize($file['filesize']);
 $reportlink = '<a href="index.php?site=files&amp;action=report&amp;link=' . $file['fileID'] . '"><b>' . $_language->module['report_dead_link'] . '</b></a>';
 $date = date("d.m.Y", $file['date']);
 // FILE-AUTHOR
 $uploader = cleartext('[flag]' . getcountry($file['poster']) . '[/flag]') . ' <a href="index.php?site=profile&amp;id=' . $file['poster'] . '">' . getnickname($file['poster']) . '</a>';
 // FILE-CATEGORY
 $cat = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE filecatID='" . $file['filecatID'] . "'"));
 $category = '<a href="index.php?site=files&amp;cat=' . $cat['filecatID'] . '" class="titlelink">' . $cat['name'] . '</a>';
 $categories = '<a href="index.php?site=files&amp;cat=' . $cat['filecatID'] . '"><b>' . $cat['name'] . '</b></a>';
 $cat_id = $cat['subcatID'];
 while ($cat_id != 0) {
     $subcat = mysql_fetch_array(safe_query("SELECT filecatID, name, subcatID FROM " . PREFIX . "files_categorys WHERE filecatID='" . $cat_id . "'"));
     $category = "<a href=\"index.php?site=files&amp;cat=" . $subcat['filecatID'] . "\" class=\"titlelink\">" . $subcat['name'] . "</a> >> " . $category;
     $categories = "<a href=\"index.php?site=files&amp;cat=" . $subcat['filecatID'] . "\"><b>" . $subcat['name'] . "</b></a> >> " . $categories;
     $cat_id = $subcat['subcatID'];
 }
 // FILE-MIRRORS (remember: the primary mirror is still the uploaded or external file!)
 $mirrors = $file['mirrors'];
 if ($mirrors) {
     if (stristr($mirrors, "||")) {
Example #19
0
      </tr>';
        $i = 1;
        while ($ds = mysql_fetch_array($ergebnis)) {
            if ($i % 2) {
                $td = 'td1';
            } else {
                $td = 'td2';
            }
            $list = '<select name="sortlist[]">';
            for ($n = 1; $n <= mysql_num_rows($ergebnis); $n++) {
                $list .= '<option value="' . $ds['serverID'] . '-' . $n . '">' . $n . '</option>';
            }
            $list .= '</select>';
            $list = str_replace('value="' . $ds['serverID'] . '-' . $ds['sort'] . '"', 'value="' . $ds['serverID'] . '-' . $ds['sort'] . '" selected="selected"', $list);
            echo '<tr>
        <td class="' . $td . '"><img src="../images/games/' . $ds['game'] . '.gif" width="13" height="13" border="0" alt="" /> <a href="hlsw://' . $ds['ip'] . '"><b>' . $ds['ip'] . '</b></a><br /><b>' . getinput($ds['name']) . '</b><br />' . cleartext($ds['info'], 1, 'admin') . '</td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=servers&amp;action=edit&amp;serverID=' . $ds['serverID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=servers&amp;delete=true&amp;serverID=' . $ds['serverID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
        <td class="' . $td . '" align="center">' . $list . '</td>
      </tr>';
            $i++;
        }
        echo '<tr>
        <td colspan="3" class="td_head" align="right"><input type="hidden" name="captcha_hash" value="' . $hash . '" /><input type="submit" name="sort" value="' . $_language->module['to_sort'] . '" /></td>
      </tr>
    </table>
    </form>';
    } else {
        echo $_language->module['no_server'];
    }
}
Example #20
0
    }
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
   		<td>' . $page_link . '</td>
   		<td align="right">' . $submit . '</td>
		</tr>
		</table></form>';
    if ($pages > 1) {
        $page_link = makepagelink("index.php?site=shoutbox_content&amp;action=showall", $page, $pages);
    }
} elseif (basename($_SERVER['PHP_SELF']) != "shoutbox_content.php") {
    redirect('index.php?site=shoutbox_content&action=showall', 'shoutbox', 0);
} else {
    include "_mysql.php";
    include "_settings.php";
    include "_functions.php";
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $bg1 = BG_1;
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "shoutbox ORDER BY date DESC LIMIT 0," . $maxshoutbox);
    while ($ds = mysql_fetch_array($ergebnis)) {
        $date = date("H:i", $ds['date']);
        $name = $ds['name'];
        $message = cleartext($ds['message'], false);
        $message = str_replace("&amp;amp;", "&", $message);
        eval("\$shoutbox_content = \"" . gettemplate("shoutbox_content") . "\";");
        echo $shoutbox_content;
    }
}
Example #21
0
                 $screenshots .= '';
             } else {
                 $nbr = 2;
             }
             $n++;
         }
     }
 }
 if (!mb_strlen(trim(isset($screenshots)))) {
     $screenshots = 'No Screenshots Uploaded';
 }
 $bg1 = BG_1;
 $bg2 = BG_2;
 $bg3 = BG_3;
 $bg4 = BG_4;
 $linkpage = cleartext($ds['linkpage']);
 $linkpage = str_replace('http://', '', $ds['linkpage']);
 if ($linkpage == "") {
     $linkpage = "#";
 }
 // -- v1.0, extended results -- //
 $scoreHome = unserialize($ds['homescore']);
 $scoreOpp = unserialize($ds['oppscore']);
 $homescr = array_sum($scoreHome);
 $oppscr = array_sum($scoreOpp);
 if ($homescr > $oppscr) {
     $result_map = '[color=' . $wincolor . '][b]' . $homescr . ':' . $oppscr . '[/b][/color]';
     $result_map2 = 'won';
 } elseif ($homescr < $oppscr) {
     $result_map = '[color=' . $loosecolor . '][b]' . $homescr . ':' . $oppscr . '[/b][/color]';
     $result_map2 = 'lost';
Example #22
0
if (empty($_POST['nama'])) {
    $error .= '<li>Silahkan Isi Nama nya</li>';
}
if (empty($_POST['yousay'])) {
    $error .= '<li>Silahkan Isi Pesan nya</li>';
}
if (cek_posted('shoutbox')) {
    $error .= '<li>Anda Sudah Memposting, Tunggu beberapa Menit Lagi</li>';
}
if (!empty($_POST['nama']) && !empty($_POST['yousay']) && preg_match('/^[._a-z0-9-]+[._a-z0-9- ]+$/i', $_POST['nama']) && $kkode == false && !cek_posted('shoutbox')) {
    global $koneksi_db, $maxadmindata;
    $ip_adr = cleartext(@$_SERVER["HTTP_X_FORWARDED_FOR"]);
    if (@$_SERVER["HTTP_X_FORWARDED_FOR"] == '') {
        $ip_adr = @$_SERVER["REMOTE_ADDR"];
    }
    $agent_Usr = cleartext(@$_SERVER["HTTP_USER_AGENT"]);
    $ket = "{$ip_adr}|{$agent_Usr}";
    $DatE = tanggal_simpan_shoutbox();
    $name = cleantext($_POST['nama']);
    $email = cleantext($_POST['email']);
    $yousay = cleantext($_POST['yousay']);
    $tglnow = date("Y-m-d");
    $tgl = !isset($tgl) ? $tglnow : $tgl;
    $valid_mail = "^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\\.)*([a-z0-9-]+)(\\.[a-z]{2,3}))\$";
    if (!preg_match($valid_mail, $email)) {
        $email = '';
    }
    $perintah1 = "INSERT INTO shoutbox (waktu, nama, email, isi, ket,tgl) VALUES ('{$DatE}', '{$name}', '{$email}', '{$yousay}', '{$ket}', '{$tgl}')";
    $hasil = @mysql_query($perintah1);
    if ($hasil) {
        posted('shoutbox');
Example #23
0
 echo '<tr>';
 $i = 1;
 $percent = 100 / $pics_per_row;
 while ($pic = mysql_fetch_array($ergebnis)) {
     if ($i % 2) {
         $bg = BG_2;
     } else {
         $bg = BG_1;
     }
     $dir = 'images/gallery/';
     $pic['pic'] = $dir . 'thumb/' . $pic['picID'] . '.jpg';
     if (!file_exists($pic['pic'])) {
         $pic['pic'] = 'images/nopic.gif';
     }
     $pic['name'] = clearfromtags($pic['name']);
     $pic['comment'] = cleartext($pic['comment'], false);
     $pic['comments'] = mysql_num_rows(safe_query("SELECT commentID FROM " . PREFIX . "comments WHERE parentID='" . $pic['picID'] . "' AND type='ga'"));
     eval("\$gallery = \"" . gettemplate("gallery_showlist") . "\";");
     echo $gallery;
     if ($pics_per_row > 1) {
         if (($i - 1) % $pics_per_row == $pics_per_row - 1) {
             echo '</tr><tr>';
         }
     } else {
         echo '</tr><tr>';
     }
     $i++;
 }
 echo '<td bgcolor="' . $bgcat . '">&nbsp;</td></tr>';
 eval("\$gallery = \"" . gettemplate("gallery_gallery_foot") . "\";");
 echo $gallery;
Example #24
0
           $td = 'td2';
       }
       $games = explode(";", $db['games']);
       $games = implode(", ", $games);
       if ($games) {
           $games = "(" . $games . ")";
       }
       if ($db['gamesquad']) {
           $type = $_language->module['gaming_squad'] . '<br /><small>' . $games . '</small>';
       } else {
           $type = $_language->module['non_gaming_squad'];
       }
       echo '<tr>
   <td class="' . $td . '"><a href="../players" target="_blank">' . getinput($db['name']) . '</a></td>
   <td class="' . $td . '" align="center">' . $type . '</td>
   <td class="' . $td . '">' . cleartext($db['info'], 1, 'admin') . '</td>
   <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=squads&amp;action=edit&amp;squadID=' . $db['squadID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
   <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=squads&amp;delete=true&amp;squadID=' . $db['squadID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
   <td class="' . $td . '" align="center"><select name="sort[]">';
       for ($j = 1; $j <= $anzsquads; $j++) {
           if ($db['sort'] == $j) {
               echo '<option value="' . $db['squadID'] . '-' . $j . '" selected="selected">' . $j . '</option>';
           } else {
               echo '<option value="' . $db['squadID'] . '-' . $j . '">' . $j . '</option>';
           }
       }
       echo '</select>
   </td>
 </tr>';
       $i++;
   }
Example #25
0
     if ($ds['url'] != "http://" && $ds['url'] != "") {
         $hp = '<a href="' . $ds['url'] . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="' . $_language->module['homepage'] . '" /></a>';
     } else {
         $hp = '';
     }
     $ip = 'IP: ';
     if (isfeedbackadmin($userID)) {
         $ip .= $ds['ip'];
     } else {
         $ip .= 'saved';
     }
     $quotemessage = addslashes(getinput($ds['comment']));
     $quotenickname = addslashes(getinput($ds['nickname']));
     $quote = str_replace(array('%nickname%', '%message%'), array($quotenickname, $quotemessage), $_language->module['quote_link']);
 }
 $content = cleartext($ds['comment']);
 $content = toggle($content, $ds['commentID']);
 if (isfeedbackadmin($userID) or iscommentposter($userID, $ds['commentID'])) {
     $edit = '<a href="index.php?site=comments&amp;editcomment=true&amp;id=' . $ds['commentID'] . '&amp;ref=' . urlencode($referer) . '" title="' . $_language->module['edit_comment'] . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit_comment'] . '" /></a>';
 } else {
     $edit = '';
 }
 if (isfeedbackadmin($userID)) {
     $actions = '<input class="input" type="checkbox" name="commentID[]" value="' . $ds['commentID'] . '" />';
 } else {
     $actions = '';
 }
 eval("\$comments = \"" . gettemplate("comments") . "\";");
 echo $comments;
 unset($member);
 unset($quote);
Example #26
0
     $mousepad = $_language->module['n_a'];
 }
 $anznewsposts = getusernewsposts($ds['userID']);
 $anzforumtopics = getuserforumtopics($ds['userID']);
 $anzforumposts = getuserforumposts($ds['userID']);
 $comments = array();
 $comments[] = getusercomments($ds['userID'], 'ne');
 $comments[] = getusercomments($ds['userID'], 'cw');
 $comments[] = getusercomments($ds['userID'], 'ar');
 $comments[] = getusercomments($ds['userID'], 'de');
 $pmgot = 0;
 $pmgot = $ds['pmgot'];
 $pmsent = 0;
 $pmsent = $ds['pmsent'];
 if ($ds['about']) {
     $about = cleartext($ds['about']);
 } else {
     $about = $_language->module['n_a'];
 }
 if (isforumadmin($ds['userID'])) {
     $usertype = $_language->module['administrator'];
     $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
 } elseif (isanymoderator($ds['userID'])) {
     $usertype = $_language->module['moderator'];
     $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="" />';
Example #27
0
    $linkcat = safe_query("SELECT * FROM " . PREFIX . "links WHERE linkcatID='{$linkcatID}' ORDER BY name");
    if (mysql_num_rows($linkcat)) {
        eval("\$links_details_head = \"" . gettemplate("links_details_head") . "\";");
        echo $links_details_head;
        $i = 1;
        while ($ds = mysql_fetch_array($linkcat)) {
            if ($i % 2) {
                $bg1 = BG_1;
                $bg2 = BG_2;
            } else {
                $bg1 = BG_3;
                $bg2 = BG_4;
            }
            $i++;
            $link = '<a href="' . $ds['url'] . '" target="_blank"><b>' . $ds['name'] . '</b></a>';
            $info = cleartext($ds['info']);
            if ($ds['banner']) {
                $banner = '<a href="' . $ds['url'] . '" target="_blank"><img src="images/links/' . $ds['banner'] . '" border="0" alt="" /></a>';
            } else {
                $banner = '';
            }
            if (ispageadmin($userID) || isnewsadmin($userID)) {
                $adminaction = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=links&amp;action=edit&amp;linkID=' . $ds['linkID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
				<input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'links.php?action=delete&amp;linkID=' . $ds['linkID'] . '\')" value="' . $_language->module['delete'] . '" />';
            } else {
                $adminaction = '';
            }
            eval("\$links_details = \"" . gettemplate("links_details") . "\";");
            echo $links_details;
            unset($banner);
        }