1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- define('FRAME','htmlarea');
- $language_file='chat';
- include('../inc/global.inc.php');
- $this_section=SECTION_COURSES;
- $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
- $query="SELECT username FROM $tbl_user WHERE user_id='".$_user['user_id']."'";
- $result=api_sql_query($query,__FILE__,__LINE__);
- list($pseudoUser)=mysql_fetch_row($result);
- $isAllowed=(empty($pseudoUser) || !$_cid)?false:true;
- $isMaster=$is_courseAdmin?true:false;
- if(!$isAllowed)
- {
- exit();
- }
- $htmlareaURL=api_get_path(WEB_CODE_PATH).'plugin/htmlarea/';
- $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
- $onlinePath=$documentPath.'online_files/';
- if(!$htmlarea=@file($onlinePath.'htmlarea.html'))
- {
- $htmlarea=array();
- }
- $htmlarea=implode('',$htmlarea);
- include('header_frame.inc.php');
- if($isMaster)
- {
- ?>
- <form name="formHTMLarea" method="post" action="online_hidden2.php" target="online_hidden2" style="width: 100%; height: 100%;">
- <?php
- api_disp_html_area('editor',$htmlarea,'100%');
- ?>
- </form>
- <?php
- }
- else
- {
- echo $htmlarea;
- }
- include('footer_frame.inc.php');
- ?>
|