private function getSubmitOrder($id) { $text = Core_Text::__getInstance(); $text->setFile('order'); $text->setSection('submit'); $login = Core_Login::__getInstance(); if ($login->isLogin()) { $userID = (int) $login->getUserId(); } else { $userID = 0; } // Fetch the order $db = Core_Database::__getInstance(); $order = $db->getDataFromQuery($db->customQuery("\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\torders\r\n\t\t\tLEFT JOIN\r\n\t\t\t\tcompanies ON orders.c_id = companies.c_id\r\n\t\t\tLEFT JOIN\r\n\t\t\t\tplayers_comp ON players_comp.c_id = companies.c_id\r\n\t\t\t\tAND players_comp.plid = '" . $userID . "'\r\n\t\t\tWHERE\r\n\t\t\t\to_id = '" . (int) $id . "'\r\n\t\t")); if (count($order) == 1 && $order[0]['o_isDone'] == 0 && $order[0]['compStatus'] > 0) { $key = Core_Tools::getInput('_POST', 'confirmKey', 'varchar'); if ($key && Core_Tools::checkConfirmLink($key)) { $this->doSubmit($order[0]); return $this->getOrderPrint($order[0]['o_id']); } else { return $this->getSubmitForm($order[0]); } } else { return '<p>Invalid input.</p>'; } }