sc.php 758 B

1234567891011121314151617181920
  1. <?php
  2. //remote userstats credit setting requests processing
  3. if (ubRouting::get('action') == 'sc') {
  4. if (ubRouting::checkGet(array('login', 'cr', 'end', 'ct'))) {
  5. $userLogin = ubRouting::get('login');
  6. $newCredit = ubRouting::get('cr');
  7. $creditExpire = ubRouting::get('end');
  8. $creditFee = ubRouting::get('fee'); //may be zero
  9. $creditCashType = ubRouting::get('ct', 'int');
  10. //setting credit and expire
  11. $billing->setcredit($userLogin, $newCredit);
  12. $billing->setcreditexpire($userLogin, $creditExpire);
  13. //charging some money
  14. zb_CashAdd($userLogin, '-' . $creditFee, 'add', $creditCashType, 'SCFEE');
  15. die('SC:OK');
  16. } else {
  17. die('ERROR:PARAMS_MISSED');
  18. }
  19. }