Esempio n. 1
0
 function get_sources()
 {
     $db_functions_obj = new DbFunctions();
     global $user;
     $categories = $db_functions_obj->get_all_sources();
     $helper_obj = new Helper();
     $output = "<table id='add_source_table' class='table table-hover table-nomargin table-bordered'>\n                      <tr>\n                       \n                        <th>" . $helper_obj->t("Source ID") . "</th>\n                        <th>" . $helper_obj->t("Source Name") . "</th>\n                        <th>" . $helper_obj->t("Twitter User ID") . "</th>\n                        <th>" . $helper_obj->t("Link") . "</th> \n                        <th>" . $helper_obj->t("Delete") . "</th> \n                      </tr>";
     foreach ($categories as $key => $category) {
         $class = $helper_obj->table_row_class($i);
         $output .= "<tr class='{$class}' id='category_{$category['id']}'>\n                         \n                          <td>" . $category['category_id'] . "</td>\n                          <td>" . $category['name'] . "</td>\n                          <td>" . $category['twitter_user_id'] . "</td>\n                          <td>" . $category['link'] . "</td>\n                          <td><a href='javascript:void(0)' onclick='deleteSource(" . $category['id'] . ");'>Delete</a></td>\n                       </tr>";
     }
     $output .= "</table>";
     return $output;
 }