hi,
try this
it is a quick fix and i will update the file later on
open the function.php file , search for the following text
Code:
$valid=2;
remove that line
open config.php ( same folder )
below you see
Code:
$install=1;
add following line
Code:
$valid=2;
please note , if you update the config file from the script you need to re add that line , as it will write the config file again from scratch ( so all edits not done by the site will be lost )
hi,
can you show me a screenshot of what you mean ??
you try to add new gold ? what you mean with new gold ?
if you want to add a new page you need to do it this way
go to /pages
put there a new file ( the name you like to use )
in that file , put your code or use the code from my other files ( depending what you like to add )
see if it is pointed to the right database and tables , so the script can work
call the page with /index.php?page=yourpage
if it works , then edit the files in the template folder
and add your new link to it
if you put the page in the /admin or /staff then only those ranks can acces it ( /index.php?admin=yourpage or /index.php?staff=yourpage )
if you like , show me a screenshot or a explanation what you exactly want
then i can provide you a file with that function in it
hi,
here is a example
you need to edit differend things if you want to add a new donation option
so i wrote a script ( taken from example pages ) that explains everything you need to know to add a new donation option
please note , the script is a example and will NOT work if you try to execute it or just blind copy it
<?php
/////////////////////////////////////////////////////////////////////////////
//This is a EXAMPLE PAGE to show you how to create your own
//it is taken from a working script and edited to provide a example
//if you do not edit this file to your needs then it will NOT work
//This text is in Demo.php in the /pages folder so it is /pages/demo.php
//this page get called as /index.php?page=demo
/////////////////////////////////////////////////////////////////////////////
// check session and check if there is no form submitted before continue ( post demo )
if ($_SESSION['id'] != "" && $_POST['demo'] =="")
{
//show below output if above is correct
?>
<table border='1'>
<tr>
<th>Character</th>
<th>EP</th>
</tr>
<?php
//connect to db with a querry ( function )
$gamedata = db_query("SELECT * FROM cq_user WHERE (`account_id` LIKE '".$_SESSION['id']."')");
//grab data from database and repeat until it does not have any more rows
while ($gameinfo = mysql_fetch_assoc($gamedata))
{
echo ("<tr>");
echo ("<td><font color='red'>".$gameinfo[name]."</font></td>");
echo ("<td>".$gameinfo[emoney]."</td>");
echo "</tr>";
}
//close our table as we got a nice table now
?>
</table>
<table align="center">
<form method="post" action="./?page=buyep">
<tr><td align="center">EP:</tr></td>
<tr><td align="center"><select name="ep">
<?php
//connect to our donation database and grab information from our donation database
$getepvalue = db_query("SELECT * FROM power_donate WHERE (`payment` LIKE 'ep' ) ORDER BY credits DESC");
//print out all rows that are present in the database , added by the settings page in /pages/admin/rewards.php
while ($epvalue = mysql_fetch_assoc($getepvalue))
{
echo "<option value ='".$epvalue[credits]."@".$epvalue[price]."'>".$epvalue[credits]." ep for ".$epvalue[price]." credits</option>";
}
//close our select as we got all avaible value's in a nice select box
?>
</select>
</tr></td>
<tr><td align="center">
<tr><td align="center">Character:</tr></td>
<tr><td align="center"><select name="character">
<?php
//Connect to database and grab needed information
$chars = db_query("SELECT * FROM cq_user WHERE (`account_id` LIKE '".$_SESSION['id']."' )");
//grab all characters from this user based on session id
while ($character = mysql_fetch_assoc($chars))
{
echo "<option value ='".$character[name]."'>".$character[name]."</option>";
}
//close our select again and close the form so it submits with the name "demo"
?>
</select>
</tr></td>
<tr><td align="center">
<input class="Butt" type="submit" value="Charge your account" name="demo">
</td></tr>
</form>
</table>
<?php
//close our php
}
//if the form is submitted then continue with the real settings
if ($_POST['demo'] && $_SESSION['id'] != "")
{
$user = $_POST['character'];
$ep = $_POST['ep'];
$account = $_SESSION['id'];
//below extraction are to get the right value so it splits up xx @ xx ( where after @ is what we need )
$extract = explode("@",$ep);
$reward = $extract[0];
$price = $extract[1];
//check database info as all users exist in our database after first login ,is a custom datbase to add credits
$check = db_array("SELECT * FROM power_user WHERE (`account_id` LIKE '".$account."' )");
$check2 = db_array("SELECT * FROM cq_user WHERE (`name` LIKE '".$user."' )");
//check if the user got enouf emoney or to mutch ( ep )
if ($check['money'] >= ($price ) ){
if (($check2['emoney'] >= "1500000000") || (($check2['emoney'] + $reward) >= "1500000000"))
{
//if above check fails , user got to mutch emoney
echo "Sorry, You just got to mutch ep , please spend some ep before you can donate for more ep";
}
else
{
//start the real db stuff below , reward the user and extact the price taken from database
db_query("UPDATE `cq_user` SET `emoney` = `emoney` +'".$reward."' WHERE `name` = '".$user."'") ;
//here we update our custom table to extact the credits
db_query("UPDATE `power_user` SET `money` = `money` -'".$price."' WHERE `account_id` = '".$account."'") ;
//ofcourse here are the logs
db_query("insert into power_donatelogs (account_id,credits,transid,date,response,debug,payment) values ('".$user."','".$reward."','EP Added','".date("y-m-d H:i:s", time())."','Succesfull','$reward ep added for $price credits','ep')");
//simple output to show that he got his reward
echo "$reward ep has beein added to account $user";
}
}
else
{
//failt message , not enouf credits :D
echo "Sorry you do not have enouf credits , please buy more credits before you can donate for ep";
}
}
//ofcourse if a user is not logged in we do not want them to donate to break the system
else if ($_SESSION['id'] == "")
{
echo "please login before using this function";
}
//end of Demo.php in /pages/demo.php
?>
<?php
//////////////////////////////////////////////////////////////////////////////////////////////
//lets start with the settings page
//below you need to add to the admin page in /pages/admin/reward.php to be able to work
//do not forget to edit to your needs as this is only a example
//The codes are taken from other pages to provide a full example
//the below example need to be placed in the reward.php to be able to work (after edited )
///////////////////////////////////////////////////////////////////////////////////////////////
executerewards(); //our function ofcourse , extra edits are needed there but see below for more info
//here you see our query to show the settings based on payment type
$data = db_query("SELECT * FROM power_donate WHERE (`payment` LIKE 'demo' )");
?>
<center>
<p>Current demo List</p>
<table border='1'>
<tr>
<th>id</th>
<th>Reward</th>
<th>Cost</th>
</tr>
<?php
//grab data from database and repeat until it does not have any more rows
while ($info = mysql_fetch_array($data))
{
echo ("<tr>");
echo ("<td><font color='red'>".$info[id]."</font></td>");
echo ("<td>".$info[credits]."</td>");
echo ("<td>".$info[price]."</td>");
echo "</tr>";
}
?>
</table>
<form method="post" action="./?admin=rewards">
<TABLE align="center">
<tr><td align="center">Add demo Rewards</tr></td>
<tr><td align="center">Reward <input type="text" name="eprewarddemo" id="eprewarddemo" value=""> ep for <input type="text" name="eppricedemo" id="eppricedemo" value=""> Credits</tr></td>
<tr><td align="center">
<input class="Butt" type="submit" value="Add Ep Reward" name="demo">
</td></tr>
</TABLE>
</form>
</center>
<?php
//////////////////////////////////////////////////////
//our reward page is done
// lets edit our function page to get this working
//open the functions.php in /settings
//////////////////////////////////////////////////////
//check if form is submitted or edited
if(isset($_POST['demo']))
{
//execute our SQL script to do the DB work
include ('./settings/sqlcreate.php');
//after executing our SQL commands to update the db do you get a message
echo "<center>Ep Rewards updated<br><br></center>";
}
//end of functions.php edits
////////////////////////////////////////////////////////////
//Now open the sqlcreate.php and apply following settings
///////////////////////////////////////////////////////////
if(isset($_POST['demo']))
{
//this is our reward (see above form for info )
$epreward = $_POST['eprewarddemo'];
//this is the price (see above form for info )
$epprice = $_POST['eppricedemo'];
//and here is our query to show in the above form :D
db_query("insert into power_donate (price,credits,payment) values ('".$epprice."','".$epreward."','demo')");
}
////////////////////////////////////////////////////////////////////////////
// if all this is done , then you got yourself a new option added
//do not forget to edit the template folder /pages/template/sidebar.php
//and add below code
///////////////////////////////////////////////////////////////////////////
//for admins only ( page need to be in /pages/admin/ to work )
if ($_SESSION['admin'] == 1 ) // this is admin only , place everything you want admin only below
?>
<li><a href="./?admin=settings" <?php if($admin==='settings') echo "class=\"active\"";?>>General Settings</a></li>
<?php
//for admin and staff only ( page need to be in /pages/staff/ to work )
if ($_SESSION['admin'] == 1 || $_SESSION['staff'] == 1 ) // this is admin and staff only , place everything you want admin and staff only below
?>
<li><a href="./?staff=lastlogin" <?php if($staff==='lastlogin') echo "class=\"active\"";?>>Last Logins</a></li>
<?php
//and ofcourse for normal users
//place everything else for normal users after the } from the staff so the php is closed
//or just leave the donation related text above and place everything below it
?>
<li><a href="./?page=resetpk" <?php if($page==='resetpk') echo "class=\"active\"";?>>Reset pk Points</a></li>
<?php
// enjoy this tutorial , hopely it can help
//Greetings From PowerChaos
?>
or you can download it as atachment (rename to php to vieuw code/comments )
<?php
//grab data from database and repeat until it does not have any more rows
while ($info = mysql_fetch_array($data))
{
echo ("<tr>");
echo ("<td><font color='red'>".$info[id]."</font></td>");
echo ("<td>".$info[credits]."</td>");
echo ("<td>".$info[price]."</td>");
echo "</tr>";
}
?>
</t
info . i can seee got info - info5 . it ok if just put info or need create new one info6 ?
also be sure that data is the query it need to execute , else it will still not work
but the link i gave you should explain that part
eather way
it is better to use differend names to prevent wrong data
php seems to remind the assigned value after the while command so using the same name can erase the older data or provide errors
Advance Control Panel 07/23/2013 - EO PServer Guides & Releases - 4 Replies Dear users
here is my control panel release
in case you need support , please reffer to http://www.elitepvpers.com/forum/eo-pserver-hostin g/2713921-eo-advance-control-panel-release.html
its version 2.0 but because some problems with paypal is the serial system removed ( you can still see it in the source but i applied a work around in it )
here is a video of how the control panel works
you can also see a demo at demo.powerchaos.info (u/p = thunder/test )
[RELEASE] EO Control panel V2 09/08/2012 - EO PServer Hosting - 4 Replies Dear users
i ifnaly got my V2 ready of my control panel
This version is a complete rewrite of the V1 of my contol panel
it contians the main functions with some extra things
and best of all , no serial is needed anymore to use this version
This is what is changed
[Release] Eudemons control panel 01/26/2012 - EO PServer Guides & Releases - 10 Replies Dear users
i am glad to release a control panel for eudemons
The latest version can always be found at PowerChaos Scripts
the atachment is updated to but does not always contains latest updates
Here is a demo of the control panel
Eudemons control panel for private servers - YouTube
the following things can be done with the control panel
[Release] OsDs Control Panel 05/03/2011 - Dekaron Private Server - 179 Replies http://users.telenet.be/osds/osds_v2_b1_r151009.jp g
Release Date: 15/10/2009
Release Type: PHP Script
O.S: Any
Created By: Janvier123
Support: Janvier123
Thanks To: Zombe.
[RELEASE] Control Panel for TQ Binary 09/22/2009 - CO2 PServer Guides & Releases - 25 Replies Ok this wasnt made by me it was made by a friend, id like you guys to have it to, its a control panel which auto types in the commands you're client must be in full screen, If you have any problems let me know il guide you, Also if this isnt allowed mod please remove it, Thanks!