• Tidak ada hasil yang ditemukan

Penyimpanan File Pribadi User Berbasis Web Cloud

N/A
N/A
Protected

Academic year: 2017

Membagikan "Penyimpanan File Pribadi User Berbasis Web Cloud"

Copied!
38
0
0

Teks penuh

(1)

1.tugasakhir/index.php

<?php

include "header.php"; ?>

<div class="container-fluid"> <div class="row">

<div class="col-md-6"> <div class="jumbotron">

<h3><b>Hello, Welcome To Upload & Download!</b></h3>

<p>Selamat datang di website Upload & Download , website ini adalah tempat Upload Dan Download file pribadi anda tanpa bisa di download oleh orang lain hanya account anda saja yang bisa

mendownload ketika anda mengupload disini.</p> </div>

</div>

<div class="col-md-6"> <?php

error_reporting(0);

$notif = $_GET['notif'];

if ($notif == "invalid_data") {

echo '<div class="alert alert-danger" role="alert">

<button type="button" class="close" data-dismiss="alert" label="Close"><span

aria-hidden="true">&times;</span></button><span class="glyphicon glyphicon-warning-sign"></span>

Your Username or Password Was Incorrect </div>';

} ?>

<form id="defaultForm" action="login.php" method="post"> <div class="form-group">

<label for="InputUsername">Username</label>

<input autofocus required name="username" type="text" id="username" placeholder="Username" class="form-control"> </div>

<div class="form-group">

<label for="InputPassword">Password</label>

<input required name="password" type="password" id="password" placeholder="Password" class="form-control">

</div>

<div class="checkbox"> <label>

<input type="checkbox"class="pull-left"> Remember me </label>

<p class="pull-right">

<a href="register/">Don't Have Account?</a> or <a href="lostpassword/">Lost Password?</a>

</p> </div>

<input type="submit" name="login" value="Login" class="btn btn-success">

</form> </div> </div>

<script type="text/javascript"> $(document).ready(function() {

(2)

$('#defaultForm') .bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: { username: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The username is required and can\'t be empty' },

stringLength: { min: 6,

max: 30,

message: 'The username must be more than 6 and less than 30 characters long'

},

/*remote: {

url: 'remote.php',

message: 'The username is not available' },*/

regexp: {

regexp: /^[a-zA-Z0-9_\.]+$/,

message: 'The username can only consist of alphabetical, number, dot and underscore'

} } },

password: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

} } } } }); });

</script> </div>

<?php

(3)

2.tugasakhir/login.php

<?php

$pesanerror="";

include('koneksi/koneksi.php');

// membaca username dan password dari form login $username = $_POST['username'];

$password = $_POST['password'];

// mencari data user yang login tujuannya untuk mendapatkan password dari database

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE username = '$username'");

$data = mysqli_fetch_array($hasil);

// mencocokkan password user dari database dengan password dari form

if ($password == $data['password']) {

// jika kedua password sama, maka login berhasil // simpan username ke dalam session

session_start();

$_SESSION['username'] = $username; echo "<h1>Login Sukses</h1>"; header('Location: upload/'); }

