EasyManua.ls Logo

Alcorn Mcbride V16Pro - Step 4: Understanding home.php

Alcorn Mcbride V16Pro
179 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
WEB Server Quick Start Page 141
Web
Server
This page demonstrates how to start sequences, turn on and off outputs, and set
the value of variables in the currently running show. You can modify this page
to make an easy to use interface for the customer.
To modify this page, the file "home.php" on the Compact Flash card must be
changed. You can do this by removing the card from your show controller and
placing it into your computer’s card reader.
Copy the file "home.php" to your computer and open it in your favorite HTML
editor.
Step 4: Understanding home.php
The first few lines of home.php contain show controller web-script that is used
to restrict access to this page to only the customer or administrator (see the
section on Show Controller Web-Script). To remove this restriction, simply
remove this:
<?
RequireLogin("2");
?>
In the HTML head section, the script "ami.js" is included. This is required to
use background processing of HTTP POST requests (see the section on
Variables).
The first form on this page is used to start sequences. It has a single text input
item but a hidden item could be used instead with a preset value. This way, a
link can be created that will always start a specific sequence. To perform the
POST request in the background, the previously mentioned JavaScript is used
for the action:
javascript:AmiHttpPostForm('cmdstart.php', document.form1);
This tells the web browser to post the form named "form1" to the file named
"cmdstart.php". This file comes preloaded on the Compact Flash card and
accepts a POST variable named "index", which is the name of the form item in
the form.
The link to:
javascript:document.form1.submit()
will submit the form and cause the sequence specified by the index to start. In
this case, the index can also be the name of the sequence.
This ends the Quick Start guide to the show controller web server. The following
sections describe the features of the web server in detail.

Table of Contents