function get_hitd() { $db_functions_obj = new DbFunctions(); $hitds = $db_functions_obj->get_all_hitds(); $helper_obj = new Helper(); $output = "<table id='add_hitd_table' class='table table-hover table-nomargin table-bordered'>\n <tr>\n <th>" . $helper_obj->t("ID") . "</th>\n <th>" . $helper_obj->t("date") . "</th>\n <th>" . $helper_obj->t("body") . "</th> \n <th>" . $helper_obj->t("Edit") . "</th>\n <th>" . $helper_obj->t("Delete") . "</th>\n </tr>"; foreach ($hitds as $key => $hitd) { $class = $helper_obj->table_row_class($i); $output .= "<tr class='{$class}' id='happened_{$hitd->id}'>\n <td>" . $hitd->id . "</td>\n <td>" . $hitd->date . "</td>\n <td>" . $hitd->body . "</td>\n <td><a href='javascript:void(0);' onclick='openEditHitdPopup({$hitd->id})'>" . $helper_obj->t("Edit") . "</a></td>\n <td><a href='javascript:void(0);' onclick='deleteHitd({$hitd->id})'>\n " . $helper_obj->t("Delete") . "</div>\n </a>\n </td>\n </tr>"; } $output .= "</table>"; return $output; }