function showConfig($row)
    {
        jimport('joomla.filter.output');
        global $m;
        JFilterOutput::objectHTMLSafe($row);
        $folder_check_image = "tick";
        // The image magick status
        $im_status = check_image_magic($row->image_magic_path) ? '<p><img src="images/tick.png" style="vertical-align:middle;"" /> &nbsp;' . JText::_('E_D_USE_IMAGE_MAGIC_OK') . '</p>' : ' <p><img src="images/publish_x.png" style="vertical-align:middle;"" /> &nbsp;' . JText::_('E_D_USE_IMAGE_MAGIC_FAIL') . '</p>';
        echo '
<script type="text/javascript" src="components/com_joomla_flash_uploader/jfu.js"></script>

<script type="text/javascript">
function checkValue(element, min, req) {
  var val = element.value;
  if (val == "" && req==1) {
     alert("' . JText::_('C_W_REQUIRED') . '");
  } else if (!isNumeral(val)) {
     alert("' . JText::_('C_W_NUMBER') . '");
  } else if (val < min) {
    alert("' . JText::_('C_W_SMALL') . ' " + min + ".");
  }
}

function checkUploadMaxValue(element) {
  var val = element.value;
  var max = ' . getMaximumUploadSize() . ';
  if (val > max) {
    alert("' . JText::_('C_W_MAX') . '");
  }
}
</script>

<form action="index2.php" method="post" name="adminForm">
<div class="config">
<table class="adminheading">
	<tbody>
		<tr>
			<th class="config">' . JText::_('E_HEADER') . '</th>
		</tr>
	</tbody>
</table>
<p>
<div class="block-menu" >
<div id="form1h" class="form-block-menu-sel" onClick="showform(\'form1\')">
&nbsp;' . JText::_('E_HEADER_1') . '&nbsp;</div>&nbsp;
<div  id="form2h" class="form-block-menu" onClick="showform(\'form2\')">
&nbsp;' . JText::_('E_HEADER_2') . '&nbsp;</div>&nbsp;
<div  id="form3h" class="form-block-menu" onClick="showform(\'form3\')">
&nbsp;' . JText::_('E_HEADER_3') . '&nbsp;</div>&nbsp;
</div>
</p>
<div id="form1">
<h3 style="text-align:left;">' . JText::_('E_H3_JOM') . '</h3>

<table class="adminlist">
	
	 <thead>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		 </thead>
		 <tbody>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_SETTING') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_setting', 'class="inputbox"', $row->enable_setting) . '</td>
			<td>' . JText::_('E_D_ENABLE_SETTING') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ID') . '</td>
			<td>' . $row->id . '</td>
			<td>' . JText::_('E_D_ID') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_GID') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="gid" value="' . $row->gid . '" /></td>
			<td>' . JText::_('E_D_GID') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CONFIG_NAME') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="config_name" value="' . $row->config_name . '" /></td>
			<td>' . JText::_('E_D_CONFIG_NAME') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CONFIG_DESCRIPTION') . '</td>
			<td><input type="text" class="w250" maxsize="500"
				name="description" value="' . $row->description . '" /></td>
			<td>' . JText::_('E_D_CONFIG_DESCRIPTION') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_TITLE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_title_lang', 'class="inputbox"', $row->text_title_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<input type="text" class="w250" maxsize="100"
				name="text_title" value="' . $row->text_title . '" /></td>
			<td>' . JText::_('E_D_TEXT_TITLE') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_BEFORE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_top_lang', 'class="inputbox"', $row->text_top_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<textarea rows="4" name="text_top" id="text_top" class="w250">' . $row->text_top . '</textarea></td>
			<td>' . JText::_('E_D_TEXT_BEFORE') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_AFTER') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_bottom_lang', 'class="inputbox"', $row->text_bottom_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<textarea rows="4" name="text_bottom" id="text_bottom"
				class="w250">' . $row->text_bottom . '</textarea></td>
			<td>' . JText::_('E_D_TEXT_AFTER') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FIXOVERLAY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('fix_overlay', 'class="inputbox"', $row->fix_overlay) . '</td>
			<td>' . JText::_('E_D_FIXOVERLAY') . '</td>
		</tr>
	</tbody>
</table>
</div>
<div id="form2">
<h3 style="text-align:left;">' . JText::_('E_H3_SET') . '</h3>
<table class="adminlist">
	<thead>
		<tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		</thead>
		<tbody>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td><strong>' . JText::_('E_S_FOLDER') . '</strong></td>
				<td><input onBlur="javascript:removeSpaces(this);" onKeyUp="javascript:testFolder();" type="text" class="w230" maxsize="100"
				name="folder" id="folder" value="' . $row->folder . '" />&nbsp;<img id="foldertestimage" height="16" src="images/' . $folder_check_image . '.png" border="0 "/></td>
			<td>' . JText::_('E_D_FOLDER') . '</td>
		</tr>
