Zulfirman Tanjung : Perancangan Sistem E-Learning Amik Harapan Medan, 2010.
6.3 admin.html
form name=adminform id=adminform method=post action=admin.php
input type=hidden name=previoussearch value=?php echo previoussearch ?
input type=hidden name=sesskey value=?php echo USER- sesskey ?
table align=center border=0 cellpadding=5 cellspacing=0
tr td valign=top
?php a-count = countadmins;
a-items = strexistingadmins; print_stringcounteditems, , a;
? td
tdtd td valign=top
?php a-count = usercount;
a-items = strpotentialadmins; print_stringcounteditems, , a;
? td
tr tr
td valign=top
Zulfirman Tanjung : Perancangan Sistem E-Learning Amik Harapan Medan, 2010.
select name=removeselect[] size=20 id=removeselect multiple
onFocus=document.adminform.add.disabled=true; document.adminform.remove.disabled=false;
document.adminform.addselect.selectedIndex=-1; ?php
if countadmins == 1 { disabled = disabled;
removebuttontype = hidden; } else {
disabled = ; removebuttontype = submit;
}
foreach admins as admin { fullname = fullnameadmin, true;
echo option value=\admin-id\ disabled.fullname., .admin-email.option\n;
} ?
selecttd td valign=top
br input name=add type=submit id=add
value=larr; br
Zulfirman Tanjung : Perancangan Sistem E-Learning Amik Harapan Medan, 2010.
input name=remove type=?php echo removebuttontype ? id=remove value=rarr;
br td
td valign=top select name=addselect[] size=20
id=addselect multiple
onFocus=document.adminform.add.disabled=false; document.adminform.remove.disabled=true;
document.adminform.removeselect.selectedIndex=-1; ?php
if emptysearchusers { echo optgroup label=\strsearchresults
. countsearchusers . \\n; foreach searchusers as user {
fullname = fullnameuser, true; echo option value=\user-
id\.fullname., .user-email.option\n; }
echo optgroup\n; }
if emptyusers { foreach users as user {
fullname = fullnameuser, true; echo option value=\user-
id\.fullname., .user-email.option\n; }
}
Zulfirman Tanjung : Perancangan Sistem E-Learning Amik Harapan Medan, 2010.
? select
br input type=text name=searchtext size=30
value=?php echo searchtext ? onFocus
=document.adminform.add.disabled=true;
document.adminform.remove.disabled=true; document.adminform.removeselect.selectedIndex=-1;
document.adminform.addselect.selectedIndex=-1; onkeydown = var keyCode = event.which ?
event.which : event.keyCode; if keyCode == 13 {
document.adminform.previoussearch.value=1;
document.adminform.submit; }
input name=search id=search type=submit value=?php pstrsearch ?
?php if emptysearchusers {
echo input name=showall id=showall type=submit value=.strshowall. .\n;
} ?
td
Zulfirman Tanjung : Perancangan Sistem E-Learning Amik Harapan Medan, 2010.
tr table
form
6.4 admin.php