skala
Julio Montoya 14 years ago
commit 55715df204
  1. 56
      main/admin/special_exports.php
  2. 2
      main/calendar/agenda.inc.php
  3. 8
      main/document/downloadfolder.inc.php
  4. 4
      main/dropbox/dropbox_submit.php
  5. 114
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js
  6. 1847
      main/inc/lib/swfobject/swfobject_source/swfobject_source.js

@ -72,13 +72,13 @@ if ((isset ($_POST['action']) && $_POST['action'] == 'course_select_form') || (i
$tbl_property = Database::get_course_table(TABLE_ITEM_PROPERTY, $_course['db_name']);
//Add tem to the zip file course
$sql = "SELECT path FROM $tbl_document AS docs, $tbl_property AS props
WHERE `props`.`tool`='".TOOL_DOCUMENT."'
AND `docs`.`id`=`props`.`ref`
AND `docs`.`path` LIKE '".$querypath."/%'
AND `docs`.`filetype`='file'
AND `docs`.`session_id` = '0'
AND `props`.`visibility`<>'2'
AND `props`.`to_group_id`=".$to_group_id."";
WHERE props.tool='".TOOL_DOCUMENT."'
AND docs.id=props.ref
AND docs.path LIKE '".$querypath."/%'
AND docs.filetype='file'
AND docs.session_id = '0'
AND props.visibility<>'2'
AND props.to_group_id=".$to_group_id."";
$query = Database::query($sql );
while ($rows_course_file = Database::fetch_assoc($query)) {
$zip_folder->add($FileZip['PATH_COURSE'].$_course['directory']."/document".$rows_course_file['path'],
@ -90,13 +90,13 @@ if ((isset ($_POST['action']) && $_POST['action'] == 'course_select_form') || (i
$session_id = Security::remove_XSS($IdSession);
//Add tem to the zip file session course
$sql_session_doc = "SELECT path FROM $tbl_document AS docs,$tbl_property AS props
WHERE `props`.`tool`='".TOOL_DOCUMENT."'
AND `docs`.`id`=`props`.`ref`
AND `docs`.`path` LIKE '".$querypath."/%'
AND `docs`.`filetype`='file'
AND `docs`.`session_id` = '$session_id'
AND `props`.`visibility`<>'2'
AND `props`.`to_group_id`=".$to_group_id."";
WHERE props.tool='".TOOL_DOCUMENT."'
AND docs.id=props.ref
AND docs.path LIKE '".$querypath."/%'
AND docs.filetype='file'
AND docs.session_id = '$session_id'
AND props.visibility<>'2'
AND props.to_group_id=".$to_group_id."";
$query_session_doc = Database::query($sql_session_doc);
while ($rows_course_session_file = Database::fetch_assoc($query_session_doc)) {
$zip_folder->add($FileZip['PATH_COURSE'].$_course['directory'].'/document'.$rows_course_session_file['path'],
@ -223,13 +223,13 @@ function fullexportspecial(){
$tbl_property = Database::get_course_table(TABLE_ITEM_PROPERTY, $_course['db_name']);
//Add tem to the zip file course
$sql = "SELECT path FROM $tbl_document AS docs, $tbl_property AS props
WHERE `props`.`tool`='".TOOL_DOCUMENT."'
AND `docs`.`id`=`props`.`ref`
AND `docs`.`path` LIKE '".$querypath."/%'
AND `docs`.`filetype`='file'
AND `docs`.`session_id` = '0'
AND `props`.`visibility`<>'2'
AND `props`.`to_group_id`=".$to_group_id."";
WHERE props.tool='".TOOL_DOCUMENT."'
AND docs.id=props.ref
AND docs.path LIKE '".$querypath."/%'
AND docs.filetype='file'
AND docs.session_id = '0'
AND props.visibility<>'2'
AND props.to_group_id=".$to_group_id."";
$query = Database::query($sql );
while ($rows_course_file = Database::fetch_assoc($query)) {
$rows_course_file['path'];
@ -247,13 +247,13 @@ function fullexportspecial(){
while ($rows_session = Database::fetch_assoc($query_session)) {
$session_id = $rows_session['id'];
$sql_session_doc = "SELECT path FROM $tbl_document AS docs,$tbl_property AS props
WHERE `props`.`tool`='".TOOL_DOCUMENT."'
AND `docs`.`id`=`props`.`ref`
AND `docs`.`path` LIKE '".$querypath."/%'
AND `docs`.`filetype`='file'
AND `docs`.`session_id` = '$session_id'
AND `props`.`visibility`<>'2'
AND `props`.`to_group_id`=".$to_group_id."";
WHERE props.tool='".TOOL_DOCUMENT."'
AND docs.id=props.ref
AND docs.path LIKE '".$querypath."/%'
AND docs.filetype='file'
AND docs.session_id = '$session_id'
AND props.visibility<>'2'
AND props.to_group_id=".$to_group_id."";
$query_session_doc = Database::query($sql_session_doc);
while ($rows_course_session_file = Database::fetch_assoc($query_session_doc)) {
$zip_folder->add($FileZip['PATH_COURSE'].$_course['directory'].'/document'.$rows_course_session_file['path'],

@ -3413,7 +3413,7 @@ function get_day_agendaitems($courses_dbs, $month, $year, $day) {
WHERE agenda.id = item_property.ref
AND DAYOFMONTH(start_date)='".$day."' AND MONTH(start_date)='".$month."' AND YEAR(start_date)='".$year."'
AND item_property.tool='".TOOL_CALENDAR_EVENT."'
AND ( item_property.to_user_id='".$_user['user_id']."' OR `item_property`.`to_group_id` IN (0, ".implode(", ", $group_memberships).") )
AND ( item_property.to_user_id='".$_user['user_id']."' OR item_property.to_group_id IN (0, ".implode(", ", $group_memberships).") )
AND item_property.visibility='1'
ORDER BY start_date ";
} else {

@ -79,7 +79,7 @@ if (is_allowed_to_edit()) {
$querypath = $path;
}
// Search for all files that are not deleted => visibility != 2
$query = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE `props`.`tool`='".TOOL_DOCUMENT."' AND `docs`.`id`=`props`.`ref` AND `docs`.`path` LIKE '".$querypath."/%' AND `docs`.`filetype`='file' AND `props`.`visibility`<>'2' AND `props`.`to_group_id`=".$to_group_id."");
$query = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE props.tool='".TOOL_DOCUMENT."' AND docs.id=props.ref AND docs.path LIKE '".$querypath."/%' AND docs.filetype='file' AND props.visibility<>'2' AND props.to_group_id=".$to_group_id."");
// Add tem to the zip file
while ($not_deleted_file = Database::fetch_assoc($query)) {
$zip_folder->add($sys_course_path.$_course['path'].'/document'.$not_deleted_file['path'], PCLZIP_OPT_REMOVE_PATH, $sys_course_path.$_course['path'].'/document'.$remove_dir);
@ -95,7 +95,7 @@ else {
// A big problem: Visible files that are in a hidden folder are included when we do a query for visiblity='v'
// So... I do it in a couple of steps:
// 1st: Get all files that are visible in the given path
$query = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE `props`.`tool`='".TOOL_DOCUMENT."' AND `docs`.`id`=`props`.`ref` AND `docs`.`path` LIKE '".$querypath."/%' AND `props`.`visibility`='1' AND `docs`.`filetype`='file' AND `props`.`to_group_id`=".$to_group_id);
$query = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE props.tool='".TOOL_DOCUMENT."' AND docs.id=props.ref AND docs.path LIKE '".$querypath."/%' AND props.visibility='1' AND docs.filetype='file' AND props.to_group_id=".$to_group_id);
// Add them to an array
while ($all_visible_files = Database::fetch_assoc($query)) {
$all_visible_files_path[] = $all_visible_files['path'];
@ -105,14 +105,14 @@ else {
//print_r($all_visible_files_path);
//echo('</pre>');
// 2nd: Get all folders that are invisible in the given path
$query2 = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE `props`.`tool`='".TOOL_DOCUMENT."' AND `docs`.`id`=`props`.`ref` AND `docs`.`path` LIKE '".$querypath."/%' AND `props`.`visibility`<>'1' AND `docs`.`filetype`='folder'");
$query2 = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE props.tool='".TOOL_DOCUMENT."' AND docs.id=props.ref AND docs.path LIKE '".$querypath."/%' AND props.visibility<>'1' AND docs.filetype='folder'");
// If we get invisible folders, we have to filter out these results from all visible files we found
if (Database::num_rows($query2) > 0) {
// Add tem to an array
while ($invisible_folders = Database::fetch_assoc($query2)) {
//3rd: Get all files that are in the found invisible folder (these are "invisible" too)
//echo "<br /><br />invisible folders: ".$sys_course_path.$_course['path'].'/document'.$invisible_folders['path'].'<br />';
$query3 = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE `props`.`tool`='".TOOL_DOCUMENT."' AND `docs`.`id`=`props`.`ref` AND `docs`.`path` LIKE '".$invisible_folders['path']."/%' AND `docs`.`filetype`='file' AND `props`.`visibility`='1'");
$query3 = Database::query("SELECT path FROM $doc_table AS docs,$prop_table AS props WHERE props.tool='".TOOL_DOCUMENT."' AND docs.id=props.ref AND docs.path LIKE '".$invisible_folders['path']."/%' AND docs.filetype='file' AND props.visibility='1'");
// Add tem to an array
while ($files_in_invisible_folder = Database::fetch_assoc($query3)) {
$files_in_invisible_folder_path[] = $files_in_invisible_folder['path'];

@ -246,7 +246,7 @@ if (isset($_GET['mailingIndex'])) { // examine or send
$var = api_strtoupper($nameParts[2]); // the variable part of the name
$course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$sel = "SELECT u.user_id, u.lastname, u.firstname, cu.status
FROM `".$_configuration['main_database']."`.`user` u
FROM ".$_configuration['main_database'].".user u
LEFT JOIN $course_user cu
ON cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND cu.course_code = '".$_course['sysCode']."'";
$sel .= " WHERE u.".dropbox_cnf("mailingWhere".$var)." = '";
@ -361,7 +361,7 @@ if (isset($_GET['mailingIndex'])) { // examine or send
$course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$sql = "SELECT u.lastname, u.firstname
FROM $course_user cu
LEFT JOIN `".$_configuration['main_database']."`.`user` u
LEFT JOIN ".$_configuration['main_database'].".user u
ON cu.user_id = u.user_id AND cu.course_code = '".$_course['sysCode']."'
WHERE cu.status = 5
AND u.user_id NOT IN ('" . implode("', '" , $students) . "')";

@ -1,4 +1,4 @@
// Reworks and improvements by Ivan Tcholakov, JUL-2009.
// Reworks and improvements by Ivan Tcholakov, JUL-2009, FEB-2011.
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
@ -19,7 +19,7 @@ FCKLang['SecurityError'] = FCKLang['SecurityError'] ? FCKLang['SecurityError'] :
FCKLang['ConnectorDisabled'] = FCKLang['ConnectorDisabled'] ? FCKLang['ConnectorDisabled'] : 'The upload feature (connector) is disabled.' ;
FCKLang['UploadError'] = FCKLang['UploadError'] ? FCKLang['UploadError'] : 'Error on file upload. Error number: ' ;
//#### Dialog Tabs
// Dialog Tabs
// Set the dialog tabs.
dialog.AddTab( 'Info', FCKLang.DlgInfoTab ) ;
@ -216,7 +216,7 @@ function LoadSelection()
UpdatePreview() ;
}
//#### The OK button was hit.
// The OK button was hit.
function Ok()
{
var rbFileTypeVal = "single" ;
@ -416,7 +416,9 @@ var Media = function ( o )
this.playlistThumbs = '' ;
if ( o )
{
this.setObjectElement( o ) ;
}
} ;
Media.prototype.setObjectElement = function ( e )
@ -428,11 +430,11 @@ Media.prototype.setObjectElement = function ( e )
Media.prototype.setAttribute = function( attr, val )
{
if ( val == "true" )
if ( val == 'true' )
{
this[attr] = true ;
}
else if (val == "false" )
else if (val == 'false' )
{
this[attr] = false ;
}
@ -448,63 +450,32 @@ Media.prototype.getInnerHTML = function ( objectId )
var thisWidth = this.width ;
var thisHeight = this.height ;
var thisMediaType = "single" ;
var thisMediaType = 'single' ;
if ( !GetE( 'rbFileType' ).checked )
{
thisMediaType = "mpl" ;
thisMediaType = 'mpl' ;
}
// Align
// Alignment
var cssalign = '' ;
var cssfloat = '' ;
if ( this.align == "center" )
if ( this.align == 'center' )
{
cssalign = 'margin-left: auto;margin-right: auto;' ;
}
else if ( this.align == "right" )
else if ( this.align == 'right' )
{
cssfloat = 'float: right;' ;
}
else if ( this.align == "left" )
else if ( this.align == 'left' )
{
cssfloat = 'float: left;' ;
}
var s = "" ;
/*
// Replacing the creation of the SWFObject to the use of the object tag in order to avoid HTMLPurifier conflicts see CT#1297
s+= '<div id="player' + randomnumber + '-parent" style="text-align: center;' + cssfloat + '">\n';
s+= '<div style="border-style: none; height: ' + thisHeight + 'px; width:' + thisWidth + 'px; overflow: hidden; background-color: rgb(220, 220, 220); background-image: url(' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/flvPlayer.gif); background-repeat:no-repeat; background-position:center;' + cssalign + '">';
s+= '<script src="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/swfobject.js" type="text/javascript"></script>\n';
s+= '<script type="text/javascript">swfobject.registerObject("player' + randomnumber + '","9.0.98","' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/expressInstall.swf");</script>';
//s+= '<object id="player' + randomnumber + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player' + randomnumber + '" width="328" height="200">';
//s+= '<param name="movie" value="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf" />';
//s+= '<param name="allowfullscreen" value="true" />';
//s+= '<param name="allowscriptaccess" value="always" />';
//s+= '<param name="height" value="' + thisHeight + '" />';
//s+= '<param name="width" value="' + thisWidth + '" />';
//s+= '<param name="flashvars" value="file=' + this.url + '"/>';
//s+= '<param name="flashvars" value="file=' + this.url + '&image=' + this.iurl + '" />';
s+= '<object type="application/x-shockwave-flash" data="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf" width="328" height="200">';
s+= '<param name="movie" value="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf" />';
s+= '<param name="allowfullscreen" value="true" />';
s+= '<param name="allowscriptaccess" value="always" />';
s+= '<param name="height" value="' + thisHeight + '" />';
s+= '<param name="width" value="' + thisWidth + '" />';
//s+= '<param name="flashvars" value="file=' + this.url + '&image=' + this.iurl + '" />';
s+= '<param name="flashvars" value="file=' + this.url + '" />';
s+= '<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>';
s+= '</object>';
*/
var s = '' ;
s += '\n' ;
s += '<div id="player' + randomnumber + '-parent" style="text-align: center;">\n'; //'<div id="player' + randomnumber + '-parent" style="text-align: center;' + cssfloat + '">\n';
s += '<div id="player' + randomnumber + '-parent" style="text-align: center;' + cssfloat + '">\n';
s += '<div style="border-style: none; height: ' + thisHeight + 'px; width: ' + thisWidth + 'px; overflow: hidden; background-color: rgb(220, 220, 220); ' + cssalign + '">' ;
s += '<script src="' + FCKConfig.ScriptSWFObject + '" type="text/javascript"></script>\n' ;
@ -519,13 +490,14 @@ Media.prototype.getInnerHTML = function ( objectId )
if ( !i || !this[i] ) continue ;
if ( !i.match( /(set|get)/ ) )
{
s += i + "=" + this[i] + " " ;
s += i + '=' + this[i] + ' ' ;
}
}
s += '</div>' ;
s += '</div>' ;
s += '<script type="text/javascript">\n' ;
//s += ' //NOTE: FOR LIST OF POSSIBLE SETTINGS GOTO http://www.jeroenwijering.com/extras/readme.html\n' ;
// NOTE: FOR LIST OF POSSIBLE SETTINGS GOTO http://www.jeroenwijering.com/extras/readme.html\n' ;
s += ' var s1 = new SWFObject("' + FCKConfig.FlashPlayerVideo + '","' + thisMediaType + '","' + thisWidth + '","' + thisHeight + '","7");\n' ;
@ -543,9 +515,9 @@ Media.prototype.getInnerHTML = function ( objectId )
var dispHeight = thisHeight ;
var dispThumbs = false ;
if ( this.dispPlaylist != "none" )
if ( this.dispPlaylist != 'none' )
{
if ( this.dispPlaylist == "right" )
if ( this.dispPlaylist == 'right' )
{
if ( this.playlistDim.length > 0 )
{
@ -580,7 +552,7 @@ Media.prototype.getInnerHTML = function ( objectId )
s += ' s1.addVariable("displaywidth","' + dispWidth + '");\n' ;
}
else if ( this.dispPlaylist == "below" )
else if ( this.dispPlaylist == 'below' )
{
dispThumbs = true ;
@ -607,7 +579,7 @@ Media.prototype.getInnerHTML = function ( objectId )
s += ' s1.addVariable("displayheight","' + dispHeight + '");\n' ;
}
if ( this.playlistThumbs == "false" )
if ( this.playlistThumbs == 'false' )
{
dispThumbs = false ;
}
@ -643,28 +615,28 @@ Media.prototype.getInnerHTML = function ( objectId )
var colorChoice1 = this.toolcolor ;
if ( colorChoice1.length > 0 )
{
colorChoice1 = colorChoice1.replace( "#", "0x" ) ;
colorChoice1 = colorChoice1.replace( '#', '0x' ) ;
s += ' s1.addVariable("backcolor","' + colorChoice1 + '");\n' ;
}
// SET THE COLOR OF THE TOOLBARS TEXT AND BUTTONS
var colorChoice2 = this.tooltcolor ;
if ( colorChoice2.length > 0 )
{
colorChoice2 = colorChoice2.replace( "#", "0x" ) ;
colorChoice2 = colorChoice2.replace( '#', '0x' ) ;
s += ' s1.addVariable("frontcolor","' + colorChoice2 + '");\n' ;
}
//SET COLOR OF ROLLOVER TEXT AND BUTTONS
// SET COLOR OF ROLLOVER TEXT AND BUTTONS
var colorChoice3 = this.tooltrcolor ;
if ( colorChoice3.length > 0 )
{
colorChoice3 = colorChoice3.replace( "#", "0x" ) ;
colorChoice3 = colorChoice3.replace( '#', '0x' ) ;
s += ' s1.addVariable("lightcolor","' + colorChoice3 + '");\n' ;
}
//SET COLOR OF BACKGROUND
// SET COLOR OF BACKGROUND
var colorChoice4 = this.bgcolor ;
if ( colorChoice4.length > 0 )
{
colorChoice4 = colorChoice4.replace( "#", "0x" ) ;
colorChoice4 = colorChoice4.replace( '#', '0x' ) ;
s += ' s1.addVariable("screencolor","' + colorChoice4 + '");\n' ;
}
@ -674,10 +646,6 @@ Media.prototype.getInnerHTML = function ( objectId )
s += ' s1.addVariable("recommendations","' + this.rurl + '");\n' ;
}
//s += ' //s1.addVariable("largecontrols","true");\n' ;
//s += ' //s1.addVariable("bufferlength","3");\n' ;
//s += ' //s1.addVariable("audio","http://www.jeroenwijering.com/extras/readme.html");\n' ;
s += ' s1.write("player' + randomnumber + '");\n' ;
s += '</script>\n' ;
s += '</div>\n' ;
@ -744,7 +712,9 @@ var ePreview ;
function IsValidMedia( oMedia )
{
if ( !oMedia )
{
return false ;
}
var url = oMedia.url ;
var purl = oMedia.purl ;
@ -752,19 +722,29 @@ function IsValidMedia( oMedia )
var height = oMedia.height ;
if ( url.length == 0 && purl.length == 0 )
{
return false ;
}
if ( isNaN( width ) )
{
return false ;
}
if ( parseInt( width, 10 ) <= 0 )
{
return false ;
}
if ( isNaN( height ) )
{
return false ;
}
if ( parseInt( height, 10 ) <= 0 )
{
return false ;
}
return true ;
}
@ -774,16 +754,22 @@ function SetPreviewElement( previewEl )
ePreview = previewEl ;
if ( IsValidMedia( oMedia ) )
{
UpdatePreview() ;
}
}
function UpdatePreview()
{
if ( !ePreview )
{
return ;
}
while ( ePreview.firstChild )
{
ePreview.removeChild( ePreview.firstChild ) ;
}
if ( !oMedia )
{
@ -792,7 +778,9 @@ function UpdatePreview()
}
if ( !IsValidMedia( oMedia ) )
{
ePreview.innerHTML = '&nbsp;' ;
}
else
{
var max_width = 710 ;
@ -835,10 +823,14 @@ function UpdatePreview()
function ClearPreview()
{
if ( !ePreview )
{
return ;
}
while ( ePreview.firstChild )
{
ePreview.removeChild( ePreview.firstChild ) ;
}
ePreview.innerHTML = '&nbsp;' ;
}
@ -903,7 +895,7 @@ function CheckUpload()
return false ;
}
// Show animation
// Show animation.
window.parent.Throbber.Show( 100 ) ;
GetE( 'divUpload' ).style.display = 'none' ;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save