/ Published in: PHP
By Philkav for reddit [r/mw2]
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 [MW2] - Created by philkav for r/mw2. 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/redditAlien.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 == "*******") { 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/mw2">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 == "*******") { $myFile = "names.txt"; $allData = ".author[href$=\"/".$username."\"]:after { content: \"(".$gamertag.")[".$system."]\"; } .author[href$=\"/".$username."\"]:before { color: #FF0000; content: \"[r/A*]\"; } "; } else { $myFile = "names.txt"; $allData = ".author[href$=\"/".$username."\"]:after{ content: \"(".$gamertag.")[".$system."]\" !important; } "; } ?> </body> </html>