usercash.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. if (ubRouting::get('action') == 'usercash') {
  3. if (ubRouting::checkGet(array('login', 'summ'))) {
  4. /**
  5. *
  6. * )" .
  7. * / \ (\-./
  8. * / | _/ o. \
  9. * | | .-" y)-
  10. * | |/ _/ \
  11. * \ /j _".\(@)
  12. * \ ( | `.'' )
  13. * \ _`- | /
  14. * " `-._ <_ (
  15. * `-.,),)
  16. * ^^ CE BILOCHKA! ^^
  17. */
  18. $userLogin = ubRouting::get('login');
  19. $summ = ubRouting::get('summ');
  20. $cashType = (ubRouting::get('ct', 'int')) ? (ubRouting::get('ct', 'int')) : 1;
  21. $operation = (ubRouting::checkGet('op')) ? ubRouting::get('op') : 'add';
  22. $note = (ubRouting::checkGet('note')) ? ubRouting::get('note') : '';
  23. if (zb_checkMoney($summ)) {
  24. $allUsers = zb_UserGetAllDataCache();
  25. if (isset($allUsers[$userLogin])) {
  26. zb_CashAdd($userLogin, $summ, $operation, $cashType, $note);
  27. die('OK:USERCASH');
  28. } else {
  29. die('ERROR:WRONG_LOGIN');
  30. }
  31. } else {
  32. die('ERROR:DIRTY_MONEY');
  33. }
  34. } else {
  35. die('ERROR:NO_PARAMS');
  36. }
  37. }