コード例 #1
0
ファイル: index.php プロジェクト: jincongho/clienthub
<?php

/**
 * Client Manager
 * 
 * Front to the system. This file build form to create a profile.
 * @package Client Manager
 * @author Jin Cong<*****@*****.**>
 */
define('LOAD_TEMPLATE', true);
define('LOAD_HEADER', true);
require 'loader.php';
//create new SpoonForm
$frm = new SpoonForm('newProfile');
//create forms elements
$frm->addTexts('file', 'case', 'name', 'ic', 'placeofbirth', 'education', 'language', 'race', 'faith', 'maritalstatus', 'nationality', 'profession', 'epf', 'banker', 'contactno', 'email', 'platesno', 'assets', 'eye', 'hair', 'skin', 'dna');
for ($i = 1; $i < 6; $i++) {
    $frm->addText('company' . $i)->setAttribute("placeholder", "公司名字 company name");
    $frm->addText('registerno' . $i)->setAttribute("placeholder", "注册号码 registration number");
    $frm->addText('companyno' . $i)->setAttribute("placeholder", "公司号码 Company number");
    $frm->addText('companyemail' . $i)->setAttribute("placeholder", "公司电邮 Company email");
    $frm->addTextarea('shareholder' . $i)->setAttribute("placeholder", "公司股东 Shareholder");
    $frm->addTextarea('registeraddr' . $i)->setAttribute("placeholder", "注册地址 Registered Address");
    $frm->addTextarea('businessaddr' . $i)->setAttribute("placeholder", "营业地址Business Address");
}
$frm->addTextareas('address', 'family', 'remarks', 'casereport');
$frm->addImage('photo');
$frm->addDropdown('gender', array('' => '', 'male' => 'Male', 'female' => 'Female'));
$frm->addText('height')->setAttribute('placeholder', 'digits only');
$frm->addText('weight')->setAttribute('placeholder', 'digits only');
$frm->addDropdown('blood', array('' => '', 'O+' => 'O+', 'A+' => 'A+', 'B+' => 'B+', 'AB+' => 'AB+', 'O-' => 'O-', 'A-' => 'A-', 'B-' => 'B-', 'AB-' => 'AB-'));