コード例 #1
0
ファイル: index.php プロジェクト: ejsoonyang/heohoh
\t\t\t\t</div>
\t\t\t\t<div id="house_right"></div>
\t\t\t</div>
\t\t\t<div id="filter">
\t\t\t\t<div id="which">
\t\t\t\t\t<div id="which_arrange"></div>
\t\t\t\t\t<div id="which_house"></div>
\t\t\t\t\t<div id="which_room"></div>
\t\t\t\t\t<div id="its_info"></div>
\t\t\t\t</div>
\t\t\t\t<form id="filter_form">
\t\t\t\t\t<fieldset id="filter_arrange">
\t\t\t\t\t\t<legend>範圍篩選</legend>
\t\t\t\t\t\t類別 <select id="filter_type">
dudu;
person_type_select_option(true, "");
echo <<<dudu
\t\t\t\t\t\t</select>
\t\t\t\t\t\t分組 <input type="input" id="filter_group" onkeydown="enter_filter(event)">
\t\t\t\t\t\t<span class="left_35">性別 </span>
\t\t\t\t\t\t<select id="filter_sexuality">
\t\t\t\t\t\t\t<option></option>
\t\t\t\t\t\t\t<option value=true>男</option>
\t\t\t\t\t\t\t<option value=false>女</option>
\t\t\t\t\t\t</select>
\t\t\t\t\t</fieldset>
\t\t\t\t\t<fieldset id="filter_exact">
\t\t\t\t\t\t<legend>精確查找</legend>
\t\t\t\t\t\t姓名 <input type="input" id="filter_name" onkeydown="enter_filter(event)">
\t\t\t\t\t\t法號 <input type="input" id="filter_dharma" onkeydown="enter_filter(event)">
\t\t\t\t\t\t<span class="left_35">身份證號 </span>
コード例 #2
0
ファイル: attribute_board.php プロジェクト: ejsoonyang/heohoh
    echo "<span class='left_35' id='person_arrive_arrow'>&#60;--- </span><button type='button' id='switch_person_arrive_button' onclick='switch_person_arrive()'>?未到達</button>";
}
echo "<br>";
echo "<span class='left_35' id='person_preleave_span'>預離日期 </span><input type='input' id='person_preleave_date' value='{$person_preleave_date}'><select id='person_preleave_time' class='select_time'>";
time_select_option($person_preleave_time);
echo "\t</select>";
echo "<span class='left_35'>確定程度 </span><select id='person_preleave_confirm'>";
confirm_select_option($person_preleave_confirm);
echo "\t</select><br>";
echo "<hr>";
echo "<span class='left_35'>樓名 </span><select name='person_house' id='person_house'>";
house_select_option($person_house);
echo "\t</select>";
echo "<span> 房間 </span><input type='input' name='person_room' id='person_room' value='{$person_room}'>";
echo "<span class='left_35'>類別 </span><select name='person_type' id='person_type'>";
person_type_select_option(false, $person_type);
echo "</select>";
echo "<span> 分組 </span><input type='input' name='person_group' id='person_group'><br>";
echo "</div>";
echo "<div id='extend_infor'>";
/*
echo "<span class='left_35'>離開時間</span><input type='input' name='person_leave_date'><select name='person_leave_time' class='select_time'>";
echo "	<?php time_select_option(false); ?>";
echo "	</select><br>";
echo "<span class='left_35'>請假開始時間</span><input type='input' name='person_break_start_date'><select name='person_break_start_time' class='select_time'>";
echo "	<?php time_select_option(false); ?>";
echo "	</select>";
echo "<span class='left_35'>請假結束時間</span><input type='input' name='person_break_end_date'><select name='person_break_end_time' class='select_time'>";
echo "	<?php time_select_option(false); ?>";
echo "<hr>";
*/
コード例 #3
0
    $update_person_type = array($new_person_type);
    //echo "\n\n\nyour command is '$command'";
    try {
        include "../connect_db.php";
        $conn = new PDO("mysql:host={$servername};dbname={$dbname}", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        $original_person_type = $setting_person_type_object->person[$command - 1]->name;
        //echo $original_person_type;
        if ($command > 0) {
            $sql_execution = "UPDATE person_main SET person_type='{$input_person_type}' WHERE person_type = '{$original_person_type}'";
        } else {
            $sql_execution = "UPDATE person_main SET person_type='' WHERE person_type = '{$original_person_type}'";
        }
        $conn->exec($sql_execution);
    } catch (PDOException $e) {
        echo "Error: " . $e->getMessage();
    }
    $conn = null;
    if ($command > 0) {
        array_splice($setting_person_type_object->person, $command - 1, 1, $update_person_type);
    } else {
        array_splice($setting_person_type_object->person, -$command - 1, 1);
    }
}
$setting_person_type_file = fopen("../json/person.json", "w");
fwrite($setting_person_type_file, json_encode($setting_person_type_object));
fclose($setting_person_type_file);
//echo the selection at filter
echo "<option value='' style='font-size:20px'></option>";
person_type_select_option(false, "");