[release]Coint Shop PHP

11/02/2012 15:12 noenergy#1
Hay guys
Here is a coint shop with vote 4 silk for you homepage

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...] thx to Khaozh

Vote 4 Silk + Coints Shop
This vote 4 silks script give for every vote 5 silk and 5 coints
The coint shop is an shop where you can buy with this "Coints" items ...

[Only registered and activated users can see links. Click Here To Register...]

This script is not the best ^^ its written in 1h

But i hope thats you like it anyway


The coint shop script is made by me the vote 4 silk script is just eddid by me
Its made by [GM]NoEnergy from SilversRoaD
All is used by SilversRoaD



Quote:
How to:
First you will need an Login Panel who is using $userID = $_SESSION['name'];
Insert into the DB DB.txt
Change
$serverIp = "local";
$userName = "sa";
$password = "PW";
$dbName1 = "SRO_VT_ACCOUNT";
$dbName2 = "SHARD";
to your data


How to add items:
You will see in buy.php


echo 'Global 10x<br />'; //Item
echo '<img src="img/global.jpg" title="Global" /><br />'; //Image
echo 'Price: 10coints<br />'; //Cost
print " //Select char start
<b>Select Char</b>
<br />
<form name='form' method='post' action='?Item'>
<select name='CharName'>
<option value='$CharNAME'>$CharNAME</option>
<option value='$CharNAME1'>$CharNAME1</option>
<option value='$CharNAME2'>$CharNAME2</option>
</select>
<input type='submit' class='button' value='Buy' name='item1' /> //name='item1' is needed for item.php
</form>
"; //Select char end
echo ' <br />';



Just change all this things for a new item

Now item.php

if (isset($_POST['item1'])) { //item1 from the buy.php





if ($coint > 9) { //how much coints its cost -1


mssql_query("update Coints set coints = coints - 10 where loginid = '$userID'"); //Delete coints from DB how much its cost

mssql_select_db($dbName2, $dbConn) or die ("Couln't select database $dbName1");
mssql_query("exec _ADD_ITEM_EXTERN '$Char','ITEM_EVENT_RENT_GLOBAL_CHATTING',10,1"); //$Char,item,units,item option level


echo "Succesfull buyed item pls check your inventory for the item";


}else{
echo "You have not enugh coints";
}

}


If you want to add a new item you will need to change name='item1' and if (isset($_POST['item1'])) { lets we say you have added already 9 items then you will need for the next item name='item10' and if (isset($_POST['item10'])) {


Where i get the icons?
Go into your media then icons item etc.....
Like it if you like it ^^
11/03/2012 17:51 PortalDark#2
#approved
11/03/2012 22:42 thebook23#3
tell us how it work ?
11/03/2012 23:16 intercsaki#4
Coins* not "Coints".


Honestly, do these people speak english wrong deliberately? I'm starting to be convinced of it...
11/04/2012 03:30 polat33#5
Problem ?
i add all server informations (server name, name, pass, vs)

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\CoinShop\item.php:2) in C:\xampp\htdocs\CoinShop\item.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\CoinShop\item.php:2) in C:\xampp\htdocs\CoinShop\item.php on line 4
11/05/2012 16:16 SayedKate#6
WoW Very Special ! really thx