Commit 136dc790 by sn

* D::compareFe ...

* D::fe jetzt auch mit javascript versteck text button
* resolve mcCairoSvg quality bug 
1 parent 5c911bfd
Showing with 100 additions and 19 deletions
......@@ -99,15 +99,34 @@ class D {
$screen_content = D::printToScreen(true);
$html_beginn = '
<html>
<header>
<title>D:'.$_SERVER['REQUEST_URI'].'</title>
</header>
<body>
';
$html_end = '
</body>
</html>
<html>
<header>
<title>D:'.$_SERVER['REQUEST_URI'].'</title>
<script type="text/javascript">
function showText(param_divId) {
var spoiler = document.getElementById(param_divId);
var button = document.getElementById(\'button\');
if (spoiler.style.display == \'block\') {
spoiler.style.display=\'none\';
button.value = \'Text einblenden\';
} else {
spoiler.style.display=\'block\';
button.value = \'Text ausblenden\';
}
return false;
}
</script>
</header>
<body>
';
$html_beginn .= 'SCRIPT_FILENAME:'.$_SERVER['SCRIPT_FILENAME'].'';
$html_beginn .= '<h1>'.$_SERVER['SERVER_NAME'].'/'.$_SERVER['REQUEST_URI'].'</h1>';
$html_end = '
</body>
</html>
';
mcFile::write($param_filename, $html_beginn.$screen_content.$html_end, $param_kindof);
......@@ -338,6 +357,33 @@ class D {
self::new_echo("<p>".$param_string."</p>", $param_print, $param_force);
}
public static function compareFe($param_firstArray, $param_secondArray, $param_string=null, $param_logdepth=10, $param_ul=array(), $param_keystring='', $param_print=true, $param_force=false) {
if($param_logdepth>=0) {
if(!is_null($param_string)) {
$param_string .= ' countFirstArray('.count($param_firstArray).') countSecondArray('.count($param_secondArray).') loglevel('.$param_logdepth.') || print '.$param_Array;
// $eqal = mcArray::compare($param_firstArray, $param_secondArray);
// $param_string .= 'equal('.$eqal.')';
D::li($param_string, $param_print, $param_force);
}
self::new_echo('<table>', $param_print, $param_force);
self::new_echo('<tr valign="top">', $param_print, $param_force);
self::new_echo('<td valign="top">', $param_print, $param_force);
D::fe($param_firstArray, null, $param_logdepth, $param_ul,'first Param', $param_print, $param_force);
self::new_echo('</td>', $param_print, $param_force);
self::new_echo('<td valign="top">', $param_print, $param_force);
D::fe($param_secondArray, null, $param_logdepth, $param_ul,'second Param', $param_print, $param_force);
self::new_echo('</td>', $param_print, $param_force);
self::new_echo('</tr>', $param_print, $param_force);
self::new_echo('</table>', $param_print, $param_force);
}
}
private static $feRekursivContent= 0;
/**
*
* @param type $param_Array
......@@ -379,12 +425,46 @@ class D {
$var_value2Array = $param_Array;
}
self::new_echo($param_ul['start'].'<li>'.$param_keystring.' => '.$param_Array.' '.$info_toArray.' </li>'.$param_ul['stop'], $param_print, $param_force);
if(is_array($var_value2Array)) {
// self::new_echo('
//<script type="text/javascript">
// function showText(param_divId) {
// var spoiler = document.getElementById(param_divId);
// var button = document.getElementById(\'button\');
//
// if (spoiler.style.display == \'block\') {
// spoiler.style.display=\'none\';
// button.value = \'Text einblenden\';
// } else {
//
// spoiler.style.display=\'block\';
// button.value = \'Text ausblenden\';
// }
// return false;
// }
//</script>', $param_print, $param_force);
self::$feRekursivContent++;
$divId='spoiler_'.self::$feRekursivContent;
self::new_echo('<style type="text/css">
#'.$divId.' {
display: none;
}
</style>', $param_print, $param_force);
self::new_echo($param_ul['start'].'<li>'.$param_keystring.' => '.$param_Array.' '.$info_toArray.'
<input id="button" type="button" onclick="showText(\''.$divId.'\');" value="Text einblenden" /> </li> '.$param_ul['stop'], $param_print, $param_force);
self::new_echo('<div id="'.$divId.'">', $param_print, $param_force);
foreach($var_value2Array as $var_key => $var_value) {
D::fe($var_value, null, $param_logdepth, $param_ul,$var_key, $param_print, $param_force);
}
}
self::new_echo('</div>', $param_print, $param_force);
} else {
self::new_echo($param_ul['start'].'<li>'.$param_keystring.' => '.$param_Array.' '.$info_toArray.' </li>'.$param_ul['stop'], $param_print, $param_force);
}
}
}
......
......@@ -4,20 +4,20 @@ class mcCairoSvg {
public static function inkscapeSvgToPdf($param_input_filename, array $param_outputfile=null, array $param_quality =null) {
$normalsvg_filename =mcInkscape::inkscapeSvgToNormalSvg($param_input_filename);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename, $param_quality);
return mcCairoSvg::svgToPdf($normalsvg_filename, $param_outputfile);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename);
return mcCairoSvg::svgToPdf($normalsvg_filename, $param_outputfile, $param_quality);
}
public static function inkscapeSvgToPng($param_input_filename, array $param_outputfile=null, array $param_quality =null) {
$normalsvg_filename =mcInkscape::inkscapeSvgToNormalSvg($param_input_filename);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename, $param_quality);
return mcCairoSvg::svgToPng($normalsvg_filename, $param_outputfile);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename);
return mcCairoSvg::svgToPng($normalsvg_filename, $param_outputfile, $param_quality);
}
public static function inkscapeSvgToPs($param_input_filename, array $param_outputfile=null, array $param_quality =null) {
$normalsvg_filename =mcInkscape::inkscapeSvgToNormalSvg($param_input_filename);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename, $param_quality);
return mcCairoSvg::svgToPs($normalsvg_filename, $param_outputfile);
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename);
return mcCairoSvg::svgToPs($normalsvg_filename, $param_outputfile, $param_quality);
}
/**
......@@ -48,12 +48,13 @@ class mcCairoSvg {
}
if(!$param_quality['DPI']) {
$param_quality['DPI'] = 90;
D::ulli('$param_quality[DPI] = 30;');
$param_quality['DPI'] = 30;
}
$order = $ausgabe = $return_var = null;
$order = "/var/www/Magento/CairoSVG/cairosvg.sh '".$param_input_filename."' '".$out_pdf."' '".$param_format."' '".$param_quality['DPI']."' ";
// D::ulli('$'.$order);
D::ulli('$'.$order);
// $shell_exec = shell_exec($order);
$shell_exec = exec($order, $ausgabe, $return_var);
// D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!