12. Cek_login.php
?php include ..configkoneksi.php;
function antiinjectiondata{ filter_sql
= mysql_real_escape_stringstripslashesstrip_tagshtmlspecialchars
data,ENT_QUOTES; return filter_sql;}
username = antiinjection_POST[username]; pass = antiinjectionmd5_POST[password];
login=mysql_querySELECT
FROM admins
WHERE username=username AND password=pass AND blokir=N;
ketemu=mysql_num_rowslogin; r=mysql_fetch_arraylogin;
Apabila username dan password ditemukan if ketemu 0{
session_start; _SESSION[namauser] = r[username];
_SESSION[namalengkap] = r[nama_lengkap]; _SESSION[passuser] = r[password];
_SESSION[leveluser] = r[level]; headerlocation:media.php?module=home;
} else{
echo
link href=..configadminstyle.css
rel=stylesheet type=textcss;
echo centerLOGIN GAGAL br Username atau Password Anda tidak benar.br
Atau account Anda sedang diblokir.br; echo a href=index.phpbULANGI LAGIbacenter; }
?
13. Menu.php
?php include ..configkoneksi.php;
if _SESSION[leveluser]==admin{ sql=mysql_queryselect from modul where aktif=Y order by
urutan; }
else{ sql=mysql_queryselect from modul where status=user and
aktif=Y order by urutan; } while m=mysql_fetch_arraysql{
echo lia href=m[link]187; m[nama_modul]ali; } ?
14. Media.php
?php error_reporting0;
session_start;
Universitas Sumatera Utara
if empty_SESSION[username] AND empty_SESSION[passuser] { echo link href=style.css rel=stylesheet type=textcss
centerUntuk mengakses modul, Anda harus login br; echo a href=index.phpbLOGINbacenter;
}else{ ?
htmlhead titletitlescript
language=javascript type=textjavascript
tinyMCE_GZ.init{ plugins : style,layer,table,save,advhr,advimage, ...,
themes : simple,advanced, languages : en,
disk_cache : true, debug : false};
script script language=javascript type=textjavascript src=..tinymcpuktiny_mce_src.jsscript
script type=textjavascript tinyMCE.init{
mode : textareas, theme : advanced,
plugins :
table,youtube,advhr,advimage,advlink,emotions,flash,searchreplace ,paste,directionality,noneditable,contextmenu,
theme_advanced_buttons1_add :
fontselect,fontsizeselect, theme_advanced_buttons2_add
: separator,preview,zoom,separator,forecolor,backcolor,liststyle,
theme_advanced_buttons2_add_before: cut,copy,paste,separator,search,replace,separator,
theme_advanced_buttons3_add_before :
tablecontrols,separator,youtube,separator, theme_advanced_buttons3_add : emotions,flash,
theme_advanced_toolbar_location : top, theme_advanced_toolbar_align : left,
theme_advanced_statusbar_location : bottom, extended_valid_elements
: hr[class|width|size|noshade],
file_browser_callback : fileBrowserCallBack, paste_use_dialog : false,
theme_advanced_resizing : true, theme_advanced_resize_horizontal : false,
theme_advanced_link_targets :
_something=My somthing;_something2=My somthing2;_something3=My somthing3;,
apply_source_formatting : true}; function fileBrowserCallBackfield_name, url, type, win {var
connector =
....filemanagerbrowser.html?Connector=connectorsphpconnector .php;
var enableAutoTypeSelection = true; var cType;
tinymcpuk_field = field_name; tinymcpuk = win;
switch type { case image:
cType = Image; break;
case flash: cType = Flash;
Universitas Sumatera Utara
break; case file:
cType = File; break;
} if enableAutoTypeSelection cType {
connector += Type= + cType; }
window.openconnector, tinymcpuk,
modal,width=600,height=400; }
scriptlink href=style.css rel=stylesheet type=textcss head
body div id=header
div id=menu ul
lia href=?module=home187; Homeali ?php include menu.php; ?
lia href=logout.php187; Logoutali ul
pnbsp;p div div id=content
?php include content.php; ? div div id=footer
Copyright copy;
2014 by
Swyzhi Winingrum.
All rights
reserved.div div bodyhtml
?php } ?
15. Style.css