CIPP

 view release on metacpan or  search on metacpan

lib/CIPP/Manual.pm  view on Meta::CPAN

<?MY $client_filename>

<?PERL> $client_filename = "$upfilename" <?/PERL>

=head2 Example

First we provide a HTML form with the file upload field.

  <?FORM METHOD="POST" ACTION="/image/save.cgi"
         ENCTYPE="multipart/form-data">
Fileupload:

  <INPUT TYPE=FILE NAME="upfilename" SIZE=45><BR>
  <INPUT TYPE="reset">
  <INPUT TYPE="submit" NAME="submit" VALUE="Upload">
  </FORM>

The /image/save.cgi program has the following code to store the file in the filesystem.

  <?SAVEFILE FILENAME="/tmp/upload.tmp"
             VAR="upfilename"
             THROW=my_upload>

The same procedure using the RUNTIME parameter.

  <?VAR MY=$field_name>upfilename<?/VAR>
  <?SAVEFILE FILENAME="/tmp/upload.tmp"
             SYMBOLIC
             VAR="$field_name"
             THROW=upload>

=head1 COMMAND <?SELECT>

=head2 Type

HTML Tag Replacement

=head2 Syntax

 <?SELECT [ NAME=parameter_name ]
          [ MULTIPLE ] [ STICKY ]
          [ additional_<SELECT>_parameters ... ] >
 ...
 <?/SELECT>
 

=head2 Description

This command generates a selection widget providing preservation of the selection state (similar to the STICKY feature of the <?INPUT> command).

=head2 Parameter

=over 8

=item B<NAME>

The name of the formular widget.

=item B<MULTIPLE>

If this is set, a multi selection list will be generated, instead of a single selection popup widget.

=item B<STICKY>

If the STICKY option is set, the <?OPTION> commands inside the <?SELECT> block preserve their state in generating automatically a SELECTED option, if the corresponding entry was selected before. This is done in checking the value of the corresponding...

=item B<additional_SELECT_parameters>

All additional parameters are taken over without changes into the produced <SELECT> tag.

=back

=head2 Note

If you use the STICKY feature in conjuncion with a MULTIPLE selection list widget, please note that the internal implementation may be ineffective, if you handle large lists. This is due the internal representation of the list values as an array, so ...

=head2 Example

This is a complete CIPP program, which provides a mulitple selection list and preservers its state over subsequent executions of the program.

  <?INCINTERFACE OPTIONAL="@list">

  <?FORM ACTION="sticky.cgi">

  <?SELECT NAME="list" MULTIPLE STICKY>
  <?OPTION VALUE="1">value 1<?/OPTION>
  <?OPTION VALUE="2">value 2<?/OPTION>
  <?OPTION VALUE="3">value 3<?/OPTION>
  <?/SELECT>

  <?INPUT TYPE="submit" VALUE="send">

  <?/FORM>

=head1 COMMAND <?SQL>

=head2 Type

SQL

=head2 Syntax

 <?SQL SQL=sql_statement
       [ VAR=list_of_variables_for_the_result ]
       [ PARAMS=input_parameter ]
       [ WINSTART=start_row ]
       [ WINSIZE=number_of_rows_to_fetch ]
       [ COND=fetch_condition ]
       [ RESULT=sql_return_code ]
       [ DB=database_name ]
       [ DBH=database_handle ]
       [ THROW=exception ]
       [ MY ]
       [ PROFILE=profile_label ] >
 ...
 <?/SQL>

=head2 Description

Use the <?SQL> command to execute arbitrary SQL statements in a specific database. You can fetch results from a SELECT query, or simply execute INSERT, UPDATE or other SQL statements.

When you execute a SELECT query (resp. set the VAR parameter, see below) the code inside the <?SQL> block will be repeated for every row returned from the database.

=head2 Parameter



( run in 0.862 second using v1.01-cache-2.11-cpan-364913b4093 )