else {

// jika kedua password tidak cocok, maka login gagal header("location:index.php?notif=invalid_data"); }

?>

3.tugasakhir/header.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Upload & Download</title>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<link href="css/1.css" rel="stylesheet" type="text/css" /> <link href="assets/css/bootstrap.css" rel="stylesheet"> <link href="assets/css/font-awesome.css" rel="stylesheet"> <script type="text/javascript"

src="assets/js/bootstrap.js"></script>

<script type="text/javascript" src="assets/js/jquery.js"></script> <script type="text/javascript" src="assets/js/alert.js"></script> <script type="text/javascript" src="assets/js/button.js"></script> <script type="text/javascript"

src="assets/js/dropdown.js"></script>

<script type="text/javascript" src="assets/js/modal.js"></script> <script type="text/javascript" src="assets/js/tab.js"></script> <script type="text/javascript"

src="assets/js/popover.js"></script>

(4)

<script type="text/javascript"

src="assets/js/collapse.js"></script> <!-- VALIDATOR -->

<link rel="stylesheet"

href="../vendor/bootstrap/css/bootstrap.css"/> <link rel="stylesheet"

href="css/dist/css/bootstrapValidator.css"/>

<script type="text/javascript" src="css/vendor/jquery/jquery-1.10.2.min.js"></script>

<script type="text/javascript"

src="css/dist/js/bootstrapValidator.js"></script> <!-- VALIDATOR -->

<link rel="shorcut icon" href="favicon.ico"/> </head>

<body>

<nav class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid">

<!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">

<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>

<span class="icon-bar"></span> <span class="icon-bar"></span> </button>

<a href="index.php"><img src="images/logo.png" width="82px" height="40px" alt="Upload & Download" title="Upload & Download" /></a> &nbsp;

</div>

<!-- Collect the nav links, forms, and other content for toggling -->

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav">

<!--li><a href="index.php">Home</a></li--> </ul>

<ul class="nav navbar-nav navbar-right"> <?php error_reporting(0) ?>

<?php

session_start();

$username = $_SESSION['username'];

if(!empty($username)) {

header("location:upload/"); }

?>

<li><a href="index.php"><span class="glyphicon glyphicon-home"></span> Home</a></li>

<li><a href="register/">Register</a></li>

<li><a href="lostpassword/">Lost Password</a></li> </ul>

</div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>

(5)

4.tugasakhir/headerindex.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Upload & Download</title>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<link href="../css/1.css" rel="stylesheet" type="text/css" /> <link href="../assets/css/bootstrap.css" rel="stylesheet"> <link href="../assets/css/font-awesome.css" rel="stylesheet">

<script type="text/javascript"

src="../assets/js/bootstrap.js"></script> <script type="text/javascript"

src="../assets/js/jquery.js"></script> <script type="text/javascript"

src="../assets/js/alert.js"></script> <script type="text/javascript"

src="../assets/js/button.js"></script> <script type="text/javascript"

src="../assets/js/dropdown.js"></script> <script type="text/javascript"

src="../assets/js/modal.js"></script>

<script type="text/javascript" src="../assets/js/tab.js"></script> <script type="text/javascript"

src="../assets/js/popover.js"></script> <script type="text/javascript"

src="../assets/js/collapse.js"></script> <!-- VALIDATOR -->

<link rel="stylesheet"

href="../css/dist/css/bootstrapValidator.css"/>

<script type="text/javascript" src="../css/vendor/jquery/jquery-1.10.2.min.js"></script>

<script type="text/javascript"

src="../css/dist/js/bootstrapValidator.js"></script> <!-- VALIDATOR -->

<link rel="shorcut icon" href="../favicon.ico"/> </head>

<body>

<nav class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid">

<!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">

<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>

<span class="icon-bar"></span> <span class="icon-bar"></span> </button>

<a href="../"><img src="../images/logo.png" width="82px"

height="40px" alt="Upload & Download" title="Upload & Download" /></a> &nbsp;

</div>

(6)

<!-- Collect the nav links, forms, and other content for toggling -->

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav">

<!--li><a href="index.php">Home</a></li--> </ul>

<ul class="nav navbar-nav navbar-right"> <?php error_reporting(0) ?>

<?php

session_start();

$username = $_SESSION['username'];

if(!empty($username)) {

header("location:../upload/"); }

?>

<li><a href="../"><span class="glyphicon glyphicon-home"></span> Home</a></li>

<li><a href="../register">Register</a></li>

<li><a href="../lostpassword">Lost Password</a></li> </ul>

</div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>

<br><br><br>

5.tugasakhir/headerlog.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Upload & Download</title>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<link href="../css/1.css" rel="stylesheet" type="text/css" /> <link href="../css/reset.css" rel="stylesheet" type="text/css" /> <link href="../assets/css/bootstrap.css" rel="stylesheet">

<link href="../assets/css/font-awesome.css" rel="stylesheet"> <script type="text/javascript"

src="../assets/js/scriptsearch.js"></script> <script type="text/javascript"

src="../assets/js/bootstrap.js"></script> <script type="text/javascript"

src="../assets/js/jquery.js"></script> <script type="text/javascript"

src="../assets/js/alert.js"></script> <script type="text/javascript"

src="../assets/js/button.js"></script> <script type="text/javascript"

src="../assets/js/dropdown.js"></script> <script type="text/javascript"

src="../assets/js/modal.js"></script>

<script type="text/javascript" src="../assets/js/tab.js"></script> <script type="text/javascript"

(7)

<script type="text/javascript"

src="../assets/js/collapse.js"></script> <script type="text/javascript"

src="../assets/js/browse.js"></script>

<link rel="shorcut icon" href="../favicon.ico"/>

</head> <body>

<nav class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid">

<!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header">

<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">

<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>

<span class="icon-bar"></span> <span class="icon-bar"></span> </button>

<a href="#"><img src="../images/logo.png" width="82px"

height="40px" alt="Upload & Download" title="Upload & Download" /></a> &nbsp;

</div>

<!-- Collect the nav links, forms, and other content for toggling -->

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav">

<!--li><a href="index.php">Home</a></li--> </ul>

<ul class="nav navbar-nav navbar-right">

<li><a href="../upload/"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a></li>

<li><a href="../myfiles/"><i class="fa fa-folder" aria-hidden="true"></i> My Files</a></li>

<?php

session_start();

// membaca nama user yang tersimpan dalam session $username = $_SESSION['username'];

echo "

<li class=\"dropdown\">

<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i> $username <span class=\"caret\"></span></a>

<ul class=\"dropdown-menu\">

<li><a href=\"../changepassword/\"><i class=\"fa fa-key\" aria-hidden=\"true\"></i> Change Password</a></li>

<li><a href=\"../changeprofile/\"><i class=\"fa fa-gear\" aria-hidden=\"true\"></i> Edit Profile</a></li>

<li role=\"separator\" class=\"divider\"></li>

<li><a href=\"../logout\"><i class=\"fa fa-power-off\" aria-hidden=\"true\"></i> Logout</a></li>

</ul> </li>";

if(empty($username)){

(8)

header("location:../"); }

?> </ul>

</div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav>

<br><br><br><br>

6.tugasakhir/footer.php

<div id="footer">

<div class="container"> <footer>

<center> &copy; 2016 <br>

Design & Code by <a href="https://www.facebook.com/pupunnnn" target="_blank">Pupun</a>

</center>

</footer> </div> </div>

7.tugasakhir/upload/index.php

<?php

include "../headerlog.php"; ?>

<?php

$pesanerror="";

// untuk keamanan, kita juga includekan cek.php include('../koneksi/koneksi.php');

if(isset($_POST['upload'])){

// membaca nama file

$fileName = $_FILES['userfile']['name']; // membaca nama file temporary

$tmpName = $_FILES['userfile']['tmp_name']; // membaca size file

$fileSize = $_FILES['userfile']['size']; // membaca tipe file

$fileType = $_FILES['userfile']['type'];

// username ini sekaligus menyatakan informasi pemilik file

// langkah membaca isi file yang diupload $fp = fopen($tmpName, 'r+');

$content = fread($fp, filesize($tmpName)); $content = addslashes($content);

fclose($fp);

// koneksi ke mysql

include_once("../koneksi/koneksi.php");

(9)

mysqli_query($koneksi,"INSERT INTO upload (name, size, type, content, username, dates)

VALUES ('$fileName', '$fileSize', '$fileType', '$content', '$username', NOW())");

// konfirmasi

$pesanerror = " <div class='alert success alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button> <meta http-equiv='refresh' content='10000; url=../myfiles/' /><p>File <b>".$fileName."</b> telah terupload</p>

</div>"; }

?>

<div id="container-fluid"> <div><center>

<h2><img src="../images/logo.png"></h2> <div class="container-fluid">

<div class="col-md-4"></div> <div class="col-md-4">

<?php echo $pesanerror; ?> </div>

<div class="col-md-4"></div> </div>

<h2>Welcome Back, <?php echo $username; ?></h2>

<h4>Select files from your computer</h4>

<form class="form-horizontal" method="post" enctype="multipart/form-data" action=""> <div class="form-inline">

<div class="input-group">

<label class="input-group-btn"> <span class="btn btn-primary">

<input type="hidden" name="MAX_FILE_SIZE" value="2000000000000"> Browse&hellip; <input type="file" style="display: none;"

id="userfile" required name="userfile"> </span>

</label>

<input type="text" class="form-control" readonly> </div>

<button name="upload" type="submit" class="btn btn-success"> <span class="glyphicon glyphicon-floppy-disk"></span> Upload </button>

</div> </form>

</div></center> </div>

<?php

include "../footer.php"; ?>

8.tugasakhir/register/index.php

<?php

include "../headerindex.php"; ?>

(10)

<?php

include('../koneksi/koneksi.php'); if(isset($_POST['regis'])){

$pesanerror="";

$username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $email = $_POST['email']; $fullname = $_POST['fullname'];

// cek kesamaan username dan email

$cek_username=mysqli_num_rows(mysqli_query($koneksi,"SELECT username FROM user WHERE username='$username'"));

$cek_email=mysqli_num_rows(mysqli_query($koneksi,"SELECT email FROM user WHERE email='$email'"));

// cek kesamaan password if($password == $password2) {

if($cek_username > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your Username Already Exist

</div>'; }

else if($cek_email > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your E-Mail Already Exist

</div>'; }

else{

mysqli_query($koneksi,"INSERT INTO user

VALUES('idu','$username','$fullname','$password', '$email')");

$pesanerror = ' <div class="alert alert-success" role="alert" align="center">

<span class="glyphicon glyphicon-ok"></span> Register Success

</div>'; }

} else{

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no..., Your Password not Match

</div>'; }

} ?>

<div class="container-fluid">

(11)

<div class="col-md-6"> <?php echo $pesanerror; ?>

<form id="defaultForm" action="" method="post" valign="center"> <div class="form-group">

<label for="InputUsername">Username</label>

<input autofocus required name="username" type="text" id="username" placeholder="Username" class="form-control"> </div>

<div class="form-group">

<label for="InputFname">Full Name</label>

<input required name="fullname" type="text" id="fullname" placeholder="Full Name" class="form-control">

</div>

<div class="form-group">

<label for="InputEmail">E-Mail</label>

<input required name="email" type="email" id="email" placeholder="E-Mail" class="form-control">

</div>

<div class="form-group">

<label for="InputPassword">Password</label>

<input required name="password" type="password" id="password" placeholder="Password" class="form-control">

</div>

<div class="form-group">

<label for="InputCPassword">Confirm Password</label>

<input required name="password2" type="password" id="password2" placeholder="Confirm Password" class="form-control">

</div>

<input type="submit" name="regis" value="Register" class="btn btn-success">

<input type="reset" name="reset" value="Reset" class="btn btn-danger"/>

</form> </div>

<div class="col-md-6"> <div class="jumbotron"> <h3><b>Terms of Use</b></h3>

<p>By accessing this web site, you are agreeing to be bound by these web site Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this web site are protected by

applicable copyright and trade mark law.</p> </div>

</div> </div>

<script type="text/javascript"> $(document).ready(function() { $('#defaultForm')

.bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: {

(12)

username: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The username is required and can\'t be empty' },

stringLength: { min: 6,

max: 16,

message: 'The username must be more than 6 and less than 16 characters long'

},

/*remote: {

url: 'remote.php',

message: 'The username is not available' },*/

regexp: {

regexp: /^[a-zA-Z0-9]+$/,

message: 'The username can only consist of alphabetical, and number'

} } },

fullname: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The fullname is required and can\'t be empty' },

stringLength: { min: 2,

max: 50,

message: 'The username must be more than 6 and less than 16 characters long'

},

regexp: {

regexp: /^[a-zA-Z. ]+$/,

message: 'The fullname can only consist of alphabetical and dot' }

}

},

password: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

field: 'password2',

message: 'The password and its confirm are not the same' }

(13)

password2: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

field: 'password',

message: 'The password and its confirm are not the same' }

} },

