[svn r20257] Minor fixed problem in windows

skala
Arthur Portugal 16 years ago
parent 7cc7eb181b
commit a912490305
  1. 90
      main/dropbox/index.php

@ -101,11 +101,11 @@ Version 1.4 (Yannick Warnier)
// the file that contains all the initialisation stuff (and includes all the configuration stuff)
require_once( "dropbox_init.inc.php");
// get the last time the user accessed the tool
if ($_SESSION['last_access'][$_course['id']][TOOL_DROPBOX]=='') {
if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX]=='') {
$last_access=get_last_tool_access(TOOL_DROPBOX,$_course['code'],$_user['user_id']);
$_SESSION['last_access'][$_course['id']][TOOL_DROPBOX]=$last_access;
$_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX]=$last_access;
} else {
$last_access=$_SESSION['last_access'][$_course['id']][TOOL_DROPBOX];
$last_access=$_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX];
}
// do the tracking
@ -250,9 +250,9 @@ if (!$_GET['view'] OR $_GET['view']=='received' OR $dropbox_cnf['sent_received_t
echo '<img src="../img/folder_up.gif" alt="'.get_lang('Up').'" align="absmiddle" /><a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&amp;view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&amp;view='.Security::remove_XSS($_GET['view']).'">'.get_lang('Root')."</a>\n";
$movelist[0] = 'Root'; // move_received selectbox content
} else {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory"><img src="../img/folder_new.gif" align=\"absmiddle\"/> '.get_lang('AddNewCategory').'</a>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory"><img src="../img/folder_new.gif" align=\"absmiddle\"/> '.get_lang('AddNewCategory').'</a>';
}
echo '</div>';
}
if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
@ -327,13 +327,13 @@ if (!$_GET['view'] OR $_GET['view']=='received' OR $dropbox_cnf['sent_received_t
$column_header[] = array(get_lang('Type'),true,'style="width:40px"');
$column_header[] = array(get_lang('ReceivedTitle'), TRUE, '');
$column_header[] = array(get_lang('Size'), TRUE, '');
$column_header[] = array(get_lang('Authors'), TRUE, '');
$column_header[] = array(get_lang('Authors'), TRUE, '');
$column_header[] = array(get_lang('LastResent'), true);
$column_header[] = array(get_lang('Modify'), FALSE, '', 'nowrap style="text-align: right"');
$column_header[] = array('RealDate', true);
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
$column_show[]=1;
$column_show[]=1;
$column_show[]=1;
@ -342,47 +342,47 @@ if (!$_GET['view'] OR $_GET['view']=='received' OR $dropbox_cnf['sent_received_t
$column_show[]=1;
$column_show[]=1;
$column_show[]=0;
// Here we change the way how the colums are going to be sort
// in this case the the column of LastResent ( 4th element in $column_header) we will be order like the column RealDate
// in this case the the column of LastResent ( 4th element in $column_header) we will be order like the column RealDate
// because in the column RealDate we have the days in a correct format "2008-03-12 10:35:48"
$column_order[]=1;
$column_order[]=2;
$column_order[]=3;
$column_order[]=4;
$column_order[]=7;
$column_order[]=7;
$column_order[]=6;
$column_order[]=7;
$column_order[]=8;
// the content of the sortable table = the received files
foreach ( $dropbox_person -> receivedWork as $dropbox_file) {
$dropbox_file_data=array();
if ($view_dropbox_category_received==$dropbox_file->category) {// we only display the files that are in the category that we are in.
$dropbox_file_data[]=$dropbox_file->id;
if (!is_array($_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) {
if (!is_array($_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) {
$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX] = array();
}
// new icon
$new_icon='';
if ($dropbox_file->last_upload_date > $last_access AND !in_array($dropbox_file->id,$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX])) {
$new_icon='&nbsp;<img src="../img/new.gif" align="absmiddle" alt="'.get_lang('New').'" />';
}
$dropbox_file_data[]=build_document_icon_tag('file',$dropbox_file->title);
$dropbox_file_data[]='<a href="dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&amp;action=download"><img src="../img/filesave.gif" style="float:right;" alt="'.get_lang('Download').'" title="'.get_lang('Download').'"/></a><a href="dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'.$dropbox_file->title.'</a>'.$new_icon.'<br>'.$dropbox_file->description;
$dropbox_file_data[]=ceil(($dropbox_file->filesize)/1024).' '.get_lang('kB');
$dropbox_file_data[]=$dropbox_file->author;
//$dropbox_file_data[]=$dropbox_file->description;
$dropbox_file_data[]=date_to_str_ago($dropbox_file->last_upload_date).'<br><span class="dropbox_date">'.$dropbox_file->last_upload_date.'</span>';
$action_icons=check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&amp;view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&amp;view='.Security::remove_XSS($_GET['view']).'&amp;action=viewfeedback&amp;id='.$dropbox_file->id.'"><img src="../img/comment_bubble.gif" alt="'.get_lang('Comment').'" title="'.get_lang('Comment').'" align="absmiddle" /></a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&amp;view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&amp;view='.Security::remove_XSS($_GET['view']).'&amp;action=movereceived&amp;move_id='.$dropbox_file->id.'"><img src="../img/deplacer_fichier.gif" alt="'.get_lang('Move').'" title="'.get_lang('Move').'" align="absmiddle"/></a>
@ -390,21 +390,21 @@ if (!$_GET['view'] OR $_GET['view']=='received' OR $dropbox_cnf['sent_received_t
//$action_icons=' <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&amp;view_sent_category='.$_GET['view_sent_category'].'&amp;action=movereceived&amp;move_id='.$dropbox_file->id.'"><img src="../img/deplacer.gif" alt="'.get_lang('Move').'"/></a>
// <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&amp;view_sent_category='.$_GET['view_sent_category'].'&amp;action=deletereceivedfile&amp;id='.$dropbox_file->id.'" onclick="return confirmation(\''.$dropbox_file->title.'\');"><img src="../img/delete.gif" alt="'.get_lang('Delete').'"/></a>';
// this is a hack to have an additional row in a sortable table
if ($_GET['action']=='viewfeedback' AND isset($_GET['id']) and is_numeric($_GET['id']) AND $dropbox_file->id==$_GET['id']) {
$action_icons.="</td></tr>\n"; // ending the normal row of the sortable table
$action_icons.='<tr><td colspan="2"><a href="index.php?"'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category'])."&amp;view_sent_category=".Security::remove_XSS($_GET['view_sent_category'])."&amp;view=".Security::remove_XSS($_GET['view'])."\">".get_lang('CloseFeedback')."</a></td><td colspan=\"7\">".feedback($dropbox_file->feedback2)."</td>\n</tr>\n";
}
$dropbox_file_data[]=$action_icons;
$action_icons='';
$dropbox_file_data[]=$dropbox_file->last_upload_date;//date
$dropbox_data_recieved[]=$dropbox_file_data;
$dropbox_data_recieved[]=$dropbox_file_data;
}
}
// the content of the sortable table = the categories (if we are not in the root)
if ($view_dropbox_category_received==0) {
@ -466,20 +466,20 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
// the headers of the sortable tables
$column_header=array();
$column_header[] = array('',false,'');
$column_header[] = array(get_lang('Type'),true,'style="width:40px"','style="text-align:center"');
$column_header[] = array(get_lang('SentTitle'), TRUE, '');
$column_header[] = array(get_lang('Size'), TRUE, '');
$column_header[] = array(get_lang('SentTo'), TRUE, '');
$column_header[] = array(get_lang('SentTo'), TRUE, '');
$column_header[] = array(get_lang('LastResent'), TRUE, '');
$column_header[] = array(get_lang('Modify'), FALSE, '', 'nowrap style="text-align: right"');
$column_header[] = array('RealDate', FALSE);
$column_show=array();
$column_order=array();
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
$column_show[]=1;
$column_show[]=1;
$column_show[]=1;
@ -488,20 +488,20 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
$column_show[]=1;
$column_show[]=1;
$column_show[]=0;
// Here we change the way how the colums are going to be sort
// in this case the the column of LastResent ( 4th element in $column_header) we will be order like the column RealDate
// in this case the the column of LastResent ( 4th element in $column_header) we will be order like the column RealDate
// because in the column RealDate we have the days in a correct format "2008-03-12 10:35:48"
$column_order[]=1;
$column_order[]=2;
$column_order[]=3;
$column_order[]=4;
$column_order[]=7;
$column_order[]=7;
$column_order[]=6;
$column_order[]=7;
$column_order[]=8;
// the content of the sortable table = the received files
foreach ( $dropbox_person -> sentWork as $dropbox_file) {
$dropbox_file_data=array();
@ -514,10 +514,10 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
foreach ($dropbox_file->recipients as $recipient) {
$receivers_celldata=display_user_link($recipient['user_id'], $recipient['name']).', '.$receivers_celldata;
}
$dropbox_file_data[]=$receivers_celldata;
$dropbox_file_data[]=$receivers_celldata;
$dropbox_file_data[]=date_to_str_ago($dropbox_file->last_upload_date).'<br><span class="dropbox_date">'.$dropbox_file->last_upload_date.'</span>';
//$dropbox_file_data[]=$dropbox_file->author;
//$dropbox_file_data[]=$dropbox_file->author;
$receivers_celldata='';
$action_icons=check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&amp;view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&amp;view='.Security::remove_XSS($_GET['view']).'&amp;action=viewfeedback&amp;id='.$dropbox_file->id.'"><img src="../img/comment_bubble.gif" alt="'.get_lang('Comment').'" title="'.get_lang('Comment').'" align="absmiddle" /></a>
@ -529,8 +529,8 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
$action_icons.="<tr>\n\t<td colspan=\"2\"><a href=\"index.php?".api_get_cidreq()."&view_received_category=".Security::remove_XSS($_GET['view_received_category'])."&amp;view_sent_category=".Security::remove_XSS($_GET['view_sent_category'])."&amp;view=".Security::remove_XSS($_GET['view'])."\">".get_lang('CloseFeedback')."</a></td><td colspan=\"7\">".feedback($dropbox_file->feedback2)."</td>\n</tr>\n";
}
$dropbox_file_data[]=$action_icons;
$dropbox_file_data[]=$dropbox_file->last_upload_date;
$dropbox_file_data[]=$action_icons;
$dropbox_file_data[]=$dropbox_file->last_upload_date;
$action_icons='';
$dropbox_data_sent[]=$dropbox_file_data;
}
@ -544,7 +544,7 @@ if ($_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
$dropbox_category_data[]=$category['cat_id']; // this is where the checkbox icon for the files appear
$dropbox_category_data[]=build_document_icon_tag('folder',$category['cat_name']);
$dropbox_category_data[]='<a href="dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&amp;action=downloadcategory&amp;sent_received=sent"><img width="16" height="16" src="../img/folder_zip.gif" style="float:right;" alt="'.get_lang('Save').'" title="'.get_lang('Save').'"/></a><a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&amp;view_sent_category='.$category['cat_id'].'&amp;view='.Security::remove_XSS($_GET['view']).'">'.$category['cat_name'].'</a>';
//$dropbox_category_data[]='';
//$dropbox_category_data[]='';
$dropbox_category_data[]='';
//$dropbox_category_data[]='';
$dropbox_category_data[]='';

Loading…
Cancel
Save