*
*/
$_trcolor = 0;
// Set the current Indent Level
function do_indent ($str, $v = 0)
{
return $str;
}
// HTML BR
function html_br ($count = 1)
{
return do_indent(str_repeat(" \n", $count));
}
// HTML A HREF
function html_ahref ($label, $url, $extra = "")
{
$label = stripslashes($label);
if (!$label and $url)
{
if (ereg("@",$url))
{
return do_indent(" $url ");
}
else
{
return do_indent(" $url ");
}
}
else if (!$label)
{
return do_indent(" ");
}
else
{
return do_indent(" $label ");
}
}
// HTML echo a string
function html_echo ($str)
{
return do_indent($str);
}
// HTML B (bold)
function html_b ($str)
{
return do_indent("$str ");
}
// HTML SMALL (small text)
function html_small ($str)
{
return do_indent("$str ");
}
// HTML P
function html_p ($str = " ", $extra = null)
{
return do_indent("
\n";
if ($title) {
$str .= '
';
$str .= ''.$title.' ';
$str .= '
'."\n";
}
$str .= "
\n";
// $str .= '
'."\n";
return $str;
}
function html_round_frame_end ($text = " ")
{
global $file_root;
$str .= "\n";
// $str .= '
'."\n";
if ($text) {
$str .= '
';
$str .= ''.$text.' ';
$str .= '
'."\n";
}
$str .= "
\n\n";
return $str;
}
function html_frame_row_color ($text = " ")
{
global $_trcolor;
if ($_trcolor % 2 == 1) { $trcolor = 'color2'; } else { $trcolor = 'color1'; }
$str = '
'.$text.' '."\n";
$_trcolor++;
return $str;
}
function html_frame_row ($text = " ", $extra = null)
{
$str = '
'.$text.' '."\n";
return $str;
}
function html_frame_tr ($td = "
", $color = "color2", $extra = null)
{
$str = '
'."\n".$td.' '."\n";
return do_indent($str);
}
function html_frame_td ($txt = " ", $extra = null)
{
$str = '
'.$txt.' '."\n";
return do_indent($str);
}
function html_back_link ($howmany = 1, $url = "")
{
if (!$url)
{
$url = 'javascript:history.back('.$howmany.');';
}
return '
<< Back
'."\n";
}
function html_form_start ($script, $name, $method = "post")
{
$str = '
'."\n";
}
function html_form_input_text ($name, $size = 20, $value = "")
{
$str = '
'."\n";
return $str;
}
function html_form_input_password ($name, $size = 20, $value = "")
{
$str = '
'."\n";
return $str;
}
function html_form_input_hidden ($name, $value = "")
{
$str = '
'."\n";
return $str;
}
function html_form_input_textarea ($name, $cols = 20, $rows = 5, $value = "")
{
$str = '
'."\n";
return $str;
}
function html_form_input_select ($name, $options, $selected = "")
{
$str = '
'."\n";
while(list($key, $val) = each($options))
{
if ($key == $selected)
{
$str .= ''.$val.' '."\n";
} else {
$str .= ''.$val.' '."\n";
}
}
$str .= ' '."\n";
return $str;
}
function html_form_input_checkbox ($name, $checked = null)
{
if ($checked == 1)
$str = '
'."\n";
else
$str = '
'."\n";
return $str;
}
function html_form_submit ($value = "")
{
$str = '
'."\n";
return $str;
}
function html_form_js_button ($url = null)
{
global $PHP_SELF;
if (!$url) { $url = $PHP_SELF; }
$str = '
'."\n";
return $str;
}
function html_add_br ($text = "")
{
$text = ereg_replace("\n","
\n",$text);
return $text;
}
// url-ify urls
function html_urlify ($text)
{
$text = htmlspecialchars($text);
$urlreg = "([a-zA-Z]+://([^\t\r\n ]+))";
if (ereg($urlreg,$text))
{
$text = ereg_replace($urlreg, "
\\2 ", $text);
}
$emailreg = "([a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+)";
if (ereg($emailreg,$text))
{
$text = ereg_replace($emailreg, "
\\1 ", $text);
}
return $text;
}
// simple httpd header redirect
function redirect ($url = ".")
{
header("Location: ".$url);
}
function html_header ($title, $extra = "")
{
global $file_root;
?>
=$title?>
=$extra?>
}
function html_footer ()
{
?>
LucasArts, Monkey Island, Maniac Mansion, Full Throttle,
The Dig, LOOM, and probably lots of other things are
registered trademarks of
LucasArts, Inc. .
All other trademarks and registered trademarks are
owned by their respective companies.
ScummVM is not affiliated in any way with LucasArts, Inc.
}
?>