function showForm($err_msgs = null)
{
    // generate error messages
    if ($err_msgs != null) {
        foreach ($err_msgs as $emsg) {
            echo '<i>';
            echo "{$emsg}";
            echo ' </h4>';
        }
    }
    echo '<form action="file2.php" method="get">
          <table class="table2" frame="border">';
    tableRow(array(tableData("right", prompt("<h1>Title!</h1>"))));
    tableRow(array(tableData("right", prompt("First name:")), tableData("right", text("fname")), tableData("right", prompt("Last name:")), tableData("right", text("lname"))));
    tableRow(array(tableData("right", prompt("City:")), tableData("right", text("city")), tableData("right", prompt("State:")), tableData("right", text("state"))));
    tableRow(array(tableData("right", prompt("<b>Gender:</b>")), tableData("center", radioButton("gender", "male", false, "Male")), tableData("center", radioButton("gender", "female", false, "Female")), tableData("center", radioButton("gender", "other", true, "Other"))));
    tableRow(array(tableData("right", prompt("<b>Grade:</b>")), tableData("center", radioButton("grade", "freshman", false, "9<sup>th</sup>")), tableData("center", radioButton("grade", "sohpomore", false, "10<sup>th</sup>")), tableData("center", radioButton("grade", "junior", false, "11<sup>th</sup>")), tableData("center", radioButton("grade", "senior", false, "12<sup>th</sup>"))));
    tableRow(array(tableData("right", prompt("<b>Product:</b>")), tableData("center", checkBox("product", "ChapR", false, "ChapR")), tableData("center", checkBox("product", "Kit", false, "Kit")), tableData("center", checkBox("product", "USB", false, "USB")), tableData("center", checkBox("product", "Programmer", false, "Programmer"))));
    echo '</table>  <input type="hidden" name="filled" value="true"> </form>';
    /*    echo '
    
          <tr>
    	<td align="right"><b>Product:</b></td>
    p	<td colspan="3">
    	  <table style="width:100%">
    	    <tr>
    	      <td align="center"><input type="checkbox" name="product" value="ChapR">ChapR</td>
    	      <td align="center"><input type="checkbox" name="product" value="Programmer">Programmer</td>
    	      <td align="center"><input type="checkbox" name="product" value="Kit">Kit</td>
    	      <td align="center"><input type="checkbox" name="product" value="USB">USB</td>
    	    </tr>
    	  </table>
    	</td>
          </tr>
          <tr>
    	<td valign="top" align="right"><b>Comments:</b></td>
    	<td colspan="3"><textarea rows="4" style="width:100%" name="comments">'; echo $_GET["comments"]; echo '</textarea></td>
          </tr>
          <tr>
    	<td></td>
    	<td></td>
    	<td></td>
    	<td align="right"><input type="submit" value="Submit!"></td>
          </tr>
        </table>
        <input type="hidden" name="filled" value="true">
        </form>';*/
}
function packageFields($data, $badFields)
{
    print_r("data");
    print_r($data);
    tableRow(array(tableData(prompt("<b>Package Name:</b>", in_array("packname", $badFields)), "right"), tableData(text($data, "packname", "", "30"), "left", "middle"), tableData(prompt("<b>Package Price:</b>", in_array("packprice", $badFields)), "right"), tableData(text($data, "packprice", "", "10"), "left", "middle"), tableData(prompt("<b>Active?</b>", in_array("active", $badFields)), "right"), tableData(checkBox($data, "active", "false", "YES"), "left", "middle", 3)));
    $pieces = $data["pieces"];
    // the list of all the pieces included in the package (as pulled from the pvp table)
    $i = 1;
    foreach ($pieces as $piece) {
        $pieceInfo = dbGetPiece($piece["PID"]);
        // get the info for the piece with that PID
        $pieceInfo["PID{$i}"] = $pieceInfo["PID"];
        $piecesOptions = dbGetPiecesNames();
        print_r("piecesOptions");
        print_r($piecesOptions);
        tableRow(array(tableData(prompt("<b>Piece{$i}:</b>", in_array("piece{$i}", $badFields)), "right"), tableData(dropDown($pieceInfo, "PID{$i}", $piecesOptions))));
        $i++;
    }
    hiddenField("PKID", $data["PKID"]);
    print "\n\n";
}
function orderFields($data, $badFields)
{
    global $SETTINGS;
    // display data not supposed to be visible for customers
    if (userLoggedIn()) {
        if (array_key_exists("OID", $data) && $data["OID"] != "") {
            tableRow(array(tableData(prompt("<b>OID: </b>"), "right", "top"), tableData(prompt($data["OID"]), "left", "top")));
        }
        tableRow(array(tableData(prompt("<b>Expedite:</b>"), "right", "top"), tableData(checkBox($data, "isExpedited", "true", "YES"), "left", "middle", 3)));
        prepDatePicker();
        tableRow(array(tableData(prompt("<b>Ordered Date:</b>"), "right", "top"), tableData(text($data, "orderedDate", "", "", "datepicker"), "left", "middle")));
    }
    // show the order amount change fields if the user has permission (and in WordPress)
    if (inWordPress() && current_user_can("can_change_amounts")) {
        tableRow(array(tableData(prompt("<b>Shipping Fee:</b>", in_array("shippingFee", $badFields)), "right"), tableData(text($data, "shippingFee", null, "10"), "left"), tableData(prompt("<b>Expedite Fee:</b>", in_array("expediteFee", $badFields)), "right"), tableData(text($data, "expediteFee", null, "10"), "left"), tableData(prompt("<b>Discount:</b>", in_array("discount", $badFields)), "right"), tableData(text($data, "discount", null, "10"), "left")));
    }
    // figure out how many rows to display initially ($i is set to that value)
    for ($i = $SETTINGS["MaxItems"]; $i > 1; $i--) {
        if (array_key_exists("packages{$i}", $data) && $data["packages{$i}"] != "" && $data["packages{$i}"] != 0 || array_key_exists("personality{$i}", $data) && $data["personality{$i}"] != "" && $data["personality{$i}"] != 0 || array_key_exists("quantity{$i}", $data) && $data["quantity{$i}"] != "" && $data["quantity{$i}"] != 0) {
            break;
        }
    }
    $initialRows = $i;
    // get currently available packages (from database) for display
    $rows = dbGetPackages();
    $displayPackages = array();
    foreach ($rows as $row) {
        if ($row["Active"]) {
            $displayPackages[$row["PackageName"]] = $row["PKID"];
        }
    }
    // get currently available personalities (from database) for display
    $rows = dbGetPersonalities();
    $displayPersonalities = array();
    foreach ($rows as $row) {
        if ($row["Active"]) {
            $displayPersonalities[$row["PieceName"]] = $row["PID"];
        }
    }
    if (!userLoggedIn()) {
        tableRow(array(tableData(prompt("Note: \"personality\" refers to the type of software or platform the firmware is compatible with.\n<br> It can be changed later using a USB stick, but we might as well set it for you."), "middle", "top", 6)));
    }
    for ($i = 1; $i <= $SETTINGS["MaxItems"]; $i++) {
        // note that the "table-row" setting for display is controversial and may
        // not work well in Microsoft IE
        // note, too, that the reason while rows 2 through 5 don't initially display
        // is that they are set as display = 'none' in the style sheet - if that
        // is turned off, then they will display right away
        $magicClick = "";
        if ($i != $SETTINGS["MaxItems"]) {
            $magicClick = "<button id=\"prodrowclick-";
            $magicClick .= $i;
            $magicClick .= "\"";
            if ($i != $initialRows) {
                $magicClick .= " style=\"visibility:hidden;\"";
            }
            $magicClick .= " type=\"button\" onclick=\"";
            $magicClick .= "document.getElementById('prodrow-";
            $magicClick .= $i + 1;
            // sets the next row to visible
            $magicClick .= "').style.display = 'table-row';";
            if ($i < $SETTINGS["MaxItems"] - 1) {
                $magicClick .= "document.getElementById('prodrowclick-";
                $magicClick .= $i + 1;
                // sets the next button to visible
                $magicClick .= "').style.visibility = 'visible';";
            }
            $magicClick .= "document.getElementById('prodrowclick-";
            $magicClick .= $i;
            // sets its own button to hidden
            $magicClick .= "').style.visibility = 'hidden';";
            $magicClick .= "\">+</button>";
        }
        if (userLoggedIn() && array_key_exists("iid{$i}", $data) && $data["IID"] != "") {
            tableRow(array(tableData(prompt("<b>IID{$i}:</b>"), "right", "top"), tableData(prompt($data["iid{$i}"]), "left", "top")));
        }
        tableRow(array(tableData(prompt("<b>Product*:</b>", in_array("product{$i}", $badFields)), "right"), tableData(dropDown($data, "packages{$i}", $displayPackages, "----------Select Product----------")), tableData(prompt("<b>Personality:</b>", in_array("personality{$i}", $badFields)), "right"), tableData(dropDown($data, "personality{$i}", $displayPersonalities, " ")), tableData(prompt("<b>Quantity*:</b>", in_array("quantity{$i}", $badFields)), "right"), tableData(text($data, "quantity{$i}", "", "2"), "left"), tableData($magicClick)), "prodrow-" . $i, $i <= $initialRows);
        hiddenField("iid{$i}", $data["iid{$i}"]);
    }
    if (!userLoggedIn()) {
        tableRow(array(tableData(prompt("Write anything you would like us to know about the order: <br> a deadline you need to meet, some option you want that isn't offered etc."), "middle", "top", 6)));
    }
    tableRow(array(tableData(prompt("<b>Order Notes:</b>"), "right", "top"), tableData(textArea($data, "customerONotes", 5), "left", "", 5)));
    if (userLoggedIn()) {
        tableRow(array(tableData(prompt("<b>Admin Order Notes:</b>"), "right", "top"), tableData(textArea($data, "adminONotes", 5), "left", "", 5)));
    }
    hiddenField("charity", $data["charity"]);
    hiddenField("OID", $data["OID"]);
}
示例#4
0
?>
" /></td>
        </tr>
	</table>
	<br>
	<p><?php 
