Simple regpage and cash shop - using eCoins!
Hello guys,
This is a edit of Chumpy's simple regpage and cash shop v1.5 beta, all i did was to change alz to ecoins.
To set this up u need to read in order readme.txt and readmeNEW.txt
Pls, dont post "u can do this more easy".. im not a coder. I post this for guys noobs like me.
To add ItemShop in game u have to modify or add next lines to LoginSvr_01.ini
[SITE_URL]
CASHWEB_URL=http://your shop/
GUILDWEB_URL=http://your web page or forum/
CASHWEB_URL_CHARGE=http://donation link for "refill ecoin" button/
************************
All credits go to Chumpy.
************************
EDIT:
http://devotioncabal.autoglobe.ro/download/login.jpg
http://devotioncabal.autoglobe.ro/download/items.jpg
http://devotioncabal.autoglobe.ro/download/account.jpg
Download
Re: Simple regpage and cash shop - using eCoins!
Re: Simple regpage and cash shop - using eCoins!
Re: Simple regpage and cash shop - using eCoins!
ah im unlucky :D wanted to use it for quick page for testing... but its using outdated mssql library :/ my whole webserver is set up for something newer.
Also there is a extra ' in config - under // Text to display for link - it breaks the script.
Re: Simple regpage and cash shop - using eCoins!
Quote:
Originally Posted by
lifestream
ah im unlucky :D wanted to use it for quick page for testing... but its using outdated mssql library :/ my whole webserver is set up for something newer.
Also there is a extra ' in config - under // Text to display for link - it breaks the script.
if you gonna use latest php you need to use pdo sqlsrv and sqlsrv also you need to recode this script.
Re: Simple regpage and cash shop - using eCoins!
yeah i know.. but recoding is hell... it needs to be completely rebuilt as there isnt matchign command for everything.
And thats not a priorty right now.
Re: Simple regpage and cash shop - using eCoins!
What in wrong? can some1 help
Error
Quote:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_ACC.dbo.cabal_auth_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 6
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 6
Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 7
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_ACC.dbo.cabal_auth_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 8
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 8
Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 9
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'DB_GAM.dbo.cabal_character_table'. (severity 16) in C:\xampp\htdocs\reg.php on line 10
Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\reg.php on line 10
Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\reg.php on line 11
Reg page
Quote:
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table');
$num_acc=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where Login=1');
$num_onl=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_GAM.'.dbo.cabal_character_table');
$num_cha=mssql_result($r,0,0);
Re: Simple regpage and cash shop - using eCoins!
did u restore the db-s to mysql?
Re: Simple regpage and cash shop - using eCoins!
Quote:
Originally Posted by
lifestream
did u restore the db-s to mysql?
i did both query on cashshop db.. i have to use those in another db?
Re: Simple regpage and cash shop - using eCoins!
Hi mate,
Dont know why u have troubles :s .. just read careful readme.txt and readmenew.txt ...
anyway i used register in other way ..
Download this , make on your web server a folder named register and put all files from this arhive in that folder. Just run http://yourserver/register
dont forgot to change authentification details in config.php
Quote:
Originally Posted by
Alterity
i did both query on cashshop db.. i have to use those in another db?
webshop is working? u have trouble only with register?
anyway .. is using accouts from game .. if u alrady have a register tool .. u dont have to use this one for register
PS: to make transfer eCoins from warehouse to bank and reverse, u need to add a "stored procedure" .. i write in "readmenew.txt" what u have to do
Good Luck!
Re: Simple regpage and cash shop - using eCoins!
Well the errors are clearly database related - it cant find them. Check the names of db-s in mysql.
Re: Simple regpage and cash shop - using eCoins!
In table dbo.CashAccount u need to add a new column "Reserved1 (bigint, null)"
how to do that? :|
http://i.epvpimg.com/43Kob.png
dunno can some1 explain?
Re: Simple regpage and cash shop - using eCoins!
u need to drop and recreate the table - it wil lwipe any datai n it tho.
Re: Simple regpage and cash shop - using eCoins!
Fix reg.php
Code:
<?php
include('config.php');
$num_acc=0;
$num_cha=0;
$num_onl=0;
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table');
$num_acc=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where Login=1');
$num_onl=mssql_result($r,0,0);
$r=mssql_query('select count (*) from '.DB_GAM.'.dbo.cabal_character_table');
$num_cha=mssql_result($r,0,0);
echo '<p>There are currently <span style="font-size:16px;font-weight:bold">'.$num_onl.'</span> people online right now.</p>';
echo '<p>Registered accounts: <span style="font-size:16px;font-weight:bold">'.$num_acc.'</span> | Characters created: <span style="font-size:16px;font-weight:bold">'.$num_cha.'</span></p>';
echo '<p style="font-size:24px;font-weight:bold">Account registration</p>';
echo '<p>Username and password must be minimum 6 chars, letters and numbers only.</p>';
echo '<form method="post" action="'.$_PHP['self'].'">';
echo '<table cellspacing="4" cellpadding="0" border="0">';
echo '<tr><td align="right">Login: </td><td><input type="text" name="uname" class="editbox"></td></tr>';
echo '<tr><td align="right">Pass: </td><td><input type="password" name="pass" class="editbox"></td></tr>';
echo '<tr><td align="right">Confirm pass: </td><td><input type="password" name="pass2" class="editbox"></td></tr>';
echo '<tr><td colspan="2" align="right"><input type="submit" value="Register account" class="button"></td></tr>';
echo '</table>';
echo '</form>';
echo '<br /><span style="font-weight:bold">Website:</span> <a href="'.LINK_WSITE.'">'.NAME_WSITE.'</a><br />';
echo '<span style="font-weight:bold">Forums:</span> <a href="'.LINK_FORUM.'">'.NAME_FORUM.'</a><br />';
$uid='';
$pass='';
$failed=false;
if (isset($_POST['uname'])) {
if (!ctype_alnum($_POST['uname']) || strlen($_POST['uname'])<6) {
$failed=true;
echo '<p class="errortext">Invalid username. Minimum 6 characters, letters and numbers only.</p> ';
} else {
$uid=$_POST['uname'];
}
}
if (isset($_POST['pass'])) {
if (!ctype_alnum($_POST['pass']) || strlen($_POST['pass'])<6) {
$failed=true;
echo '<p class="errortext">Invalid password. Minimum 6 characters, letters and numbers only.</p> ';
} else {
$pass=$_POST['pass'];
}
}
if (isset($_POST['pass2'])) {
if (!ctype_alnum($_POST['pass2'])) {
$failed=true;
} else {
if ($_POST['pass2']!=$_POST['pass']) {
$failed=true;
echo '<p class="errortext">The entered passwords do not match.</p> ';
}
}
}
if ($failed==true) {
echo '<p class="errortext">Failed.</p> ';
} else {
if ($uid!='' && $pass!='') {
$r=mssql_query('select count (*) from '.DB_ACC.'.dbo.cabal_auth_table where ID="'.$uid.'"');
if (mssql_result($r,0,0)==0) {
$r=mssql_query('exec '.DB_ACC.'.dbo.cabal_tool_registerAccount "'.$uid.'","'.$pass.'"');
if ($r==false) {
echo '<p class="errortext">Something went wrong :( </p>';
} else {
echo '<p class="goodtext">Account created successfully!</p>';
}
mssql_free_result($r);
mssql_close($link);
} else {
echo '<p class="errortext">Logon name already used.</p> ';
}
}
}
?>
Fix admin.php for add new item (line 135)
Code:
$r=mssql_query('insert into '.DB_CCA.'.dbo.ShopItems (Name,Description,ItemIdx,DurationIdx,ItemOpt,Image,Honour,Alz,Category,Available,Old_ItemIdx,Old_Name,ProdID,ITEMID) values ("'.$iname.'","'.$idesc.'","'.$iidx.'","'.$idur.'","'.$iopt.'","'.$iimage.'",0,"'.$ialz.'","'.$icat.'","'.$iavail.'",0,0,0,0)');
1 Attachment(s)
Re: Simple regpage and cash shop - using eCoins!
help me with this one please
i got this error if Withdraw
Attachment 139413