email: { validators: { notEmpty: {

message: 'The email address is required and can\'t be empty' },

emailAddress: {

message: 'The input is not a valid email address' }

/*remote: {

url: 'remote.php',

message: 'The email is not available' }*/

} } } }); });

</script> </div>

<?php

include "../footer.php"; ?>

9.tugasakhir/register/index.php

<?php

include "../headerindex.php"; ?>

<?php

include('../koneksi/koneksi.php'); if(isset($_POST['regis'])){

$pesanerror="";

$username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $email = $_POST['email']; $fullname = $_POST['fullname'];

// cek kesamaan username dan email

$cek_username=mysqli_num_rows(mysqli_query($koneksi,"SELECT username FROM user WHERE username='$username'"));

(14)

$cek_email=mysqli_num_rows(mysqli_query($koneksi,"SELECT email FROM user WHERE email='$email'"));

// cek kesamaan password if($password == $password2) {

if($cek_username > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your Username Already Exist

</div>'; }

else if($cek_email > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your E-Mail Already Exist

</div>'; }

else{

mysqli_query($koneksi,"INSERT INTO user

VALUES('idu','$username','$fullname','$password', '$email')");

$pesanerror = ' <div class="alert alert-success" role="alert" align="center">

<span class="glyphicon glyphicon-ok"></span> Register Success

</div>'; }

} else{

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no..., Your Password not Match

</div>'; }

} ?>

<div class="container-fluid">

<div class="row"> <div class="col-md-6"> <?php echo $pesanerror; ?>

<form id="defaultForm" action="" method="post" valign="center"> <div class="form-group">

<label for="InputUsername">Username</label>

<input autofocus required name="username" type="text" id="username" placeholder="Username" class="form-control"> </div>

<div class="form-group">

<label for="InputFname">Full Name</label>

<input required name="fullname" type="text" id="fullname" placeholder="Full Name" class="form-control">

</div>

(15)

<label for="InputEmail">E-Mail</label>

<input required name="email" type="email" id="email" placeholder="E-Mail" class="form-control">

</div>

<div class="form-group">

<label for="InputPassword">Password</label>

<input required name="password" type="password" id="password" placeholder="Password" class="form-control">

</div>

<div class="form-group">

<label for="InputCPassword">Confirm Password</label>

<input required name="password2" type="password" id="password2" placeholder="Confirm Password" class="form-control">

</div>

<input type="submit" name="regis" value="Register" class="btn btn-success">

<input type="reset" name="reset" value="Reset" class="btn btn-danger"/>

</form> </div>

<div class="col-md-6"> <div class="jumbotron"> <h3><b>Terms of Use</b></h3>

<p>By accessing this web site, you are agreeing to be bound by these web site Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this web site are protected by

applicable copyright and trade mark law.</p> </div>

</div> </div>

<script type="text/javascript"> $(document).ready(function() { $('#defaultForm')

.bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: { username: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The username is required and can\'t be empty' },

stringLength: { min: 6,

max: 16,

message: 'The username must be more than 6 and less than 16 characters long'

},

/*remote: {

url: 'remote.php',

(16)

message: 'The username is not available' },*/

regexp: {

regexp: /^[a-zA-Z0-9]+$/,

message: 'The username can only consist of alphabetical, and number'

} } },

fullname: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The fullname is required and can\'t be empty' },

stringLength: { min: 2,

max: 50,

message: 'The username must be more than 6 and less than 16 characters long'

},

regexp: {

regexp: /^[a-zA-Z. ]+$/,

message: 'The fullname can only consist of alphabetical and dot' }

}

},

password: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

field: 'password2',

message: 'The password and its confirm are not the same' }

} },