p($l->t('Enable preview for:'));
?>
</p>
	<div class="indent">
		<?php 
foreach ($_['previewFormats'] as $format) {
    ?>
		<div>
			<?php 
    checkBox($format);
    ?>
		</div>
		<?php 
}
?>
	</div>
	<br>
        <div>
		<p><?php 
p($l->t('Cover size'));
?>
</p>
                <label for="opds-cover-x"><?php 
p($l->t('width'));
?>
示例#5
0
文件: dump.php 项目: Blu2z/implsk
 $netcat_files = 0;
 $images = 0;
 $modules = 0;
 if (checkBox($what, "database")) {
     $database = 1;
 }
 if (checkBox($what, "netcat_template")) {
     $netcat_template = 1;
 }
 if (checkBox($what, "netcat_files")) {
     $netcat_files = 1;
 }
 if (checkBox($what, "images")) {
     $images = 1;
 }
 if (checkBox($what, "modules")) {
     $modules = 1;
 }
 $err = ReadBackUP($file, $images, $netcat_files, $database, $modules, 1, $netcat_template);
 if (!$err) {
     nc_print_status(TOOLS_DUMP_MSG_RESTORED, "ok");
     showUploadForm();
     print "<br>";
     ShowBackUps();
 } else {
     nc_print_status($err, "error");
     showUploadForm();
     print "<br>";
     ShowBackUps();
 }
 break;
