function generate_overview($filecats = '', $offset = '', $subcatID = 0)
{
    global $_language;
    $rubrics = safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $subcatID . "' ORDER BY name");
    $i = 1;
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    while ($ds = mysql_fetch_array($rubrics)) {
        if ($i % 2) {
            $td = 'td1';
        } else {
            $td = 'td2';
        }
        $filecats .= '<tr>
        <td class="' . $td . '">' . $offset . getinput($ds['name']) . '</td>
        <td class="' . $td . '" align="center"><input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=filecategorys&amp;action=edit&amp;filecatID=' . $ds['filecatID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
        <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'admincenter.php?site=filecategorys&amp;delete=true&amp;filecatID=' . $ds['filecatID'] . '&amp;captcha_hash=' . $hash . '\')" value="' . $_language->module['delete'] . '" /></td>
    	</tr>';
        $i++;
        if (mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '" . $ds['filecatID'] . "'"))) {
            $filecats .= generate_overview("", $offset . getinput($ds['name']) . " &raquo; ", $ds['filecatID']);
        }
    }
    return $filecats;
}
Exemple #2
0
    $CAPCLASS = new Captcha();
    if ($CAPCLASS->check_captcha(0, $_POST['captcha_hash'])) {
        if (mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "about"))) {
            safe_query("UPDATE " . PREFIX . "about SET about='" . $about . "'");
        } else {
            safe_query("INSERT INTO " . PREFIX . "about (about) values( '" . $about . "') ");
        }
        redirect("admincenter.php?site=about", "", 0);
    } else {
        echo $_language->module['transaction_invalid'];
    }
} 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") . "\";");