password2: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

field: 'password',

(17)

} } },

email: { validators: { notEmpty: {

message: 'The email address is required and can\'t be empty' },

emailAddress: {

message: 'The input is not a valid email address' }

/*remote: {

url: 'remote.php',

message: 'The email is not available' }*/

} } } }); });

</script> </div>

<?php

include "../footer.php"; ?>

10.tugasakhir/register/register.php

<?php

include('../koneksi/koneksi.php');

$pesanerror="";

$username = $_POST['username']; $password = $_POST['password']; $password2 = $_POST['password2']; $email = $_POST['email']; $fullname = $_POST['fullname'];

// cek kesamaan username dan email

$cek_username=mysqli_num_rows(mysqli_query($koneksi,"SELECT username FROM user WHERE username='$username'"));

$cek_email=mysqli_num_rows(mysqli_query($koneksi,"SELECT email FROM user WHERE email='$email'"));

// cek kesamaan password if($password == $password2) {

if($cek_username > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your Username Already Exist

</div>'; }

else if($cek_email > 0){

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no... Your E-Mail Already Exist

(18)

</div>'; }

else{

mysqli_query($koneksi,"INSERT INTO user

VALUES('idu','$username','$fullname','$password', '$email')");

$pesanerror = ' <div class="alert alert-success" role="alert" align="center">

<span class="glyphicon glyphicon-ok"></span> Register Success

</div>'; }

} else{

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Oh no..., Your Password not Match

</div>'; }

?>

11.tugasakhir/myfiles/index.php

<?php

include "../headerlog.php"; ?>

<link rel="stylesheet" type="text/css"

href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.css"> <script type="text/javascript" charset="utf8"

src="//cdn.datatables.net/1.10.15/js/jquery.dataTables.js"></scrip t>

<style type="text/css"> .bs-example{

margin: 20px; }

.icon-input-btn{

display: inline-block; position: relative; }

.icon-input-btn input[type="submit"]{ padding-left: 2em;

}

.icon-input-btn .glyphicon{ display: inline-block; position: absolute; left: 0.65em;

top: 30%; }

</style>

<script type="text/javascript"> $(document).ready(function(){

$(".icon-input-btn").each(function(){

(19)

$(this).find(".glyphicon").css("top", "24%"); }

}); });

</script>

<script type="text/javascript"> $(document).ready(function(){ $('#table_id').DataTable(); });

</script>

<div class="container-fluid"> <div id="w3-container"><center>

<?php

include('../koneksi/koneksi.php');

// query untuk mencari file yang telah diupload milik si user yang sedang login

// menampilkan nama-nama file yang telah diupload si user yang sedang login

$hasil = mysqli_query($koneksi,"SELECT * FROM upload WHERE username = '$username'");

?>

<pre>My Files</pre>

<table id="table_id" class="table table-bordered"> <thead>

<tr>

<th>File</th> <th>Size</th> <th>Type</th> <th>Date</th> <th>Action</th> </tr>

</thead> <tbody> <?php

while ($data = mysqli_fetch_array($hasil)) {

?> <tr>

<td><?php echo" <a

href='download.php?id=".$data['id']."'>".$data['name']."</a> ";?></td>

<td><?php echo" ".formatBytes($data['size'])." ";?></td> <td><?php echo" ".$data['type']." ";?></td>

<td><?php echo" ".$data['dates']." ";?></td> <td><?php echo"

<span class=\"icon-input-btn\">

<span class=\"glyphicon glyphicon-download-alt\"></span> <input type=\"submit\" class=\"btn btn-success\"

value=\"Download\"

onclick=\"location.href='download.php?id=".$data['id']."';\"> </span>

<span class=\"icon-input-btn\">

(20)

<span class=\"glyphicon glyphicon-remove\"></span>

<input type=\"submit\" class=\"btn btn-danger\" value=\"Delete\" onclick=\"location.href='delete_confirm.php?id=".$data['id']."';\" ></span>

";?> </td> </tr> <?php }?> </table>

</div></center> </div>

<?php

include "../footer.php"; ?>

12.tugasakhir/myfiles/download.php

<?php

session_start();

// sisipkan cek.php untuk keamanan include('../koneksi/koneksi.php');

// membaca nilai ID file yang berasal dari link download.php?id=...

$id = $_GET['id'];

// membaca username yang sedang login melalui session $username = $_SESSION['username'];

// query untuk mencari data file yang akan didownload dalam database

$hasil = mysqli_query($koneksi,"SELECT * FROM upload WHERE id = $id");

$data = mysqli_fetch_array($hasil);

// mencocokkan username pemilik file dengan username yang sedang login

if ($username == $data['username']) {

// bila usernamenya cocok maka file boleh didownload header("Content-length: ".$data['size']);

header("Content-type: ".$data['type']); header("Content-Disposition:

attachment; filename=".$data['name']);

echo $data['content']; }

else {

// bila tidak sama maka file tidak boleh didownload echo "<h1>Acces Denied</h1>";

} ?>

13.tugasakhir/myfiles/delete.php

<?php

(21)

?>

<div id="container-fluid"> <div id="centerbar"><center>

<?php

include('../koneksi/koneksi.php');

// membaca id file yang akan dihapus $id = $_GET['id'];

// mencari username pemilik file yang akan dihapus

$hasil = mysqli_query($koneksi,"SELECT username FROM upload WHERE id = $id");

$data = mysqli_fetch_array($hasil);

// mencocokkan username pemilik file dengan username yang sedang login

if ($username == $data['username']) {

// jika cocok maka hapus file ;

mysqli_query($koneksi,"DELETE FROM upload WHERE id = $id");

header("location:../myfiles/");

} else {

// jika tidak cocok maka tolak

echo "<h1>Maaf Anda tidak berhak menghapus file ini</h1>"; }

?>

</div></center> </div>

<?php

include "../../footer.php"; ?>

14.tugasakhir/myfiles/delete_confirm.php

<?php

include "../headerlog.php"; ?>

<div id="container-fluid"> <div id="centerbar"><center>

<?php

include('../koneksi/koneksi.php');

// membaca id file yang akan dihapus $id = $_GET['id'];

// mencari username pemilik file yang akan dihapus

$hasil = mysqli_query($koneksi,"SELECT * FROM upload WHERE id = $id");

$data = mysqli_fetch_array($hasil);

// mencocokkan username pemilik file dengan username yang sedang login

echo"

(22)

<form action=\"delete.php?id=".$data['id']."\" method=\"post\"> <h1><p><span class=\"glyphicon glyphicon-alert\"></span> Delete File</h1></p>

<div class='alert alert-danger alert-dismissible fade in' role='alert'>

<p class=\"text-center\">

Do you want <b>".$data['name']."</b> to be deleted from this wesbsite ?

</p> </div>

<input name=\"ya\" type=\"submit\" value=\"Yes\"> </form>

<form action=\"../myfiles/\" >

<input type=\"submit\" value=\"No\"> </form>";

?>

</div></center> </div>

<?php

include "../footer.php"; ?>

15.tugasakhir/lostpassword/index.php

<?php

include "../headerindex.php"; ?>

<?php

if(isset($_POST['lost'])){

include('../koneksi/koneksi.php');

$email = $_POST['email'];

function randomPassword() {

// function untuk membuat password random 6 digit karakter

$digit = 12; $karakter =

"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

srand((double)microtime()*1000000); $i = 0;

$pass = "";

while ($i <= $digit-1) {

$num = rand() % 76;

$tmp = substr($karakter,$num,1); $pass = $pass.$tmp;

$i++; }

return $pass; }

// membuat password baru secara random -> memanggil function randomPassword

(23)

// mengenkripsi password dengan md5() dan pengacak $newPasswordEnkrip = ($newPassword);

// mencari alamat email si user

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE email = '$email'");

$data = mysqli_fetch_array($hasil); $alamatEmail = $data['email'];

// title atau subject email $title = "New Password";

// isi pesan email disertai password

$pesan = "Username Anda : ".$data['username'].". \nPassword Anda yang baru adalah :".$newPassword;

// header email berisi alamat pengirim $header = "From: admin@updo.wc.lt";

// mengirim email

$kirimEmail = mail($alamatEmail, $title, $pesan, $header);

// cek status pengiriman email if ($kirimEmail) {

// update password baru ke database (jika pengiriman email sukses) $hasil = mysqli_query($koneksi,"UPDATE user SET password =

'$newPasswordEnkrip' WHERE email = '$email'");

if ($hasil)

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-ok"></span> Reset Password Succes, Check Your Email! </div>';

}

$pesanerror = '<div class="alert alert-danger" role="alert" align="center">

<span class="glyphicon glyphicon-warning-sign"></span> Reset Password Fail!

</div>'; }

?>

<div class="container-fluid">

<div class="row"> <div class="col-md-6">

<div class="alert alert-info" role="alert" align="center"> <span class="glyphicon glyphicon-info-sign"></span>

website ini masih dalam perkembangan, bila terjadi bug/error dsb. harap maklum

</div>

<?php echo $pesanerror; ?>

<form action="" method="post" id="defaultForm">

(24)

<div class="form-group">

<input autofocus required name="email" type="email" class="form-control" placeholder="E-Mail">

</div>

<input type="submit" name="lost" value="Send!" class="btn btn-success">

<div class="checkbox"> <p class="pull-right">

<a href="../">Have Account?</a> or <a href="../register">Didn't have account?</a>

</p> </div>

</form> </div>

<div class="col-md-6"> <div class="jumbotron">

<h3><b>Forgot Password</b></h3>

<p>When you fill in your registered E-Mail, We will be sent new password to your email.</p>

</div> </div> </div>

<script type="text/javascript"> $(document).ready(function() { $('#defaultForm')

.bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: { email: { validators: { notEmpty: {

message: 'The email address is required and can\'t be empty' },

emailAddress: {

message: 'The input is not a valid email address' }

/*remote: {

url: 'remote.php',

message: 'The email is not available' }*/

} } } }); });

</script>

</div>

(25)

include "../footer.php"; ?>

16.tugasakhir/lostpassword/lostpassword_sent.php

<?php

include "../headerindex.php"; ?>

<div class="container-fluid">

<div class="row"> <div class="col-md-6">

<div class="alert alert-success" role="alert">

<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> website ini masih dalam perkembangan, bila terjadi bug/error dsb. harap maklum

</div> <?php

include('../koneksi/koneksi.php');

$email = $_POST['email'];

function randomPassword() {

// function untuk membuat password random 6 digit karakter

$digit = 12; $karakter =

"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

srand((double)microtime()*1000000); $i = 0;

$pass = "";

while ($i <= $digit-1) {

$num = rand() % 76;

$tmp = substr($karakter,$num,1); $pass = $pass.$tmp;

$i++; }

return $pass; }

// membuat password baru secara random -> memanggil function randomPassword

$newPassword = randomPassword();

// mengenkripsi password dengan md5() dan pengacak $newPasswordEnkrip = ($newPassword);

// mencari alamat email si user

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE email = '$email'");

$data = mysqli_fetch_array($hasil); $alamatEmail = $data['email'];

// title atau subject email $title = "New Password";

(26)

// isi pesan email disertai password

$pesan = "Username Anda : ".$data['username'].". \nPassword Anda yang baru adalah :".$newPassword;

// header email berisi alamat pengirim $header = "From: admin@updo.wc.lt";

// mengirim email

$kirimEmail = mail($alamatEmail, $title, $pesan, $header);

// cek status pengiriman email if ($kirimEmail) {

// update password baru ke database (jika pengiriman email sukses) $hasil = mysqli_query($koneksi,"UPDATE user SET password =

'$newPasswordEnkrip' WHERE email = '$email'");

if ($hasil) echo "<div class='alert success alert-dismissible fade in' role='alert'>

<div class=\"panel-body\" align=\"center\">

Pengiriman Password Berhasil <span class=\"glyphicon glyphicon-remove\"></span>

<br>

<a href=\"../\" class=\"btn btn-danger\">Go To Login/a></div>"; }

else echo "<div class='alert alert-danger alert-dismissible fade in' role='alert'>

<div class=\"panel-body\" align=\"center\">

Pengiriman Password Gagal <span class=\"glyphicon glyphicon-remove\"></span>

<br>

<a href=\"../lostpassword\" class=\"btn btn-danger\">Back To Reset Password</a></div>";

?> </div> </div>

<div class="col-md-6"> <div class="jumbotron">

<h3><b>Forgot Password</b></h3>

<p>When you fill in your registered E-Mail, We will be sent new password to your email.</p>

</div> </div> </div> </div>

<?php

include "../footer.php"; ?>

17.tugasakhir/logout/index.php

<meta http-equiv="refresh" content="1; url=../" /> <?php

include "../headerlog.php"; ?>

(27)

</div>

<div id="container">

<div id="centerbar"><center> <?php

// menghapus session session_destroy();

echo "<h2>Thank You, Good Bye</h2>"; ?>

</div></center> </div>

<?php

include "../footer.php"; ?>

18.tugasakhir/koneksi/koneksi.php

<?php

$koneksi = mysqli_connect("localhost","root","","tugasakhir");

function formatBytes($bytes, $precision = 2) { $units = array('B', 'KB', 'MB', 'GB', 'TB');

$bytes = max($bytes, 0);

$pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1);

$bytes /= pow(1024, $pow);

return round($bytes, $precision) . ' ' . $units[$pow]; }

?>

19.tugasakhir/changeprofile/index.php

<?php

include "../headerlog.php"; ?>

<!-- VALIDATOR --> <link rel="stylesheet"

href="../css/dist/css/bootstrapValidator.css"/>

<script type="text/javascript" src="../css/vendor/jquery/jquery-1.10.2.min.js"></script>

<script type="text/javascript"

src="../css/dist/js/bootstrapValidator.js"></script> <!-- VALIDATOR -->

<div id="container-fluid"> <div id="centerbar"><center>

<?php

$pesanerror="";

include_once("../koneksi/koneksi.php");

$username = $_SESSION['username']; if(isset($_POST['profilechange'])){

(28)

// membaca nama user yang tersimpan dalam session $password = $_POST['password'];

$fullname = $_POST['fullname']; $email = $_POST['email'];

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE username = '$username'");

$data = mysqli_fetch_array($hasil);

if ($data['password'] == ($password)) {

$hasil = mysqli_query($koneksi,"UPDATE user SET fullname ='$fullname', email='$email' WHERE username = '$username' "); if ($hasil){

$pesanerror = " <div class='alert success alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><span class=\"glyphicon glyphicon-ok\"></span>

Edit Profile Succes </div>";

}

} else{

$pesanerror = " <div class='alert alert-danger alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><span class='glyphicon glyphicon-warning-sign'></span>

Incorrect Password </div>";

} }

?>

<?php

// cek benar tidaknya password yang lama

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE username = '$username'");

$data = mysqli_fetch_array($hasil); echo "

<h1>Edit Profile</h1> <br>

<div class='container-fluid'> <div class='col-md-4'></div> <div class='col-md-4'>

$pesanerror </div>

<div class='col-md-4'></div> </div>

<div class='col-md-2 col-md-offset-5'> <form id='defaultForm' method='post'>

(29)

<label for='InputUsername'>Username</label>

<input type='text' name='username' value='$username' disabled class='form-control'>

</div>

<div class='form-group'>

<label for='InputFullname'>Fullname</label>

<input type='text' required name='fullname' placeholder='Fullname' value='".$data['fullname']."' class='form-control'>

</div>

<div class='form-group'>

<label for='InputEmail'>E-Mail</label>

<input type='email' required name='email' placeholder='E-Mail' value='".$data['email']."' class='form-control'>

</div> "; ?>

<div class='form-group'>

<label for='InputUsername'>Current Password</label>

<input type="password" required name="password" id="password" placeholder="Password" class='form-control'>

</div>

<input type="submit" name="profilechange" value="Submit" ></td></tr>

</form>

<script type="text/javascript"> $(document).ready(function() { $('#defaultForm')

.bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: { fullname: {

message: 'The username is not valid', validators: {

notEmpty: {

message: 'The fullname is required and can\'t be empty' },

stringLength: { min: 2,

max: 50,

message: 'The username must be more than 2 and less than 50 characters long'

},

regexp: {

regexp: /^[a-zA-Z. ]+$/,

message: 'The fullname can only consist of alphabetical' }

}

},

password: { validators: { notEmpty: {

(30)

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

} } },

email: { validators: { notEmpty: {

message: 'The email address is required and can\'t be empty' },

emailAddress: {

message: 'The input is not a valid email address' }

/*remote: {

url: 'remote.php',

message: 'The email is not available' }*/

} } } }); });

