Insight into eDir-CMS (Composed by Wing and EA) - 2

原创 2012年03月23日 15:57:59


Form Submit on Company Editor and Room Editor


company editing:


On the client side, there are drop-down list and check box in the form:


<form action="company_rec.php" method="post" id="form-company">
      <fieldset class="companyform">
        <input name="action" type="hidden" value="edit" />
        <input name="save" type="hidden" value="edit" />
        <input name="save" type="hidden" value="edit" />
        <input name="cmp_id" id="cmp_id" type="hidden" value="2" />
        <table border="0">
          <tr>
            <td valign="top"><label>Rooms</label></td>
            <td>
				<table border="0">
					<tr><th style="padding:0 5px;">Floor</th><th style="padding:0 5px;">Room</th></tr>
					<tr><td style="padding:0 5px;">
						<select name='floor_id' id='floor_id' style='min-width:50px'>
							<option value="">No floor</option>
							<option value='1' selected>G</option>
							<option value='2' >P</option>
							<option value='3' >3</option>
							<option value='4' >4</option>
							<option value='5' >5</option>
							<!--....-->
						</select>
						</td>
						<td style="padding:0 5px;">
							<select name='room_id' id='room_id' style='min-width:50px'>
								<option value="">No room</option>
								<option value='1' >01</option>
								<option value='2' >02</option>
								<!--....-->
							</select>
						</td>
					</tr>
				</table>
			</td>
          </tr>
          <tr>
            <td valign="top"><label>Name(English)</label></td>
            <td><input name="eng_name" size="30" type="text" value="" /></td>
          </tr>
          <tr>
            <td valign="top"><label>Name(Traditional Chinese)</label></td>
            <td><input name="chi_name"size="30" type="text" value="華" /></td>
          </tr>
          <tr>
            <td valign="top"><label>Description</label></td>
            <td><textarea name="descp" rows="8" cols="15" class="tinymce xhedit"><p>G樓105室  /  G/F Shop 105</p></textarea></td>
          </tr>
          <tr>
            <td valign="top"><label>Amt of Strokes of 1st Traditional Chinese Char</label></td>
            <td><input name="amt_stroke" class="inputbox" size="30" type="text" value="12" /></td>
          </tr>
          <tr>
            <td valign="top"><label>Name(Simplified Chinese)</label></td>
            <td><input name="schi_name" size="30" type="text" value="" /></td>
          </tr>
          <tr>
            <td valign="top"><label>Description(Simplified Chinese)</label></td>
            <td><textarea name="sdescp" rows="8" cols="15" class="tinymce xhedit"><p>G  Shop 105</p></textarea></td>
          </tr>
          <tr>
            <td valign="top"><label>Amt of Strokes of 1st Simplified Chinese Char</label></td>
            <td><input name="samt_stroke"size="30" type="text" value="6" /></td>
          </tr>
          <tr>
            <td valign="top"><label>是否啟用設備默認字體</label></td>
            <td>
				<select name="is_def_font">
					<option value="1">YES</option>
					<option value="0" selected>NO</option>
				</select>
			</td>
          </tr>		  
          
          <tr>
			<td style="border:0"> </td><td style="border:0">
				<button class="ui-button ui-widget ui-state-default ui-corner-all" onclick="document.getElementById('form-company').submit();">
					<span class="ui-icon ui-icon-disk"></span>Submit
				</button>
			</td>
		  </tr>
        </table>
      </fieldset>
    </form>

We would change the field for 'is_def_font' from SELECT to CHECK BOX:


<td>
	<input type="checkbox" value="1" name="is_def_font" class="checkbox"> <label for="cbdemo2">啟用</label>
</td>

And that won't cause any change on the server side code, here is a reference to check box in PHP.


http://note.ajneok.org/programing_note/php/php-get-checkbox/

http://www.html-form-guide.com/php-form/php-form-checkbox.html


On the server side, we still just use $_POST["is_def_font"] to get the string value from user submitting. Besides, plz note that, if the option of SELECT does not have value attribute set, the text will be got by PHP instead.





版权声明:本文为博主原创文章,未经博主允许不得转载。

1poj1836(和合唱队列一样)

http://poj.org/problem?id=1836 Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submis...
  • lanjiangzhou
  • lanjiangzhou
  • 2013年05月30日 10:55
  • 1187

LeetCode DNA重复序列

All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTC...
  • dddongdong
  • dddongdong
  • 2015年02月12日 09:41
  • 1158

PageAdmin不显示版权的3种方法

PageAdmin去版权,完美破解PageAdmin CMS,去掉页脚和页面标题的“Powered by PageAdmin CMS”(2011-09-07 16:11:40)转载▼标签: 底部管理后...
  • rrzhaobaojun
  • rrzhaobaojun
  • 2015年01月24日 01:01
  • 2477

Insight into eDir-CMS (Composed by Wing and EA) - 1

The first topic is about the output buffer of PHP, since I found intensive usage ofob_start() andob_...
  • zlxadhkust
  • zlxadhkust
  • 2012年03月14日 15:29
  • 626

How to integrate Struts2 into Web Application and small sample//TODO Verify!!!

Maven: struts2的Login Sample  第一步,使用eclipse新建一个maven webapp工程,如下图所示:   点击next,选择webapp工程,然后...
  • u011537073
  • u011537073
  • 2015年06月25日 11:01
  • 471

[Activeden] slick full website template with cms and 2 skins 中文版

体系包含全部的模块,两个没有同的皮肤,深度链接,最值得等待的是包括高等PHP内容管理系统(后盾),这内里含有惊人的代价,不要错过。 下级PHP管理系统: 前台(预览变动):http://...
  • swf27580
  • swf27580
  • 2012年09月03日 21:54
  • 708

Mapeasy update by wing_tang@msn.com

  • 2012年03月06日 01:46
  • 356KB
  • 下载

Tim Kasse - Practical Insight into CMMI.pdf

  • 2015年11月04日 05:43
  • 3.18MB
  • 下载

Codeforces Round #259 (Div. 2)-B. Little Pony and Sort by Shift

B. Little Pony and Sort by Shift time limit per test 1 second memory limit per test 256 ...
  • u013929990
  • u013929990
  • 2014年08月02日 09:17
  • 554

Wing FTP Server and Lua源码(含注册码)

  • 2014年01月01日 14:35
  • 7.75MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Insight into eDir-CMS (Composed by Wing and EA) - 2
举报原因:
原因补充:

(最多只允许输入30个字)