".COURSE_RELATION_TYPE_RRHH." AND course_code='$_cid' AND (t1.user_id='".$_user['user_id']."' OR t2.status='1')"; $result=Database::query($query); while($row=Database::fetch_array($result)) { if($row['user_id'] == $_user['user_id']) { $pseudoUser=$row['username']; } if($row['status'] == 1) { $picture_uri=$row['picture_uri']; } } $isAllowed=(empty($pseudoUser) || !$_cid)?false:true; $isMaster=$is_courseAdmin?true:false; if(!$isAllowed) { exit(); } $pictureURL=api_get_path(WEB_CODE_PATH).'upload/users/'; $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; $onlinePath=$documentPath.'online_files/'; if(!is_dir($onlinePath)) { if(is_file($onlinePath)) { @unlink($onlinePath); } @mkdir($onlinePath, api_get_permissions_for_new_directories()); } if($isMaster && $init) { $fp=fopen($onlinePath.'htmlarea.html','w'); fputs($fp,get_lang('TextEditorDefault')); fclose($fp); if(!file_exists($onlinePath.'streaming.txt')) { $fp=fopen($onlinePath.'streaming.txt','w'); fputs($fp,"http://www.dokeos.com/pub/01_discovery_high.mov\nmov"); fclose($fp); } } if(!$isMaster) { if(!list($stream_url,$stream_type)=@file($onlinePath.'streaming.txt')) { $stream_url=''; $stream_type='mp3'; } else { $stream_url=rtrim($stream_url); $stream_type=rtrim($stream_type); } $query="SELECT id,name,url FROM $tbl_online_link ORDER BY name"; $result=Database::query($query); $Links=Database::store_result($result); } include('header_frame.inc.php'); ?>
   

>