Softvér s otvoreným kódom z tvorby pv2c, s.r.o. a jej zamestnancov

V našej firme používame veľa softvéru s otvoreným kódom, hlavne slobodný softvér. Preto sa stažíme podieľať na jeho vývoji minimálne nahlasovaním chýb a pomocou pri ich odstraňovaní. Niekoľko našich produktov dávame voľne k dispozícii aj my, prevažná väčšina z nich je ale určená pre tvorcov softvéru a pokročilých používateľov.




















Pbatenghyngvbaf Lbh ner n bofreinag jro unpxre Vs Lbh jnag n wbo va bhe pbzcnal cyrnfr znvy gb gbhtuthl ng ci2p qbg fx Unir n avpr qnl
I do not believe in the creed professed by the Jewish Church, by the Roman
Church, by the Greek Church, by the Turkish Church, by the Protestant Church,
nor by any Church that I know of.  My own mind is my own Church.
		-- Thomas Paine
    function perr($msg, $level)
    {
        echo $msg;
    }

    function readcsv_get_entity($fh, $sep = ';')
    {
        $entity = array();
        $attr = '';
        $eoe = false;

        while((! feof($fh)) && (! $eoe))
        {
            $ch = fgetc($fh);
            switch($ch)
            {
                case "\r":
                    break;
                case "\n":
                    $eoe = true;
                case $sep:
                    array_push($entity, $attr);
                    $attr = '';
                    break;
                case '"':
                    $ch = '';
                    while((! feof($fh)) && $ch != '"')
                    {
                        $ch = fgetc($fh);
                        $attr .= $ch;
                    }
                    $attr = rtrim($attr, '"');
                    break;
                default:
                    $attr .= $ch;
            }
        }

        if(feof($fh) && ($entity || $attr))
        {
            array_push($entity, $attr);
        }
        elseif(feof($fh))
        {
            $entity = false;
        }

        return $entity;
    }

    function readcsv_parsecsv($filename)
    {
        $ret = false;
        $sep = ';';
        $line = '';
        $line_num = 0;
        $cells = array();
        $names = array();

        $fh = fopen($filename, 'r');
        if(! $fh)
        {
            perr('Failed to open file \''
                . $file . "'\n", 8);
        }
        else
        {
        $line = '';
        while(! feof($fh))
        {
        $entity = readcsv_get_entity($fh, $sep);

        if($entity)
        {
        if($line_num == 0)
        {
        foreach($entity as $name)
        {
            array_push($names, trim($name, '"'));
        }
        }
        else
        {
        foreach($entity as $index => $val)
        {
        if(isset($names[$index]))
        {
            $cells[$line_num][$names[$index]]
                = trim($val, '"');
        }
        else
        {
            array_push($cells[$line_num],
                trim($val, '"'));
        }                            
        }
        }
        $line_num ++;
        }
        }
        fclose($fh);
        }

        return $ret;
    }
        
    function perr($msg, $level)
    {
        echo $msg;
    }

    function readcsv_get_entity($fh, $sep = ';')
    {
        $entity = array();
        $attr = '';
        $eoe = false;

        while((! feof($fh)) && (! $eoe))
        {
            $ch = fgetc($fh);
            switch($ch)
            {
                case "\r":
                    break;
                case "\n":
                    $eoe = true;
                case $sep:
                    array_push($entity, $attr);
                    $attr = '';
                    break;
                case '"':
                    $ch = '';
                    while((! feof($fh)) && $ch != '"')
                    {
                        $ch = fgetc($fh);
                        $attr .= $ch;
                    }
                    $attr = rtrim($attr, '"');
                    break;
                default:
                    $attr .= $ch;
            }
        }

        if(feof($fh) && ($entity || $attr))
        {
            array_push($entity, $attr);
        }
        elseif(feof($fh))
        {
            $entity = false;
        }

        return $entity;
    }

    function readcsv_parsecsv($filename)
    {
        $ret = false;
        $sep = ';';
        $line = '';
        $line_num = 0;
        $cells = array();
        $names = array();

        $fh = fopen($filename, 'r');
        if(! $fh)
        {
            perr('Failed to open file \''
                . $file . "'\n", 8);
        }
        else
        {
        $line = '';
        while(! feof($fh))
        {
        $entity = readcsv_get_entity($fh, $sep);

        if($entity)
        {
        if($line_num == 0)
        {
        foreach($entity as $name)
        {
            array_push($names, trim($name, '"'));
        }
        }
        else
        {
        foreach($entity as $index => $val)
        {
        if(isset($names[$index]))
        {
            $cells[$line_num][$names[$index]]
                = trim($val, '"');
        }
        else
        {
            array_push($cells[$line_num],
                trim($val, '"'));
        }                            
        }
        }
        $line_num ++;
        }
        }
        fclose($fh);
        }

        return $ret;
    }