$mycur = $currencies_list[strtoupper($_SESSION['currency'])][2]; $display_currency = strtoupper($_SESSION['currency']); if (strtoupper($_SESSION['currency']) != strtoupper(BASE_CURRENCY)) $two_currency = true; } $HD_Form = new FormHandler("cc_payment_methods", "payment_method"); getpost_ifset(array ( 'item_id', 'item_type', 'payment_error' )); $DBHandle = DbConnect(); $HD_Form->setDBHandler($DBHandle); $HD_Form->init(); // #### HEADER SECTION $static_amount = false; $amount = 0; if ($item_type = "invoice" && is_numeric($item_id)) { $table_invoice = new Table("cc_invoice", "status,paid_status"); $clause_invoice = "id = " . $item_id; $result = $table_invoice->Get_list($DBHandle, $clause_invoice); if (is_array($result) && $result[0]['status'] == 1 && $result[0]['paid_status'] == 0) { $table_invoice_item = new Table("cc_invoice_item", "COALESCE(SUM(price*(1+(vat/100))),0)"); $clause_invoice_item = "id_invoice = " . $item_id; $result = $table_invoice_item->Get_list($DBHandle, $clause_invoice_item); $amount = $result[0][0];
<td class="bgcolor_004" align="left" > </td> <td class="bgcolor_005" align="center" > <input type="image" name="image16" align="top" border="0" src="<?php echo Images_Path;?>/button-search.gif" /> </td> </tr> </table> </FORM> <?php $HD_Form = new FormHandler("pnl_report","PNL Report"); $HD_Form -> setDBHandler (DbConnect()); $HD_Form -> init(); $condition1=str_replace('cdr.starttime','date',$condition); $condition2=str_replace('cdr.starttime','firstusedate',$condition); $payphones=$A2B->config["webui"]["report_pnl_pay_phones"]; $tallfree=$A2B->config["webui"]["report_pnl_tall_free"]; $payphones=str_replace(' ','',$payphones); $tallfree=str_replace(' ','',$tallfree); $payphones=str_replace('),(',' ,1 as dnid_type union select ',$payphones); $payphones=str_replace(')',' ,1 ',$payphones); $tallfree=str_replace('),(',' ,2 union select ',$tallfree); $tallfree=str_replace(')',' ,2 ',$tallfree); $tallfree=str_replace('(',' select ',$tallfree); $payphones=str_replace('(',' select ',$payphones);