';
        if ($row->id != 1) {
            echo '    	
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_MASTER_PROFILE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('master_profile', 'class="inputbox"', $row->master_profile) . '</td>
			<td>' . JText::_('E_D_MASTER_PROFILE') . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_MASTER_PROFILE_MODE') . '</td>
			<td>' . tfuHTML::mastermodeRadioList('master_profile_mode', 'class="inputbox"', $row->master_profile_mode) . '</td>	
			<td>' . JText::_('E_D_MASTER_PROFILE_MODE') . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
		    <td>' . JText::_('E_S_MASTER_PROFILE_LOWERCASE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('master_profile_lowercase', 'class="inputbox"', $row->master_profile_lowercase) . '</td>	
		    <td>' . JText::_('E_D_MASTER_PROFILE_LOWERCASE') . '</td>
		</tr>	
  ';
        }
        echo '
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_MAX_FILE_SIZE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);checkUploadMaxValue(this);" type="text" class="w250" maxsize="100"
				name="maxfilesize" value="' . $row->maxfilesize . '" /></td>
			<td>' . JText::_('E_D_MAX_FILE_SIZE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_WIDTH') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);checkValue(this, 100,1);" type="text" class="w250" maxsize="100"
				name="display_width" value="' . $row->display_width . '" /></td>
			<td>' . JText::_('E_D_WIDTH') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_RESIZE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('resize_show', 'class="inputbox"', $row->resize_show) . '</td>
			<td>' . JText::_('E_D_RESIZE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_RESIZE_VALUES') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="resize_data" value="' . $row->resize_data . '" /></td>
			<td>' . JText::_('E_D_RESIZE_VALUES') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_RESIZE_LABELS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="resize_label" value="' . $row->resize_label . '" /></td>
			<td>' . JText::_('E_D_RESIZE_LABELS') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_RESIZE_DEFAULT') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="resize_default" value="' . $row->resize_default . '" /></td>
			<td>' . JText::_('E_D_RESIZE_DEFAULT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ALLOWED_FILE_EXTENSIONS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="allowed_file_extensions"
				value="' . $row->allowed_file_extensions . '" /></td>
			<td>' . JText::_('E_D_ALLOWED_FILE_EXTENSIONS') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_VORBIDDEN_FILE_EXTENSIONS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="forbidden_file_extensions"
				value="' . $row->forbidden_file_extensions . '" /></td>
			<td>' . JText::_('E_D_VORBIDDEN_FILE_EXTENSIONS') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_HIDE_REMOTE_VIEW') . '</td>
			<td>' . tfuHTML::truefalseRadioList('hide_remote_view', 'class="inputbox"', $row->hide_remote_view) . '</td>
			<td>' . JText::_('E_D_HIDE_REMOTE_VIEW') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SHOW_DELETE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('show_delete', 'class="inputbox"', $row->show_delete) . '</td>
			<td>' . JText::_('E_D_SHOW_DELETE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_BROWSING') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_browsing', 'class="inputbox"', $row->enable_folder_browsing) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_BROWSING') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_CREATION') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_creation', 'class="inputbox"', $row->enable_folder_creation) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_CREATION') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_DELETION') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_deletion', 'class="inputbox"', $row->enable_folder_deletion) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_DELETION') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_RENAME') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_rename', 'class="inputbox"', $row->enable_folder_rename) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_RENAME') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FILE_RENAME') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_file_rename', 'class="inputbox"', $row->enable_file_rename) . '</td>
			<td>' . JText::_('E_D_ENABLE_FILE_RENAME') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_KEEP_FILE_EXTENSION') . '</td>
			<td>' . tfuHTML::truefalseRadioList('keep_file_extension', 'class="inputbox"', $row->keep_file_extension) . '</td>
			<td>' . JText::_('E_D_KEEP_FILE_EXTENSION') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SORT_FILES_BY_DATE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('sort_files_by_date', 'class="inputbox"', $row->sort_files_by_date) . '</td>
			<td>' . JText::_('E_D_SORT_FILES_BY_DATE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_OVERWRITE_FILES') . '</td>
			<td>' . tfuHTML::truefalseRadioList('overwrite_files', 'class="inputbox"', $row->overwrite_files) . '</td>
			<td>' . JText::_('E_D_OVERWRITE_FILES') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_WARNING_SETTING') . '</td>
			<td>' . tfuHTML::warningRadioList('warning_setting', 'class="inputbox"', $row->warning_setting) . '</td>
			<td>' . JText::_('E_D_WARNING_SETTING') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SHOW_SIZE') . '</td>
			<td>' . tfuHTML::showSizeRadioList('show_size', 'class="inputbox"', $row->show_size) . '</td>
			<td>' . JText::_('E_D_SHOW_SIZE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_HIDE_DIRECTORY_IN_TITLE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('hide_directory_in_title', 'class="inputbox"', $row->hide_directory_in_title) . '</td>
			<td>' . JText::_('E_D_HIDE_DIRECTORY_IN_TITLE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_NORMALISE_FILE_NAMES') . '</td>
			<td>' . tfuHTML::truefalseRadioList('normalise_file_names', 'class="inputbox"', $row->normalise_file_names) . '</td>
			<td>' . JText::_('E_D_NORMALISE_FILE_NAMES') . '</td>
		</tr>
       	<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_NORMALISE_DIRECTORY_NAMES') . '</td>
			<td>' . tfuHTML::truefalseRadioList('normalise_directory_names', 'class="inputbox"', $row->normalise_directory_names) . '</td>
			<td>' . JText::_('E_D_NORMALISE_DIRECTORY_NAMES') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_NORMALIZE_SPACES') . '</td>
			<td>' . tfuHTML::truefalseRadioList('normalize_spaces', 'class="inputbox"', $row->normalize_spaces) . '</td>
			<td>' . JText::_('E_D_NORMALIZE_SPACES') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_NOTIFICATION_EMAIL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="upload_notification_email" value="' . $row->upload_notification_email . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_NOTIFICATION_EMAIL') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_NOTIFICATION_EMAIL_FROM') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="upload_notification_email_from" value="' . $row->upload_notification_email_from . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_NOTIFICATION_EMAIL_FROM') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_NOTIFICATION_EMAIL_SUBJECT') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="upload_notification_email_subject" value="' . $row->upload_notification_email_subject . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_NOTIFICATION_EMAIL_SUBJECT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_NOTIFICATION_EMAIL_TEXT') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="upload_notification_email_text" value="' . $row->upload_notification_email_text . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_NOTIFICATION_EMAIL_TEXT') . '</td>
		</tr>		
        <!-- start new 2.8 -->
       	<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_LANGUAGE_DROPDOWN') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="language_dropdown" value="' . $row->language_dropdown . '" /></td>
			<td>' . JText::_('E_D_LANGUAGE_DROPDOWN') . '</td>
		</tr>    
       	<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_USE_IMAGE_MAGIC') . '</td>
			<td>' . tfuHTML::truefalseRadioList('use_image_magic', 'class="inputbox"', $row->use_image_magic) . '</td>
			<td>' . JText::_('E_D_USE_IMAGE_MAGIC') . $im_status . '</td>
		</tr>
        <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_IMAGE_MAGIC_PATH') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="image_magic_path" value="' . $row->image_magic_path . '" /></td>
			<td>' . JText::_('E_D_IMAGE_MAGIC_PATH') . '</td>
		</tr>
		 <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_EXCLUDE_DIRECTORIES') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="exclude_directories" value="' . $row->exclude_directories . '" /></td>
			<td>' . JText::_('E_D_EXCLUDE_DIRECTORIES') . '</td>
		</tr>
	    <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FIX_UTF8') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="fix_utf8" value="' . $row->fix_utf8 . '" /></td>
			<td>' . JText::_('E_D_FIX_UTF8') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CREATION_DATE') . '</td>
			<td>' . $row->creation_date . '</td>
			<td>' . JText::_('E_D_CREATION_DATE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_LAST_MODIFIED_DATE') . '</td>
			<td>' . $row->last_modified_date . '</td>
			<td>' . JText::_('E_D_LAST_MODIFIED_DATE') . '</td>
		</tr>
</table>
</div>
';
        echo '
<div id="form3">
<h3 style="text-align:left;">' . JText::_('E_H3_REG') . '</h3>
';
        if (!($m != "" && $m != "s" && $m != "w")) {
            echo '<div class="redreg">' . JText::_('E_H_NOT_REG') . '</div>';
        }
        echo ' 
<table class="adminlist">
	    <thead>
		<tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		</thead>
		<tbody>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FLASH_TITLE') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="flash_title" value="' . $row->flash_title . '" /></td>
			<td>' . JText::_('E_D_FLASH_TITLE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FILE_DOWNLOAD') . '</td>
			<td>' . tfuHTML::downloadRadioList('enable_file_download', 'class="inputbox"', $row->enable_file_download) . '</td>
			<td>' . JText::_('E_D_ENABLE_FILE_DOWNLOAD') . '</td>
		</tr>
		 <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DIRECT_DOWNLOAD') . '</td>
			<td>' . tfuHTML::truefalseRadioList('direct_download', 'class="inputbox"', $row->direct_download) . '</td>
			<td>' . JText::_('E_D_DIRECT_DOWNLOAD') . '</td>
		</tr>   
		  <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DOWNLOAD_MULTIPLE_FILES_AS_ZIP') . '</td>
			<td>' . tfuHTML::truefalseRadioList('download_multiple_files_as_zip', 'class="inputbox"', $row->download_multiple_files_as_zip) . '</td>
			<td>' . JText::_('E_D_DOWNLOAD_MULTIPLE_FILES_AS_ZIP') . '</td>
		</tr>   	
    	<!-- /new 2.7 -->
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DIRECTORY_FILE_LIMIT') . '</td>
    	<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="directory_file_limit" value="' . $row->directory_file_limit . '" /></td>
			<td>' . JText::_('E_D_DIRECTORY_FILE_LIMIT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_QUEUE_FILE_LIMIT') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="queue_file_limit" value="' . $row->queue_file_limit . '" /></td>
			<td>' . JText::_('E_D_QUEUE_FILE_LIMIT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_QUEUE_FILE_LIMIT_SIZE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="queue_file_limit_size" value="' . $row->queue_file_limit_size . '" /></td>
			<td>' . JText::_('E_D_QUEUE_FILE_LIMIT_SIZE') . '</td>
		</tr>
		
        <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_PREVIEW_TEXTFILE_EXTENSIONS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="preview_textfile_extensions" value="' . $row->preview_textfile_extensions . '" /></td>
			<td>' . JText::_('E_D_PREVIEW_TEXTFILE_EXTENSIONS') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_EDIT_TEXTFILE_EXTENSIONS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="edit_textfile_extensions" value="' . $row->edit_textfile_extensions . '" /></td>
			<td>' . JText::_('E_D_EDIT_TEXTFILE_EXTENSIONS') . '</td>
		</tr>

		 <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ALLOWED_VIEW_FILE_EXTENSIONS') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="allowed_view_file_extensions" value="' . $row->allowed_view_file_extensions . '" /></td>
			<td>' . JText::_('E_D_ALLOWED_VIEW_FILE_EXTENSIONS') . '</td>
		</tr>
		 <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FORBIDDEN_VIEW_FILE_EXTENSIONS') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="forbidden_view_file_extensions" value="' . $row->forbidden_view_file_extensions . '" /></td>
			<td>' . JText::_('E_D_FORBIDDEN_VIEW_FILE_EXTENSIONS') . '</td>
		</tr>
		  <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SHOW_FULL_URL_FOR_SELECTED_FILE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('show_full_url_for_selected_file', 'class="inputbox"', $row->show_full_url_for_selected_file) . '</td>
			<td>' . JText::_('E_D_SHOW_FULL_URL_FOR_SELECTED_FILE') . '</td>
		</tr>   	
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_FINISHED_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="upload_finished_js_url" value="' . $row->upload_finished_js_url . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_FINISHED_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_PREVIEW_SELECT_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="preview_select_js_url" value="' . $row->preview_select_js_url . '" /></td>
			<td>' . JText::_('E_D_PREVIEW_SELECT_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DELETE_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="delete_js_url" value="' . $row->delete_js_url . '" /></td>
			<td>' . JText::_('E_D_DELETE_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_CHANGE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_change_folder" value="' . $row->js_change_folder . '" /></td>
			<td>' . JText::_('E_D_JS_CHANGE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<!-- new 2.7 -->
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_CREATE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_create_folder" value="' . $row->js_create_folder . '" /></td>
			<td>' . JText::_('E_D_JS_CREATE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_RENAME_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_rename_folder" value="' . $row->js_rename_folder . '" /></td>
			<td>' . JText::_('E_D_JS_RENAME_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_DELETE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_delete_folder" value="' . $row->js_delete_folder . '" /></td>
			<td>' . JText::_('E_D_JS_DELETE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_COPYMOVE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_copymove" value="' . $row->js_copymove . '" /></td>
			<td>' . JText::_('E_D_JS_COPYMOVE') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
 </tbody>
 </table>		
	 <h3 style="text-align:left;">' . JText::_('E_H3_REG_PROF') . '</h3>
      <table class="adminlist">
        <thead>
	      <tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		  </tr>	
	    </thead>
	    <tbody>
          <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_MOVECOPY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_movecopy', 'class="inputbox"', $row->enable_folder_movecopy) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_MOVECOPY') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FILE_MOVECOPY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_file_movecopy', 'class="inputbox"', $row->enable_file_movecopy) . '</td>
			<td>' . JText::_('E_D_ENABLE_FILE_MOVECOPY') . '</td>
		</tr>
        <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode', 'class="inputbox"', $row->description_mode) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE') . '</td>
		</tr> 
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_SHOW_DEFAULT') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode_show_default', 'class="inputbox"', $row->description_mode_show_default) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_SHOW_DEFAULT') . '</td>
		</tr>   
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_MANDATORY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode_mandatory', 'class="inputbox"', $row->description_mode_mandatory) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_MANDATORY') . '</td>
		</tr>   	
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_STORE') . '</td>
			<td>' . tfuHTML::modeRadioList('description_mode_store', 'class="inputbox"', $row->description_mode_store) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_STORE') . '</td>
		</tr>      
          	
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SWF_TEXT') . '</td>
			<td><textarea rows="4" name="swf_text" id="swf_text"
				class="w250">' . $row->swf_text . '</textarea></td>
			<td>' . JText::_('E_D_SWF_TEXT') . '</td>
		</tr>
	</tbody>
</table>
</div>
</div>
';
        echo <<<HTML
    <input type="hidden" name="id" value="{$row->id}" />
    <input type="hidden" name="creation_date" value="{$row->creation_date}" />
\t<input type="hidden" name="option" value="com_joomla_flash_uploader" />
\t<input type="hidden" name="task" value="saveConfig" />
</form>
<script type="text/javascript">
showform('form1');
testFolder();
</script>
HTML;
    }
function showFlashComponent($id)
{
    $database =& JFactory::getDBO();
    $row = new joomla_flash_uploader($database);
    $row->load($id);
    if (!$row->resize_show) {
        // no profile found or no id!
        HTML_joomla_flash_uploader::wrongId($id);
    } else {
        $uploadfolder = $row->folder;
        $user =& JFactory::getUser();
        // we check if we have a master profile!
        if ($row->master_profile == 'true') {
            if ($user->id != 0) {
                if ($row->master_profile_mode == 'id') {
                    $uploadfolder = $uploadfolder . '/' . $user->id;
                } else {
                    if ($row->master_profile_lowercase == 'true') {
                        $uploadfolder = $uploadfolder . '/' . strtolower($user->username);
                    } else {
                        $uploadfolder = $uploadfolder . '/' . $user->username;
                    }
                }
                // we check if the folder exists - if not it is created!
                if (!file_exists($uploadfolder) && $uploadfolder != "") {
                    mkdir($uploadfolder);
                    // if the copy directory exists we copy everything!
                    $extra_dir = "components/com_joomla_flash_uploader/default";
                    if (file_exists($extra_dir)) {
                        JFUHelper::dir_copy($extra_dir, $uploadfolder);
                    }
                }
            } else {
                HTML_joomla_flash_uploader::noUser($id);
                return;
            }
        }
        // we go back to the main folder! path has to be relativ to the tfu upload folder!
        if ($uploadfolder == "") {
            $folder = "./../../../..";
        } else {
            $folder = "./../../../../" . $uploadfolder;
        }
        JFUHelper::setJFUSession($row, $folder);
        $_SESSION["TFU_FILE_CHMOD"] = JFUHelper::getVariable($database, 'file_chmod');
        $_SESSION["TFU_DIR_CHMOD"] = JFUHelper::getVariable($database, 'dir_chmod');
        unset($_SESSION["IS_ADMIN"]);
        $_SESSION["IS_FRONTEND"] = "TRUE";
        if ($user->id != 0) {
            $_SESSION["TFU_USER"] = $user->username;
            $_SESSION["TFU_USER_ID"] = $user->id;
        } else {
            unset($_SESSION["TFU_USER"]);
            unset($_SESSION["TFU_USER_ID"]);
        }
        // we check if the flash should be included with js oder the object tag
        $use_js_include = JFUHelper::check_js_include($database);
        store_temp_session();
        JFUHelper::fixSession();
        HTML_joomla_flash_uploader::showFlash($row, $uploadfolder, $use_js_include, false);
    }
}
Пример #3
0
    function showConfig($row, $a_user, $p_user, $f_groups, $do_check_image_magic, $showUserPage = false)
    {
        jimport('joomla.filter.output');
        global $m;
        JFilterOutput::objectHTMLSafe($row);
        $folder_check_image = "tick";
        // The image magick status
        $im_check = check_image_magic($row->image_magic_path, $do_check_image_magic == 'true');
        $im_status = $im_check == '1' ? '<p><img src="components/com_jfuploader/images/tick.png" style="vertical-align:middle;"" /> &nbsp;' . JText::_('E_D_USE_IMAGE_MAGIC_OK') . '</p>' : ($im_check == '0' ? ' <p><img src="components/com_jfuploader/images/publish_x.png" style="vertical-align:middle; margin-top:0px;" /> &nbsp;' . JText::_('E_D_USE_IMAGE_MAGIC_FAIL') . '</p>' : ' <p><img src="images/publish_x.png" style="vertical-align:middle; margin-top:0px;" /> &nbsp;' . JText::_('E_D_CHECK_IMAGE_MAGIC_DISABLED') . '</p>');
        echo '
<script type="text/javascript" src="components/com_jfuploader/js/jfu.js"></script>

<script type="text/javascript">
function checkValue(element, min, req) {
  var val = element.value;
  if (val == "" && req==1) {
     alert("' . JText::_('C_W_REQUIRED') . '");
  } else if (!isNumeral(val)) {
     alert("' . JText::_('C_W_NUMBER') . '");
  } else if (val < min) {
    alert("' . JText::_('C_W_SMALL') . ' " + min + ".");
  }
}

function checkUploadMaxValue(element) {
  var val = element.value;
  var max = ' . getMaximumUploadSize() . ';
  if (val > max) {
    alert("' . JText::_('C_W_MAX') . '");
  }
}
</script>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="config" >
<h2>' . JText::_('E_HEADER_PROFILE') . '</h2>
<p>
<div class="block-menu" >
<div id="form1h" class="form-block-menu-sel" onClick="showform(\'form1\')">
&nbsp;' . JText::_('E_HEADER_1') . '&nbsp;</div>&nbsp;
<div  id="form2h" class="form-block-menu" onClick="showform(\'form2\')">
&nbsp;' . JText::_('E_HEADER_2') . '&nbsp;</div>&nbsp;
<div  id="form3h" class="form-block-menu" onClick="showform(\'form3\')">
&nbsp;' . JText::_('E_HEADER_3') . '&nbsp;</div>&nbsp;
';
        if ($row->id != '1') {
            echo '
<div  id="form4h" class="form-block-menu" onClick="showform(\'form4\')">
&nbsp;' . JText::_('E_HEADER_4') . '&nbsp;</div>&nbsp;
';
        }
        echo '
</div>
</p>
<div id="form1">
<br>
<table class="adminlist">
	
	 <thead>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		 </thead>
		 <tbody>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_SETTING') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_setting', 'class="inputbox"', $row->enable_setting) . '</td>
			<td>' . JText::_('E_D_ENABLE_SETTING') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ID') . '</td>
			<td>' . $row->id . '</td>
			<td>' . JText::_('E_D_ID') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_GID') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="gid" value="' . $row->gid . '" ' . ($row->id == '1' ? ' readonly="readonly" ' : '') . ' /></td>
			<td>' . JText::_('E_D_GID') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CONFIG_NAME') . '</td>
			<td><input type="text" class="w250" maxsize="100"
				name="config_name" value="' . $row->config_name . '" /></td>
			<td>' . JText::_('E_D_CONFIG_NAME') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CONFIG_DESCRIPTION') . '</td>
			<td><input type="text" class="w250" maxsize="500"
				name="description" value="' . $row->description . '" /></td>
			<td>' . JText::_('E_D_CONFIG_DESCRIPTION') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_TITLE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_title_lang', 'class="inputbox"', $row->text_title_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<input type="text" class="w250" maxsize="100"
				name="text_title" value="' . $row->text_title . '" /></td>
			<td>' . JText::_('E_D_TEXT_TITLE') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_BEFORE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_top_lang', 'class="inputbox"', $row->text_top_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<textarea rows="4" name="text_top" id="text_top" class="w250">' . $row->text_top . '</textarea></td>
			<td>' . JText::_('E_D_TEXT_BEFORE') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_TEXT_AFTER') . '</td>
			<td>' . tfuHTML::truefalseRadioList('text_bottom_lang', 'class="inputbox"', $row->text_bottom_lang, JText::_('E_S_USE_FILE'), JText::_('E_S_USE_TEXT')) . '<br />
			<textarea rows="4" name="text_bottom" id="text_bottom"
				class="w250">' . $row->text_bottom . '</textarea></td>
			<td>' . JText::_('E_D_TEXT_AFTER') . " " . JText::_('E_D_TEXT') . '</td>
		</tr>
		<tr' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FIXOVERLAY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('fix_overlay', 'class="inputbox"', $row->fix_overlay) . '</td>
			<td>' . JText::_('E_D_FIXOVERLAY') . '</td>
		</tr>
	</tbody>
</table>
</div>
<div id="form2">
<br>
<table class="adminlist">
	<thead>
		<tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		</thead>
		<tbody>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td><strong>' . JText::_('E_S_FOLDER') . '</strong></td>
				<td><input onBlur="javascript:removeSpaces(this);" onKeyUp="javascript:testFolder();" type="text" class="w230" maxsize="100"
				name="folder" id="folder" value="' . $row->folder . '" />&nbsp;<img id="foldertestimage" height="16" src="components/com_jfuploader/images/' . $folder_check_image . '.png" border="0 "/></td>
			<td>' . JText::_('E_D_FOLDER') . '</td>
		</tr>
';
        if ($row->id != 1) {
            echo HTML_joomla_flash_uploader::getDefaultRadioBox('master_profile', $row->master_profile, '');
            echo '
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_MASTER_PROFILE_MODE') . '</td>
			<td>' . tfuHTML::mastermodeRadioList('master_profile_mode', 'class="inputbox"', $row->master_profile_mode) . '</td>	
			<td>' . JText::_('E_D_MASTER_PROFILE_MODE') . '</td>
		</tr>
  ';
            echo HTML_joomla_flash_uploader::getDefaultRadioBox('master_profile_lowercase', $row->master_profile_lowercase, '');
        }
        echo '
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_MAX_FILE_SIZE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);checkUploadMaxValue(this);" type="text" class="w250" maxsize="100"
				name="maxfilesize" value="' . $row->maxfilesize . '" /></td>
			<td>' . JText::_('E_D_MAX_FILE_SIZE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_WIDTH') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);checkValue(this, 100,1);" type="text" class="w250" maxsize="100"
				name="display_width" value="' . $row->display_width . '" /></td>
			<td>' . JText::_('E_D_WIDTH') . '</td>
		</tr>
';
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('resize_show', $row->resize_show, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('resize_data', $row->resize_data, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('resize_label', $row->resize_label, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('resize_default', $row->resize_default, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('compression', $row->compression, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('allowed_file_extensions', $row->allowed_file_extensions, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('forbidden_file_extensions', $row->forbidden_file_extensions, '');
        if (function_exists('fnmatch')) {
            echo HTML_joomla_flash_uploader::getDefaultInputBox('forbidden_view_file_filter', $row->forbidden_view_file_filter, '');
        }
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('show_size', $row->show_size, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('date_format', $row->date_format, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('show_server_date_instead_size', $row->show_server_date_instead_size, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('big_server_view', $row->big_server_view, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('switch_sides', $row->switch_sides, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('hide_remote_view', $row->hide_remote_view, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('show_delete', $row->show_delete, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_folder_browsing', $row->enable_folder_browsing, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_folder_creation', $row->enable_folder_creation, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_dir_create_detection', $row->enable_dir_create_detection, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('ftp_enable', $row->ftp_enable, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('ftp_host', $row->ftp_host, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('ftp_port', $row->ftp_port, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('ftp_user', $row->ftp_user, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('ftp_pass', $row->ftp_pass, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('ftp_root', $row->ftp_root, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_folder_deletion', $row->enable_folder_deletion, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_folder_rename', $row->enable_folder_rename, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_file_rename', $row->enable_file_rename, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('keep_file_extension', $row->keep_file_extension, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('remove_multiple_php_extension', $row->remove_multiple_php_extension, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('scan_images', $row->scan_images, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('sort_files_by_date', $row->sort_files_by_date, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('sort_directores_by_date', $row->sort_directores_by_date, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('overwrite_files', $row->overwrite_files, '');
        echo '		
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_WARNING_SETTING') . '</td>
			<td>' . tfuHTML::warningRadioList('warning_setting', 'class="inputbox"', $row->warning_setting) . '</td>
			<td>' . JText::_('E_D_WARNING_SETTING') . '</td>
		</tr>
		';
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('hide_directory_in_title', $row->hide_directory_in_title, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('truncate_dir_in_title', $row->truncate_dir_in_title, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('normalise_file_names', $row->normalise_file_names, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('normalise_directory_names', $row->normalise_directory_names, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('normalize_spaces', $row->normalize_spaces, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('upload_notification_email', $row->upload_notification_email, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('upload_notification_email_from', $row->upload_notification_email_from, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('upload_notification_email_subject', $row->upload_notification_email_subject, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('upload_notification_email_text', $row->upload_notification_email_text, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('upload_notification_use_full_path', $row->upload_notification_use_full_path, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('language_dropdown', $row->language_dropdown, '');
        $disabled = '';
        if ($im_check != '1') {
            $row->use_image_magic = 'false';
            $disabled = ' disabled="disabled" ';
            echo '<input type="hidden" name="use_image_magic" value="false" />';
        }
        echo '
	     <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_USE_IMAGE_MAGIC') . '</td>
			<td>' . tfuHTML::truefalseRadioList('use_image_magic', 'class="inputbox"' . $disabled, $row->use_image_magic) . '</td>
			<td>' . JText::_('E_D_USE_IMAGE_MAGIC') . $im_status . '</td>
		</tr>
';
        echo HTML_joomla_flash_uploader::getDefaultInputBox('image_magic_path', $row->image_magic_path, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('hide_hidden_files', $row->hide_hidden_files, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('exclude_directories', $row->exclude_directories, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('fix_utf8', $row->fix_utf8, '');
        // new 2.13
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_text', $row->info_text, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_textcolor_R', $row->info_textcolor_R, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_textcolor_G', $row->info_textcolor_G, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_textcolor_B', $row->info_textcolor_B, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_font', $row->info_font, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('info_fontsize', $row->info_fontsize, '');
        echo '
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_CREATION_DATE') . '</td>
			<td>' . $row->creation_date . '</td>
			<td>' . JText::_('E_D_CREATION_DATE') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_LAST_MODIFIED_DATE') . '</td>
			<td>' . $row->last_modified_date . '</td>
			<td>' . JText::_('E_D_LAST_MODIFIED_DATE') . '</td>
		</tr>
</table>
</div>
';
        echo '
<div id="form3">
';
        if (!($m != "" && $m != "s" && $m != "w")) {
            echo '<p><div class="redreg">' . JText::_('E_H_NOT_REG') . '</div></p>';
        } else {
            echo '<br>';
        }
        echo '
<table class="adminlist">
	    <thead>
		<tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		</tr>
		</thead>
		<tbody>';
        echo HTML_joomla_flash_uploader::getDefaultInputBox('flash_title', $row->flash_title, '');
        echo '
	<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
     	<td>' . JText::_('E_S_ENABLE_FILE_DOWNLOAD') . '</td>
     	<td>' . tfuHTML::downloadRadioList('enable_file_download', 'class="inputbox"', $row->enable_file_download) . '</td>
     	<td>' . JText::_('E_D_ENABLE_FILE_DOWNLOAD') . '</td>
	</tr>
';
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('direct_download', $row->direct_download, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('download_multiple_files_as_zip', $row->download_multiple_files_as_zip, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('zip_folder', $row->zip_folder, 'class="jfu_indent"');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('zip_file_pattern', $row->zip_file_pattern, 'class="jfu_indent"');
        echo '  	
    	<!-- /new 2.7 -->
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DIRECTORY_FILE_LIMIT') . '</td>
    	<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="directory_file_limit" value="' . $row->directory_file_limit . '" /></td>
			<td>' . JText::_('E_D_DIRECTORY_FILE_LIMIT') . '</td>
		</tr>
				<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DIRECTORY_FILE_LIMIT_SIZE') . '</td>
    	<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, -1,0);" type="text" class="w250" maxsize="100"
				name="directory_file_limit_size" value="' . $row->directory_file_limit_size . '" /></td>
			<td>' . JText::_('E_D_DIRECTORY_FILE_LIMIT_SIZE') . '</td>
		</tr>';
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('directory_file_limit_size_system', $row->directory_file_limit_size_system, 'class="jfu_indent"');
        echo '
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_QUEUE_FILE_LIMIT') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="queue_file_limit" value="' . $row->queue_file_limit . '" /></td>
			<td>' . JText::_('E_D_QUEUE_FILE_LIMIT') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_QUEUE_FILE_LIMIT_SIZE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);checkValue(this, 0,0);" type="text" class="w250" maxsize="100"
				name="queue_file_limit_size" value="' . $row->queue_file_limit_size . '" /></td>
			<td>' . JText::_('E_D_QUEUE_FILE_LIMIT_SIZE') . '</td>
		</tr>
';
        echo HTML_joomla_flash_uploader::getDefaultInputBox('preview_textfile_extensions', $row->preview_textfile_extensions, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('edit_textfile_extensions', $row->edit_textfile_extensions, '');
        // # 2.14
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('enable_file_creation', $row->enable_file_creation, '');
        echo '<tr>
		<td class="key jfu_indent">' . JText::_('E_S_ENABLE_FILE_CREATION_EXTENSIONS') . '</td>
		<td>' . tfuHTML::showFileCreateSelectBox('enable_file_creation_extensions', 'class="inputbox"', $row->enable_file_creation_extensions) . '</td>
		<td>' . JText::_('E_D_ENABLE_FILE_CREATION_EXTENSIONS') . '</td>
	 </tr>';
        // end 2.14
        echo HTML_joomla_flash_uploader::getDefaultInputBox('allowed_view_file_extensions', $row->allowed_view_file_extensions, '');
        echo HTML_joomla_flash_uploader::getDefaultInputBox('forbidden_view_file_extensions', $row->forbidden_view_file_extensions, '');
        echo HTML_joomla_flash_uploader::getDefaultRadioBox('show_full_url_for_selected_file', $row->show_full_url_for_selected_file, '');
        echo '	
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_UPLOAD_FINISHED_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="upload_finished_js_url" value="' . $row->upload_finished_js_url . '" /></td>
			<td>' . JText::_('E_D_UPLOAD_FINISHED_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_PREVIEW_SELECT_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="preview_select_js_url" value="' . $row->preview_select_js_url . '" /></td>
			<td>' . JText::_('E_D_PREVIEW_SELECT_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DELETE_JS_URL') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="delete_js_url" value="' . $row->delete_js_url . '" /></td>
			<td>' . JText::_('E_D_DELETE_JS_URL') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_CHANGE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_change_folder" value="' . $row->js_change_folder . '" /></td>
			<td>' . JText::_('E_D_JS_CHANGE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
		<!-- new 2.7 -->
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_CREATE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_create_folder" value="' . $row->js_create_folder . '" /></td>
			<td>' . JText::_('E_D_JS_CREATE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_RENAME_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_rename_folder" value="' . $row->js_rename_folder . '" /></td>
			<td>' . JText::_('E_D_JS_RENAME_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_DELETE_FOLDER') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_delete_folder" value="' . $row->js_delete_folder . '" /></td>
			<td>' . JText::_('E_D_JS_DELETE_FOLDER') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_JS_COPYMOVE') . '</td>
			<td><input  onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="js_copymove" value="' . $row->js_copymove . '" /></td>
			<td>' . JText::_('E_D_JS_COPYMOVE') . ' ' . JText::_("E_D_JS_TEXT") . '</td>
		</tr>
 </tbody>
 </table>		
	 <h3 style="text-align:left;">' . JText::_('E_H3_REG_PROF') . '</h3>
      <table class="adminlist">
        <thead>
	      <tr>
			<th width="20%">' . JText::_('E_H_SETTING') . '</th>
			<th width="20%">' . JText::_('E_H_VALUE') . '</th>
			<th width="60%">' . JText::_('E_H_DESCRIPTION') . '</th>
		  </tr>	
	    </thead>
	    <tbody>
    <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_BIG_PROGRESSBAR') . '</td>
			<td>' . tfuHTML::truefalseRadioList('big_progressbar', 'class="inputbox"', $row->big_progressbar) . '</td>
			<td>' . JText::_('E_D_BIG_PROGRESSBAR') . '</td>
		</tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_IMG_PROGRESSBAR') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="img_progressbar" value="' . $row->img_progressbar . '" /></td>
			<td>' . JText::_('E_D_IMG_PROGRESSBAR') . ' ' . JText::_('E_D_PROGRESSBAR_ADD') . '</td>
		</tr> 
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_IMG_PROGRESSBAR_BACK') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="img_progressbar_back" value="' . $row->img_progressbar_back . '" /></td>
			<td>' . JText::_('E_D_IMG_PROGRESSBAR_BACK') . ' ' . JText::_('E_D_PROGRESSBAR_ADD') . '</td>
		</tr> 
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_IMG_PROGRESSBAR_ANIM') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="img_progressbar_anim" value="' . $row->img_progressbar_anim . '" /></td>
			<td>' . JText::_('E_D_IMG_PROGRESSBAR_ANIM') . ' ' . JText::_('E_D_PROGRESSBAR_ADD') . '</td>
		</tr> 

    <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FOLDER_MOVECOPY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_folder_movecopy', 'class="inputbox"', $row->enable_folder_movecopy) . '</td>
			<td>' . JText::_('E_D_ENABLE_FOLDER_MOVECOPY') . '</td>
		</tr>
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_ENABLE_FILE_MOVECOPY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('enable_file_movecopy', 'class="inputbox"', $row->enable_file_movecopy) . '</td>
			<td>' . JText::_('E_D_ENABLE_FILE_MOVECOPY') . '</td>
		</tr>
        <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode', 'class="inputbox"', $row->description_mode) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE') . '</td>
		</tr> 
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_SHOW_DEFAULT') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode_show_default', 'class="inputbox"', $row->description_mode_show_default) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_SHOW_DEFAULT') . '</td>
		</tr>   
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_MANDATORY') . '</td>
			<td>' . tfuHTML::truefalseRadioList('description_mode_mandatory', 'class="inputbox"', $row->description_mode_mandatory) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_MANDATORY') . '</td>
		</tr>   	
         <tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_DESCRIPTION_MODE_STORE') . '</td>
			<td>' . tfuHTML::modeRadioList('description_mode_store', 'class="inputbox"', $row->description_mode_store) . '</td>
			<td>' . JText::_('E_D_DESCRIPTION_MODE_STORE') . '</td>
		</tr>      
          	
   </tr>
			<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_FORM_FIELDS') . '</td>
			<td><input onBlur="javascript:removeSpaces(this);" type="text" class="w250" maxsize="100"
				name="form_fields" value="' . $row->form_fields . '" /></td>
			<td>' . JText::_('E_D_FORM_FIELDS') . '</td>
		</tr>       	
          	
		<tr ' . HTML_joomla_flash_uploader::getRowClass() . '>
			<td>' . JText::_('E_S_SWF_TEXT') . '</td>
			<td><textarea rows="4" name="swf_text" id="swf_text"
				class="w250">' . $row->swf_text . '</textarea></td>
			<td>' . JText::_('E_D_SWF_TEXT') . '</td>
		</tr>
	</tbody>
</table>
</div>
';
        if ($row->id != '1') {
            echo '
<script type="text/javascript" src="components/com_jfuploader/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="components/com_jfuploader/js/jquery-ui-1.7.2.custom.min.js"></script>
<script>
     $jfu = jQuery.noConflict();
</script>
<script type="text/javascript" src="components/com_jfuploader/js/dragdrop_jfu.js"></script>

<div id="form4">';
            if ($row->gid == '') {
                echo '
<dl id="system-message">
<dt class="message">Message</dt>
<dd class="message message fade">
	<ul>

		<li>' . JText::_('E_USER_WARN') . '</li>
	</ul>
</dd>
</dl>
';
            } else {
                echo '
<br><p style="text-align:left;">' . JText::_('E_USER_MAIN') . '</p>';
                echo '
<p>' . JText::_('E_USER_HELP') . '</p><p>
' . JText::_('U_FILTER') . ' <input id="filter" onkeyup="doFilterList(this, \'list_1\');doFilterList(this, \'list_2\');" /> &nbsp;<a onclick="blur(); return resetListFilter();" href="#"><img src="components/com_jfuploader/images/cancel.png" style="margin:-3px;" height=14 border="0" /></a></p>
<fieldset class="batch" style="float:left;margin-top:0px;">       
       <legend>Add users to this profile</legend>
<div class="panel">
<h3>' . JText::_('E_USER_AV_USER') . '</h3>
<p>' . JText::_('E_USER_SELECT') . ': 
    <a href="#" onclick=\'return $jfu.dds.selectAll("list_1");\'>' . JText::_('E_USER_ALL') . '</a> 
    <a href="#" onclick=\'return $jfu.dds.selectNone("list_1");\'>' . JText::_('E_USER_NONE') . '</a> 
    <a href="#" onclick=\'return $jfu.dds.selectInvert("list_1");\'>' . JText::_('E_USER_INVERT') . '</a>

</p>
<ul id="list_1"><li class="invisible"></li>' . $a_user . '
</ul>
</div>

<div class="panel">
<h3>' . JText::_('E_USER_AS_USER') . '</h3>
<p>' . JText::_('E_USER_SELECT') . ': 
    <a href="#" onclick=\'return $jfu.dds.selectAll("list_2");\'>' . JText::_('E_USER_ALL') . '</a> 
    <a href="#" onclick=\'return $jfu.dds.selectNone("list_2");\'>' . JText::_('E_USER_NONE') . '</a> 
    <a href="#" onclick=\'return $jfu.dds.selectInvert("list_2");\'>' . JText::_('E_USER_INVERT') . '</a>

</p>

<ul id="list_2"><li class="invisible"></li>' . $p_user . '
</ul>
</div>';
                echo '
</fieldset>
';
                echo '
       <fieldset class="batch" style="margin-top:0px;margin-left:20px;float:left;">       
       <legend>Add user groups to this profile</legend>
        <ul class="checklist usergroups ">
';
                foreach ($f_groups as $group) {
                    $selected = $group->jselected == "true" ? " checked=checked " : "";
                    echo '
	<li>
		<input name="jgroupfront[]" value="' . $group->value . '" id="jgroupfront_' . $group->value . '" ' . $selected . ' type="checkbox">
		<label for="jgroupfront_' . $group->value . '">';
                    for ($i = 0; $i < $group->level; $i++) {
                        echo '<span class="gi">|—</span>';
                    }
                    echo $group->text . '</label>
	</li>
';
                }
                echo '</ul>';
                if (count($f_groups) == 0) {
                    echo '<div class="message fade">' . JText::_('U_USER_GROUP_ALL_ASSIGNED_IN_A_GROUP') . '</div>';
                } else {
                    echo '<div class="" style="clear:both;padding-top:10px;"><p>' . JText::_('U_AVAILABLE_LIST_GROUP') . '</p></div>';
                }
                echo '
</fieldset></div>
';
            }
            echo '
</div>
';
            echo <<<HTML
    <input type="hidden" name="list_2_sent" id="list_2_sent" value="" />
    <input type="hidden" name="list_2_changed" id="list_2_changed" value="no" />
HTML;
        }
        echo <<<HTML
    <input type="hidden" name="id" value="{$row->id}" />
    <input type="hidden" name="creation_date" value="{$row->creation_date}" />
    <input type="hidden" name="option" value="com_jfuploader" />
    <input type="hidden" name="task" value="saveConfig" />
</form>
HTML;
        echo '<script type="text/javascript">';
        if ($showUserPage) {
            echo 'showform("form4");';
        } else {
            echo 'showform("form1");';
        }
        echo '
testFolder();
</script>
';
    }
Пример #4
0
function showFlashPlugin($id, $twgpath) {
   global $prefix_path;

     $database = JFactory::getDBO();
	 $row = new joomla_flash_uploader($database);
	 $row->load($id);
	 if (!$row->resize_show) { // no profile found or no id!
	    return HTML_joomla_flash_uploader::wrongId($id, true);
	 } else {
	   $uploadfolder = $row->folder;
	   $uploadfolder_base = $uploadfolder;

	   $user = JFactory::getUser();
        // we check if we have a master profile!
       if ($row->master_profile == 'true') {
	      if ($user->id != 0 || $row->master_profile_mode == 'ip') {
               if ($row->master_profile_mode == 'id') {
                    $_SESSION["s_user"] = $user->id;
                    $uploadfolder = $uploadfolder . '/' . $user->id;
                } else if ($row->master_profile_mode == 'ip') {
                    $uploadfolder = $uploadfolder . '/' . $_SERVER['REMOTE_ADDR'];
                } else if ($row->master_profile_mode == 'group') {
                    $group = JFUHelper::getHighestGroupName($database, $user->groups);
                    
                    if ($row->master_profile_lowercase == 'true') {
                        $normalizeSpaces=true;
                        $group = normalizeFileNames($group);      
                    } 
                     $uploadfolder = $uploadfolder . '/' . $group;
                 } else {
                    if ($row->master_profile_mode == 'login') {
                        $uname = $user->username;
                    } else {
                        $uname = $user->name;
                    }
                    $_SESSION["s_user"] = $uname;
                    if ($row->master_profile_lowercase == 'true') {
                        $normalizeSpaces=true;
                        $uname = normalizeFileNames($uname);
                    }
                    $uploadfolder = $uploadfolder . '/' . $uname;  
                }
              // we check if the folder exists - if not it is created!
              if (!file_exists($uploadfolder) && $uploadfolder != "") {
                 $dir_chmod = JFUHelper::getVariable($database, 'dir_chmod'); 
                 $ftp_enable = $row->ftp_enable;  
                 if (isset($ftp_enable) && $ftp_enable == 'true') {
                        $ftp_host = $row->ftp_host; 
                        $ftp_port = $row->ftp_port; 
                        $ftp_user = $row->ftp_user; 
                        $ftp_pass = $row->ftp_pass; 
                        $ftp_root = $row->ftp_root;                                  
                        $ftp_createdir = $uploadfolder;
                        $conn_id = ftp_connect($ftp_host, $ftp_port); 
                        $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);                         
                        ftp_chdir($conn_id, $ftp_root); 
                        $result = ftp_mkdir ($conn_id , $ftp_createdir);
                        if ($result && $dir_chmod != 0) {
                          @ftp_chmod($conn_id, $dir_chmod, $ftp_createdir);
                        }
                        ftp_close($conn_id);
                  } else {
                      $result = mkdir($uploadfolder);  
                      if ($result && $dir_chmod != 0) {
                        @chmod($uploadfolder, $dir_chmod);
                      }
                 }
                // if the copy directory exists we copy everything!
                $extra_dir = "components/com_jfuploader/default";
                if (file_exists($extra_dir)) {
                  JFUHelper::dir_copy($extra_dir, $uploadfolder);
                } 
              }
          } else {
              return HTML_joomla_flash_uploader::noUser($id,true);          
          }
       }
       
       if (file_exists("components/com_jfuploader/tfu/tfu_helper.php")) {
         $prefix_path = '';
         $prefix_dir_path = '';
       } else {
         $prefix_path = 'administrator/';
         $prefix_dir_path = '../';
       }      
	     // we go back to the main folder!
       if ($uploadfolder == "") {
         $folder =  './'.$prefix_dir_path.'../../..';
       } else {
         $folder =  './'.$prefix_dir_path.'../../../' . $uploadfolder;
       }
       JFUHelper::setJFUSession($row, $folder, $database); 
       unset($_SESSION["IS_ADMIN"]);
       $_SESSION["IS_FRONTEND"] = "TRUE";
       if ($user->id != 0) {
         $_SESSION["TFU_USER"] = $user->username;
         $_SESSION["TFU_USER_ID"] = $user->id;
         $_SESSION["TFU_USER_NAME"] = $user->name;
         $_SESSION["TFU_USER_EMAIL"] = $user->email;
         JFUHelper::setContactDetailsToSession($user->id);
       } else {
         unset($_SESSION['TFU_USER']);
         unset($_SESSION['TFU_USER_ID']);
         unset($_SESSION['TFU_USER_NAME']);
         unset($_SESSION['TFU_USER_EMAIL']);
         unset($_SESSION['TFU_USER_CONTACT']);
       }
       
        // we check if the flash should be included with js oder the object tag
       $use_js_include = JFUHelper::check_js_include($database);
       $jfu_config['idn_url']= JFUHelper::getVariable($database, 'idn_url');     
             
       store_temp_session();
       JFUHelper::fixSession();
       
       $thumbnailflash = '';
       if ($twgpath != '') {
         $thumbnailflash = $this->getFlashContent($twgpath, $uploadfolder,$use_js_include);
       }
       return  HTML_joomla_flash_uploader::showFlash( $row, $uploadfolder, $use_js_include, $jfu_config, true ) . $thumbnailflash;
	 }	 
}
Пример #5
0
 function showFlashComponent($id, $user, $editor_plugin, $block_type, $jfu_params)
 {
     global $prefix_dir_path, $prefix_path;
     $database =& JFactory::getDBO();
     $row = new joomla_flash_uploader($database);
     $row->load($id);
     if (!$row->resize_show) {
         // no profile found or no id!
         HTML_joomla_flash_uploader::wrongId($id);
     } else {
         $uploadfolder = $row->folder;
         $uploadfolder_base = $uploadfolder;
         // we check if we have a master profile!
         if ($row->master_profile == 'true') {
             if ($user->id != 0 || $row->master_profile_mode == 'ip') {
                 if ($row->master_profile_mode == 'id') {
                     $_SESSION["s_user"] = $user->id;
                     $uploadfolder = $uploadfolder . '/' . $user->id;
                 } else {
                     if ($row->master_profile_mode == 'ip') {
                         $uploadfolder = $uploadfolder . '/' . $_SERVER['REMOTE_ADDR'];
                     } else {
                         if ($row->master_profile_mode == 'group') {
                             $group = JFUHelper::getHighestGroupName($database, $user->groups);
                             if ($row->master_profile_lowercase == 'true') {
                                 $normalizeSpaces = true;
                                 $group = normalizeFileNames($group);
                             }
                             $uploadfolder = $uploadfolder . '/' . $group;
                         } else {
                             if ($row->master_profile_mode == 'login') {
                                 $uname = $user->username;
                             } else {
                                 $uname = $user->name;
                             }
                             $_SESSION["s_user"] = $uname;
                             if ($row->master_profile_lowercase == 'true') {
                                 $normalizeSpaces = true;
                                 $uname = normalizeFileNames($uname);
                             }
                             $uploadfolder = $uploadfolder . '/' . $uname;
                         }
                     }
                 }
                 // we check if the folder exists - if not it is created!
                 if (!file_exists($uploadfolder) && $uploadfolder != "") {
                     $dir_chmod = JFUHelper::getVariable($database, 'dir_chmod');
                     $ftp_enable = $row->ftp_enable;
                     if (isset($ftp_enable) && $ftp_enable == 'true') {
                         $ftp_host = $row->ftp_host;
                         $ftp_port = $row->ftp_port;
                         $ftp_user = $row->ftp_user;
                         $ftp_pass = $row->ftp_pass;
                         $ftp_root = $row->ftp_root;
                         $ftp_createdir = $uploadfolder;
                         $conn_id = ftp_connect($ftp_host, $ftp_port);
                         $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);
                         ftp_chdir($conn_id, $ftp_root);
                         $result = ftp_mkdir($conn_id, $ftp_createdir);
                         if ($result && $dir_chmod != 0) {
                             @ftp_chmod($conn_id, $dir_chmod, $ftp_createdir);
                         }
                         ftp_close($conn_id);
                     } else {
                         $result = mkdir($uploadfolder);
                         if ($result && $dir_chmod != 0) {
                             @chmod($uploadfolder, $dir_chmod);
                         }
                     }
                     // if the copy directory exists we copy everything!
                     $extra_dir = "components/com_jfuploader/default";
                     if (file_exists($extra_dir)) {
                         JFUHelper::dir_copy($extra_dir, $uploadfolder);
                     }
                 }
             } else {
                 HTML_joomla_flash_uploader::noUser($id);
                 return;
             }
         }
         // we go back to the main folder! path has to be relativ to the tfu upload folder!
         if ($uploadfolder == "") {
             $folder = './' . $prefix_dir_path . '../../..';
         } else {
             $folder = './' . $prefix_dir_path . '../../../' . $uploadfolder;
         }
         JFUHelper::setJFUSession($row, $folder, $database);
         unset($_SESSION["IS_ADMIN"]);
         $_SESSION["IS_FRONTEND"] = "TRUE";
         if ($user->id != 0) {
             $_SESSION["TFU_USER"] = $user->name;
             $_SESSION["TFU_USER_ID"] = $user->id;
             $_SESSION["TFU_USER_NAME"] = $user->username;
             $_SESSION["TFU_USER_EMAIL"] = $user->email;
             JFUHelper::setContactDetailsToSession($user->id);
         } else {
             unset($_SESSION['TFU_USER']);
             unset($_SESSION['TFU_USER_ID']);
             unset($_SESSION['TFU_USER_NAME']);
             unset($_SESSION['TFU_USER_EMAIL']);
             unset($_SESSION['TFU_USER_CONTACT']);
         }
         // we check if the flash should be included with js oder the object tag
         $use_js_include = JFUHelper::check_js_include($database);
         $jfu_config['idn_url'] = JFUHelper::getVariable($database, 'idn_url');
         if (!$editor_plugin) {
             JFUHelper::fixSession();
             store_temp_session();
             HTML_joomla_flash_uploader::showFlash($row, $uploadfolder, $use_js_include, $jfu_config, false);
         } else {
             $_SESSION['TFU']['IS_JFU_PLUGIN'] = true;
             JFUHelper::fixSession();
             store_temp_session();
             // I have to set the javascript setting to update the data!
             $flash = HTML_joomla_flash_uploader::showFlash($row, $uploadfolder, $use_js_include, $jfu_config, true);
             echo '
      <style type="text/css">
        body.contentpane { background-color:#ffffff; margin-top:15px; margin-left:15px; margin-bottom:0px; overflow-y: hidden; overflow-x: hidden; line-height: 1.4;} 
        #main { padding: 0px;} 
      </style>';
             echo $flash;
             $base_path = JURI::base();
             HTML_joomla_flash_uploader::showImageSelector($base_path, $block_type, $jfu_params);
         }
     }
 }
Пример #6
0
function showPlugins()
{
    $database = JFactory::getDBO();
    $my = JFactory::getUser();
    if (checkAccess($database, 'core.admin')) {
        $plugins = array();
        $show_hint = false;
        foreach (glob(dirname(__FILE__) . '/tfu/*_plugin.php') as $filename) {
            $name = 'Not set';
            $description = 'Not set';
            $version_plugin = 'Not set';
            $version_tfu = 'Not set';
            $content = file_get_contents($filename);
            $hits = preg_match('/(Name:)([^\\n]*)(\\n)/i', $content, $treffer);
            if ($hits != 0) {
                $name = trim($treffer[2]);
            }
            $hits = preg_match('/(Description:)([^\\n]*)(\\n)/i', $content, $treffer);
            if ($hits != 0) {
                $description = trim($treffer[2]);
            }
            $hits = preg_match('/(Version Plugin:)([^\\n]*)(\\n)/i', $content, $treffer);
            if ($hits != 0) {
                $version_plugin = trim($treffer[2]);
            }
            $hits = preg_match('/(Needed flash version:)([^\\n]*)(\\n)/i', $content, $treffer);
            if ($hits != 0) {
                $version_tfu = trim($treffer[2]);
                if (version_compare($version_tfu, JFUHelper::getVariable($database, 'version')) == 1) {
                    $version_tfu = 'style="color: #ff0000;"';
                    $show_hint = true;
                } else {
                    $version_tfu = '';
                }
            }
            $plugins[] = array(basename($filename), htmlentities($name), htmlentities($description), $version_plugin, $version_tfu);
        }
        $available = array("a_plugin", "move_plugin");
        HTML_joomla_flash_uploader::showPlugins($plugins, $show_hint);
    } else {
        HTML_joomla_flash_uploader::errorRights();
    }
}
function chmod_tfu($mode)
{
    global $mainframe;
    $database =& JFactory::getDBO();
    $my =& JFactory::getUser();
    if (checkAccess($database, $my->usertype, 'backend_access_config')) {
        chmod(dirname(__FILE__) . "/tfu/tfu_config.php", $mode);
        chmod(dirname(__FILE__) . "/tfu/tfu_login.php", $mode);
        chmod(dirname(__FILE__) . "/tfu/tfu_file.php", $mode);
        chmod(dirname(__FILE__) . "/tfu/tfu_upload.php", $mode);
        cleanMessageQueue();
        $mainframe->redirect("index2.php?option=com_joomla_flash_uploader&act=help", JText::_('H_L_CHMOD_MES'));
    } else {
        HTML_joomla_flash_uploader::errorRights();
    }
}