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

PHP Code:
<?php


if(checkLogin(MEMBER_NAMEMEMBER_PASS) AND checkRank(MEMBER_RANK$pid)) {
    if(
$_POST["submit"]) {
        
        
$subject1 textFilter($_POST["subject1"]);
        
$message1 textFilter($_POST["message1"]);
        
$month1 textFilter($_POST["month1"]);
        
$day1 textFilter($_POST["day1"]);
        
$year1 textFilter($_POST["year1"]);
        
        
$time date("n/j/y");
        
$query 
            
"INSERT INTO {$dbprefix}news (dateposted, subject, poster, content, type, month, day, year) " .
            
"VALUES ('$time', '$subject1', '$memid', '$message1', 'calendar', '$month1', '$day1', '$year1')";
        
$result mysql_query($query)
                    or die(
mysql_error());
        
?>
        <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;">Date:</span>
                                    </td>
                                    <td class='main' width='300'>
                                        <select name='month1' class='form'>
                                            <?PHP
                                                
for($i 1$i <= 12$i++) {
                                                    
?>
                                                    <option value="<?PHP echo($i); ?>"><?PHP echo(date("F"mktime(0,0,0,$i,1,2007))); ?></option><?PHP
                                                
}
                                            
?>
                                        </select> 
                                        <select name='day1' class='form'>
                                            <?PHP
                                                
for($i 1$i <= 31$i++) {
                                                    
?>
                                                <option value="<?PHP echo($i); ?>"><?PHP echo($i); ?></option><?PHP
                                                
}
                                            
?>
                                        </select> 
                                        <select name='year1' class='form'>
                                            <?PHP
                                                
for($i=0$i<=4$i++) {
                                                    
$year = (date("Y")+$i);
                                                    
?>
                                            <option value="<?PHP echo($year); ?>"><?PHP echo($year); ?></option><?PHP
                                                
}
                                            
?>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='main' width='150'>
                                        <span style="font-weight: bold;">Subject:</span>
                                    </td>
                                    <td class='main' width='300'>
                                        <input type='text' name='subject1' class='form' />
                                    </td>
                                </tr>
                                <tr>
                                    <td class='main' width='150' valign='top'>
                                        <span style="font-weight: bold;">Message:</span>
                                    </td>
                                    <td class='main' width='300'>
                                        <textarea rows='4' cols='40' name='message1' class='form'>
                                        </textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan='2' class='main' align='center'>
                                        <br/>
                                        <input type='submit' name='submit' value='Post' />
                                    </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'>
                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 - Oct 27 2010, 04:28 AM

Users browsing this thread: 8 Guest(s)