facilitate the preparation of presentations with the document images

skala
Juan Carlos Raña 16 years ago
parent 54f3dade9f
commit 5b7644976f
  1. 23
      main/document/edit_document.php
  2. 105
      main/document/slideshow.php
  3. BIN
      main/img/slide_first.png
  4. BIN
      main/img/slide_last.png
  5. BIN
      main/img/slide_next.png
  6. BIN
      main/img/slide_previous.png

@ -600,6 +600,11 @@ if(isset($msgError))
if( isset($info_message))
{
Display::display_confirmation_message($info_message); //main API
if (isset($_POST['origin']))
{
$slide_id=$_POST['origin_opt'];
nav_to_slideshow($slide_id);
}
}
@ -634,6 +639,8 @@ if ($owner_id == $_user['user_id'] || api_is_platform_admin() || $is_allowed_to_
$form->addElement('hidden','file_path');
$form->addElement('hidden','commentPath');
$form->addElement('hidden','showedit');
$form->addElement('hidden','origin');
$form->addElement('hidden','origin_opt');
if($use_document_title)
{
@ -692,18 +699,34 @@ if ($owner_id == $_user['user_id'] || api_is_platform_admin() || $is_allowed_to_
$defaults['commentPath'] = $file;
$defaults['renameTo'] = $file_name;
$defaults['newComment'] = $oldComment;
$defaults['origin'] = Security::remove_XSS($_GET['origin']);
$defaults['origin_opt'] = Security::remove_XSS($_GET['origin_opt']);
$form->setDefaults($defaults);
// show templates
/*
$form->addElement('html','<div id="frmModel" style="display:block; height:525px; width:240px; position:absolute; top:115px; left:1px;"></div>');
*/
$origin=Security::remove_XSS($_GET['origin']);
if ($origin=='slideshow') {
$slide_id=$_GET['origin_opt'];
nav_to_slideshow($slide_id);
}
$form->display();
//Display::display_error_message(get_lang('ReadOnlyFile')); //main API
}
//for better navigation when a slide is been commented
function nav_to_slideshow($slide_id)
{
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ViewSlideshow')).get_lang('BackTo').' '.get_lang('ViewSlideshow').'</a>';
echo '</div>';
}
/*
==============================================================================
DOKEOS FOOTER

@ -232,15 +232,72 @@ if ($slide_id !== "all") {
$result = Database::query($sql,__FILE__,__LINE__);
$row = Database::fetch_array($result);
echo '<table align="center" border="0" cellspacing="10">';
echo '<tr>';
echo '<td align="center" style="font-size: xx-large; font-weight: bold;">';
echo $row['title'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
echo "<a href='slideshow.php?slide_id=".$next_slide."&curdirpath=$pathurl'><img src='download.php?doc_url=$path/".$image_files_only[$slide]."' alt='".$image_files_only[$slide]."' border='0'".$height_width_tags."></a>";
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td style="border:1px solid; border-color: #CCCCCC">';
echo $row['comment'];
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<table align="center" border="0">';
if (api_is_allowed_to_edit(null,true))
{
echo '<tr>';
echo '<td align="center">';
echo '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$pathurl.'&amp;origin=slideshow&amp;origin_opt='.$slide_id.'&amp;file='.urlencode($path).'/'.$image_files_only[$slide].'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="'.get_lang('Modify').'" /></a><br />';
$aux= explode(".", htmlspecialchars($image_files_only[$slide]));
$ext= $aux[count($aux)-1];
echo $image_files_only[$slide].' <br />';
list($width, $high) = getimagesize($image);
echo $width.' x '.$high.' <br />';
echo round((filesize($image)/1024),2).' KB';
echo ' - '.$ext;
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
if($_SESSION['image_resizing']=="resizing")
{
$resize_info=get_lang('_resizing').'</br>';
$resize_widht=$_SESSION["image_resizing_width"].' x ';
$resize_height=$_SESSION['image_resizing_height'];
}
else
{
$resize_info=get_lang('_no_resizing').'</br>';
}
echo $resize_info;
echo $resize_widht;
echo $resize_height;
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo '<br/>';
// back forward buttons
echo '<table align="center" border="0">';
echo '<tr>';
echo '<td align="center" >';
// first slide
echo '<a href="slideshow.php?slide_id=0&curdirpath='.$pathurl.'"><img src="'.api_get_path(WEB_IMG_PATH).'slide_first.png" title="'.get_lang('FirstSlide').'" alt="'.get_lang('FirstSlide').'">&nbsp;&nbsp;</a>';
// previous slide
if ($slide > 0) {
echo '<a href="slideshow.php?slide_id='.$previous_slide.'&amp;curdirpath='.$pathurl.'">';
}
echo '<img src="'.api_get_path(WEB_IMG_PATH).'silde_back.gif" alt="">';
echo '<img src="'.api_get_path(WEB_IMG_PATH).'slide_previous.png" title="'.get_lang('Previous').'" alt="'.get_lang('Previous').'">';
if ($slide > 0) {
echo "</a> ";
}
@ -251,56 +308,22 @@ if ($slide_id !== "all") {
// next slide
if ($slide < $total_slides -1 and $slide_id <> "all") {
echo "<a href='slideshow.php?slide_id=".$next_slide."&curdirpath=$pathurl'>";
}
echo '<img src="'.api_get_path(WEB_IMG_PATH).'silde_next.gif" alt="">';
echo '<img src="'.api_get_path(WEB_IMG_PATH).'slide_next.png" title="'.get_lang('Next').'" alt="'.get_lang('Next').'">';
if ($slide > 0) {
echo '</a>';
}
// last slide
echo '&nbsp;&nbsp;<a href="slideshow.php?slide_id='.($total_slides-1).'&curdirpath='.$pathurl.'"><img src="'.api_get_path(WEB_IMG_PATH).'slide_last.png" title="'.get_lang('LastSlide').'" alt="'.get_lang('LastSlide').'"></a>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<br/>';
echo '<table align="center" border="0">';
echo '<tr>';
echo '<td align="center">';
echo "<a href='slideshow.php?slide_id=".$next_slide."&curdirpath=$pathurl'><img src='download.php?doc_url=$path/".$image_files_only[$slide]."' alt='".$image_files_only[$slide]."' border='0'".$height_width_tags."></a>";
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
$aux= explode(".", htmlspecialchars($image_files_only[$slide]));
$ext= $aux[count($aux)-1];
echo '<strong>'.basename(htmlspecialchars($image_files_only[$slide]), '.'.$ext).'</strong>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td style="border:1px solid; border-color: #CCCCCC">';
echo $row['comment'];
echo '</td>';
echo '</tr>';
if (api_is_allowed_to_edit(null,true))
{
echo '<tr>';
echo '<td align="center">';
echo '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$pathurl.'&amp;file='.urlencode($path).'/'.$image_files_only[$slide].'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="'.get_lang('Modify').'" /></a><br />';
echo '</table>';
list($width, $high) = getimagesize($image);
echo $width.' x '.$high.' <br />';
echo round((filesize($image)/1024),2).' KB';
echo ' - '.$ext;
echo '</td>';
echo '</tr>';
}
echo '</table>';
} else {
Display::display_warning_message(get_lang('FileNotFound'));
}
} // if ($slide_id!=="all")
Display :: display_footer();
?>
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Loading…
Cancel
Save