if ($act) { echo '> '; } echo "<a href=\"{$val}\">{$key}</a>"; if ($act) { echo ' <'; } echo '</li>'; } ?> </ul> </div> <div id="news"> <h2>Novinky</h2> <?php echo xmltransform(getXmlNews(), XSLT_NEWS); ?> </div> </div> <div id="header"></div> <div id="body_area"> <?php echo render_body(); ?> </div> </div> <div id="footer"> <div class="top"></div> <div id="bottom_menu"> | <?php foreach (menu_b() as $key => $val) {
function render_body() { return xmltransform(XMLDB_FTP, XSLT_FTP); }
function render_body() { $u = xmltransform(getXmlUsers(), XSLT_USERS); return <<<EOL <script type="text/javascript"> function make_blank_pwd(element) { element.style.color = ''; element.style.fontStyle = ''; element.value = ''; element.type = 'password'; element.onfocus = ''; } function createXmlHttpRequestObject() { var xmlhttp; try { xmlHttp = new XMLHttpRequest(); //should work on all browsers except IE6 or older } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHttp"); //browser is IE6 or older } catch (e) { // ignore error } } if (!xmlHttp) { alert ("Error creating the XMLHttpRequest object."); } else { return xmlHttp; } } function change_name(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'users.php?a=change_name&uid=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_mail(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'users.php?a=change_mail&uid=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_phone(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'users.php?a=change_phone&uid=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_role(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'users.php?a=change_role&uid=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function delete_user(element) { if (confirm("Skutečně chcete vymazat účet '" + element.name + "'")); window.location = 'users.php?a=deluid&uid=' + element.name; return false; } function new_user(element) { window.location = 'users.php?a=newuid&val=' + element.value; return false; } function new_pwd(element) { val = prompt('Zadejte implicitní heslo', ''); if (val == null || val == '') return; window.location = 'users.php?a=newpwd&uid=' + element.name + '&val=' + val; return false; } </script> <h1>Správa uživatelů</h1> <div style="border:#412617 solid 1px;padding:8px 10px 4px"> {$u} </div> EOL; }
function render_body() { return xmltransform(XMLDB_EMAIL, XSLT_EMAIL); }
function render_body() { $content = <<<EOL <script type="text/javascript"> function createXmlHttpRequestObject() { var xmlhttp; try { xmlhttp = new XMLHttpRequest(); //should work on all browsers except IE6 or older } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHttp"); //browser is IE6 or older } catch (e) { // ignore error } } if (!xmlhttp) { alert ("Error creating the XMLHttpRequest object."); } else { return xmlhttp; } } function dom4_changed() { if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { if (xmlhttp.responseText != '0') alert('Chyba'); } } function change_domain(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'dns.php?action=chng_dom&id=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_domain_name(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'dns.php?action=chng_name&id=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_domain_4(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'dns.php?action=chng_4&id=' + element.name + '&val=' + element.value); xmlhttp.onreadystatechanged = dom4_changed; xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_domain_6(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'dns.php?action=chng_6&id=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } </script> EOL; return $content . xmltransform(XMLDB_DNS, XSLT_DNS); }
function render_body() { return xmltransform(XMLDB_DB, XSLT_DB); }
<html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> <title>ITU projekt</title> <link rel="stylesheet" type="text/css" href="st/reset.css"> <link rel="stylesheet" type="text/css" href="st/normal.css"> <?php echo render_head(); ?> </head> <body> <div class="telo"> <a class="logo" href="index.php" title="domu"></a> <div class="zprava"> <?php echo xmltransform(XMLDB_NEWS, XSLT_NEWS); ?> </div> <?php if (!isset($_SESSION['user'])) { ?> <form class="prihl" action="login.php" method="post"> <input id="prihl_jmeno" type="text" name="uname" value="e-mail" onfocus="this.style.color=''; this.style.fontStyle=''; this.value=''; this.onfocus='';" style="color: gray; font-style: italic;" /><br /> <input id="prihl_heslo" type="text" name="upwd" value="heslo" onfocus="this.style.color=''; this.style.fontStyle=''; this.value=''; this.type='password'; this.onfocus='';" style="color: gray; font-style: italic;" /><br /> <input id="prihl_tlc" type="submit" value="Prihlasit" />
function render_body() { $content = ''; if (isset($_SESSION['u_role'])) { $content .= <<<EOL <script type="text/javascript"> function createXmlHttpRequestObject() { var xmlhttp; try { xmlHttp = new XMLHttpRequest(); //should work on all browsers except IE6 or older } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHttp"); //browser is IE6 or older } catch (e) { // ignore error } } if (!xmlHttp) { alert ("Error creating the XMLHttpRequest object."); } else { return xmlHttp; } } function change_visibility(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_vis=' + element.name + '&en=' + Number(element.checked)); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_item_name(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_name=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_item_desc(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_desc=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_item_price(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_price=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_kat_name(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_kname=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function change_kat_desc(element) { try { var xmlhttp = createXmlHttpRequestObject(); xmlhttp.open('GET', 'napojak.php?chng_kdesc=' + element.name + '&val=' + element.value); xmlhttp.send(null); } catch (e) { alert(e.toString()); } return false; } function add_new_kat(element) { window.location = 'napojak.php?add_kat&val=' + element.value; return false; } function add_new_item(element, kat_id) { window.location = 'napojak.php?add_item&kat=' + kat_id + '&val=' + element.value; return false; } </script> EOL; $content .= xmltransform(getXmlNapojak(), XSLT_NAPOJAK_EDIT); } else { $content .= xmltransform(getXmlNapojak(), XSLT_NAPOJAK); } return $content; }