Exemplo n.º 1
0
            // Display a message informing users that they will have
            // to verify their e-mail address if they attempt to change it
            ?>
        <tr>
           <td align='left' class='header'></td>
           <td align='left' class='lista' colspan='2'><?php 
            echo REVERIFY_MSG;
            ?>
</td>
        </tr>
    <?php 
        }
        // <--- Reverify Mail Hack by Petr1fied - End
        ?>
    <?php 
        $lres = Cached::language_list();
        print "<tr>\n\t<td align='left' class='header'>" . USER_LANGUE . ":</td>";
        print "\n\t<td align='left' class='lista' colspan='2'><select name='language'>";
        foreach ($lres as $langue) {
            $option = "\n<option ";
            if ($langue["id"] == user::$current["language"]) {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . (int) $langue["id"] . "'>" . security::html_safe(unesc($langue["language"])) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
        $sres = Cached::style_list();
        print "<tr>\n\t<td align='left' class='header'>" . USER_STYLE . ":</td>";
        print "\n\t<td align='left' class='lista' colspan='2'><select name='style'>";
        foreach ($sres as $style) {
Exemplo n.º 2
0
         $update[] = "view_forum='" . $_POST["vforum"] . "'";
         $update[] = "edit_forum='" . $_POST["eforum"] . "'";
         $update[] = "delete_forum='" . $_POST["dforum"] . "'";
         $update[] = "can_upload='" . $_POST["upload"] . "'";
         $update[] = "can_download='" . $_POST["down"] . "'";
         $update[] = "admin_access='" . $_POST["admincp"] . "'";
         $update[] = "WT='" . $_POST["waiting"] . "'";
         $update[] = "prefixcolor=" . sqlesc($_POST["pcolor"]);
         $update[] = "suffixcolor=" . sqlesc($_POST["scolor"]);
         $strupdate = implode(",", $update);
         $id = intval($_GET["id"]);
         $db->query("UPDATE users_level SET " . $strupdate . " WHERE id = " . $id);
     }
     redirect("admincp.php?user="******"uid"] . "&code=" . user::$current["random"] . "&do=level&action=read");
 } elseif ($do == "language" && $action == "read") {
     $cat = Cached::language_list();
     block_begin(LANGUAGE_SETTINGS);
     print "<br /><br />\n<table class='lista' width='100%' align='center'>\n";
     print "<tr>\n";
     print "<td class='header' align='center'>" . USER_LANGUE . "</td>\n";
     print "<td class='header' align='center'>" . URL . "</td>\n";
     print "<td class='header' align='center'>" . MEMBERS . "</td>\n";
     print "</tr>\n";
     foreach ($cat as $category) {
         $res = $db->query("SELECT * FROM users WHERE language = " . (int) $category["id"]);
         $total_users = intval(0 + @$res->num_rows);
         print "<tr>\n";
         print "<td class='lista' align='center'>" . security::html_safe(unesc($category["language"])) . "</td>\n";
         print "<td class='lista' align='center'>" . $category["language_url"] . "</td>\n";
         print "<td class='lista' align='center'>" . $total_users . "</td>\n";
         print "</tr>\n";
Exemplo n.º 3
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
global $db, $user;
if (!user::$current || user::$current["id"] == 1) {
    #Do nothing
} else {
    block_begin(BLOCK_USER);
    // user information
    $style = Cached::style_list();
    $langue = Cached::language_list();
    print "\n<tr><td align='center' class='blocklist'>" . USER_NAME . ": " . unesc(user::$current["username"]) . "</td></tr>\n";
    print "<tr><td align='center' class='blocklist'>" . USER_LEVEL . ": " . security::html_safe(user::$current["level"]) . "</td></tr>\n";
    $resmail = $db->query("SELECT COUNT(*) FROM messages WHERE readed = 'no' AND receiver = " . user::$current['uid']);
    if ($resmail && $resmail->num_rows > 0) {
        $mail = $resmail->fetch_row();
        if ($mail[0] > 0) {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a> (<font color='#FF0000'><b>" . (int) $mail[0] . "</b></font>)</td>\n";
        } else {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a></td>\n";
        }
    } else {
        print "<tr><td align='center'>" . NO_MAIL . "</td></tr>";
    }
    print "<tr><td align='center' class='blocklist'>";
    include INCL_PATH . 'offset.php';
Exemplo n.º 4
0
function tabella($action, $dati = array())
{
    global $idflag, $link, $idlangue, $idstyle, $db, $USE_IMAGECODE;
    ?>
    <center>
    <p>
	
    <form name="utente" method="post" OnSubmit="return FormControl('<?php 
    echo $action;
    ?>
')" action="<?php 
    echo security::esc_url($_SERVER['PHP_SELF']) . "?act=" . $action . "&returnto=" . urlencode($link);
    ?>
">
    <input type="hidden" name="act" value="<?php 
    echo $action;
    ?>
" />
    <input type="hidden" name="uid" value="<?php 
    echo (int) $dati["id"];
    ?>
" />
    <input type="hidden" name="returnto" value="<?php 
    echo urlencode($link);
    ?>
 "/>
    <input type="hidden" name="language" value="<?php 
    echo $idlangue;
    ?>
 "/>
    <input type="hidden" name="style" value="<?php 
    echo $idstyle;
    ?>
 "/>
    <input type="hidden" name="flag" value="<?php 
    echo $idflag;
    ?>
 "/>
    <input type="hidden" name="username" value="<?php 
    echo security::html_safe($dati["username"]);
    ?>
"/>
    <table width="60%" border="0" class="lista">
    <tr>
    <td align="left" class="header"><?php 
    echo USER_NAME;
    ?>
: </td>
    <td align="left" class="lista">
    <?php 
    if ($action == "mod" || $action == "del") {
        print "\n<input type='text' size='40' name='user' value='" . security::html_safe(unesc($dati['username'])) . "' " . ($action == "mod" ? "" : "readonly") . " />";
    } else {
        print "\n<input type='text' size='40' name='user' />";
    }
    ?>
    </td>
    </tr>
    <?php 
    if (user::$current["uid"] == $dati["id"] && $action == "mod" || $action == "signup" || user::$current["edit_users"] == "yes" && $action == "mod") {
        ?>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_PWD;
        ?>
:</td>
    <td align="left" class="lista"><input type="password" size="40" name="pwd" /></td>
    </tr>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_PWD_AGAIN;
        ?>
:</td>
    <td align="left" class="lista"><input type="password" size="40" name="pwd1" /></td>
    </tr>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_EMAIL;
        ?>
:</td>
    <td align="left" class="lista"><input type="text" size="30" name="email" value="<?php 
        if ($action == "mod") {
            echo security::html_safe($dati['email']);
        }
        ?>
"/></td>
    </tr>
    <?php 
        $lres = Cached::language_list();
        print "<tr>\n\t<td align='left' class='header'>" . USER_LANGUE . ":</td>";
        print "\n\t<td align='left' class='lista'><select name='language'>";
        foreach ($lres as $langue) {
            $option = "\n<option ";
            if ($langue["id"] == $dati["language"]) {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . (int) $langue["id"] . "'>" . security::html_safe($langue["language"]) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
        $sres = Cached::style_list();
        print "<tr>\n\t<td align='left' class='header'>" . USER_STYLE . ":</td>";
        print "\n\t<td align='left' class='lista'><select name='style'>";
        foreach ($sres as $style) {
            $option = "\n<option ";
            if ($style["id"] == $dati["style"]) {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . (int) $style["id"] . "'>" . security::html_safe($style["style"]) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
        $fres = Cached::flag_list();
        print "<tr>\n\t<td align='left' class='header'>" . PEER_COUNTRY . ":</td>";
        print "\n\t<td align='left' class='lista'><select name='flag'>\n<option value='0'>---</option>";
        $thisip = vars::$realip;
        $remotedns = gethostbyaddr($thisip);
        if ($remotedns != $thisip) {
            $remotedns = utf8::strtoupper($remotedns);
            preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
            if (isset($tldm[2])) {
                $remotedns = $db->real_escape_string($tldm[2]);
            }
        }
        foreach ($fres as $flag) {
            $option = "\n<option ";
            if ($flag["id"] == $dati["flag"] || $flag["domain"] == $remotedns && $action == "signup") {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . (int) $flag["id"] . "'>" . security::html_safe($flag["name"]) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
        $zone = date('Z', vars::$timestamp);
        $daylight = date('I', vars::$timestamp) * 3600;
        $os = $zone - $daylight;
        if ($os != 0) {
            $timeoff = $os / 3600;
        } else {
            $timeoff = 0;
        }
        if (!user::$current || user::$current["uid"] == 1) {
            $dati["time_offset"] = $timeoff;
        }
        $tres = Cached::timezone_list();
        print "<tr>\n\t<td align='left' class='header'>" . TIMEZONE . ":</td>";
        print "\n\t<td align='left' class='lista' colspan='2'>\n<select name='timezone'>";
        foreach ($tres as $timezone) {
            $option = "\n<option ";
            if ($timezone["difference"] == $dati["time_offset"]) {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . $timezone["difference"] . "'>" . security::html_safe(unesc($timezone["timezone"])) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
        // -----------------------------
        // Captcha hack
        // -----------------------------
        // if set to use secure code: try to display imagecode
        if (user::$current['edit_users'] == 'yes' && $action == "mod" && user::$current["uid"] != $dati["id"]) {
            print "<tr>\n\t<td align='left' class='header'>" . USER_LEVEL . ":</td><td align='left' class='lista'>";
            print "<select name='level'>";
            $res = $db->query("SELECT level FROM users_level WHERE id_level <= " . user::$current["id_level"] . " ORDER BY id_level");
            while ($row = $res->fetch_array(MYSQLI_BOTH)) {
                $select = "<option value='" . unesc($row["level"]) . "'";
                if (unesc($dati["level"]) == unesc($row["level"])) {
                    $select .= "selected='selected'";
                }
                $select .= ">" . security::html_safe(unesc($row["level"])) . "</option>\n";
                print $select;
            }
            print "</select></td></tr>";
        } elseif ($USE_IMAGECODE && $action != "mod") {
            if (extension_loaded('gd')) {
                $arr = gd_info();
                if ($arr['FreeType Support'] == 1) {
                    $p = new ocr_captcha();
                    print "<tr>\n\t<td align='left' class='header'>" . IMAGE_CODE . ":</td>";
                    print "\n\t<td align='left' class='lista'><input type='text' name='private_key' value='' maxlength='6' size='6'>\n";
                    print $p->display_captcha(true);
                    $private = $p->generate_private();
                    print "</td>\n</tr>";
                }
            }
        }
        // -----------------------------
        // Captcha hack
        // -----------------------------
    }
    ?>
    <tr>
    <td align="center" class="header"></td>
    <?php 
    if ($action == "del") {
        print "\n<td align='left' class='lista'><input type='submit' name='elimina' value='" . FRM_DELETE . "' />&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' name='elimina' value='" . FRM_CANCEL . "' /></td>";
    } else {
        print "\n<td align='left' class='lista'><input type='submit' name='conferma' value='" . FRM_CONFIRM . "' />&nbsp;&nbsp;&nbsp;&nbsp;<input type='reset' name='annulla' value='" . FRM_CANCEL . "' /></td>";
    }
    ?>
    </tr>
    </table>
    </form>
    </center>
    </p>
    <?php 
}