how to build tree structure from xml [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 days ago.
This post was edited and submitted for review 7 days ago.
Improve this question
I have a small php script that read an xml file and build a tree structure list.
but i need it to build it another way.
each 'SO' is a group and some of them have an 'id' attribute and some og them have a 'PID' with a value
i want the tree to be build on this, if the 'PID' value matches a 'SO' id attribute then the SO must be a brench of that 'SO'.
xml example:
<?xml version="1.0" encoding="utf-8"?>
<Database Id="fb05">
<Header>
<RegionId>1000</RegionId>
<ChildRegionId>2</ChildRegionId>
<FileCreator>PC</FileCreator>
<AssemblyVersion>1.19.0.8076</AssemblyVersion>
<FileOwner>kodak</FileOwner>
<DatabaseVersion>-1--1</DatabaseVersion>
<LastUsedDatabaseVersion>-1--1</LastUsedDatabaseVersion>
<LastSavedDate>07.02.2023 17:45:32</LastSavedDate>
</Header>
<Data>
<SO Id="P8736ae982b4f40aca2d6d9e64f989f59">
<OID>0</OID>
<N>Node</N>
<PID>-1</PID>
<Ms />
</SO>
<SO Id="P63d414fdaf8c414ab2bcc82314e94eb1">
<N>45.1</N>
<PID>P8736ae982b4f40aca2d6d9e64f989f59</PID>
<OID>1</OID>
<Ms />
<Ps>
<P Id="65">
<V>45.1</V>
</P>
</Ps>
</SO>
<SO Id="P1aab4a4b96664cd5a8c579b85b55c775">
<OID>2</OID>
<N>Tavle Navn 1</N>
<PID>P63d414fdaf8c414ab2bcc82314e94eb1</PID>
<Ps>
<P Id="71">
<V>Tavle Navn 1</V>
</P>
<P Id="3">
<V>TN-S</V>
</P>
<P Id="72">
<V>Isolationtest BMS-KT.45.6A.-1.01</V>
</P>
</Ps>
<Ms>
<M Id="P7bd80659b03c44d4887695db676157a0">
<MID>4</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:30:31</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="4">
<V>500 V</V>
</MP>
<MP Id="11">
<V>-</V>
</MP>
</MPs>
<Ls>
<L Id="1">
<V>1 MOhm</V>
</L>
</Ls>
<Rs>
<R Id="9">
<V>>999MOhm</V>
<S>1</S>
</R>
<R Id="10">
<V>525V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
</Ms>
</SO>
<SO Id="Pdef14a1c6ecb490795743ed9c7a5c6bb">
<OID>9</OID>
<N>F1</N>
<PID>P1aab4a4b96664cd5a8c579b85b55c775</PID>
<Ps>
<P Id="96">
<V>F1</V>
</P>
<P Id="109">
<V>IEC/EN</V>
</P>
<P Id="111">
<V>100 A</V>
</P>
<P Id="110">
<V>10 A</V>
</P>
<P Id="105">
<V>0.4 s</V>
</P>
<P Id="108">
<V>C</V>
</P>
<P Id="114">
<V>30 mA</V>
</P>
<P Id="113">
<V>A</V>
</P>
<P Id="95">
<V>Kredsløb nr</V>
</P>
<P Id="97">
<V>Beskrivelse af kreds sikring</V>
</P>
<P Id="98">
<V>Kreds lokation</V>
</P>
<P Id="625" />
<P Id="103" />
<P Id="102" />
<P Id="100" />
<P Id="99" />
</Ps>
<Ms>
<M Id="Pe1c73a71b6f8426794f3a9755fc43001">
<MID>7</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:41:28</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="56">
<V>LPE</V>
</MP>
<MP Id="152">
<V>Rpe</V>
</MP>
<MP Id="338">
<V>standard</V>
</MP>
</MPs>
<Ls>
<L Id="3">
<V>2 Ohm</V>
</L>
</Ls>
<Rs>
<R Id="21">
<V>0.02Ohm</V>
<S>1</S>
</R>
<R Id="22">
<V>0.0Ohm</V>
<S>0</S>
</R>
<R Id="23">
<V>0.0Ohm</V>
<S>0</S>
</R>
<R Id="26">
<V>Yes</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="P6528dcb9c4c04ba68e508bf3fdd172cc">
<MID>14</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:37:27</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>AC</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs>
<R Id="116">
<V>24.6ms</V>
<S>0</S>
</R>
<R Id="117">
<V>33.4ms</V>
<S>0</S>
</R>
<R Id="120">
<V>6.0ms</V>
<S>0</S>
</R>
<R Id="121">
<V>11.8ms</V>
<S>0</S>
</R>
<R Id="122">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="123">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="124">
<V>22.5mA</V>
<S>0</S>
</R>
<R Id="125">
<V>24.0mA</V>
<S>0</S>
</R>
<R Id="114">
<V>0.1V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pe931d0d28236473c98d6917e772dd95a">
<MID>14</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:39:00</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>A</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs>
<R Id="116">
<V>27.6ms</V>
<S>0</S>
</R>
<R Id="117">
<V>13.4ms</V>
<S>0</S>
</R>
<R Id="120">
<V>5.1ms</V>
<S>0</S>
</R>
<R Id="121">
<V>11.2ms</V>
<S>0</S>
</R>
<R Id="122">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="123">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="124">
<V>39.0mA</V>
<S>0</S>
</R>
<R Id="125">
<V>27.0mA</V>
<S>0</S>
</R>
<R Id="114">
<V>0.0V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pe95c037ce6054bf29f593c7b51450eca">
<MID>2</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:09</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="230">
<V>1-phase</V>
</MP>
<MP Id="434">
<V>-</V>
</MP>
<MP Id="231">
<V>Voltage</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="436">
<V>Off</V>
</MP>
</MPs>
<Ls>
<L Id="97">
<V>207 V</V>
</L>
<L Id="98">
<V>253 V</V>
</L>
<L Id="101">
<V>207 V</V>
</L>
<L Id="102">
<V>253 V</V>
</L>
<L Id="103">
<V>0 V</V>
</L>
<L Id="104">
<V>10 V</V>
</L>
</Ls>
<Rs>
<R Id="1">
<V>237V</V>
<S>0</S>
</R>
<R Id="2">
<V>237V</V>
<S>0</S>
</R>
<R Id="3">
<V>0V</V>
<S>0</S>
</R>
<R Id="4">
<V>50.0Hz</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pd9ea820cde7b4e18935e493578d30c33">
<MID>17</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:54</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="108">
<V>C</V>
</MP>
<MP Id="28">
<V>10 A</V>
</MP>
<MP Id="29">
<V>0.1 s</V>
</MP>
<MP Id="31">
<V>1</V>
</MP>
<MP Id="235">
<V>-</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
</MPs>
<Ls>
<L Id="13">
<V>100 A</V>
</L>
</Ls>
<Rs>
<R Id="34">
<V>3.72kA</V>
<S>1</S>
</R>
<R Id="205">
<V>0.06Ohm</V>
<S>0</S>
</R>
<R Id="37">
<V>0.03Ohm</V>
<S>0</S>
</R>
<R Id="38">
<V>0.06Ohm</V>
<S>0</S>
</R>
<R Id="39">
<V>237V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
</Ms>
</SO>
<SO Id="Pf39c7fa412374063942a750fb782aca5">
<OID>2</OID>
<N>Tavle Navn 2</N>
<PID>P63d414fdaf8c414ab2bcc82314e94eb1</PID>
<Ps>
<P Id="71">
<V>Tavle Navn 2</V>
</P>
<P Id="3">
<V>TN-S</V>
</P>
<P Id="72">
<V>Isolationtest BMS-KT.45.6A.-1.01</V>
</P>
</Ps>
<Ms>
<M Id="P33b5ba5a01de477894b5ec64bba861e5">
<MID>4</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:30:31</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="4">
<V>500 V</V>
</MP>
<MP Id="11">
<V>-</V>
</MP>
</MPs>
<Ls>
<L Id="1">
<V>1 MOhm</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
</Ms>
</SO>
<SO Id="Pa223cb2e6b864204a698c4bbf5c397a5">
<OID>9</OID>
<N>F1</N>
<PID>Pf39c7fa412374063942a750fb782aca5</PID>
<Ps>
<P Id="96">
<V>F1</V>
</P>
<P Id="109">
<V>IEC/EN</V>
</P>
<P Id="111">
<V>100 A</V>
</P>
<P Id="110">
<V>10 A</V>
</P>
<P Id="105">
<V>0.4 s</V>
</P>
<P Id="108">
<V>C</V>
</P>
<P Id="114">
<V>30 mA</V>
</P>
<P Id="113">
<V>A</V>
</P>
<P Id="95">
<V>Kredsløb nr</V>
</P>
<P Id="97">
<V>Beskrivelse af kreds sikring</V>
</P>
<P Id="98">
<V>Kreds lokation</V>
</P>
</Ps>
<Ms>
<M Id="P887aca482c74455d8ba836d8aa2227d7">
<MID>7</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:41:28</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="56">
<V>LPE</V>
</MP>
<MP Id="152">
<V>Rpe</V>
</MP>
<MP Id="338">
<V>standard</V>
</MP>
</MPs>
<Ls>
<L Id="3">
<V>2 Ohm</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="P6b617c0c7f174edd9f6e6ba5d109a227">
<MID>14</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:37:27</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>AC</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="Pa85b10feaabb44c89de77669c1723762">
<MID>14</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:39:00</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>A</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="P65d2c18f53a84fd9a20e282849821a90">
<MID>2</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:09</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="230">
<V>1-phase</V>
</MP>
<MP Id="434">
<V>-</V>
</MP>
<MP Id="231">
<V>Voltage</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="436">
<V>Off</V>
</MP>
</MPs>
<Ls>
<L Id="97">
<V>207 V</V>
</L>
<L Id="98">
<V>253 V</V>
</L>
<L Id="101">
<V>207 V</V>
</L>
<L Id="102">
<V>253 V</V>
</L>
<L Id="103">
<V>0 V</V>
</L>
<L Id="104">
<V>10 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="Paf889a4c35e74ae79023232f78b0d24f">
<MID>17</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:54</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="108">
<V>C</V>
</MP>
<MP Id="28">
<V>10 A</V>
</MP>
<MP Id="29">
<V>0.1 s</V>
</MP>
<MP Id="31">
<V>1</V>
</MP>
<MP Id="235">
<V>-</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
</MPs>
<Ls>
<L Id="13">
<V>100 A</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
</Ms>
</SO>
</Data>
<Is>
<I>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
<IHwV>4.0</IHwV>
<IMiNm>MI 3152</IMiNm>
<ISwV>2.13.26</ISwV>
<ISer>21101825</ISer>
<ICalD>20.04.2021</ICalD>
<IPCode>ALAM</IPCode>
</I>
<I>
<IGuId>21101825-20.04.2021-2.13.42-4.0-ALAM</IGuId>
<IHwV>4.0</IHwV>
<INm>EurotestXC</INm>
<IMiNm>MI 3152</IMiNm>
<ISwV>2.13.42</ISwV>
<ISer>21101825</ISer>
<ICalD>20.04.2021</ICalD>
<IPCode>ALAM</IPCode>
</I>
</Is>
<Us>
<U />
</Us>
</Database>
foreach ($xml->Data->SO as $SO) {
if($SO->OID) {
echo '<li class="'.$IODs[(string)$SO->OID].'" alt="' . $SO->OID . ' title="' . $SO->OID . '">'. $SO->N . '';
echo '<ul>';
} else {
echo "OID: " . $SO->OID . "<br>";
echo "N: " . $SO->N . "<br>";
}
foreach ($SO->Ms->M as $M) {
echo '<li class="'.($M->S == 1 ? 'test_true' : 'test_false').'" alt="' . $M->S . ' title="' . $M->S . '">'. $MIDs[(string)$M->MID] . '';
}
if ($SO->As) {
foreach ($SO->As->A as $A) {
echo "<br>A: " . $A . "<br>";
}
}
}

Related

Issue with multiple forms

I have two forms on my page. One is in the footer which I cannot change. The second is in my main page. Confused? I hope not.
When I open the style-demo page (link below) you can see that the information belonging in the Footer form is partially entered into the comment form on the page.
The Form in the footer works correctly however the comment section does not.
Any help to have both work would be greatly appreciated.
Thank you.
Here are my links
http://richardtamm.com/includes/footer.php
http://richardtamm.com/style-demo.php
Here is the code
Footer
<div class="wrapper">
<div id="footer" class="clear">
<div class="fl_left">
<div id="about_us" class="border">
<h2>About R. Tamm</h2>
<p>Richard Tamm is an avid photographer and writer. Richard was born in the state of Michigan and currently lives in the state of Indiana. He is married with 4 wonderful children who love to call him daddy. </p>
<p>When not writing or taking photographs Richard enjoys watching movies and spending quality time with his family.</p>
</div>
<div id="contact" class="clear">
<h2>Contact Us</h2>
<div class="fl_left">
<form name="contactform" method="post" action="send_form_email.php">
<label for="first_name">First Name:</label>
<input type="text" name="first_name" id="first_name" value="">
<label for="last_name">Last Name:</label>
<input type="text" name="last_name" id="last_name" value="">
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="">
<label for="comments">Message:</label>
<textarea name="comments" id="comments" cols="45" rows="10"></textarea>
<button type="submit" value="submit"><span>Submit</span></button>
</form>
</div>
<div class="fl_right">
<address>
<strong class="title">Company Name</strong><br>
Richard Tamm<br>
EYE-TO-IMAGE<br>
Jasonville, Indiana<br>
47438
</address>
<ul>
<!--<li><strong class="title">Tel:</strong><br>
xxxxx xxxxxxxxxx</li>
<li><strong class="title">Fax:</strong><br>
xxxxx xxxxxxxxxx</li>-->
<li><strong class="title">Email:</strong><br>
<?php echo $emailaddress; ?></li>
</ul>
</div>
</div>
</div>
<!-- ####################################################################################################### -->
<div class="fl_right">
<div id="tabcontainer" class="border">
<ul id="tabnav">
<li>From The Blog</li>
<li>Latest Tweets</li>
<li class="last">Link Share</li>
</ul>
<div id="tabs-1" class="tabcontainer">
<script src="layout/scripts/blogfeed.setup.js"></script>
<script src="http://widget.feed.mikle.com/js/rssmikle.js"></script>
<div style="font-size:10px; text-align:right;">RSS widget</div>
</div>
<!-- ########### -->
<div id="tabs-2" class="tabcontainer">
<a class="twitter-timeline" href="https://twitter.com/rltamm" data-widget-id="435882309061865472">Tweets by #rltamm</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<!-- ########### -->
<div id="tabs-3" class="tabcontainer">
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</div>
</div>
<h2>Keep Up To Date</h2>
<ul class="socialize">
<li><span>Facebook:</span> www.facebook.com/rltamm</li>
<li class="last"><span>Twitter:</span> www.twitter.com/rltamm</li>
</ul>
</div>
</div>
<div id="backtotop">To The Top <span class="icon-arrow-up"></span></div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2011 - 2014 All Rights Reserved - <?php echo $sitename; ?></p>
<p class="fl_right">Website by <?php echo $sitename; ?> & <a target="_blank" href="http://www.os-templates.com/" title="Free Website Templates">OS Templates</a></p>
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script src="layout/scripts/jquery.defaultvalue.js"></script>
<script src="layout/scripts/jquery.scrollTo-min.js"></script>
<script>
$(document).ready(function () {
$("#first_name, #last_name, #email, #comments").defaultvalue("First Name", "Last Name", "Email", "Message");
$('a.topOfPage').click(function () {
$.scrollTo(0, 1200);
return false;
});
$("#tabcontainer").tabs({
event: "click"
});
});
</script>
<script src="layout/scripts/jquery-prettyPhoto.js"></script>
<script src="layout/scripts/jquery-prettyPhoto-setup.js"></script>
Main Page
<?php
$titletag = 'Bookshelf - Page 1';
$metdescr = 'This is the SEO description - not too long not to short used in Google search results';
include_once($_SERVER["DOCUMENT_ROOT"].'/includes/header.php');
?>
<!-- ####################################################################################################### -->
<div class="wrapper col4">
<div id="container" class="clear">
<!-- ####################################################################################################### -->
<?php include_once($_SERVER["DOCUMENT_ROOT"].'/includes/shout.php'); ?>
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<div id="content">
<h1><h1> to <h6> - Headline Colour and Size Are All The Same</h1>
<img class="imgr" src="images/demo/imgr.gif" alt="" width="125" height="125" />
<p>Aliquatjusto quisque nam consequat doloreet vest orna partur scetur portortis nam. Metadipiscing eget facilis elit sagittis felisi eger id justo maurisus convallicitur.</p>
<p>Dapiensociis temper donec auctortortis cumsan et curabitur condis lorem loborttis leo. Ipsumcommodo libero nunc at in velis tincidunt pellentum tincidunt vel lorem.</p>
<img class="imgl" src="images/demo/imgl.gif" alt="" width="125" height="125" />
<p>This is a W3C compliant free website template from OS Templates. This template is distributed using a Website Template Licence.</p>
<p>You can use and modify the template for both personal and commercial use. You must keep all copyright information and credit links in the template and associated files. For more CSS templates visit Free Website Templates.</p>
<p>Portortornec condimenterdum eget consectetuer condis consequam pretium pellus sed mauris enim. Puruselit mauris nulla hendimentesque elit semper nam a sapien urna sempus.</p>
<h2>Table(s)</h2>
<table summary="Summary Here" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
<th>Header 4</th>
</tr>
</thead>
<tbody>
<tr class="light">
<td>Value 1</td>
<td>Value 2</td>
<td>Value 3</td>
<td>Value 4</td>
</tr>
<tr class="dark">
<td>Value 5</td>
<td>Value 6</td>
<td>Value 7</td>
<td>Value 8</td>
</tr>
<tr class="light">
<td>Value 9</td>
<td>Value 10</td>
<td>Value 11</td>
<td>Value 12</td>
</tr>
<tr class="dark">
<td>Value 13</td>
<td>Value 14</td>
<td>Value 15</td>
<td>Value 16</td>
</tr>
</tbody>
</table>
<div id="comments">
<h2>Comments</h2>
<ul class="commentlist">
<li class="comment_odd">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
<li class="comment_even">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
<li class="comment_odd">
<div class="author"><img class="avatar" src="images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name">A Name</span> <span class="wrote">wrote:</span></div>
<div class="submitdate">August 4, 2009 at 8:35 am</div>
<p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
</li>
</ul>
</div>
<h2>Write A Comment</h2>
<div id="respond">
<form action="#" method="post">
<p>
<input type="text" name="name" id="name" value="" size="22" />
<label for="name"><small>Name (required)</small></label>
</p>
<p>
<input type="text" name="email" id="email" value="" size="22" />
<label for="email"><small>Mail (required)</small></label>
</p>
<p>
<textarea name="comment" id="comment" cols="100%" rows="10"></textarea>
<label for="comment" style="display:none;"><small>Comment (required)</small></label>
</p>
<p>
<input name="submit" type="submit" id="submit" value="Submit Form" />
<input name="reset" type="reset" id="reset" tabindex="5" value="Reset Form" />
</p>
</form>
</div>
</div>
<div id="column">
<div class="subnav">
<h2>Secondary Navigation</h2>
<ul>
<li>Open Source Templates</li>
<li>Free CSS Templates
<ul>
<li>Free XHTML Templates</li>
<li>Free Website Templates</li>
</ul>
</li>
<li>Open Source Layouts
<ul>
<li>Open Source Software</li>
<li>Open Source Webdesign
<ul>
<li>Open Source Downloads</li>
<li>Open Source Website</li>
</ul>
</li>
</ul>
</li>
<li>Open Source Themes</li>
</ul>
</div>
<div class="holder">
<h2 class="title"><img src="images/demo/60x60.gif" alt="" />Nullamlacus dui ipsum conseque</h2>
<p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque.</p>
<p class="readmore">Continue Reading »</p>
</div>
<div id="featured">
<ul>
<li>
<h2>Indonectetus facilis</h2>
<p class="imgholder"><img src="images/demo/240x90.gif" alt="" /></p>
<p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque congue magnis vestibulum quismodo nulla et feugiat. Adipisciniapellentum leo ut consequam ris felit elit id nibh sociis malesuada.</p>
<p class="readmore">Continue Reading »</p>
</li>
</ul>
</div>
<div class="holder">
<h2>Lorem ipsum dolor</h2>
<p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed.</p>
<ul>
<li>Lorem ipsum dolor sit</li>
<li>Etiam vel sapien et</li>
<li>Etiam vel sapien et</li>
</ul>
<p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed. Condimentumsantincidunt dui mattis magna intesque purus orci augue lor nibh.</p>
<p class="readmore">Continue Reading »</p>
</div>
</div>
<!-- ####################################################################################################### -->
<div class="clear"></div>
</div>
</div>
<!-- ####################################################################################################### -->
<?php include_once($_SERVER["DOCUMENT_ROOT"].'/includes/footer.php'); ?>
</body>
</html>
In the main page, the form is defined as <form action="#" method="post">. For the action, you need to put the PHP file you're calling. # doesn't make sense. Look at your other declaration:
<form name="contactform" method="post" action="send_form_email.php">
This makes sense. It's telling HTML to send to send_form_email.php the information through POST.

How to convert an html template to joomla

I am new to joomla and trying to change a simple html template to joomla template. I made changes over the templatedetails.xml and index.php. Now my template is visible at templates of joomla. But it is not allowing to add menus or perform any joomla operation over to it.
Here is my index.php file,
<?php
/****************************************************
#####################################################
##-------------------------------------------------##
## TEMP ##
##-------------------------------------------------##
## Copyright = TEMP - 2013 ##
## Date = april 2013 ##
## Author = XYZ ##
## Websites = http://www.google.com ##
## ##
#####################################################
****************************************************/
// no direct access
defined('_JEXEC') or die('Restricted access');
/* The following line loads the MooTools JavaScript Library */
JHtml::_('behavior.framework', true);
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
$csite_name = $app->getCfg('sitename');
$path = $this->baseurl.'/templates/'.$this->template;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jdoc:include type="head" />
<?php $mod_right = $this->countModules( 'position-7' );
if ( $mod_right ) {
$width = '';
} else {
$width = '-full'; }
?>
<?php
$newsflash = $this->params->get("newsflash", " Content to be added here.. ");
?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/js/superfish.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/js/hoverIntent.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/js/hide.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/slideshow.js"></script>
<link rel="icon" type="image/gif" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/favicon.gif" />
<!--[if IE 7]>
<link href="templates/<?php echo $this->template ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="text/javascript">
// initialise plugins
jQuery(function(){
jQuery('.navigation ul').superfish();
});
</script>
</head>
<body>
<!-- start header -->
<div id="header">
<div id="logo">
</div>
<div id="menu">
<ul id="main">
<li class="current_page_item">Home</li>
<li>Courses and Admission </li>
<li>Department</li>
<li>Research</li>
<li>Hospital</li>
</ul>
<ul id="feed">
<li>Webmail</li>
<li>Contact us </li>
</ul>
</div>
</div>
<!-- end header -->
<div id="wrapper">
<!-- start page -->
<div id="page">
<div id="sidebar1" class="sidebar">
<ul>
<li>
<h2>Recent Posts</h2>
<marquee scrollamount="3" direction="up" onmouseout="start()" onmouseover="stop();">
<ul>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Proin gravida orci porttitor</li>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Proin gravida orci porttitor</li>
</ul>
</marquee>
</li>
<li>
<h2>Recent Comments</h2>
<ul>
<li> Templates on Aliquam libero</li>
<li> Templates on Consectetuer adipiscing elit</li>
<li> Templates on Metus aliquam pellentesque</li>
<li> Templates on Suspendisse iaculis mauris</li>
<li> Templates on Urnanet non molestie semper</li>
<li> Templates on Proin gravida orci porttitor</li>
</ul>
</li>
<li>
<h2>Categories</h2>
<ul>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Urnanet non molestie semper</li>
<li>Proin gravida orci porttitor</li>
</ul>
</li>
<li>
<h2>Archives</h2>
<ul>
<li>September (23)</li>
<li>August (31)</li>
<li>July (31)</li>
<li>June (30)</li>
<li>May (31)</li>
</ul>
</li>
</ul>
</div>
<!-- start content -->
<div id="content">
<div class="flower">
<img src="templates/<?php echo $this->template ?>/images/img06.jpg" width="510" height="250" alt="logotype" /></div>
<div class="post">
<h1 class="title">Welcome to TEMP !</h1>
<div class="entry">
<p>
<strong>TEMP </strong> is one of the SIX TEMP like apex healthcare institutes being established by the Ministry of Health & Family Welfare, Government of India under the Pradhan Mantri Swasthya Suraksha Yojna (PMSSY). With the aim of correcting regional imbalances in quality tertiary level healthcare in the country, and attaining self sufficiency in graduate and postgraduate medical education and training the PMSSY planned to set up 6 new TEMP like institutions in under served areas of the country.</p>
<p>These institutions are being established by an Act of Parliament on the lines of the original All India Institute of Medical Sciences in New Delhi which imparts both undergraduate and postgraduate medical education in all its branches and related fields, along with nursing and paramedical training. to bring together in one place educational facilities of the highest order for the training of personnel in all branches of health care activity. </p>
<p> </p>
<p class="links">«« Read More »»</p>
</div>
</div>
<div class="post">
<h2 class="title">Sample Tags</h2>
<div class="entry">
<h3>An H3 Followed by a Blockquote:</h3>
<blockquote>
<p>“Donec leo, vivamus nibh in augue at urna congue rutrum. Quisque dictum integer nisl risus, sagittis convallis, rutrum id, congue, and nibh.”</p>
</blockquote>
<h3>Bulleted List:</h3>
<ul>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Phasellus nec erat sit amet nibh pellentesque congue.</li>
<li>Cras vitae metus aliquam risus pellentesque pharetra.</li>
</ul>
<h3>Numbered List:</h3>
<ol>
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
<li>Phasellus nec erat sit amet nibh pellentesque congue.</li>
<li>Cras vitae metus aliquam risus pellentesque pharetra.</li>
</ol>
<p class="links">«« Read More »»</p>
</div>
</div>
<!-- end content -->
<!-- start sidebars -->
<div id="sidebar2" class="sidebar">
<ul>
<li>
<form id="searchform" method="get" action="#">
<div>
<h2>Site Search</h2>
<input type="text" name="s" id="s" size="15" value="" />
</div>
</form>
</li>
<li>
<h2>Tags</h2>
<p class="tag">dolor ipsum lorem sit amet dolor ipsum lorem sit amet</p></li>
<li>
<h2>Calendar</h2>
<div id="calendar_wrap">
<table summary="Calendar">
<caption>
October 2009
</caption>
<thead>
<tr>
<th abbr="Monday" scope="col" title="Monday">M</th>
<th abbr="Tuesday" scope="col" title="Tuesday">T</th>
<th abbr="Wednesday" scope="col" title="Wednesday">W</th>
<th abbr="Thursday" scope="col" title="Thursday">T</th>
<th abbr="Friday" scope="col" title="Friday">F</th>
<th abbr="Saturday" scope="col" title="Saturday">S</th>
<th abbr="Sunday" scope="col" title="Sunday">S</th>
</tr>
</thead>
<tfoot>
<tr>
<td abbr="September" colspan="3" id="prev">« Sep</td>
<td class="pad"> </td>
<td colspan="3" id="next"> </td>
</tr>
</tfoot>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td id="today">4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
</tr>
<tr>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
</tr>
<tr>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
</tr>
<tr>
<td>29</td>
<td>30</td>
<td>31</td>
<td class="pad" colspan="4"> </td>
</tr>
</tbody>
</table>
</div>
</li>
<li>
<h2>Categories</h2>
<ul>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Urnanet non molestie semper</li>
<li>Proin gravida orci porttitor</li>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Urnanet non molestie semper</li>
<li>Proin gravida orci porttitor</li>
<li>Aliquam libero</li>
<li>Consectetuer adipiscing elit</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Urnanet non molestie semper</li>
<li>Proin gravida orci porttitor</li>
<li>Metus aliquam pellentesque</li>
<li>Suspendisse iaculis mauris</li>
<li>Urnanet non molestie semper</li>
<li>Proin gravida orci porttitor</li>
<li>Metus aliquam pellentesque</li>
</ul>
</li>
</ul>
</div>
<!-- end sidebars -->
<div style="clear: both;"> </div>
</div>
<!-- end page -->
</div>
<div id="footer">
<p class="copyright">© 2009 All Rights Reserved • Design by TEMP IT Dept..</p>
<p class="link">Privacy Policy • Terms of Use</p>
</div>
</html>
Please suggest how i can change this html template to exact joomla template. Thanks.
Replace conrete content with references to module positions, message container and component output. Your template will then look like
<?php
/**
* My template
*
* #copyright (C)2013 Neetesh <neetesh#example.com>
* #author XYZ
* #link http://www.google.com
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<link rel="icon" type="image/gif" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/favicon.gif" />
<!--[if IE 7]>
<link href="templates/<?php echo $this->template ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
<!-- start header -->
<div id="header">
<div id="logo">
<jdoc:include type="modules" name="logo" />
</div>
<div id="menu">
<jdoc:include type="modules" name="header" />
</div>
</div>
<div id="wrapper">
<div id="page">
<div id="sidebar1" class="sidebar">
<jdoc:include type="modules" name="left" />
</div>
<div id="content">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<div id="sidebar2" class="sidebar">
<jdoc:include type="modules" name="right" />
</div>
<div style="clear: both;"> </div>
</div>
</div>
<div id="footer">
<jdoc:include type="modules" name="footer" />
</div>
</html>
The example above provides the module positions logo, header, left, right, and footer. Add these to the templateDetails.xml.
Next, find modules producing the sudebar content, you want, and assign them to the position, where you want to see them.

How to convert VML to png using php

I am searching for two days but just one solution VectorConvetor and it doesn't seem to work. Actually am using excanvas for InternetExplorer and want to save that image to png. IE gives VML and am not able to convert it to a png using PHP. I have heard about rendering the VML to IE and taking a screenshot using PHP but haven't found a satisfying solution to that too.
Use vml2svg.xsl and its dependencies as the imported stylesheet of an object which calls transformToXML to convert VML to SVG, then convert SVG to PNG using readImageBlob and imagemagick:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/2000/svg"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<!-- INDEX:
* template:
- vml-shape
* match:
- /
- v:group
- v:shape
-->
<!-- XXXXXXXXXXXXXXXX VARIABILI GLOBALI XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:variable name="n-elementi">
<xsl:value-of select="count(//*)" />
</xsl:variable>
<!-- Queste variabili rappresentano una dimensione "standard" in pixel della parte di
schermo usabile per rappresentare l'immagine (escludendo la porzione occupata dalla
barra dei browser), per schermi di 17 pollici, con risoluzione 800x600.
Si usano come approssimazione quando un immagine non specifica la
sua dimensioni oppure è espressa tramite percentuale.
-->
<xsl:variable name="schermo-x">
<xsl:text>750</xsl:text>
</xsl:variable>
<xsl:variable name="schermo-y">
<xsl:text>400</xsl:text>
</xsl:variable>
<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<!-- ********************************************************************************* -->
<!-- ********************************* RADICE **************************************** -->
<!-- ********************************************************************************* -->
<xsl:template match="/">
<!-- creo un elemento svg contenitore, che non influenza nessun altra misura, serve solo
da contenitore, in quanto svg ha bisogno di un elemento radice.
Inoltre questo elemento conterrà un elemento defs con tutti i riferimenti contenuti
nel documento.
-->
<svg preserveAspectRatio="none"
overflow="visible">
<!-- NB: da aggiungere un choose per vml non contenuti in un documento html -->
<xsl:for-each select="//html:BODY | //html:body">
<!-- gestione di defs -->
<defs>
<xsl:call-template name="gestione-textpath" />
<xsl:call-template name="gestione-gradient" />
<xsl:call-template name="gestione-pattern" />
</defs>
<xsl:apply-templates />
</xsl:for-each>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO GROUP ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="v:group">
<!-- per ogni gruppo trovaro creo un elemento svg -->
<svg>
<xsl:call-template name="core-attrs" />
<xsl:call-template name="attributo-viewbox" />
<!-- svg di default fa clipping, vml non lo fa, quindi devo impostare un attributo
per segnalare di far vedere il contenuto fuori dai margini
-->
<xsl:attribute name="overflow"><xsl:text>visible</xsl:text></xsl:attribute>
<xsl:call-template name="attributo-title" />
<!-- controllo un eventuale presenza di rotazioni -->
<xsl:variable name="r">
<xsl:call-template name="attributo-rotation" />
</xsl:variable>
<xsl:variable name="v-coordsize">
<xsl:call-template name="valore-coordsize" />
</xsl:variable>
<xsl:variable name="vb_x">
<xsl:value-of select="substring-before(normalize-space($v-coordsize),' ')" />
</xsl:variable>
<xsl:variable name="vb_y">
<xsl:value-of select="substring-after(normalize-space($v-coordsize),' ')" />
</xsl:variable>
<xsl:choose>
<!-- se ho una rotazione nell'elemento group, creo un gruppo per gestire
questa rotazione, posizionandomi nel centro della figura, perchè
svg e vml gestiscono in modo diverso le rotazioni: il primo
rispetto al punto in alto a sinistra (salvo diversa disposizione)
e l'altro rispetto al centro.
-->
<xsl:when test="$r != '0'">
<g>
<xsl:attribute name="transform">
<xsl:text>rotate(</xsl:text>
<xsl:value-of select="$r" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($vb_x div 2)" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($vb_y div 2)" />
<xsl:text>)</xsl:text>
</xsl:attribute>
<xsl:apply-templates />
</g>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO SHAPE ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="v:shape">
<!-- per ogni elemento shape creo un elemento svg, impostando opportunamente gli attributi
e gestendo/creando gli altri elementi per rappresentare eventuali path, testi o
immagini esterno (in quanto questi elementi sono esclusivamente contenuti in shape).
Vengono gestiti inoltre eventuali riferimenti a shapetype, considerando gli
attributi sia di quest'elemento shape, sia dei shapetype riferiti, poi si
impostano i valori dando precedenza agli attributi di shape, poi vengono quelli di
shapetype, altrimenti si usano i valori di default o quelli ereditati
-->
<!-- cerco un eventuale riferimento a un elemento shapetype -->
<xsl:variable name="id-of-shapetype">
<xsl:value-of select="substring-after(#type,'#')" />
</xsl:variable>
<!-- cerco un eventuale riferimento ad un immagine, contenuto o in questo elemento
shape o in elementi shapetype riferiti
-->
<xsl:variable name="image_present">
<xsl:choose>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:imagedata)
or (v:imagedata)" ><xsl:text>yes</xsl:text></xsl:when>
<xsl:otherwise><xsl:text></xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- contiene yes o stringa vuota a seconda che debba o meno effettuare un riempimento:
la scelta è dovuta alla presenza di un immagine o all'impostazione di un attributo
per segnalare di non effettuare il riempiemento (fillok dell'elemento path)
-->
<xsl:variable name="no-fill">
<xsl:choose>
<xsl:when test="$image_present = 'yes'">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="v:path[#fillok = 'true']">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="v:path[#fillok = 'false']">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#fillok = 'true'])">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#fillok = 'false'])">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- segnala se devo disegnare i bordi, determinato dal valore dell'attributo strokeok, presente
in elementi path, figli di shape o di shapetype riferiti
-->
<xsl:variable name="no-stroke">
<xsl:choose>
<xsl:when test="v:path[#strokeok = 'true']">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="v:path[#strokeok = 'false']">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#strokeok = 'true'])">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#strokeok = 'false'])">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- creo l'elemento svg -->
<svg>
<xsl:call-template name="core-attrs" />
<!-- imposto coordsize (viewbox di svg):
prima lo cerco nell'elemento shape e se c'è lo imposto,
poi lo cerco in shapetype ed eventualmente lo imposto,
altrimenti cerco negli elementi ancestor
-->
<xsl:choose>
<xsl:when test="#coordsize">
<xsl:call-template name="attributo-viewbox" />
</xsl:when>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]">
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:call-template name="attributo-viewbox" />
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="attributo-viewbox" />
</xsl:otherwise>
</xsl:choose>
<!-- imposto le proprietà di fill e stroke:
- prima le cerco in eventuali shapetype e imposto gli
attributi;
- poi le cerco in shape, creando gli attributi che
sovrascriveranno quelli impostati in precedenza e
specifico (parametro default = no) che nel caso non
vengano trovate le proprietà non si devono impostare
i valori di default, altrimenti questi sovrascriverebbero
i valori impostati con shapetype (da notare che se una
proprietà non è presente ne in shape che in shapetype,
quando cerco i valori in st, non trovandoli vengono
impostati con i valori di default e la successiva
ricerca in shape li lascerà inalterati.
-->
<xsl:choose>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]">
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:call-template name="attributi-paint">
<xsl:with-param name="no-fill">
<xsl:value-of select="$image_present" />
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:call-template name="attributi-paint">
<xsl:with-param name="default">
<xsl:text>no</xsl:text>
</xsl:with-param>
<xsl:with-param name="no-fill">
<xsl:value-of select="$no-fill" />
</xsl:with-param>
<xsl:with-param name="no-stroke">
<xsl:value-of select="$no-stroke" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="attributi-paint">
<xsl:with-param name="no-fill">
<xsl:value-of select="$no-fill" />
</xsl:with-param>
<xsl:with-param name="no-stroke">
<xsl:value-of select="$no-stroke" />
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<!-- vml non presenta questa proprietà, tuttavia il comportamento
di vml equivale in svg alla proprietà impostata con evenodd,
mentre svg per default ha questa proprietà impostata a nonzero
-->
<xsl:attribute name="fill-rule">
<xsl:text>evenodd</xsl:text>
</xsl:attribute>
<xsl:call-template name="attributo-title" />
<xsl:variable name="r">
<xsl:call-template name="attributo-rotation" />
</xsl:variable>
<!-- gestisco il contenuto di shape, controllando l'eventuale
presenza di rotazioni (in caso affermativo creo un
gruppo con trasform, posizionandolo opportunamente), poi
cerco eventuali link associati alla figura, tramite il template
gestione-href, il quale in caso di link, creerà un elemento a e
chiamarà un template per gestire il contenuto di shape (vml-shape).
In caso non siano presenti link verrà chiamato ugualmente il
template vml-shape (senza creare l'elemento a).
-->
<xsl:choose>
<xsl:when test="$r != '0'">
<g>
<!-- devo calcolare questi valori per spostare l'asse
di rotazione: dall'angolo in alto a sx (comportamento
di default di svg) al centro della regione.
-->
<xsl:variable name="cs-w">
<xsl:call-template name="valore-coordsize">
<xsl:with-param name="parametro"><xsl:text>w</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="cs-h">
<xsl:call-template name="valore-coordsize">
<xsl:with-param name="parametro"><xsl:text>h</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:attribute name="transform">
<xsl:text>rotate(</xsl:text>
<xsl:value-of select="$r" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($cs-w div 2)" /> <!-- $x + .. -->
<xsl:text>, </xsl:text>
<xsl:value-of select="($cs-h div 2)" />
<xsl:text>)</xsl:text>
</xsl:attribute>
<xsl:call-template name="gestione-href">
<xsl:with-param name="nome-template">
<xsl:text>vml-shape</xsl:text>
</xsl:with-param>
</xsl:call-template>
</g>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="gestione-href">
<xsl:with-param name="nome-template">
<xsl:text>vml-shape</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ***************************** VML SHAPE ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="vml-shape">
<xsl:variable name="id-of-shapetype">
<xsl:value-of select="substring-after(#type,'#')" />
</xsl:variable>
<!-- valore di coordsize(w) / w di tutti gli elementi ancestor: rappresenta la dimensione
di un user unit.
-->
<xsl:variable name="aggiustamento">
<xsl:for-each select="v:*">
<xsl:if test="position() = last()">
<xsl:call-template name="calcola-scala" />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<!-- XXXXXXXXXXXXXX GESTIONE IMAGEDATA XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]/v:imagedata">
<xsl:call-template name="elemento-imagedata" />
</xsl:for-each>
<xsl:for-each select="v:imagedata">
<xsl:call-template name="elemento-imagedata" />
</xsl:for-each>
<!-- XXXXXXXXXXXXXX GESTIONE PATH - TEXTPATH XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:choose>
<!-- devo rappresentare textpath -->
<xsl:when test="((v:path[#textpathok = 'true' or #textpathok = 't']) or
(//v:shapetype[#id = $id-of-shapetype]/v:path
[#textpathok = 'true' or #textpathok = 't'])) and
((v:textpath) or
(//v:shapetype[#id = $id-of-shapetype]/v:textpath))">
<xsl:choose>
<xsl:when test="v:textpath[#string]">
<xsl:for-each select="v:textpath[#string]">
<xsl:if test="position() = last()">
<xsl:call-template name="elemento-textpath" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="v:textpath">
<xsl:variable name="stringa-st">
<xsl:for-each select="
//v:shapetype[#id = $id-of-shapetype]/
v:textpath[#string]">
<xsl:if test="position() = last()">
<xsl:value-of select="#string" />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="v:textpath">
<xsl:if test="position() = last()">
<xsl:call-template name="elemento-textpath" >
<xsl:with-param name="stringa">
<xsl:value-of select="$stringa-st" />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]/v:textpath">
<xsl:variable name="path-id">
<xsl:choose>
<xsl:when test="v:path[#v != ''] or #path != ''">
<xsl:value-of select="count(preceding::v:*) +
count(ancestor::v:*)" />
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="
//v:shapetype[#id = $id-of-shapetype]/v:textpath">
<xsl:if test="position() = last()">
<xsl:choose>
<xsl:when test="$path-id = ''">
<xsl:call-template name="elemento-textpath">
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="elemento-textpath" >
<xsl:with-param name="path-id">
<xsl:value-of select="$path-id" />
</xsl:with-param>
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise><!-- in teoria qui non dovrebbe andarci mai -->
<XXX></XXX>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- devo rappresentare path -->
<xsl:when test="v:path[#v != '']">
<xsl:for-each select="v:path[#v != '']">
<xsl:if test="position() = last()">
<xsl:call-template name="gestione-path" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="#path != ''">
<xsl:call-template name="elemento-path">
<xsl:with-param name="v">
<xsl:value-of select="#path" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:choose>
<xsl:when test="v:path[#v != '']">
<xsl:for-each select="v:path[#v != '']">
<xsl:if test="position() = last()">
<xsl:call-template name="gestione-path" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="#path != ''">
<xsl:call-template name="elemento-path">
<xsl:with-param name="v">
<xsl:value-of select="#path" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<!-- XXXXXXXXXXXXXXXXXXX GESTIONE TEXTBOX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:if test="(v:textbox)">
<xsl:call-template name="elemento-textbox">
<xsl:with-param name="id-of-shapetype">
<xsl:value-of select="$id-of-shapetype" />
</xsl:with-param>
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates />
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO SHAPETYPE ************************************* -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="elemento-shapetype">
<!-- shapetype viene gestito quando e' richiamato da shape -->
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ TEMPLATE GESTIONE-SHAPETYPE **************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="gestione-shapetype">
<!-- shapetype viene gestito quando e' richiamato da shape -->
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO A ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="html:a">
<xsl:choose>
<xsl:when test="#href">
<a>
<xsl:attribute name="xlink:href">
<xsl:value-of select="#href" />
</xsl:attribute>
<xsl:apply-templates />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Problem loading php page via shadowbox

Hy I have a html page in witch I want to open a php page via shadowbox, the problem is in IE 6/7/8 the page is loading but it is not displaing, it works perfectly in FF
this is the hole page, the problem occures when you click on contact#termo-gaz-instal.ro at the bottom of the page. I have tried using colorbox and thickbox
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>Untitled Document</title>
<link rel="stylesheet", href="style.css" type="text/css" charset="utf-8">
<link rel="stylesheet", href="shadowbox-3.0.3/shadowbox.css" type="text/css" charset="utf-8">
<link rel="stylesheet", href="colorbox/example1/colorbox.css" type="text/css" charset="utf-8">
<script type='text/javascript' src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="colorbox/colorbox/jquery.colorbox.js"></script>
<script type="text/javascript" src="js/moving-boxes.js"></script>
<script type='text/javascript' src="shadowbox-3.0.3/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init();
</script>
<script type="text/javascript">
$(document).ready(function(){
$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
});
</script>
</head>
<body>
<div id="wraper">
<div id="logo">
<img class="poza" src="images/logo.png" alt="Logo" width="311" height="106">
<h1>TERMO GAZ INSTAL</h1>
</div><!--logo -->
<div id="spacer"></div>
<div id="container">
<div id="slider">
<img class="scrollButtons left" src="images/leftarrow.png">
<div style="overflow: hidden;" class="scroll">
<div class="scrollContainer">
<div class="panel" id="panel_1">
<div class="inside">
<img src="images/1.jpg" alt="picture" />
<h2>News Heading</h2>
<p>A very shot exerpt goes here... more link</p>
</div>
</div>
<div class="panel" id="panel_2">
<div class="inside">
<img src="images/2.jpg" alt="picture" />
<h2>News Heading</h2>
<p>A very shot exerpt goes here... more link</p>
</div>
</div>
<div class="panel" id="panel_3">
<div class="inside">
<img src="images/3.jpg" alt="picture" />
<h2>News Heading</h2>
<p>A very shot exerpt goes here... more link</p>
</div>
</div>
<div class="panel" id="panel_4">
<div class="inside">
<img src="images/4.jpg" alt="picture" />
<h2>News Heading</h2>
<p>A very shot exerpt goes here... more link</p>
</div>
</div>
<div class="panel" id="panel_5">
<div class="inside">
<img src="images/5.jpg" alt="picture" />
<h2>News Heading</h2>
<p>A very shot exerpt goes here... more link</p>
</div>
</div>
</div>
<div id="left-shadow"></div>
<div id="right-shadow"></div>
</div>
<img class="scrollButtons right" src="images/rightarrow.png">
</div>
</div><!--container -->
<div id="spacer"></div>
<div id="important_txt">
<span class="important_txt">Sistemele</span> de instalatii ultraperformante ce sunt sustinute de un <span class="important_txt">design</span> bine gandit si de un <span class="important_txt">management</span> performant.<br>
Instalatiile de <span class="important_txt">gaz, apa si canalizare</span> sunt o parte <span class="important_txt">importanta</span> a vietii noastre indiferent de circumstantele in care ne aflam. <span class="important_txt">Executia</span> acestor lucrari este <span class="important_txt">importanta</span> deoarece de ea depinde <span class="important_txt">siguranta</span> si <span class="important_txt">bunastarea</span> noastra.
</div><!--important -->
<div id="imag">
<div class="stg">
<img class="imag" src="images/imag_06.png" width="222" height="222" alt="apa">
<div id="txt">
<span class="stg_s">INSTALATII DE APA<br> CALDA SI RECE</span><br>
<span class="stg_j">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ultricies nulla massa. Suspendisse venenatis euismod adipiscing. Donec urna mauris, hendrerit. <span style="color:#FFF; font-size:11px; font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; text-decoration:underline;">Mai mult</span> </span>
<div id="read" style="display:none;">
<div id="content" style="padding:20px;color:white;">
<p>1This content was taken from a hidden div in this page!</p>
</div>
</div>
</div><!--txt -->
</div><!--stg -->
<div class="stg1">
<img class="imag" src="images/imag_08.png" width="222" height="222" alt="gaz">
<div id="txt">
<span class="stg_s">INSTALATII DE GAZ</span><br><br>
<span class="stg_j1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ultricies nulla massa. Suspendisse venenatis euismod adipiscing. Donec urna mauris, hendrerit.<span style="color:#FFF; font-size:11px; font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; text-decoration:underline;">Mai mult</span> </span>
<div id="read2" style="display:none;">
<div id="content" style="padding:20px;color:white;">
<p>12This content was taken from a hidden div in this page!</p>
</div>
</div>
</div><!--txt -->
</div><!--stg1 -->
<div class="stg1">
<img class="imag" src="images/imag_10.png" width="222" height="222" alt="gaz">
<div id="txt">
<span class="stg_s">INSTALATII DE DEJECTIE</span><br><br>
<span class="stg_j1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ultricies nulla massa. Suspendisse venenatis euismod adipiscing. Donec urna mauris, hendrerit. <span style="color:#FFF; font-size:11px; font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; text-decoration:underline;">Mai mult</span></span>
<div id="read3" style="display:none;">
<div id="content" style="padding:20px;color:white;">
<p>123This content was taken from a hidden div in this page!</p>
</div>
</div>
</div><!--txt -->
</div><!--stg -->
<div id="clear"></div>
</div><!--imag -->
</div><!--wraper --><br><br>
<div id="footer">
<div id="wraper">
<div id="footer_stg">
<p class="tel_cont">TELEFON DE CONTACT</p>
<img class="bula" src="images/bula.png" width="76" height="75" alt="Text Bubble"><br>
<span class="telefon">+40 021<span class="telefon1"> 201 35 55</span></span>
</div><!--footer_stg -->
<div id="footer_dr">
<a rel="shadowbox" href="http://www.google.com" ><p class="contact">CONTACT</p></a>
contact#termo-gaz-instal.ro</p>
</div><!--footer_dr -->
<div id="clear"></div>
<br>
<div id="spacer1"></div>
<p style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:18px; color:#545454; float:left;">termo-gaz-instal.ro © toate drepturile rezervate</p><p style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:18px; color:#545454; float:right; text-align:right">design|Ionescu Ionut<p>
</div><!--wraper -->
</div><!--footer -->
</body>
</html>
Thx for you time and help
P.S. Sorry for the earlier question
......................
This is for Michael
<?php
$erori = '';
$nr_erori = 0;
$mesaj_trimis = "nu";
if (isset($_POST['submit'])){
$name_field = $_POST['nume'] ;
$telephone_field = $_POST['telefon'] ;
$email_field = $_POST['email'] ;
$message = $_POST['mesaj'] ;
if ($name_field == '') { $erori .= 'Campul "Nume" este obligatoriu.<br>'; $nr_erori++; }
if ($telephone_field == '') { $erori .= 'Campul "Telefon" este obligatoriu.<br>'; $nr_erori++; }
if ($message == '') { $erori .= 'Campul "Mesaj" este obligatoriu.<br>'; $nr_erori++; }
if ($nr_erori == 0) {
$body = "De la: ".$name_field."</br> Telefon: ".$telephone_field."</br> </br> E-Mail: ".$email_field."</br> </br> Mesaj:</br> ".$message;
$sender = "ere#ere.ro";
$catre = "ere1#ere.ro";
// BEGIN SWIFT CLASS
require("swiftmail/Swift.php");
require("swiftmail/Swift/Connection/SMTP.php");
$smtp=new Swift_Connection_SMTP("localhost");
$smtp->setUsername("ere#ere.ro");
$smtp->setPassword("xxxx");
$swift =& new Swift($smtp);
$message =& new Swift_Message("Mesaj de la formularul de contact al site-ului");
$message->attach(new Swift_Message_Part($body, "text/html"));
if ($swift->send($message, $catre, new Swift_Address($sender, "Office Site"))) {
$mesaj_trimis = "da";
}
// END SWIFT CLASS
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Contact</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container2">
<div class="cont">
<table width="495" height="475" border="0">
<tr>
<td width="278"><?php if ($nr_erori > 0) { echo '<div>'.$erori.'</div>'; } if ($mesaj_trimis == "da") { echo "<div>Mesajul dumneavoastra a fost trimis. Va multumim ! </div>"; } else { ?> <form id="form1" name="form1" method="post" action=""> <input type="hidden" name="submit" value="1" /> <table width="278" height="362" border="0"> <tr> <td width="150">*Nume</td> <td width="340"><label> <input type="text" name="nume" id="nume" /> </label></td> </tr> <tr> <td>*Telefon</td> <td><label> <input type="text" name="telefon" id="telefon" /> </label></td> </tr> <tr> <td>E-mail</td> <td><label> <input type="text" name="email" id="email" /> </label></td> </tr> <tr> <td>*Mesajul Dumneavoastra</td> <td><label> <textarea name="mesaj" id="mesaj" cols="16" rows="10"></textarea> </label></td> </tr>
<tr>
<td colspan="2">! Campurile marcate cu * sunt OBLIGATORI</td>
</tr>
<tr> <td> </td> <td><label> <input type="submit" name="submit_bt" id="submit_bt" value="Trimite" /> </label></td> </tr> </table> </form>
<p>
<?php } ?>
<br />
</p>
<p> </p>
<td width="207" height="471"><table width="203" height="383" border="0">
<tr>
<td height="379" valign="top"><p>Ambulanta Veterinara Mina Vet S.R.L.<br />
<br />
Str. Constantin Nottara, Nr.2, Sector 3 , Bucuresti </p>
<table width="201" height="103" border="0">
<tr>
<td>Telefon:</td>
<td>0726.223.374</td>
</tr>
<tr>
<td height="23"> </td>
<td>0725.533.502</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Fax:</td>
<td>0372.872.427</td>
</tr>
<tr>
<td height="23">E-mail</td>
<td>contact#minavet.ro</td>
</tr>
</table>
<p></p></td>
</tr>
</table>
</table></div>
<div class="google">
<iframe width="400" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Strada+Constantin+C.+Nottara,+Bucharest,+Romania&sll=44.420111,26.133664&sspn=0.006774,0.01929&ie=UTF8&hq=&hnear=Strada+Constantin+C.+Nottara,+Romania&ll=44.424708,26.136389&spn=0.021454,0.034332&z=14&iwloc=A&output=embed"></iframe><br /><small>View Larger Map</small>
</div>
</div>
</body>
</html>
For starters it might help if the $(".example7").colorbox() matched the class of the contact link. Just a guess, though.
If you don't want to debug this yourself, try stan-js (that IE7 behaviour compatibility thing).
there seems to have some misinterpretation of CSS in IE.
Try to set a white background in contact.php, it did the trick for some file of mine.
Hope this helps ;)

xslt php select the first sibling and all its child nodes

How does one select the first sibling of a xml node with all its child nodes and apply some transformations on it? So far I only succeeded in selected either the first sibling and only the first sibling (no child nodes that is) or everything following the xml node.
Say we have xhtml like this:
<div class="chapter">Chapter <span class="number">1.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum</p>
And the result we are after is xml like this:
<chapter>
<heading>
<label>Chapter</chapter>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</chapter>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum</par>
</article>
</chapter>
My guess is that I need to do some regex magic to get the label and title tags right, but if this could also been done using plain xslt that would be great.
This XSLT 1.0 transformation:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml"
>
<xsl:output encoding="utf-8" />
<!-- the identity template (copies all nodes verbatim, unless
more specific templates implement different behavior) -->
<xsl:template match="node()|#*">
<xsl:copy>
<xsl:apply-templates select="node()|#*" />
</xsl:copy>
</xsl:template>
<!-- start by applying templates to all chapter divs -->
<xsl:template match="xhtml:html">
<text>
<xsl:apply-templates select="xhtml:body/xhtml:div[#class='chapter']" />
</text>
</xsl:template>
<!-- chapter div: generate heading, apply templates to adjacent h2 -->
<xsl:template match="xhtml:div[#class='chapter']">
<chapter>
<xsl:apply-templates select="." mode="heading" />
<!-- ... where the first preceding chapter div has the same ID -->
<xsl:apply-templates select="
following-sibling::xhtml:h2[
generate-id(preceding-sibling::xhtml:div[#class='chapter'][1])
=
generate-id(current())
]
"/>
</chapter>
</xsl:template>
<!-- h2: generate heading, apply templates to adjacent paras -->
<xsl:template match="xhtml:h2[#class='article']">
<article>
<xsl:apply-templates select="." mode="heading" />
<xsl:apply-templates select="
following-sibling::xhtml:p[
generate-id(preceding-sibling::xhtml:h2[#class='article'][1])
=
generate-id(current())
]
"/>
</article>
</xsl:template>
<!-- headings follow the same scheme, so we can use a unified template -->
<xsl:template match="xhtml:div | xhtml:h2" mode="heading">
<heading>
<label>
<xsl:value-of select="normalize-space(text()[1])" />
</label>
<number>
<xsl:value-of select="normalize-space(xhtml:span[#class='number'])" />
</number>
<title>
<xsl:value-of select="normalize-space(text()[2])" />
</title>
</heading>
</xsl:template>
<xsl:template match="xhtml:p">
<par>
<xsl:apply-templates select="node()" />
</par>
</xsl:template>
</xsl:stylesheet>
when applied to
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div class="chapter">Chapter <span class="number">1.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum A</p>
<p>Lorum ipsum B</p>
<h2 class="article">Article <span class="number">2.</span> Lorum ipsum</h2>
<p>Lorum ipsum D</p>
<h2 class="article">Article <span class="number">3.</span> Lorum ipsum</h2>
<p>Lorum ipsum E</p>
<p>Lorum ipsum F</p>
<div class="chapter">Chapter <span class="number">2.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum G</p>
</body>
</html>
yields:
<text>
<chapter>
<heading>
<label>Chapter</label>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum A</par>
<par>Lorum ipsum B</par>
</article>
<article>
<heading>
<label>Article</label>
<number>2.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum D</par>
</article>
<article>
<heading>
<label>Article</label>
<number>3.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum E</par>
<par>Lorum ipsum F</par>
</article>
</chapter>
<chapter>
<heading>
<label>Chapter</label>
<number>2.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum G</par>
</article>
</chapter>
</text>
This stylesheet creates the desired output:
<xsl:template match="html:div[#class='chapter']" mode="chapter">
<xsl:element name="{#class}">
<heading>
<xsl:apply-templates mode="chapter" />
</heading>
<xsl:apply-templates select="following-sibling::html:h2[generate-id(preceding-sibling::html:div[#class='chapter'][1])=generate-id(current())]" mode="chapter" />
</xsl:element>
</xsl:template>
<!--template for h2 in "chapter" mode, creates article content for the chapter-->
<xsl:template match="html:h2[#class='article']" mode="chapter">
<xsl:element name="{#class}">
<heading>
<xsl:apply-templates mode="chapter"/>
</heading>
<xsl:apply-templates select="following-sibling::html:p[generate-id(preceding-sibling::html:h2[#class='article'][1])=generate-id(current())]" mode="chapter" />
</xsl:element>
</xsl:template>
<xsl:template match="text()[following-sibling::html:span[#class='number']]" mode="chapter">
<label><xsl:value-of select="normalize-space()"/></label>
</xsl:template>
<!--Generate an (number) element using the class attribute as the name of the element-->
<xsl:template match="html:span[#class='number']" mode="chapter">
<xsl:element name="{#class}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
<!--title elements created for text nodes before the -->
<xsl:template match="text()[preceding-sibling::html:span[#class='number']]" mode="chapter">
<title><xsl:value-of select="normalize-space()"/></title>
</xsl:template>
<!--Template in "chapter" mode, creates a par element inside the article-->
<xsl:template match="html:p" mode="chapter">
<para><xsl:value-of select="normalize-space()"/></para>
</xsl:template>
<!--prevent text from bleeding through in output-->
<xsl:template match="text()" mode="chapter"/>
Using Tomalak's example input XML, produces:
<?xml version="1.0" encoding="UTF-8"?>
<book>
<chapter>
<heading>
<label>Chapter</label>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum A</para>
<para>Lorum ipsum B</para>
</article>
<article>
<heading>
<label>Article</label>
<number>2.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum D</para>
</article>
<article>
<heading>
<label>Article</label>
<number>3.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum E</para>
<para>Lorum ipsum F</para>
</article>
</chapter>
<chapter>
<heading>
<label>Chapter</label>
<number>2.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum G</para>
</article>
</chapter>
</book>

Categories