Пример #1
0
         }
         if ($ds['warmember']) {
             $fight = '<select name="war[' . $ds['sqmID'] . ']"><option value="1" selected="selected">' . $_language->module['yes'] . '</option><option value="0">' . $_language->module['no'] . '</option></select>';
         } else {
             $fight = '<select name="war[' . $ds['sqmID'] . ']"><option value="1">' . $_language->module['yes'] . '</option><option value="0" selected="selected">' . $_language->module['no'] . '</option></select>';
         }
         $squads .= '<tr>
     <td colspan="2"><hr /></td>
   </tr>
   <tr>
     <td><b>' . $_language->module['squad'] . '</b></td>
     <td><b>' . getsquadname($ds['squadID']) . '</b></td>
   </tr>
   <tr>
     <td><b>' . $_language->module['position'] . '</b></td>
     <td><input type="text" name="position[' . $ds['sqmID'] . ']" value="' . getinput($ds['position']) . '" size="60" />' . $activity . '</td>						   
   </tr>
   <tr>
     <td><b>' . $_language->module['access_rights'] . '</b></td>
     <td>' . $_language->module['joinus_admin'] . ': ' . $join . '&nbsp; &nbsp; ' . $_language->module['fightus_admin'] . ': ' . $fight . '</td>
   </tr>';
     }
 }
 if (isnewsadmin($id)) {
     $news = '<input type="checkbox" name="newsadmin" value="1" onmouseover="showWMTT(\'id1\')" onmouseout="hideWMTT()" checked="checked" />';
 } else {
     $news = '<input type="checkbox" name="newsadmin" value="1" onmouseover="showWMTT(\'id1\')" onmouseout="hideWMTT()" />';
 }
 if (isnewswriter($id)) {
     $newswriter = '<input type="checkbox" name="newswriter" value="1" onmouseover="showWMTT(\'id2\')" onmouseout="hideWMTT()" checked="checked" />';
 } else {
Пример #2
0
           $td = 'td1';
       } else {
           $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>';
Пример #3
0
 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 {
         $results = '<font color="' . $drawcolor . '">' . $homescr . ':' . $oppscr . '</font>';
Пример #4
0
    }
    $ergebnis = safe_query("SELECT * FROM `" . PREFIX . "imprint`");
    $ds = mysql_fetch_array($ergebnis);
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    $_language->read_module('bbcode', true);
    eval("\$addbbcode = \"" . gettemplate("addbbcode", "html", "admin") . "\";");
    eval("\$addflags = \"" . gettemplate("flags_admin", "html", "admin") . "\";");
    echo '<script language="JavaScript" type="text/javascript">
					<!--
						function chkFormular() {
							if(!validbbcode(document.getElementById(\'message\').value, \'admin\')){
								return false;
							}
						}
					-->
				</script>';
    echo '<form method="post" id="post" name="post" action="admincenter.php?site=imprint" onsubmit="return chkFormular();">
  <input type="radio" name="type" value="0" ' . $type0 . ' /> ' . $_language->module['automatic'] . '<br />
  <input type="radio" name="type" value="1" ' . $type1 . ' /> ' . $_language->module['manual'] . '<br /><br /><b>' . $_language->module['imprint'] . '</b><br /><small>' . $_language->module['you_can_use_html'] . '</small><br /><br />';
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
		      <tr>
		        <td valign="top">' . $addbbcode . '</td>
		        <td valign="top">' . $addflags . '</td>
		      </tr>
		    </table>';
    echo '<br /><textarea id="message" name="message" rows="30" cols="" style="width: 100%;">' . getinput($ds['imprint']) . '</textarea><br /><br /><input type="hidden" name="captcha_hash" value="' . $hash . '" />
  <input type="submit" name="submit" value="' . $_language->module['update'] . '" />
  </form>';
}
Пример #5
0
     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>
     <td class="' . $td . '" align="center"><select name="sortfaq[]">';
         for ($j = 1; $j <= $anzfaq; $j++) {
             if ($db['sort'] == $j) {
                 echo '<option value="' . $db['faqID'] . '-' . $j . '" selected="selected">' . $j . '</option>';
             } else {
                 echo '<option value="' . $db['faqID'] . '-' . $j . '">' . $j . '</option>';
             }
         }
         echo '</select></td>
   </tr>';
         $i++;
     }
 }
Пример #6
0
        $server = htmlspecialchars($ds['server']);
        $hltv = htmlspecialchars($ds['hltv']);
        $banner = $ds['banner'];
        $linkpage = htmlspecialchars($ds['linkpage']);
        $report = htmlspecialchars($ds['report']);
        $linkpage = htmlspecialchars($ds['linkpage']);
        // map-output, v1.0
        $map = unserialize($ds['maps']);
        $theHomeScore = unserialize($ds['homescore']);
        $theOppScore = unserialize($ds['oppscore']);
        $i = 0;
        for ($i = 0; $i < count($map); $i++) {
            $maps .= '
      <tr>
        <td width="15%"><input type="hidden" name="map_id[]" value="' . $i . '" />map #' . ($i + 1) . '</td>
				<td width="25%"><input type="text" name="map_name[]" value="' . getinput($map[$i]) . '" size="35" /></td>
				<td width="20%"><input type="text" name="map_result_home[]" value="' . $theHomeScore[$i] . '" size="3" /></td>
				<td width="20%"><input type="text" name="map_result_opp[]" value="' . $theOppScore[$i] . '" size="3" /></td>
				<td width="25%"><input type="checkbox" name="delete[' . $i . ']" value="1" /> ' . $_language->module['delete'] . '</td>
			</tr>';
            unset($mapname);
        }
        $gamesquads = safe_query("SELECT * FROM " . PREFIX . "squads WHERE gamesquad='1' ORDER BY sort");
        while ($dq = mysql_fetch_array($gamesquads)) {
            $hometeam .= '<option value="0">' . $dq['name'] . '</option>';
            $squadmembers = safe_query("SELECT * FROM " . PREFIX . "squads_members WHERE squadID='{$dq['squadID']}' ORDER BY sort");
            while ($dm = mysql_fetch_array($squadmembers)) {
                $hometeam .= '<option value="' . $dm['userID'] . '">&nbsp; - ' . getnickname($dm['userID']) . '</option>';
            }
            $hometeam .= '<option value="0">&nbsp;</option>';
        }
