예제 #1
0
$tbl->displayAs("alias", "別名");
$tbl->displayAs("type", "種類");
$tbl->formatFieldWithFunction('type', 'showIcon');
$tbl->displayAs("class", "等");
$tbl->displayAs("number", "號碼");
$tbl->displayAs("status", "狀態");
$tbl->displayAs("ele", "高度");
$tbl->displayAs("comment", "註解");
$tbl->displayAs("mt100", "百岳");
$tbl->displayAs("checked", "檢查");
$tbl->defineCheckbox('checked', '1', '0');
//$tbl->defineCheckbox('mt100',1,0);
if ($_GET['x'] && $_GET['y']) {
    $tbl->setInitialAddFieldValue('x', $_GET['x']);
    $tbl->setInitialAddFieldValue('y', $_GET['y']);
    $tbl->displayAddFormTop();
}
if ($_GET['name']) {
    $tbl->setInitialAddFieldValue('name', $_GET['name']);
}
$tbl->showTable();
function showIcon($val)
{
    return sprintf("%s<img src='http://map.happyman.idv.tw/icon/%s.png'>", $val, urlencode($val));
}
?>
<div align=center class="note">
<b>管理者您好</b><br>
<p>
ps: 大百岳=1 小百岳=2 百名山=4 若兩者皆是 1+4=5 
<p>