Пример #1
0
</head>
<body onload="<?php 
echo $onload;
?>
"
      onunload="<?php 
echo $onunload;
?>
"
      bgcolor="#cccccc">
<center><h1>Test for Manuel Lemos' PHP form class
using the map location plug-in input</h1></center>
<hr />
<?php 
if ($doit) {
    $form->GetInputProperty("map", "Latitude", $latitude);
    $form->GetInputProperty("map", "Longitude", $longitude);
    echo '<center><h2>The location latitude is ', $latitude, ' and the longitude is ', $longitude, '.</h2></center>';
} else {
    $form->StartLayoutCapture();
    $title = "Form map location plug-in test";
    $body_template = "form_map_location_body.html.php";
    include "templates/form_frame.html.php";
    $form->EndLayoutCapture();
    $form->DisplayOutput();
}
?>
<hr />
</body>
</html>
Пример #2
0
$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 linked select plug-in input</title>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
<center><h1>Test for Manuel Lemos' PHP form class using the linked select plug-in input</h1></center>
<hr />
<?php 
if ($doit) {
    $form->GetInputProperty("continent", "SelectedOption", $continent);
    $form->GetInputProperty("country", "SelectedOption", $country);
    $form->GetInputProperty("location", "SelectedOption", $location);
    ?>
<center><h2>The chosen location is <?php 
    echo HtmlEntities($location), " (", HtmlEntities($country), ", ", HtmlEntities($continent), ")";
    ?>
</h2></center>
<?php 
} else {
    $form->StartLayoutCapture();
    $title = "Linked select plug-in test";
    $body_template = "form_linked_select_body.html.php";
    include "templates/form_frame.html.php";
    $form->EndLayoutCapture();
    $form->DisplayOutput();
Пример #3
0
<title>Test for Manuel Lemos' PHP form class secure submit button</title>
</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
<h1><center>Test for Manuel Lemos' PHP form class secure submit button</center></h1>
<hr />
<?php 
if ($doit) {
    ?>
<center><h2>The form was submitted securely!</h2></center>
<?php 
} else {
    $form->StartLayoutCapture();
    if (strlen($error = $form->GetInputProperty('secure_submit', 'Expired', $expired)) == 0 && $expired) {
        ?>
<center><h2>The form submission expired. Please submit the form again.</h2></center><?php 
    }
    ?>
<center><?php 
    $form->AddInputPart('secure_submit');
    ?>
</center>
<?php 
    $form->EndLayoutCapture();
    $form->DisplayOutput();
}
?>
<hr />
</body>
Пример #4
0
          *  but do not display any message as this may be an
          *  attempt to access unauthorized information.
          */
         $message['Cancel'] = 1;
         $form->SetInputProperty('posts', 'DeleteCanceledMessage', '');
     }
     break;
 case 'update_previewing':
 case 'viewing':
     /*
      *  When it is sent an event to show an existing entry or a
      *  preview of an entry being updated, make sure the
      *  specified entry identifier really exists and can be
      *  updated.
      */
     $form->GetInputProperty('posts', 'Entry', $id);
     $id = intval($id);
     if (!$model->ReadEntry($id, $entry)) {
         /*
          *  If there was a problem checking the an entry, cancel
          *  the entry update.
          */
         $message['Cancel'] = 1;
         break;
     }
     if (!isset($entry)) {
         /*
          *  If the entry does not exist or the user does not have
          *  permissions to access it, cancel the entry update
          *  but do not display any message as this may be an
          *  attempt to access unauthorized information.