Пример #7
0
                $td = 'td1';
            } else {
                $td = 'td2';
            }
            $ds['displayed'] == 1 ? $displayed = '<font color="green"><b>' . $_language->module['yes'] . '</b></font>' : ($displayed = '<font color="red"><b>' . $_language->module['no'] . '</b></font>');
            if (stristr($ds['bannerurl'], 'http://')) {
                $bannerurl = '<a href="' . getinput($ds['bannerurl']) . '" target="_blank">' . getinput($ds['bannerurl']) . '</a>';
            } else {
                $bannerurl = '<a href="http://' . getinput($ds['bannerurl']) . '" target="_blank">' . getinput($ds['bannerurl']) . '</a>';
            }
            $days = round((time() - $ds['date']) / (60 * 60 * 24));
            if ($days) {
                $perday = round($ds['hits'] / $days, 2);
            } else {
                $perday = $ds['hits'];
            }
            echo '<tr>
        <td class="' . $td . '">' . getinput($ds['bannername']) . '</td>
        <td class="' . $td . '">' . $bannerurl . '</td>
        <td class="' . $td . '">' . $ds['hits'] . ' (' . $perday . ')</td>
        <td class="' . $td . '" align="center">' . $displayed . '</td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=bannerrotation&amp;action=edit&amp;bannerID=' . $ds['bannerID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=bannerrotation&amp;delete=true&amp;bannerID=' . $ds['bannerID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
      </tr>';
            $i++;
        }
    } else {
        echo '<tr><td class="td1" colspan="5">' . $_language->module['no_entries'] . '</td></tr>';
    }
    echo '</table></form>';
}
Пример #8
0
    $bg1 = BG_1;
    $ds = mysql_fetch_array($ergebnis);
    $admincomment = getinput($ds['admincomment']);
    eval("\$title_guestbook = \"" . gettemplate("title_guestbook") . "\";");
    echo $title_guestbook;
    eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
    eval("\$guestbook_comment = \"" . gettemplate("guestbook_comment") . "\";");
    echo $guestbook_comment;
} elseif ($action == 'add') {
    $_language->read_module('guestbook');
    $_language->read_module('bbcode', true);
    $message = '';
    if (isset($_GET['messageID'])) {
        if (is_numeric($_GET['messageID'])) {
            $ds = mysql_fetch_array(safe_query("SELECT comment, name FROM `" . PREFIX . "guestbook` WHERE gbID='" . $_GET['messageID'] . "'"));
            $message = '[quote=' . $ds['name'] . ']' . getinput($ds['comment']) . '[/quote]';
        }
    }
    eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
    $bg1 = BG_1;
    if (isset($_GET['error'])) {
        if ($_GET['error'] == "captcha") {
            $error = $_language->module['error_captcha'];
        } else {
            $error = $_language->module['enter_a_message'];
        }
    } else {
        $error = null;
    }
    if ($loggedin) {
        eval("\$guestbook_loggedin = \"" . gettemplate("guestbook_loggedin") . "\";");
Пример #9
0
                echo $search_result;
                $i++;
            }
        } else {
            echo str_replace("%min_chars%", $search_min_len, $_language->module['too_short']);
        }
    } else {
        echo $_language->module['wrong_securitycode'];
    }
} else {
    if (!isset($_GET['site'])) {
        header("Location: index.php?site=search");
    }
    $_language->read_module('search');
    if (isset($_REQUEST['text'])) {
        $text = getinput($_REQUEST['text']);
    } else {
        $text = '';
    }
    eval("\$title_search = \"" . gettemplate("title_search") . "\";");
    echo $title_search;
    $bg1 = BG_1;
    if ($userID) {
        eval("\$search_form = \"" . gettemplate("search_form_loggedin") . "\";");
        echo $search_form;
    } else {
        $CAPCLASS = new Captcha();
        $captcha = $CAPCLASS->create_captcha();
        $hash = $CAPCLASS->get_hash();
        $CAPCLASS->clear_oldcaptcha();
        eval("\$search_form = \"" . gettemplate("search_form_notloggedin") . "\";");
Пример #10
0
      <td width="25%" class="title"><b>' . $_language->module['actions'] . '</b></td>
    </tr>';
    $ds = safe_query("SELECT * FROM " . PREFIX . "countries ORDER BY country");
    $anz = mysql_num_rows($ds);
    if ($anz) {
        $i = 1;
        $CAPCLASS = new Captcha();
        $CAPCLASS->create_transaction();
        $hash = $CAPCLASS->get_hash();
        while ($flags = mysql_fetch_array($ds)) {
            if ($i % 2) {
                $td = 'td1';
            } else {
                $td = 'td2';
            }
            $pic = '<img src="../images/flags/' . $flags['short'] . '.gif" border="0" alt="' . $flags['country'] . '" />';
            echo '<tr>
        <td class="' . $td . '" align="center">' . $pic . '</td>
        <td class="' . $td . '">' . getinput($flags['country']) . '</td>
        <td class="' . $td . '" align="center">' . getinput($flags['short']) . '</td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=countries&amp;action=edit&amp;countryID=' . $flags['countryID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=countries&amp;delete=true&amp;countryID=' . $flags['countryID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
      </tr>';
            $i++;
        }
    } else {
        echo '<tr><td class="td1" colspan="5">' . $_language->module['no_entries'] . '</td></tr>';
    }
    echo '</table>
  </form>';
}
Пример #11
0
           $td = 'td1';
       } else {
           $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="../index.php?site=squads&amp;squadID=' . $db['squadID'] . '" 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>';
Пример #12
0
  </form>';
} else {
    echo '<h1>&curren; News Category</h1>';
    echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=news_category&amp;action=add\');return document.MM_returnValue" value="New Category" /><br /><br />';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "news_category ORDER BY category");
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
    <tr>
	  <td width="10%" class="title"><b>CategoryID</b></td>
      <td width="40%" class="title"><b>Category Name</b></td>
      <td width="20%" class="title"><b>Options</b></td>
   		</tr>';
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    $i = 1;
    while ($ds = mysql_fetch_array($ergebnis)) {
        if ($i % 2) {
            $td = 'td1';
        } else {
            $td = 'td2';
        }
        echo '<tr>
	  <td class="' . $td . '" align="center">' . $ds['categoryID'] . '</td>
      <td class="' . $td . '">' . getinput($ds['category']) . '</td>
      <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=news_category&amp;action=edit&amp;categoryID=' . $ds['categoryID'] . '\');return document.MM_returnValue" value="Edit" />
      <input type="button" onclick="MM_confirm(\'Are you sure you wanna delete?\', \'admincenter.php?site=news_category&amp;delete=true&amp;categoryID=' . $ds['categoryID'] . '&amp;captcha_hash=' . $hash . '\')" value="Delete" /></td>
    </tr>';
        $i++;
    }
    echo '</table>';
}
Пример #13
0
function getuserlanguage($userID)
{
    $ds = mysql_fetch_array(safe_query("SELECT language FROM " . PREFIX . "user WHERE userID='" . $userID . "'"));
    return getinput($ds['language']);
}
Пример #14
0
  </tr>
  <tr>
    <td><b><?php 
    echo $_language->module['admin_name'];
    ?>
