Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36612b6e
authored
Mar 24, 2014
by
sn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mcBash .. .mit zeitstatistik
1 parent
6d44a52c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
6 deletions
class_mcBash.inc.php
file/class_mcCairoSvg.inc.php
file/class_mcInkscape.inc.php
include.php
class_mcBash.inc.php
0 → 100644
View file @
36612b6
<?php
class
mcBash
{
public
static
function
exec
(
$command
,
array
&
$output
=
null
,
&
$return_var
=
null
)
{
$StartTime
=
time
();
$shell_exec
=
exec
(
$command
,
$output
,
$return_var
);
$zeit
=
getdate
(
time
()
-
$StartTime
);
D
::
ulli
(
$zeit
[
"minutes"
]
.
'm'
.
$zeit
[
"seconds"
]
.
's: mcBash# '
.
$command
);
return
$shell_exec
;
}
/**
* (PHP 4, PHP 5)<br/>
* Execute command via shell and return the complete output as a string
* @link http://php.net/manual/en/function.shell-exec.php
* @param string $cmd <p>
* The command that will be executed.
* </p>
* @return string The output from the executed command or <b>NULL</b> if an error occurred.
*/
public
static
function
shell_exec
(
$cmd
)
{
$StartTime
=
time
();
$shell_exec
=
shell_exec
(
$cmd
);
$zeit
=
getdate
(
time
()
-
$StartTime
);
D
::
ulli
(
$zeit
[
"minutes"
]
.
'm'
.
$zeit
[
"seconds"
]
.
's: mcBash# '
.
$cmd
);
return
$shell_exec
;
}
}
?>
\ No newline at end of file
file/class_mcCairoSvg.inc.php
View file @
36612b6
...
@@ -54,9 +54,10 @@ class mcCairoSvg {
...
@@ -54,9 +54,10 @@ class mcCairoSvg {
$order
=
$ausgabe
=
$return_var
=
null
;
$order
=
$ausgabe
=
$return_var
=
null
;
$order
=
"/var/www/Magento/CairoSVG/cairosvg.sh '"
.
$param_input_filename
.
"' '"
.
$out_pdf
.
"' '"
.
$param_format
.
"' '"
.
$param_quality
[
'DPI'
]
.
"' "
;
$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 = shell_exec($order);
$shell_exec
=
exec
(
$order
,
$ausgabe
,
$return_var
);
// $shell_exec = exec($order, $ausgabe, $return_var);
$shell_exec
=
mcBash
::
exec
(
$order
,
$ausgabe
,
$return_var
);
// D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order);
// D::show(array('$shell_exec' => $shell_exec, '$ausgabe'=>$ausgabe, '$return_var' => $return_var), $order);
return
$out_pdf
;
return
$out_pdf
;
...
...
file/class_mcInkscape.inc.php
View file @
36612b6
...
@@ -23,7 +23,8 @@ class mcInkscape {
...
@@ -23,7 +23,8 @@ class mcInkscape {
$order
=
"inkscape
$param_input_filename
--export-dpi="
.
$param_quality
[
'dpi'
]
.
" -e
$outfile
"
;
$order
=
"inkscape
$param_input_filename
--export-dpi="
.
$param_quality
[
'dpi'
]
.
" -e
$outfile
"
;
// D::ulli('$'.$order);
// D::ulli('$'.$order);
$shell_exec
=
shell_exec
(
$order
);
// $shell_exec = shell_exec($order);
$shell_exec
=
mcBash
::
shell_exec
(
$order
);
return
$outfile
;
return
$outfile
;
}
}
...
@@ -54,7 +55,8 @@ class mcInkscape {
...
@@ -54,7 +55,8 @@ class mcInkscape {
$order
=
"inkscape
$param_input_filename
--export-dpi="
.
$param_quality
[
'dpi'
]
.
" --export-pdf=
$outfile
"
;
$order
=
"inkscape
$param_input_filename
--export-dpi="
.
$param_quality
[
'dpi'
]
.
" --export-pdf=
$outfile
"
;
// D::ulli('$'.$order);
// D::ulli('$'.$order);
$shell_exec
=
shell_exec
(
$order
);
// $shell_exec = shell_exec($order);
$shell_exec
=
mcBash
::
shell_exec
(
$order
);
return
$outfile
;
return
$outfile
;
}
}
...
@@ -80,7 +82,9 @@ class mcInkscape {
...
@@ -80,7 +82,9 @@ class mcInkscape {
}
}
$inkscape_order
=
"inkscape -T "
.
$param_input_filename
.
" -l "
.
$outfile
.
" "
;
$inkscape_order
=
"inkscape -T "
.
$param_input_filename
.
" -l "
.
$outfile
.
" "
;
$shell_exec
=
shell_exec
(
$inkscape_order
);
// D::ulli('inkscapeSvgToNormalSvg:shell# '.$inkscape_order);
// $shell_exec = shell_exec($inkscape_order);
$shell_exec
=
mcBash
::
shell_exec
(
$inkscape_order
);
// D::show($shell_exec, $inkscape_order);
// D::show($shell_exec, $inkscape_order);
return
$outfile
;
return
$outfile
;
...
...
include.php
View file @
36612b6
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
require_once
$__PATH_to_mcClasses
.
'class_mcMail.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcMail.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcConfig.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcConfig.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcFile.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'file/class_mcFile.inc.php'
;
...
@@ -41,7 +42,7 @@ require_once $__PATH_to_mcClasses . 'oop/if_mcClass.inc.php';
...
@@ -41,7 +42,7 @@ require_once $__PATH_to_mcClasses . 'oop/if_mcClass.inc.php';
require_once
$__PATH_to_mcClasses
.
'class_mcSort.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcSort.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcBash.inc.php'
;
//require_once $__PATH_to_mcClasses . 'class_.inc.php';
//require_once $__PATH_to_mcClasses . 'class_.inc.php';
require_once
$__PATH_to_mcClasses
.
'ReportHandling/class_mcMessageReport.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'ReportHandling/class_mcMessageReport.inc.php'
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment