Esempio n. 1
0
  }
  if (!$sustc->user->islogin()) {
    dredirect('/user/signin?redirect=/user/deposit');
  }
  if (is_post()) {
    $err['code'] = -1;
    $err['success'] = false;
    $depo = isset($_POST['deposit']) ? $_POST['deposit'] : false;
    if ($depo && isset($_POST['formhash'])
        && $sustc->security->check_formhash($_POST['formhash'])) {
      $price = isset($depo['price']) ? intval($depo['price']) : 0;
      if (isset($depo['method']) && $depo['method'] == 'alipay'
          && in_array($price, array(500, 1000, 2000, 5000))) {
        $trade = new Alipay();
        //echo '<!DOCTYPE html><html><head></head><body>';
        $trade_html = $trade->create_trade($price);
        //echo '</body></html>';
        include template('user/deposit_call');
        exit();
      }
    }
  }
  $err['disabled'] = isset($_GET['disabled']) ?
      (intval($_GET['disabled']) != 0 ? TRUE : FALSE) : FALSE;
  include template('user/deposit');
} else {
  echo 'WIP';
}


?>