5: 2010-05-15 (土) 13:49:05 admin |
6: 2010-05-16 (日) 12:06:57 admin |
| | | |
| **** $USER [#ecf0673b] | | **** $USER [#ecf0673b] |
- | - $USER->id | + | - メンバ変数例 |
| + | -- id => 2 |
| + | -- username => admin |
| + | -- firstname => 管理 |
| + | -- lastname => ユーザ |
| + | -- email => iseki@solar-system.tuis.ac.jp |
| + | -- emailstop => 0 |
| + | -- city => 千葉市 |
| + | -- country => JP |
| + | -- lang => ja_utf8 |
| + | -- timezone => 9.0 |
| + | -- firstaccess => 1259809008 |
| + | -- lastaccess => 1273976520 |
| + | -- lastlogin => 1273631570 |
| + | -- currentlogin => 1273761631 |
| | | |
| **** $_POST [#jf217b7d] | | **** $_POST [#jf217b7d] |
| **** get_record(s) [#z3e3f469] | | **** get_record(s) [#z3e3f469] |
| - get_record($table, $field1, $value1, $field2='', $value2='', $field3='', $value3='', $fields='*') | | - get_record($table, $field1, $value1, $field2='', $value2='', $field3='', $value3='', $fields='*') |
- | $course = get_record('course', 'id', $courseid); | + | if ($user = get_record("user", "id", $USER->id)) { |
- | $user = get_record("user", "id", $USER->id); | + | $firstname = $user->firstname; |
| + | } |
| - get_records($table, $field='', $value='', $sort='', $fields='*', $limitfrom='', $limitnum='') | | - get_records($table, $field='', $value='', $sort='', $fields='*', $limitfrom='', $limitnum='') |
| if (!$vars = get_records('autoattend_settings', 'courseid', $courseid, 'id')) { | | if (!$vars = get_records('autoattend_settings', 'courseid', $courseid, 'id')) { |
| $vars = get_records('autoattend_settings', 'courseid', 0); // use default | | $vars = get_records('autoattend_settings', 'courseid', 0); // use default |
| } | | } |
| + | |
| **** get_records_sql [#r096c770] | | **** get_records_sql [#r096c770] |
| $qey = "SELECT * FROM ......."; | | $qey = "SELECT * FROM ......."; |