Revision: 30802
Updated Code
at October 20, 2010 22:40 by philkav
Updated Code
<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"; $fileHandler = fopen($myFile,'a') or die("can't open file..."); $allData = ".author[href$=\"/".$username."\"]:after { content: \"(".$gamertag.")[".$system."]\"; } .author[href$=\"/".$username."\"]:before { color: #FF0000; content: \"[r/A*]\"; } "; fwrite($fileHandler, $allData); fclose($fileHandler); } else { $myFile = "names.txt"; $fileHandler = fopen($myFile,'a') or die("can't open file..."); $allData = ".author[href$=\"/".$username."\"]:after{ content: \"(".$gamertag.")[".$system."]\" !important; } "; fwrite($fileHandler, $allData); fclose($fileHandler); } ?> </body> </html>
Revision: 30801
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 22, 2010 23:27 by philkav
Initial Code
<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"; $fileHandler = fopen($myFile,'a') or die("can't open file..."); $allData = ".author[href$=\"/".$username."\"]:after { padding-left: 3px; /* color: #000000;*/ font-size: x-small; font-weight: normal; font-style: inherit; content: \"(".$gamertag.")[".$system."]\"; background-color: transparent } .author[href$=\"/".$username."\"]:before { padding-left: 3px; color: #FF0000; font-size: x-small; font-weight: normal; font-style: inherit; content: \"[r/A*]\"; background-color: transparent } "; fwrite($fileHandler, $allData); fclose($fileHandler); } else { $myFile = "names.txt"; $fileHandler = fopen($myFile,'a') or die("can't open file..."); $allData = ".author[href$=\"/".$username."\"]:after{ padding-left: 3px; /*color: #000000;*/ font-size: xx-small; font-weight: normal; content: \"(".$gamertag.")[".$system."]\" !important; background-color: transparent } "; fwrite($fileHandler, $allData); fclose($fileHandler); } ?> </body> </html>
Initial URL
Initial Description
By Philkav for reddit [r/mw2]
Initial Title
Reddit Username Tagger [add.php]
Initial Tags
php, script
Initial Language
PHP