</b></td>
    <td><input type="text" name="admname" value="<?php 
    echo getinput($ds['adminname']);
    ?>
" size="35" onmouseover="showWMTT('id5')" onmouseout="hideWMTT()" /></td>
    <td><b><?php 
    echo $_language->module['admin_email'];
    ?>
</b></td>
    <td><input type="text" name="admmail" value="<?php 
    echo getinput($ds['adminemail']);
    ?>
" size="35" onmouseover="showWMTT('id6')" onmouseout="hideWMTT()" /></td>
  </tr>
</table>
<br /><br />
<table width="100%" border="0" cellspacing="1" cellpadding="3">
  <tr>
    <td colspan="2"><b><?php 
    echo $_language->module['additional_options'];
    ?>
:</b></td>
  </tr>
  <tr>
    <td>&#8226; <a href="admincenter.php?site=lock"><b><?php 
    echo $_language->module['pagelock'];
Пример #15
0
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "contact ORDER BY sort");
    $anz = safe_query("SELECT count(contactID) FROM " . PREFIX . "contact");
    $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 . '">' . getinput($ds['name']) . '</td>
		<td class="' . $td . '">' . getinput($ds['email']) . '</td>
      <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=contact&amp;action=edit&amp;contactID=' . $ds['contactID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
      <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=contact&amp;delete=true&amp;contactID=' . $ds['contactID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
      <td class="' . $td . '" align="center"><select name="sortcontact[]">';
        for ($n = 1; $n <= $anz; $n++) {
            if ($ds['sort'] == $n) {
                echo '<option value="' . $ds['contactID'] . '-' . $n . '" selected="selected">' . $n . '</option>';
            } else {
                echo '<option value="' . $ds['contactID'] . '-' . $n . '">' . $n . '</option>';
            }
        }
        echo '</select></td>
    </tr>';
        $i++;
    }
    echo '<tr>
Пример #16
0
    echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=newslanguages&amp;action=add\');return document.MM_returnValue" value="' . $_language->module['new_language'] . '" /><br /><br />';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "news_languages ORDER BY language");
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
    <tr>
      <td width="10%" class="title"><b>' . $_language->module['flag'] . '</b></td>
      <td width="35%" class="title"><b>' . $_language->module['language'] . '</b></td>
      <td width="35%" class="title"><b>' . $_language->module['title'] . '</b></td>
      <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
    </tr>';
    $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';
        }
        $getflag = '<img src="../images/flags/' . $ds['lang'] . '.gif" border="0" alt="' . $ds['alt'] . '" />';
        echo '<tr>
      <td class="' . $td . '" align="center">' . $getflag . '</td>
      <td class="' . $td . '">' . getinput($ds['language']) . '</td>
      <td class="' . $td . '">' . getinput($ds['alt']) . '</td>
      <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=newslanguages&amp;action=edit&amp;langID=' . $ds['langID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
      <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=newslanguages&amp;delete=true&amp;langID=' . $ds['langID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
    </tr>';
        $i++;
    }
    echo '</table>';
}
Пример #17
0
    </tr>
  </table>
  </form>';
} else {
    echo '<h1>&curren; ' . $_language->module['groups'] . '</h1>';
    echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=groups&amp;action=add\');return document.MM_returnValue" value="' . $_language->module['new_group'] . '" /><br /><br />';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_groups ORDER BY fgrID");
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
    <tr>
      <td width="80%" class="title"><b>' . $_language->module['group_name'] . '</b></td>
      <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
    </tr>';
    $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['name']) . '</b></td>
      <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=groups&amp;action=edit&amp;fgrID=' . $ds["fgrID"] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
      <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=groups&amp;action=delete&amp;fgrID=' . $ds["fgrID"] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
		</tr>';
        $i++;
    }
    echo '</table>';
}
Пример #18
0
 </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);
 $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++;
 }
