Esempio n. 1
0
 public function action_startimport()
 {
     $postHeaders = array();
     foreach (\Input::post('headings') as $key => $header) {
         if ($header != 'null') {
             $postHeaders[$key] = $header;
         }
     }
     $postOptions = array();
     foreach (\Input::post('options') as $key => $header) {
         switch ($key) {
             case 'DUPES':
                 $postOptions[] = \Data\Source::DUPES;
                 break;
             case 'OPTIN':
                 $postOptions[] = \Data\Source::OPTIN;
                 break;
         }
     }
     $impData = \Data\Source::forge(\Data\Source::CREATE, array('supplier_id' => \Input::post('supplier'), 'dialler_id' => \Input::post('listid'), 'headers' => $postHeaders, 'import_options' => $postOptions, 'filename' => \Input::post('filename'), 'cost' => \Input::post('cost')));
     $this->template->title = 'Listing all Data';
     $this->template->content = "hello";
 }
Esempio n. 2
0
 public static function _import($data_id = null)
 {
     \Data\Source::forge(\Data\Source::IMPORT, $data_id);
 }