Exemplo n.º 1
0
function main()
{
    // read simulator output one line at a time
    while ($line = fgets(STDIN)) {
        $line = parsecsv(explode(",", $line));
        if (array_key_exists("TME", $line)) {
            draw($line);
        }
    }
}
Exemplo n.º 2
0
     }
     $handle = fopen($uploadfile, 'r');
     if ($_POST['hdr'] == 1) {
         $data = fgetcsv($handle, 2096);
     }
     if ($_POST['codetype'] == 1) {
         $page_columnFiveLabel = "Code";
     }
     if ($_POST['sectype'] > 0) {
         $page_columnFiveLabel = "Section";
     }
     $page_sampleImport = array();
     for ($i = 0; $i < 5; $i++) {
         $data = fgetcsv($handle, 2096);
         if ($data != FALSE) {
             $arr = parsecsv($data);
             $page_sampleImport[$i]['col1'] = $arr[0];
             $page_sampleImport[$i]['col2'] = $arr[1];
             $page_sampleImport[$i]['col3'] = $arr[2];
             $page_sampleImport[$i]['col4'] = $arr[3];
             if ($_POST['codetype'] == 1) {
                 $page_sampleImport[$i]['col5'] = $arr[4];
             }
             if ($_POST['sectype'] > 0) {
                 $page_sampleImport[$i]['col5'] = $arr[5];
             }
         }
     }
 } else {
     //STEP 1 DATA MANIPULATION
     if ($isadmin) {