Index: trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.diff =================================================================== --- trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.diff (revision trunk,183) +++ trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.diff (revision trunk,183) @@ -0,0 +1,26 @@ +--- dhtmlxmenu_standard.css.orig 2008-10-10 14:57:00.000000000 +0200 ++++ dhtmlxmenu_standard.css 2008-10-29 16:59:18.000000000 +0100 +@@ -9,6 +9,7 @@ + height: 26px; + position: relative; + } ++ + div.dhtmlxMenu_standard_Middle { + position: relative; + height: 26px; +@@ -32,6 +33,15 @@ + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_top_bg_right.gif"); + background-repeat: no-repeat; + } ++ ++ ++iframe.dhtmlxMenu_IE6CoverFix_standard { ++ position: absolute; ++ border: none; ++ background: #000000; ++ filter: alpha(opacity=100); ++} ++ + /* + top level items + */ Index: trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.orig =================================================================== --- trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.orig (revision trunk,183) +++ trunk/includes/dhtmlx/skins/dhtmlxmenu_standard.css.orig (revision trunk,183) @@ -0,0 +1,364 @@ +/*************************************************************************************************************************************************************** + "STANDARD" dhtmlxMenu Skin +***************************************************************************************************************************************************************/ + +/* + top level container +*/ +table.dhtmlxMenu_standard_TBL { + height: 26px; + position: relative; +} +div.dhtmlxMenu_standard_Middle { + position: relative; + height: 26px; + width: 100%; + left: 0px; + top: 0px; + border: none; + background-color: none; + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_top_bg_middle.gif"); + -moz-user-select: none; +} +table td.dhtmlxMenu_standard_Left { + width: 3px; + font-size: 2px; + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_top_bg_left.gif"); + background-repeat: no-repeat; +} +table td.dhtmlxMenu_standard_Right { + width: 3px; + font-size: 2px; + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_top_bg_right.gif"); + background-repeat: no-repeat; +} +/* + top level items +*/ +div.dhtmlxMenu_standard_TopLevel_Item_Normal { + top: 2px; + top=0px; + position: absolute; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + color: #000000; + cursor: default; + white-space: nowrap; + -moz-user-select: none; + height: 14px; + height=20px; + padding-left: 7px; + padding-right: 7px; + padding-top: 2px; + padding-bottom: 2px; + margin: 1px; + margin-top: 2px; + margin-top=4px; +} +div.dhtmlxMenu_standard_TopLevel_Item_Disabled { + top: 2px; + top=0px; + position: absolute; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + color: #909090; + cursor: default; + white-space: nowrap; + height: 14px; + height=20px; + -moz-user-select: none; + padding-left: 7px; + padding-right: 7px; + padding-top: 2px; + padding-bottom: 2px; + margin: 1px; + margin-top: 2px; + margin-top=4px; +} +div.dhtmlxMenu_standard_TopLevel_Item_Selected { + top: 2px; + top=0px; + position: absolute; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + cursor: default; + color: #000000; + white-space: nowrap; + -moz-user-select: none; + height: 14px; + height=20px; + background-color: #D2D1D1; + border-top: #808080 1px solid; + border-left: #808080 1px solid; + border-bottom: #FFFFFF 1px solid; + border-right: #FFFFFF 1px solid; + padding-left: 7px; + padding-right: 7px; + padding-top: 2px; + padding-bottom: 2px; + margin-top: 1px; + margin-top=3px; +} +/* + sub level polygon +*/ +div.dhtmlxMenu_standard_SubLevelArea_Polygon { + position: absolute; + padding-top: 1px; + border-top: #D2D1D1 1px solid; + border-left: #D2D1D1 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; + background-color: #FFFFFF; + overflow: hidden; +} +/* + separator +*/ +div.dhtmlxMenu_standard_SubLevelArea_Separator { + font-size: 1px; + cursor: default; + -moz-user-select: none; + border-top: #BCBBBB 1px solid; + border-bottom: #FFFFFF 1px solid; + border-right: #9E9E9E 1px solid; + margin-left: 1px; +} +/* + items +*/ +div.dhtmlxMenu_standard_SubLevelArea_Item_Normal { + position: relative; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + color: #333333; + border-left: #FFFFFF 1px solid; + border-right: #9E9E9E 1px solid; + background-color: #E3E3E3; + margin: 0px 0px 0px 0px; + padding: 4px 28px 4px 28px; + cursor: default; + white-space: nowrap; + -moz-user-select: none; +} +div.dhtmlxMenu_standard_SubLevelArea_Item_Disabled { + position: relative; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + color: #999999; + background-color: #E3E3E3; + margin: 0px 0px 0px 0px; + padding: 4px 28px 4px 28px; + border-left: #FFFFFF 1px solid; + border-right: #9E9E9E 1px solid; + cursor: default; + white-space: nowrap; + -moz-user-select: none; +} +div.dhtmlxMenu_standard_SubLevelArea_Item_Selected { + position: relative; + font-family: Tahoma; + font-size: 11px; + font-weight: normal; + color: #333333; + background-color: #B0B0B0; + margin: 0px 0px 0px 0px; + padding: 4px 28px 4px 28px; + border-left: #FFFFFF 1px solid; + border-right: #9E9E9E 1px solid; + cursor: default; + white-space: nowrap; + -moz-user-select: none; +} +/* + hotkey +*/ +div.dhtmlxMenu_standard_SubLevelArea_Item_Normal div.dhtmlxMenu_standard_SubLevelArea_Item_HotKey { + color: #333333; +} +div.dhtmlxMenu_standard_SubLevelArea_Item_Disabled div.dhtmlxMenu_standard_SubLevelArea_Item_HotKey { + color: #AAAAAA; +} +div.dhtmlxMenu_standard_SubLevelArea_Item_Selected div.dhtmlxMenu_standard_SubLevelArea_Item_HotKey { + color: #333333; +} +div.dhtmlxMenu_standard_SubLevelArea_Item_HotKey { + position: absolute; + top: 4px; + font-size: 10px; + right: 8px; +} +/* + arrow cascade (right, loading) +*/ +img.dhtmlxMenu_standard_SubLevelArea_Item_Arrow { + width: 4px; + height: 7px; + position: absolute; + margin-top: 3px; + right: 8px; +} +img.dhtmlxMenu_standard_SubLevelArea_Item_Arrow_Loading { + width: 10px; + height: 10px; + position: absolute; + margin-top: 1px; + right: 6px; +} +/* + icons (checkboxes and radios are use the same class) +*/ +img.dhtmlxMenu_standard_TopLevel_Item_Icon { + position: absolute; + margin-top: -1px; + left: 6px; + width: 16px; + height: 16px; +} +img.dhtmlxMenu_standard_SubLevelArea_Item_Icon { + position: absolute; + top: 2px; + left: 6px; + _left: -23px; + width: 16px; + height: 16px; +} +/* + arrows limit (up, down) +*/ +div.dhtmlxMenu_standard_SubLevelArea_Arrow { + width: 100%; + height: 15px; + background-repeat: no-repeat; + background-position: center center; + background-color: #E6E5E5; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp { + position: absolute; + height: 16px; + height=18px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + font-size: 1px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp_Over { + position: absolute; + height: 16px; + height=18px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + font-size: 1px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp_Disabled { + position: absolute; + height: 16px; + height=18px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + font-size: 1px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_up.gif"); + border-right: #9E9E9E 1px solid; + height: 100%; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp_Over div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_up_over.gif"); + border-right: #9E9E9E 1px solid; + height: 100%; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowUp_Disabled div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_up_dis.gif"); + border-right: #9E9E9E 1px solid; + height: 100%; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown { + position: absolute; + height: 16px; + height=18px; + font-size: 1px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown_Over { + position: absolute; + /* + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_bg_over.gif"); + background-repeat: repeat-x; + */ + height: 16px; + height=18px; + font-size: 1px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown_Disabled { + position: absolute; + height: 16px; + height=18px; + font-size: 1px; + padding-top: 1px; + padding-left: 1px; + padding-right: 1px; + padding-right=0px; + background-color: #FFFFFF; + border-top: #D3D2D2 1px solid; + border-left: #D3D2D2 1px solid; + border-right: #7E7E7E 1px solid; + border-bottom: #7E7E7E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_down.gif"); + border-right: #9E9E9E 1px solid; + border-bottom: #9E9E9E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown_Over div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_down_over.gif"); + border-right: #9E9E9E 1px solid; + border-bottom: #9E9E9E 1px solid; +} +div.dhtmlxMenu_standard_SubLevelArea_ArrowDown_Disabled div.dhtmlxMenu_standard_SubLevelArea_Arrow { + background-image: url("../imgs/dhxmenu_standard/dhtmlxmenu_arrow_down_dis.gif"); + border-right: #9E9E9E 1px solid; + border-bottom: #9E9E9E 1px solid; +} Index: trunk/services/info.php =================================================================== --- trunk/services/info.php (revision trunk,183) +++ trunk/services/info.php (revision trunk,183) @@ -0,0 +1,243 @@ +GetProp('xslt'); +} catch (ADEIException $ae) { + $xslt = false; +} + +switch ($target) { + case "version": + if (file_exists("VERSION")) { + $stat = stat("VERSION"); + $date = date("Ymd", $stat["mtime"]); + + $version = file_get_contents("VERSION"); + if (preg_match("/^\s*([\d.]+)\s*(cvs)?/i", $version, $m)) { + $version = $m[1]; + if ($m[2]) $release = 0; + else $release = 1; + } else { + $release = 1; + } + + if ($release) $title = $version; + else $title = "$version-$date"; + } else { + $error = translate("Version information is not available"); + } + break; + case "cache": + try { + $req = new GROUPRequest(); + $fix_time = $req->GetTimeFormat(); + $multi_mode = false; + } catch (ADEIException $ae) { + if (($_GET['db_server'])||($_GET['db_name'])||($_GET['db_group'])) { + throw $ae; + } + $multi_mode = true; + } + + try { + $cache = new CACHEDB(); + $flags = REQUEST::NEED_ITEMINFO|REQUEST::NEED_INFO|CACHE::TABLE_INFO; + if ($multi_mode) { + $info = $cache->GetCacheList($flags); + } else { + $info = array(); + $postfix = $cache->GetCachePostfix($req->props['db_group'], $req->props['db_name'], $req->props['db_server']); + $info[0] = $cache->GetExtendedCacheInfo($postfix, $flags); + } + } catch (ADEIException $ex) { + $ex->logInfo(NULL, $req); + $error = xml_escape($ex->getInfo()); + } + break; + case "log": + try { + $cur = time(); + + $interval = $_REQUEST['interval']; + $filter = json_decode(stripslashes($_REQUEST['filter']), true); + + if (isset($_REQUEST['priority'])) { + $priority = $_REQUEST['priority']; + } else { + $priority = LOG_ERR; + } + + if (preg_match("/^(\d+)-(\d+)$/", $interval, $m)) { + $from = $m[1]; + $to = $m[2]; + + if ($to > $cur) $to = $cur; + + if ($to < $from) { + $from = false; + $to = false; + } + } else if (preg_match("/^(\d+)$/", $interval, $m)) { + $to = $cur; + $from = $to - $interval; + } + + if ((!$from)||(!$to)) { + $to = $cur; + $from = $to - $to%86400; + } + + $filter = array( + "setup" => $ADEI_SETUP + ); + foreach (array("setup", "session", "source", "pid", "client") as $prop) { + if (isset($_REQUEST[$prop])) { + if ($_REQUEST[$prop]==="") { + unset($filter[$prop]); + } else { + $filter[$prop] = $_REQUEST[$prop]; + } + } + } + $logs = adeiGetLogs($from, $to, $priority, $filter); + } catch (ADEIException $ex) { + $ex->logInfo(NULL, $req); + $error = xml_escape($ex->getInfo()); + } + break; + default: + if (isset($_GET['target'])) $error = translate("Unknown info target (%s) is specified", $_GET['target']); + else $error = translate("The info target is not specified"); +} + +function OutputCacheInfo($out, &$item) { + global $fix_time; + + if (is_array($item['info']['tables'])) { + $item['info']['resolutions'] = implode(',',array_keys($item['info']['tables'])); + } + + if ($fix_time) { + if ($item['first']) $info['first'] = date($fix_time, $info['first']); + if ($item['last']) $info['last'] = date($fix_time, $info['last']); + } + + $properties = array("db_server", "db_name", "db_group", "supported"); + $info_properties = array("first", "last", "records", "dbsize", "resolutions", "width"); + + $extra = ""; + foreach ($item as $prop => $value) { + if (!in_array($prop, $properties)) continue; + $extra .= " $prop=\"" . xml_escape($value) . "\""; + } + foreach ($item['info'] as $prop => $value) { + if (!in_array($prop, $info_properties)) continue; + $extra .= " $prop=\"" . xml_escape($value) . "\""; + } + fwrite($out, " \n"); +} + +function OutputLog($out, $item) { + $item['time'] = $item['time']->format("Y-m-d\Th:i:s.uP"); + $extra = ""; + $properties = array("priority", "setup", "source", "session", "client", "message"); + foreach ($item as $prop => $value) { + if (!in_array($prop, $properties)) continue; + $extra .= " $prop=\"" . xml_escape($value) . "\""; + } + fwrite($out, " \n"); +} + +if ($text) { + header("Content-type: text/plain"); + header("Cache-Control: no-cache, must-revalidate"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + + if ($error) echo translate("Error: %s\n", $error); + else { + switch ($target) { + case "version": + echo $title; + break; + case "log": + foreach($logs as $item) { + echo $item['time']->format("Y-m-d\Th:i:s.uP") . " " . html_entity_decode($item['message']) . "\n"; + } + break; + default: + echo translate("Error: Target %s is not supported text encoding\n", $target); + } + } + exit; +} else { + header("Content-type: text/xml"); + header("Cache-Control: no-cache, must-revalidate"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +} + +if ($xslt) { + $temp_file = tempnam(sys_get_temp_dir(), 'adei_version.'); + $out = @fopen($temp_file, "w"); + if (!$out) $error = translate("I'm not able to create temporary file \"%s\"", $temp_file); +} else { + $out = fopen("php://output", "w"); +} + +if (true) { + fwrite($out, "\n"); + if ($error) { + fwrite($out, "$error"); + $error = false; + } else { + fwrite($out, "\n"); + + switch ($target) { + case "version": + fwrite($out, " ${title}\n"); + fwrite($out, " \n"); +// fwrite($out, " ${_SERVER['SERVER_SIGNATURE']}\n"); + fwrite($out, " " . phpversion() . "\n"); + break; + case "cache": + foreach ($info as &$item) { + OutputCacheInfo($out, $item); + } + break; + case "log": + foreach($logs as $log) { + OutputLog($out, $log); + } + break; + } + fwrite($out, ""); + } + fclose($out); +} + + +if (($xslt)&&(!$error)) { + try { + echo $ADEI->TransformXML($xslt, $temp_file); + } catch (ADEIException $ex) { + $ex->logInfo(NULL, $reader?$reader:$req); + $error = $ADEI->EscapeForXML($ex->getInfo()); + } + @unlink($temp_file); +} + +if ($error) { + echo "\n"; + echo "$error"; +} + +?> Index: trunk/classes/cache/cachedb.php =================================================================== --- trunk/classes/cache/cachedb.php (revision trunk,157) +++ trunk/classes/cache/cachedb.php (revision trunk,183) @@ -126,5 +126,5 @@ } else { if ($postfix) { - throw new ADEIException(translate("Unsupported postfix is specified: %s", $string)); + throw new ADEIException(translate("Unsupported postfix (%s) is supplied", $postfix)); } else { throw new ADEIException(translate("Postfix should be specified")); @@ -193,5 +193,4 @@ $supported = $info['supported']; - if ($flags&CACHE::NEED_REQUESTS) { if ($supported) { @@ -238,6 +237,7 @@ } - if (($flags&CACHEDB::TABLE_INFO)&&($supported)) { - $info['info'] = $this->GetCacheInfo($postfix); + if (($flags&CACHEDB::TABLE_INFO)&&($supported)&&($cache_info=$this->GetCacheInfo($postfix))) { + $info['info'] = $cache_info; + if (is_array($postfix_or_row)) { $info['info']['records'] = $postfix_or_row[4]; @@ -276,5 +276,5 @@ } else { $info['info']['tables'] = array( - 0 => &$info['info'] + 0 => $info['info'] ); } Index: trunk/classes/request.php =================================================================== --- trunk/classes/request.php (revision trunk,175) +++ trunk/classes/request.php (revision trunk,183) @@ -120,4 +120,5 @@ const ENCODING_JSON = 2; const ENCODING_LABVIEW = 3; + const ENCODING_TEXT = 4; function __construct(&$props = NULL) { @@ -157,4 +158,6 @@ case "json": return BASICRequest::ENCODING_JSON; + case "text": + return BASICRequest::ENCODING_TEXT; default: if ($default === false) Index: trunk/config.actual.php =================================================================== --- trunk/config.actual.php (revision trunk,178) +++ trunk/config.actual.php (revision trunk,183) @@ -9,6 +9,6 @@ ); - $ADEI_SETUP = "test"; -// $ADEI_SETUP = "all"; +// $ADEI_SETUP = "test"; + $ADEI_SETUP = "all"; $DEFAULT_MODULE = "wiki"; Index: trunk/release =================================================================== --- trunk/release (revision trunk,178) +++ trunk/release (revision trunk,183) @@ -43,4 +43,7 @@ make -C apps/csv2root clean make -C apps/mod_root2 clean + + rm -rf *.diff + rm -rf tmp/* rm -rf test/tmp/*