Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zekena
/
Unit-calculator
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f1f29dab
authored
May 14, 2019
by
zekena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contact+styles
parent
3ab4db56
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
119 additions
and
35 deletions
categories/contact.php
categories/contact_data.csv
contact_data.csv
css/simp-Volume.css
css/simp-area.css
css/simp-length.css
css/simp-speed.css
css/simp-temp.css
css/simp-weight.css
home.html → home.php
categories/contact.php
0 → 100644
View file @
f1f29dab
<?php
if
(
isset
(
$_POST
[
"submit"
]))
{
if
(
empty
(
$_POST
[
"name"
]))
{
$error
.=
'<p><label class="text-danger">Please Enter your Name</label></p>'
;
}
else
{
$name
=
clean_text
(
$_POST
[
"name"
]);
if
(
!
preg_match
(
"/^[a-zA-Z ]*$/"
,
$name
))
{
$error
.=
'<p><label class="text-danger">Only letters and white space allowed</label></p>'
;
}
}
if
(
empty
(
$_POST
[
"email"
]))
{
$error
.=
'<p><label class="text-danger">Please Enter your Email</label></p>'
;
}
else
{
$email
=
clean_text
(
$_POST
[
"email"
]);
if
(
!
filter_var
(
$email
,
FILTER_VALIDATE_EMAIL
))
{
$error
.=
'<p><label class="text-danger">Invalid email format</label></p>'
;
}
}
if
(
empty
(
$_POST
[
"message"
]))
{
$error
.=
'<p><label class="text-danger">Message is required</label></p>'
;
}
else
{
$message
=
clean_text
(
$_POST
[
"message"
]);
}
if
(
$error
==
''
)
{
$file_open
=
fopen
(
"contact_data.csv"
,
"a"
);
$no_rows
=
count
(
file
(
"contact_data.csv"
));
if
(
$no_rows
>
1
)
{
$no_rows
=
(
$no_rows
-
1
)
+
1
;
}
$form_data
=
array
(
'sr_no'
=>
$no_rows
,
'name'
=>
$name
,
'email'
=>
$email
,
'message'
=>
$message
);
fputcsv
(
$file_open
,
$form_data
);
$error
=
'<label class="text-success">Thank you for contacting us</label>'
;
$name
=
''
;
$email
=
''
;
$message
=
''
;
}
}
categories/contact_data.csv
0 → 100644
View file @
f1f29dab
Name,Email,Message
contact_data.csv
0 → 100644
View file @
f1f29dab
zeyad
23facas
zida@gma.com
3,zeyad,zida@gma.com,23facas
4,zeyad,zida@gma.com,23facas
5,zeyad,zida@gma.com,23facas
6,zeyad,zida@gma.com,23facas
css/simp-Volume.css
View file @
f1f29dab
...
@@ -137,7 +137,7 @@ body{background-image: url("../Volume.jpg");
...
@@ -137,7 +137,7 @@ body{background-image: url("../Volume.jpg");
border-radius
:
17px
;
border-radius
:
17px
;
width
:
50%
;
width
:
50%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
css/simp-area.css
View file @
f1f29dab
...
@@ -137,7 +137,7 @@ body{ background-image: url("../Area.jpg");
...
@@ -137,7 +137,7 @@ body{ background-image: url("../Area.jpg");
border-radius
:
17px
;
border-radius
:
17px
;
width
:
50%
;
width
:
50%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
css/simp-length.css
View file @
f1f29dab
...
@@ -133,13 +133,12 @@ body{
...
@@ -133,13 +133,12 @@ body{
-moz-box-shadow
:
16px
1px
15px
-1px
rgba
(
0
,
0
,
0
,
0.61
);
-moz-box-shadow
:
16px
1px
15px
-1px
rgba
(
0
,
0
,
0
,
0.61
);
box-shadow
:
16px
1px
15px
-1px
rgba
(
0
,
0
,
0
,
0.61
);
box-shadow
:
16px
1px
15px
-1px
rgba
(
0
,
0
,
0
,
0.61
);
background-color
:
#3FB74F
;
background-color
:
#3FB74F
;
padding
:
25px
32px
;
padding
:
5px
32px
;
height
:
50%
;
height
:
50%
;
border-radius
:
17px
;
border-radius
:
17px
;
width
:
5
0%
;
width
:
8
0%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
css/simp-speed.css
View file @
f1f29dab
...
@@ -139,7 +139,7 @@ body{
...
@@ -139,7 +139,7 @@ body{
border-radius
:
17px
;
border-radius
:
17px
;
width
:
50%
;
width
:
50%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
css/simp-temp.css
View file @
f1f29dab
...
@@ -135,9 +135,9 @@ body{background-image: url("../temp.jpg");
...
@@ -135,9 +135,9 @@ body{background-image: url("../temp.jpg");
height
:
50%
;
height
:
50%
;
border-radius
:
17px
;
border-radius
:
17px
;
width
:
5
0%
;
width
:
8
0%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
css/simp-weight.css
View file @
f1f29dab
...
@@ -139,7 +139,7 @@ body{
...
@@ -139,7 +139,7 @@ body{
border-radius
:
17px
;
border-radius
:
17px
;
width
:
50%
;
width
:
50%
;
position
:
relative
;
position
:
relative
;
top
:
1
5
0px
;
top
:
10px
;
}
}
#theme
{
#theme
{
position
:
relative
;
position
:
relative
;
...
...
home.
html
→
home.
php
View file @
f1f29dab
<?php
$name
=
''
;
$email
=
''
;
$message
=
''
;
if
(
$_POST
[
'submit'
])
{
$name
=
$_POST
[
'name'
];
$message
=
$_POST
[
'message'
];
$email
=
$_POST
[
'email'
];
}
$file_open
=
fopen
(
"contact_data.csv"
,
"a"
);
$no_rows
=
count
(
file
(
"contact_data.csv"
));
if
(
$no_rows
>
1
)
{
$no_rows
=
(
$no_rows
-
1
)
+
1
;
}
$form_data
=
array
(
'sr_no'
=>
$no_rows
,
$name
,
$email
,
$message
);
fputcsv
(
$file_open
,
$form_data
);
$error
=
'<label class="text-success">Thank you for contacting us</label>'
;
$name
=
''
;
$email
=
''
;
$subject
=
''
;
$message
=
''
;
?>
<!DOCTYPE html>
<!DOCTYPE html>
<!--
<!--
This is the front page of the unit calculator,
This is the front page of the unit calculator,
the user can choose between three themes:
the user can choose between three themes:
Simple, Fancy and Currency conversion
Simple, Fancy and Currency conversion
-->
-->
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<title>
Unit Calc.
</title>
<title>
Unit Calc.
</title>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"description"
content=
"Unit Calc."
>
<meta
name=
"description"
content=
"Unit Calc."
>
<meta
name=
"author"
content=
"Yusef,Zeyad"
>
<meta
name=
"author"
content=
"Yusef,Zeyad"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<!--Browsing for Tablet or Phone dimensions-->
<!--Browsing for Tablet or Phone dimensions-->
<link
rel=
"stylesheet"
href=
"css/style.css"
/>
<link
rel=
"stylesheet"
href=
"css/style.css"
/>
<style>
<style>
@import
url('https://fonts.googleapis.com/css?family=Passion+One|Roboto+Slab')
;
@import
url('https://fonts.googleapis.com/css?family=Passion+One|Roboto+Slab')
;
#myBtn
{
#myBtn
{
display
:
none
;
display
:
none
;
position
:
fixed
;
position
:
fixed
;
...
@@ -36,12 +66,15 @@ Simple, Fancy and Currency conversion
...
@@ -36,12 +66,15 @@ Simple, Fancy and Currency conversion
background-color
:
#555
;
background-color
:
#555
;
}
}
</style>
</style>
</head>
</head>
<body>
<body>
<button
onclick=
"topFunction()"
id=
"myBtn"
title=
"Go to top"
>
Top
</button>
<button
onclick=
"topFunction()"
id=
"myBtn"
title=
"Go to top"
>
Top
</button>
<script>
<script>
// When the user scrolls down 20px from the top of the document, show the button
// When the user scrolls down 20px from the top of the document, show the button
window
.
onscroll
=
function
()
{
scrollFunction
()};
window
.
onscroll
=
function
()
{
scrollFunction
()
};
function
scrollFunction
()
{
function
scrollFunction
()
{
if
(
document
.
body
.
scrollTop
>
20
||
document
.
documentElement
.
scrollTop
>
20
)
{
if
(
document
.
body
.
scrollTop
>
20
||
document
.
documentElement
.
scrollTop
>
20
)
{
...
@@ -58,19 +91,19 @@ Simple, Fancy and Currency conversion
...
@@ -58,19 +91,19 @@ Simple, Fancy and Currency conversion
}
}
</script>
</script>
<a
class=
"navbar"
>
<a
class=
"navbar"
>
<span
class
=
"open-slide"
>
<span
class
=
"open-slide"
>
<a
href=
"#"
onclick=
"openSlideMenu()"
>
<a
href=
"#"
onclick=
"openSlideMenu()"
>
<svg
width=
"30"
height=
"30"
>
<svg
width=
"30"
height=
"30"
>
<path
d=
"M0,5 30,5"
stroke=
"#000"
stroke-width=
"5"
/>
<path
d=
"M0,5 30,5"
stroke=
"#000"
stroke-width=
"5"
/>
<path
d=
"M0,14 30,14"
stroke=
"#000"
stroke-width=
"5"
/>
<path
d=
"M0,14 30,14"
stroke=
"#000"
stroke-width=
"5"
/>
<path
d=
"M0,23 30,23"
stroke=
"#000"
stroke-width=
"5"
/>
<path
d=
"M0,23 30,23"
stroke=
"#000"
stroke-width=
"5"
/>
</svg>
</svg>
</a>
</a>
</span>
</span>
</nav>
</nav>
<div
id=
"side-menu"
class=
"side-nav"
>
<div
id=
"side-menu"
class=
"side-nav"
>
<a
href=
"#"
class=
"btn-close"
onclick=
"closeSlideMenu()"
>
×
</a>
<a
href=
"#"
class=
"btn-close"
onclick=
"closeSlideMenu()"
>
×
</a>
<a
href
=
"#"
>
About Us
</a>
<a
href=
"#"
>
About Us
</a>
<a
href=
"categories/length.php"
>
Length
</a>
<a
href=
"categories/length.php"
>
Length
</a>
<a
href=
"categories/temperature.php"
>
Temperature
</a>
<a
href=
"categories/temperature.php"
>
Temperature
</a>
<a
href=
"categories/area.php"
>
Area
</a>
<a
href=
"categories/area.php"
>
Area
</a>
...
@@ -94,13 +127,13 @@ Simple, Fancy and Currency conversion
...
@@ -94,13 +127,13 @@ Simple, Fancy and Currency conversion
</section>
</section>
<div
id=
"main"
>
<div
id=
"main"
>
<div
class=
"inner"
>
<div
class=
"inner"
>
<div
id=
"items"
class
=
"box"
>
<div
id=
"items"
class
=
"box"
>
<div
class=
"box"
>
<div
class=
"box"
>
<a
href=
""
class=
"image fit"
><img
src=
"icons/length.png"
width=
"400"
height=
"355"
alt=
"Length"
/></a>
<a
href=
""
class=
"image fit"
><img
src=
"icons/length.png"
width=
"400"
height=
"355"
alt=
"Length"
/></a>
<div
class=
"inner"
>
<div
class=
"inner"
>
<h2>
Length
</h2>
<h2>
Length
</h2>
<a
href=
"categories/length.php"
class=
"button style3 fit"
>
Select
</a>
<a
href=
"categories/length.php"
class=
"button style3 fit"
>
Select
</a>
</div>
</div>
</div>
</div>
...
@@ -150,19 +183,19 @@ Simple, Fancy and Currency conversion
...
@@ -150,19 +183,19 @@ Simple, Fancy and Currency conversion
<div
class=
"inner"
>
<div
class=
"inner"
>
<section>
<section>
<h3>
Contact Us
</h3>
<h3>
Contact Us
</h3>
<form
method=
"POST"
action=
""
>
<form
id=
"Contact_form"
method=
"POST"
action=
""
>
<div
class=
"entry"
>
<div
class=
"entry"
>
<input
id=
"Input"
class=
"Input-text"
name=
"name"
placeholder=
"Name"
>
<input
id=
"Input-name"
class=
"Input-text"
name=
"name"
placeholder=
"Name"
required
>
<input
id=
"Input"
class=
"Input-text"
type=
"email"
name=
"email"
placeholder=
"Email"
>
<input
id=
"Input-email"
class=
"Input-text"
type=
"email"
name=
"email"
placeholder=
"Email"
required
>
<input
id=
"Input"
class=
"Input-text"
name=
"message"
placeholder=
"Message"
>
<input
id=
"Input-message"
class=
"Input-text"
name=
"message"
placeholder=
"Message"
required
>
</div>
</div>
<div
class=
"registerSubmit"
>
<div
class=
"registerSubmit"
>
<input
type=
"submit"
name=
"submit"
value=
"Submit"
>
<input
type=
"submit"
name=
"submit"
value=
"Submit"
>
</div>
</div>
</form>
</form>
<div
id=
"results"
></div>
</section>
</section>
</footer>
</footer>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ 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