</script>

</div></center> </div>

<?php

include "../footer.php"; ?>

20.tugasakhir/changepassword/index.php

<?php

include "../headerlog.php"; ?>

<!-- VALIDATOR --> <link rel="stylesheet"

href="../css/dist/css/bootstrapValidator.css"/>

<script type="text/javascript" src="../css/vendor/jquery/jquery-1.10.2.min.js"></script>

<script type="text/javascript"

src="../css/dist/js/bootstrapValidator.js"></script> <!-- VALIDATOR -->

<div id="container-fluid"> <center>

<div id="centerbar">

<?php

$pesanerror="";

include_once("../koneksi/koneksi.php");

// membaca nama user yang tersimpan dalam session $username = $_SESSION['username'];

(31)

$password = $_POST['passwordold']; $passwordbaru1 = $_POST['password1']; $passwordbaru2 = $_POST['password2'];

// cek benar tidaknya password yang lama

$hasil = mysqli_query($koneksi,"SELECT * FROM user WHERE username = '$username'");

$data = mysqli_fetch_array($hasil);

if ($data['password'] == ($password)) {

// jika password lama benar, maka cek kesesuaian password baru 1 dan 2

if ($passwordbaru1 == $passwordbaru2) {

// jika password baru 1 dan 2 sama, maka proses update password dilakukan

$passwordbaruenkrips = ($passwordbaru1);

$hasil = mysqli_query($koneksi,"UPDATE user SET password = '$passwordbaruenkrips' WHERE username = '$username' "); if($hasil)

{

$pesanerror = "<div class='alert alert-success alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'>

<span aria-hidden='true'>×</span></button><span class=\"glyphicon glyphicon-ok\"></span>

Update Password Succes </div>";

} } else {

$pesanerror = "<div class='alert alert-danger alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'>

<span aria-hidden='true'>×</span></button><span class='glyphicon glyphicon-warning-sign'></span>

Your Password Doesn't Match </div>";

} } else {

$pesanerror = " <div class='alert alert-danger alert-dismissible fade in' role='alert'>

<button type='button' class='close' data-dismiss='alert' aria-label='Close'>

<span aria-hidden='true'>×</span></button><span class='glyphicon glyphicon-warning-sign'></span>

Your Old Password Is Incorrect </div>";

} } ?>

