コード例 #1
0
 function writeBody()
 {
     global $rbk_login, $rbk_lang, $rbk_curr, $rbk_encoding, $rbk_shp_item, $rbk_pass1;
     if (isset($_REQUEST['Status'])) {
         $status = $_REQUEST['Status'];
     } else {
         $status = '';
     }
     //echo $status . '<br />' . "\n";
     if ($status == 'success') {
         $out_summ = floatval($_REQUEST['OutSum']);
         $shp_item = intval($_REQUEST["Shp_item"]);
         $uniteller_crc = strtoupper($_REQUEST["SignatureValue"]);
         $my_crc = strtoupper(md5($_REQUEST['OutSum'] . ':' . $_REQUEST["InvId"] . ':' . $rbk_pass1 . ':Shp_item=' . $shp_item));
         if ($my_crc != $rbk_crc) {
             echo langGet('uniteller_fail');
         } else {
             echo langGet('uniteller_success');
         }
     } elseif ($status == 'fail') {
         echo langGet('uniteller_fail');
     } else {
         //echo 'Рисуем страницу оплаты<br />' . "\n";
         $form = new HtmlForm('uniteller_payment');
         $layout = new GridLayout(3, 2);
         $layout->setCaption('uniteller_payment1');
         // список лицевых счетов
         // если несколько, то предоставить выбор
         $layout->addWidget(new HtmlLabel(langGet('account')));
         $account = new HtmlComboBox('AccountId', $this->accounts);
         $layout->addWidget($account);
         // если один, то не показывать
         $layout->addWidget(new HtmlLabel(langGet('amount_text')));
         //$sum = array(100 => 100, 200 => 200, 300 => 300, 400 => 400,500 => 500,1000 => 1000,1500 => 1500,2000 => 2000);
         ////$sum = array(1 => 1, 100 => 100, 200 => 200, 300 => 300, 400 => 400,500 => 500,1000 => 1000,1500 => 1500,2000 => 2000);
         //$sum = new HtmlComboBox('OutSum', $sum);
         $sum = new HtmlTextField('OutSum');
         $layout->addWidget($sum);
         $layout->addWidget(new HtmlLabel(''));
         $submit = new HtmlSubmit(langGet('new_payment_next'));
         $layout->addWidget($submit);
         $form->addWidget($layout);
         $form->addData('Status', 'pay');
         $form->writeHtml();
         $form = new HtmlForm('payment');
         $layout = new GridLayout(2, 1);
         $layout->addWidget(new HtmlLabel(langGet('uniteller_note')));
         //$aid = $this->accounts[1];
         $layout->addWidget(new HtmlLabel('<A HREF="?module=promised_payment">' . langGet('promised_payment') . '</A>'));
         $form->addWidget($layout);
         $form->writeHtml();
     }
 }