Пример #19
0
   $CAPCLASS->create_transaction();
   $hash = $CAPCLASS->get_hash();
   $ergebnis = safe_query("SELECT * FROM " . PREFIX . "scrolltext");
   $ds = mysql_fetch_array($ergebnis);
   $direction = '<option value="left">' . $_language->module['right_to_left'] . '</option>
 <option value="right">' . $_language->module['left_to_right'] . '</option>';
   $direction = str_replace('value="' . $ds['direction'] . '"', 'value="' . $ds['direction'] . '" selected="selected"', $direction);
   $delay = '<option value="1">' . $_language->module['1_slow'] . '</option>
 <option value="2">' . $_language->module['2_normal'] . '</option>
 <option value="3">' . $_language->module['3_fast'] . '</option>';
   $delay = str_replace('value="' . $ds['delay'] . '"', 'value="' . $ds['delay'] . '" selected="selected"', $delay);
   echo '<form method="post" action="admincenter.php?site=scrolltext">
 <table width="100%" border="0" cellspacing="1" cellpadding="3">
   <tr>
     <td colspan="2"><b>' . $_language->module['scrolltext'] . '</b><br /><small>' . $_language->module['you_can_use_html'] . '</small><br /><br />
     <input type="text" size="110" name="text" value="' . getinput($ds['text']) . '" /></td>
   </tr>
   <tr>
     <td width="15%"><b>' . $_language->module['direction'] . '</b></td>
     <td width="85%"><select name="direction">' . $direction . '</select></td>
   </tr>
   <tr>
     <td><b>' . $_language->module['delay'] . '</b></td>
     <td><select name="delay">' . $delay . '</select></td>
   </tr>
   <tr>
     <td><b>' . $_language->module['color'] . '</b></td>
     <td><input type="text" name="color" value="' . $ds['color'] . '" maxlength="7" /> ' . $_language->module['example'] . '</td>
   </tr>
   <tr>
     <td colspan="2"><br /><input type="hidden" name="captcha_hash" value="' . $hash . '" /><input type="submit" name="submit" value="' . $_language->module['update'] . '" />
