/ Published in: PHP
The only bit i changed was the if statement at the bottom...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<html> <head> <title> Reddit Tagger </title> </head> <body> <?php $username = $_POST["username"]; $system = $_POST["system"]; $gamertag = $_POST["gamertag"]; $allstar = $_POST["allstar"]; $allstarpassword = $_POST["allstarpassword"]; ?> <h6>REDDIT Tagger [r/MW2 & r/CODBO] - Created by philkav for r/mw2 & r/codbo. Feel free to use this on other subreddits (PM me for PHP code)</h6> <hr/> <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> <form action = "add.php" method = "post"> <div align = "center"> <table> <tr> <td> <img src = "img/alien2.png"> </td> <td> <table> <tr> <td>Reddit Name : </td> <td align = "left"><?php echo $username;?></td> </tr> <tr> <td>MW2 System : </td> <td align = "left"><?php echo $system;?></td> </tr> <tr> <td>GamerTag: </td> <td align = "left"><?php echo $gamertag;?></td> </tr> </table> </td> </tr> </table> <br/> <font color = "Blue"> Your tag : </font> <font color = "Red"> <?php if($allstar == true && $allstarpassword == "2a15349") { echo "[r/A*]".$username."(".$gamertag.")[".$system."]"; } else { echo $username."(".$gamertag.")[".$system."]"; } ?> </font> <font color = "Blue"> <br/>This will be appended to your name within the <u>next few hours.</u> <br/>Make sure your names are in the correct case and if you made a mistake, just go back and <a href = "index.php">resubmit</a>. </font> <br/><br/><font color = "Black"> Now take me <a href = "http://www.reddit.com/r/codbo">back to reddit!</a> </font> <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> </div> </form> <?php //adding logic goes here : if($allstar == true && $allstarpassword == "2a15349") { $myFile = "names.txt"; $allData = ".author[href$=\"/".$username."\"]:after { content: \"(".$gamertag.")[".$system."]\"; } .author[href$=\"/".$username."\"]:before { color: #FF0000; content: \"[r/A*]\"; } "; } else { $myFilePC = "namesPC.txt"; $myFilePS3 = "namesPS3.txt"; $myFile360 = "names360.txt"; if ($system == "PC") { $allData = ".author[href$=\"/".$username."\"]:after{ content: \"(".$gamertag.")[".$system."]\" !important; } "; } else if ($system == "PS3") { $allData = ".author[href$=\"/".$username."\"]:after{ content: \"(".$gamertag.")[".$system."]\" !important; } "; } else { $allData = ".author[href$=\"/".$username."\"]:after{ content: \"(".$gamertag.")[".$system."]\" !important; } "; } } ?> </body> </html>