Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="";
- $user="";
- $password="";
- $database="characters"; //Your character database
- if(($_COOKIE['vote']) != '0') //Will add later - Knindza
- {
- if(!empty($_POST['name']))
- {
- mysql_connect($host,$user,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- $name = mysql_real_escape_string($_POST['name']);
- $query="SELECT * FROM characters WHERE name='$name' LIMIT 1";
- $result = mysql_query($query);
- if($row = mysql_fetch_array($result))
- {
- @@ $guid = $row['guid'];
- @@ $item = 20815;
- @@ mysql_query("INSERT INTO mail(sender, receiver, subject, body, stationary, money, item_id, item_stack) VALUES ($guid, $guid, 'Thankyou for voting!', 'Use this item to get vote rewards from the votereward vendors in the malls. Vote again in 12 hours', 0, 0, $item, 1");
- echo "Thank you for voting!";
- echo "<script language=javascript>setTimeout(\"location.href='" . "#" . "'\",3000);</script>";
- }
- else
- {
- echo "A char with that name was not found.";
- }
- mysql_close();
- }
- else
- {
- ?>
- Vote for Shadowburn and get rewards! <br />
- <form method='post' action='vote1.php'>
- Character Name:<input type='text' name='name' />
- <input type='submit' value='Vote!' />
- </form>
- <p>
- <?php
- }
- }
- else
- {
- echo "You already voted! You can vote once every 12 hours. Thank you :)";
- }
- ?>
- </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement