Пример #1
0
$form->AddInput(array('TYPE' => 'submit', 'VALUE' => 'Submit', 'NAME' => 'doit'));
$form->LoadInputValues($form->WasSubmitted('doit'));
$verify = array();
if ($form->WasSubmitted('doit')) {
    if (($error_message = $form->Validate($verify)) == '') {
        $doit = 1;
    } else {
        $doit = 0;
        $error_message = HtmlEntities($error_message);
    }
} else {
    $error_message = '';
    $doit = 0;
}
if (!$doit) {
    $form->ConnectFormToInput('dependent', 'ONLOAD', 'Focus', array());
}
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class for dependent validation</title>
<style type="text/css"><!--
.invalid { border-color: #ff0000; background-color: #ffcccc; }
// --></style>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
Пример #2
0
    } else {
        $doit = 0;
        $error_message = HtmlEntities($error_message);
    }
} else {
    $error_message = "";
    $doit = 0;
}
if (!$doit) {
    if (strlen($error_message)) {
        Reset($verify);
        $focus = Key($verify);
    } else {
        $focus = 'access_name';
    }
    $form->ConnectFormToInput($focus, 'ONLOAD', 'Focus', array());
}
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for password encoding
with Manuel Lemos' PHP form class</title>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
<h1><center>Test for password encoding
with Manuel Lemos' PHP form class</center></h1>
Пример #3
0
$form->NAME = 'auto_complete_form';
$form->METHOD = 'POST';
$form->ACTION = '';
$form->debug = 'error_log';
$form->AddInput(array('TYPE' => 'text', 'ID' => 'location', 'NAME' => 'location', 'LABEL' => '<u>L</u>ocation', 'ACCESSKEY' => 'L', 'VALUE' => '', 'ExtraAttributes' => array('autocomplete' => 'off', 'title' => 'Type just the first letters of a location.')));
$form->AddInput(array('TYPE' => 'button', 'NAME' => 'show_locations', 'ID' => 'show_locations', 'VALUE' => '...', 'ExtraAttributes' => array('title' => 'Click to show all locations.')));
$form->AddInput(array('TYPE' => 'custom', 'ID' => 'complete_location', 'NAME' => 'complete_location', 'CustomClass' => 'form_mysql_auto_complete_class', 'CompleteInput' => 'location', 'CompleteMinimumLength' => 1, 'Dynamic' => 1, 'ShowButton' => 'show_locations', "Connection" => $connection, "CompleteValuesQuery" => "SELECT nazwa FROM sl_bloz WHERE nazwa {BEGINSWITH} ORDER BY nazwa", "CompleteValuesLimit" => 10, 'FeedbackElement' => 'complete_location_feedback', 'SubmitFeedback' => ' <img src="indicator.gif" width="16" height="16" alt="Looking up for locations" title="Looking up for locations" /> ', 'CompleteFeedback' => ' <img src="indicator.gif" width="16" height="16" style="visibility: hidden;" /> ', 'MenuClass' => 'groovymenu', 'MenuStyle' => '', 'ItemClass' => 'groovyitem', 'ItemStyle' => '', 'SelectedItemClass' => 'groovyselecteditem', 'SelectedItemStyle' => ''));
/*
 * This code is necessary to handle the requests for fetching
 * auto-complete values.
 */
$form->HandleEvent($processed);
if ($processed) {
    exit;
}
$form->ConnectFormToInput('location', 'ONLOAD', 'Focus', array());
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class using the auto-complete plug-in input and MySQL database queries</title>
<style type="text/css"><!--
BODY { color: black ; font-family: arial, helvetica, sans-serif ; background-color: #cccccc }
.groovymenu { background-color: #cccccc; padding: 4px; border-style: solid ; border-top-color: #f9f9f9 ; border-left-color: #f9f9f9 ; border-bottom-color: #868686 ; border-right-color: #868686 ; border-width: 1px; opacity: 0.9; filter: alpha(opacity=90); }
.groovyitem { padding: 1px; }
.groovyselecteditem { padding: 1px; color: #ffffff; background-color: #000080; }
// --></style>
</head>
<body onload="<?php 
echo $onload;
Пример #4
0
}
$form->LoadInputValues($form->WasSubmitted("doit"));
$verify = array();
if ($form->WasSubmitted("doit")) {
    if (($error_message = $form->Validate($verify)) == "") {
        $doit = 1;
    } else {
        $doit = 0;
        $error_message = HtmlEntities($error_message);
    }
} else {
    $error_message = "";
    $doit = 0;
}
if (!$doit) {
    $form->ConnectFormToInput('captcha', 'ONLOAD', 'Focus', array());
}
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class using the CAPTCHA plug-in input</title>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
<center><h1>Test for Manuel Lemos' PHP form class using the CAPTCHA plug-in input</h1></center>
<hr />
<?php 
Пример #5
0
$form->AddInput(array("TYPE" => "submit", "VALUE" => "Submit", "NAME" => "doit"));
$form->LoadInputValues($form->WasSubmitted("doit"));
$verify = array();
if ($form->WasSubmitted("doit")) {
    if (($error_message = $form->Validate($verify)) == "") {
        $doit = 1;
    } else {
        $doit = 0;
        $error_message = HtmlEntities($error_message);
    }
} else {
    $error_message = "";
    $doit = 0;
}
if (!$doit) {
    $form->ConnectFormToInput('experience', 'ONLOAD', 'Focus', array());
}
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class using the date plug-in input to pick up an age value</title>
<style type="text/css"><!--
.invalid { border-color: #ff0000; background-color: #ffcccc; }
// --></style>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
Пример #6
0
$form->AddInput(array('TYPE' => 'custom', 'ID' => 'complete_color', 'NAME' => 'complete_color', 'CustomClass' => 'form_auto_complete_class', 'CompleteInput' => 'color', 'CompleteMinimumLength' => 1, 'CompleteValues' => array('Black' => '
				<span style="background-color: black; color: white;">B</span>lack', 'Blue' => '<span style="background-color: blue; color: white;">B</span>lue', 'Cyan' => '<span style="background-color: cyan;  color: #000000">C</span>yan', 'Green' => '<span style="background-color: green; color: white;">G</span>reen', 'Magenta' => '<span style="background-color: magenta">M</span>agenta', 'Red' => '<span style="background-color: red">R</span>ed', 'White' => '<span style="background-color: white; color: #000000">W</span>hite', 'Yellow' => '<span style="background-color: yellow; color: #000000">Y</span>ellow'), 'Dynamic' => 1, 'ShowButton' => 'show_colors', 'FeedbackElement' => 'complete_color_feedback', 'SubmitFeedback' => '
			<img src="indicator.gif" width="16" height="16" alt="Looking up for colors" title="Looking up for colors" /> ', 'CompleteFeedback' => '
			<img src="indicator.gif" width="16" height="16" style="visibility: hidden;" /> '));
$form->AddInput(array('TYPE' => 'text', 'ID' => 'font', 'NAME' => 'font', 'LABEL' => '<u>F</u>ont', 'ACCESSKEY' => 'F', 'VALUE' => '', 'SIZE' => 32, 'ExtraAttributes' => array('autocomplete' => 'off')));
$form->AddInput(array('TYPE' => 'image', 'NAME' => 'show_fonts', 'ID' => 'show_fonts', 'SRC' => 'pulldown.gif', 'ALT' => 'Show fonts', 'ALIGN' => 'top'));
$form->AddInput(array('TYPE' => 'custom', 'ID' => 'complete_font', 'NAME' => 'complete_font', 'CustomClass' => 'form_auto_complete_class', 'CompleteInput' => 'font', 'CompleteMinimumLength' => 1, 'CompleteValues' => array('sans-serif' => '<span style="font-family: sans-serif; float: right">ABC</span>Sans Serif', 'serif' => '<span style="font-family: serif; float: right">ABC</span>Serif', 'cursive' => '<span style="font-family: cursive; float: right">ABC</span>Cursive', 'fantasy' => '<span style="font-family: fantasy; float: right">ABC</span>Fantasy', 'monospace' => '<span style="font-family: monospace; float: right">ABC</span>Monospace'), 'Dynamic' => 0, 'MenuStyle' => '', 'MenuClass' => 'groovymenu', 'ItemStyle' => '', 'SelectedItemStyle' => '', 'ItemClass' => 'groovyitem', 'SelectedItemClass' => 'groovyselecteditem', 'ShowButton' => 'show_fonts'));
/*
 * This code is necessary to handle the requests for fetching
 * auto-complete values.
 */
$form->HandleEvent($processed);
if ($processed) {
    exit;
}
$form->ConnectFormToInput('color', 'ONLOAD', 'Focus', array());
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class
using the auto-complete plug-in input</title>
<style type="text/css"><!--
BODY { color: black; font-family: arial, helvetica, sans-serif;
	background-color: #cccccc }
.groovymenu { background-color: #cccccc; padding: 4px; border-style: solid;
	border-top-color: #f9f9f9; border-left-color: #f9f9f9;
	border-bottom-color: #868686; border-right-color: #868686;
	border-width: 1px; opacity: 0.9; filter: alpha(opacity=90); }
.groovyitem { padding: 1px; }