This is not made by me or mmotop.org team !!!
Credits: Jesper
RaxeZDev Vote System
Here comes a nice christmas gift from [Only registered and activated users can see links. ] (aka. me xD).
This is a vote system for Ascent based emulators. (Trinity/mangos lovers, **** off and get your own webdevs :3)
I've been developing it for a week or so, it contains around 800 lines of php and html/css.
It contains an admin panel, accessable by 'az' rank accounts (Only these ppl will see the "Admin Panel" link, and be able to access it), where you can manage rewards and topsites.
UPDATE!!! READ FFS :3
I forgot to mention, you need to add a new column in your accounts table called "votes" with type "int"
Navicat guide:
1. Open up your logon database
2. right click on "accounts" -> design table
3. press "add field"
4. name: votes
5. type: int
6. lenght: put like 10
7. decimals: 0
8. allow null: w/e
9. primary key: no (blank)
Screenshot:
As you see in the screenshot, the background is changable between 7 nice backgrounds
(readme.txt file in img -> backgrounds folder)
Bug fixes, read!
Some bugs has been found please update your files:
File: inc -> toolhandler.php:
Select character only shows one character [fix]Code:<div class="rdvs"> <form name="shop" action="inc/buy.php" method="post"> <fieldset> <legend><?php echo $rdvs_title; ?></legend> <table border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td style="font-size:12px;">Vote points: </td> <td style="font-size:12px;"><?php echo $rdvs_user_row['votes']; ?> <img src="img/coins.png" align="absbottom" /></td> </tr> <tr> <td style="font-size:12px;">Item cost:</td> <td style="font-size:12px;"><?php echo $rdvs_item_row['cost']; ?> <img src="img/coins.png" alt="" align="absbottom" /></td> </tr> <tr> <td style="font-size:12px;">Item name:</td> <td style="font-size:12px;color:<?php echo $rdvs_color[$rdvs_item_row['color']]; ?>;font-weight:bold;"><?php echo $rdvs_item_row['name']; ?></td> </tr> </table> <br /> <strong>Select character:</strong> <?php if(!isset($rdvs_char_row['guid'])) { echo '<span style="color:red;">You don\'t have any characters</span>'; } else { ?> <label> <select name="char" id="char" readonly="true"> <?php do { ?> <option value="<?php echo $rdvs_char_row['guid']; ?>"><?php echo $rdvs_char_row['name']; ?></option> <?php } while($rdvs_char_row = mysql_fetch_assoc($rdvs_query2)); ?> </select> </label> <br /> <input name="item" type="hidden" id="item" value="<?php echo $sec['item']; ?>" readonly="true"> <br /> <input name="submit" type="submit" id="submit" value="Buy item!" /><?php } ?> </fieldset> </form>
File: inc -> item.php:
ACP: old rewards and topsites go away when im adding new[fix]Code:<?php // basic mysql require("../rdvsconfig.php"); $rdvs_connection = mysql_pconnect($rdvs_mysql_host.':'.$rdvs_mysql_port, $rdvs_mysql_user, $rdvs_mysql_pass) or die(mysql_error()); // add topsite if(!empty($_POST['name'])) { mysql_select_db($rdvs_mysql_rdvs, $rdvs_connection) or die(mysql_error()); $rdvs_insert_query1 = sprintf("INSERT INTO topsites (name, url) VALUES('$_POST[name]', '$_POST[url]')"); mysql_query($rdvs_insert_query1, $rdvs_connection) or die(mysql_error()); header("Location: ../".$rdvs_file."?p=admin&tool=topsites"); } // delete topsite if(!empty($_POST['delete'])) { mysql_select_db($rdvs_mysql_rdvs, $rdvs_connection) or die(mysql_error()); $rdvs_insert_query2 = sprintf("DELETE FROM topsites WHERE id='$_POST[delete]'"); mysql_query($rdvs_insert_query2, $rdvs_connection) or die(mysql_error()); header("Location: ../".$rdvs_file."?p=admin&tool=topsites"); } // add reward if(!empty($_POST['item_name'])) { mysql_select_db($rdvs_mysql_rdvs, $rdvs_connection) or die(mysql_error()); $rdvs_insert_query3 = sprintf("INSERT INTO rewards (itemid, name, description, cost, color) VALUES('$_POST[item_id]', '$_POST[item_name]', '$_POST[item_desc]', '$_POST[item_cost]', '$_POST[item_color]')"); mysql_query($rdvs_insert_query3, $rdvs_connection) or die(mysql_error()); header("Location: ../".$rdvs_file."?p=admin&tool=rewards"); } // delete reward if(!empty($_POST['delete_reward'])) { mysql_select_db($rdvs_mysql_rdvs, $rdvs_connection) or die(mysql_error()); $rdvs_insert_query4 = sprintf("DELETE FROM rewards WHERE id='$_POST[delete_reward]'"); mysql_query($rdvs_insert_query4, $rdvs_connection) or die(mysql_error()); header("Location: ../".$rdvs_file."?p=admin&tool=rewards"); } ?>
Live demo: (user: admin, password: admin - You have admin rank, don't **** it up or I'll close the demo!)
[Only registered and activated users can see links. ]
Download
Full version (themed): [Only registered and activated users can see links. ]
Plain version (for intergration, read the readme file!): [Only registered and activated users can see links. ]
*edit* forgot the credits:
Merry christmas from RaxeZDev!Code:FamFamFam.com - icons
RaxeZDev site: [Only registered and activated users can see links. ]
RDVS site: [Only registered and activated users can see links. ]



LinkBack URL
About LinkBacks



)

Reply With Quote



Bookmarks