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
65f819ed
authored
May 14, 2019
by
yuward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m
parent
14076830
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
30 deletions
calc/categories/area.php
calc/categories/options.php
calc/categories/temperature.php
calc/home.php
calc/login/login.php
calc/categories/area.php
View file @
65f819ed
...
...
@@ -44,29 +44,6 @@ if ($_POST['submit']) {
mysqli_close
(
$link
);
}
function
area_options
()
{
$area_options
=
array
(
"square_inches"
=>
0.0254
,
"square_feet"
=>
0.3048
,
"square_yards"
=>
0.9144
,
"square_miles"
=>
1609.344
,
"square_millimeters"
=>
0.001
,
"square_centimeters"
=>
0.01
,
"square_meters"
=>
1
,
"square_kilometers"
=>
1000
,
"acres"
=>
63.614907234075
,
"hectares"
=>
100
);
$choice
=
''
;
while
(
list
(
$k
,
$v
)
=
each
(
$area_options
))
{
$choice
.=
'<option value = "'
.
$k
.
'">'
.
$k
.
'</option>'
;
}
return
$choice
;
}
?>
<!DOCTYPE html>
...
...
calc/categories/options.php
View file @
65f819ed
<?php
function
length_options
(){
function
length_options
(){
$selected
=
'selected'
;
$length_options
=
array
(
"inches"
=>
0.0254
,
...
...
@@ -21,4 +21,25 @@ function length_options(){
return
$choice
;
}
function
area_options
()
{
$area_options
=
array
(
"square_inches"
=>
0.0254
,
"square_feet"
=>
0.3048
,
"square_yards"
=>
0.9144
,
"square_miles"
=>
1609.344
,
"square_millimeters"
=>
0.001
,
"square_centimeters"
=>
0.01
,
"square_meters"
=>
1
,
"square_kilometers"
=>
1000
,
"acres"
=>
63.614907234075
,
"hectares"
=>
100
);
$choice
=
''
;
while
(
list
(
$k
,
$v
)
=
each
(
$area_options
))
{
$choice
.=
'<option value = "'
.
$k
.
'">'
.
$k
.
'</option>'
;
}
return
$choice
;
}
?>
\ No newline at end of file
calc/categories/temperature.php
View file @
65f819ed
<?php
if
(
file_exists
(
'dbconnect.php'
))
{
if
(
file_exists
(
'dbconnect.php'
))
{
require
(
'dbconnect.php'
);
if
(
mysqli_connect_error
())
{
die
(
'Connect Error ('
.
mysqli_connect_errno
()
.
')'
.
mysqli_connect_error
());
}
}
}
//Add function file
if
(
file_exists
(
'../includes/functions.php'
))
{
require_once
(
'../includes/functions.php'
);
...
...
@@ -145,7 +145,7 @@ $temp_options = array(
$opt
=
optionize
(
$unit
);
echo
"<option value=
\"
{
$opt
}
\"
"
;
if
(
$from_unit
==
$opt
)
{
echo
"
selected"
;
echo
"selected"
;
}
echo
">
{
$unit
}
</option>"
;
}
...
...
calc/home.php
View file @
65f819ed
...
...
@@ -18,8 +18,8 @@ Simple, Fancy and Currency conversion
<meta
name=
"description"
content=
"Unit Calc."
>
<meta
name=
"author"
content=
"Yusef,Zeyad"
>
<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"
/>
<style>
@import
url('https://fonts.googleapis.com/css?family=Passion+One|Roboto+Slab')
;
...
...
calc/login/login.php
View file @
65f819ed
...
...
@@ -68,9 +68,9 @@ function protect($string){
$
(
"#login"
).
on
(
'click'
,
function
(){
var
username
=
$
(
"#username"
).
val
();
var
email
=
$
(
"#email"
).
val
();
var
password
=
$
(
"#password"
).
val
();
var
password
=
$
(
"#password"
).
val
();
var
continue
=
$
(
"#continue"
).
val
();
if
(
email
==
""
&&
password
==
""
&&
username
==
""
)
if
(
email
.
length
==
0
&&
password
.
length
==
0
&&
username
.
length
==
0
)
alert
(
'Please check input'
);
//continue;
else
{
...
...
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