Esempio n. 1
0
 /**
  * @Author: Taymoor Qanadilou
  * @Date created: 26/05/2013
  * @Description:top images large size report
  * @Param:
  *   none
  * @Updated History:
  *    Ayman Hussein    02/06/2013    remove the logic that get all images then sort it on img size then getl last big 5 img 
  */
 function top_images_large_size_report()
 {
     $db_functions_obj = new DbFunctions();
     $helper_obj = new Helper();
     $image_query = $db_functions_obj->image_filesize_report();
     while ($row = $this->conn->db_fetch_object($image_query)) {
         $image_details[] = $row;
     }
     $output = "<table width='100%'>\n                        <tr><td>Top images size</td></tr>\n                        <tr>\n                            <th>Id</th>\n                            <th>Image</td>\n                            <th>Image size</th>\n                        </tr>";
     foreach ($image_details as $key => $value) {
         $class = $helper_obj->table_row_class($i);
         $output .= "<tr class='{$class}'>\n                            <td>{$value->id}</td>\n                            <td>\n                                <img src='" . THUMBNAIL_IMG_PATH . "{$value->img_path}' />\n                            </td>\n                            <td>" . $helper_obj->format_size_units($value->img_size) . "</td>\n                        </tr>";
     }
     $output .= "</table>";
     return $output;
 }