Merge pull request #223 from marcoAntonioNina/BUG-0000
BUG 0000 Short tags
This commit is contained in:
@@ -38,8 +38,9 @@ $aFields = $oApp->loadCase($_SESSION['APPLICATION']);
|
|||||||
$aStoredVarNames = array_keys($aFields['APP_DATA']);
|
$aStoredVarNames = array_keys($aFields['APP_DATA']);
|
||||||
|
|
||||||
$aVariables = Array();
|
$aVariables = Array();
|
||||||
for($i=0; $i<count($_SESSION['TRIGGER_DEBUG']['DATA']); $i++) {
|
|
||||||
$aVariables[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
for ($i=0; $i<count($_SESSION['TRIGGER_DEBUG']['DATA']); $i++) {
|
||||||
|
$aVariables[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aVariables = array_merge($aFields['APP_DATA'], $aVariables);
|
$aVariables = array_merge($aFields['APP_DATA'], $aVariables);
|
||||||
@@ -47,37 +48,37 @@ ksort($aVariables);
|
|||||||
|
|
||||||
//triggers
|
//triggers
|
||||||
|
|
||||||
|
if (isset($_SESSION['TRIGGER_DEBUG']['info'])) {
|
||||||
if( isset($_SESSION['TRIGGER_DEBUG']['info']) ) {
|
$aTriggers = $_SESSION['TRIGGER_DEBUG']['info'];
|
||||||
$aTriggers = $_SESSION['TRIGGER_DEBUG']['info'];
|
|
||||||
} else {
|
} else {
|
||||||
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
|
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($aTriggers as $aTrigger) {
|
foreach ($aTriggers as $aTrigger) {
|
||||||
$triggers_name = Array();
|
$triggers_name = Array();
|
||||||
$triggers_code = Array();
|
$triggers_code = Array();
|
||||||
|
|
||||||
$t_time = $aTrigger['TIME'];
|
$t_time = $aTrigger['TIME'];
|
||||||
if($aTrigger['NUM_TRIGGERS'] != 0) {
|
if ($aTrigger['NUM_TRIGGERS'] != 0) {
|
||||||
$triggers_onfly = $aTrigger['NUM_TRIGGERS']." trigger(s) was executed <font color='#641213'><b>".strtolower($aTrigger['TIME'])."</b></font><br/>";
|
$triggers_onfly = $aTrigger['NUM_TRIGGERS']." trigger(s) was executed <font color='#641213'><b>".
|
||||||
|
strtolower($aTrigger['TIME'])."</b></font><br/>";
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
if(isset($aTrigger['TRIGGERS_NAMES'])) {
|
if (isset($aTrigger['TRIGGERS_NAMES'])) {
|
||||||
foreach($aTrigger['TRIGGERS_NAMES'] as $name) {
|
foreach ($aTrigger['TRIGGERS_NAMES'] as $name) {
|
||||||
$t_code = $aTrigger['TRIGGERS_VALUES'][$cnt]['TRI_WEBBOT'];
|
$t_code = $aTrigger['TRIGGERS_VALUES'][$cnt]['TRI_WEBBOT'];
|
||||||
//$t_code = str_replace('"', '\'',$t_code);
|
//$t_code = str_replace('"', '\'',$t_code);
|
||||||
//$t_code = addslashes($t_code);
|
//$t_code = addslashes($t_code);
|
||||||
$t_code = Only1br($t_code);
|
$t_code = Only1br($t_code);
|
||||||
|
|
||||||
$triggers_name[] = $name;
|
$triggers_name[] = $name;
|
||||||
$triggers_code[] = $t_code;
|
$triggers_code[] = $t_code;
|
||||||
$cnt++;
|
$cnt++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$triggers_onfly = " No triggers found <font color='#641213'><b>".strtolower($t_time)."</b></font>";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$triggers_onfly = " No triggers found <font color='#641213'><b>".strtolower($t_time)."</b></font>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//errors
|
//errors
|
||||||
@@ -85,13 +86,14 @@ $DEBUG_POST = array_unique($_SESSION['TRIGGER_DEBUG']['ERRORS']);
|
|||||||
|
|
||||||
/////
|
/////
|
||||||
|
|
||||||
function Only1br($string) {
|
function Only1br($string)
|
||||||
return preg_replace("/(\r\n)+|(\n|\r)+/", "<br />", $string);
|
{
|
||||||
|
return preg_replace("/(\r\n)+|(\n|\r)+/", "<br />", $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
|
||||||
|
|
||||||
|
<style>
|
||||||
table.pmdebugger{
|
table.pmdebugger{
|
||||||
border: 1px solid #777;
|
border: 1px solid #777;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -121,10 +123,12 @@ function Only1br($string) {
|
|||||||
padding: 3px;
|
padding: 3px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#debugger_triggers{
|
#debugger_triggers{
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#debugger_errors{
|
#debugger_errors{
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@@ -137,10 +141,11 @@ function Only1br($string) {
|
|||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function toggle(id){
|
function toggle(id){
|
||||||
var o = document.getElementById(id);
|
var o = document.getElementById(id);
|
||||||
if( o.style.display != 'block'){
|
if(o.style.display != 'block'){
|
||||||
o.style.display = 'block';
|
o.style.display = 'block';
|
||||||
newimg = new Image();
|
newimg = new Image();
|
||||||
newimg.src = '/images/pin-dn-on.gif';
|
newimg.src = '/images/pin-dn-on.gif';
|
||||||
@@ -161,28 +166,36 @@ function Only1br($string) {
|
|||||||
<table width='100%' cellspacing='0' cellpadding='0' border='1' style='border:0px;'>
|
<table width='100%' cellspacing='0' cellpadding='0' border='1' style='border:0px;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='410px' class='treeNode' style='border:0px;background-color:transparent;'>
|
<td width='410px' class='treeNode' style='border:0px;background-color:transparent;'>
|
||||||
<font color='#0B58B6'><?php= $triggers_onfly?></font><br/>
|
<font color='#0B58B6'><?php echo $triggers_onfly; ?></font><br/>
|
||||||
<?php if( sizeof($triggers_name) > 0 ) {?>
|
<?php if (sizeof($triggers_name) > 0) {?>
|
||||||
<table class="pmdebugger" width="100%">
|
<table class="pmdebugger" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="5" class="pmdebuggerHeader">#</td><td class="pmdebuggerHeader">Name</td><td class="pmdebuggerHeader"> </td>
|
<td width="5" class="pmdebuggerHeader">#</td>
|
||||||
|
<td class="pmdebuggerHeader">Name</td>
|
||||||
|
<td class="pmdebuggerHeader"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach($triggers_name as $k=>$trigger) {?>
|
<?php
|
||||||
|
foreach ($triggers_name as $k => $trigger) {?>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <?php =($k+1)?> </td>
|
<td> <?php echo ($k+1); ?> </td>
|
||||||
<td>
|
<td>
|
||||||
<?php= $trigger?>
|
<?php echo $trigger; ?>
|
||||||
<div id='trigger_<?php= $k?>' class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-all data_view'><?php=$triggers_code[$k]?></div>
|
<div id='trigger_<?php echo $k; ?>'
|
||||||
|
class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-all data_view'>
|
||||||
|
<?php echo $triggers_code[$k]; ?>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" width="5">
|
<td valign="top" width="5">
|
||||||
<a href='#' onclick="toggle('trigger_<?php=$k?>'); return false;">
|
<a href='#' onclick="toggle('trigger_<?php echo $k; ?>'); return false;">
|
||||||
<img id='img_trigger_<?php=$k?>' src='/images/pin-up-on.gif' border='0'>
|
<img id='img_trigger_<?php echo $k; ?>' src='/images/pin-up-on.gif' border='0'>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
} ?>
|
||||||
</table>
|
</table>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -195,67 +208,83 @@ function Only1br($string) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="pmdebuggerHeader">Name</td><td class="pmdebuggerHeader">Value</td>
|
<td class="pmdebuggerHeader">Name</td><td class="pmdebuggerHeader">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach($aVariables as $sName=>$aVariable) {?>
|
<?php
|
||||||
|
foreach ($aVariables as $sName => $aVariable) {?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if( is_array($aVariable) ) {?>
|
<?php
|
||||||
<td valign="top"><font color="blue"> <?=$sName?></font></td>
|
if (is_array($aVariable)) {?>
|
||||||
<?php } else {?>
|
<td valign="top"><font color="blue"> <?php
|
||||||
<td> <?php =$sName?></td>
|
echo $sName; ?></font></td>
|
||||||
<?php }?>
|
<?php
|
||||||
|
} else {?>
|
||||||
|
<td> <?php echo $sName; ?></td>
|
||||||
|
<?php
|
||||||
|
}?>
|
||||||
<td><?php echo expandVarView($aVariable, $sName)?></td>
|
<td><?php echo expandVarView($aVariable, $sName)?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }?>
|
<?php
|
||||||
|
}?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!---->
|
<!---->
|
||||||
<?php if( count($DEBUG_POST) > 0 ) {?>
|
|
||||||
<div class="ui-widget-header ui-corner-all" width="50%" align="center">Errors</div>
|
|
||||||
<div id="debugger_errors" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all" align="left">
|
|
||||||
|
|
||||||
<?php for($i=0; $i<count($DEBUG_POST); $i++) {
|
<?php
|
||||||
if(isset($DEBUG_POST[$i]['ERROR']) and $DEBUG_POST[$i]['ERROR'] != '') {?>
|
if (count($DEBUG_POST) > 0) {?>
|
||||||
<span class='treeNode'>
|
<div class="ui-widget-header ui-corner-all" width="50%" align="center">Errors</div>
|
||||||
<font color='red'>Error </font>
|
<div id="debugger_errors" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all" align="left">
|
||||||
<font color='#0B58B6'><?php=str_replace('<br />', '',$DEBUG_POST[$i]['ERROR'])?></font>
|
|
||||||
</span><br/>
|
<?php
|
||||||
<?php}
|
for ($i=0; $i<count($DEBUG_POST); $i++) {
|
||||||
|
if (isset($DEBUG_POST[$i]['ERROR']) and $DEBUG_POST[$i]['ERROR'] != '') {?>
|
||||||
|
<span class='treeNode'>
|
||||||
|
<font color='red'>Error </font>
|
||||||
|
<font color='#0B58B6'><?php echo str_replace('<br />', '',$DEBUG_POST[$i]['ERROR']);?></font>
|
||||||
|
</span><br/>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for($i=0; $i<count($DEBUG_POST); $i++) { ?>
|
for ($i=0; $i<count($DEBUG_POST); $i++) { ?>
|
||||||
<?php if(isset($DEBUG_POST[$i]['FATAL']) and $DEBUG_POST[$i]['FATAL'] != '') { ?>
|
<?php
|
||||||
<span class='treeNode'>
|
if (isset($DEBUG_POST[$i]['FATAL']) and $DEBUG_POST[$i]['FATAL'] != '') {?>
|
||||||
<font color='red'>Fatal error </font>
|
<span class='treeNode'>
|
||||||
<font color='#0B58B6'> <?php=str_replace('<br />', '',$DEBUG_POST[$i]['FATAL'])?></font>
|
<font color='red'>Fatal error </font>
|
||||||
</span><br/>
|
<font color='#0B58B6'> <?php echo str_replace('<br />', '',$DEBUG_POST[$i]['FATAL']); ?></font>
|
||||||
<?php }
|
</span><br/>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else { ?>
|
} else { ?>
|
||||||
<div class="ui-widget-header ui-corner-all" width="50%" align="center">No errors reported</div>
|
<div class="ui-widget-header ui-corner-all" width="50%" align="center">No errors reported</div>
|
||||||
<?php}?>
|
<?php
|
||||||
|
}?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!---->
|
<!---->
|
||||||
|
|
||||||
<?php if(isset($_POST['NextStep'])) {?>
|
<?php if (isset($_POST['NextStep'])) {?>
|
||||||
<input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href='<?php= $_POST['NextStep']?>'">
|
<input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href='
|
||||||
<?php}?>
|
<?php echo $_POST['NextStep']; ?>'">
|
||||||
|
<?php
|
||||||
|
}?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function expandVarView($a, $name) {
|
function expandVarView($a, $name)
|
||||||
if( is_array($a) ) {
|
{
|
||||||
echo "<a href='#' onclick=\"toggle('data_view_{$name}'); return false;\"><img id='img_data_view_{$name}' src='/images/pin-up-on.gif' border='0'></a><div id='data_view_{$name}' class='data_view'><table class='pmdebugger' width='100%'>";
|
if (is_array($a)) {
|
||||||
foreach($a as $k=>$v) {
|
echo "<a href='#' onclick=\"toggle('data_view_{$name}'); return false;\">
|
||||||
echo "<tr><td valign='top'> $k</td><td>";
|
<img id='img_data_view_{$name}' src='/images/pin-up-on.gif' border='0'></a>
|
||||||
expandVarView($v, "{$name}_{$k}");
|
<div id='data_view_{$name}' class='data_view'><table class='pmdebugger' width='100%'>";
|
||||||
echo "</td></tr>";
|
foreach ($a as $k => $v) {
|
||||||
|
echo "<tr><td valign='top'> $k</td><td>";
|
||||||
|
expandVarView($v, "{$name}_{$k}");
|
||||||
|
echo "</td></tr>";
|
||||||
|
}
|
||||||
|
echo "</table><div>";
|
||||||
|
} else {
|
||||||
|
echo ($a=='')? ' ': " $a";
|
||||||
}
|
}
|
||||||
echo "</table><div>";
|
|
||||||
} else {
|
|
||||||
echo ($a=='')? ' ': " $a";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
<?php if(isset($_POST['NextStep'])){?>
|
<?php if (isset($_POST['NextStep'])) {?>
|
||||||
<div class="ui-widget-header ui-corner-all" width="100%" align="center">Processmaker - Debugger (Break Point) <input type="button" value="Continue" class="module_app_button___gray" onclick="javascript:location.href='<?=$_POST['NextStep']?>'">
|
<div class="ui-widget-header ui-corner-all" width="100%" align="center">
|
||||||
|
Processmaker - Debugger (Break Point)
|
||||||
|
<input type="button" value="Continue" class="module_app_button___gray"
|
||||||
|
onclick="javascript:location.href='<?php echo $_POST['NextStep']; ?>'">
|
||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user