|
|
|
@ -1,4 +1,5 @@ |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
|
|
use ChamiloSession as Session; |
|
|
|
use ChamiloSession as Session; |
|
|
|
@ -7,13 +8,15 @@ use ChamiloSession as Session; |
|
|
|
* @author Patrick Cool patrick.cool@UGent.be Ghent University Mai 2004 |
|
|
|
* @author Patrick Cool patrick.cool@UGent.be Ghent University Mai 2004 |
|
|
|
* @author Julio Montoya Lots of improvements, cleaning, adding security |
|
|
|
* @author Julio Montoya Lots of improvements, cleaning, adding security |
|
|
|
* @author Juan Carlos Raña Trabado herodoto@telefonica.net January 2008 |
|
|
|
* @author Juan Carlos Raña Trabado herodoto@telefonica.net January 2008 |
|
|
|
* |
|
|
|
|
|
|
|
* @package chamilo.document |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
|
|
|
|
|
|
|
|
api_protect_course_script(); |
|
|
|
api_protect_course_script(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_get_configuration_value('disable_slideshow_documents')) { |
|
|
|
|
|
|
|
api_not_allowed(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$curdirpath = $path = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null; |
|
|
|
$curdirpath = $path = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null; |
|
|
|
$courseInfo = api_get_course_info(); |
|
|
|
$courseInfo = api_get_course_info(); |
|
|
|
$pathurl = urlencode($path); |
|
|
|
$pathurl = urlencode($path); |
|
|
|
@ -342,9 +345,9 @@ if ($slide_id == 'all') { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$doc_url = ($path && $path !== '/') ? $path.'/'.$one_image_file : $path.$one_image_file; |
|
|
|
$doc_url = ($path && $path !== '/') ? $path.'/'.$one_image_file : $path.$one_image_file; |
|
|
|
$image_tag[] = '<img |
|
|
|
$image_tag[] = '<img |
|
|
|
src="download.php?doc_url='.$doc_url.'" |
|
|
|
src="download.php?doc_url='.$doc_url.'" |
|
|
|
border="0" |
|
|
|
border="0" |
|
|
|
width="'.$image_width.'" height="'.$image_height.'" title="'.$one_image_file.'">'; |
|
|
|
width="'.$image_width.'" height="'.$image_height.'" title="'.$one_image_file.'">'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -404,8 +407,8 @@ if ($slide_id != 'all' && !empty($image_files_only)) { |
|
|
|
$pathpart = $path.'/'; |
|
|
|
$pathpart = $path.'/'; |
|
|
|
} |
|
|
|
} |
|
|
|
$sql = "SELECT * FROM $tbl_documents |
|
|
|
$sql = "SELECT * FROM $tbl_documents |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
c_id = $course_id AND |
|
|
|
c_id = $course_id AND |
|
|
|
path = '".Database::escape_string($pathpart.$image_files_only[$slide])."'"; |
|
|
|
path = '".Database::escape_string($pathpart.$image_files_only[$slide])."'"; |
|
|
|
$result = Database::query($sql); |
|
|
|
$result = Database::query($sql); |
|
|
|
$row = Database::fetch_array($result); |
|
|
|
$row = Database::fetch_array($result); |
|
|
|
@ -472,9 +475,9 @@ if ($slide_id != 'all' && !empty($image_files_only)) { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo "<img |
|
|
|
echo "<img |
|
|
|
class=\"img-responsive\" |
|
|
|
class=\"img-responsive\" |
|
|
|
src='download.php?doc_url=$path/".$image_files_only[$slide]."' alt='".$image_files_only[$slide]."' |
|
|
|
src='download.php?doc_url=$path/".$image_files_only[$slide]."' alt='".$image_files_only[$slide]."' |
|
|
|
border='0'".$height_width_tags.'>'; |
|
|
|
border='0'".$height_width_tags.'>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|