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 :


  1. <?PHP
  2.  
  3.  
  4. $main_content .= '
  5. <b>SMS DONATION</b></CENTER><br /><br />
  6.  
  7. <ol>
  8. <li>Enter your account number.</li>
  9. <li>Choose your payment price.</li>
  10. <li>Click on the red Pay by mobile button.</li>
  11. <li>Follow the instructions.</li>
  12. <li>Your points will be added automatically.</li>
  13.  
  14. </ol>
  15. </br>
  16. <center><b><li>12 Premium Points for 3 EUR</li>
  17. <li>26 Premium Points for 6 EUR</li>
  18. <li>40 Premium Points for 9 EUR</li>
  19. </center></b>
  20.  
  21. </br>
  22. ';
  23.  
  24. $main_content .= '<center>
  25. <!-- PayGol JavaScript -->
  26. <script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
  27.  
  28. <!-- PayGol Form -->
  29. <form name="pg_frm">
  30. Enter account number:<p>
  31. <input type="text" name="pg_custom" value=""><p>
  32. <input type="hidden" name="pg_serviceid" value="10003">
  33. <input type="hidden" name="pg_currency" value="EUR">
  34. <input type="hidden" name="pg_name" value="Premium Points">
  35.  
  36. <!-- With Option buttons -->
  37. <input type="radio" name="pg_price" value="1"checked>12 Premium Points 3<p>
  38. <input type="radio" name="pg_price" value="2">26 Premium Points 6<p>
  39. <input type="radio" name="pg_price" value="3">40 Premium Points 9<p>
  40. <input type="hidden" name="pg_return_url" value="http://myotsdomain.com/index.php?subtopic=shopsystem">
  41. <input type="hidden" name="pg_cancel_url" value="">
  42. <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)">
  43. </form> </center>';
  44.  
  45. ?>


Następnie kod który go przejmuje, przechodzi do katalogu i edytuje jego zawartość

  1. <?php
  2. /*
  3.  
  4. 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>
  5.  
  6. */
  7.  
  8. // check that the request comes from PayGol server
  9. if(!in_array($_SERVER['REMOTE_ADDR'],
  10. array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
  11. header("HTTP/1.0 403 Forbidden");
  12. die("Error: Unknown IP");
  13. }
  14. // CONFIG
  15. $your_service_id = TWOJE_ID; // Twoje service ID z PayGola
  16.  
  17. // get the variables from PayGol system
  18. $message_id = $_GET['message_id'];
  19. $service_id = $_GET['service_id'];
  20. $shortcode = $_GET['shortcode'];
  21. $keyword = $_GET['keyword'];
  22. $message = $_GET['message'];
  23. $sender = $_GET['sender'];
  24. $operator = $_GET['operator'];
  25. $country = $_GET['country'];
  26. [color="#FF0000"]$custom = $_GET['custom'];[/color]
  27. $points = $_GET['points'];
  28. $price = $_GET['price'];
  29. $currency = $_GET['currency'];
  30.  
  31. //Replace these parameters by your database details
  32. if ($your_service_id == $service_id)
  33. {
  34. ( [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])
  35.  
  36. $XML = @simplexml_load_string(file_get_contents($custom));
  37.  
  38. if ($your_service_id == $service_id)
  39. {
  40. $xml = simplexml_load_file($custom);
  41. $xml['premDays'] += 15;
  42. $sfile = $xml->asXML();$open_file = fopen($custom, 'w');
  43. fwrite($open_file, $sfile);
  44. fclose($open_file);
  45. $toxml = simplexml_load_file($custom);
  46. $tohave = $toxml['premDays'] + 15;
  47. }
  48.  
  49. }
  50. }
  51.  
  52. ?>


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ć.