// if filemanager is a inside a popup or a frame
// i don't like this code. i don't know were these two variables are coming from
// anyone can add ?framed=1 to a URL to alter the behaviour.
-if ($framed || $popup) {
- $savant->assign('framed', $framed);
- $savant->assign('popup', $popup);
+if ($_REQUEST['framed'] || $_REQUEST['popup']) {
+ $savant->assign('framed', 1);
+ $savant->assign('popup', 1);
$savant->display('include/fm_header.tmpl.php');
} else {
$savant->display('include/header.tmpl.php');
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
if (isset($current_tab)) {
- if (!($_POST['setvisual'] && !$_POST['settext'])) {
- echo '<tr><td align="right"><small><b>'._AT('codes').': </b></small></td><td><small>';
- echo '<a href="javascript:smilie(\'[?]\', \'[/?]\')" title="[?][/?]">',_AT('add_term'), '</a> ';
- echo '<a href="javascript:smilie(\'[code]\', \'[/code]\')" title="[code][/code]" onclick="document.form.formatting.html.checked=\'true\';">'._AT('add_code').'</a>';
+ echo '<tr><td align="right"><small><strong>'._AT('codes').': </strong></small></td><td><small>';
+ echo '<a href="javascript:smilie(\'[?] [/?]\')" title="[?][/?]">',_AT('add_term'), '</a> ';
+ echo '<a href="javascript:smilie(\'[code] [/code]\')" title="[code][/code]">'._AT('add_code').'</a>';
echo '</small></td></tr>';
- }
} ?>
<tr>
<td align="right"><small><b><?php echo _AT('colors'); ?>:</b></small></td>
</tr>
</table>
-<?php if ($_POST['setvisual'] && !$_POST['settext']) { ?>
-
-<script type="text/javascript"><!--
-function smilie(thesmilie, extra) {
- editor.focusEditor();
- if (!extra) {
- editor.insertHTML(thesmilie);
- }
- else
- {
- editor.surroundHTML(thesmilie, extra);
+<?php if ($_POST['setvisual'] && !$_POST['settext']): ?>
+ <script type="text/javascript">
+ //<!--
+ function smilie(thesmilie, extra) {
+ tinyMCE.execCommand("mceInsertContent", false, thesmilie);
+ return;
+ editor.focusEditor();
+ if (!extra) {
+ editor.insertHTML(thesmilie);
+ } else {
+ editor.surroundHTML(thesmilie, extra);
+ }
}
-}
-//--></script>
-
-<?php } else { ?>
+ //--></script>
+<?php else: ?>
+ <script type="text/javascript">
+ //<!--
+ function smilie(thesmilie, extra) {
+ if (!extra) {
+ document.form.body_text.value += thesmilie+" ";
+ document.form.body_text.focus();
+ } else {
+ document.form.body_text.value += thesmilie+extra+" ";
+ document.form.body_text.focus();
+ }
-<script type="text/javascript"><!--
-function smilie(thesmilie, extra) {
- if (!extra) {
- document.form.body_text.value += thesmilie+" ";
- document.form.body_text.focus();
- } else {
- document.form.body_text.value += thesmilie+extra+" ";
- document.form.body_text.focus();
}
-
-}
-//--></script>
-
-<?php } ?>
\ No newline at end of file
+ //--></script>
+<?php endif; ?>
\ No newline at end of file
<?php
if ($content_row['content_path']) {
- echo ' <div class="row">'._AT('packaged_in').'<br /> <a href="'.$_base_href.'tools/filemanager/index.php?pathext='.urlencode($content_row['content_path'].'/').'">'.$content_row['content_path'].'</a></div>';
+ echo ' <div class="row">'._AT('packaged_in').'<br /> <a href="'.$_base_href.'tools/filemanager/index.php?pathext='.urlencode($content_row['content_path'].'/').SEP.'framed=1">'.$content_row['content_path'].'</a></div>';
}
?>
<div class="row">
<?php endif; ?>
<script type="text/javascript" language="javascript">
// <!--
- document.write(" <a onclick=\"window.open('<?php echo $_base_href; ?>tools/filemanager/index.php?popup=1','newWin1','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=640,height=490')\" style=\"cursor: pointer; text-decoration:underline;\" ><?php echo _AT('open_file_manager'); ?> </a>");
+ document.write(" <a onclick=\"window.open('<?php echo $_base_href; ?>tools/filemanager/index.php?framed=1<?php echo SEP; ?>popup=1','newWin1','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=640,height=490')\" style=\"cursor: pointer; text-decoration:underline;\" ><?php echo _AT('open_file_manager'); ?> </a>");
//-->
</script>
<noscript>
- <a href="<?php echo $_base_href; ?>tools/filemanager/index.php"><?php echo _AT('open_file_manager'); ?></a>
+ <a href="<?php echo $_base_href; ?>tools/filemanager/index.php?framed=1"><?php echo _AT('open_file_manager'); ?></a>
</noscript>
</div>
<div class="row">
// get the course total in Bytes
$course_total = dirsize($current_path);
+$framed = intval($_GET['framed']);
+$popup = intval($_GET['popup']);
+
if (defined('AT_FORCE_GET_FILE') && AT_FORCE_GET_FILE) {
$get_file = 'get.php/';
} else {
?>
<script type="text/javascript">
-<!--
-
+//<!--
function insertFile(fileName, pathTo, ext) {
if (ext == "gif" || ext == "jpg" || ext == "jpeg" || ext == "png") {
myField.focus();
}
}
-
--->
+//-->
</script>
\ No newline at end of file
define('AT_INCLUDE_PATH', '../../include/');
-if ((isset($_REQUEST['popup'])) && ($_REQUEST['popup'] == TRUE) &&
- (!isset($_REQUEST['framed']) || $_REQUEST['framed'] == FALSE)) {
+if ((isset($_REQUEST['popup']) && $_REQUEST['popup']) &&
+ (!isset($_REQUEST['framed']) || !$_REQUEST['framed'])) {
$popup = TRUE;
$framed = FALSE;
-} else if ((isset($_REQUEST['framed'])) && ($_REQUEST['framed'] == TRUE)) {
+} else if (isset($_REQUEST['framed']) && $_REQUEST['framed'] && isset($_REQUEST['popup']) && $_REQUEST['popup']) {
$popup = TRUE;
$framed = TRUE;
} else {
}
require(AT_INCLUDE_PATH.'header.inc.php');
-
?>
\ No newline at end of file
</script>\r
\r
\r
-<iframe src="<?php echo $_base_path; ?>tools/filemanager/index.php?framed=1" name="filemanager" width="98%" height="480">\r
+<iframe src="<?php echo $_base_path; ?>tools/filemanager/index.php?framed=1<?php echo SEP; ?>popup=1" name="filemanager" width="98%" height="480">\r
</iframe>\r
\r
</body>\r