Exemplo n.º 1
0
<?php

session_start();
if (isset($_POST["item"])) {
    $item = '<div class="item">';
    $item .= $_POST["item"];
    $item .= '</div>';
}
writethis($item);
$_SESSION["currentS"] = $_SESSION["state"];
function writethis($item)
{
    $item = preg_replace('/140/', '281', $item);
    $myfile = fopen("temp/" . $_SESSION["id"] . "p.html", 'a');
    fwrite($myfile, preg_replace('/\\\\"/', '"', $item));
    fclose($myfile);
}
Exemplo n.º 2
0
        $text = '
<div class="item">
	      <h2>Cropped Image</h2>
	      <img src="images/temp/' . $_SESSION["id"] . '_' . $_SESSION["state"] . $ext . '" alt="picture" width="281px" height="281px"/>
	      <dl class="details ui-helper-clearfix">
			<dt>
			This is the cropped image.</dt>
			<dt>
			
			Proceed by selecting the operation you want to perform.
			
			</dt>
	      </dl>
	    </div>';
        echo $text;
        writethis($text);
    } else {
        echo '<img
src="images/temp/' . $_SESSION["id"] . '_' . $_SESSION["state"] . $ext . '" alt="picture" width="281px" height="281px"/>';
    }
} else {
    exec("./execs/colour.out " . $user_folder . $_SESSION["id"] . $_SESSION["state"] . $ext . ' ' . $user_folder . $_SESSION["id"] . $_SESSION["state"] . 's' . $ext . ' 4');
    echo '

<table style="text-align:center;"> <tr> <td>
 <img src="images/temp/' . $_SESSION["id"] . $_SESSION["state"] . $ext . '" id="both" alt="InputLayer" width="130px" height="130px"/> </td><td>
	<img src="images/temp/' . $_SESSION["id"] . $_SESSION["state"] . 's1' . $ext . '" class="rgb" alt="InputLayer" width="130px"  height="130px"/> </td><td>
	<img src="images/temp/' . $_SESSION["id"] . $_SESSION["state"] . 's2' . $ext . '" class="rgb" alt="InputLayer" width="130px"  height="130px"/> </td><td>
	<img src="images/temp/' . $_SESSION["id"] . $_SESSION["state"] . 's3' . $ext . '" class="rgb" alt="InputLayer" width="130px"  height="130px"/> </td></tr><tr>
	<td>Original</td><td>Red Plane</td><td>Green Plane</td><td>Blue Plane</td></tr></table> ';
}