diff --git a/public_html/deployment/act_accept.php b/public_html/deployment/act_accept.php index 2a6cffa2c09a02b3c1566aa0291ed4daaa2738f6..21b32f5cb7f15d1c8458d1912e2349912d2fd4d9 100644 --- a/public_html/deployment/act_accept.php +++ b/public_html/deployment/act_accept.php @@ -106,9 +106,9 @@ if (array_key_exists("confirm", $aParams)) { } -$sOut.='<hr>' . aHome() .' '. aPrjHome(); +$sOut.= '<hr>' .aPrjHome(); // -- Ausgabe -$sPhpOut=$sOut; +echo $sOut; ?> diff --git a/public_html/deployment/act_build.php b/public_html/deployment/act_build.php index f2e93148da0e38aae9f0fd4d5623a8316aa69430..53c57ee63aa3c3ac218c8ef4af54884dc65d4b10 100644 --- a/public_html/deployment/act_build.php +++ b/public_html/deployment/act_build.php @@ -21,8 +21,50 @@ $oPrj = new project($aParams["prj"]); $sOut = ''; +print_r($aParams); if (array_key_exists("confirm", $aParams)) { - $sOut.=$oPrj->build(); + $sOutDir="/tmp"; // Ausgabeverzeichnis + $sTmpFile=tempnam("", $aParams["prj"]); + + $sDivname="outAjax"; + $sUrl="?" + ."&prj=".$aParams["prj"] + ."&action=".$aParams["action"] + ."&ajax=".$sTmpFile + ; + $sUrlStartAction=$sUrl."&run=1"; + + // im Hintergrund Prozess ankicken + if (array_key_exists("run", $aParams)){ + $oPrj->build($sOutDir."/".$aParams["ajax"]); + die(); + } + // im Hintergrund Prozess ankicken + if (array_key_exists("ajax", $aParams)){ + echo file_get_contents($sOutDir."/".$aParams["ajax"]); + die(); + } + $sOut.='<div id="'.$sDivname.'">Moment...</div>' + . '<script> + // init build process + $.post( "'.$sUrlStartAction.'", function( data ) { + $( ".'.$sDivname.'" ).html( data ); + }); + + function AjaxPolling(sUrl, sDivname, iRepeat){ + $.post( sUrl, function( data ) { + $("#"+sDivname ).html( data ); + }); + + if (iRepeat){ + window.settimeout("AjaxPolling( \'"+sUrl+"\', \'"+sDivname+"\', \'"+iRepeat+"\')", iRepeat); + } + } + + </script>'; + + + // $sOut.=$oPrj->build($sTmpFile); } else { $sNext = $oPrj->getNextPhase(); $aPhaseData2 = $oPrj->getPhaseInfos($sNext); @@ -96,9 +138,9 @@ if (array_key_exists("confirm", $aParams)) { } -$sOut.='<hr>' . aHome() . ' ' . aPrjHome(); +$sOut.='<hr>' . aPrjHome(); // -- Ausgabe -$sPhpOut = $sOut; +echo $sOut; ?> diff --git a/public_html/deployment/act_cleanup.php b/public_html/deployment/act_cleanup.php index fb150cb15ec11990dad56fb5b32e326f11f0a731..d78c24519091a08063042adaa5bd8e16ef271dd9 100644 --- a/public_html/deployment/act_cleanup.php +++ b/public_html/deployment/act_cleanup.php @@ -17,7 +17,7 @@ require_once("./classes/project.class.php"); $oPrj = new project($sPrj); -$sPhpOut = ' +$sOut = ' <h3>Archive Dir: ' . $aConfig['archiveDir'] . '</h3> deleted:<br> @@ -27,6 +27,9 @@ $sPhpOut = ' <h3>Builds Dir: ' . $aConfig['buildDir'] . '/[project]/</h3> <pre>' . print_r($oPrj->cleanupBuilds(), true) . '</pre> - <hr>' . aHome() .' '. aPrjHome(); + <hr>' . aPrjHome(); + +// -- Ausgabe +echo $sOut; ?> diff --git a/public_html/deployment/act_deploy.php b/public_html/deployment/act_deploy.php index 1c7fa870dec242ec6243321c56a4e6403c358e90..1d0687116651a7036f1ac5838e98f82ccc31d7da 100644 --- a/public_html/deployment/act_deploy.php +++ b/public_html/deployment/act_deploy.php @@ -66,9 +66,9 @@ if (array_key_exists("confirm", $aParams)) { } -$sOut.='<hr>' . aHome() .' '. aPrjHome(); +$sOut.='<hr>' . aPrjHome(); // -- Ausgabe -$sPhpOut = $sOut; +echo $sOut; ?> diff --git a/public_html/deployment/act_doc.php b/public_html/deployment/act_doc.php index d9f78f38f3eec68fe384eb1c83e88fb8af926180..0273e6f8e4769e9211242c5cd1f5762c50d75510 100644 --- a/public_html/deployment/act_doc.php +++ b/public_html/deployment/act_doc.php @@ -17,31 +17,35 @@ $aClasses=array( "formgen"=>array("name"=>"formgen", "info" => "Zeichnen von FORM Elementen"), ); -$sPhpOut=''; -$sPhpOut.='<a href="/deployment/all/doc/">Start</a> | '; +$sOut=''; +$sOut.='<a href="/deployment/all/doc/">Start</a> | '; foreach ($aClasses as $sClassfile=>$aInfos){ - $sPhpOut.='<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a> | '; + $sOut.='<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a> | '; } -$sPhpOut.= '<hr>'; +$sOut.= '<hr>'; if (array_key_exists("par3", $aParams)) { $sClass=$aParams["par3"]; if (!array_key_exists($sClass, $aClasses)){ - $sPhpOut.= getBox("error", "Die Doku kann nicht angezeigt werden. Eine Klasse "$sClass" ist nicht konfiguriert in ". __FILE__ ."."); + $sOut.= getBox("error", "Die Doku kann nicht angezeigt werden. Eine Klasse "$sClass" ist nicht konfiguriert in ". __FILE__ ."."); } else { require_once("./classes/$sClass.class.php"); $o=new classinfos($aClasses[$sClass]["name"]); - $sPhpOut.=$aClasses[$sClass]["info"] . $o->render(); + $sOut.=$aClasses[$sClass]["info"] . $o->render(); } } else { - $sPhpOut.='Wähle eine Klasse.<ul>'; + $sOut.='Wähle eine Klasse.<ul>'; foreach ($aClasses as $sClassfile=>$aInfos){ - $sPhpOut.='<li>' + $sOut.='<li>' . '<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a>' . ' ' . $aInfos["info"] . '</li>'; } - $sPhpOut.='</ul>'; + $sOut.='</ul>'; } + +// -- Ausgabe +echo $sOut; + ?> diff --git a/public_html/deployment/act_overview.php b/public_html/deployment/act_overview.php index 6a09c1827785a199bd37c923ac32f872dd11f552..7a53559cf9ea03b2262e1afc325a2d336a183c6d 100644 --- a/public_html/deployment/act_overview.php +++ b/public_html/deployment/act_overview.php @@ -19,11 +19,11 @@ if (!array_key_exists("prj", $aParams)) { require_once("./classes/projectlist.class.php"); $oPrjList = new projectlist(); - $sPhpOut = $oPrjList->renderOverview(); + $sOut = $oPrjList->renderOverview(); } else { require_once("./classes/project.class.php"); $oPrj = new project($aParams["prj"]); - $sPhpOut = ' + $sOut = ' <div class="infobox" style="float: right;"> <h3>Steckbrief</h3> ' . $oPrj->renderProjektInfos() . ' @@ -33,7 +33,7 @@ if (!array_key_exists("prj", $aParams)) { <h3>Phasen</h3>'; if ($oPrj->getActivePhases()) { - $sPhpOut.=' + $sOut.=' <div class="tabbable"> <ul class="nav nav-tabs" style="float: left; width: 50%;"> <li class="active"><a href="#tab1" data-toggle="tab">Phasen</a></li> @@ -54,10 +54,12 @@ if (!array_key_exists("prj", $aParams)) { </div> </div>'; } else { - $sPhpOut.=getBox("info", "Es wurde noch keine URL in keiner der Phasen definiert") . + $sOut.=getBox("info", "Es wurde noch keine URL in keiner der Phasen definiert") . $oPrj->renderLink("setup"); } - $sPhpOut .= '<div style="clear: both"></div><hr>' . aHome(); + $sOut .= '<div style="clear: both"></div><hr>' . aHome(); } +// +echo $sOut; ?> diff --git a/public_html/deployment/act_phase.php b/public_html/deployment/act_phase.php index 474ac7a095a8b8daea2cbd90e7e6421bc740ad48..b0c65546616b10fbc000ffd41a2aea80d6d6695b 100644 --- a/public_html/deployment/act_phase.php +++ b/public_html/deployment/act_phase.php @@ -45,17 +45,20 @@ if ($sPhase) { </tbody> </table> '; + /* if ($sFirst == $sPhase) { $sOut.='<br><h3>weitere Aktionen</h3>' . $oPrj->renderLink("build"); } + * + */ } else { $sOut.=getBox("error", 'ERROR: missing name of the phase.'); } -$sOut.='<hr>' . aHome() .' '. aPrjHome(); +$sOut.= '<hr>' .aPrjHome(); // -- Ausgabe -$sPhpOut = $sOut; +echo $sOut; ?> diff --git a/public_html/deployment/act_setup.php b/public_html/deployment/act_setup.php index a5feffe24d9d963827a9a8927a7d6057b350c8d2..0da9fd018f6b963bf9985c1cc11f87095f4846f2 100644 --- a/public_html/deployment/act_setup.php +++ b/public_html/deployment/act_setup.php @@ -54,8 +54,8 @@ if ($aParams["prj"] == "all") { $sOut.=$oPrj->renderProjectSetup(); } -$sOut.='<hr>' . aHome() .' '. aPrjHome(); +$sOut.='<hr>' . aPrjHome(); // -- Ausgabe -$sPhpOut = $sOut; +echo $sOut; ?> diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php index d257bc962f92b083b94303dc5dc17590097c34be..0ca2636ce109737ccb5cae1cb7d3926fc189a432 100644 --- a/public_html/deployment/inc_functions.php +++ b/public_html/deployment/inc_functions.php @@ -283,14 +283,5 @@ function enterDeployinfos() { return $sOut; } -function getChecksumDiv($sText) { - return '<div style="background: ' . getChecksumColor($sText) . '; width: 20px; height: 20px;"> </div>'; -} - -function getChecksumColor($sText) { - $sReturn = ''; - $s = md5($sText); - return "#" . substr($s, 0, 2) . substr($s, 2, 2) . substr($s, 4, 2); -} ?> diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php index 4026f91706349207c172ac52701c7d36f0c4bab1..fcb9f185ce7e52844449dbd73abd9854bdde9c1a 100644 --- a/public_html/deployment/index.php +++ b/public_html/deployment/index.php @@ -36,7 +36,14 @@ if (array_key_exists("action", $aParams)) { // ------ action $sActionFile = __DIR__ . '/act_' . $sAction . ".php"; -include($sActionFile); + +ob_start(); +if (!@include($sActionFile)) { + include("./pages/error_404.php"); +} +$sPhpOut = ob_get_contents(); +ob_end_clean(); + // ------ Ausgabe $sPhpOut = '