function get_all_operators() { $db_functions_obj = new DbFunctions(); $operators = $db_functions_obj->get_operators(); $helper_obj = new Helper(); $output = "<table id='add_operator_table' class='table table-hover table-nomargin table-bordered'>\n <tr>\n <th>" . $helper_obj->t("ID") . "</th>\n <th>" . $helper_obj->t("Name") . "</th>\n <th>" . $helper_obj->t("Country") . "</th>\n <th>" . $helper_obj->t("Paid Shortcode") . "</th>\n <th>" . $helper_obj->t("Free Shortcode") . "</th>\n <th>" . $helper_obj->t("Type") . "</th>\n <th>" . $helper_obj->t("Edit") . "</th>\n <th>" . $helper_obj->t("Delete") . "</th>\n </tr>"; foreach ($operators as $key => $client) { $class = $helper_obj->table_row_class($i); $output .= "<tr class='{$class}' id='operator_{$client['id']}'>\n <td>" . $client['id'] . "</td>\n <td>" . $client['op_name'] . "</td>\n <td>" . $client['country_name'] . "</td>\n <td>" . $client['paid_shortcode'] . "</td>\n <td>" . $client['free_shortcode'] . "</td>\n <td>" . $client['type'] . "</td>\n <td><a href='javascript:void(0);' onclick='openEditOperatorPopup({$client['id']})'>" . $helper_obj->t("Edit") . "</a></td>\n <td><a href='javascript:void(0);' onclick='deleteOperator({$client['id']})'>\n " . $helper_obj->t("Delete") . "</div>\n </a>\n </td>\n </tr>"; } $output .= "</table>"; return $output; }