• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版40497620e60ac8dfdd2237ffa44e80657613a3dd (tree)
时间2007-08-29 01:33:14
作者henoheno <henoheno>
Commiterhenoheno

Log Message

v2

更改概述

差异

--- /dev/null
+++ b/devel/followup_html/form_submit.php
@@ -0,0 +1,44 @@
1+<?php
2+// $Id: form_submit.php,v 1.1 2007-08-28 16:33:14 henoheno Exp $
3+//
4+// Submit buttons and toggle demo
5+//
6+// [button] prev: off/on
7+// [button] write: off/on
8+// [button] help: off/on
9+// [button] cancel: off/on
10+// showhelp: off/on <= toggle with help button
11+
12+$base = basename(__FILE__);
13+
14+// State of buttons
15+$prev = isset($_POST['prev']);
16+$write = isset($_POST['write']);
17+$help = isset($_POST['help']);
18+$cancel = isset($_POST['cancel']);
19+
20+// State of status
21+$showhelp = isset($_POST['showhelp']) && $_POST['showhelp'] == 'on';
22+if ($help) $showhelp = ! $showhelp; // Toggle
23+
24+// Render
25+$prev = $prev ? 'on' : 'off';
26+$write = $write ? 'on' : 'off';
27+$help = $help ? 'on' : 'off';
28+$cancel = $cancel ? 'on' : 'off';
29+$showhelp = $showhelp ? 'on' : 'off';
30+echo <<< EOF
31+ [button] prev:&nbsp;&nbsp; $prev</br>
32+ [button] write:&nbsp; $write</br>
33+ [button] help:&nbsp;&nbsp; $help</br>
34+ [button] cancel: $cancel</br>
35+ showhelp: <strong>$showhelp</strong></br>
36+ <form action="$base" method="post">
37+ <input type="submit" name="prev" value="Preview" />
38+ <input type="submit" name="write" value="Write" />
39+ <input type="submit" name="help" value="Help" />
40+ <input type="submit" name="cancel" value="Cancel" />
41+ <input type="hidden" name="showhelp" value="$showhelp">
42+ </form>
43+EOF;
44+?>
\ No newline at end of file