<div id="ajax_forex"> <h3 class="title_user">Real time Orders:</h3> <table width="100%" border="1" cellpadding="5" cellspacing="0" class="table" style="line-height:20px"> <tr class="title_forex"> <th width="150">Pair of Currencies</th> <th align="left" width="220" style="padding-left:15px">Status</th> <th>Oders</th> <th>Entry Point</th> <th>Take Profit</th> <th>Stop Loss</th> <th width="180">Datetime</th> </tr> <?php $model = new modelForex(); $status = array('0' => '<span class="iconRealTime failure">Failure</span>', '1' => '<span class="iconRealTime success">Success</span>', '2' => '<span class="iconRealTime waiting">Waiting for Opportunity</span>', '3' => '<span class="iconRealTime progressing">In Progressing</span>'); $data = $model->_listRealTime($config['limit_3']); foreach ($data as $row) { if ($row['oders'] == 1) { $oders = '<span class="buy"> </span>'; } else { $oders = '<span class="sell"> </span>'; } echo '<tr> <th>' . $row['currency'] . '</th> <td>' . $status[$row['status_real_time']] . '</td> <td>' . $oders . '</td> <td align="center">' . $row['entry_point'] . ' </td> <td align="center">' . $row['take_profit'] . ' </td> <td align="center">' . $row['stop_loss'] . ' </td> <td align="center">' . $model->_viewDateTime($row['datetime']) . '</td> </tr>';
<?php $model = new modelForex(); $ip_address = $_SERVER['REMOTE_ADDR']; if (isset($_REQUEST['ip_address']) && $_REQUEST['ip_address'] == $ip_address) { $PAYEE_ACCOUNT = $model->_changeDauNhay($_REQUEST['PAYEE_ACCOUNT']); $PAYMENT_AMOUNT = $model->_changeDauNhay($_REQUEST['PAYMENT_AMOUNT']); $PAYMENT_UNITS = $model->_changeDauNhay($_REQUEST['PAYMENT_UNITS']); $PAYMENT_ID = $model->_changeDauNhay($_REQUEST['PAYMENT_ID']); $name = $model->_changeDauNhay($_REQUEST['name']); $email = $model->_changeDauNhay($_REQUEST['email']); $package_id = $model->_changeDauNhay($_REQUEST['package_id']); //$ip_address = $model->_changeDauNhay($_REQUEST['ip_address']); $status = '0'; $check = $model->_checksPaymentIpAddress($ip_address); $time = time() - $check['datetime']; if ($time > 60 && $check['PAYMENT_ID'] != $PAYMENT_ID) { $token = ''; $fields = array_keys($_REQUEST); $values = array_values($_REQUEST); for ($i = 0; $i < count($fields); $i++) { $token .= "[{$fields[$i]}] => {$values[$i]}<br />"; } $model->_insertPayment($PAYEE_ACCOUNT, $PAYMENT_AMOUNT, $PAYMENT_UNITS, $PAYMENT_ID, $name, $email, $package_id, $ip_address, $token, $lang, $status); } header('location: ' . CONS_BASE_URL . '/payment/error/?payment_id=' . $PAYMENT_ID); return true; } if (isset($_GET['payment_id'])) { $data = $model->_viewPayment($_GET['payment_id']); if (count($data) == 0 || $data['status'] == 1) {
<?php $model = new modelForex(); $ip_address = $_SERVER['REMOTE_ADDR']; //$ip_address = '113.187.16.234'; //?ip_address=113.187.16.234&PAYEE_ACCOUNT=U7071279&PAYMENT_AMOUNT=150&PAYMENT_UNITS=USD&PAYMENT_ID=1438315119&name=Nhan&email=hieu_nhan1@yahoo.com&package_id=2 if (isset($_REQUEST['ip_address']) && $_REQUEST['ip_address'] == $ip_address) { $PAYEE_ACCOUNT = $model->_changeDauNhay($_REQUEST['PAYEE_ACCOUNT']); $PAYMENT_AMOUNT = $model->_changeDauNhay($_REQUEST['PAYMENT_AMOUNT']); $PAYMENT_UNITS = $model->_changeDauNhay($_REQUEST['PAYMENT_UNITS']); $PAYMENT_ID = $model->_changeDauNhay($_REQUEST['PAYMENT_ID']); $name = $model->_changeDauNhay($_REQUEST['name']); $email = $model->_changeDauNhay($_REQUEST['email']); $package_id = $model->_changeDauNhay($_REQUEST['package_id']); //$ip_address = $model->_changeDauNhay($_REQUEST['ip_address']); $status = '2'; $check = $model->_checksPaymentIpAddress($ip_address); $time = time() - $check['datetime']; if ($time > 300 && $check['PAYMENT_ID'] != $PAYMENT_ID) { $token = ''; $fields = array_keys($_REQUEST); $values = array_values($_REQUEST); for ($i = 0; $i < count($fields); $i++) { $token .= "[{$fields[$i]}] => {$values[$i]}<br />"; } /*create payment*/ $model->_insertPayment($PAYEE_ACCOUNT, $PAYMENT_AMOUNT, $PAYMENT_UNITS, $PAYMENT_ID, $name, $email, $package_id, $ip_address, $token, $lang, $status); } header('location: ' . CONS_BASE_URL . '/payment/success/?payment_id=' . $PAYMENT_ID); return true; }
<tr class="title_forex"> <th rowspan="2" width="140px">Pair Currencies</th> <th rowspan="2" width="140px">PIVOT</th> <th colspan="3">Support</th> <th colspan="3">Resistance</th> </tr> <tr bgcolor="#d3ebf1"> <td align="center">S1</td> <td align="center">S2</td> <td align="center">S3</td> <td align="center">R1</td> <td align="center">R2</td> <td align="center">R3</td> </tr> <?php $model = new modelForex(); $data = $model->_webSupportResistance($config['limit_4']); foreach ($data as $row) { echo '<tr> <td align="center">' . $row['currency'] . '</td> <td align="center">' . $row['pivot'] . '</td> <td align="center">' . $row['support_s1'] . '</td> <td align="center">' . $row['support_s2'] . '</td> <td align="center">' . $row['support_s3'] . '</td> <td align="center">' . $row['resistance_r1'] . '</td> <td align="center">' . $row['resistance_r2'] . '</td> <td align="center">' . $row['resistance_r3'] . '</td> </tr>'; } ?> </table>
<div id="ajax_forex"> <h3 class="title_user">Trend</h3> <table width="100%" border="1" cellpadding="5" cellspacing="0" class="table" style="line-height:20px"> <tr class="title_forex"> <th>Pair Currencies</th> <th>Trend of Today</th> <th>Trend of Week</th> <th>Trend of Month</th> </tr> <?php $model = new modelForex(); $strTrend = array('<span class="icon_down">DOWN</span>', '<span class="icon_up">UP</span>', 'NO'); $data = $model->_webTrend($config['limit_2']); foreach ($data as $row) { echo '<tr> <td align="center">' . $row['currency'] . '</td> <td align="center">' . $strTrend[$row['today']] . '</td> <td align="center">' . $strTrend[$row['week']] . '</td> <td align="center">' . $strTrend[$row['month']] . '</td> </tr>'; } ?> </table> <script type="text/javascript"> $(document).ready(function(e) { function forex(){ $.ajax({ url:"<?php echo CONS_BASE_URL; ?>