示例#1
0
文件: invite.php 项目: chenrizhi/mtpt
<?php

require "include/bittorrent.php";
dbconn();
require_once get_langfile_path();
loggedinorreturn();
parked();
$id = 0 + $_GET["id"];
$type = unesc($_GET["type"]);
$_SESSION['inviterand'] = mt_rand(100000, 999999);
registration_check('invitesystem', true, false);
if ($CURUSER[id] != $id && get_user_class() < $viewinvite_class || !is_valid_id($id)) {
    stderr($lang_invite['std_sorry'], $lang_invite['std_permission_denied']);
}
if (get_user_class() < $sendinvite_class) {
    stderr($lang_invite['std_sorry'], $lang_invite['std_only'] . get_user_class_name($sendinvite_class, false, true, true) . $lang_invite['std_or_above_can_invite'], false);
}
$res = sql_query("SELECT username FROM users WHERE id = " . mysql_real_escape_string($id)) or sqlerr();
$user = mysql_fetch_assoc($res);
stdhead($lang_invite['head_invites']);
print "<table width=700 class=main border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>";
print "<h1 align=center><a href=\"invite.php?id=" . $id . "\">" . $user['username'] . $lang_invite['text_invite_system'] . "</a></h1>";
print "<h2 align=center><form method=post action=invite.php?id=" . htmlspecialchars($id) . "&type=new><input type=submit " . ($CURUSER[invites] <= 0 ? "disabled " : "") . " value='" . $lang_invite['sumbit_invite_someone'] . "'></form>" . "</h2>";
$sent = htmlspecialchars($_GET['sent']);
if ($sent == 1) {
    $msg = $lang_invite['text_invite_code_sent'];
    print "<p align=center><font color=red>" . $msg . "</font></p>";
}
$res = sql_query("SELECT invites FROM users WHERE id = " . mysql_real_escape_string($id)) or sqlerr();
$inv = mysql_fetch_assoc($res);
//for one or more. "invite"/"invites"
示例#2
0
<?php

require_once "include/bittorrent.php";
dbconn();
require_once get_langfile_path("", false, $CURLANGDIR);
cur_user_check();
registration_check("cardreg");
failedloginscheck("Signup");
$emailnotice = $restrictemaildomain == 'yes' ? $lang_signup['text_email_note'] . allowedemails() : "";
$smarty->assign("{$emailnotice}", ${$emailnotice});
$select = 'signupcard';
$smarty->assign("select", $select);
$smarty->assign("show", 'yes');
$signuplist = $smarty->fetch(MTPTTEMPLATES . '/signuplist.html');
$smarty->assign("signuplist", $signuplist);
$smarty->display(MTPTTEMPLATES . '/signupcard.html');
stdfoot();
示例#3
0
{
    global $lang_takesignup;
    stdhead();
    stdmsg($lang_takesignup['std_signup_failed'], $msg);
    stdfoot();
    exit;
}
$type = $_POST['type'];
if ($type == 'invite') {
    registration_check();
    failedloginscheck("Invite Signup");
    if ($iv == "yes") {
        check_code($_POST['imagehash'], $_POST['imagestring'], 'signup.php?type=invite&invitenumber=' . htmlspecialchars($_POST['hash']));
    }
} else {
    registration_check("normal");
    failedloginscheck("Signup");
    //if ($iv == "yes")
    //check_code ($_POST['imagehash'], $_POST['imagestring']);
}
function isportopen($port)
{
    $sd = @fsockopen($_SERVER["REMOTE_ADDR"], $port, $errno, $errstr, 1);
    if ($sd) {
        fclose($sd);
        return true;
    } else {
        return false;
    }
}
function isproxy()