+ case 4:
+ // from 1 to 9 into the innerHTML and than close
+ for ($i = 1 ; $i < 10 ; $i++) {
+ if ($i != 5) {
+ $chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%d';", $i));
+ }
+ else {
+ $chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%d';|sleep(gst,3000);", $i));
+ }
+ print($chunk);
+ mop_flush();
+ sleep(1);
+ }
+ break;
+ case 5:
+ // from 1 to 9 into the innerHTML and than close
+ $cont = array('@BEGIN@', '@END@', '@BEGIN@ sleep(1); @END@');
+ for ($i = 1 ; $i < 10 ; $i++) {
+ switch($i) {
+ case 6:
+ case 7:
+ case 8:
+ $chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%s';", xcape($cont[$i - 6])));
+ break;
+ default:
+ $chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%d';", $i));
+ break;
+ }
+ print($chunk);
+ mop_flush();
+ if ($i < 9)
+ sleep(1);
+ }
+ break;
+ case 6:
+ // from 1 to 9 into the innerHTML and than close
+ if ($step == 8) {
+ $chunk = $transp->chunk(1, sprintf("gst.st++; \$('container').innerHTML = gst.st;"));
+ print($chunk);
+ // without this usleep the delay is doubled in iframe stream because
+ // no transp.xynt_streaming back-set is performed
+ usleep(250000);
+ mop_flush();
+ }
+ else {
+ for ($i = 1 ; $i < 10 ; $i++) {
+ $chunk = $transp->chunk($i, sprintf("gst.st++; \$('container').innerHTML = gst.st;"));
+ print($chunk);
+ mop_flush();
+ if ($i < 9)
+ sleep(1);
+ }
+ }
+ break;