# -*- encoding : utf-8 -*-

class Admin::VolumePeriodiquesController < ApplicationController
  layout "admin"
  before_action :auth_admin, :except => :etat
  
  before_action :admin_space
  
  
  def index
    @v_contacts = VContact.limit(10).all
  end
  
  
  def admin_space
    @admin_space = "statistiques"
    
    
  end
  
  
  def import
    if true
      
      VolumePeriodique.import
   
    
      #system "#{mysql_path}mysql -u root vulco_app < /Users/nico/Dev2/test6/vulco_app/import_csv/vulco-ok-18-12-2019-23-35-34.sql"
      #ActiveRecord::Base.connection.execute(IO.read("/Users/nico/Dev2/test6/vulco_app/import_csv/vulco-ok-18-12-2019-23-35-34.sql"))
      #ActiveRecord::Base.connection.execute(@sql)
    

      
    end
    
  end
  
  
  
  
  
end
