diff --git a/robocze/ask.php b/robocze/ask.php new file mode 100644 index 0000000..38ff4e4 --- /dev/null +++ b/robocze/ask.php @@ -0,0 +1,20 @@ +'; +?> + + + : +

+ + + + +
diff --git a/robocze/index.php b/robocze/index.php new file mode 100644 index 0000000..ca4bc8c --- /dev/null +++ b/robocze/index.php @@ -0,0 +1,75 @@ + 0 || +strpos($_SERVER["HTTP_USER_AGENT"], "W3C_Validator")!==false || +strpos($_SERVER["HTTP_USER_AGENT"], "WebKit")!==false; +header('Content-Type: '.($xhtml?'application/xhtml+x':'text/ht').'ml; charset="utf-8"'); +require('init.php'); +echo '' +?> + + + + + Galeria + + + + +
+
+ + '.$row['photo_name'].''; + if($i%3==2 && $i!=$count-1) echo ''; + + } + while($i%3) { + $i++; + echo ''; + } + ?> + +
 
+
+
+
Strony: + '.($i+1).' | '; + } + if($page!=$pcount) echo ($page+1).' | '; + else echo ($page+1); + for($i=$page+1; $i<$pcount; $i++) { + echo ''.($i+1).' | '; + } + if($page!=$pcount) echo ''.($pcount+1).''; + ?> +
+
+
+
+
+

+
+ Poprzedni + Zdjęcie + Następny +
+
+
Autor:
+ Zamknij +
+
+
+
+ Valid XHTML 1.1 + Poprawny CSS! +
+
+ + diff --git a/robocze/init.php b/robocze/init.php new file mode 100644 index 0000000..65e0d8b --- /dev/null +++ b/robocze/init.php @@ -0,0 +1,10 @@ + diff --git a/robocze/script.js b/robocze/script.js new file mode 100644 index 0000000..76ed265 --- /dev/null +++ b/robocze/script.js @@ -0,0 +1,119 @@ +var ajax; +var disp; +var disp_img; +var disp_info; +var disp_name; +var disp_author, disp_a; +var curr, last, first; + +function init() { + initAjax(); + disp=document.getElementById("disp"); + disp_a=document.getElementById("disp_a"); + disp_name=document.getElementById("disp_name"); + disp_author=document.getElementById("disp_author"); + disp_img=document.getElementById("disp_img"); + disp_info=document.getElementById("disp_info"); + + if (!document.importNode) { + document.importNode = function(node, allChildren) { + switch (node.nodeType) { + case 1: + var newNode = document.createElement(node.nodeName); + /*if (node.attributes && node.attributes.length > 0) + for (var i = 0; il = node.attributes.length; i < il) + newNode.setAttribute(node.attributes[i].nodeName, node.getAttribute(node.attributes[i++].nodeName));*/ + //alert("Attr done"); + if (allChildren && node.childNodes && node.childNodes.length > 0) { + il=node.childNodes.length; + for (var i = 0; i < il; i++) + newNode.appendChild(document.importNode(node.childNodes[i], allChildren)); + } + return newNode; + break; + default: + return document.createTextNode(node.nodeValue); + break; + } + }; + } + + if(!disp_name.firstChild) + disp_name.appendChild(document.createTextNode(' ')); + + if(!disp_author.firstChild) + disp_author.appendChild(document.createTextNode(' ')); + +} + +function initAjax() { + try { + if (window.XMLHttpRequest) { + ajax = new XMLHttpRequest(); + ajax.overrideMimeType('text/xml'); + } + else if (window.ActiveXObject) + ajax = new ActiveXObject('Microsoft.XMLHTTP'); + else throw 'AJAX Error'; + } + catch (e) { + return false; + } + if (!ajax) { + alert('AJAX Error'); + return false; + } + return true; +} + + +function response() { + if (ajax.readyState != 4 || ajax.status != 200) + return; + + var xml = ajax.responseXML; + while(disp_info.hasChildNodes()) disp_info.removeChild(disp_info.firstChild); + elemXML=xml.getElementsByTagName("desc")[0]; + if(document.importNode) children=document.importNode(elemXML, true).childNodes; + else children=elemXML.childNodes; + for(i=0; i