<h1 align="center">Change Password</h1>

(32)

<div class="container-fluid"> <div class="col-md-4"></div> <div class="col-md-4">

<?php echo $pesanerror; ?> </div>

<div class="col-md-4"></div> </div>

<br>

<div class="col-md-2 col-md-offset-5">

<form id="defaultForm" method="post" valign="center"> <div class="form-group">

<label for="InputCurrentPassword">Current Password</label>

<input required name="passwordold" type="password" id="password" placeholder="Old Password" class="form-control">

</div>

<div class="form-group">

<label for="InputPassword">Password</label>

<input required name="password1" type="password" id="password1" placeholder="New Password" class="form-control">

</div>

<div class="form-group">

<label for="InputCPassword">Confirm Password</label>

<input required name="password2" type="password" id="password2" placeholder="Confirm Password" class="form-control">

</div>

<input type="submit" name="regis" value="Submit"> </form>

<script type="text/javascript"> $(document).ready(function() { $('#defaultForm')

.bootstrapValidator({

message: 'This value is not valid', //live: 'submitted',

feedbackIcons: {

valid: 'glyphicon glyphicon-ok',

invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' },

fields: { passwordold: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

} } },

password1: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

(33)

min: 6, max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

1field: 'password2',

message: 'The password and its confirm are not the same' }

} },

