|
home | manual | reference | regression | sequence | develop | apps |
Show/index
OLD NEW go ok
PHP
hello/hello.phpHTML
hello/hello.padResult <?php
$hi = 'Hello World !';
?><h3>
{$hi}
</h3>Hello World !
PHP
hello/hello.phpHTML
hello/hello.padResult <?php
$hi = 'Hello World !';
?><h3>
{$hi}
</h3>Hello World !
Old Source New Source <table border="1" cellpadding="10" cellspacing="0">
<tr>
<th bgcolor="#dddddd">
PHP <br><font size="-2">hello/hello.php</font>
</th>
<th bgcolor="#dddddd">
HTML <br><font size="-2">hello/hello.pad</font>
</th>
<th bgcolor="#dddddd">
Result
</th>
</tr>
<tr>
<td style="vertical-align:top"><pre><code style="color: #000000"><span style="color: #0000BB"><?php<br><br> $hi </span><span style="color: #007700">= </span><span style="color: #DD0000">'Hello World !'</span><span style="color: #007700">;<br><br></span><span style="color: #0000BB">?></span></code></pre> </td>
<td style="vertical-align:top"><pre><code style="color: #000000"><h3><br> <b>{<font color="green"><font color="red">$</font>hi</font>}</b><br></h3></code></pre></td>
<td style="vertical-align:top"><table border="1" cellpadding="10" cellspacing="0">
<tr>
<th bgcolor="#dddddd">
PHP <br><font size="-2">hello/hello.php</font>
</th>
<th bgcolor="#dddddd">
HTML <br><font size="-2">hello/hello.pad</font>
</th>
<th bgcolor="#dddddd">
Result
</th>
</tr>
<tr>
<td style="vertical-align:top"><pre><code style="color: #000000"><span style="color: #0000BB"><?php<br><br> $hi </span><span style="color: #007700">= </span><span style="color: #DD0000">'Hello World !'</span><span style="color: #007700">;<br><br></span><span style="color: #0000BB">?></span></code></pre> </td>
<td style="vertical-align:top"><pre><code style="color: #000000"><h3><br> <b>{<font color="green"><font color="red">$</font>hi</font>}</b><br></h3></code></pre></td>
<td style="vertical-align:top"><div id="padAjaxwiH55LXu"></div> <div id="padAjaxyirMMQ23"></div>
<script>
<script>padAjaxwiH55LXu = new XMLHttpRequest();
padAjaxwiH55LXu.onreadystatechange=function() {
if (padAjaxwiH55LXu.readyState === 4) {
if (padAjaxwiH55LXu.status === 200) {
document.getElementById("padAjaxwiH55LXu").innerHTML=padAjaxwiH55LXu.responseText;padAjaxyirMMQ23 = new XMLHttpRequest();
padAjaxyirMMQ23.onreadystatechange=function() {
if (padAjaxyirMMQ23.readyState === 4) {
if (padAjaxyirMMQ23.status === 200) {
document.getElementById("padAjaxyirMMQ23").innerHTML=padAjaxyirMMQ23.responseText;} else { } else { document.getElementById("padAjaxwiH55LXu").innerHTML=padAjaxwiH55LXu.statusText; document.getElementById("padAjaxyirMMQ23").innerHTML=padAjaxyirMMQ23.statusText; }
}
}}
}
}padAjaxwiH55LXu.open("GET","http://localhost/manual/?hello/hello&padInclude&padSesID=DiM2hOlW&padReqID=Axw7UY3m",true);
padAjaxwiH55LXu.send();padAjaxyirMMQ23.open("GET","http://localhost/manual/?hello/hello&padInclude&padSesID=DiM2hOlW&padReqID=Fo20VnKg",true);
padAjaxyirMMQ23.send();</script>
</td>
</tr>
</table></script>
</td>
</tr>
</table>
PHP
show/index.phpHTML
show/index.padResult <?php
$curl = padCurl ( "$padHost/$app?$item&padInclude" );
if ( ! str_starts_with ( $curl ['result'], '2') )
padRedirect ( $item, [ 'padInclude' => 1 ], $app );
$oldRes = $newRes = $newSrc = $compare = $demoLines = [];
$title = $item;
$new = $curl ['data'];
$old = padFileGet ( DAT . "regression/$app/$item.html" );
$diff = diff ( $old, $new );
$check = $old;
while ( strpos($check, '<!-- START DEMO RESULT -->') )
$oldRes [] = trim ( cut ( $check, '<!-- START DEMO RESULT -->', '<!-- END DEMO RESULT -->' ) );
$check = $new;
while ( strpos($check, '<!-- START DEMO RESULT -->') )
$newRes [] = trim ( cut ( $check, '<!-- START DEMO RESULT -->', '<!-- END DEMO RESULT -->' ) );
$check = $new;
while ( strpos($check, '<!-- START DEMO SOURCE -->') )
$newSrc [] = trim ( cut ( $check, '<!-- START DEMO SOURCE -->', '<!-- END DEMO SOURCE -->' ) );
foreach ( $oldRes as $key => $value )
if ( isset ($newRes [$key]) and $oldRes [$key] <> $newRes [$key] ) {
$compare [$key] ['diff'] = diff ( $oldRes [$key], $newRes [$key] );
$demoLines [$key] ['newSrc'] = $newSrc [$key];
$demoLines [$key] ['oldRes'] = $oldRes [$key];
$demoLines [$key] ['newRes'] = $newRes [$key];
}
?>{if $old and $old NE $new}
<style>
.diffDeleted {
background-color: OrangeRed;
font-family: monospace;
font-size: 75%;
}
.diffUnmodified {
background-color: white;
font-family: monospace;
font-size: 75%;
}
.diffInserted {
background-color: Chartreuse;
font-family: monospace;
font-size: 75%;
}
</style>
{count 'demoLines'}
{lines}
@else@
{changed}
{/count}
<br>
{/if}
{example '{$item}', app='{$app}'}
PHP
hello/hello.phpHTML
hello/hello.padResult <?php
$hi = 'Hello World !';
?><h3>
{$hi}
</h3>
|
home | manual | reference | regression | sequence | develop | apps |
(c) 2003-2025 Herbert Groot Jebbink