示例#1
0
/**
 * Display a valid XHTML Strict header
 *
 * @param string $title HTML title
 * @param bool $body True if to display the end of the head/body
 * @param bool|array $css False for no CSS otherwise array of CSS include files
 * @param bool|array $javascript False for no Javascript otherwise array of Javascript include files
 * @param string $bodytext Space in the body element: good for onload='top.close()' to close validly
 * @param bool|int $refresh False or 0 for no refresh otherwise the number of seconds to refresh
 * @param bool $clearrefresh False if we want to pass on any GET request in header, True to clear
 * 
 * @see xhtml_foot()
 */
function xhtml_head($title = "", $body = true, $css = false, $javascript = false, $bodytext = false, $refresh = false, $clearrefresh = false)
{
    print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
	   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head><title><?php 
    if (empty($title)) {
        print "queXC";
    } else {
        print "queXC: {$title}";
    }
    ?>
</title>
<?php 
    if ($css) {
        foreach ($css as $c) {
            print "<link rel='stylesheet' href='{$c}' type='text/css'></link>";
        }
    }
    if ($javascript) {
        xhtml_script($javascript);
    }
    if ($refresh) {
        print " <!--Set to refresh every {$refresh} seconds-->\r\n\t\t\t<meta http-equiv='Cache-Control' content='no-cache'/>\r\n\t\t\t<meta http-equiv='refresh' content='{$refresh}";
        if ($clearrefresh) {
            print ";url=?";
        }
        print "'/>";
    }
    if (!$body) {
        return;
    }
    ?>
	</head>
<?php 
    if ($bodytext) {
        print "<body {$bodytext}>";
    } else {
        print "<body>";
    }
}
示例#2
0
/**
 * Display XHTML for spelling
 *
 * @param int $cell_id The cell to display data for
 * @param string $cell_data The data in the cell
 * @param int $work_unit_id
 */
function spelling_display($cell_id, $cell_data, $work_unit_id)
{
    xhtml_script(array('include/ajax-spell/spell_checker.js'));
    print "<p><textarea class='spell_check' rows='10' cols='50' name='ci{$cell_id}' id='ci{$cell_id}'>{$cell_data}</textarea></p>";
}