WIthout reading the thread much (on mobile) exec lets you run a command on the server (as opposed to the client).
To do it as a link just pass a variable through. sanitise it though, to stop people running anything on your server.
I gave up on the getting things to open in Spinworks idea since it seems way more hassle than it's worth right now, but with what I've decided to do I've come across a problem.
When I open a full entry to show the full set of data I want to click a link to show any of the spectra as a PNG or JPEG. I want this image to load underneath the main content area, in an extra DIV. Is this possible easily? Or is the alternative an iframe? (which I was trying to avoid)
Also, are there are any batch converters for PDF to PNG/JPEG? I tried irfanview but it was being an arse not being able to recognise PDFs properly even after installing the relevant plugins.
If you want the actual PHP file then I'll C&P the code.
Don't shout at me though.
<a href="spectra1.jpg" onclick="$j('img#spectra').attr('src','spectra1.jpg').show(); return false">view spectra</a>
<img id="spectra" src="" alt="" style="display:none;"/>
<html> <head> <title>NMR Database</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <?php mysql_connect("localhost","xxxxxx","******"); mysql_select_db("nmr"); $tableid = $_GET['id']; $query = "SELECT id,code,labbookref,contents,solvent,elements,servercode,time,machine,year,month,nmre1,nmrn1,nmre2,nmrn2,nmre3,nmrn3,nmre4,nmrn4,nmre5,nmrn5 FROM nmr WHERE id=$tableid"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo " <table border='0' width='auto' style='margin-left: 0px;'> <tr> <td class='fulltop' width='50px'>{$row['code']}</td> <td class='fulltop' width='50px'>{$row['labbookref']}</td> <td class='fulltop' width='680px' align='right'>{$row['contents']}</td> </tr> </table> <div class='fullmain'> {$row['solvent']}<br /> {$row['elements']}<br /> {$row['year']}<br /> {$row['month']}<br /> <a target='_blank' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.pdf'>{$row['nmre1']}</a><br /> <a target='_blank' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn2']}/pdata/1/email_{$row['servercode']}_{$row['nmrn2']}_1.pdf'>{$row['nmre2']}</a><br /> <a target='_blank' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn3']}/pdata/1/email_{$row['servercode']}_{$row['nmrn3']}_1.pdf'>{$row['nmre3']}</a><br /> <a target='_blank' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn4']}/pdata/1/email_{$row['servercode']}_{$row['nmrn4']}_1.pdf'>{$row['nmre4']}</a><br /> <a target='_blank' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn5']}/pdata/1/email_{$row['servercode']}_{$row['nmrn5']}_1.pdf'>{$row['nmre5']}</a><br /> {$row['servercode']} <br /> <br /> <a target='image' href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.png'>{$row['nmre1']}</a><br /> <a href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.png' onclick='$j('img#spectra').attr('src','./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.png').show(); return false'>{$row['nmre1']} #2</a> <img id='spectra' src='' alt='' style='display:none;'/> </div> <iframe name='image' width='780px' height='550px' frameborder='0' class='fullimage' ></iframe> "; } ?> </body> </html>
<script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript">$j = jQuery.noConflict();</script>
$prefix = "./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/";
<script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript">$j = jQuery.noConflict();</script>
<a href='./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.png' onclick='$j('img#spectra').attr('src','./nmr/{$row['machine']}/{$row['year']}/{$row['month']}/data/AB/nmr/{$row['servercode']}/{$row['nmrn1']}/pdata/1/email_{$row['servercode']}_{$row['nmrn1']}_1.png').show(); return false'>{$row['nmre1']} #2</a> <br /> <img id='spectra' src='' alt='' style='display:none;'/>