Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PSW2-D3TI01
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julius Samosir
PSW2-D3TI01
Commits
76e3f249
Commit
76e3f249
authored
May 29, 2020
by
Julius Samosir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete add_paket_proses.php
parent
8d84f2a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
44 deletions
+0
-44
add_paket_proses.php
add_paket_proses.php
+0
-44
No files found.
add_paket_proses.php
deleted
100644 → 0
View file @
8d84f2a2
<?php
require_once
'common/database.php'
;
if
(
!
isset
(
$_SESSION
[
'logged_in'
])){
header
(
'location: index.php'
);
}
date_default_timezone_set
(
'Asia/Jakarta'
);
$nama
=
$_POST
[
'nama'
];
$deskripsi
=
$_POST
[
'deskripsi'
];
$tanggal
=
$_POST
[
'tanggal'
];
$harga
=
$_POST
[
'harga'
];
$gambar
=
$_FILES
[
'gambar'
][
'name'
];
$kuota
=
$_POST
[
'kuota'
];
$tmp_file
=
$_FILES
[
'gambar'
][
'tmp_name'
];
$path
=
"uploads/"
.
$gambar
;
if
(
move_uploaded_file
(
$tmp_file
,
$path
)){
$do
=
CreatePaket
(
$nama
,
$deskripsi
,
$tanggal
,
$gambar
,
$harga
,
$kuota
);
if
(
$do
<
0
){
echo
"<script>alert('Paket
$nama
telah dibuat');
window.location = 'paket.php'</script>"
;
}
else
{
echo
"<script>alert('Paket
$nama
gagal dibuat');
window.location = 'paket#addnew.php'</script>"
;
}
}
else
{
echo
"<script>alert('Database is in trouble!');
window.location = 'paket.php'</script>"
;
}
if
(
$tanggal
<
date_default_timezone_set
(
'Asia/Jakarta'
)){
echo
"<script>alert('Tanggal tidak boleh yang sudah lewat');
window.location = 'paket#addnew.php'</script>"
;
}
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment