/**
  *This method loads a csv file content into the database for a new list
  *
  *@param null
  *@return void
  */
 public function getManagenew()
 {
     //get the list id to manage
     $list_id = Input::get('list_id');
     //get information about this list
     $list_info = ListsModel::getById($list_id);
     //open the csv file
     $full_path = Path::base() . $list_info[0]['csv_file_path'];
     //get the first 10 lines
     $file_pointer = fopen($full_path, 'r');
     $itr = 5;
     while (!feof($file_pointer)) {
         if ($itr == 0) {
             break;
         }
         //read data into csv
         $data['list_data'][] = fgetcsv($file_pointer);
         --$itr;
     }
     //get the column list
     $data['column_list'] = $data['list_data'][0];
     //get table fielnames
     $data['table_fields'] = SubscribersModel::getTableColumnNames();
     //lod the view page with this information
     View::render('lists/managenew', $data);
 }
 /**
  *This method loads the homepage 
  *
  *@param null
  *@return void
  */
 public function index()
 {
     //get all list names from the database
     $data['lists'] = ListsModel::all();
     //get the ending date today
     View::render('home/home', $data);
 }