distroquery support: forgotten new files in previous commit

This commit is contained in:
Silvan Calarco 2015-04-07 22:00:28 +02:00
parent 9e4011e1bc
commit 57adba9207
3 changed files with 113 additions and 0 deletions

BIN
cgi-bin/distroquery Executable file

Binary file not shown.

42
scripts/distroquery.js Normal file
View File

@ -0,0 +1,42 @@
//var lastupdate = 0;
function distroquery_request(request) {
var url = "/cgi-bin/distroquery";
var statusupdated = false;
var xmlhttp;
document.getElementById("querystatus").innerHTML = "Ricerca in corso...";
if (window.XMLHttpRequest)
xmlhttp = new XMLHttpRequest();
else if (window.ActiveXObject)
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
else
return;
document.getElementById("noajax_msg").innerHTML = "";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState != 4) {
return;
}
var xmldoc = xmlhttp.responseXML.documentElement;
var xmlelement = xmldoc.getElementsByTagName("*");
for (var i=0, max=xmlelement.length; i < max; i++) {
if (xmlelement[i].nodeName == "title")
document.title = xmldoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
else if (document.getElementById(xmlelement[i].nodeName).innerHTML != null) {
document.getElementById(xmlelement[i].nodeName).innerHTML = xmlelement[i].childNodes[0].nodeValue;
if (xmlelement[i].nodeName == "querystatus") statusupdated = true;
}
}
//lastupdate = (+new Date());
if (xmlhttp.readyState==4 && xmlhttp.status==200 && !statusupdated)
document.getElementById("querystatus").innerHTML = "";
}
if (request)
xmlhttp.open("GET", url + "?lang=it_IT.UTF-8&" + request, true);
else
xmlhttp.open("GET", url + "?lang=it_IT.UTF-8", true);
xmlhttp.send();
// xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
// xmlhttp.send(request);
}

71
search-page.php Normal file
View File

@ -0,0 +1,71 @@
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Full Content Template
*
Template Name: Search Page (no sidebar, no title)
*
* @file search-page.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/search-page.php
* @link http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
* @since available since Release 1.0
*/
get_header("webbuild"); ?>
<div id="content-full" class="grid col-940">
<?php if ( have_posts() ) : ?>
<?php while( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop-header', get_post_type() ); ?>
<?php responsive_entry_before(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php responsive_entry_top(); ?>
<!--?php get_template_part( 'post-meta', get_post_type() ); ?-->
<div class="post-entry">
<?php the_content( __( 'Read more &#8250;', 'responsive' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?>
</div>
<!-- end of .post-entry -->
<?php get_template_part( 'post-data', get_post_type() ); ?>
<?php responsive_entry_bottom(); ?>
</div><!-- end of #post-<?php the_ID(); ?> -->
<?php responsive_entry_after(); ?>
<?php responsive_comments_before(); ?>
<?php comments_template( '', true ); ?>
<?php responsive_comments_after(); ?>
<?php
endwhile;
get_template_part( 'loop-nav', get_post_type() );
else :
get_template_part( 'loop-no-posts', get_post_type() );
endif;
?>
</div><!-- end of #content-full -->
<?php get_footer(); ?>