Ejemplo n.º 1
0
Archivo: video.php Proyecto: arh922/ain
 function get_all_videos($cid)
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $videos = $db_functions_obj->get_all_videos($cid);
     $output = "<table id='add_video_table' style='font-size: 12px' class='table table-hover table-nomargin table-bordered'>\n                      <tr>\n                        <th>" . $helper_obj->t("ID") . "</th>\n                        <th>" . $helper_obj->t("Title") . "</th>\n                        <th>" . $helper_obj->t("Description") . "</th>\n                        <th>" . $helper_obj->t("Image1") . "</th>\n                        <th>" . $helper_obj->t("Image2") . "</th>\n                        <th>" . $helper_obj->t("Image3") . "</th>\n                        <th>" . $helper_obj->t("Image4") . "</th>\n                        <th>" . $helper_obj->t("Screenshot") . "</th> \n                        <th>" . $helper_obj->t("Uploaded date") . "</th>\n                        <th>" . $helper_obj->t("Published date") . "</th>\n                        <th>" . $helper_obj->t("Category") . "</th>\n                        <th>" . $helper_obj->t("Video") . "</th> \n                        <th>" . $helper_obj->t("PG rate") . "</th> \n                        <th>" . $helper_obj->t("Views") . "</th> \n                        <th>" . $helper_obj->t("Featured") . "</th>\n                        <th>" . $helper_obj->t("Premium") . "</th>  \n                        <th>" . $helper_obj->t("Added By") . "</th>  \n                        <th>" . $helper_obj->t("Edit") . "</th>\n                        <th>" . $helper_obj->t("Delete") . "</th>\n                      </tr>";
     foreach ($videos as $key => $data) {
         $class = $helper_obj->table_row_class($i);
         $output .= "<tr id='vid_{$data->id}'>\n                          <td>" . $data->id . "</td>\n                          <td>" . $data->title . "</td>\n                          <td>" . $data->description . "</td>\n                          <td>" . $data->image1 . "</td>\n                          <td>" . $data->image2 . "</td>\n                          <td>" . $data->image3 . "</td>\n                          <td>" . $data->image4 . "</td>\n                          <td>" . $data->screenshot . "</td>\n                          <td>" . date(DATE_FORMAT, $data->upload_date) . "</td> \n                          <td>" . date(DATE_FORMAT, $data->published_date) . "</td> \n                          <td>" . $data->cat_name . "</td>\n                          <td>" . $data->url . "</td>\n                          <td>" . $data->pgrate_name . "</td>\n                          <td>" . $data->views . "</td>\n                          <td>" . $data->featured . "</td>\n                          <td>" . $data->premium . "</td>   \n                          <td>" . $data->added_by . "</td>   \n                          <td><a href='javascript:void(0);' onclick='openEditVideoPopup({$data->id})'>" . $helper_obj->t("Edit") . "</a></td>\n                          <td><a href='javascript:void(0);' onclick='deleteVideo({$data->id})'>" . $helper_obj->t("Delete") . "</a></td>\n                       </tr>";
     }
     return $output;
 }