paweleq2000
New Member
- Joined
- Feb 18, 2011
- Messages
- 161
- Reaction score
- 4
can someone convert the script from dotpay on homepay?
KONFIGURACJA.PHP
tak=yes
nie=no
SMS.PHP
KONFIGURACJA.PHP
Code:
<?php
$install = "yes"; //Zabronienie ponownej instalacji(no=niemozliwa)
function baza(){
mysql_connect("localhost", "root", "password");
mysql_select_db("baza") or die( "Nie można podłączyć się do bazy");
}
$nazwa = "Mój OTS"; //Name OTS
$punkty = "100"; //Number of points for sms
$id = "9999"; //ID DOTPAY
$usluga = "GBSA"; //Service name dotpay
$przelew = "tak"; //Is the transfer payment option has to be enabled
$sms = "tak"; //Is the SMS payment option has to be enabled
$admin="3609940"; //Your number on ots after logging that you want to have authority over the shop
$haslo="pawcio123"; //Password so that you will be able to change these settings from the admin panel
$pacc ="nie";//Can I shop pacc
$item ="tak";//Is it possible to buy items
$przekazywanie="tak"; //if you can transfer points
$premium['cena1'] = 10; //Price premium option 1
$premium['cena2'] = 15; //Price premium option 2
$premium['cena3'] = 22; //Price premium option 3
$premium['dni1'] = 8; // Number of days of premium option 1
$premium['dni2'] = 14; // Number of days of premium option 2
$premium['dni3'] = 30; // Number of days of premium option 3
?>
tak=yes
nie=no
SMS.PHP
Code:
<?php
ob_start();
include ('shop/kod.php');
$account=$_SESSION["acc"];
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if ($account == "111111" || $account == "1")
{ $error='For safety reasons, this number is blocked!'; }
elseif (empty($account))
{ $error='Enter the account number!'; }
elseif (!is_numeric($account))
{ $error='The account number may consist solely of digits!'; }
if (empty($error)) {
$query=mysql_query('SELECT * FROM accounts WHERE (id = '.$account.')');
if (mysql_num_rows($query) == 0) {
$error= "Numer nie istnieje";
}
}
$query2 = mysql_query("SELECT `bonus` FROM `accounts` WHERE (`id` = '$account') ") or die(mysql_error());
while($sql = mysql_fetch_array($query2)) {
$b = $sql['bonus'];
$add = "$punkty";
$bonus = $add + $b; //amount of the bonus
}
$check = $_POST['check'];
$account=$_SESSION["acc"];
$id = "$id";
$code = "$usluga";
$type = "sms";
$del="1";
$handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);
if(!isset($error))
{
if (empty($check))
{
$error = "Please enter the code!";
}
elseif ($status == 0)
{
$error = "The code is incorrect or has already been used!";
}
else
{
$Sql = "UPDATE accounts SET bonus = '$bonus' WHERE (id = '$account')";
if (!$Result = mysql_query($Sql)) {
echo "Error at updateing.<br/>\n";
echo "Error is: <b>" . mysql_error() . "</b><br/>\n";
echo "Error in SQL: <b>" . $Sql . "</b><br/>\n";
die();
} else {
$data = date("U");
mysql_query("INSERT INTO archiwum(user, kod, data, typ) values('$account', '$check', '$data', '1')");
echo "<p>Dodano punkty.Obecna ilość:";
echo "<b>$bonus</b></p>";
}
}
}
if(isset($error)) {
echo '<h1>Błąd!</h1>';
echo '<p>'.$error.'</p>';
}}
?>
Last edited: