Commit 6e7a980e by Dany Panegratia

Proyek

parent 73a10147
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'functions.php';
$id = $_GET["id"];
$mhs = query("SELECT * FROM keluhan WHERE id_keluhan= $id")[0];
$nama = $mhs["gambar1"];
$nama2 = $mhs["gambar2"];
$gambar = "imgKeluhan/$nama";
$gambar2 = "imgKeluhan/$nama2";
if (file_exists($gambar)) {
unlink($gambar); // Delete now
}
$aa = file_exists($gambar);
if (file_exists($gambar2)) {
unlink($gambar2); // Delete now
}
$aa2 = file_exists($gambar2);
if (hapuskeluhan($id) > 0) {
echo "
<script>
alert('data berhasil dihapus!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>
";
} else {
echo "
<script>
alert('data gagal dihapus!!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>
";
}
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'functions.php';
$id = $_GET["id"];
$mhs = query("SELECT * FROM kontak WHERE id= $id")[0];
if (hapusPesanMasuk($id) > 0) {
echo "
<script>
alert('data berhasil dihapus!');
document.location.href = 'Admin_PesanMasuk.php';
</script>
";
} else {
echo "
<script>
alert('data gagal dihapus!!');
document.location.href = 'Admin_PesanMasuk.php';
</script>
";
}
<?php
session_start();
$level = $_SESSION["level"] == 'admin';
if (!$level) {
header("Location: index.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
$akun = query("SELECT * FROM user");
// tombol cari ditekan
if (isset($_POST["cari"])) {
$akun = cari($_POST["keyword"]);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kelola Akun</title>
<style>
.loader {
width: 100px;
position: absolute;
top: 120px;
left: 400px;
z-index: -1;
display: none;
}
.iii {
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<h1>Daftar Akun</h1>
<div class="container">
<form action="" method="POST">
<div class="input-group flex-nowrap">
<div class="input-group-prepend">
<span class="input-group-text" id="addon-wrapping">Search</span>
</div>
<input type="text" class="form-control" placeholder="Nama / Username" aria-label="Username" aria-describedby="addon-wrapping" autocomplete="off" id="keyword" name="keyword" autofocus>
<button type="submit" name="cari" id="tombol-cari">Cari</button>
</div>
</form>
<div id="container">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Aksi</th>
<th scope="col">Photo</th>
<th scope="col">Nama</th>
<th scope="col">Alamat</th>
<th scope="col">NIM</th>
<th scope="col">Tempat/Tanggal Lahir</th>
<th scope="col">Jenis Kelamin</th>
<th scope="col">No. Telepon</th>
<th scope="col">Email</th>
<th scope="col">Pekerjaan</th>
<th scope="col">Username</th>
<th scope="col">Password</th>
</tr>
</thead>
<tbody>
<tr>
<?php $i = 1 ?>
<?php foreach ($akun as $row) : ?>
<td><?php echo $i; ?></td>
<td>
<?php $level = $row["level"] == 'admin';
if (!$level) : ?>
<a href="Admin_UbahAkunUser.php?id=<?php echo $row["id"] ?>">ubah</a>
<a href="hapus.php?id=<?php echo $row["id"] ?>" onclick="return confirm('yakin?');">hapus</a>
<?php endif; ?>
</td>
<td>
<?php $level = $row["level"] == 'admin';
if (!$level) : ?>
<img class="iii" src="img/<?php echo $row["gambar"] ?>">
<?php endif; ?>
</td>
<td><?= $row["nama"]; ?></td>
<td><?= $row["alamat"]; ?></td>
<td><?= $row["nim"]; ?></td>
<td><?= $row["TTL"]; ?></td>
<td><?= $row["jenis"]; ?></td>
<td><?= $row["telepon"]; ?></td>
<td><?= $row["email"]; ?></td>
<td><?= $row["pekerjaan"]; ?></td>
<td><?= $row["username"]; ?></td>
<td>***********</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div>
<center>
<a href="pdf.php" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Cetak?</a>
</div>
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/script.js"></script>
<?php
require_once(dirname(__FILE__) . '\footer.php');
?>
</body>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'header.php';
?>
<?php
// paginition
// konfigurasi
$jumlahDataPerHalaman = 5;
$jumlahData = count(query("SELECT * FROM keluhan"));
$jumlahHalaman = ceil($jumlahData / $jumlahDataPerHalaman);
if (isset($_GET["halaman"])) {
$halamanAktif = $_GET["halaman"];
} else {
$halamanAktif = 1;
}
$awalData = ($jumlahDataPerHalaman * $halamanAktif) - $jumlahDataPerHalaman;
$mhs = query("SELECT * FROM keluhan order by status LIMIT $awalData, $jumlahDataPerHalaman");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daftar keluhan</title>
</head>
<body>
<div class="container">
<!-- navigasi -->
<center>
<?php if ($halamanAktif > 1) : ?>
<a href="?halaman=<?= $halamanAktif - 1; ?>">&laquo;</a>
<?php endif; ?>
<?php
for ($i = 1; $i <= $jumlahHalaman; $i++) : ?>
<?php if ($i == $halamanAktif) : ?>
<a href="?halaman=<?php echo $i; ?>" style="font-weight: bold; color: red;"><?= $i; ?></a>
<?php else : ?>
<a href="?halaman=<?php echo $i; ?>"><?= $i; ?></a>
<?php endif; ?>
<?php endfor; ?>
<?php if ($halamanAktif < $jumlahHalaman) : ?>
<a href="?halaman=<?= $halamanAktif + 1; ?>">&raquo;</a>
<?php endif; ?>
</center>
<br>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Kategori</th>
<th scope="col">Username</th>
<th scope="col">Subjek</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
<th scope="col">Aksi</th>
</tr>
</thead>
<tbody>
<tr>
<?php $i = 1 ?>
<?php foreach ($mhs as $row) : ?>
<?php
$coba = $row['id_jenis'];
$cobalagi = query("SELECT * FROM jeniskeluhan WHERE id_jenis = $coba");
?>
<td><?php echo $i; ?></td>
<td>
<?php foreach ($cobalagi as $row33) : ?>
<?= $row33["jenis"]; ?>
<?php endforeach; ?>
</td>
<?php
$coba22 = $row['id_user'];
$cobalagi22 = query("SELECT * FROM user WHERE id = $coba22");
?>
<td>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["username"]; ?>
<?php endforeach; ?>
</td>
<td>
<a href="Admin_MenjawabKeluhan.php?id_keluhan=<?php echo $row["id_keluhan"] ?>" class="tulisan"><?= $row["subjek"]; ?></a>
</td>
<td>
<?= $row["tanggal"]; ?>
</td>
<td>
<?php
$status = $row["status"] == "sudah";
?>
<?php if ($status) : ?>
<button type="button" class="btn btn-outline-success">ANSWERED</button>
<?php endif; ?>
<?php if (!$status) : ?>
<button type="button" class="btn btn-outline-danger">WAIT</button>
<?php endif; ?>
</td>
<td>
<?php
$status = $row["status"] == "sudah";
?>
<?php if ($status) : ?>
<a href="Admin_UbahJawaban.php?id_keluhan=<?php echo $row["id_keluhan"] ?>">ubah</a> |
<a href="Admin_HapusKeluhan.php?id=<?php echo $row["id_keluhan"] ?>" onclick="return confirm('yakin?');">hapus</a>
<?php endif; ?>
<?php if (!$status) : ?>
<a href="Admin_HapusKeluhan.php?id=<?php echo $row["id_keluhan"] ?>" onclick="return confirm('yakin?');">hapus</a>
<?php endif; ?>
</td>
<?php
?>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM kontak WHERE id = $id")[0];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ccc {
float: right;
}
.atas {
background-color: red;
color: white;
height: 50px;
}
.aaaa {
background-color: red;
color: white;
height: 30px;
}
</style>
</head>
<body>
<div class="container-sm">
<form action="" method="" enctype="">
<!-- membuat pilihan keluhan -->
<div class="atas1">
From : <?= $mhs['nama']; ?> |
Email : <?= $mhs["email"]; ?>
</div>
<div class="atas">
<h1><a style="float: left; margin-left:10px; "><?= $mhs["subjek"] ?></a></h1>
</div>
<div class="tengah">
<a style="color: red"><b>: <?= $mhs["tanggal"]; ?>
</div>
<div class="hampir_isi">
<hr>
</div>
<div class="isi">
<textarea class="form-control" id="keluhan" name="keluhan" required cols="40" rows="20" readonly><?= $mhs["pesan"]; ?></textarea>
</div>
<div>
<br>
<a href="Admin_HapusPesan.php?id=<?php echo $mhs["id"] ?>" class="btn btn-danger btn-lg active" role="button" aria-pressed="true" style="float : right; margin-right: 20px;" onclick="return confirm('yakin?');">Hapus</a>
<br>
<br>
</div>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id_keluhan"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM keluhan WHERE id_keluhan= $id")[0];
date_default_timezone_set('Asia/Jakarta');
$tanggal = date("l, d-m-Y h:i:s:a");
// cek apakah tombol subit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (tambahjawaban($_POST) > 0) {
echo "
<script>
alert('Jawaban berhasil dikirimkan!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>
";
} else {
echo "<script>
alert('Gagal Mengirimkan Jawaban!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ccc {
float: right;
}
.atas {
background-color: red;
color: white;
height: 50px;
}
.aaaa {
background-color: red;
color: white;
height: 30px;
}
</style>
</head>
<body>
<div class="container-sm">
<form action="" method="" enctype="">
<!-- membuat pilihan keluhan -->
<div class="atas1">
From : <?php
$coba22 = $mhs['id_user'];
$cobalagi22 = query("SELECT * FROM user WHERE id = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["nama"]; ?>
<?php endforeach; ?> |
Username : <?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["username"]; ?>
<?php endforeach; ?><br>
</div>
<div class="atas">
<h1><a style="float: left; margin-left:10px; "><?= $mhs["subjek"] ?></a></h1>
</div>
<div class="tengah">
<?php
$coba = $mhs['id_jenis'];
$cobalagi = query("SELECT * FROM jeniskeluhan WHERE id_jenis = $coba")[0];
?>
<a style="color: red"><b><?= $cobalagi['jenis']; ?></b></a> | <?= $mhs["tanggal"]; ?>
</div>
<div class="hampir_isi">
<hr>
</div>
<div class="isi">
<textarea class="form-control" id="keluhan" name="keluhan" required cols="40" rows="20" readonly><?= $mhs["keluhan"]; ?></textarea>
</div>
<div class="gambar">
<?php
$gambar = $mhs['gambar1'] && $mhs['gambar2'] > 1;
if ($gambar) : ?>
<br>
<div class="container">
<div class="form-group row">
<img src="imgKeluhan/<?= $mhs['gambar1']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px; ">
<img src="imgKeluhan/<?= $mhs['gambar2']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px; ">
</div>
<br>
</div>
<?php endif; ?>
</div>
<div class="hampir_bawah">
<hr>
</div>
<div class="aaaa">
<?php $status = $mhs["status"] == "sudah"; ?>
<?php if (!$status) : ?>
<h6><b><a style="float: left; margin-left:10px; ">Silahkan berikan respon anda terhadap keluhan :</a></b></h6><br>
<?php endif; ?>
<?php if ($status) : ?>
<h6><b><a style="float: left; margin-left:10px; ">Jawaban yang anda berikan :</a></b></h6><br>
<?php endif; ?>
</div>
<div>
To :
<?php
$coba22 = $mhs['id_user'];
$cobalagi22 = query("SELECT * FROM user WHERE id = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["nama"]; ?>
<?php endforeach; ?> |
Username : <?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["username"]; ?>
<?php endforeach; ?><br>
</div>
<div>
<div class="tengah">
<?php
$coba22 = $mhs['id_keluhan'];
$cobalagi22 = query("SELECT * FROM jawaban WHERE id_keluhan = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["tanggal_jawaban"]; ?>
<?php endforeach; ?>
</div>
</div>
<div class="hampir_bawah">
<hr>
</div>
</form>
<?php if ($status) : ?>
<form action="" method="" enctype="">
<input type="hidden" name="id_keluhan" value="<?= $mhs["id_keluhan"]; ?>">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<input type="hidden" name="status" value="sudah">
<div class="jawaban">
<?php
$coba22 = $mhs['id_keluhan'];
$cobalagi22 = query("SELECT * FROM jawaban WHERE id_keluhan = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<textarea class="form-control" id="jawaban" name="jawaban" required cols="40" rows="20" readonly><?= $row22["jawaban"]; ?></textarea>
<?php endforeach; ?>
</div>
<div>
Terima kasih telah menghubungi kami, semoga sukses selalu.<br><br>
* Keluhan masuk yang sudah kami balas, tidak akan bisa kamu balas lagi.<br>
* Untuk kelanjutan permasalahan kamu, silahkan kirimkan keluhan baru.<br><br>
Salam Hangat~ ^^
</div>
<div>
<a href="Admin_UbahJawaban.php?id_keluhan=<?php echo $mhs["id_keluhan"] ?>" class="btn btn-warning btn-lg active" role="button" aria-pressed="true" style="float : right; margin-right: 20px;">Ubah</a>
<a href="hapuskeluhan.php?id=<?php echo $mhs["id_keluhan"] ?>" class="btn btn-danger btn-lg active" role="button" aria-pressed="true" style="float : right; margin-right: 20px;" onclick="return confirm('yakin?');">Hapus</a>
<br>
<br>
</div>
<?php endif; ?>
<?php if (!$status) : ?>
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id_keluhan" value="<?= $mhs["id_keluhan"]; ?>">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<input type="hidden" name="status" value="sudah">
<div class="jawaban">
<textarea class="form-control" id="jawaban" name="jawaban" required cols="40" rows="20" autofocus required></textarea>
</div>
<div>
Terima kasih telah menghubungi kami, semoga sukses selalu.<br><br>
* Keluhan masuk yang sudah kami balas, tidak akan bisa kamu balas lagi.<br>
* Untuk kelanjutan permasalahan kamu, silahkan kirimkan keluhan baru.<br><br>
Salam Hangat~ ^^
</div>
<div class="form-group row">
<div class="col-sm">
<button type="submit" class="btn btn-primary ccc" name="submit">Kirim</button>
</div>
</div>
</form>
<?php endif; ?>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'header.php';
$mhs = query("SELECT * FROM kontak");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daftar Pesan</title>
</head>
<body>
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Nama</th>
<th scope="col">Email</th>
<th scope="col">Subjek</th>
<th scope="col">Tanggal</th>
<th scope="col">Aksi</th>
</tr>
</thead>
<tbody>
<tr>
<?php $i = 1 ?>
<?php foreach ($mhs as $row) : ?>
<td><?php echo $i; ?></td>
<td>
<?= $row["nama"]; ?>
</td>
<td>
<?= $row["email"]; ?>
</td>
<td>
<a href="Admin_MenampilkanPesan.php?id=<?php echo $row["id"] ?>" class="tulisan"><?= $row["subjek"]; ?></a>
</td>
<td>
<?= $row["tanggal"]; ?>
</td>
<td>
<a href="Admin_HapusPesan.php?id=<?php echo $row["id"] ?>" onclick="return confirm('yakin?');">hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM user WHERE id= $id")[0];
// cek apakah tombol subit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (ubah($_POST) > 0) {
echo "
<script>
alert('data berhasil diubah!');
document.location.href = 'Admin_KelolaAkun.php';
</script>
";
} else {
echo "<script>
alert('data gagal diubah!');
document.location.href = 'Admin_KelolaAkun.php';
</script>";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- CSS yang saya tambahkan -->
<link rel="stylesheet" href="css/style.css">
<title>ubah data akun</title>
<style>
button {
margin-top: 20px;
margin-bottom: 20px;
}
input {
margin-left: 20px;
width: 350px;
margin-top: 10px;
}
.haha {
margin-left: -150px;
}
.nnn {
width: 250px;
}
</style>
</head>
<body>
<h2>
<center>Ubah Data User</center>
</h2>
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?= $mhs["id"]; ?>">
<input type="hidden" name="gambarLama" value="<?= $mhs["gambar"]; ?>">
<div class="container">
<div class="form-group row">
<label for="nama" class="col-sm-2 col-form-label">Nama Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nama" id="nama" required value="<?php echo $mhs["nama"] ?>">
</div>
</div>
<div class="form-group row">
<label for="alamat" class="col-sm-2 col-form-label">Alamat Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="alamat" id="alamat" required value="<?php echo $mhs["alamat"] ?>">
</div>
</div>
<div class="form-group row">
<label for="nim" class="col-sm-2 col-form-label">NIM</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nim" id="nim" required value="<?php echo $mhs["nim"] ?>">
</div>
</div>
<div class="form-group row">
<label for="lahir" class="col-sm-2 col-form-label">Tempat/Tanggal Lahir</label>
<div class="col-sm-10">
<input type="text" class="nnn" name="tempat" id="tempat" placeholder="Tempat..." required value="<?php echo $mhs["TTL"] ?>">
</div>
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">Jenis Kelamin</legend>
<div class="col-sm-10">
<?php
if ($mhs["jenis"] == 'L') : ?>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="L" checked>
<label class="form-check-label" for="gridRadios1">
Laki-laki
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="P">
<label class="form-check-label" for="gridRadios2">
Perempuan
</label>
</div>
<?php endif; ?>
<?php if ($mhs["jenis"] == 'P') : ?>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="L">
<label class="form-check-label" for="gridRadios1">
Laki-laki
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="P" checked>
<label class="form-check-label" for="gridRadios2">
Perempuan
</label>
</div>
<?php endif; ?>
</div>
</div>
</fieldset>
<div class="form-group row">
<label for="telepon" class="col-sm-2 col-form-label">No. Telepon</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="telepon" id="telepon" required value="<?php echo $mhs["telepon"] ?>">
</div>
</div>
<div class="form-group row">
<label for="email" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" name="email" id="email" required value="<?php echo $mhs["email"] ?>">
</div>
</div>
<div class="form-group row">
<label for="kerja" class="col-sm-2 col-form-label">Pekerjaan</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="kerja" id="kerja" required value="<?php echo $mhs["pekerjaan"] ?>">
</div>
</div>
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="username" id="username" required value="<?php echo $mhs["username"] ?>">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="password" id="password" required value="*******">
</div>
</div>
<div class="form-group">
<label for="gambar">Foto </label>
<div class="col-sm-10">
<img src="img/<?= $mhs['gambar']; ?>" width="100"><br>
<input type="file" name="gambar" id="gambar">
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<center>
<button type="submit" class="btn btn-primary" name="submit">Update</button>
</center>
</div>
</div>
</div>
</form>
<?php
require_once(dirname(__FILE__) . '\footer.php');
?>
</body>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id_keluhan"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM keluhan WHERE id_keluhan= $id")[0];
date_default_timezone_set('Asia/Jakarta');
$tanggal = date("l, d-m-Y h:i:s:a");
// cek apakah tombol subit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (ubahjawabanAdmin($_POST) > 0) {
echo "
<script>
alert('Jawaban berhasil diubah!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>
";
} else {
echo "<script>
alert('Gagal mengubah Jawaban!');
document.location.href = 'Admin_KeluhanMasuk.php';
</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ccc {
float: right;
}
.atas {
background-color: red;
color: white;
height: 50px;
}
.aaaa {
background-color: red;
color: white;
height: 30px;
}
</style>
</head>
<body>
<div class="container">
<form action="" method="" enctype="">
<!-- membuat pilihan keluhan -->
<div class="atas1">
From : <?php
$coba22 = $mhs['id_user'];
$cobalagi22 = query("SELECT * FROM user WHERE id = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["nama"]; ?>
<?php endforeach; ?> |
Username : <?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["username"]; ?>
<?php endforeach; ?><br>
</div>
<div class="atas">
<h1><a style="float: left; margin-left:10px; "><?= $mhs["subjek"] ?></a></h1>
</div>
<div class="tengah">
<?php
$coba = $mhs['id_jenis'];
$cobalagi = query("SELECT * FROM jeniskeluhan WHERE id_jenis = $coba")[0];
?>
<a style="color: red"><b><?= $cobalagi['jenis']; ?></b></a> | <?= $mhs["tanggal"]; ?>
</div>
<div class="hampir_isi">
<hr>
</div>
<div class="isi">
<textarea class="form-control" id="keluhan" name="keluhan" required cols="40" rows="20" readonly><?= $mhs["keluhan"]; ?></textarea>
</div>
<div class="gambar">
<?php
// $gambar = $mhs['gambar1'] && $mhs['gambar2'] > 1;
$gambar2 = $mhs['gambar1'] > 1;
$gambar3 = $mhs['gambar2'] > 1;
?>
<div class="container">
<div class="form-group row">
<?php if ($gambar2) : ?>
<img src="imgKeluhan/<?= $mhs['gambar1']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px;">
<?php endif; ?>
<?php if ($gambar3) : ?>
<img src="imgKeluhan/<?= $mhs['gambar2']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px;">
</div>
<br>
</div>
<?php endif; ?>
</div>
<div class="hampir_bawah">
<hr>
</div>
<div class="aaaa">
<?php $status = $mhs["status"] == "sudah"; ?>
<?php if (!$status) : ?>
<h6><b><a style="float: left; margin-left:10px; ">Silahkan berikan respon anda terhadap keluhan :</a></b></h6><br>
<?php endif; ?>
<?php if ($status) : ?>
<h6><b><a style="float: left; margin-left:10px; ">Jawaban yang anda berikan :</a></b></h6><br>
<?php endif; ?>
</div>
<div>
To :
<?php
$coba22 = $mhs['id_user'];
$cobalagi22 = query("SELECT * FROM user WHERE id = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["nama"]; ?>
<?php endforeach; ?> |
Username : <?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["username"]; ?>
<?php endforeach; ?><br>
</div>
<div>
<div class="tengah">
<?php
$coba22 = $mhs['id_keluhan'];
$cobalagi22 = query("SELECT * FROM jawaban WHERE id_keluhan = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<?= $row22["tanggal_jawaban"]; ?>
<?php endforeach; ?>
</div>
</div>
<div class="hampir_bawah">
<hr>
</div>
</form>
<?php if ($status) : ?>
<form action="" method="POST">
<input type="hidden" name="id_keluhan" value="<?= $mhs["id_keluhan"]; ?>">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<?php
$coba22 = $mhs['id_keluhan'];
$cobalagi22 = query("SELECT * FROM jawaban WHERE id_keluhan = $coba22");
?>
<?php foreach ($cobalagi22 as $row22) : ?>
<textarea class="form-control" id="jawaban" name="jawaban" required cols="40" rows="20" autofocus><?= $row22["jawaban"]; ?></textarea>
<input type="hidden" name="id_jawaban" value="<?= $row22["id_jawaban"]; ?>">
<?php endforeach; ?>
</div>
<div class="container">
<div>
Terima kasih telah menghubungi kami, semoga sukses selalu.<br><br>
* Keluhan masuk yang sudah kami balas, tidak akan bisa kamu balas lagi.<br>
* Untuk kelanjutan permasalahan kamu, silahkan kirimkan keluhan baru.<br><br>
Salam Hangat~ ^^
</div>
<div class="form-group row">
<div class="col-sm">
<button type="submit" class="btn btn-primary ccc" name="submit">Update</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'header.php';
// query data mahasiswa berdasarkan id
$id = $_SESSION["akun"];
$mhs = query("SELECT * FROM user WHERE id= $id")[0];
$xx = $mhs["id"];
$jeniskeluhan = query("SELECT * FROM jeniskeluhan");
date_default_timezone_set('Asia/Jakarta');
$tanggal = date("l, d-m-Y h:i:s:a");
// cek apakah tombol subit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (tambahkeluhan($_POST) > 0) {
echo "
<script>
alert('Keluhan berhasil dikirimkan!');
document.location.href = 'User_DaftarKeluhan.php';
</script>
";
} else {
echo "<script>
alert('Gagal Mengirimkan keluhan!');
document.location.href = 'UserDaftarKeluhan.php';
</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ccc {
float: right;
}
</style>
</head>
<body>
<div class="container-sm">
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id_user" value="<?= $mhs["id"]; ?>">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<!-- membuat pilihan keluhan -->
<div class="form-group row">
<label for="jenis_k" class="col-sm-2 col-form-label">Lingkup Keluhan Anda</label>
<div class="col-sm-10">
<select id="id_jenis" name="id_jenis" required>
<option id="id_jenis" name="id_jenis" value="">Lingkup Keluhan</option>
<?php foreach ($jeniskeluhan as $keluhan) : ?>
<option id="id_jenis" name="id_jenis" value="<?= $keluhan['id_jenis']; ?>"><?= $keluhan['jenis']; ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<!-- /membuat pilihan keluhan -->
<div class="form-group row">
<label for="subjek" class="col-sm-2 col-form-label">Subjek</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="subjek" id="subjek" required>
</div>
</div>
<div class="form-group row">
<label for="keluhan" class="col-sm-2 col-form-label">Keluhan</label>
<div class="col-sm-10">
<textarea class="form-control" id="keluhan" name="keluhan" required cols="40" rows="30" required></textarea>
</div>
</div>
<div class="form-group row">
<label for="gambar1" class="col-sm-2 col-form-label">Masukkan gambar</label>
<div class="col-sm-10">
:<input type="file" name="gambar1" id="gambar1">
</div>
</div>
<div class="form-group row">
<label for="gambar2" class="col-sm-2 col-form-label">Masukkan gambar</label>
<div class="col-sm-10">
:<input type="file" name="gambar2" id="gambar2">
</div>
</div>
<div class="form-group row">
<div class="col-sm">
<button type="submit" class="btn btn-primary ccc" name="submit">Submit</button>
</div>
</div>
</form>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require 'header.php';
// ambil id data di URL
$id = $_SESSION["akun"];
$mhs = query("SELECT * FROM keluhan WHERE id_user = $id");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daftar keluhan</title>
<style>
.tulisan {
color: black;
}
</style>
</head>
<body>
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Kategori</th>
<th scope="col">Subjek</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
<th scope="col">Aksi</th>
</tr>
</thead>
<tbody>
<tr>
<?php $i = 1 ?>
<?php foreach ($mhs as $row) : ?>
<?php
$coba = $row['id_jenis'];
$cobalagi = query("SELECT * FROM jeniskeluhan WHERE id_jenis = $coba");
?>
<td><?php echo $i; ?></td>
<td>
<?php foreach ($cobalagi as $row33) : ?>
<?= $row33["jenis"]; ?>
<?php endforeach; ?>
</td>
<td>
<a href="User_Keluhan.php?id_keluhan=<?php echo $row["id_keluhan"] ?>" class="tulisan"><?= $row["subjek"]; ?></a>
</td>
<td>
<?= $row["tanggal"]; ?>
</td>
<td>
<?php
$status = $row["status"] == "sudah";
?>
<?php if ($status) : ?>
<button type="button" class="btn btn-outline-success">ANSWERED</button>
<?php endif; ?>
<?php if (!$status) : ?>
<button type="button" class="btn btn-outline-danger">WAIT</button>
<?php endif; ?>
</td>
<td>
<?php
$status = $row["status"] == "sudah";
?>
<?php if (!$status) : ?>
<a href="hapuskeluhanUser.php?id=<?php echo $row["id_keluhan"] ?>" onclick="return confirm('yakin?');">hapus</a>
<?php endif; ?>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
<p align="center">
Butuh bantuan? Silahkan kirim keluhan anda <a href="User_BuatKeluhan.php"> disini</a>
</p>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM user WHERE id= $id")[0];
?>
<!DOCTYPE html>
<html>
<head>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- CSS yang saya tambahkan -->
<link rel="stylesheet" href="css/style.css">
<title>akun</title>
<style>
button {
margin-top: 20px;
margin-bottom: 20px;
}
input {
margin-left: 20px;
width: 350px;
margin-top: 10px;
}
.haha {
margin-left: -150px;
}
.nnn {
width: 250px;
}
.ddd {
background-color: blue;
color: white;
}
.ddd2 {
background-color: #c0c0c0;
color: white;
}
</style>
</head>
<body>
<div class="container ddd">
<h2>
Data Akun
</h2>
</div>
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?= $mhs["id"]; ?>">
<input type="hidden" name="gambarLama" value="<?= $mhs["gambar"]; ?>">
<div class="container">
<div class="form-group row">
<label for="gambar" class="col-sm-2 col-form-label">Foto </label>
<div class="col-sm-10">
<img src="img/<?= $mhs['gambar']; ?>" width="200" height="200"><br>
</div>
</div>
<div class="form-group row ddd2">
<label for="nama" class="col-sm-2 col-form-label">Nama Lengkap</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="nama" id="nama" required value="<?php echo $mhs["nama"] ?>">
</div>
</div>
<div class="form-group row">
<label for="alamat" class="col-sm-2 col-form-label">Alamat Lengkap</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="alamat" id="alamat" required value="<?php echo $mhs["alamat"] ?>">
</div>
</div>
<div class="form-group row ddd2">
<label for="nim" class="col-sm-2 col-form-label">NIM</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="nim" id="nim" required value="<?php echo $mhs["nim"] ?>">
</div>
</div>
<div class="form-group row">
<label for="lahir" class="col-sm-2 col-form-label">Tempat/Tanggal Lahir</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="tempat" id="tempat" placeholder="Tempat..." required value="<?php echo $mhs["TTL"] ?>">
</div>
</div>
<div class="form-group row ddd2">
<legend class="col-form-label col-sm-2 pt-0">Jenis Kelamin</legend>
<?php
if ($mhs["jenis"] = "L") {
$kaka = "Laki-Laki";
} else {
$kaka = "Perempuan";
}
?>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="telepon" id="telepon" required value="<?php echo $kaka ?>">
</div>
</div>
<div class="form-group row">
<label for="telepon" class="col-sm-2 col-form-label">No. Telepon</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="telepon" id="telepon" required value="<?php echo $mhs["telepon"] ?>">
</div>
</div>
<div class="form-group row ddd2">
<label for="email" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" readonly class="form-control-plaintext" name="email" id="email" required value="<?php echo $mhs["email"] ?>">
</div>
</div>
<div class="form-group row">
<label for="kerja" class="col-sm-2 col-form-label">Pekerjaan</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" name="kerja" id="kerja" required value="<?php echo $mhs["pekerjaan"] ?>">
</div>
</div>
<div class="form-group row">
<div class="col-sm">
<center>
<a class="nav-item btn btn-primary tombol" href="User_UbahAkun.php?id=<?php echo $akun["id"] ?>">Ubah Data Akun</a>
</center>
</div>
</div>
</div>
</form>
<div class="container ddd">
<h2>
Akun User
</h2>
</div>
<div class="container">
<form action="" method="POST" enctype="multipart/form-data">
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm">
<input type="text" readonly class="form-control-plaintext" name="username" id="username" required value="<?php echo $mhs["username"] ?>">
</div>
<div>
</div>
</div>
<div class="form-group row ddd2">
<label for="password" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm">
<input type="text" readonly class="form-control-plaintext" name="password" id="password" required value="***********">
</div>
<div>
<a class="nav-item btn btn-primary tombol" href="User_UbahPassword.php?id=<?php echo $akun["id"] ?>">Ubah Password</a>
</div>
</div>
</form>
</div>
<?php
require_once(dirname(__FILE__) . '\footer.php');
?>
</body>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id_keluhan"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM keluhan WHERE id_keluhan= $id")[0];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ccc {
float: right;
}
.atas {
background-color: red;
color: white;
height: 50px;
}
</style>
</head>
<body>
<div class="container-sm">
<form action="" method="POST" enctype="multipart/form-data">
<!-- membuat pilihan keluhan -->
<div class="atas">
<h1><a style="float: left; margin-left:10px; "><?= $mhs["subjek"] ?></a></h1>
</div>
<div class="tengah">
<?php
$coba = $mhs['id_jenis'];
$cobalagi = query("SELECT * FROM jeniskeluhan WHERE id_jenis = $coba")[0];
?>
<a style="color: red"><b><?= $cobalagi['jenis']; ?></b></a> | <?= $mhs["tanggal"]; ?>
</div>
<div class="hampir_isi">
<hr>
</div>
<div class="isi">
<textarea class="form-control" id="keluhan" name="keluhan" required cols="40" rows="20" readonly><?= $mhs["keluhan"]; ?></textarea>
</div>
<div class="gambar">
<?php
// $gambar = $mhs['gambar1'] && $mhs['gambar2'] > 1;
$gambar2 = $mhs['gambar1'] > 1;
$gambar3 = $mhs['gambar2'] > 1;
?>
<div class="container">
<div class="form-group row">
<?php if ($gambar2) : ?>
<img src="imgKeluhan/<?= $mhs['gambar1']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px;">
<?php endif; ?>
<?php if ($gambar3) : ?>
<img src="imgKeluhan/<?= $mhs['gambar2']; ?>" width="520" height="500" style="margin-left : 25px; margin-top: 20px;">
</div>
<br>
</div>
<?php endif; ?>
</div>
<div class="hampir_bawah">
<hr color="red">
</div>
<div>
<?php
$status = $mhs["status"] == "sudah";
?>
<?php if (!$status) : ?>
<a href="hapuskeluhanUser.php?id=<?php echo $mhs["id_keluhan"] ?>" class="btn btn-danger btn-lg active" role="button" aria-pressed="true" style="float : right; margin-right: 20px;" onclick="return confirm('yakin?');">Hapus</a>
<br><br><br><br>
<?php endif; ?>
</div>
<?php
$status = $mhs["status"] == 'sudah';
if ($status) : ?>
<?php
$coba22 = $mhs['id_keluhan'];
$cobalagi22 = query("SELECT * FROM jawaban WHERE id_keluhan = $coba22");
?>
<div class="jawaban">
<?php foreach ($cobalagi22 as $row22) : ?>
<a style="color: red"><b>ADMINISTRATOR</b></a> | <?php echo $row22["tanggal_jawaban"]; ?>
<?php endforeach; ?>
</div>
<div>
<br>
<form action="" method="" enctype="">
<input type="hidden" name="id_keluhan" value="<?= $mhs["id_keluhan"]; ?>">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<input type="hidden" name="status" value="sudah">
<div class="jawaban">
<?php foreach ($cobalagi22 as $row22) : ?>
<textarea class="form-control" id="jawaban" name="jawaban" required cols="40" rows="20" readonly><?= $row22["jawaban"]; ?></textarea>
<?php endforeach; ?>
</div>
<div>
Terima kasih telah menghubungi kami, semoga sukses selalu.<br><br>
* Keluhan masuk yang sudah kami balas, tidak akan bisa kamu balas lagi.<br>
* Untuk kelanjutan permasalahan kamu, silahkan kirimkan keluhan baru.<br><br>
Salam Hangat~ ^^
</div>
</div>
<?php endif; ?>
</form>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<?php
require_once(dirname(__FILE__) . '\header.php');
if (isset($_POST["register"])) {
if (registrasi($_POST) > 0) {
echo "<script>
alert('user baru berhasil ditambahkan! Silahkan lakukan Login');
document.location.href = 'login.php';
</script>";
} else {
echo mysqli_error($conn);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- CSS yang saya tambahkan -->
<link rel="stylesheet" href="css/style.css">
<title>Daftar Akun E-Complaint</title>
<style>
button {
margin-top: 20px;
margin-bottom: 20px;
}
input {
margin-left: 20px;
width: 350px;
margin-top: 10px;
}
.haha {
margin-left: -150px;
}
.nnn {
width: 250px;
}
</style>
</head>
<body>
<h2>
<center>Daftar Akun E-Complaint</center>
</h2>
<form action="" method="POST" enctype="multipart/form-data">
<div class="container">
<div class="form-group row">
<label for="nama" class="col-sm-2 col-form-label">Nama Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nama" id="nama" required>
</div>
</div>
<div class="form-group row">
<label for="alamat" class="col-sm-2 col-form-label">Alamat Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="alamat" id="alamat" required>
</div>
</div>
<div class="form-group row">
<label for="nim" class="col-sm-2 col-form-label">NIK</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nim" id="nim" required>
</div>
</div>
<div class="form-group row">
<label for="lahir" class="col-sm-2 col-form-label">Tempat/Tanggal Lahir</label>
<div class="col-sm-10">
<input type="text" class="nnn" name="tempat" id="tempat" placeholder="Tempat..." required>
<!-- membuat tanggal lahir -->
<select id="tanggal" name="tanggal" required>
<option id="tanggal" name="tanggal" value="">Date</option>
<?php
$x = 31;
for ($i = 1; $i <= $x; $i++) : ?>
<option id="tanggal" name="tanggal" value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
</select>
<!-- membuat bulan lahir -->
<select id="bulan" name="bulan" required>
<option id="bulan" name="bulan" value="">Month</option>
<option id="bulan" name="bulan" value="January">January</option>
<option id="bulan" name="bulan" value="February">February</option>
<option id="bulan" name="bulan" value="March">March</option>
<option id="bulan" name="bulan" value="April">April</option>
<option id="bulan" name="bulan" value="May">May</option>
<option id="bulan" name="bulan" value="June">June</option>
<option id="bulan" name="bulan" value="July">July</option>
<option id="bulan" name="bulan" value="August">August</option>
<option id="bulan" name="bulan" value="September">September</option>
<option id="bulan" name="bulan" value="October">October</option>
<option id="bulan" name="bulan" value="November">November</option>
<option id="bulan" name="bulan" value="December">December</option>
</select>
<!-- membuat tahun lahir -->
<select id="tahun" name="tahun" required>
<option id="tahun" name="tahun" value="">Year</option>
<?php
$x = 2020;
for ($i = 1993; $i <= $x; $i++) : ?>
<option id="tahun" name="tahun" value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
</select>
</div>
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">Jenis Kelamin</legend>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="L" checked>
<label class="form-check-label" for="gridRadios1">
Laki-laki
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="P">
<label class="form-check-label" for="gridRadios2">
Perempuan
</label>
</div>
</div>
</div>
</fieldset>
<div class="form-group row">
<label for="telepon" class="col-sm-2 col-form-label">No. Telepon</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="telepon" id="telepon" required>
</div>
</div>
<div class="form-group row">
<label for="email" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" name="email" id="email" required>
</div>
</div>
<div class="form-group row">
<label for="kerja" class="col-sm-2 col-form-label">Pekerjaan</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="kerja" id="kerja" required>
</div>
</div>
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="username" id="username" required>
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password" id="password" required>
</div>
</div>
<div class="form-group row">
<label for="password2" class="col-sm-2 col-form-label">Konfirmasi Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password2" id="password2">
</div>
</div>
<div class="form-group">
<label for="gambar">Masukkan Foto</label>
<input type="file" class="form-control-file" id="gambar" name="gambar" required>
</div>
<div class="form-group row">
<div class="col-sm-10">
<center>
<button type="submit" class="btn btn-primary" name="register">Submit</button>
</center>
</div>
</div>
</div>
</form>
<p align="center">Already have on account? <a href="login.php">Login</a></p>
<?php
require_once(dirname(__FILE__) . '\footer.php');
?>
</body>
</html>
\ No newline at end of file
<?php
session_start();
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
require_once(dirname(__FILE__) . '\header.php');
// ambil id data di URL
$id = $_GET["id"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM user WHERE id= $id")[0];
// cek apakah tombol subit sudah ditekan atau belum
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (ubahAkunUser($_POST) > 0) {
echo "
<script>
alert('data berhasil diubah!');
document.location.href = 'User_DataAkun.php?id=$id';
</script>
";
} else {
echo "<script>
alert('data gagal diubah!');
document.location.href = 'User_DataAkun.php?id=$id';
</script>";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- CSS yang saya tambahkan -->
<link rel="stylesheet" href="css/style.css">
<title>akun</title>
<style>
button {
margin-top: 20px;
margin-bottom: 20px;
}
input {
margin-left: 20px;
width: 350px;
margin-top: 10px;
}
.haha {
margin-left: -150px;
}
.nnn {
width: 250px;
}
</style>
</head>
<body>
<h2>
<center>Akun</center>
</h2>
<form action="" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?= $mhs["id"]; ?>">
<input type="hidden" name="gambarLama" value="<?= $mhs["gambar"]; ?>">
<div class="container">
<div class="form-group row">
<label for="nama" class="col-sm-2 col-form-label">Nama Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nama" id="nama" required value="<?php echo $mhs["nama"] ?>">
</div>
</div>
<div class="form-group row">
<label for="alamat" class="col-sm-2 col-form-label">Alamat Lengkap</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="alamat" id="alamat" required value="<?php echo $mhs["alamat"] ?>">
</div>
</div>
<div class="form-group row">
<label for="nim" class="col-sm-2 col-form-label">NIM</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nim" id="nim" required value="<?php echo $mhs["nim"] ?>">
</div>
</div>
<div class="form-group row">
<label for="lahir" class="col-sm-2 col-form-label">Tempat/Tanggal Lahir</label>
<div class="col-sm-10">
<input type="text" class="nnn" name="tempat" id="tempat" placeholder="Tempat..." required value="<?php echo $mhs["TTL"] ?>">
</div>
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">Jenis Kelamin</legend>
<div class="col-sm-10">
<?php
if ($mhs["jenis"] == 'L') : ?>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="L" checked>
<label class="form-check-label" for="gridRadios1">
Laki-laki
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="P">
<label class="form-check-label" for="gridRadios2">
Perempuan
</label>
</div>
<?php endif; ?>
<?php if ($mhs["jenis"] == 'P') : ?>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="L">
<label class="form-check-label" for="gridRadios1">
Laki-laki
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="jenis" id="jenis" value="P" checked>
<label class="form-check-label" for="gridRadios2">
Perempuan
</label>
</div>
<?php endif; ?>
</div>
</div>
</fieldset>
<div class="form-group row">
<label for="telepon" class="col-sm-2 col-form-label">No. Telepon</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="telepon" id="telepon" required value="<?php echo $mhs["telepon"] ?>">
</div>
</div>
<div class="form-group row">
<label for="email" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" name="email" id="email" required value="<?php echo $mhs["email"] ?>">
</div>
</div>
<div class="form-group row">
<label for="kerja" class="col-sm-2 col-form-label">Pekerjaan</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="kerja" id="kerja" required value="<?php echo $mhs["pekerjaan"] ?>">
</div>
</div>
<div class="form-group">
<label for="gambar">Foto </label>
<div class="col-sm-10">
<img src="img/<?= $mhs['gambar']; ?>" width="100"><br>
<input type="file" name="gambar" id="gambar">
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<center>
<button type="submit" class="btn btn-primary" name="submit">Update</button>
</center>
</div>
</div>
</div>
</form>
<?php
require_once(dirname(__FILE__) . '\footer.php');
?>
</body>
</html>
\ No newline at end of file
<?php
session_start();
require 'header.php';
if (!isset($_SESSION["login"])) {
header("Location: login.php");
exit;
}
// ambil id data di URL
$id = $_GET["id"];
// query data mahasiswa berdasarkan id
$mhs = query("SELECT * FROM user WHERE id= $id")[0];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lupa Password</title>
<head>
<body>
<center><h2>Rubah Password</h2></center>
<?php
//mengatasi error notice dan warning
//error ini biasa muncul jika dijalankan di localhost, jika online tidak ada masalah
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//proses jika tombol rubah di klik
if ($_POST['submit']) {
//membuat variabel untuk menyimpan data inputan yang di isikan di form
$password_lama = $_POST['password_lama'];
$password_baru = $_POST['password_baru'];
$konfirmasi_password = $_POST['konfirmasi_password'];
//cek dahulu ke database dengan query SELECT
//kondisi adalah WHERE (dimana) kolom password adalah $password_lama di encrypt m5
//encrypt -> md5($password_lama)
if (password_verify($password_lama, $mhs["password"])) {
//kondisi ini jika password lama yang dimasukkan sama dengan yang ada di database
//membuat kondisi minimal password adalah 5 karakter
if (strlen($password_baru) >= 5) {
//jika password baru sudah 5 atau lebih, maka lanjut ke bawah
//membuat kondisi jika password baru harus sama dengan konfirmasi password
if ($password_baru == $konfirmasi_password) {
//jika semua kondisi sudah benar, maka melakukan update kedatabase
//query UPDATE SET password = encrypt md5 password_baru
//kondisi WHERE id user = session id pada saat login, maka yang di ubah hanya user dengan id tersebut
// enkripsi password
$password_baru = password_hash($password_baru, PASSWORD_DEFAULT);
$update = $conn->query("UPDATE user SET password='$password_baru' WHERE id='$id'");
if ($update) {
//kondisi jika proses query UPDATE berhasil
echo "<script>
alert('Password Berhasil Diganti! Silahkan login ulang');
document.location.href = 'logout.php';
</script>";
} else {
//kondisi jika proses query gagal
echo 'Gagal merubah password';
}
} else {
//kondisi jika password baru beda dengan konfirmasi password
echo 'Konfirmasi password tidak cocok';
}
} else {
//kondisi jika password baru yang dimasukkan kurang dari 5 karakter
echo 'Minimal password baru adalah 5 karakter';
}
} else {
//kondisi jika password lama tidak cocok dengan data yang ada di database
echo 'Password lama tidak cocok';
}
}
?>
<div class="container">
<form action="" method="POST" >
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control-plaintext" id="username" value="<?php echo $mhs['username'] ?>">
</div>
</div>
<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">Password Lama</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password_lama" required>
</div>
</div>
<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">Password Baru</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password_baru" required>
</div>
</div>
<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">Konfirmasi Password Baru</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="konfirmasi_password" required>
</div>
</div>
<div class="form-group row">
<div class="col-sm">
<center>
<input type="submit" name="submit" class="nav-item btn btn-primary tombol" value="Rubah">
</center>
</div>
</div>
</form>
</div>
</body>
<?php
require 'footer.php';
?>
</html>
\ No newline at end of file
<!-- HEADER -->
<?php
session_start();
require_once(dirname(__FILE__) . '\header.php');
?>
<!-- PENUTUP HEADER -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>index</title>
<?php if (!isset($_SESSION["login"])) : ?>
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<?php endif; ?>
<title>index</title>
</head>
<body>
<?php
require_once(dirname(__FILE__) . '\header.php');
?>
<div>
<td>
<h4 class= "about">Aplikasi E-complaint merupakan sebuah aplikasi berbasis web yang di bangun untuk memudahkan masyarakat Laguboti.
Aplikasi ini dibangun untuk memudahkan masyarakat untuk menyampaikan keluhan terhadap masalah yang terjadi di lingkungan mereka.
Selanjutnya disampaikan kepada pemerintah setempat agar mendapatkan penanganan yang tepat dan sesuai dengan hukum yang berlaku.
</h4>
</td>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br>
<?php
require 'footer.php';
?>
</body>
</html>
<?php
require '../functions.php';
$keyword = $_GET["keyword"];
$query = "SELECT * FROM user WHERE
username LIKE '%$keyword%' OR
nama LIKE '%$keyword%'
";
$akun = query($query);
?>
<style>
.iii {
width: 100px;
height: 100px;
}
</style>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Aksi</th>
<th scope="col">Photo</th>
<th scope="col">Nama</th>
<th scope="col">Alamat</th>
<th scope="col">NIM</th>
<th scope="col">Tempat/Tanggal Lahir</th>
<th scope="col">Jenis Kelamin</th>
<th scope="col">No. Telepon</th>
<th scope="col">Email</th>
<th scope="col">Pekerjaan</th>
<th scope="col">Username</th>
<th scope="col">Password</th>
</tr>
</thead>
<tbody>
<tr>
<?php $i = 1 ?>
<?php foreach ($akun as $row) : ?>
<td><?php echo $i; ?></td>
<td>
<?php $level = $row["level"] == 'admin';
if (!$level) : ?>
<a href="ubah.php?id=<?php echo $row["id"] ?>">ubah</a> |
<a href="hapus.php?id=<?php echo $row["id"] ?>" onclick="return confirm('yakin?');">hapus</a>
<?php endif; ?>
</td>
<td>
<?php $level = $row["level"] == 'admin';
if (!$level) : ?>
<img class="iii" src="img/<?php echo $row["gambar"] ?>">
<?php endif; ?>
</td>
<td><?= $row["nama"]; ?></td>
<td><?= $row["alamat"]; ?></td>
<td><?= $row["nim"]; ?></td>
<td><?= $row["TTL"]; ?></td>
<td><?= $row["jenis"]; ?></td>
<td><?= $row["telepon"]; ?></td>
<td><?= $row["email"]; ?></td>
<td><?= $row["pekerjaan"]; ?></td>
<td><?= $row["username"] ?></td>
<td>***********</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
\ No newline at end of file
<?php
//mengaktifkan session
session_start();
header("Content-type: image/png");
// menentukan session
$_SESSION["Captcha"]="";
// membuat gambar dengan menentukan ukuran
$gbr = imagecreate(150, 50);
//warna background captcha
imagecolorallocate($gbr, 69, 179, 157);
// pengaturan font captcha
$color = imagecolorallocate($gbr, 253, 252, 252);
$font = "Allura-Regular.otf";
$ukuran_font = 20;
$posisi = 32;
// membuat nomor acak dan ditampilkan pada gambar
for($i=0;$i<=5;$i++) {
// jumlah karakter
$angka=rand(0, 9);
$_SESSION["Captcha"].=$angka;
$kemiringan= rand(20, 20);
imagettftext($gbr, $ukuran_font, $kemiringan, 8+15*$i, $posisi, $color, $font, $angka);
}
//untuk membuat gambar
imagepng($gbr);
imagedestroy($gbr);
?>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Changelog</title>
<link type="text/css" rel="stylesheet" href="fpdf.css">
<style type="text/css">
dd {margin:1em 0 1em 1em}
</style>
</head>
<body>
<h1>Changelog</h1>
<dl>
<dt><strong>v1.81</strong> (2015-12-20)</dt>
<dd>
- Added GetPageWidth() and GetPageHeight().<br>
- Fixed a bug in SetXY().<br>
</dd>
<dt><strong>v1.8</strong> (2015-11-29)</dt>
<dd>
- PHP 5.1.0 or higher is now required.<br>
- The MakeFont utility now subsets fonts, which can greatly reduce font sizes.<br>
- Added ToUnicode CMaps to improve text extraction.<br>
- Added a parameter to AddPage() to rotate the page.<br>
- Added a parameter to SetY() to indicate whether the x position should be reset or not.<br>
- Added a parameter to Output() to specify the encoding of the name, and special characters are now properly encoded. Additionally the order of the first two parameters was reversed to be more logical (however the old order is still supported for compatibility).<br>
- The Error() method now throws an exception.<br>
- Adding contents before the first AddPage() or after Close() now raises an error.<br>
- Outputting text with no font selected now raises an error.<br>
</dd>
<dt><strong>v1.7</strong> (2011-06-18)</dt>
<dd>
- The MakeFont utility has been completely rewritten and doesn't depend on ttf2pt1 anymore.<br>
- Alpha channel is now supported for PNGs.<br>
- When inserting an image, it's now possible to specify its resolution.<br>
- Default resolution for images was increased from 72 to 96 dpi.<br>
- When inserting a GIF image, no temporary file is used anymore if the PHP version is 5.1 or higher.<br>
- When output buffering is enabled and the PDF is about to be sent, the buffer is now cleared if it contains only a UTF-8 BOM and/or whitespace (instead of throwing an error).<br>
- Symbol and ZapfDingbats fonts now support underline style.<br>
- Custom page sizes are now checked to ensure that width is smaller than height.<br>
- Standard font files were changed to use the same format as user fonts.<br>
- A bug in the embedding of Type1 fonts was fixed.<br>
- A bug related to SetDisplayMode() and the current locale was fixed.<br>
- A display issue occurring with the Adobe Reader X plug-in was fixed.<br>
- An issue related to transparency with some versions of Adobe Reader was fixed.<br>
- The Content-Length header was removed because it caused an issue when the HTTP server applies compression.<br>
</dd>
<dt><strong>v1.6</strong> (2008-08-03)</dt>
<dd>
- PHP 4.3.10 or higher is now required.<br>
- GIF image support.<br>
- Images can now trigger page breaks.<br>
- Possibility to have different page formats in a single document.<br>
- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.<br>
- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.<br>
- An automatic page break in Header() doesn't cause an infinite loop any more.<br>
- Removed some warning messages appearing with recent PHP versions.<br>
- Added HTTP headers to reduce problems with IE.<br>
</dd>
<dt><strong>v1.53</strong> (2004-12-31)</dt>
<dd>
- When the font subdirectory is in the same directory as fpdf.php, it's no longer necessary to define the FPDF_FONTPATH constant.<br>
- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.<br>
- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.<br>
- The file name sent to the browser could not contain a space character.<br>
- The Cell() method could not print the number 0 (you had to pass the string '0').<br>
</dd>
<dt><strong>v1.52</strong> (2003-12-30)</dt>
<dd>
- Image() now displays the image at 72 dpi if no dimension is given.<br>
- Output() takes a string as second parameter to indicate destination.<br>
- Open() is now called automatically by AddPage().<br>
- Inserting remote JPEG images doesn't generate an error any longer.<br>
- Decimal separator is forced to dot in the constructor.<br>
- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).<br>
- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.<br>
- No more error message about already sent headers when outputting the PDF to the standard output from the command line.<br>
- The underlining was going too far for text containing characters \, ( or ).<br>
- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.<br>
</dd>
<dt><strong>v1.51</strong> (2002-08-03)</dt>
<dd>
- Type1 font support.<br>
- Added Baltic encoding.<br>
- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5:<br>&nbsp;&nbsp;* The line thickness was too large when printed under Windows 98 SE and ME.<br>&nbsp;&nbsp;* TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.<br>
- It's no longer necessary to set the decimal separator as dot to produce valid documents.<br>
- The clickable area in a cell was always on the left independently from the text alignment.<br>
- JPEG images in CMYK mode appeared in inverted colors.<br>
- Transparent PNG images in grayscale or true color mode were incorrectly handled.<br>
- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.<br>
</dd>
<dt><strong>v1.5</strong> (2002-05-28)</dt>
<dd>
- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).<br>
- Added Write() method.<br>
- Added underlined style.<br>
- Internal and external link support (AddLink(), SetLink(), Link()).<br>
- Added right margin management and methods SetRightMargin(), SetTopMargin().<br>
- Modification of SetDisplayMode() to select page layout.<br>
- The border parameter of MultiCell() now lets choose borders to draw as Cell().<br>
- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.<br>
</dd>
<dt><strong>v1.41</strong> (2002-03-13)</dt>
<dd>
- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).<br>
</dd>
<dt><strong>v1.4</strong> (2002-03-02)</dt>
<dd>
- PHP3 is no longer supported.<br>
- Page compression (SetCompression()).<br>
- Choice of page format and possibility to change orientation inside document.<br>
- Added AcceptPageBreak() method.<br>
- Ability to print the total number of pages (AliasNbPages()).<br>
- Choice of cell borders to draw.<br>
- New mode for Cell(): the current position can now move under the cell.<br>
- Ability to include an image by specifying height only (width is calculated automatically).<br>
- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.<br>
</dd>
<dt><strong>v1.31</strong> (2002-01-12)</dt>
<dd>
- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.<br>
- Removed Expires HTTP header (gives trouble in some situations).<br>
- Added Content-disposition HTTP header (seems to help in some situations).<br>
</dd>
<dt><strong>v1.3</strong> (2001-12-03)</dt>
<dd>
- Line break and text justification support (MultiCell()).<br>
- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.<br>
- A cell whose width is declared null extends up to the right margin of the page.<br>
- Line width is now retained from page to page and defaults to 0.2 mm.<br>
- Added SetXY() method.<br>
- Fixed a passing by reference done in a deprecated manner for PHP4.<br>
</dd>
<dt><strong>v1.2</strong> (2001-11-11)</dt>
<dd>
- Added font metric files and GetStringWidth() method.<br>
- Centering and right-aligning text in cells.<br>
- Display mode control (SetDisplayMode()).<br>
- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).<br>
- Possibility to force PDF download by browser.<br>
- Added SetX() and GetX() methods.<br>
- During automatic page break, current abscissa is now retained.<br>
</dd>
<dt><strong>v1.11</strong> (2001-10-20)</dt>
<dd>
- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.<br>
- Image insertion now works correctly even with magic_quotes_runtime option set to on.<br>
</dd>
<dt><strong>v1.1</strong> (2001-10-07)</dt>
<dd>
- JPEG and PNG image support.<br>
</dd>
<dt><strong>v1.01</strong> (2001-10-03)</dt>
<dd>
- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.<br>
</dd>
<dt><strong>v1.0</strong> (2001-09-17)</dt>
<dd>
- First version.<br>
</dd>
</dl>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
session_start();
require 'header.php';
date_default_timezone_set('Asia/Jakarta');
$tanggal = date("l, d-m-Y h:i:s:a");
if (isset($_POST["submit"])) {
// ambil data dari tiap elemen dalam form
//cek apakah data berhasil di ubah atau tidak
if (buat_pesan($_POST) > 0) {
echo "
<script>
alert('Pesan berhasil dikirimkan!');
document.location.href = 'index.php';
</script>
";
} else {
var_dump($_POST);
}
}
?>
<html>
<head>
<title>Membuat Contact Form dengan PHP - ePlusGo</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
body {
font-weight: 100;
line-height: 30px;
color: #777;
}
.container {
width: 100%;
margin: 0 auto;
position: relative;
}
#contact input[type="text"],
#contact input[type="email"],
#contact input[type="tel"],
#contact input[type="url"],
#contact textarea,
#contact button[type="submit"] {
font: 400 12px/16px "Roboto", Helvetica, Arial, sans-serif;
}
#contact {
background: #F9F9F9;
padding: 25px;
margin: 150px 0;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
#contact h3 {
display: block;
font-size: 30px;
font-weight: 300;
margin-bottom: 10px;
}
#contact h4 {
margin: 5px 0 15px;
display: block;
font-size: 13px;
font-weight: 400;
}
fieldset {
border: medium none !important;
margin: 0 0 10px;
min-width: 100%;
padding: 0;
width: 100%;
}
#contact input[type="text"],
#contact input[type="email"],
#contact input[type="tel"],
#contact input[type="url"],
#contact textarea {
width: 100%;
border: 1px solid #ccc;
background: #FFF;
margin: 0 0 5px;
padding: 10px;
}
#contact input[type="text"]:hover,
#contact input[type="email"]:hover,
#contact input[type="tel"]:hover,
#contact input[type="url"]:hover,
#contact textarea:hover {
-webkit-transition: border-color 0.3s ease-in-out;
-moz-transition: border-color 0.3s ease-in-out;
transition: border-color 0.3s ease-in-out;
border: 1px solid #aaa;
}
#contact textarea {
height: 100px;
max-width: 100%;
resize: none;
}
#contact button[type="submit"] {
cursor: pointer;
width: 100%;
border: none;
background: #4CAF50;
color: #FFF;
margin: 0 0 5px;
padding: 10px;
font-size: 15px;
}
#contact button[type="submit"]:hover {
background: #43A047;
-webkit-transition: background 0.3s ease-in-out;
-moz-transition: background 0.3s ease-in-out;
transition: background-color 0.3s ease-in-out;
}
#contact button[type="submit"]:active {
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.copyright {
text-align: center;
}
#contact input:focus,
#contact textarea:focus {
outline: 0;
border: 1px solid #aaa;
}
::-webkit-input-placeholder {
color: #888;
}
:-moz-placeholder {
color: #888;
}
::-moz-placeholder {
color: #888;
}
:-ms-input-placeholder {
color: #888;
}
.notify {
padding: 10px;
background-color: #FFD76E;
margin-bottom: 10px;
border-radius: 3px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<form id="contact" action="" method="post">
<input type="hidden" name="tanggal" id="tanggal" value="<?= $tanggal; ?>">
<h3>Contact Form</h3>
<h4>Hubungi kami dengan mengisi isian dibawah</h4>
<fieldset>
<input placeholder="Nama Anda" type="text" name="nama" id="nama" required autofocus>
</fieldset>
<fieldset>
<input placeholder="Email Anda" type="email" name="email" id="email" required>
</fieldset>
<fieldset>
<input placeholder="Subject (optional)" type="text" name="subjek" id="subjek" required>
</fieldset>
<fieldset>
<textarea placeholder="Ketikan pesan Anda" name="pesan" id="pesan" required></textarea>
</fieldset>
<fieldset>
<button name="submit" type="submit" id="submit">Kirim</button>
</fieldset>
</form>
</div>
</body>
</html>
<?php
require 'footer.php';
?>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
\ No newline at end of file
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */
body {
padding-top: 3rem;
padding-bottom: 3rem;
color: #5a5a5a;
}
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
.carousel {
margin-bottom: 4rem;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
bottom: 3rem;
z-index: 10;
}
/* Declare heights because of positioning of img element */
.carousel-item {
height: 32rem;
}
.carousel-item>img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 32rem;
}
/* MARKETING CONTENT
-------------------------------------------------- */
/* Center align the text within the three columns below the carousel */
.marketing .col-lg-4 {
margin-bottom: 1.5rem;
text-align: center;
}
.marketing h2 {
font-weight: 400;
}
.marketing .col-lg-4 p {
margin-right: .75rem;
margin-left: .75rem;
}
/* Featurettes
------------------------- */
.featurette-divider {
margin: 5rem 0;
/* Space out the Bootstrap <hr> more */
}
/* Thin out the marketing headings */
.featurette-heading {
font-weight: 300;
line-height: 1;
letter-spacing: -.05rem;
}
/* RESPONSIVE CSS
-------------------------------------------------- */
@media (min-width: 40em) {
/* Bump up size of carousel content */
.carousel-caption p {
margin-bottom: 1.25rem;
font-size: 1.25rem;
line-height: 1.4;
}
.featurette-heading {
font-size: 50px;
}
}
@media (min-width: 62em) {
.featurette-heading {
margin-top: 7rem;
}
}
\ No newline at end of file
/* Navbar yang dibuat */
.nav-link {
margin-right: 20px;
}
.nav-link:hover {
border-bottom: 3px solid #7FFF00;
}
/* Tombol */
.tombol {
border-radius: 20px;
}
.tobol1 {
color: blue;
margin-left: 230px;
background-color:plum;
margin-top: 10px;
width: 200px;
}
.logo{
height: 50px;
}
/* jumbotron */
.jumbotron {
background-image: url(../img/CustomerService.jpg);
background-size: cover;
height: 640px;
}
.jumbotron .display-4 {
color: black;
margin-top: 100px;
font-weight: 500;
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6);
font-size: 62px;
margin-bottom: 100px;
text-align: center;
}
/* DESKTOP VERSION */
@media (min-width:992px){
.logo{
height: 100px;
}
}
/* login captcha */
body {
font-family: "roboto";
background: #F4F4F4;
}
h1,
p {
text-align: center;
}
.kotak {
margin: 10px auto;
background: #fff;
width: 400px;
padding: 20px 0px;
}
.kotak table tr td {
padding: 5px;
}
.kotak table tr td input {
padding: 5px;
font-size: 12pt;
}
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>__construct</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>__construct</h1>
<code>__construct([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])</code>
<h2>Description</h2>
This is the class constructor. It allows to set up the page size, the orientation and the
unit of measure used in all methods (except for font sizes).
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Default page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
Default value is <code>P</code>.
</dd>
<dt><code>unit</code></dt>
<dd>
User unit. Possible values are:
<ul>
<li><code>pt</code>: point</li>
<li><code>mm</code>: millimeter</li>
<li><code>cm</code>: centimeter</li>
<li><code>in</code>: inch</li>
</ul>
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
is a very common unit in typography; font sizes are expressed in that unit.
<br>
<br>
Default value is <code>mm</code>.
</dd>
<dt><code>size</code></dt>
<dd>
The size used for pages. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
<br>
Default value is <code>A4</code>.
</dd>
</dl>
<h2>Example</h2>
Example with a custom 100x150 mm page size:
<div class="doc-source">
<pre><code>$pdf = new FPDF('P','mm',array(100,150));</code></pre>
</div>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AcceptPageBreak</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AcceptPageBreak</h1>
<code><b>boolean</b> AcceptPageBreak()</code>
<h2>Description</h2>
Whenever a page break condition is met, the method is called, and the break is issued or not
depending on the returned value. The default implementation returns a value according to the
mode selected by SetAutoPageBreak().
<br>
This method is called automatically and should not be called directly by the application.
<h2>Example</h2>
The method is overriden in an inherited class in order to obtain a 3 column layout:
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
var $col = 0;
function SetCol($col)
{
// Move position to a column
$this-&gt;col = $col;
$x = 10+$col*65;
$this-&gt;SetLeftMargin($x);
$this-&gt;SetX($x);
}
function AcceptPageBreak()
{
if($this-&gt;col&lt;2)
{
// Go to next column
$this-&gt;SetCol($this-&gt;col+1);
$this-&gt;SetY(10);
return false;
}
else
{
// Go back to first column and issue page break
$this-&gt;SetCol(0);
return true;
}
}
}
$pdf = new PDF();
$pdf-&gt;AddPage();
$pdf-&gt;SetFont('Arial','',12);
for($i=1;$i&lt;=300;$i++)
$pdf-&gt;Cell(0,5,"Line $i",0,1);
$pdf-&gt;Output();</code></pre>
</div>
<h2>See also</h2>
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddFont</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddFont</h1>
<code>AddFont(<b>string</b> family [, <b>string</b> style [, <b>string</b> file]])</code>
<h2>Description</h2>
Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font
definition file first with the MakeFont utility.
<br>
The definition file (and the font file itself when embedding) must be present in the font directory.
If it is not found, the error "Could not include font definition file" is raised.
<h2>Parameters</h2>
<dl class="param">
<dt><code>family</code></dt>
<dd>
Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
override the corresponding font.
</dd>
<dt><code>style</code></dt>
<dd>
Font style. Possible values are (case insensitive):
<ul>
<li>empty string: regular</li>
<li><code>B</code>: bold</li>
<li><code>I</code>: italic</li>
<li><code>BI</code> or <code>IB</code>: bold italic</li>
</ul>
The default value is regular.
</dd>
<dt><code>file</code></dt>
<dd>
The font definition file.
<br>
By default, the name is built from the family and style, in lower case with no space.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic','I');</code></pre>
</div>
is equivalent to:
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic','I','comici.php');</code></pre>
</div>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddLink</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddLink</h1>
<code><b>int</b> AddLink()</code>
<h2>Description</h2>
Creates a new internal link and returns its identifier. An internal link is a clickable area
which directs to another place within the document.
<br>
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is
defined with SetLink().
<h2>See also</h2>
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="image.htm">Image</a>,
<a href="link.htm">Link</a>,
<a href="setlink.htm">SetLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddPage</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddPage</h1>
<code>AddPage([<b>string</b> orientation [, <b>mixed</b> size [, <b>int</b> rotation]]])</code>
<h2>Description</h2>
Adds a new page to the document. If a page is already present, the Footer() method is called
first to output the footer. Then the page is added, the current position set to the top-left
corner according to the left and top margins, and Header() is called to display the header.
<br>
The font which was set before calling is automatically restored. There is no need to call
SetFont() again if you want to continue with the same font. The same is true for colors and
line width.
<br>
The origin of the coordinate system is at the top-left corner and increasing ordinates go
downwards.
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
The default value is the one passed to the constructor.
</dd>
<dt><code>size</code></dt>
<dd>
Page size. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in user unit).<br>
<br>
The default value is the one passed to the constructor.
</dd>
<dt><code>rotation</code></dt>
<dd>
Angle by which to rotate the page. It must be a multiple of 90; positive values
mean clockwise rotation. The default value is <code>0</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="__construct.htm">__construct</a>,
<a href="header.htm">Header</a>,
<a href="footer.htm">Footer</a>,
<a href="setmargins.htm">SetMargins</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AliasNbPages</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AliasNbPages</h1>
<code>AliasNbPages([<b>string</b> alias])</code>
<h2>Description</h2>
Defines an alias for the total number of pages. It will be substituted as the document is
closed.
<h2>Parameters</h2>
<dl class="param">
<dt><code>alias</code></dt>
<dd>
The alias. Default value: <code>{nb}</code>.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Footer()
{
// Go to 1.5 cm from bottom
$this-&gt;SetY(-15);
// Select Arial italic 8
$this-&gt;SetFont('Arial','I',8);
// Print current and total page numbers
$this-&gt;Cell(0,10,'Page '.$this-&gt;PageNo().'/{nb}',0,0,'C');
}
}
$pdf = new PDF();
$pdf-&gt;AliasNbPages();</code></pre>
</div>
<h2>See also</h2>
<a href="pageno.htm">PageNo</a>,
<a href="footer.htm">Footer</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cell</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Cell</h1>
<code>Cell(<b>float</b> w [, <b>float</b> h [, <b>string</b> txt [, <b>mixed</b> border [, <b>int</b> ln [, <b>string</b> align [, <b>boolean</b> fill [, <b>mixed</b> link]]]]]]])</code>
<h2>Description</h2>
Prints a cell (rectangular area) with optional borders, background color and character string.
The upper-left corner of the cell corresponds to the current position. The text can be aligned
or centered. After the call, the current position moves to the right or to the next line. It is
possible to put a link on the text.
<br>
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is
done before outputting.
<h2>Parameters</h2>
<dl class="param">
<dt><code>w</code></dt>
<dd>
Cell width. If <code>0</code>, the cell extends up to the right margin.
</dd>
<dt><code>h</code></dt>
<dd>
Cell height.
Default value: <code>0</code>.
</dd>
<dt><code>txt</code></dt>
<dd>
String to print.
Default value: empty string.
</dd>
<dt><code>border</code></dt>
<dd>
Indicates if borders must be drawn around the cell. The value can be either a number:
<ul>
<li><code>0</code>: no border</li>
<li><code>1</code>: frame</li>
</ul>
or a string containing some or all of the following characters (in any order):
<ul>
<li><code>L</code>: left</li>
<li><code>T</code>: top</li>
<li><code>R</code>: right</li>
<li><code>B</code>: bottom</li>
</ul>
Default value: <code>0</code>.
</dd>
<dt><code>ln</code></dt>
<dd>
Indicates where the current position should go after the call. Possible values are:
<ul>
<li><code>0</code>: to the right</li>
<li><code>1</code>: to the beginning of the next line</li>
<li><code>2</code>: below</li>
</ul>
Putting <code>1</code> is equivalent to putting <code>0</code> and calling Ln() just after.
Default value: <code>0</code>.
</dd>
<dt><code>align</code></dt>
<dd>
Allows to center or align the text. Possible values are:
<ul>
<li><code>L</code> or empty string: left align (default value)</li>
<li><code>C</code>: center</li>
<li><code>R</code>: right align</li>
</ul>
</dd>
<dt><code>fill</code></dt>
<dd>
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
Default value: <code>false</code>.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>// Set font
$pdf-&gt;SetFont('Arial','B',16);
// Move to 8 cm to the right
$pdf-&gt;Cell(80);
// Centered text in a framed 20*10 mm cell and line break
$pdf-&gt;Cell(20,10,'Title',1,1,'C');</code></pre>
</div>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="addlink.htm">AddLink</a>,
<a href="ln.htm">Ln</a>,
<a href="multicell.htm">MultiCell</a>,
<a href="write.htm">Write</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Close</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Close</h1>
<code>Close()</code>
<h2>Description</h2>
Terminates the PDF document. It is not necessary to call this method explicitly because Output()
does it automatically.
<br>
If the document contains no page, AddPage() is called to prevent from getting an invalid document.
<h2>See also</h2>
<a href="output.htm">Output</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Error</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Error</h1>
<code>Error(<b>string</b> msg)</code>
<h2>Description</h2>
This method is automatically called in case of a fatal error; it simply throws an exception
with the provided message.<br>
An inherited class may override it to customize the error handling but the method should
never return, otherwise the resulting document would probably be invalid.
<h2>Parameters</h2>
<dl class="param">
<dt><code>msg</code></dt>
<dd>
The error message.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Footer</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Footer</h1>
<code>Footer()</code>
<h2>Description</h2>
This method is used to render the page footer. It is automatically called by AddPage() and
Close() and should not be called directly by the application. The implementation in FPDF is
empty, so you have to subclass it and override the method if you want a specific processing.
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Footer()
{
// Go to 1.5 cm from bottom
$this-&gt;SetY(-15);
// Select Arial italic 8
$this-&gt;SetFont('Arial','I',8);
// Print centered page number
$this-&gt;Cell(0,10,'Page '.$this-&gt;PageNo(),0,0,'C');
}
}</code></pre>
</div>
<h2>See also</h2>
<a href="header.htm">Header</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GetPageHeight</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetPageHeight</h1>
<code><b>float</b> GetPageHeight()</code>
<h2>Description</h2>
Returns the current page height.
<h2>See also</h2>
<a href="getpagewidth.htm">GetPageWidth</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GetPageWidth</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetPageWidth</h1>
<code><b>float</b> GetPageWidth()</code>
<h2>Description</h2>
Returns the current page width.
<h2>See also</h2>
<a href="getpageheight.htm">GetPageHeight</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GetStringWidth</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetStringWidth</h1>
<code><b>float</b> GetStringWidth(<b>string</b> s)</code>
<h2>Description</h2>
Returns the length of a string in user unit. A font must be selected.
<h2>Parameters</h2>
<dl class="param">
<dt><code>s</code></dt>
<dd>
The string whose length is to be computed.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GetX</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetX</h1>
<code><b>float</b> GetX()</code>
<h2>Description</h2>
Returns the abscissa of the current position.
<h2>See also</h2>
<a href="setx.htm">SetX</a>,
<a href="gety.htm">GetY</a>,
<a href="sety.htm">SetY</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>GetY</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetY</h1>
<code><b>float</b> GetY()</code>
<h2>Description</h2>
Returns the ordinate of the current position.
<h2>See also</h2>
<a href="sety.htm">SetY</a>,
<a href="getx.htm">GetX</a>,
<a href="setx.htm">SetX</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Header</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Header</h1>
<code>Header()</code>
<h2>Description</h2>
This method is used to render the page header. It is automatically called by AddPage() and
should not be called directly by the application. The implementation in FPDF is empty, so
you have to subclass it and override the method if you want a specific processing.
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Header()
{
// Select Arial bold 15
$this-&gt;SetFont('Arial','B',15);
// Move to the right
$this-&gt;Cell(80);
// Framed title
$this-&gt;Cell(30,10,'Title',1,0,'C');
// Line break
$this-&gt;Ln(20);
}
}</code></pre>
</div>
<h2>See also</h2>
<a href="footer.htm">Footer</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Image</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Image</h1>
<code>Image(<b>string</b> file [, <b>float</b> x [, <b>float</b> y [, <b>float</b> w [, <b>float</b> h [, <b>string</b> type [, <b>mixed</b> link]]]]]])</code>
<h2>Description</h2>
Puts an image. The size it will take on the page can be specified in different ways:
<ul>
<li>explicit width and height (expressed in user unit or dpi)</li>
<li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>
<li>no explicit dimension, in which case the image is put at 96 dpi</li>
</ul>
Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
<br>
<br>
For JPEGs, all flavors are allowed:
<ul>
<li>gray scales</li>
<li>true colors (24 bits)</li>
<li>CMYK (32 bits)</li>
</ul>
For PNGs, are allowed:
<ul>
<li>gray scales on at most 8 bits (256 levels)</li>
<li>indexed colors</li>
<li>true colors (24 bits)</li>
</ul>
For GIFs: in case of an animated GIF, only the first frame is displayed.<br>
<br>
Transparency is supported.<br>
<br>
The format can be specified explicitly or inferred from the file extension.<br>
<br>
It is possible to put a link on the image.<br>
<br>
Remark: if an image is used several times, only one copy is embedded in the file.
<h2>Parameters</h2>
<dl class="param">
<dt><code>file</code></dt>
<dd>
Path or URL of the image.
</dd>
<dt><code>x</code></dt>
<dd>
Abscissa of the upper-left corner. If not specified or equal to <code>null</code>, the current abscissa
is used.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of the upper-left corner. If not specified or equal to <code>null</code>, the current ordinate
is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled)
and, after the call, the current ordinate is moved to the bottom of the image.
</dd>
<dt><code>w</code></dt>
<dd>
Width of the image in the page. There are three cases:
<ul>
<li>If the value is positive, it represents the width in user unit</li>
<li>If the value is negative, the absolute value represents the horizontal resolution in dpi</li>
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
</ul>
</dd>
<dt><code>h</code></dt>
<dd>
Height of the image in the page. There are three cases:
<ul>
<li>If the value is positive, it represents the height in user unit</li>
<li>If the value is negative, the absolute value represents the vertical resolution in dpi</li>
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
</ul>
</dd>
<dt><code>type</code></dt>
<dd>
Image format. Possible values are (case insensitive): <code>JPG</code>, <code>JPEG</code>, <code>PNG</code> and <code>GIF</code>.
If not specified, the type is inferred from the file extension.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>// Insert a logo in the top-left corner at 300 dpi
$pdf-&gt;Image('logo.png',10,10,-300);
// Insert a dynamic image from a URL
$pdf-&gt;Image('http://chart.googleapis.com/chart?cht=p3&amp;chd=t:60,40&amp;chs=250x100&amp;chl=Hello|World',60,30,90,0,'PNG');</code></pre>
</div>
<h2>See also</h2>
<a href="addlink.htm">AddLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>FPDF 1.81 Reference Manual</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>FPDF 1.81 Reference Manual</h1>
<a href="__construct.htm">__construct</a> - constructor<br>
<a href="acceptpagebreak.htm">AcceptPageBreak</a> - accept or not automatic page break<br>
<a href="addfont.htm">AddFont</a> - add a new font<br>
<a href="addlink.htm">AddLink</a> - create an internal link<br>
<a href="addpage.htm">AddPage</a> - add a new page<br>
<a href="aliasnbpages.htm">AliasNbPages</a> - define an alias for number of pages<br>
<a href="cell.htm">Cell</a> - print a cell<br>
<a href="close.htm">Close</a> - terminate the document<br>
<a href="error.htm">Error</a> - fatal error<br>
<a href="footer.htm">Footer</a> - page footer<br>
<a href="getpageheight.htm">GetPageHeight</a> - get current page height<br>
<a href="getpagewidth.htm">GetPageWidth</a> - get current page width<br>
<a href="getstringwidth.htm">GetStringWidth</a> - compute string length<br>
<a href="getx.htm">GetX</a> - get current x position<br>
<a href="gety.htm">GetY</a> - get current y position<br>
<a href="header.htm">Header</a> - page header<br>
<a href="image.htm">Image</a> - output an image<br>
<a href="line.htm">Line</a> - draw a line<br>
<a href="link.htm">Link</a> - put a link<br>
<a href="ln.htm">Ln</a> - line break<br>
<a href="multicell.htm">MultiCell</a> - print text with line breaks<br>
<a href="output.htm">Output</a> - save or send the document<br>
<a href="pageno.htm">PageNo</a> - page number<br>
<a href="rect.htm">Rect</a> - draw a rectangle<br>
<a href="setauthor.htm">SetAuthor</a> - set the document author<br>
<a href="setautopagebreak.htm">SetAutoPageBreak</a> - set the automatic page breaking mode<br>
<a href="setcompression.htm">SetCompression</a> - turn compression on or off<br>
<a href="setcreator.htm">SetCreator</a> - set document creator<br>
<a href="setdisplaymode.htm">SetDisplayMode</a> - set display mode<br>
<a href="setdrawcolor.htm">SetDrawColor</a> - set drawing color<br>
<a href="setfillcolor.htm">SetFillColor</a> - set filling color<br>
<a href="setfont.htm">SetFont</a> - set font<br>
<a href="setfontsize.htm">SetFontSize</a> - set font size<br>
<a href="setkeywords.htm">SetKeywords</a> - associate keywords with document<br>
<a href="setleftmargin.htm">SetLeftMargin</a> - set left margin<br>
<a href="setlinewidth.htm">SetLineWidth</a> - set line width<br>
<a href="setlink.htm">SetLink</a> - set internal link destination<br>
<a href="setmargins.htm">SetMargins</a> - set margins<br>
<a href="setrightmargin.htm">SetRightMargin</a> - set right margin<br>
<a href="setsubject.htm">SetSubject</a> - set document subject<br>
<a href="settextcolor.htm">SetTextColor</a> - set text color<br>
<a href="settitle.htm">SetTitle</a> - set document title<br>
<a href="settopmargin.htm">SetTopMargin</a> - set top margin<br>
<a href="setx.htm">SetX</a> - set current x position<br>
<a href="setxy.htm">SetXY</a> - set current x and y positions<br>
<a href="sety.htm">SetY</a> - set current y position and optionally reset x<br>
<a href="text.htm">Text</a> - print a string<br>
<a href="write.htm">Write</a> - print flowing text<br>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Line</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Line</h1>
<code>Line(<b>float</b> x1, <b>float</b> y1, <b>float</b> x2, <b>float</b> y2)</code>
<h2>Description</h2>
Draws a line between two points.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x1</code></dt>
<dd>
Abscissa of first point.
</dd>
<dt><code>y1</code></dt>
<dd>
Ordinate of first point.
</dd>
<dt><code>x2</code></dt>
<dd>
Abscissa of second point.
</dd>
<dt><code>y2</code></dt>
<dd>
Ordinate of second point.
</dd>
</dl>
<h2>See also</h2>
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Link</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Link</h1>
<code>Link(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h, <b>mixed</b> link)</code>
<h2>Description</h2>
Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(),
Write() or Image(), but this method can be useful for instance to define a clickable area inside
an image.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x</code></dt>
<dd>
Abscissa of the upper-left corner of the rectangle.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of the upper-left corner of the rectangle.
</dd>
<dt><code>w</code></dt>
<dd>
Width of the rectangle.
</dd>
<dt><code>h</code></dt>
<dd>
Height of the rectangle.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>See also</h2>
<a href="addlink.htm">AddLink</a>,
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="image.htm">Image</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ln</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Ln</h1>
<code>Ln([<b>float</b> h])</code>
<h2>Description</h2>
Performs a line break. The current abscissa goes back to the left margin and the ordinate
increases by the amount passed in parameter.
<h2>Parameters</h2>
<dl class="param">
<dt><code>h</code></dt>
<dd>
The height of the break.
<br>
By default, the value equals the height of the last printed cell.
</dd>
</dl>
<h2>See also</h2>
<a href="cell.htm">Cell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>MultiCell</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>MultiCell</h1>
<code>MultiCell(<b>float</b> w, <b>float</b> h, <b>string</b> txt [, <b>mixed</b> border [, <b>string</b> align [, <b>boolean</b> fill]]])</code>
<h2>Description</h2>
This method allows printing text with line breaks. They can be automatic (as soon as the
text reaches the right border of the cell) or explicit (via the \n character). As many cells
as necessary are output, one below the other.
<br>
Text can be aligned, centered or justified. The cell block can be framed and the background
painted.
<h2>Parameters</h2>
<dl class="param">
<dt><code>w</code></dt>
<dd>
Width of cells. If <code>0</code>, they extend up to the right margin of the page.
</dd>
<dt><code>h</code></dt>
<dd>
Height of cells.
</dd>
<dt><code>txt</code></dt>
<dd>
String to print.
</dd>
<dt><code>border</code></dt>
<dd>
Indicates if borders must be drawn around the cell block. The value can be either a number:
<ul>
<li><code>0</code>: no border</li>
<li><code>1</code>: frame</li>
</ul>
or a string containing some or all of the following characters (in any order):
<ul>
<li><code>L</code>: left</li>
<li><code>T</code>: top</li>
<li><code>R</code>: right</li>
<li><code>B</code>: bottom</li>
</ul>
Default value: <code>0</code>.
</dd>
<dt><code>align</code></dt>
<dd>
Sets the text alignment. Possible values are:
<ul>
<li><code>L</code>: left alignment</li>
<li><code>C</code>: center</li>
<li><code>R</code>: right alignment</li>
<li><code>J</code>: justification (default value)</li>
</ul>
</dd>
<dt><code>fill</code></dt>
<dd>
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Output</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Output</h1>
<code><b>string</b> Output([<b>string</b> dest [, <b>string</b> name [, <b>boolean</b> isUTF8]]])</code>
<h2>Description</h2>
Send the document to a given destination: browser, file or string. In the case of a browser, the
PDF viewer may be used or a download may be forced.
<br>
The method first calls Close() if necessary to terminate the document.
<h2>Parameters</h2>
<dl class="param">
<dt><code>dest</code></dt>
<dd>
Destination where to send the document. It can be one of the following:
<ul>
<li><code>I</code>: send the file inline to the browser. The PDF viewer is used if available.</li>
<li><code>D</code>: send to the browser and force a file download with the name given by <code>name</code>.</li>
<li><code>F</code>: save to a local file with the name given by <code>name</code> (may include a path).</li>
<li><code>S</code>: return the document as a string.</li>
</ul>
The default value is <code>I</code>.
</dd>
<dt><code>name</code></dt>
<dd>
The name of the file. It is ignored in case of destination <code>S</code>.<br>
The default value is <code>doc.pdf</code>.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if <code>name</code> is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).
Only used for destinations <code>I</code> and <code>D</code>.<br>
The default value is <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="close.htm">Close</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>PageNo</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>PageNo</h1>
<code><b>int</b> PageNo()</code>
<h2>Description</h2>
Returns the current page number.
<h2>See also</h2>
<a href="aliasnbpages.htm">AliasNbPages</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Rect</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Rect</h1>
<code>Rect(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h [, <b>string</b> style])</code>
<h2>Description</h2>
Outputs a rectangle. It can be drawn (border only), filled (with no border) or both.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x</code></dt>
<dd>
Abscissa of upper-left corner.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of upper-left corner.
</dd>
<dt><code>w</code></dt>
<dd>
Width.
</dd>
<dt><code>h</code></dt>
<dd>
Height.
</dd>
<dt><code>style</code></dt>
<dd>
Style of rendering. Possible values are:
<ul>
<li><code>D</code> or empty string: draw. This is the default value.</li>
<li><code>F</code>: fill</li>
<li><code>DF</code> or <code>FD</code>: draw and fill</li>
</ul>
</dd>
</dl>
<h2>See also</h2>
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetAuthor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetAuthor</h1>
<code>SetAuthor(<b>string</b> author [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Defines the author of the document.
<h2>Parameters</h2>
<dl class="param">
<dt><code>author</code></dt>
<dd>
The name of the author.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setcreator.htm">SetCreator</a>,
<a href="setkeywords.htm">SetKeywords</a>,
<a href="setsubject.htm">SetSubject</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetAutoPageBreak</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetAutoPageBreak</h1>
<code>SetAutoPageBreak(<b>boolean</b> auto [, <b>float</b> margin])</code>
<h2>Description</h2>
Enables or disables the automatic page breaking mode. When enabling, the second parameter is
the distance from the bottom of the page that defines the triggering limit. By default, the
mode is on and the margin is 2 cm.
<h2>Parameters</h2>
<dl class="param">
<dt><code>auto</code></dt>
<dd>
Boolean indicating if mode should be on or off.
</dd>
<dt><code>margin</code></dt>
<dd>
Distance from the bottom of the page.
</dd>
</dl>
<h2>See also</h2>
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>,
<a href="acceptpagebreak.htm">AcceptPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetCompression</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetCompression</h1>
<code>SetCompression(<b>boolean</b> compress)</code>
<h2>Description</h2>
Activates or deactivates page compression. When activated, the internal representation of
each page is compressed, which leads to a compression ratio of about 2 for the resulting
document.
<br>
Compression is on by default.
<br>
<br>
<strong>Note:</strong> the Zlib extension is required for this feature. If not present, compression
will be turned off.
<h2>Parameters</h2>
<dl class="param">
<dt><code>compress</code></dt>
<dd>
Boolean indicating if compression must be enabled.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetCreator</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetCreator</h1>
<code>SetCreator(<b>string</b> creator [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Defines the creator of the document. This is typically the name of the application that
generates the PDF.
<h2>Parameters</h2>
<dl class="param">
<dt><code>creator</code></dt>
<dd>
The name of the creator.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setauthor.htm">SetAuthor</a>,
<a href="setkeywords.htm">SetKeywords</a>,
<a href="setsubject.htm">SetSubject</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetDisplayMode</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetDisplayMode</h1>
<code>SetDisplayMode(<b>mixed</b> zoom [, <b>string</b> layout])</code>
<h2>Description</h2>
Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be
displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a
specific zooming factor or use viewer default (configured in the Preferences menu of Adobe Reader).
The page layout can be specified too: single at once, continuous display, two columns or viewer
default.
<h2>Parameters</h2>
<dl class="param">
<dt><code>zoom</code></dt>
<dd>
The zoom to use. It can be one of the following string values:
<ul>
<li><code>fullpage</code>: displays the entire page on screen</li>
<li><code>fullwidth</code>: uses maximum width of window</li>
<li><code>real</code>: uses real size (equivalent to 100% zoom)</li>
<li><code>default</code>: uses viewer default mode</li>
</ul>
or a number indicating the zooming factor to use.
</dd>
<dt><code>layout</code></dt>
<dd>
The page layout. Possible values are:
<ul>
<li><code>single</code>: displays one page at once</li>
<li><code>continuous</code>: displays pages continuously</li>
<li><code>two</code>: displays two pages on two columns</li>
<li><code>default</code>: uses viewer default mode</li>
</ul>
Default value is <code>default</code>.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetDrawColor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetDrawColor</h1>
<code>SetDrawColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
<h2>Description</h2>
Defines the color used for all drawing operations (lines, rectangles and cell borders). It
can be expressed in RGB components or gray scale. The method can be called before the first
page is created and the value is retained from page to page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>r</code></dt>
<dd>
If <code>g</code> et <code>b</code> are given, red component; if not, indicates the gray level.
Value between 0 and 255.
</dd>
<dt><code>g</code></dt>
<dd>
Green component (between 0 and 255).
</dd>
<dt><code>b</code></dt>
<dd>
Blue component (between 0 and 255).
</dd>
</dl>
<h2>See also</h2>
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="line.htm">Line</a>,
<a href="rect.htm">Rect</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetFillColor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetFillColor</h1>
<code>SetFillColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
<h2>Description</h2>
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in RGB components or gray scale. The method can be called before the first
page is created and the value is retained from page to page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>r</code></dt>
<dd>
If <code>g</code> and <code>b</code> are given, red component; if not, indicates the gray level.
Value between 0 and 255.
</dd>
<dt><code>g</code></dt>
<dd>
Green component (between 0 and 255).
</dd>
<dt><code>b</code></dt>
<dd>
Blue component (between 0 and 255).
</dd>
</dl>
<h2>See also</h2>
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="rect.htm">Rect</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetFont</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetFont</h1>
<code>SetFont(<b>string</b> family [, <b>string</b> style [, <b>float</b> size]])</code>
<h2>Description</h2>
Sets the font used to print character strings. It is mandatory to call this method
at least once before printing text or the resulting document would not be valid.
<br>
The font can be either a standard one or a font added via the AddFont() method. Standard fonts
use the Windows encoding cp1252 (Western Europe).
<br>
The method can be called before the first page is created and the font is kept from page
to page.
<br>
If you just wish to change the current font size, it is simpler to call SetFontSize().
<br>
<br>
<strong>Note:</strong> the font definition files must be accessible. They are searched successively in:
<ul>
<li>The directory defined by the <code>FPDF_FONTPATH</code> constant (if this constant is defined)</li>
<li>The <code>font</code> directory located in the same directory as <code>fpdf.php</code> (if it exists)</li>
<li>The directories accessible through <code>include()</code></li>
</ul>
Example using <code>FPDF_FONTPATH</code>:
<div class="doc-source">
<pre><code>define('FPDF_FONTPATH','/home/www/font');
require('fpdf.php');</code></pre>
</div>
If the file corresponding to the requested font is not found, the error "Could not include font
definition file" is raised.
<h2>Parameters</h2>
<dl class="param">
<dt><code>family</code></dt>
<dd>
Family font. It can be either a name defined by AddFont() or one of the standard families (case
insensitive):
<ul>
<li><code>Courier</code> (fixed-width)</li>
<li><code>Helvetica</code> or <code>Arial</code> (synonymous; sans serif)</li>
<li><code>Times</code> (serif)</li>
<li><code>Symbol</code> (symbolic)</li>
<li><code>ZapfDingbats</code> (symbolic)</li>
</ul>
It is also possible to pass an empty string. In that case, the current family is kept.
</dd>
<dt><code>style</code></dt>
<dd>
Font style. Possible values are (case insensitive):
<ul>
<li>empty string: regular</li>
<li><code>B</code>: bold</li>
<li><code>I</code>: italic</li>
<li><code>U</code>: underline</li>
</ul>
or any combination. The default value is regular.
Bold and italic styles do not apply to <code>Symbol</code> and <code>ZapfDingbats</code>.
</dd>
<dt><code>size</code></dt>
<dd>
Font size in points.
<br>
The default value is the current size. If no size has been specified since the beginning of
the document, the value taken is 12.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>// Times regular 12
$pdf-&gt;SetFont('Times');
// Arial bold 14
$pdf-&gt;SetFont('Arial','B',14);
// Removes bold
$pdf-&gt;SetFont('');
// Times bold, italic and underlined 14
$pdf-&gt;SetFont('Times','BIU');</code></pre>
</div>
<h2>See also</h2>
<a href="addfont.htm">AddFont</a>,
<a href="setfontsize.htm">SetFontSize</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>,
<a href="write.htm">Write</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetFontSize</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetFontSize</h1>
<code>SetFontSize(<b>float</b> size)</code>
<h2>Description</h2>
Defines the size of the current font.
<h2>Parameters</h2>
<dl class="param">
<dt><code>size</code></dt>
<dd>
The size (in points).
</dd>
</dl>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetKeywords</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetKeywords</h1>
<code>SetKeywords(<b>string</b> keywords [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'.
<h2>Parameters</h2>
<dl class="param">
<dt><code>keywords</code></dt>
<dd>
The list of keywords.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setauthor.htm">SetAuthor</a>,
<a href="setcreator.htm">SetCreator</a>,
<a href="setsubject.htm">SetSubject</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetLeftMargin</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetLeftMargin</h1>
<code>SetLeftMargin(<b>float</b> margin)</code>
<h2>Description</h2>
Defines the left margin. The method can be called before creating the first page.
<br>
If the current abscissa gets out of page, it is brought back to the margin.
<h2>Parameters</h2>
<dl class="param">
<dt><code>margin</code></dt>
<dd>
The margin.
</dd>
</dl>
<h2>See also</h2>
<a href="settopmargin.htm">SetTopMargin</a>,
<a href="setrightmargin.htm">SetRightMargin</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>,
<a href="setmargins.htm">SetMargins</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetLineWidth</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetLineWidth</h1>
<code>SetLineWidth(<b>float</b> width)</code>
<h2>Description</h2>
Defines the line width. By default, the value equals 0.2 mm. The method can be called before
the first page is created and the value is retained from page to page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>width</code></dt>
<dd>
The width.
</dd>
</dl>
<h2>See also</h2>
<a href="line.htm">Line</a>,
<a href="rect.htm">Rect</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetLink</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetLink</h1>
<code>SetLink(<b>int</b> link [, <b>float</b> y [, <b>int</b> page]])</code>
<h2>Description</h2>
Defines the page and position a link points to.
<h2>Parameters</h2>
<dl class="param">
<dt><code>link</code></dt>
<dd>
The link identifier returned by AddLink().
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of target position; <code>-1</code> indicates the current position.
The default value is <code>0</code> (top of page).
</dd>
<dt><code>page</code></dt>
<dd>
Number of target page; <code>-1</code> indicates the current page. This is the default value.
</dd>
</dl>
<h2>See also</h2>
<a href="addlink.htm">AddLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetMargins</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetMargins</h1>
<code>SetMargins(<b>float</b> left, <b>float</b> top [, <b>float</b> right])</code>
<h2>Description</h2>
Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change
them.
<h2>Parameters</h2>
<dl class="param">
<dt><code>left</code></dt>
<dd>
Left margin.
</dd>
<dt><code>top</code></dt>
<dd>
Top margin.
</dd>
<dt><code>right</code></dt>
<dd>
Right margin. Default value is the left one.
</dd>
</dl>
<h2>See also</h2>
<a href="setleftmargin.htm">SetLeftMargin</a>,
<a href="settopmargin.htm">SetTopMargin</a>,
<a href="setrightmargin.htm">SetRightMargin</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetRightMargin</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetRightMargin</h1>
<code>SetRightMargin(<b>float</b> margin)</code>
<h2>Description</h2>
Defines the right margin. The method can be called before creating the first page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>margin</code></dt>
<dd>
The margin.
</dd>
</dl>
<h2>See also</h2>
<a href="setleftmargin.htm">SetLeftMargin</a>,
<a href="settopmargin.htm">SetTopMargin</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>,
<a href="setmargins.htm">SetMargins</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SetSubject</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetSubject</h1>
<code>SetSubject(<b>string</b> subject [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Defines the subject of the document.
<h2>Parameters</h2>
<dl class="param">
<dt><code>subject</code></dt>
<dd>
The subject.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setauthor.htm">SetAuthor</a>,
<a href="setcreator.htm">SetCreator</a>,
<a href="setkeywords.htm">SetKeywords</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment