little fixes and git admin

Dieser Commit ist enthalten in:
o.pinke 2021-05-23 11:17:02 +02:00
Ursprung a7f1f3edb4
Commit dbaaa6ffa5
10 geänderte Dateien mit 611 neuen und 731 gelöschten Zeilen

2
.gitignore vendored
Datei anzeigen

@ -13,3 +13,5 @@
!/cms/data/layouts/ !/cms/data/layouts/
/cms/data/layouts/* /cms/data/layouts/*
/conlite/includes/include.style_edit_form_1.php /conlite/includes/include.style_edit_form_1.php
/cms/config.local.php
/cms/dflip/

6
cms/upload/.gitignore vendored Normale Datei
Datei anzeigen

@ -0,0 +1,6 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
!/Flexslider
!/Gallery

Datei anzeigen

@ -443,15 +443,13 @@ class cFileHandler {
* true if the given filename is valid, false otherwise * true if the given filename is valid, false otherwise
*/ */
public static function validateFilename($filename, $notifyAndExitOnFailure = true) { public static function validateFilename($filename, $notifyAndExitOnFailure = true) {
$notification = new Contenido_Notification();
// check if filename only contains valid characters // check if filename only contains valid characters
if (preg_match('/[^a-z0-9._-]/i', $filename)) { if (preg_match('/[^a-z0-9._-]/i', $filename)) {
// validation failure... // validation failure...
if ($notifyAndExitOnFailure) { if ($notifyAndExitOnFailure) {
// display notification and exit $notification->displayNotification("error", i18n("Please insert file name."));
cRegistry::addErrorMessage(i18n('Wrong file name.'));
$page = new cGuiPage('generic_page');
$page->abortRendering();
$page->render();
exit(); exit();
} }
@ -463,7 +461,6 @@ class cFileHandler {
// validation failure... // validation failure...
if ($notifyAndExitOnFailure) { if ($notifyAndExitOnFailure) {
// display notification and exit // display notification and exit
$notification = new cGuiNotification();
$notification->displayNotification("error", i18n("Please insert file name.")); $notification->displayNotification("error", i18n("Please insert file name."));
exit(); exit();
} }

Datei anzeigen

@ -194,7 +194,7 @@ class Template {
$sModName = strtolower(uplCreateFriendlyName($tmpModule->get('name'))); $sModName = strtolower(uplCreateFriendlyName($tmpModule->get('name')));
$aModFileEditConf = $tmpModule->getModFileEditConf(); $aModFileEditConf = $tmpModule->getModFileEditConf();
unset($tmpModule); unset($tmpModule);
$sTmpPath = $aModFileEditConf['modPath'] . $sModName . "/template/" . $template; $sTmpPath = $aModFileEditConf['modPath'] . $sModName . "/template/" . str_replace('templates/', '', $template);
if (is_readable($sTmpPath)) { if (is_readable($sTmpPath)) {
$template = $sTmpPath; $template = $sTmpPath;
$bModTplUsed = TRUE; $bModTplUsed = TRUE;

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -30,8 +31,7 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -57,7 +57,7 @@ function removeFileInformation($iIdClient, $sFilename, $sType, $oDb) {
$sFilename = Contenido_Security::filter((string) $sFilename, $oDb); $sFilename = Contenido_Security::filter((string) $sFilename, $oDb);
$sType = Contenido_Security::filter((string) $sType, $oDb); $sType = Contenido_Security::filter((string) $sType, $oDb);
$sSql = "DELETE FROM `".$cfg["tab"]["file_information"]."` WHERE idclient=$iIdClient AND $sSql = "DELETE FROM `" . $cfg["tab"]["file_information"] . "` WHERE idclient=$iIdClient AND
filename='$sFilename' AND filename='$sFilename' AND
type='$sType';"; type='$sType';";
$oDb->query($sSql); $oDb->query($sSql);
@ -82,7 +82,7 @@ function removeFileInformation($iIdClient, $sFilename, $sType, $oDb) {
* description - Description which was inserted for this file * description - Description which was inserted for this file
* *
*/ */
function getFileInformation ($iIdClient, $sFilename, $sType, $oDb) { function getFileInformation($iIdClient, $sFilename, $sType, $oDb) {
global $cfg; global $cfg;
if (!isset($oDb) || !is_object($oDb)) { if (!isset($oDb) || !is_object($oDb)) {
@ -94,7 +94,7 @@ function getFileInformation ($iIdClient, $sFilename, $sType, $oDb) {
$sType = Contenido_Security::filter((string) $sType, $oDb); $sType = Contenido_Security::filter((string) $sType, $oDb);
$aFileInformation = array(); $aFileInformation = array();
$sSql = "SELECT * FROM `".$cfg["tab"]["file_information"]."` WHERE idclient=$iIdClient AND $sSql = "SELECT * FROM `" . $cfg["tab"]["file_information"] . "` WHERE idclient=$iIdClient AND
filename='$sFilename' AND filename='$sFilename' AND
type='$sType';"; type='$sType';";
$oDb->query($sSql); $oDb->query($sSql);
@ -145,13 +145,13 @@ function updateFileInformation($iIdClient, $sFilename, $sType, $sAuthor, $sDescr
$sDescription = Contenido_Security::filter((string) stripslashes($sDescription), $oDb); $sDescription = Contenido_Security::filter((string) stripslashes($sDescription), $oDb);
$sAuthor = Contenido_Security::filter((string) $sAuthor, $oDb); $sAuthor = Contenido_Security::filter((string) $sAuthor, $oDb);
$sSql = "SELECT * from `".$cfg["tab"]["file_information"]."` WHERE idclient=$iIdClient AND $sSql = "SELECT * from `" . $cfg["tab"]["file_information"] . "` WHERE idclient=$iIdClient AND
filename='$sFilename' AND filename='$sFilename' AND
type='$sType';"; type='$sType';";
$oDb->query($sSql); $oDb->query($sSql);
if ($oDb->num_rows() == 0) { if ($oDb->num_rows() == 0) {
$iNextId = $oDb->nextid('con_style_file_information'); $iNextId = $oDb->nextid('con_style_file_information');
$sSql = "INSERT INTO `".$cfg["tab"]["file_information"]."` ( `idsfi` , $sSql = "INSERT INTO `" . $cfg["tab"]["file_information"] . "` ( `idsfi` ,
`idclient` , `idclient` ,
`type` , `type` ,
`filename` , `filename` ,
@ -172,7 +172,7 @@ function updateFileInformation($iIdClient, $sFilename, $sType, $sAuthor, $sDescr
'$sDescription' '$sDescription'
);"; );";
} else { } else {
$sSql = "UPDATE `".$cfg["tab"]["file_information"]."` SET `lastmodified` = NOW(), $sSql = "UPDATE `" . $cfg["tab"]["file_information"] . "` SET `lastmodified` = NOW(),
`modifiedby` = '$sAuthor', `modifiedby` = '$sAuthor',
`description` = '$sDescription', `description` = '$sDescription',
`filename` = '$sFilenameNew' `filename` = '$sFilenameNew'
@ -187,7 +187,6 @@ function updateFileInformation($iIdClient, $sFilename, $sType, $sAuthor, $sDescr
$oDb->free(); $oDb->free();
} }
/** /**
* Writes passed data into a file using binary mode. * Writes passed data into a file using binary mode.
* *
@ -199,44 +198,31 @@ function updateFileInformation($iIdClient, $sFilename, $sType, $sAuthor, $sDescr
* @return (string|void) Either content of file o nothing * @return (string|void) Either content of file o nothing
*/ */
function fileEdit($filename, $sCode, $path) { function fileEdit($filename, $sCode, $path) {
global $notification; $oNot = new Contenido_Notification();
// FIXME: fileValidateFilename does also the validation but display another message! // FIXME: fileValidateFilename does also the validation but display another message!
if (strlen(trim($filename)) == 0) { if (strlen(trim($filename)) == 0) {
$notification->displayNotification("error", i18n("Please insert filename.")); $oNot->displayNotification("error", i18n("Please insert filename."));
return false; return false;
} }
cFileHandler::validateFilename($filename);
fileValidateFilename($filename, true); if (is_writable($path . $filename)) {
// FIXME: Should be replaced against file_put_contents($path . $filename, FILE_BINARY | LOCK_EX | FILE_APPEND)
if (is_writable($path.$filename)) {
if (strlen(stripslashes(trim($sCode))) > 0) { if (strlen(stripslashes(trim($sCode))) > 0) {
# open file if (!empty($sCode)) {
if (!$handle = fopen($path.$filename, "wb+")) { $sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING');
$notification->displayNotification("error", sprintf(i18n("Could not open file %s"), $path.$filename));
exit;
} }
# write file cFileHandler::write($path . $filename, $sCode);
if (!fwrite($handle, stripslashes($sCode))) {
$notification->displayNotification("error", sprintf(i18n("Could not write file %s"), $path.$filename));
exit;
}
fclose($handle);
return true; return true;
} else { } else {
return false; return false;
} }
} else { } else {
$notification->displayNotification("error", sprintf(i18n("%s is not writable"), $path.$filename)); $oNot->displayNotification("error", sprintf(i18n("%s is not writable"), $path . $filename));
exit; exit;
} }
} }
/** /**
* Reads content of file into memory using binary mode and returns it back. * Reads content of file into memory using binary mode and returns it back.
* *
@ -247,28 +233,13 @@ function fileEdit($filename, $sCode, $path) {
* @return (string|void) Either content of file o nothing * @return (string|void) Either content of file o nothing
*/ */
function getFileContent($filename, $path) { function getFileContent($filename, $path) {
global $notification; $sCode = cFileHandler::read($path . $filename);
if (!empty($sCode)) {
// FIXME: Should be replaced against file_get_contents($path . $filename, FILE_BINARY) $sCode = mb_convert_encoding($sCode, 'UTF-8', 'OLD-ENCODING');
if (!$handle = fopen($path.$filename, "rb")) {
$notification->displayNotification("error", sprintf(i18n("Can not open file%s "), $path.$filename));
exit;
} }
return $sCode;
do {
$_data = fread($handle, 4096);
if (strlen($_data) == 0) {
break;
}
$sFileContents .= $_data;
} while(true);
fclose($handle);
return $sFileContents;
} }
/** /**
* Returns the filetype (extension). * Returns the filetype (extension).
* *
@ -280,7 +251,6 @@ function getFileType($filename) {
return $aFileName[count($aFileName) - 1]; return $aFileName[count($aFileName) - 1];
} }
/** /**
* Creates a file. * Creates a file.
* *
@ -291,26 +261,18 @@ function getFileType($filename) {
* @return (void|bool) Either true on success or nothing * @return (void|bool) Either true on success or nothing
*/ */
function createFile($filename, $path) { function createFile($filename, $path) {
global $notification; $oNot = new Contenido_Notification();
fileValidateFilename($filename, true); cFileHandler::validateFilename($filename);
# create the file if (cFileHandler::create($path . $filename)) {
if (touch($path.$filename)) {
# change file access permission
if(chmod ($path.$filename, 0777)) {
return true; return true;
} else { } else {
$notification->displayNotification("error", $path.$filename." ".i18n("Unable to change file access permission.")); $oNot->displayNotification("error", sprintf(i18n("Unable to create file %s"), $path . $filename));
exit;
}
} else {
$notification->displayNotification("error", sprintf(i18n("Unable to create file %s"), $path.$filename));
exit; exit;
} }
} }
/** /**
* Renames a existing file. * Renames a existing file.
* *
@ -322,25 +284,24 @@ function createFile($filename, $path) {
* @return (void|string) Either new filename or nothing * @return (void|string) Either new filename or nothing
*/ */
function renameFile($sOldFile, $sNewFile, $path) { function renameFile($sOldFile, $sNewFile, $path) {
global $notification; $oNot = new Contenido_Notification();
fileValidateFilename($sNewFile, true); fileValidateFilename($sNewFile, true);
if (is_writable($path.$sOldFile)) { if (is_writable($path . $sOldFile)) {
# rename file # rename file
if (rename($path.$sOldFile, $path.$sNewFile)) { if (rename($path . $sOldFile, $path . $sNewFile)) {
return $sNewFile; return $sNewFile;
} else { } else {
$notification->displayNotification("error", sprintf(i18n("Can not rename file %s"),$path.$sOldFile)); $oNot->displayNotification("error", sprintf(i18n("Can not rename file %s"), $path . $sOldFile));
exit; exit;
} }
} else { } else {
$notification->displayNotification("error", sprintf(i18n("%s is not writable"), $path.$sOldFile)); $oNot->displayNotification("error", sprintf(i18n("%s is not writable"), $path . $sOldFile));
exit; exit;
} }
} }
/** /**
* Validates passed filename. Filename can contain alphanumeric characters, dot, underscore or a hyphen. * Validates passed filename. Filename can contain alphanumeric characters, dot, underscore or a hyphen.
* *
@ -352,13 +313,13 @@ function renameFile($sOldFile, $sNewFile, $path) {
* @return (void|bool) Either validation result or nothing (depends on second parameter) * @return (void|bool) Either validation result or nothing (depends on second parameter)
*/ */
function fileValidateFilename($filename, $notifyAndExitOnFailure = true) { function fileValidateFilename($filename, $notifyAndExitOnFailure = true) {
global $notification;
if (preg_match('/[^a-z0-9._-]/i', $filename)) { if (preg_match('/[^a-z0-9._-]/i', $filename)) {
// validation failure... // validation failure...
if ($notifyAndExitOnFailure == true) { if ($notifyAndExitOnFailure == true) {
$oNot = new Contenido_Notification();
// display notification and exit // display notification and exit
$notification->displayNotification('error', i18n('Wrong filename.')); $oNot->displayNotification('error', i18n('Wrong filename.'));
exit; exit;
} }
return false; return false;

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -28,8 +29,7 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -45,8 +45,7 @@ $page = new cPage;
$tpl->reset(); $tpl->reset();
if (!$perm->have_perm_area_action($area, $action)) if (!$perm->have_perm_area_action($area, $action)) {
{
$notification->displayNotification("error", i18n("Permission denied")); $notification->displayNotification("error", i18n("Permission denied"));
} else if (!(int) $client > 0) { } else if (!(int) $client > 0) {
#if there is no client selected, display empty page #if there is no client selected, display empty page
@ -56,11 +55,9 @@ if (!$perm->have_perm_area_action($area, $action))
$sTempFilename = stripslashes($_REQUEST['tmp_file']); $sTempFilename = stripslashes($_REQUEST['tmp_file']);
$sOrigFileName = $sTempFilename; $sOrigFileName = $sTempFilename;
if (getFileType($_REQUEST['file']) != $sFileType AND strlen(stripslashes(trim($_REQUEST['file']))) > 0) if (getFileType($_REQUEST['file']) != $sFileType AND strlen(stripslashes(trim($_REQUEST['file']))) > 0) {
{ $sFilename .= stripslashes($_REQUEST['file']) . ".$sFileType";
$sFilename .= stripslashes($_REQUEST['file']).".$sFileType"; } else {
}else
{
$sFilename .= stripslashes($_REQUEST['file']); $sFilename .= stripslashes($_REQUEST['file']);
} }
@ -70,7 +67,7 @@ if (!$perm->have_perm_area_action($area, $action))
if (left_bottom) { if (left_bottom) {
var href = left_bottom.location.href; var href = left_bottom.location.href;
href = href.replace(/&file[^&]*/, ''); href = href.replace(/&file[^&]*/, '');
left_bottom.location.href = href+'&file='+'".$sFilename."'; left_bottom.location.href = href+'&file='+'" . $sFilename . "';
} }
</script>"; </script>";
@ -80,11 +77,10 @@ if (!$perm->have_perm_area_action($area, $action))
// Content Type is template // Content Type is template
$sTypeContent = "js"; $sTypeContent = "js";
$aFileInfo = getFileInformation ($client, $sTempFilename, $sTypeContent, $db); $aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
# create new file # create new file
if ( $_REQUEST['action'] == $sActionCreate AND $_REQUEST['status'] == 'send') if ($_REQUEST['action'] == $sActionCreate AND $_REQUEST['status'] == 'send') {
{
$sTempFilename = $sFilename; $sTempFilename = $sFilename;
createFile($sFilename, $path); createFile($sFilename, $path);
$bEdit = fileEdit($sFilename, $_REQUEST['code'], $path); $bEdit = fileEdit($sFilename, $_REQUEST['code'], $path);
@ -92,27 +88,24 @@ if (!$perm->have_perm_area_action($area, $action))
$sReloadScript .= "<script type=\"text/javascript\"> $sReloadScript .= "<script type=\"text/javascript\">
var right_top = top.content.right.right_top; var right_top = top.content.right.right_top;
if (right_top) { if (right_top) {
var href = '".$sess->url("main.php?area=$area&frame=3&file=$sTempFilename")."'; var href = '" . $sess->url("main.php?area=$area&frame=3&file=$sTempFilename") . "';
right_top.location.href = href; right_top.location.href = href;
} }
</script>"; </script>";
} }
# edit selected file # edit selected file
if ( $_REQUEST['action'] == $sActionEdit AND $_REQUEST['status'] == 'send') if ($_REQUEST['action'] == $sActionEdit AND $_REQUEST['status'] == 'send') {
{ if ($sFilename != $sTempFilename) {
if ($sFilename != $sTempFilename)
{
$sTempFilename = renameFile($sTempFilename, $sFilename, $path); $sTempFilename = renameFile($sTempFilename, $sFilename, $path);
$sReloadScript .= "<script type=\"text/javascript\"> $sReloadScript .= "<script type=\"text/javascript\">
var right_top = top.content.right.right_top; var right_top = top.content.right.right_top;
if (right_top) { if (right_top) {
var href = '".$sess->url("main.php?area=$area&frame=3&file=$sTempFilename")."'; var href = '" . $sess->url("main.php?area=$area&frame=3&file=$sTempFilename") . "';
right_top.location.href = href; right_top.location.href = href;
} }
</script>"; </script>";
}else } else {
{
$sTempFilename = $sFilename; $sTempFilename = $sFilename;
} }
@ -120,13 +113,13 @@ if (!$perm->have_perm_area_action($area, $action))
/** /**
* START TRACK VERSION * START TRACK VERSION
**/ * */
if((count($aFileInfo) == 0) || ((int)$aFileInfo["idsfi"] == 0)) { if ((count($aFileInfo) == 0) || ((int) $aFileInfo["idsfi"] == 0)) {
$aFileInfo = getFileInformation ($client, $sTempFilename, $sTypeContent, $db); $aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
$aFileInfo['description'] = ''; $aFileInfo['description'] = '';
} }
if(count($aFileInfo) > 0 && $aFileInfo["idsfi"] !="") { if (count($aFileInfo) > 0 && $aFileInfo["idsfi"] != "") {
$oVersion = new VersionFile($aFileInfo["idsfi"], $aFileInfo, $sFilename, $sTypeContent, $cfg, $cfgClient, $db, $client, $area, $frame, $sOrigFileName); $oVersion = new VersionFile($aFileInfo["idsfi"], $aFileInfo, $sFilename, $sTypeContent, $cfg, $cfgClient, $db, $client, $area, $frame, $sOrigFileName);
// Create new Jscript Version in cms/version/js/ folder // Create new Jscript Version in cms/version/js/ folder
$oVersion->createNewVersion(); $oVersion->createNewVersion();
@ -134,24 +127,19 @@ if (!$perm->have_perm_area_action($area, $action))
/** /**
* END TRACK VERSION * END TRACK VERSION
**/ * */
$bEdit = fileEdit($sFilename, $_REQUEST['code'], $path); $bEdit = fileEdit($sFilename, $_REQUEST['code'], $path);
} }
# generate edit form # generate edit form
if (isset($_REQUEST['action'])) if (isset($_REQUEST['action'])) {
{
$aFileInfo = getFileInformation($client, $sFilename, $sTypeContent, $db); $aFileInfo = getFileInformation($client, $sFilename, $sTypeContent, $db);
$sAction = ($bEdit) ? $sActionEdit : $_REQUEST['action']; $sAction = ($bEdit) ? $sActionEdit : $_REQUEST['action'];
if ($_REQUEST['action'] == $sActionEdit) if ($_REQUEST['action'] == $sActionEdit) {
{
$sCode = getFileContent($sFilename, $path); $sCode = getFileContent($sFilename, $path);
}else } else {
{
$sCode = stripslashes($_REQUEST['code']); # stripslashes is required here in case of creating a new file $sCode = stripslashes($_REQUEST['code']); # stripslashes is required here in case of creating a new file
} }
@ -172,9 +160,9 @@ if (!$perm->have_perm_area_action($area, $action))
$descr->setStyle("font-family: monospace;width: 100%;"); $descr->setStyle("font-family: monospace;width: 100%;");
$ta_code->updateAttributes(array("wrap" => getEffectiveSetting('script_editor', 'wrap', 'off'))); $ta_code->updateAttributes(array("wrap" => getEffectiveSetting('script_editor', 'wrap', 'off')));
$form->add(i18n("Name"),$tb_name); $form->add(i18n("Name"), $tb_name);
$form->add(i18n("Description"), $descr->render()); $form->add(i18n("Description"), $descr->render());
$form->add(i18n("Code"),$ta_code); $form->add(i18n("Code"), $ta_code);
$page->setContent($form->render()); $page->setContent($form->render());
@ -183,8 +171,6 @@ if (!$perm->have_perm_area_action($area, $action))
$page->addScript('reload', $sReloadScript); $page->addScript('reload', $sReloadScript);
$page->render(); $page->render();
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -28,8 +29,7 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -46,8 +46,7 @@ $page->setEncoding("utf-8");
$tpl->reset(); $tpl->reset();
if (!$perm->have_perm_area_action($area, $action)) if (!$perm->have_perm_area_action($area, $action)) {
{
$notification->displayNotification("error", i18n("Permission denied")); $notification->displayNotification("error", i18n("Permission denied"));
} else if (!(int) $client > 0) { } else if (!(int) $client > 0) {
#if there is no client selected, display empty page #if there is no client selected, display empty page
@ -60,7 +59,7 @@ if (!$perm->have_perm_area_action($area, $action))
if (left_bottom) { if (left_bottom) {
var href = left_bottom.location.href; var href = left_bottom.location.href;
href = href.replace(/&file.*/, ''); href = href.replace(/&file.*/, '');
left_bottom.location.href = href+'&file='+'".$_REQUEST['file']."'; left_bottom.location.href = href+'&file='+'" . $_REQUEST['file'] . "';
} }
</script>"; </script>";
@ -71,11 +70,9 @@ if (!$perm->have_perm_area_action($area, $action))
$sTempFilename = stripslashes($_REQUEST['tmp_file']); $sTempFilename = stripslashes($_REQUEST['tmp_file']);
$sOrigFileName = $sTempFilename; $sOrigFileName = $sTempFilename;
if (getFileType($_REQUEST['file']) != $sFileType AND strlen(stripslashes(trim($_REQUEST['file']))) > 0) if (getFileType($_REQUEST['file']) != $sFileType AND strlen(stripslashes(trim($_REQUEST['file']))) > 0) {
{ $sFilename .= stripslashes($_REQUEST['file']) . ".$sFileType";
$sFilename .= stripslashes($_REQUEST['file']).".$sFileType"; } else {
}else
{
$sFilename .= stripslashes($_REQUEST['file']); $sFilename .= stripslashes($_REQUEST['file']);
} }
@ -85,7 +82,7 @@ if (!$perm->have_perm_area_action($area, $action))
if (left_bottom) { if (left_bottom) {
var href = left_bottom.location.href; var href = left_bottom.location.href;
href = href.replace(/&file[^&]*/, ''); href = href.replace(/&file[^&]*/, '');
left_bottom.location.href = href+'&file='+'".$sFilename."'; left_bottom.location.href = href+'&file='+'" . $sFilename . "';
} }
</script>"; </script>";
@ -95,11 +92,10 @@ if (!$perm->have_perm_area_action($area, $action))
// Content Type is css // Content Type is css
$sTypeContent = "css"; $sTypeContent = "css";
$aFileInfo = getFileInformation ($client, $sTempFilename, $sTypeContent, $db); $aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
# create new file # create new file
if ( $_REQUEST['action'] == $sActionCreate AND $_REQUEST['status'] == 'send') if ($_REQUEST['action'] == $sActionCreate AND $_REQUEST['status'] == 'send') {
{
$sTempFilename = $sFilename; $sTempFilename = $sFilename;
createFile($sFilename, $path); createFile($sFilename, $path);
$bEdit = fileEdit($sFilename, $_REQUEST['code'], $path); $bEdit = fileEdit($sFilename, $_REQUEST['code'], $path);
@ -107,27 +103,24 @@ if (!$perm->have_perm_area_action($area, $action))
$sReloadScript .= "<script type=\"text/javascript\"> $sReloadScript .= "<script type=\"text/javascript\">
var right_top = top.content.right.right_top; var right_top = top.content.right.right_top;
if (right_top) { if (right_top) {
var href = '".$sess->url("main.php?area=$area&frame=3&file=$sTempFilename")."'; var href = '" . $sess->url("main.php?area=$area&frame=3&file=$sTempFilename") . "';
right_top.location.href = href; right_top.location.href = href;
} }
</script>"; </script>";
} }
# edit selected file # edit selected file
if ( $_REQUEST['action'] == $sActionEdit AND $_REQUEST['status'] == 'send') if ($_REQUEST['action'] == $sActionEdit AND $_REQUEST['status'] == 'send') {
{ if ($sFilename != $sTempFilename) {
if ($sFilename != $sTempFilename)
{
$sTempFilename = renameFile($sTempFilename, $sFilename, $path); $sTempFilename = renameFile($sTempFilename, $sFilename, $path);
$sReloadScript .= "<script type=\"text/javascript\"> $sReloadScript .= "<script type=\"text/javascript\">
var right_top = top.content.right.right_top; var right_top = top.content.right.right_top;
if (right_top) { if (right_top) {
var href = '".$sess->url("main.php?area=$area&frame=3&file=$sTempFilename")."'; var href = '" . $sess->url("main.php?area=$area&frame=3&file=$sTempFilename") . "';
right_top.location.href = href; right_top.location.href = href;
} }
</script>"; </script>";
}else } else {
{
$sTempFilename = $sFilename; $sTempFilename = $sFilename;
} }
@ -136,16 +129,16 @@ if (!$perm->have_perm_area_action($area, $action))
/** /**
* START TRACK VERSION * START TRACK VERSION
**/ * */
// For read Fileinformation an get the id of current File // For read Fileinformation an get the id of current File
cInclude("includes", "functions.file.php"); cInclude("includes", "functions.file.php");
if((count($aFileInfo) == 0) || ((int)$aFileInfo["idsfi"] == 0)) { if ((count($aFileInfo) == 0) || ((int) $aFileInfo["idsfi"] == 0)) {
$aFileInfo = getFileInformation ($client, $sTempFilename, $sTypeContent, $db); $aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
$aFileInfo['description'] = ''; $aFileInfo['description'] = '';
} }
if((count($aFileInfo) == 0) || ($aFileInfo["idsfi"] !="")) { if ((count($aFileInfo) == 0) || ($aFileInfo["idsfi"] != "")) {
$oVersion = new VersionFile($aFileInfo["idsfi"], $aFileInfo, $sFilename, $sTypeContent, $cfg, $cfgClient, $db, $client, $area, $frame, $sOrigFileName); $oVersion = new VersionFile($aFileInfo["idsfi"], $aFileInfo, $sFilename, $sTypeContent, $cfg, $cfgClient, $db, $client, $area, $frame, $sOrigFileName);
// Create new version // Create new version
$oVersion->createNewVersion(); $oVersion->createNewVersion();
@ -153,11 +146,8 @@ if (!$perm->have_perm_area_action($area, $action))
/** /**
* END TRACK VERSION * END TRACK VERSION
**/ * */
$bEdit = fileEdit($sFilename, $_REQUEST['code'], $path); $bEdit = fileEdit($sFilename, $_REQUEST['code'], $path);
} }
# generate edit form # generate edit form
@ -165,16 +155,13 @@ if (!$perm->have_perm_area_action($area, $action))
$sAction = ($bEdit) ? $sActionEdit : $_REQUEST['action']; $sAction = ($bEdit) ? $sActionEdit : $_REQUEST['action'];
if ($_REQUEST['action'] == $sActionEdit) if ($_REQUEST['action'] == $sActionEdit) {
{
$sCode = getFileContent($sFilename, $path); $sCode = getFileContent($sFilename, $path);
}else } else {
{
$sCode = stripslashes($_REQUEST['code']); # stripslashes is required here in case of creating a new file $sCode = stripslashes($_REQUEST['code']); # stripslashes is required here in case of creating a new file
} }
$aFileInfo = getFileInformation ($client, $sTempFilename, "css", $db); $aFileInfo = getFileInformation($client, $sTempFilename, "css", $db);
$form = new UI_Table_Form("file_editor"); $form = new UI_Table_Form("file_editor");
$form->addHeader(i18n("Edit file")); $form->addHeader(i18n("Edit file"));
@ -189,14 +176,13 @@ if (!$perm->have_perm_area_action($area, $action))
$ta_code = new cHTMLTextarea("code", clHtmlSpecialChars($sCode), 100, 35, "code"); $ta_code = new cHTMLTextarea("code", clHtmlSpecialChars($sCode), 100, 35, "code");
$descr = new cHTMLTextarea("description", clHtmlSpecialChars($aFileInfo["description"]), 100, 5); $descr = new cHTMLTextarea("description", clHtmlSpecialChars($aFileInfo["description"]), 100, 5);
$ta_code->setStyle("font-family: monospace;width: 100%;"); $ta_code->setStyle("font-family: monospace;width: 100%;");
$descr->setStyle("font-family: monospace;width: 100%;"); $descr->setStyle("font-family: monospace;width: 100%;");
$ta_code->updateAttributes(array("wrap" => getEffectiveSetting('style_editor', 'wrap', 'off'))); $ta_code->updateAttributes(array("wrap" => getEffectiveSetting('style_editor', 'wrap', 'off')));
$form->add(i18n("Name"),$tb_name); $form->add(i18n("Name"), $tb_name);
$form->add(i18n("Description"), $descr->render()); $form->add(i18n("Description"), $descr->render());
$form->add(i18n("Code"),$ta_code); $form->add(i18n("Code"), $ta_code);
$page->setContent($form->render()); $page->setContent($form->render());
@ -207,5 +193,4 @@ if (!$perm->have_perm_area_action($area, $action))
$page->render(); $page->render();
} }
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,8 +28,7 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -55,7 +55,7 @@ $sActionEdit = 'style_edit';
$sScriptTemplate = ' $sScriptTemplate = '
<script type="text/javascript" src="scripts/rowMark.js"></script> <script type="text/javascript" src="scripts/rowMark.js"></script>
<script type="text/javascript" src="scripts/general.js"></script> <script type="text/javascript" src="scripts/general.js"></script>
<script type="text/javascript" src="scripts/messageBox.js.php?contenido='.$sSession.'"></script> <script type="text/javascript" src="scripts/messageBox.js.php?contenido=' . $sSession . '"></script>
<script type="text/javascript"> <script type="text/javascript">
/* Create messageBox instance */ /* Create messageBox instance */
@ -63,57 +63,81 @@ $sScriptTemplate = '
function deleteFile(file) function deleteFile(file)
{ {
url = "main.php?area='.$sArea.'"; url = "main.php?area=' . $sArea . '";
url += "&action='.$sActionDelete.'"; url += "&action=' . $sActionDelete . '";
url += "&frame=2"; url += "&frame=2";
url += "&delfile=" + file; url += "&delfile=" + file;
url += "&contenido='.$sSession.'"; url += "&contenido=' . $sSession . '";
window.location.href = url; window.location.href = url;
parent.parent.frames["right"].frames["right_bottom"].location.href = "main.php?area='.$sArea.'&frame=4&contenido='.$sSession.'"; parent.parent.frames["right"].frames["right_bottom"].location.href = "main.php?area=' . $sArea . '&frame=4&contenido=' . $sSession . '";
} }
</script>'; </script>';
$tpl->set('s', 'JAVASCRIPT', $sScriptTemplate); $tpl->set('s', 'JAVASCRIPT', $sScriptTemplate);
# delete file # delete file
if ($action == $sActionDelete) if ($action == $sActionDelete) {
{ if (!strrchr($_REQUEST['delfile'], "/")) {
if (!strrchr($_REQUEST['delfile'], "/")) if (file_exists($path . $_REQUEST['delfile'])) {
{ unlink($path . $_REQUEST['delfile']);
if (file_exists($path.$_REQUEST['delfile']))
{
unlink($path.$_REQUEST['delfile']);
removeFileInformation($client, $_REQUEST['delfile'], 'css', $db); removeFileInformation($client, $_REQUEST['delfile'], 'css', $db);
} }
} }
} }
if ($handle = opendir($path)) // show folders
{
function scanAllDir($dir, $sFileType = null, $bShowEmptyDir = false) {
$result = [];
foreach (scandir($dir) as $filename) {
if ($filename[0] === '.')
continue;
$filePath = $dir . DIRECTORY_SEPARATOR . $filename;
if (is_dir($filePath)) {
$tmp = [];
foreach (scanAllDir($filePath, $sFileType) as $childFilename) {
if (is_null($sFileType) || pathinfo($filePath . DIRECTORY_SEPARATOR . $childFilename, PATHINFO_EXTENSION) == $sFileType) {
$tmp[] = $childFilename;
}
}
if ($bShowEmptyDir || !empty($tmp)) {
$result[] = array(
'folder' => $filename,
'files' => $tmp
);
}
unset($tmp);
} else {
if (is_null($sFileType) || pathinfo($filePath, PATHINFO_EXTENSION) == $sFileType) {
$result[] = $filename;
}
}
}
return $result;
}
echo "<pre>";
print_r(scanAllDir($path, 'css', true));
if ($handle = opendir($path)) {
$aFiles = array(); $aFiles = array();
while ($file = readdir($handle)) while ($file = readdir($handle)) {
{ if (substr($file, (strlen($file) - (strlen($sFileType) + 1)), (strlen($sFileType) + 1)) == ".$sFileType" AND is_readable($path . $file)) {
if(substr($file, (strlen($file) - (strlen($sFileType) + 1)), (strlen($sFileType) + 1)) == ".$sFileType" AND is_readable($path.$file))
{
$aFiles[] = $file; $aFiles[] = $file;
}elseif (substr($file, (strlen($file) - (strlen($sFileType) + 1)), (strlen($sFileType) + 1)) == ".$sFileType" AND !is_readable($path.$file)) } elseif (substr($file, (strlen($file) - (strlen($sFileType) + 1)), (strlen($sFileType) + 1)) == ".$sFileType" AND!is_readable($path . $file)) {
{ $notification->displayNotification("error", $file . " " . i18n("is not readable!"));
$notification->displayNotification("error", $file." ".i18n("is not readable!"));
} }
} }
closedir($handle); closedir($handle);
// display files // display files
if (is_array($aFiles)) if (is_array($aFiles)) {
{
sort($aFiles); sort($aFiles);
foreach ($aFiles as $filename) foreach ($aFiles as $filename) {
{
$bgcolor = ( is_int($tpl->dyn_cnt / 2) ) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $bgcolor = ( is_int($tpl->dyn_cnt / 2) ) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
$tpl->set('d', 'BGCOLOR', $bgcolor); $tpl->set('d', 'BGCOLOR', $bgcolor);
@ -129,13 +153,11 @@ if ($handle = opendir($path))
$tpl->set('d', 'FILENAME', $html_filename); $tpl->set('d', 'FILENAME', $html_filename);
$delTitle = i18n("Delete File"); $delTitle = i18n("Delete File");
$delDescr = sprintf(i18n("Do you really want to delete the following file:<br><br>%s<br>"),$filename); $delDescr = sprintf(i18n("Do you really want to delete the following file:<br><br>%s<br>"), $filename);
if ($perm->have_perm_area_action('style', $sActionDelete)) if ($perm->have_perm_area_action('style', $sActionDelete)) {
{ $tpl->set('d', 'DELETE', '<a title="' . $delTitle . '" href="javascript://" onclick="box.confirm(\'' . $delTitle . '\', \'' . $delDescr . '\', \'deleteFile(\\\'' . $filename . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $delTitle . '"></a>');
$tpl->set('d', 'DELETE', '<a title="'.$delTitle.'" href="javascript://" onclick="box.confirm(\''.$delTitle.'\', \''.$delDescr.'\', \'deleteFile(\\\''.$filename.'\\\')\')"><img src="'.$cfg['path']['images'].'delete.gif" border="0" title="'.$delTitle.'"></a>'); } else {
}else
{
$tpl->set('d', 'DELETE', ''); $tpl->set('d', 'DELETE', '');
} }
@ -146,16 +168,13 @@ if ($handle = opendir($path))
} }
$tpl->next(); $tpl->next();
} }
} }
}else } else {
{
if ((int) $client > 0) { if ((int) $client > 0) {
$notification->displayNotification("error", i18n("Directory is not existing or readable!")."<br>$path"); $notification->displayNotification("error", i18n("Directory is not existing or readable!") . "<br>$path");
} }
} }
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['files_overview']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['files_overview']);
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,8 +28,7 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -43,29 +43,22 @@ if (!(int) $client > 0) {
return; return;
} }
function getExpandCollapseButton($item) function getExpandCollapseButton($item) {
{
global $sess, $PHP_SELF, $frame, $area, $appendparameters; global $sess, $PHP_SELF, $frame, $area, $appendparameters;
$selflink = "main.php"; $selflink = "main.php";
if (count($item->subitems) > 0) if (count($item->subitems) > 0) {
{ if ($item->collapsed == true) {
if ($item->collapsed == true) $expandlink = $sess->url($selflink . "?area=$area&frame=$frame&appendparameters=$appendparameters&expand=" . $item->id);
{ return ('<a href="' . $expandlink . '" alt="' . i18n('Open category') . '" title="' . i18n('Open category') . '"><img src="' . $item->collapsed_icon . '" border="0" align="middle" width="18"></a>');
$expandlink = $sess->url($selflink."?area=$area&frame=$frame&appendparameters=$appendparameters&expand=".$item->id); } else {
return ('<a href="'.$expandlink.'" alt="'.i18n('Open category').'" title="'.i18n('Open category').'"><img src="'.$item->collapsed_icon.'" border="0" align="middle" width="18"></a>'); $collapselink = $sess->url($selflink . "?area=$area&appendparameters=$appendparameters&frame=$frame&collapse=" . $item->id);
} else return ('<a href="' . $collapselink . '" alt="' . i18n('Close category') . '" title="' . i18n('Close category') . '"><img src="' . $item->expanded_icon . '" border="0" align="middle" width="18"></a>');
{
$collapselink = $sess->url($selflink."?area=$area&appendparameters=$appendparameters&frame=$frame&collapse=".$item->id);
return ('<a href="'.$collapselink.'" alt="'.i18n('Close category').'" title="'.i18n('Close category').'"><img src="'.$item->expanded_icon.'" border="0" align="middle" width="18"></a>');
} }
} else } else {
{ if ($item->custom["lastitem"]) {
if ($item->custom["lastitem"])
{
return '<img src="images/but_lastnode.gif" align="middle" width="18" height="18">'; return '<img src="images/but_lastnode.gif" align="middle" width="18" height="18">';
} else } else {
{
return '<img src="images/grid_collapse.gif" align="middle" width="18" height="18">'; return '<img src="images/grid_collapse.gif" align="middle" width="18" height="18">';
} }
} }
@ -76,14 +69,13 @@ function getExpandCollapseButton($item)
################# #################
#Fixxed by Timo Trautmann double database entries also called by action upl_mkdir #Fixxed by Timo Trautmann double database entries also called by action upl_mkdir
// Use remembered path from upl_last_path (from session) // Use remembered path from upl_last_path (from session)
if (!isset($path) && $sess->is_registered("upl_last_path")) if (!isset($path) && $sess->is_registered("upl_last_path")) {
{
$path = $upl_last_path; $path = $upl_last_path;
} }
$appendparameters = $_REQUEST["appendparameters"]; $appendparameters = $_REQUEST["appendparameters"];
if (!isset ($action)) if (!isset($action))
$action = ""; $action = "";
if ($tmp_area == "") { if ($tmp_area == "") {
@ -93,25 +85,20 @@ if ($tmp_area == "") {
$uplexpandedList = unserialize($currentuser->getUserProperty("system", "upl_expandstate")); $uplexpandedList = unserialize($currentuser->getUserProperty("system", "upl_expandstate"));
$upldbfsexpandedList = unserialize($currentuser->getUserProperty("system", "upl_dbfs_expandstate")); $upldbfsexpandedList = unserialize($currentuser->getUserProperty("system", "upl_dbfs_expandstate"));
if (!is_array($uplexpandedList)) if (!is_array($uplexpandedList)) {
{ $uplexpandedList = array();
$uplexpandedList = array ();
} }
if (!is_array($upldbfsexpandedList)) if (!is_array($upldbfsexpandedList)) {
{ $upldbfsexpandedList = array();
$upldbfsexpandedList = array ();
} }
if ($action == "upl_renamedir") if ($action == "upl_renamedir") {
{ if ($perm->have_perm_area_action("upl", "upl_renamedir")) {
if ($perm->have_perm_area_action("upl", "upl_renamedir"))
{
uplRenameDirectory($oldname, $newname, $parent); uplRenameDirectory($oldname, $newname, $parent);
$path = $cfgClient[$client]['upl']['path'].$parent.$newname."/"; $path = $cfgClient[$client]['upl']['path'] . $parent . $newname . "/";
if (in_array($cfgClient[$client]['upl']['path'].$parent.$oldname."/", $uplexpandedList)) if (in_array($cfgClient[$client]['upl']['path'] . $parent . $oldname . "/", $uplexpandedList)) {
{ $uplexpandedList[] = $cfgClient[$client]['upl']['path'] . $parent . $newname . "/";
$uplexpandedList[] = $cfgClient[$client]['upl']['path'].$parent.$newname."/";
} }
} }
} }
@ -121,41 +108,31 @@ if ($action == "upl_renamedir")
################### ###################
$dbfs = new DBFSCollection; $dbfs = new DBFSCollection;
if ($action == "upl_delete") if ($action == "upl_delete") {
{ if (is_dbfs($path)) {
if (is_dbfs($path)) $dbfs->remove($path . "/.");
{ } else {
$dbfs->remove($path."/.");
} else
{
/* Check for files */ /* Check for files */
if (uplHasFiles($path)) if (uplHasFiles($path)) {
{ $failedFiles = array();
$failedFiles = array ();
$directory = opendir($cfgClient[$client]["upl"]["path"].$path); $directory = opendir($cfgClient[$client]["upl"]["path"] . $path);
while (false !== ($dir_entry = readdir($directory))) while (false !== ($dir_entry = readdir($directory))) {
{ if ($dir_entry != "." && $dir_entry != "..") {
if ($dir_entry != "." && $dir_entry != "..") $res = @ unlink($cfgClient[$client]["upl"]["path"] . $path . $dir_entry);
{
$res = @ unlink($cfgClient[$client]["upl"]["path"].$path.$dir_entry);
if ($res == false) if ($res == false) {
{
$failedFiles[] = $dir_entry; $failedFiles[] = $dir_entry;
} }
} }
} }
} }
if (count($failedFiles) > 0) if (count($failedFiles) > 0) {
{ $notification->displayNotification("warning", i18n("Failed to delete the following files:") . "<br><br>" . implode("<br>", $failedFiles));
$notification->displayNotification("warning", i18n("Failed to delete the following files:")."<br><br>".implode("<br>", $failedFiles)); } else {
} else $res = @ rmdir($cfgClient[$client]['upl']['path'] . $path);
{ if ($res == false) {
$res = @ rmdir($cfgClient[$client]['upl']['path'].$path);
if ($res == false)
{
$notification->displayNotification("warning", sprintf(i18n("Failed to remove directory %s"), $path)); $notification->displayNotification("warning", sprintf(i18n("Failed to remove directory %s"), $path));
} }
} }
@ -167,13 +144,13 @@ $tpl->reset();
$file = 'Upload'; $file = 'Upload';
$pathstring = ''; $pathstring = '';
/* /*
$rootTreeItem = new TreeItem; $rootTreeItem = new TreeItem;
$rootTreeItem->custom["level"] = 0; $rootTreeItem->custom["level"] = 0;
$rootTreeItem->name = i18n("Upload directory"); $rootTreeItem->name = i18n("Upload directory");
*/ */
$user_upload_path = getEffectiveSetting("upload","userpath"); $user_upload_path = getEffectiveSetting("upload", "userpath");
if (is_string($user_upload_path) AND !empty($user_upload_path)) { if (is_string($user_upload_path) AND!empty($user_upload_path)) {
trim($user_upload_path); trim($user_upload_path);
$file = $user_upload_path; $file = $user_upload_path;
if (substr($user_upload_path, -1) != "/") { if (substr($user_upload_path, -1) != "/") {
@ -188,7 +165,7 @@ if (is_string($user_upload_path) AND !empty($user_upload_path)) {
$rootTreeItem = new TreeItem; $rootTreeItem = new TreeItem;
$rootTreeItem->custom["level"] = 0; $rootTreeItem->custom["level"] = 0;
$rootTreeItem->name = i18n("Upload directory"); $rootTreeItem->name = i18n("Upload directory");
$aInvalidDirectories = uplRecursiveDirectoryList($cfgClient[$client]["upl"]["path"].$user_upload_path, $rootTreeItem, 2); $aInvalidDirectories = uplRecursiveDirectoryList($cfgClient[$client]["upl"]["path"] . $user_upload_path, $rootTreeItem, 2);
if (count($aInvalidDirectories) > 0) { if (count($aInvalidDirectories) > 0) {
$sWarningInfo = i18n('The following directories contains invalid characters and were ignored: '); $sWarningInfo = i18n('The following directories contains invalid characters and were ignored: ');
@ -196,8 +173,8 @@ if (count($aInvalidDirectories) > 0) {
$sFiles = implode(', ', $aInvalidDirectories); $sFiles = implode(', ', $aInvalidDirectories);
$sRenameString = i18n('Please click here in order to rename automatically.'); $sRenameString = i18n('Please click here in order to rename automatically.');
$sRenameHref = $sess->url("main.php?area=$area&frame=$frame&force_rename=true"); $sRenameHref = $sess->url("main.php?area=$area&frame=$frame&force_rename=true");
$sRemameLink = '<a href="'.$sRenameHref.'">'.$sRenameString.'</a>'; $sRemameLink = '<a href="' . $sRenameHref . '">' . $sRenameString . '</a>';
$sNotificationString = $sWarningInfo.$sSeperator.$sFiles.$sSeperator.$sSeperator.$sRemameLink; $sNotificationString = $sWarningInfo . $sSeperator . $sFiles . $sSeperator . $sSeperator . $sRemameLink;
$sErrorString = $notification->returnNotification("warning", $sNotificationString, 1); $sErrorString = $notification->returnNotification("warning", $sNotificationString, 1);
$tpl->set('s', 'WARNING', $sErrorString); $tpl->set('s', 'WARNING', $sErrorString);
@ -206,114 +183,90 @@ if (count($aInvalidDirectories) > 0) {
} }
/* Mark all items in the expandedList as expanded */ /* Mark all items in the expandedList as expanded */
foreach ($uplexpandedList as $key => $value) foreach ($uplexpandedList as $key => $value) {
{
$rootTreeItem->markExpanded($value); $rootTreeItem->markExpanded($value);
} }
/* Collapse and expand the tree */ /* Collapse and expand the tree */
if (is_string($collapse)) if (is_string($collapse)) {
{
$rootTreeItem->markCollapsed($collapse); $rootTreeItem->markCollapsed($collapse);
} }
if (is_string($expand)) if (is_string($expand)) {
{
$rootTreeItem->markExpanded($expand); $rootTreeItem->markExpanded($expand);
} }
$uplexpandedList = Array (); $uplexpandedList = Array();
$rootTreeItem->getExpandedList($uplexpandedList); $rootTreeItem->getExpandedList($uplexpandedList);
$currentuser->setUserProperty("system", "upl_expandstate", serialize($uplexpandedList)); $currentuser->setUserProperty("system", "upl_expandstate", serialize($uplexpandedList));
$objects = Array (); $objects = Array();
$rootTreeItem->traverse($objects); $rootTreeItem->traverse($objects);
unset ($objects[0]); unset($objects[0]);
$bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
if ($appendparameters == "filebrowser") if ($appendparameters == "filebrowser") {
{
$mtree = new cWidgetTreeView("b58f0ae3-8d4e-4bb3-a754-5f0628863364"); $mtree = new cWidgetTreeView("b58f0ae3-8d4e-4bb3-a754-5f0628863364");
$cattree = conFetchCategoryTree(); $cattree = conFetchCategoryTree();
$marray = array (); $marray = array();
foreach ($cattree as $key => $catitem) foreach ($cattree as $key => $catitem) {
{
$no_start = true; $no_start = true;
$no_online = true; $no_online = true;
$no_start = !strHasStartArticle($catitem["idcat"], $lang); $no_start = !strHasStartArticle($catitem["idcat"], $lang);
$no_online = !$catitem["visible"]; $no_online = !$catitem["visible"];
if ($catitem["visible"] == 1) if ($catitem["visible"] == 1) {
{ if ($catitem["public"] == 0) {
if ($catitem["public"] == 0) if ($no_start || $no_online) {
{
if ($no_start || $no_online)
{
# Error found # Error found
$tmp_img = "folder_on_error_locked.gif"; $tmp_img = "folder_on_error_locked.gif";
} else } else {
{
# No error found # No error found
$tmp_img = "folder_on_locked.gif"; $tmp_img = "folder_on_locked.gif";
} }
} else } else {
{
# Category is public # Category is public
if ($no_start || $no_online) if ($no_start || $no_online) {
{
# Error found # Error found
$tmp_img = "folder_on_error.gif"; $tmp_img = "folder_on_error.gif";
} else } else {
{
# No error found # No error found
$tmp_img = "folder_on.gif"; $tmp_img = "folder_on.gif";
} }
} }
} else } else {
{
# Category is offline # Category is offline
if ($catitem['public'] == 0) if ($catitem['public'] == 0) {
{
# Category is locked # Category is locked
if ($no_start || $no_online) if ($no_start || $no_online) {
{
# Error found # Error found
$tmp_img = "folder_off_error_locked.gif"; $tmp_img = "folder_off_error_locked.gif";
} else {
} else
{
# No error found # No error found
$tmp_img = "folder_off_locked.gif"; $tmp_img = "folder_off_locked.gif";
} }
} else {
} else
{
# Category is public # Category is public
if ($no_start || $no_online) if ($no_start || $no_online) {
{
# Error found # Error found
$tmp_img = "folder_off_error.gif"; $tmp_img = "folder_off_error.gif";
} else {
} else
{
# No error found # No error found
$tmp_img = "folder_off.gif"; $tmp_img = "folder_off.gif";
} }
} }
} }
$icon = "./images/".$tmp_img; $icon = "./images/" . $tmp_img;
$idcat = $catitem["idcat"]; $idcat = $catitem["idcat"];
$name = '&nbsp;<a href="'.$sess->url("main.php?area=$area&frame=5&idcat=$idcat&appendparameters=$appendparameters").'" target="right_bottom">'.$catitem["name"].'</a>'; $name = '&nbsp;<a href="' . $sess->url("main.php?area=$area&frame=5&idcat=$idcat&appendparameters=$appendparameters") . '" target="right_bottom">' . $catitem["name"] . '</a>';
$marray[] = array ("id" => $catitem["idcat"], "name" => $name, "level" => $catitem["level"], "attributes" => array ("icon" => $icon)); $marray[] = array("id" => $catitem["idcat"], "name" => $name, "level" => $catitem["level"], "attributes" => array("icon" => $icon));
} }
$mtree->setTreeName(i18n("Categories")); $mtree->setTreeName(i18n("Categories"));
@ -330,15 +283,14 @@ if ($appendparameters == "filebrowser")
$mtree->setCollapsed($collapsed); $mtree->setCollapsed($collapsed);
$mtree->processParameters(); $mtree->processParameters();
$collapsed = array (); $collapsed = array();
$mtree->getCollapsedList($collapsed); $mtree->getCollapsedList($collapsed);
$tpl->set('s', 'CATBROWSER', $mtree->render()); $tpl->set('s', 'CATBROWSER', $mtree->render());
$tpl->set('s', 'APPENDPARAMETERS', 'url += \'&appendparameters='.$appendparameters.'\''); $tpl->set('s', 'APPENDPARAMETERS', 'url += \'&appendparameters=' . $appendparameters . '\'');
} else } else {
{
$tpl->set('s', 'CATBROWSER', ''); $tpl->set('s', 'CATBROWSER', '');
$tpl->set('s', 'APPENDPARAMETERS', 'url += \'&appendparameters='.$appendparameters.'\''); $tpl->set('s', 'APPENDPARAMETERS', 'url += \'&appendparameters=' . $appendparameters . '\'');
} }
chdir($cfg['path']['contenido']); chdir($cfg['path']['contenido']);
@ -349,7 +301,7 @@ $tpl->set('s', 'SID', $sess->id);
$tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\',\'%s\', \'%s\')">%s</a>'; $tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\',\'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"), $mstr = sprintf($tmp_mstr, 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"),
'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"), 'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"),
'<img src="images/ordner_oben.gif" align="middle" alt="" border="0"><img align="middle" src="images/spacer.gif" width="5" border="0">'.$file); '<img src="images/ordner_oben.gif" align="middle" alt="" border="0"><img align="middle" src="images/spacer.gif" width="5" border="0">' . $file);
$tpl->set('d', 'PATH', $pathstring); $tpl->set('d', 'PATH', $pathstring);
$tpl->set('d', 'BGCOLOR', $bgcolor); $tpl->set('d', 'BGCOLOR', $bgcolor);
@ -360,11 +312,8 @@ $tpl->set('d', 'DELETEBUTTON', '');
$tpl->set('d', 'COLLAPSE', ''); $tpl->set('d', 'COLLAPSE', '');
$tpl->next(); $tpl->next();
if (is_array($objects)) {
if (is_array($objects)) foreach ($objects as $a_file) {
{
foreach ($objects as $a_file)
{
$file = $a_file->name; $file = $a_file->name;
$depth = $a_file->custom["level"] - 1; $depth = $a_file->custom["level"] - 1;
$pathstring = str_replace($cfgClient[$client]['upl']['path'], "", $a_file->id); $pathstring = str_replace($cfgClient[$client]['upl']['path'], "", $a_file->id);
@ -372,15 +321,14 @@ if (is_array($objects))
$a_file->expanded_icon = "images/grid_collapse.gif"; $a_file->expanded_icon = "images/grid_collapse.gif";
$dlevels[$depth] = $a_file->custom["lastitem"]; $dlevels[$depth] = $a_file->custom["lastitem"];
$imgcollapse = getExpandCollapseButton($a_file); $imgcollapse = getExpandCollapseButton($a_file);
$fileurl = rawurlencode($path.$file.'/'); $fileurl = rawurlencode($path . $file . '/');
$pathurl = rawurlencode($path); $pathurl = rawurlencode($path);
# Indent for every level # Indent for every level
$cnt = $depth; $cnt = $depth;
$indent = 18; $indent = 18;
for ($i = 0; $i < $cnt; $i ++) for ($i = 0; $i < $cnt; $i++) {
{
$indent += 18; $indent += 18;
} }
@ -390,25 +338,21 @@ if (is_array($objects))
$tmp_mstr, $tmp_mstr,
'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"), 'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"),
'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"), 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"),
'<img src="images/grid_folder.gif" align="middle" border="0" alt=""><img src="images/spacer.gif" align="middle" width="5" border="0">'.$file); '<img src="images/grid_folder.gif" align="middle" border="0" alt=""><img src="images/spacer.gif" align="middle" width="5" border="0">' . $file);
$hasFiles = uplHasFiles($pathstring); $hasFiles = uplHasFiles($pathstring);
$hasSubdirs = uplHasSubdirs($pathstring); $hasSubdirs = uplHasSubdirs($pathstring);
if ((!$hasSubdirs) && (!$hasFiles) && $perm->have_perm_area_action($tmp_area, "upl_rmdir")) if ((!$hasSubdirs) && (!$hasFiles) && $perm->have_perm_area_action($tmp_area, "upl_rmdir")) {
{ $deletebutton = '<a style="margin-left:10px;" title="' . i18n("Delete directory") . '" href="javascript://" onclick="event.cancelBubble=true;box.confirm(\'' . i18n("Delete directory") . '\', \'' . i18n("Do you really want to delete the following directory:") . '<b>' . $file . '</b>\', \'deleteDirectory(\\\'' . $pathstring . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . i18n("Delete directory") . '" alt="' . i18n("Delete directory") . '"></a>';
$deletebutton = '<a style="margin-left:10px;" title="'.i18n("Delete directory").'" href="javascript://" onclick="event.cancelBubble=true;box.confirm(\''.i18n("Delete directory").'\', \''.i18n("Do you really want to delete the following directory:").'<b>'.$file.'</b>\', \'deleteDirectory(\\\''.$pathstring.'\\\')\')"><img src="'.$cfg['path']['images'].'delete.gif" border="0" title="'.i18n("Delete directory").'" alt="'.i18n("Delete directory").'"></a>'; } else {
} else if ($hasFiles) {
{
if ($hasFiles)
{
$message = i18n("Directory contains files"); $message = i18n("Directory contains files");
} else } else {
{
$message = i18n("Permission denied"); $message = i18n("Permission denied");
} }
$deletebutton = "<img style=\"margin-left:10px;\" src=\"".$cfg["path"]["images"]."delete_inact.gif\" border=\"0\" alt=\"".$message."\" title=\"".$message."\">"; $deletebutton = "<img style=\"margin-left:10px;\" src=\"" . $cfg["path"]["images"] . "delete_inact.gif\" border=\"0\" alt=\"" . $message . "\" title=\"" . $message . "\">";
} }
$bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
@ -419,13 +363,10 @@ if (is_array($objects))
$gline = ""; $gline = "";
for ($i = 1; $i < $depth; $i ++) for ($i = 1; $i < $depth; $i++) {
{ if ($dlevels[$i] == false && $i != 0) {
if ($dlevels[$i] == false && $i != 0)
{
$gline .= '<img src="images/grid_linedown.gif" align="middle" width="18">'; $gline .= '<img src="images/grid_linedown.gif" align="middle" width="18">';
} else } else {
{
$gline .= '<img src="images/spacer.gif" width="18" height="18" align="middle">'; $gline .= '<img src="images/spacer.gif" width="18" height="18" align="middle">';
} }
} }
@ -436,9 +377,8 @@ if (is_array($objects))
$tpl->set('d', 'EDITBUTTON', ''); $tpl->set('d', 'EDITBUTTON', '');
$tpl->set('d', 'DELETEBUTTON', $deletebutton); $tpl->set('d', 'DELETEBUTTON', $deletebutton);
$tpl->set('d', 'COLLAPSE', $gline.$imgcollapse); $tpl->set('d', 'COLLAPSE', $gline . $imgcollapse);
$tpl->next(); $tpl->next();
} }
} }
@ -459,38 +399,35 @@ $rootTreeItem->custom["level"] = 0;
uplRecursiveDBDirectoryList("", $rootTreeItem, 2); uplRecursiveDBDirectoryList("", $rootTreeItem, 2);
/* Mark all items in the expandedList as expanded */ /* Mark all items in the expandedList as expanded */
foreach ($upldbfsexpandedList as $key => $value) foreach ($upldbfsexpandedList as $key => $value) {
{
$rootTreeItem->markExpanded($value); $rootTreeItem->markExpanded($value);
} }
/* Collapse and expand the tree */ /* Collapse and expand the tree */
if (is_string($collapse)) if (is_string($collapse)) {
{
$rootTreeItem->markCollapsed($collapse); $rootTreeItem->markCollapsed($collapse);
} }
if (is_string($expand)) if (is_string($expand)) {
{
$rootTreeItem->markExpanded($expand); $rootTreeItem->markExpanded($expand);
} }
$upldbfsexpandedList = Array (); $upldbfsexpandedList = Array();
$rootTreeItem->getExpandedList($upldbfsexpandedList); $rootTreeItem->getExpandedList($upldbfsexpandedList);
$currentuser->setUserProperty("system", "upl_dbfs_expandstate", serialize($upldbfsexpandedList)); $currentuser->setUserProperty("system", "upl_dbfs_expandstate", serialize($upldbfsexpandedList));
$objects = Array (); $objects = Array();
$rootTreeItem->traverse($objects); $rootTreeItem->traverse($objects);
unset ($objects[0]); unset($objects[0]);
$bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
$tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>'; $tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"), $mstr = sprintf($tmp_mstr, 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"),
'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"), 'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"),
'<img src="images/ordner_oben.gif" alt="" border="0"><img align="middle" src="images/spacer.gif" width="5" border="0">'.$file); '<img src="images/ordner_oben.gif" alt="" border="0"><img align="middle" src="images/spacer.gif" width="5" border="0">' . $file);
$tpl->set('d', 'PATH', $pathstring); $tpl->set('d', 'PATH', $pathstring);
$tpl->set('d', 'BGCOLOR', $bgcolor); $tpl->set('d', 'BGCOLOR', $bgcolor);
@ -503,12 +440,10 @@ $tpl->next();
$dbfsc = new DBFSCollection; $dbfsc = new DBFSCollection;
$dlevels = array (); $dlevels = array();
if (is_array($objects)) if (is_array($objects)) {
{ foreach ($objects as $a_file) {
foreach ($objects as $a_file)
{
$file = $a_file->name; $file = $a_file->name;
$depth = $a_file->custom["level"] - 1; $depth = $a_file->custom["level"] - 1;
$pathstring = $a_file->id; $pathstring = $a_file->id;
@ -516,11 +451,10 @@ if (is_array($objects))
$a_file->expanded_icon = "images/grid_collapse.gif"; $a_file->expanded_icon = "images/grid_collapse.gif";
$dlevels[$depth] = $a_file->custom["lastitem"]; $dlevels[$depth] = $a_file->custom["lastitem"];
$collapse = getExpandCollapseButton($a_file); $collapse = getExpandCollapseButton($a_file);
$fileurl = rawurlencode($path.$file.'/'); $fileurl = rawurlencode($path . $file . '/');
$pathurl = rawurlencode($path); $pathurl = rawurlencode($path);
if($file == 'tmp') if ($file == 'tmp') {
{
echo 'tmp2<br>'; echo 'tmp2<br>';
} }
@ -528,8 +462,7 @@ if (is_array($objects))
$cnt = $depth; $cnt = $depth;
$indent = 18; $indent = 18;
for ($i = 0; $i < $cnt; $i ++) for ($i = 0; $i < $cnt; $i++) {
{
# 18 px for every level # 18 px for every level
$indent += 18; $indent += 18;
} }
@ -538,24 +471,20 @@ if (is_array($objects))
$tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>'; $tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"), $mstr = sprintf($tmp_mstr, 'right_bottom', $sess->url("main.php?area=$area&frame=4&path=$pathstring&appendparameters=$appendparameters"),
'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"), 'right_top', $sess->url("main.php?area=$area&frame=3&path=$pathstring&appendparameters=$appendparameters"),
'<img src="images/grid_folder.gif" align="middle" border="0" alt=""><img src="images/spacer.gif" align="middle" width="5" border="0">'.$file); '<img src="images/grid_folder.gif" align="middle" border="0" alt=""><img src="images/spacer.gif" align="middle" width="5" border="0">' . $file);
$hasFiles = $dbfsc->hasFiles($pathstring); $hasFiles = $dbfsc->hasFiles($pathstring);
if (!$hasFiles && $perm->have_perm_area_action($tmp_area, "upl_rmdir")) if (!$hasFiles && $perm->have_perm_area_action($tmp_area, "upl_rmdir")) {
{ $deletebutton = '<a style="margin-left:10px;" title="' . i18n("Delete directory") . '" href="javascript://" onclick="event.cancelBubble=true;box.confirm(\'' . i18n("Delete directory") . '\', \'' . i18n("Do you really want to delete the following directory:") . '<b>' . $file . '</b>\', \'deleteDirectory(\\\'' . $pathstring . '\\\')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . i18n("Delete directory") . '" alt="' . i18n("Delete directory") . '"></a>';
$deletebutton = '<a style="margin-left:10px;" title="'.i18n("Delete directory").'" href="javascript://" onclick="event.cancelBubble=true;box.confirm(\''.i18n("Delete directory").'\', \''.i18n("Do you really want to delete the following directory:").'<b>'.$file.'</b>\', \'deleteDirectory(\\\''.$pathstring.'\\\')\')"><img src="'.$cfg['path']['images'].'delete.gif" border="0" title="'.i18n("Delete directory").'" alt="'.i18n("Delete directory").'"></a>'; } else {
} else if ($hasFiles) {
{
if ($hasFiles)
{
$message = i18n("Directory contains files"); $message = i18n("Directory contains files");
} else } else {
{
$message = i18n("Permission denied"); $message = i18n("Permission denied");
} }
$deletebutton = "<img style=\"margin-left:10px;\" src=\"".$cfg["path"]["images"]."delete_inact.gif\" border=\"0\" alt=\"".$message."\" title=\"".$message."\">"; $deletebutton = "<img style=\"margin-left:10px;\" src=\"" . $cfg["path"]["images"] . "delete_inact.gif\" border=\"0\" alt=\"" . $message . "\" title=\"" . $message . "\">";
} }
$bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $bgcolor = (is_int($tpl->dyn_cnt / 2)) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
@ -566,13 +495,10 @@ if (is_array($objects))
$gline = ""; $gline = "";
for ($i = 1; $i < $depth; $i ++) for ($i = 1; $i < $depth; $i++) {
{ if ($dlevels[$i] == false && $i != 0) {
if ($dlevels[$i] == false && $i != 0)
{
$gline .= '<img src="images/grid_linedown.gif" align="middle">'; $gline .= '<img src="images/grid_linedown.gif" align="middle">';
} else } else {
{
$gline .= '<img src="images/spacer.gif" width="18" height="18" align="middle">'; $gline .= '<img src="images/spacer.gif" width="18" height="18" align="middle">';
} }
} }
@ -581,14 +507,12 @@ if (is_array($objects))
$tpl->set('d', 'DIRNAME', $mstr); $tpl->set('d', 'DIRNAME', $mstr);
$tpl->set('d', 'EDITBUTTON', ''); $tpl->set('d', 'EDITBUTTON', '');
$tpl->set('d', 'DELETEBUTTON', $deletebutton); $tpl->set('d', 'DELETEBUTTON', $deletebutton);
$tpl->set('d', 'COLLAPSE', $gline.$collapse); $tpl->set('d', 'COLLAPSE', $gline . $collapse);
$tpl->next(); $tpl->next();
} }
} }
$tpl->set('s', 'ID_PATH', $path); $tpl->set('s', 'ID_PATH', $path);
chdir($cfg["path"]["contenido"]); chdir($cfg["path"]["contenido"]);
$tpl->generate($cfg['path']['templates'].$cfg['templates']['upl_dirs_overview']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['upl_dirs_overview']);
?> ?>

Datei anzeigen

@ -1,15 +1,15 @@
<html> <html>
<head> <head>
<title></title> <title></title>
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="styles/contenido.css" /> <link rel="stylesheet" type="text/css" href="styles/contenido.css" />
{JAVASCRIPT} {JAVASCRIPT}
</head> </head>
<body> <body>
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0">
<!-- BEGIN:BLOCK --> <!-- BEGIN:BLOCK -->
<tr {ID} style="background-color: {BGCOLOR}" onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)"> <tr {ID} style="background-color: {BGCOLOR}" onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)">
<td><img alt="" width="10" src="images/spacer.gif"></td> <td><img alt="" width="10" src="images/spacer.gif"></td>
@ -24,12 +24,12 @@
<td><img alt="" width="5" src="images/spacer.gif"></td> <td><img alt="" width="5" src="images/spacer.gif"></td>
</tr> </tr>
<!-- END:BLOCK --> <!-- END:BLOCK -->
</table> </table>
</body> </body>
<script language="javascript"> <script language="javascript">
if (document.getElementById('marked')) { if (document.getElementById('marked')) {
row.click(document.getElementById('marked')); row.click(document.getElementById('marked'));
} }
</script> </script>
</html> </html>