<p>Stop loss: ' . $data['stop_loss'] . '</p> <p>Thanks and Best regards,</p> </div>'; $add_address = array(); $add_address[] = array('email' => $config['email'], 'name' => 'ForexSignalPro.Net'); $add_cc = ''; ob_start(); $c->sendmail($title, $subject, $body, $add_address, $add_cc, $add_bcc); ob_get_clean(); $c->_model->_updateRealTimeOrder($id); echo $total; return true; } //analytic if (isset($_POST['viewAnalytic'])) { $model = new modelAnalytic(); $id = $model->_changeDauNhay($_POST['viewAnalytic']); $dataA = $model->_viewNewAnalytic($id); $dateStart = $dataA['datetime']; $dateStartY = date('Y', $dateStart); $dateStartM = (int) date('m', $dateStart); $dateEndY = date('Y', $dateStart); if ($dateStartY == $dateEndY && $dateStartM < 12) { $dateEndM = (int) date('m', $dateStart) + 1; } else { $dateEndY++; $dateEndM = 1; } $dateStart = strtotime(date("{$dateStartY}-{$dateStartM}-01")); $dateEnd = strtotime(date("{$dateEndY}-{$dateEndM}-01")); $str = '';
<?php $analytic = new modelAnalytic(); $data = $analytic->_viewNewAnalytic(); $currentY = date('Y'); $currentM = (int) date('m'); $dateY = date('Y', $data['datetime']); $dateM = (int) date('m', $data['datetime']); function autoCreate($lang) { global $analytic; $datetime = strtotime(date('Y-m-01')); $name = 'Tháng ' . (int) date('m') . ' năm ' . date('Y') . ''; $table = 'web_users'; $value = ''; $status = 1; $analytic->_autoCreateAnalytic($name, $table, $value, $datetime, $lang, $status); for ($i = 0; $i <= 3; $i++) { $table = 'web_payment'; $value = $i; $analytic->_autoCreateAnalytic($name, $table, $value, $datetime, $lang, $status); } } if ($currentY == $dateY && $currentM > $dateM) { autoCreate($lang); } else { if ($currentY > $dateY) { autoCreate($lang); } } ?>