Location: PHPKode > projects > Homeless Mangement Information System > hmis/include/head.inc
<?php
function head ($page_title, $head_page_specific, $head_dynamic_style)	{
GLOBAL $background_image, $include_root, $page_id, $head_dynamic_ecma,
$html_template_path, $system_directory, $system_title;
//{background-color: #F2EED7; Part of "TABLE tag", makes it tan background
if ( !$page_title ) {
    $page_title = $system_title;
}
$head = "
<head><title>".$page_title."</title>".$head_page_specific;

//styles
$head .= "
<STYLE TYPE=\"text/css\"> 
table {width: 100%; vertical-align: top; padding: 0}
div.confidential {display:none;}
tr {vertical-align: top; padding: 0}
td  {padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 13px}
.wrap {border:1 solid #993300; width: 50%; padding: 3}
.bottomline {border-bottom-style: solid; border-bottom-color: #993300; border-bottom-width: 1px}
body {font-family: Arial, Helvetica, sans-serif; color: #000099; padding: 0; background-image: url(".$system_directory.$background_image.")}
.footer {text-align: center; font-size: 10}
#qid_2 {font-style: normal; color: red}
.menuwidth {width: 110px}
.halfwidth {width: 50%}
.quarterwidth {width: 25%}
.generictable {background-color: #000099}
.generictable2 {background-color: #FF0000}
.generictd {font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #EFEFFF; padding: 2px; color: #000000}
.smalltd {font-family: Arial, Helvetica, sans-serif; background-color: #EFEFFF; padding: 2px; color: #000000; font-size: \"70%\"}
.tinytd {font-family: Arial, Helvetica, sans-serif; font-size: 10px; background-color: #EFEFFF; padding: 2px; color: #000000;}
.generictabletop {color: #FFFFFF; font-size: 14; font-family: Arial, Helvetica, sans-serif; background-color: #000099; font-weight: bolder; padding: 2px; width: 500px}
.generictabletop2 {color: #FFFFFF; font-size: 14; font-family: Arial, Helvetica, sans-serif; background-color: #FF0000; font-weight: bolder; padding: 2px; width: 500px}
.genericsubtop {color: #000000; font-size: 11; font-family: \"arial\"; background-color: #9CCFFF; font-weight: bolder; padding: 2}
.genericsubtop2 {color: #000000; font-size: 11; font-family: \"arial\"; background-color: #FFCCCC; font-weight: bolder; padding: 2}
.smaller {font-size: 85%; color: #660066 }
.smaller75 {font-size: 75%}
.smaller60 {font-size: 60%}
.headline {color: #FFFFCC; font-size: 16; font-family: \"arial\"; background-color: #003F5C; font-weight: bolder; padding: 2}
.headlinecentered {color: #FFFFCC; font-size: 16; font-family: \"arial\"; background-color: #003F5C; font-weight: bolder; padding: 2; text-align: center}
.center {text-align: center}
.headlinesub {color: #FFFFCC; font-size: 13; font-family: \"arial\"; background-color: #003F5C; font-weight: bolder; padding: 2}
.nobreak {white-space: nowrap; padding-left: 0; padding-right: 0}
.tablerad {width: 300} 
.tdq {border-left-style: solid; border-left-width: 1px; border-left-color: #993300; }
.tdradtxt {padding-left: 0px; padding-right: 0px; padding-bottom: 1px; padding-top: 3px}
.tdradtxtl {padding-left: 0px; padding-right: 0px; padding-bottom: 1px; padding-top: 3px; width: 5%}
.tdradbut {padding-left: 4px; padding-right: 0px; padding-top: 0px; text-align: right; width: 5%} 
.radiotext { font-size: 85%; color: #660066; text-align: left; white-space: nowrap;}
.noans { font-size: 75%; color: #660000; text-align: left; white-space: nowrap;} 
.top {vertical-align: top}
.yaxistext {vertical-align: middle}
.tblnum {text-align: right}
.yellow {color: #FFFF99}
.burntorange {color: #FF6600}
.rustred {color: #990000}
.tr { font-family: Arial, Helvetica, sans-serif; font-size: \"65%\"; text-align:right }
.t { font-family: Arial, Helvetica, sans-serif; font-size: \"65%\"; text-align: left }
.txtareabold { font-family: times, serif; font-size: 110%; font-weight: bold; color: #000066 }
".$head_dynamic_style."
</style>
";

//NOTE: The below 'print' specific styles must come after the above styles in the cascade or they will be over ridden.
//This allows the additional confidential document warning to appear only on printed pages not on the user's screen.
//TODO: Add body {display:none;} (inline is to view) to prevent user from printing once printer friendly code is added.
$head .= "
<style TYPE=\"text/css\" media=\"print\">
div.confidential { display:inline; font-family: Arial, Helvetica, sans-serif; color: #FF0000; font-size: 13px }
@page { size 8.5in 11in; margin: 2cm }
</style>
";

//$head_dynamic_ecma['0'] = security script
//$head_dynamic_ecma['1'] = form validation script
//$head_dynamic_ecma['2'] = script for standalone edit/nevermind button to appear after submit or when viewing posted forms
$head .= "<script language=\"javascript\">
".$head_dynamic_ecma['0']."

function startup () {".
$head_dynamic_ecma['1']."
}

".$head_dynamic_ecma['2']."
</script>
".$head_dynamic_ecma['3']."

</head>

<body onload=startup()>
<div class=\"confidential\">WARNING: This printed page may contain personal identifiable information. This information must be treated as CONFIDENTIAL.  You are personally responsible for protecting this document while it is needed and destroying it once it is not.</div>
";

return $head;

}
?>
Return current item: Homeless Mangement Information System