Home
> Quick Start
> Basic Concepts
> Code Examples
Brenda's Pictures
Environment
Edit This Page
Auto Links
Call Script
Popups
Counter
Example Form 1
Example Form 2
Page Redirect
Type test
Blog
News Feed
phpMyEdit
> Tool Examples
> Choose Skin
> Contact Me
> Help
> Credits
> Downloads
> PHITE Sites
|
This page includes several sub-pages with examples of PHP
code snippets. Note that the contents of every snippet is
shown below the main body. That is very simply done by
there being a 'CB' Center Block file in this directory, which
very simply displays the contents of every file. Note that in
this page it shows its own code, and in the subpages it
shows the example code (through acquisition).
Files in this directory
Files in ./PT_007_Code_Examples | | body.inc
This page includes several sub-pages with examples of PHP code snippets. Note that the contents of every snippet is shown below the main body. That is very simply done by there being a 'CB' Center Block file in this directory, which very simply displays the contents of every file. Note that in this page it shows its own code, and in the subpages it shows the example code (through acquisition).<br>
| | body_Form.inc
<!-- Simple Form Example -->
<?php global $PHITE_vars;?> <!-- Get the PHITE environment array -->
<center><p><h2>Example Form Call:</h2> This Script Shows How To Call A Form in PHITE.<p>
<?php $yourtext=$PHITE_vars['yourtext']; # variables are passed within the environment array if (isset($yourtext)) { print("<h2>You Typed: ".$yourtext."</h2><p>"); } ?>
<!-- Note the address for 'Action =' in the next line -- this is how you embed the form in the PHITE skin --> <form method="post" action=<?php print("'".$PHITE_vars['PHITE_callself']."'"); ?>> Example Text Box: <input type="text" size=25 name="yourtext"> <input type="submit" VALUE="Call Form"> </form> </center>
| | CB_800_Files_in_this_directory.inc
<!-- CB.inc file to display all of the code in current directory -->
<?php global $PHITE_vars;
print ("<CENTER><h3>Files in ".$PHITE_vars['PHITE_selfdir']."</h3><TABLE WIDTH='80%' border='1'><tr><td>"); $d=dir($PHITE_vars['PHITE_selfdir']); while ($file=$d->read()) { if (strtolower(substr(strrchr($file,'.'),1))=='inc') { print("<TR><TD><center><b>".$file."</b></center><p>"); show_source($PHITE_vars['PHITE_selfdir'].'/'.$file); print("</TR>"); } } print("</TABLE></center>");
print ("<CENTER><TABLE WIDTH='80%' border='1'><tr><td>"); $d=dir($PHITE_vars['PHITE_selfdir']); while ($file=$d->read()) { if (strtolower(substr(strrchr($file,'.'),1))=='txt') { print("<TR><TD><center><b>".$file."</b></center><p>"); show_source($PHITE_vars['PHITE_selfdir'].'/'.$file); print("</TR>"); } } print("</TABLE></center>");
?>
| | RB_001_File_List.inc
<!-- Directory listing right block -->
<?php global $PHITE_vars;
$d=dir($PHITE_vars['PHITE_selfdir']); while ($file=$d->read()) { if (substr($file,0,1)!='.')print($file."<br>"); } ?>
|
|
File List
PT_070_Blog PT_060_Type_test PT_030_Auto_Links body.inc body_Form.inc PT_056_Example_Form_2 PT_040_Call_Script PT_010_Environment PT_040_Popups PT_009_Brenda__apos_Pictures PT_055_Example_Form_1 CB_800_Files_in_this_directory.inc PT_060_Page_Redirect PT_072_phpMyEdit PT_071_News_Feed PT_050_Counter PT_020_Edit_This_Page RB_001_File_List.inc
|
|
|