コード例 #1
0
ファイル: asst1Main.php プロジェクト: vIIPrezIIv/Web
function setUpForm($buttons)
{
    WriteHeaders("Music, Real Ortelli", "Music");
    echo "<div class = \"bigpiece\">";
    echo "<form action = \"?\" method=\"POST\">";
    echo "<div class = \"leftpiece\">";
    if (strpbrk("{$buttons}", "S")) {
        DisplayButton("button", "Save", "", "Save", "save");
    }
    if (strpbrk("{$buttons}", "H")) {
        DisplayButton("button", "Home", "", "Home", "home");
    }
    if (strpbrk("{$buttons}", "A")) {
        DisplayButton("button", "Add Record", "", "Add Record", "addRecord");
    }
    if (strpbrk("{$buttons}", "C")) {
        DisplayButton("button", "Create Table", "", "Create Table", "createTable");
    }
    if (strpbrk("{$buttons}", "M")) {
        DisplayButton("button", "Modify Record", "", "Modify Record", "modifyRecord");
    }
    if (strpbrk("{$buttons}", "D")) {
        DisplayButton("button", "Display Data", "", "Display Data", "displayData");
    }
    if (strpbrk("{$buttons}", "F")) {
        DisplayButton("button", "Find Record", "", "Find Record", "findRecord");
    }
    if (strpbrk("{$buttons}", "K")) {
        DisplayButton("button", "Save Changes", "", "Save Changes", "saveChanges");
    }
    echo "</div>";
    echo "<div class = \"middlepiece\">";
}
コード例 #2
0
ファイル: Asst2Main.php プロジェクト: AlexA11/Php-Asst-2
function SetUpForm($Character)
{
    WriteHeaders();
    echo "\n    <div class = \"top\">\n\t   Music - Alex Ash and Brett Akey\n\t</div>\n    <div class = \"bigpiece\">\n\t  <div class = \"leftpiece\"> \n\t    \n         <p>";
    if (strpbrk($Character, "H")) {
        echo "<form action=? method=post>";
        DisplayButton("nextPage", "Home", "WelcomePage");
        echo "</form>";
    }
    if (strpbrk($Character, "F")) {
        echo "<form action=? method=post>";
        DisplayButton("nextPage", "Find Record", "FoundRecord");
        echo "</form>";
    }
    echo "<form action=? method=post>";
    if (strpbrk($Character, "S")) {
        echo "<input type=submit name=\"nextPage\" class=\"submit\" value=\"Save\"> ";
    }
    if (strpbrk($Character, "C")) {
        echo "<form action=? method=post>";
        DisplayButton("nextPage", "Save Changes", "ChangesMade");
        echo "</form>";
    } elseif (!strpbrk($Character, "S") && !strpbrk($Character, "H")) {
        DisplayButton("nextPage", "Create Table", "CreateTable");
        DisplayButton("nextPage", "Add Record", "EnterData");
        DisplayButton("nextPage", "Modify Record", "ModifyRecord");
        DisplayButton("nextPage", "Display Data", "DisplayData");
    }
    echo " </p>\n\t  </div>\n\t  <div class = \"middlepiece\" >\t    \n\t ";
}
コード例 #3
0
ファイル: index.php プロジェクト: MeoZi/SecondYear--PHP
function GetInfoForm()
{
    DisplayLabel("Customer Type");
    echo "<form action = \"index.php\" method= \"POST\" >\n        <select name = \"Cust_Type\">\n            <option value = \"Choose\"> Choose </option>\n            <option value=\"Regular\">Regular</option>\n            <option value=\"Corporate\">Corporate</option>\n            <option value=\"Government\">Government</option>\n        </select>";
    DisplayLabel("Number of Copies");
    DisplayTextbox("Num_Copies", "40", " ");
    DisplayButton("sub_button", "Submit");
    echo "<input type=hidden name=\"f_nextform\" value=\"ShowResultsForm\">";
    echo "</form>";
}
コード例 #4
0
 function DisplayMenu($buttons)
 {
     //calculate button size
     $width = 100 / count($buttons);
     while (list($name, $url) = each($buttons)) {
         DisplayButton($width, $name, $url, !IsURLCurrentPage($url));
     }
 }