Witam wszystkich serdecznie, jako że jestem tutaj nowym użytkownikiem mam nadzieję że ktoś mi pomoże, mogę nawet zapłacić jeśli ktoś będzie mi oferować pomoc, bardzo tego potrzebuję!
A cały problem zaczyna się w pliku buypoints.php gdzie powinno się pobierać numer konta zapisany w xml w danym folderze czyli : account number i ma byc przekazywany do tej zakładki która ma edytować ten plik, który wpisujemy w account number i powinien edytować informacje w pliku xml czyli, plik początkowy gdzie wpisujemy numer konta :<?PHP
$main_content .= '
<b>SMS DONATION</b></CENTER><br /><br />
<ol>
<li>Enter your account number.</li>
<li>Choose your payment price.</li>
<li>Click on the red Pay by mobile button.</li>
<li>Follow the instructions.</li>
<li>Your points will be added automatically.</li>
</ol>
</br>
<center><b><li>12 Premium Points for 3 EUR</li>
<li>26 Premium Points for 6 EUR</li>
<li>40 Premium Points for 9 EUR</li>
</center></b>
</br>
';
$main_content .= '<center>
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
<!-- PayGol Form -->
<form name="pg_frm">
Enter account number:<p>
<input type="text" name="pg_custom" value=""><p>
<input type="hidden" name="pg_serviceid" value="10003">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="Premium Points">
<!-- With Option buttons -->
<input type="radio" name="pg_price" value="1"checked>12 Premium Points 3<p>
<input type="radio" name="pg_price" value="2">26 Premium Points 6<p>
<input type="radio" name="pg_price" value="3">40 Premium Points 9<p>
<input type="hidden" name="pg_return_url" value="http://myotsdomain.com/index.php?subtopic=shopsystem">
<input type="hidden" name="pg_cancel_url" value="">
<input type="image" name="pg_button" class="paygol" src="http://www.paygol.com/micropayment/img/buttons/125/red_en_pbm.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" onClick="pg_reDirect(this.form)">
</form> </center>';
?>
Następnie kod który go przejmuje, przechodzi do katalogu i edytuje jego zawartość
<?php
/*
Note:Before starting you have to create an account at <a href="http://www.paygol.com/register?affiliatecode=T8Y7-LK0M-NY0R-Y6O3" target="_blank">http://www.paygol.com/register?affiliateco...-LK0M-NY0R-Y6O3</a>
*/
// check that the request comes from PayGol server
array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) { header("HTTP/1.0 403 Forbidden"); die("Error: Unknown IP"); }
// CONFIG
$your_service_id = TWOJE_ID; // Twoje service ID z PayGola
// get the variables from PayGol system
$message_id = $_GET['message_id'];
$service_id = $_GET['service_id'];
$shortcode = $_GET['shortcode'];
$keyword = $_GET['keyword'];
$message = $_GET['message'];
$sender = $_GET['sender'];
$operator = $_GET['operator'];
$country = $_GET['country'];
[color="#FF0000"]$custom = $_GET['custom'];[/color]
$points = $_GET['points'];
$price = $_GET['price'];
$currency = $_GET['currency'];
//Replace these parameters by your database details
if ($your_service_id == $service_id)
{
( [i]tutaj ma się znajdować skrypt który edytuje cały plik xml, ja wykombinowałem coś takiego, lecz z moim plikiem nic się nie dzieje :( [/i])
if ($your_service_id == $service_id)
{
$xml = simplexml_load_file($custom);
$xml['premDays'] += 15;
$sfile = $xml->asXML();$open_file = fopen($custom, 'w'); $toxml = simplexml_load_file($custom);
$tohave = $toxml['premDays'] + 15;
}
}
}
?>
Jeśli ktoś nie wie dokładnie o co mi chodzi, proszę się ze mną skontaktować, mogę zapłacić z góry, bardzo mi na tym skrypcie zależy. Mam gotowy skrypt pod sql, ale jest on niekompatybilny z moimi plikami, więc trzeba go nieco zmodyfikować.