Home
News
Forum
Wiki
Blog
Contents
Gallery
Movies
Downloads
About NSL
[
List of Titles
|
List of Pages
|
New
|
Search
|
Recent changes
|
Help
]
Moodle/Programming/html_writer
[
Front page
]
[ ]
Start:
**html_writer
#br
*** html_writer API
**** html_writer::select()
- html_writer::select()
$ltimes = array(1=>0,5,10,15,20,25,30,35,40,45,50,55,60,...
echo html_writer::select($ltimes, 'lmin', 1, false);
**** html_writer::select_time()
- html_writer::select_time()
echo html_writer::select_time('years', 'startyear', 0);
echo html_writer::select_time('months', 'startmonth', 0);
echo html_writer::select_time('days', 'startday', 0);
#br
- ''v2.2.2+'': html_writer::select_time() は 時間,分の既...
#br
**** html_writer::table()
- html_writer::table($table)
$table = new html_table();
$table->head = array(title1, title2, title3, ....);
$table->align = array('left', 'center', 'center', ....);
$table->width = "100%";
$table->data[] = array(....) // 1行目
$table->data[] = array(....) // 2行目
$table->data[] = array(....) // 3行目
....
echo html_writer::table($table);
#br
*** Sample
function show_demo_set_header(&$table)
{
unset($table->head);
unset($table->align);
unset($table->size);
unset($table->wrap);
// Header
$table->head [] = '#';
$table->align[] = 'right';
$table->size [] = '20px';
$table->wrap [] = 'nowrap';
$table->head [] = 'Name';
$table->align[] = 'center';
$table->size [] = '80px';
$table->wrap [] = 'nowrap';
$table->head [] = 'Value';
$table->align[] = 'left';
$table->size [] = '100px';
$table->wrap [] = 'nowrap';
return;
}
function show_demo_disp_table()
{
global $CFG, $DB;
$table = new html_table();
$datas = array();
$datas[0]['num'] = 0;
$datas[0]['name'] = "AAA";
$datas[0]['value'] = "VVV";
$datas[1]['num'] = 1;
$datas[1]['name'] = "BBB";
$datas[1]['value'] = "WWW";
$i = 0;
foreach($datas as $data) {
$table->data[$i][] = $i + 1;
$table->data[$i][] = $data['name'];
$table->data[$i][] = $data['value'];
$i++;
}
show_demo_set_header($table);
echo '<div align="center">';
echo html_writer::table($table);
echo '</div>';
return;
}
End:
**html_writer
#br
*** html_writer API
**** html_writer::select()
- html_writer::select()
$ltimes = array(1=>0,5,10,15,20,25,30,35,40,45,50,55,60,...
echo html_writer::select($ltimes, 'lmin', 1, false);
**** html_writer::select_time()
- html_writer::select_time()
echo html_writer::select_time('years', 'startyear', 0);
echo html_writer::select_time('months', 'startmonth', 0);
echo html_writer::select_time('days', 'startday', 0);
#br
- ''v2.2.2+'': html_writer::select_time() は 時間,分の既...
#br
**** html_writer::table()
- html_writer::table($table)
$table = new html_table();
$table->head = array(title1, title2, title3, ....);
$table->align = array('left', 'center', 'center', ....);
$table->width = "100%";
$table->data[] = array(....) // 1行目
$table->data[] = array(....) // 2行目
$table->data[] = array(....) // 3行目
....
echo html_writer::table($table);
#br
*** Sample
function show_demo_set_header(&$table)
{
unset($table->head);
unset($table->align);
unset($table->size);
unset($table->wrap);
// Header
$table->head [] = '#';
$table->align[] = 'right';
$table->size [] = '20px';
$table->wrap [] = 'nowrap';
$table->head [] = 'Name';
$table->align[] = 'center';
$table->size [] = '80px';
$table->wrap [] = 'nowrap';
$table->head [] = 'Value';
$table->align[] = 'left';
$table->size [] = '100px';
$table->wrap [] = 'nowrap';
return;
}
function show_demo_disp_table()
{
global $CFG, $DB;
$table = new html_table();
$datas = array();
$datas[0]['num'] = 0;
$datas[0]['name'] = "AAA";
$datas[0]['value'] = "VVV";
$datas[1]['num'] = 1;
$datas[1]['name'] = "BBB";
$datas[1]['value'] = "WWW";
$i = 0;
foreach($datas as $data) {
$table->data[$i][] = $i + 1;
$table->data[$i][] = $data['name'];
$table->data[$i][] = $data['value'];
$i++;
}
show_demo_set_header($table);
echo '<div align="center">';
echo html_writer::table($table);
echo '</div>';
return;
}
Page:
Site Search
Advanced Search
Login
Username:
Password:
Lost Password?
Register now!!
Sub Menu
New Arrivals
Books
Web Links
Site Map
e-Learning
TUIS Certificate
mini Calendar
May 2025
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Today
Who's Online
107 user(s) are online (7 user(s) are browsing xpwiki)
Members: 0
Guests: 107
more...
Access Counter
Today :
Yesterday :
Total :
Powered by XOOPS Cube 2.1© 2001-2006
XOOPS Cube Project
Design by
XoopsDesign.com