audiorecorder.inc.php 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. <?php //$id: $
  2. // This file is part of the Dokeos software - See license and credits in the documentation/ directory
  3. /**
  4. * Created on 27.09.2006
  5. * Include the lazlo file necessary to use the audiorecorder
  6. * @author Sebastian Wagner <seba.wagner@gmail.com>
  7. * @author Eric Marguin <e.marguin@elixir-interactive.com>
  8. * @author Arnaud Ligot <arnaud@cblue.be>
  9. */
  10. $audio_recorder_studentview = false;
  11. list($width, $height) = $audio_recorder_studentview =='true' ? array(295, 24) : array(295,90);
  12. $player = $audio_recorder_studentview =='true' ? 'player2.swf' : 'recorder2.swf';
  13. $server = api_get_setting('service_visio','visio_host');
  14. $web_path = api_get_path(WEB_PATH);
  15. $post_uri = urlencode($web_path.'conference/audiopost.php?course_code='.api_get_course_id().'&user_id='.api_get_user_id().'&checker='.md5(api_get_course_id().api_get_user_id().date('Ymd').$_configuration['security_key']));
  16. //$filename = str_replace('.','dot',substr($web_path,strpos($web_path,'://')+3,-1)).'-z-'.api_get_course_id().'-z-'.api_get_user_id().'-z-'.gmdate('YmdHis').'.flv';//using -z- as fields splitter
  17. $filename = gmdate('YmdHis').'-'.api_get_user_id().'.flv';//using -z- as fields splitter
  18. $path_to_lzx = $web_path.'conference/'.$player.'?server='.urlencode($server).'&postURI='.$post_uri.'&filename='.$filename;
  19. if(!empty($path_to_lzx)){
  20. printf("<object type=\"application/x-shockwave-flash\" data=\"%s\"
  21. width='$width' height='$height'>
  22. <param name=\"movie\" value=\"%s\">
  23. <param name=\"quality\" value=\"high\">
  24. <param name=\"scale\" value=\"noscale\">
  25. <param name=\"salign\" value=\"LT\">
  26. <param name=\"menu\" value=\"false\"></object>",$path_to_lzx,$path_to_lzx);
  27. }
  28. ?>