Пример #20
0
 } else {
     $squads = getsquads();
 }
 $bg1 = BG_1;
 if ($loggedin) {
     if (!isset($showerror)) {
         $showerror = '';
     }
     $res = safe_query("SELECT *, DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW()) - TO_DAYS(birthday)), '%y') 'age' FROM " . PREFIX . "user WHERE userID = '{$userID}'");
     $ds = mysql_fetch_assoc($res);
     $nickname = getinput($ds['nickname']);
     $name = getinput($ds['firstname'] . " " . $ds['lastname']);
     $email = getinput($ds['email']);
     $messenger = getinput($ds['icq']);
     $age = $ds['age'];
     $city = getinput($ds['town']);
     if (isset($_POST['clanhistory'])) {
         $clanhistory = getforminput($_POST['clanhistory']);
     } else {
         $clanhistory = '';
     }
     if (isset($_POST['info'])) {
         $info = getforminput($_POST['info']);
     } else {
         $info = '';
     }
     eval("\$joinus_loggedin = \"" . gettemplate("joinus_loggedin") . "\";");
     echo $joinus_loggedin;
 } else {
     $CAPCLASS = new Captcha();
     $captcha = $CAPCLASS->create_captcha();
Пример #21
0
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
}
$post = "";
if (isnewswriter($userID)) {
    $post = '<input type="button" onclick="MM_openBrWindow(\'news.php?action=new\',\'News\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=600\')" value="' . $_language->module['post_news'] . '" />';
}
echo $post . ' <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=news&amp;action=archive\');return document.MM_returnValue" value="' . $_language->module['news_archive'] . '" /><hr />';
if ($newsID) {
    $result = safe_query("SELECT * FROM " . PREFIX . "news WHERE newsID='" . $newsID . "'");
    $ds = mysql_fetch_array($result);
    if ($ds['intern'] <= isclanmember($userID) && ($ds['published'] || (isnewsadmin($userID) || (isnewswriter($userID) and $ds['poster'] == $userID)))) {
        $date = date("d.m.Y", $ds['date']);
        $time = date("H:i", $ds['date']);
        $rubrikname = getrubricname($ds['rubric']);
        $rubrikname_link = getinput($rubrikname);
        $rubricpic_name = getrubricpic($ds['rubric']);
        $rubricpic = 'images/news-rubrics/' . $rubricpic_name;
        if (!file_exists($rubricpic) or $rubricpic_name == '') {
            $rubricpic = '';
        } else {
            $rubricpic = '<img src="' . $rubricpic . '" border="0" alt="" />';
        }
        $message_array = array();
        $query = safe_query("SELECT n.*, c.short AS `countryCode`, c.country FROM " . PREFIX . "news_contents n LEFT JOIN " . PREFIX . "countries c ON c.short = n.language WHERE n.newsID='" . $newsID . "'");
        while ($qs = mysql_fetch_array($query)) {
            $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content'], 'country' => $qs['country'], 'countryShort' => $qs['countryCode']);
        }
        if (isset($_GET['lang'])) {
            $showlang = getlanguageid($_GET['lang'], $message_array);
        } else {
Пример #22
0
        echo '</table></form><br /><br />';
        echo '<h1>&curren; <a href="admincenter.php?site=gallery" class="white">' . $_language->module['gallery'] . '</a> &raquo; ' . $_language->module['usergalleries'] . '</h1>';
        $ergebnis = safe_query("SELECT * FROM " . PREFIX . "gallery WHERE userID!='0'");
        echo '<form method="post" name="ws_gallery" action="admincenter.php?site=gallery&amp;part=gallerys">
    <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
      <tr>
        <td width="50%" class="title"><b>' . $_language->module['gallery_name'] . '</b></td>
        <td width="30%" class="title"><b>' . $_language->module['usergallery_of'] . '</b></td>
        <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
      </tr>';
        $CAPCLASS = new Captcha();
        $CAPCLASS->create_transaction();
        $hash = $CAPCLASS->get_hash();
        $i = 1;
        while ($ds = mysql_fetch_array($ergebnis)) {
            if ($i % 2) {
                $td = 'td1';
            } else {
                $td = 'td2';
            }
            echo '<tr>
        <td class="' . $td . '"><a href="../index.php?site=gallery&amp;galleryID=' . $ds['galleryID'] . '" target="_blank">' . getinput($ds['name']) . '</a></td>
        <td class="' . $td . '"><a href="../index.php?site=profile&amp;id=' . $userID . '" target="_blank">' . getnickname($ds['userID']) . '</a></td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=gallery&amp;part=gallerys&amp;action=edit&amp;galleryID=' . $ds['galleryID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete_gallery'] . '\', \'admincenter.php?site=gallery&amp;part=gallerys&amp;delete=true&amp;galleryID=' . $ds['galleryID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
      </tr>';
            $i++;
        }
        echo '</table></form>';
    }
}
Пример #23
0
/**
* Handles the actual XML between the <template/> tags.
*
* Recognises the different tags, access the different functions to process each individual tag. Notes by the original developer: <br/>
* Why isn't this a huge switch statement? Because it has to do more comlicated checking than just string comparison to figure out what it should do. <br/>
* How can I organize this better? Good question.
*
* @todo It seems to me that this function could modelled similarly to the custom tag system. Where there is a seperate function for each tag.
*
* @uses getid()
* @uses getfdate()
* @uses getsize()
* @uses upperkeysarray()
* @uses debugger()
* @uses recursechildren()
* @uses respond()
* @uses botget()
* @uses gender()
* @uses getinput()
* @uses bset()
* @uses insertgossip()
* @uses firstthird()
* @uses firstsecond()
* @uses getthat()
* @uses realchild()
*
* @param mixed $xmlnode               Getting either a string or an array from recursechildren() func.
* @param array $inputstar             If a matched pattern includes *'s then what is covere by the * is found here.
* @param array $thatstar              if a used that contains a star, then what is covered by the * is found here.
* @param array $topicstar             if a used topic contains a star, then what is covered by the * is found here.
*
* @return string                      The bot's response.
*/
function handlenode($xmlnode, $inputstar, $thatstar, $topicstar)
{
    if (!is_array($xmlnode)) {
        return $xmlnode;
    } elseif (strtoupper($xmlnode["tag"]) == "ID") {
        return getid();
    } elseif (strtoupper($xmlnode["tag"]) == "DATE") {
        //		return getfdate(); // deprecated
        $mynode = upperkeysarray($xmlnode["attributes"]);
        // Get the value of an attribute
        $date_format = $mynode["FORMAT"];
        return getfdate($date_format);
    } elseif (strtoupper($xmlnode["tag"]) == "VERSION") {
        return PROGRAMEVERSION;
    } elseif (strtoupper($xmlnode["tag"]) == "SIZE") {
        return getsize();
    } elseif (strtoupper($xmlnode["tag"]) == "STAR") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$starindex=$xmlnode["attributes"]["INDEX"];
        if (!(is_array($mynode) && isset($mynode["INDEX"]))) {
            $mynode["INDEX"] = "";
        }
        $starindex = $mynode["INDEX"];
        if ($starindex == "") {
            $starindex = "1";
        }
        debugger("starindex: {$starindex}", 3);
        //print_r($inputstar);
        return $inputstar[$starindex - 1];
    } elseif (strtoupper($xmlnode["tag"]) == "THATSTAR") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$starindex=$xmlnode["attributes"]["INDEX"];
        if (!(is_array($mynode) && isset($mynode["INDEX"]))) {
            $mynode["INDEX"] = "";
        }
        $starindex = $mynode["INDEX"];
        if ($starindex == "") {
            $starindex = "1";
        }
        debugger("starindex: {$starindex}", 3);
        //print_r($inputstar);
        return $thatstar[$starindex - 1];
    } elseif (strtoupper($xmlnode["tag"]) == "TOPICSTAR") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$starindex=$xmlnode["attributes"]["INDEX"];
        if (!(is_array($mynode) && isset($mynode["INDEX"]))) {
            $mynode["INDEX"] = "";
        }
        $starindex = $mynode['INDEX'];
        if ($starindex == "") {
            $starindex = "1";
        }
        debugger("starindex: {$starindex}", 3);
        //print_r($inputstar);
        return $topicstar[$starindex - 1];
    } elseif (strtoupper($xmlnode["tag"]) == "SRAI") {
        // Build up a new response inside of here (using recursechildren function and then call response with it.
        $newresponse = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        debugger("newresponts: {$newresponse}", 3);
        return respond($newresponse);
    } elseif (strtoupper($xmlnode["tag"]) == "SR") {
        return respond($inputstar[0]);
    } elseif (strtoupper($xmlnode["tag"]) == "RANDOM") {
        $liarray = array();
        $children = $xmlnode["children"];
        for ($randomc = 0; $randomc < sizeof($children); $randomc++) {
            if (strtoupper($children[$randomc]["tag"]) == "LI") {
                $liarray[] = $randomc;
            }
        }
        // Pick a random number from 0 to sizeof($liarray)-1
        mt_srand((double) microtime() * 1000000);
        $lirandom = mt_rand(0, sizeof($liarray) - 1);
        return recursechildren(realchild($children[$liarray[$lirandom]]), $inputstar, $thatstar, $topicstar);
    } elseif (strtoupper($xmlnode["tag"]) == "THINK") {
        recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        return "";
    } elseif (strtoupper($xmlnode["tag"]) == "BOT") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$name=$xmlnode["attributes"]["NAME"];
        $name = $mynode["NAME"];
        return botget($name);
    } elseif (strtoupper($xmlnode["tag"]) == "GET") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$name=$xmlnode["attributes"]["NAME"];
        $name = $mynode["NAME"];
        return bget($name);
    } elseif (strtoupper($xmlnode["tag"]) == "SET") {
        //$name=$xmlnode["attributes"]["NAME"];
        $mynode = upperkeysarray($xmlnode["attributes"]);
        $name = $mynode["NAME"];
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        bset($name, $value);
        return $value;
    } elseif (strtoupper($xmlnode["tag"]) == "UPPERCASE") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        return strtoupper($value);
    } elseif (strtoupper($xmlnode["tag"]) == "FORMAL") {
        $nvalue = "";
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        $value = strtolower($value);
        $words = split(" ", $value);
        for ($x = 0; $x < sizeof($words); $x++) {
            if ($x != 0) {
                $nvalue .= " ";
            }
            $nvalue .= ucfirst($words[$x]);
        }
        return $nvalue;
    } elseif (strtoupper($xmlnode["tag"]) == "LOWERCASE") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        return strtolower($value);
    } elseif (strtoupper($xmlnode["tag"]) == "GENDER") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        return gender($value);
    } elseif (strtoupper($xmlnode["tag"]) == "SENTENCE") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        return ucfirst($value);
    } elseif (strtoupper($xmlnode["tag"]) == "INPUT") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$index = $xmlnode["attributes"]["INDEX"];
        if (!(is_array($mynode) && isset($mynode["INDEX"]))) {
            $mynode["INDEX"] = "";
        }
        $index = $mynode["INDEX"];
        if ($index == "") {
            $index = 1;
        }
        $index = $index - 1;
        return getinput($index);
    } elseif (strtoupper($xmlnode["tag"]) == "GOSSIP") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        insertgossip($value);
        return $value;
    } elseif (strtoupper($xmlnode["tag"]) == "PERSON") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        if ($value == "") {
            $value = $inputstar[0];
        }
        return firstthird($value);
    } elseif (strtoupper($xmlnode["tag"]) == "PERSON2") {
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        if ($value == "") {
            $value = $inputstar[0];
        }
        return firstsecond($value);
    } elseif (strtoupper($xmlnode["tag"]) == "THAT") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        //$indexes = $xmlnode["attributes"]["INDEX"];
        if (is_array($mynode) && isset($mynode["INDEX"])) {
            $indexes = $mynode["INDEX"];
        } else {
            $indexes = "";
        }
        $indexes = split(",", $indexes);
        if (sizeof($indexes) < 2) {
            $indexes = array();
            $indexes[] = 1;
            $indexes[] = 1;
        }
        return getthat($indexes[0], $indexes[1]);
    } elseif (strtoupper($xmlnode["tag"]) == "CONDITION") {
        $mynode = upperkeysarray($xmlnode["attributes"]);
        // First do multi condition name=value
        if (is_array($mynode) && isset($mynode["NAME"])) {
            $condname = $mynode["NAME"];
        } else {
            $condname = "";
        }
        if (is_array($mynode) && isset($mynode["VALUE"])) {
            $condvalue = $mynode["VALUE"];
        } else {
            $condvalue = "";
        }
        if (is_array($mynode) && isset($mynode["CONTAINS"])) {
            $condcontains = $mynode["CONTAINS"];
        } else {
            $condcontains = "";
        }
        if (is_array($mynode) && isset($mynode["EXISTS"])) {
            $condexists = $mynode["EXISTS"];
        } else {
            $condexists = "";
        }
        /*
        		$condname=$mynode["NAME"];
        		$condvalue=$mynode["VALUE"];
        		$condcontains=$mynode["CONTAINS"];
        		$condexists=$mynode["EXISTS"];
        */
        // If this is a multi condition
        if ($condname != "" && $condvalue != "") {
            if ($condvalue != "") {
                $condtype = "VALUE";
            } elseif ($condcontains != "") {
                $condtype = "CONTAINS";
            } elseif ($condexists != "") {
                $condtype = "EXISTS";
            }
            if ($condtype == "VALUE") {
                $condvalue = "^" . str_replace("*", "(.*)", $condvalue);
                //if ((bget($condname))==$condvalue){
                #				if (eregi($condvalue,bget($condname))){
                if (stripos(bget($condname), $condvalue) !== false) {
                    return recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
                }
            }
        } elseif ($condname != "" && $condvalue == "") {
            $children = $xmlnode["children"];
            $checkval = bget($condname);
            // After a match break. If no match then execute last if no name or val
            for ($randomc = 0; $randomc < sizeof($children); $randomc++) {
                if (strtoupper($children[$randomc]["tag"]) == "LI") {
                    $mynode = upperkeysarray($children[$randomc]["attributes"]);
                    //$condvalue=$children[$randomc]["attributes"]["VALUE"];
                    if (!(is_array($mynode) && isset($mynode["VALUE"]))) {
                        $mynode["VALUE"] = "";
                    }
                    $condvalue = $mynode["VALUE"];
                    $condvalue = "^" . str_replace("*", "(.*)", $condvalue) . "\$";
                    #					if ((eregi($condvalue,$checkval))||($condvalue=="^\$")){
                    if (preg_match("/" . $condvalue . "/i", $checkval) || $condvalue == "^\$") {
                        return recursechildren(realchild($children[$randomc]), $inputstar, $thatstar, $topicstar);
                    }
                }
            }
        } elseif ($condname == "" && $condvalue == "") {
            $children = $xmlnode["children"];
            // After a match break. If no match then execute last if no name or val
            for ($randomc = 0; $randomc < sizeof($children); $randomc++) {
                if (strtoupper($children[$randomc]["tag"]) == "LI") {
                    $mynode = upperkeysarray($children[$randomc]["attributes"]);
                    if (is_array($mynode) && isset($mynode["NAME"])) {
                        $condname = $mynode["NAME"];
                    } else {
                        $condname = "";
                    }
                    if (is_array($mynode) && isset($mynode["VALUE"])) {
                        $condvalue = $mynode["VALUE"];
                    } else {
                        $condvalue = "";
                    }
                    $condvalue = "^" . str_replace("*", "(.*)", $condvalue) . "\$";
                    #					if ((eregi($condvalue,bget($condname))) || (($condvalue=="^\$")&&($condname==""))){
                    if (preg_match("/" . $condvalue . "/i", bget($condname)) || $condvalue == "^\$" && $condname == "") {
                        return recursechildren(realchild($children[$randomc]), $inputstar, $thatstar, $topicstar);
                    }
                }
            }
        }
    } elseif (strtoupper($xmlnode["tag"]) == "SYSTEM") {
        $command = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        exec($command, $execoutput);
        for ($x = 0; $x < sizeof($execoutput); $x++) {
            $allout = $allout . $execoutput[$x];
        }
        return $allout;
    } elseif (strtoupper($xmlnode["tag"]) == "PHP") {
        $phpcode = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        ob_start();
        eval($phpcode);
        $evaled = ob_get_contents();
        ob_end_clean();
        return $evaled;
    } elseif (strtoupper($xmlnode["tag"]) == "JUSTBEFORETHAT") {
        $indexes = array();
        $indexes[] = 2;
        $indexes[] = 1;
        return getthat($indexes[0], $indexes[1]);
    } elseif (strtoupper($xmlnode["tag"]) == "JUSTTHAT") {
        $index = 2;
        $index = $index - 1;
        return getinput($index);
    } elseif (strtoupper($xmlnode["tag"]) == "BEFORETHAT") {
        $index = 3;
        $index = $index - 1;
        return getinput($index);
    } elseif (strtoupper($xmlnode["tag"]) == "GET_IP") {
        return getid();
    } elseif (strtoupper($xmlnode["tag"]) == "GETNAME") {
        $name = "NAME";
        return bget($name);
    } elseif (strtoupper($xmlnode["tag"]) == "GETSIZE") {
        return getsize();
    } elseif (strtoupper($xmlnode["tag"]) == "GETTOPIC") {
        $name = "TOPIC";
        return bget($name);
    } elseif (strtoupper($xmlnode["tag"]) == "GETVERSION") {
        return PROGRAMEVERSION;
    } elseif (substr(strtoupper($xmlnode["tag"]), 0, 4) == "GET_") {
        $name = substr($xmlnode["tag"], 4);
        return bget($name);
    } elseif (strtoupper($xmlnode["tag"]) == "SETNAME") {
        $name = "NAME";
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        bset($name, $value);
        return $value;
    } elseif (strtoupper($xmlnode["tag"]) == "SETTOPIC") {
        $name = "TOPIC";
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        bset($name, $value);
        return $value;
    } elseif (substr(strtoupper($xmlnode["tag"]), 0, 4) == "SET_") {
        $name = substr($xmlnode["tag"], 4);
        $value = recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar);
        bset($name, $value);
        return $value;
    } elseif (isdeprecated(strtoupper($xmlnode["tag"]), $ttag)) {
        $name = $ttag;
        return botget($name);
    } elseif (iscustomtag(strtoupper($xmlnode["tag"]), $ctfunction)) {
        return $ctfunction($xmlnode, $inputstar, $thatstar, $topicstar);
    } else {
        $name = $xmlnode["tag"];
        $atts = $xmlnode["attributes"];
        $atttext = "";
        if ($atts != NULL) {
            foreach ($atts as $key => $value) {
                $atttext .= " {$key}=\"{$value}\"";
            }
        }
        $value = "<{$name}" . $atttext;
        if (isset($xmlnode["children"]) || strcmp($xmlnode["value"], "") != 0) {
            $value .= ">" . recursechildren(realchild($xmlnode), $inputstar, $thatstar, $topicstar) . "</{$name}>";
        } else {
            $value .= "/>";
        }
        return $value;
    }
}
Пример #24
0
  </form>';
} else {
    echo '<h1>&curren; ' . $_language->module['news_rubrics'] . '</h1>';
    echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=rubrics&amp;action=add\');return document.MM_returnValue" value="' . $_language->module['new_rubric'] . '" /><br /><br />';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "news_rubrics ORDER BY rubric");
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
    <tr>
      <td width="25%" class="title"><b>' . $_language->module['rubric_name'] . '</b></td>
      <td width="55%" class="title"><b>' . $_language->module['picture'] . '</b></td>
      <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
   		</tr>';
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    $i = 1;
    while ($ds = mysql_fetch_array($ergebnis)) {
        if ($i % 2) {
            $td = 'td1';
        } else {
            $td = 'td2';
        }
        echo '<tr>
      <td class="' . $td . '">' . getinput($ds['rubric']) . '</td>
      <td class="' . $td . '" align="center"><img src="../images/news-rubrics/' . $ds['pic'] . '" alt="" /></td>
      <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=rubrics&amp;action=edit&amp;rubricID=' . $ds['rubricID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
      <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=rubrics&amp;delete=true&amp;rubricID=' . $ds['rubricID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
    </tr>';
        $i++;
    }
    echo '</table>';
}
Пример #25
0
    </tr>
    <tr>
      <td><b>' . $_language->module['soundcard'] . '</b></td>
      <td><input type="text" name="soundcard" value="' . getinput($ds['soundcard']) . '" size="60" /></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['keyboard'] . '</b></td>
      <td><input type="text" name="keyboard" value="' . getinput($ds['keyboard']) . '" size="60" /></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['mouse'] . '</b></td>
      <td><input type="text" name="mouse" value="' . getinput($ds['mouse']) . '" size="60" /></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['mousepad'] . '</b></td>
      <td><input type="text" name="mousepad" value="' . getinput($ds['mousepad']) . '" size="60" /></td>
    </tr>
    <tr>
      <td><input type="hidden" name="captcha_hash" value="' . $hash . '" /><input type="hidden" name="id" value="' . $id . '" /></td>
      <td><br /><input type="submit" name="edit" value="' . $_language->module['edit_profile'] . '" /></td>
    </tr>
  </table>
  </form>';
} else {
    echo '<h1>&curren; ' . $_language->module['users'] . '</h1>';
    if (isset($_GET['search'])) {
        $search = (int) $_GET['search'];
    } else {
        $search = '';
    }
    if (isset($_GET['page'])) {
Пример #26
0
             //large
             safe_query("DELETE FROM " . PREFIX . "comments WHERE parentID='" . $ds['picID'] . "' AND type='ga'");
         }
         safe_query("DELETE FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET['galleryID'] . "'");
     }
 }
 eval("\$usergallery_title = \"" . gettemplate("title_usergallery") . "\";");
 echo $usergallery_title;
 if (isset($_GET['action'])) {
     if ($_GET['action'] == "add") {
         eval("\$usergallery_add = \"" . gettemplate("usergallery_add") . "\";");
         echo $usergallery_add;
     } elseif ($_GET['action'] == "edit") {
         $ergebnis = safe_query("SELECT * FROM " . PREFIX . "gallery WHERE galleryID='" . $_GET['galleryID'] . "' AND userID='" . $userID . "'");
         $ds = mysql_fetch_array($ergebnis);
         $name = getinput($ds['name']);
         $galleryID = $ds['galleryID'];
         eval("\$usergallery_edit = \"" . gettemplate("usergallery_edit") . "\";");
         echo $usergallery_edit;
     } elseif ($_GET['action'] == "upload") {
         $id = (int) $_GET['galleryID'];
         eval("\$usergallery_upload = \"" . gettemplate("usergallery_upload") . "\";");
         echo $usergallery_upload;
     }
 } else {
     $size = $galclass->getuserspace($userID);
     $percent = percent($size, $maxusergalleries, 0);
     if ($percent > 95) {
         $color = $loosecolor;
     } else {
         $color = $wincolor;
Пример #27
0
function clearfromtags($text)
{
    $text = getinput($text);
    $text = strip_tags($text);
    $text = htmlnl($text);
    $text = nl2br($text);
    return $text;
}
Пример #28
0
      <td width="25%" class="title"><b>' . $_language->module['actions'] . '</b></td>
    </tr>';
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "games ORDER BY name");
    $anz = mysql_num_rows($ergebnis);
    if ($anz) {
        $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';
            }
            $pic = '<img src="../images/games/' . $ds['tag'] . '.gif" border="0" alt="" />';
            echo '<tr>
        <td class="' . $td . '" align="center">' . $pic . '</td>
        <td class="' . $td . '">' . getinput($ds['name']) . '</td>
        <td class="' . $td . '" align="center">' . getinput($ds['tag']) . '</td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=games&amp;action=edit&amp;gameID=' . $ds['gameID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=games&amp;delete=true&amp;gameID=' . $ds['gameID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
      </tr>';
            $i++;
        }
    } else {
        echo '<tr><td class="td1" colspan="5">' . $_language->module['no_entries'] . '</td></tr>';
    }
    echo '</table>
  </form>';
}
Пример #29
0
    }
} else {
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "about");
    $ds = mysql_fetch_array($ergebnis);
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    $_language->read_module('bbcode', true);
    echo '<script language="JavaScript" type="text/javascript">
					<!--
						function chkFormular() {
							if(!validbbcode(document.getElementById(\'message\').value, \'admin\')){
								return false;
							}
						}
					-->
				</script>';
    echo '<form method="post" id="post" name="post" action="admincenter.php?site=about" onsubmit="return chkFormular();">
  <b>' . $_language->module['about'] . '</b><br /><small>' . $_language->module['you_can_use_html'] . '</small><br /><br />';
    eval("\$addbbcode = \"" . gettemplate("addbbcode", "html", "admin") . "\";");
    eval("\$addflags = \"" . gettemplate("flags_admin", "html", "admin") . "\";");
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="none_table">
		      <tr>
		        <td valign="top">' . $addbbcode . '</td>
		        <td valign="top">' . $addflags . '</td>
		      </tr>
		    </table>';
    echo '<br /><textarea id="message" name="message" rows="30" cols="" style="width: 100%;">' . getinput($ds['about']) . '</textarea>
  <br /><br /><input type="hidden" name="captcha_hash" value="' . $hash . '" /><input type="submit" name="submit" value="' . $_language->module['update'] . '" />
  </form>';
}
Пример #30
0
     if (!stristr($ds['url'], 'http://')) {
         $ds['url'] = "http://" . $ds['url'];
     }
     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") . "\";");