Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixing the horribly fucked up blue thrust scripts
#9
new addmember.php

PHP Code:
<?php


if(checkLogin(MEMBER_NAMEMEMBER_PASS) AND checkRank(MEMBER_RANK$pid)) {

    
$recruitingstatus getWSInfo("recruiting");
    if(
$recruitingstatus == 0) {
        if(
$_POST['submit']) {

            
$username1 $_POST['username1'];
            
$password1 $_POST['password1'];
            
$memid $_POST['memid'];
            
$startingrank $_POST['startingrank'];
            
            
$time time();
            
$startingrank getStartingRank();

            
$query "INSERT INTO {$dbprefix}members (username, password, recruitedby, rank, lastlogin, datejoined) VALUES ('$username1', '$password1', '$memid', '$startingrank', '$time', '$time')";
            
$result mysql_query($query)
                or die(
mysql_error());

            
$adderRank getRankInfo("name"getMemberInfoByID("rank"$memid));
            
$adderName getMemberInfoByID("username"$memid);

            
$addedUser textFilter($username1);
            
LogAction("$adderRank $adderName recruited $addedUser"$time);

            
?>
            <script language="JavaScript" type="text/javascript">
                alert("Success!");
                window.location.href = 'console.php';
            </script>
            <?PHP

        
}
        else {
            
$dispconsolename getConsoleInfoByID("displayname"$pid);
            
?>
            <form action='console.php?pid=<?PHP echo($pid);?>' method='post'>
                <table align='center' border='1' cellspacing='0' cellpadding='3' width='500' bordercolor='<?PHP echo($bgcolor);?>'>
                    <tr>
                        <td bordercolor='<?PHP echo($bordercolor);?>' background='themes/<?PHP echo($theme);?>/<?PHP echo($bgimage);?>' class='titles' align='center'>
                            <span style="font-weight: bold;"><?PHP echo($dispconsolename);?></span>
                        </td>
                    </tr>
                    <tr>
                        <td bordercolor='<?PHP echo($bordercolor);?>' style='border-top-width: 0px' align='center' class='main'>
                        <br />
                        <blockquote>
                            <table align='center' border='0' cellspacing='0' cellpadding='0' width='450'>
                                <tr>
                                    <td class='main' width='150'>
                                        <span style="font-weight: bold;">Member Name:</span>
                                    </td>
                                    <td class='main' width='300'>
                                        <input type='text' name='username1' value="<?PHP echo($clantag);?>" class='form'></td>
                                </tr>
                                <tr>
                                    <td class='main' width='150' valign='top'><b>Password:</b></td>
                                    <td class='main' width='300'><input type='text' name='password1' class='form'></td>
                                </tr>
                                <tr>
                                    <td colspan='2' class='main' align='center'><br><input type='submit' name='submit' value='Add Member'></td>
                                </tr>
                            </table>
                    </blockquote>
                    </td>
                    </tr>
                </table>
            </form>
            <?PHP
        
}
    }
    else {
        
?>
        <table align='center' border='0' cellspacing='0' cellpadding='0' width='400'>
            <tr>
                <td class='main' align='center'>
                    Recruiting is currently closed.
                </td>
            </tr>
        </table>
        <?PHP
    
}
}
else {
    
?>
    <table align='center' border='0' cellspacing='0' cellpadding='0' width='400'>
        <tr>
            <td class='main' align='center'>
                Your rank is not high enough to view this page
            </td>
        </tr>
    </table>
    <?PHP
}


?>

Messages In This Thread
RE: Fixing the horribly fucked up blue thrust scripts - by Leaky - Aug 31 2010, 03:16 AM

Users browsing this thread: 2 Guest(s)