Esempio n. 1
0
File: tag.php Progetto: arh922/ain
 function get_tags()
 {
     $db_functions_obj = new DbFunctions();
     $categories = $db_functions_obj->get_all_tags();
     $helper_obj = new Helper();
     $output = "<table id='add_tag_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("Image") . "</th>  \n                        <th>" . $helper_obj->t("Edit") . "</th>\n                        <th>" . $helper_obj->t("Delete") . "</th>\n                      </tr>";
     foreach ($categories as $key => $tag) {
         $class = $helper_obj->table_row_class($i);
         $output .= "<tr class='{$class}' id='tag_{$tag['id']}'>\n                          <td>" . $tag['id'] . "</td>\n                          <td>" . $tag['name'] . "</td> \n                          <td><img src='" . TAGS_THUMBNAIL_IMAGES_PATH . $tag['image'] . "' width='70' /></td> \n                          <td><a href='javascript:void(0);' onclick='openEditTagPopup({$tag['id']})'>" . $helper_obj->t("Edit") . "</a></td>\n                          <td><a href='javascript:void(0);' onclick='deleteTag({$tag['id']})'>\n                                " . $helper_obj->t("Delete") . "</div>\n                              </a>\n                          </td>\n                       </tr>";
     }
     $output .= "</table>";
     return $output;
 }