<?php
/*-------------------------------------------------------+
| Invooce Printing for FrontAccounting
| http://www.kvcodes.com/
+--------------------------------------------------------+
| Author: Kvvaradha  
| Email: admin@kvcodes.com
+--------------------------------------------------------+*/
if(!defined('SS_KVIMPORT')){
  define ('SS_KVIMPORT', 234<<8);
}
    
class hooks_Kvcodes_importexport extends hooks {

    function __construct() {
        $this->module_name = 'Kvcodes_importexport';
    }
    
   function install_options($app) {
    global $path_to_root;

     switch($app->id) {
        case 'system':       
          $app->add_rapp_function(1, _("Import/Export"), "modules/Kvcodes_importexport/index.php?", 'SA_IMPORT');
          break;
     }
   }
    function install_access()   {
        global $installed_extensions,$path_to_root;
         $security_sections[SS_KVIMPORT]    = _("Imports");
         $security_areas['SA_IMPORT'] = array(SS_KVIMPORT|2, _("Import Access")); 
          return array($security_areas, $security_sections);
    }     
    function activate_extension($company, $check_only=true) {
      global $db_connections, $path_to_root, $systypes_array, $installed_extensions;

      $updates = array( 'update.sql' => array('Kvcodes_importexport'));

      return $this->update_databases($company, $updates, $check_only);
    }
    
    function deactivate_extension($company, $check_only=true) {
        global $db_connections;
        $updates = array('drop.sql' => array('Kvcodes_importexport'));
        return $this->update_databases($company, $updates, $check_only);
    }
}
