<?php

require_once DOL_DOCUMENT_ROOT.'/custom/ntak/class/ntaksender.class.php';

class NtakCron
{
    public $output;
    public $error;

    public function run() 
    {
        print 'run';exit;
        dol_syslog(__METHOD__, LOG_DEBUG);
        exit;
        $result = 0;
        $this->output = '';
        $this->error = '';

        $ntakSender = new NtakSender;

        if ($ntakSender->send()) {
            $this->output = 'NTAK sent successfully';

            $ntakSender->checkNtakStatus();
        } else {
			$result = 1;
			$this->error = 'NTAK failure';
        }



		return $result;
    }

    public function runbbus() 
    {
        $result = 0;
        $ntakSender = new NtakSender;
        if ($ntakSender->send2()){
            $this->output = 'NTAK sent successfully';
        } else {
			$result = 1;
			$this->error = 'NTAK failure';
        }
        return $result;
    }

    public function runnilsz() 
    {
        print 'nilsz';exit;
    }
}