php session_start();
ob_start();
//ini_set("display_errors","on");
ini_set("memory_limit","24m");
include("includes/connect.php");
$xmlid=$_request['xmlid'];
$filename = "http://203.122.11.36/onlineartwork.co.uk/visitingcard/$xmlid.xml";
$content=file_get_contents($filename);
$xml = simplexml_load_string($content);
//echo "i am here";
//echo "<pre>";
//var_dump($xml);
for($i=0;$i<sizeof($xml->object);$i++){
$name[]=$xml->object[$i]->name;
$width[]=$xml->object[$i]->width;
$height[]=$xml->object[$i]->height;
$x[]=$xml->object[$i]->x;
$y[]=$xml->object[$i]->y;
$rtn[]=$xml->object[$i]->rtn;
$a[]=$xml->object[$i]->a;
$layer[]=$xml->object[$i]->layer;
}
/*
echo "name<pre>";
var_dump($name);
echo "width<pre>";
var_dump($width);
echo "height<pre>";
var_dump($height);
echo "x<pre>";
var_dump($x);
echo "y<pre>";
var_dump($y);
echo "a<pre>";
var_dump($a);
echo "layer<pre>";
var_dump($layer);
*/
//print_r($xml->object->name);
/*
foreach ($xml as $v1){
foreach ($v1 as $key => $value){
echo $key."-------".$value."\n";
}
}
*/
//exit();
$count3=count($name);
for ($j=0;$j<$count3;$j++)
{
$transition=$a[$j];
$insertfile="visitingcard/acme/julian/".$name[$j].".jpg";
$insertfile_id = imagecreatefromjpeg($insertfile);
$insertfile_width=$width[$j];
$insertfile_height=$height[$j];
</body></html>";
require('visitingcard/html_to_pdf.inc.php');
$htmltopdf = new html_to_pdf();
$filepath="http://203.122.11.36/onlineartwork.co.uk/visitingcard/$newfile.html";
$result = $htmltopdf->converturl("$filepath");
if($result==false)
echo $htmltopdf->error();
@unlink($filepath);
?>
<tr>
<td height="5"></td>
</tr>
<tr>
<td valign="top"
class="toplinks"><b>description</b></td><td>sfdsdfsdf</td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<!--<td valign="top" align="left">
<a
href="user.php?act=productdescflash&save=yes" name="savepdf"
id="savepdf">savepdf</a>
</td>-->
<!--<td valign="top" align="left">
<a
href="visitingcard/<?php echo $newfile?>.pdf" name="savepdf" id="savepdf">view
saved pdf file</a>
</td>-->
<td valign="top" align="left">
<a
href="viewsave.php?newfile=<?php echo $newfile?>" name="savepdf" id="savepdf">view
saved pdf file</a>
</td>
</tr>
<tr>
<td valign="top" align="right">
<form method=post action="" name="cart_form">
<input type="hidden" name="product_id" value="<?php echo
$result_product_row['id']?>">
<input type="image" src="images/buy.gif" name="cart">
</form>
</td>
</tr>
<tr><td height="5"></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
if(isset($_request['save']) &&$_request['save']='yes'){
$filename1="visitingcard/".$_session['filenamesave'].".xml";
$file = fopen ($filename1, "rb");
require_once("dompdf_config.inc.php");
$a= "<img src=visitingcard/$filenamesave.jpg >";
$dompdf = new dompdf();
$dompdf->load_html(($a));
$dompdf->load_html_file($file);
echo $dompdf->get_protocol();
$dompdf->render();
$dompdf->stream("$filenamesave.pdf");
}?>