password2: { validators: { notEmpty: {

message: 'The password is required and can\'t be empty' },

stringLength: { min: 6,

max: 12,

message: 'The password must be more than 6 and less than 30 characters long'

},

identical: {

field: 'password1',

message: 'The password and its confirm are not the same' }

} },

} }); });

</script> </div> </div> </center>

<?php

include "../footer.php"; ?>

(34)
(35)
(36)
(37)
(38)

Referensi

Dokumen terkait

Hasil-hasil penelitian pada beberapa tahun terakhir menunjukkan bahwa faktor psikologi individu seperti sifat kepribadian merupakan salah satu variabel penting yang

Berdasarkan latar belakang yang telah dijelaskan diatas mengenai obat golongan β 2 -agonis maka, diperlukan perhatian khusus dalam menggunakan obat tersebut mulai

Sebagaimana fungsi manajemen Henry Fayol, maka suatu organisasi harus melakukan rancangan terhadap kegiatan yang dilakukan, memerintah memberi arahan kepada karyawan

Grebeg Kendalisodo dalam perkembangan tahun berikutnya hingga saat ini bertambah dengan diadakanya jamasan pusaka serta diaraknya hasil pertanian dan perkebunan atau

Dari adegan konflik tersebut, penulis akan meneliti perubahan kepribadian tokoh utama dengan menggunakan 3 unsur kepribadian, yaitu id , ego , dan superego. Langkah awal dalam

Pendapat lain ialah menurut Polking (Sumarmo, 2011) yang mengemukakan bahwa disposisi matematik meliputi sikap atau sifat: 1) Rasa percaya diri dalam menerapkan

Jenis gulma yang mempunyai nilai NJD terbesar berarti gulma tersebut merupakan gulma dominan. c) Bobot kering gulma per spesies, pengamatan dilakukan pada saat