示例#6
0
EOF;
//メール確認画面のボタン
$confirmBtn = <<<EOF
<input type='button' value='入力画面に戻る' alt='入力画面に戻る' onclick='history.back()' /> <input type='submit' name='submit' value='送信' />
EOF;
//メール送信後画面のボタン
$returnBtn = <<<EOF
<input type='submit' value='フォームに戻る' alt='フォームに戻る' />
EOF;
//メール送信後画面のボタンのリンク先(初期設定はメール入力画面)
$returnPath = "form.html";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
require $configpath;
//消さないで!!
//テンプレートタグの設定(カンマ区切りで複数指定してください。)
$post = array("■お問い合わせ" => output("お問い合わせ", "true"), "■以前当院にお問い合わせ・ご来院はございますか" => checkBox("ご来院", ", ", "false"), "■お名前" => name("姓", "名", "true"), "■性別" => output("性別", "true"), "■年齢" => output("年齢", "true"), "■メールアドレス" => mailAdd("メール", "メール確認", "true"), "■メールアドレス(確認)" => mailAdd("メール確認", "メール", "true"), "■お電話番号" => tel("電話番号1", "電話番号2", "電話番号3", "true"), "■身長" => output("身長", "true", "", "cm"), "■体重" => output("体重", "true", "", "kg"), "■ご相談個所" => checkBox("ご相談個所", ", ", "false"), "■お問い合わせ内容" => output("お問い合わせ内容", "false"), "■第一希望・月" => output("第一希望・月", "true", "", "月"), "■第一希望・日" => output("第一希望・日", "true", "", "日"), "■第一希望・時" => output("第一希望・時", "true", "", ""), "■第二希望・月" => output("第二希望・月", "false", "", "月"), "■第二希望・日" => output("第二希望・日", "false", "", "日"), "■第二希望・時" => output("第二希望・時", "false", "", ""), "■第三希望・月" => output("第三希望・月", "false", "", "月"), "■第三希望・日" => output("第三希望・日", "false", "", "日"), "■第三希望・時" => output("第三希望・時", "false", "", ""), "■ご連絡方法" => output("ご連絡方法", "false"), "■連絡の希望時間帯" => output("連絡の希望時間帯", "false", "", ""), "■ご来院時当日のご希望" => output("ご来院時当日のご希望", "false"));
$post_name = array("■お名前" => name("姓", "名", "true"));
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// テンプレートタグ一覧(コピーして$postに追加してください。また、name値はinputの設定に応じてに変更してください。)
//
//  "テキスト、セレクト、ラジオボタンなど" => output("name値","false","テキスト","テキスト"),
//
//    "お名前" => name("姓","名","true"),
//
//    "生年月日" => birthday("年","月","日","false","西暦"),
//
//    "郵便番号" => postcode("郵便番号1","郵便番号2","false"),
//
//    "電話番号" => tel("電話番号1","電話番号2","電話番号3","false"),
//
echo '</div>';
echo '<p>Are you at threat of housing displacement?</p>';
echo '<div>';
checkBox("TaxesDifficulty", "Difficulty Paying Taxes");
checkBox("ForeclosureNotice", "Foreclosure Notice");
checkBox("LandlordEviction", "Landlord Eviction");
textInput("OtherHousingIssue", "Other");
echo '</div>';
textInput("AdditionalServices", "Are there any additional services you need?");
echo '<div class="fieldWrapper" id="divOtherNotes"><label for="OtherNotes">Other/Notes: </label><textarea id="OtherNotes" name="OtherNotes" rows="3" cols="50">' . $row["OtherNotes"] . '</textarea></div>';
dateInput("EnrollmentDate", "Enrollment Date");
echo '<h3>Christmas Coat Orders:</h3>';
checkBox("CoatOrder", "Coat Ordered");
echo 'Have you participated in previous Christmas food distributions in Brightmoor? ';
checkBox("PreviousChristmasFoodYes", "Yes");
checkBox("PreviousChristmasFoodNo", "No");
dateInput("CoatOrderDate", "Coat Order Date");
if ($row["ClientID"] != "") {
    echo '<input type="submit" value="Update Client Information"/></form>';
} else {
    echo '<input type="submit" value="Enter new client"/></form>';
}
?>
</div><!--end form style -->

<!--family member form -->
<div class="formStyle">
<?php 
echo '<h3>Family Information</h3>';
if ($row["ClientID"] != "") {
    echo '<div class="overflow-x">';