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
a81b6ac3
authored
May 14, 2019
by
zekena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table
parent
d60108bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
34 deletions
calc/css/table.css
calc/entries.html
calc/includes/functions.php
other_calc/login/index.html
calc/css/table.css
0 → 100644
View file @
a81b6ac3
div
.blueTable
{
border
:
1px
solid
#1C6EA4
;
background-color
:
#EEEEEE
;
width
:
100%
;
text-align
:
left
;
border-collapse
:
collapse
;
}
.divTable.blueTable
.divTableCell
,
.divTable.blueTable
.divTableHead
{
border
:
1px
solid
#AAAAAA
;
padding
:
3px
2px
;
}
.divTable.blueTable
.divTableBody
.divTableCell
{
font-size
:
13px
;
}
.divTable.blueTable
.divTableRow
:nth-child
(
even
)
{
background
:
#D0E4F5
;
}
.divTable.blueTable
.divTableHeading
{
background
:
#1C6EA4
;
background
:
-moz-linear-gradient
(
top
,
#5592bb
0%
,
#327cad
66%
,
#1C6EA4
100%
);
background
:
-webkit-linear-gradient
(
top
,
#5592bb
0%
,
#327cad
66%
,
#1C6EA4
100%
);
background
:
linear-gradient
(
to
bottom
,
#5592bb
0%
,
#327cad
66%
,
#1C6EA4
100%
);
border-bottom
:
2px
solid
#444444
;
}
.divTable.blueTable
.divTableHeading
.divTableHead
{
font-size
:
15px
;
font-weight
:
bold
;
color
:
#FFFFFF
;
border-left
:
2px
solid
#D0E4F5
;
}
.divTable.blueTable
.divTableHeading
.divTableHead
:first-child
{
border-left
:
none
;
}
.blueTable
.tableFootStyle
{
font-size
:
14px
;
}
.blueTable
.tableFootStyle
.links
{
text-align
:
right
;
}
.blueTable
.tableFootStyle
.links
a
{
display
:
inline-block
;
background
:
#1C6EA4
;
color
:
#FFFFFF
;
padding
:
2px
8px
;
border-radius
:
5px
;
}
.blueTable.outerTableFooter
{
border-top
:
none
;
}
.blueTable.outerTableFooter
.tableFootStyle
{
padding
:
3px
5px
;
}
/* DivTable.com */
.divTable
{
display
:
table
;
}
.divTableRow
{
display
:
table-row
;
}
.divTableHeading
{
display
:
table-header-group
;}
.divTableCell
,
.divTableHead
{
display
:
table-cell
;}
.divTableHeading
{
display
:
table-header-group
;}
.divTableFoot
{
display
:
table-footer-group
;}
.divTableBody
{
display
:
table-row-group
;}
\ No newline at end of file
calc/entries.html
0 → 100644
View file @
a81b6ac3
<!DOCTYPE html>
<html
lang=
"en"
><head>
<meta
charset=
"utf-8"
>
<link
rel=
'stylesheet'
href=
'css/table.css'
type=
'text/css'
/>
<script
src=
"js/jquery-2.1.4.js"
></script>
<script
src=
"js/jquery.min.js"
></script>
<script
src=
"js/newjs_task.js"
></script>
</head>
<body>
<div
id=
"Table"
>
<div
class=
"divTable blueTable"
>
<div
class=
"divTableHeading"
>
<div
class=
"divTableRow"
>
<div
class=
"divTableHead"
>
head1
</div>
<div
class=
"divTableHead"
>
head2
</div>
<div
class=
"divTableHead"
>
head3
</div>
<div
class=
"divTableHead"
>
head4
</div>
<div
class=
"divTableHead"
>
head5
</div>
<div
class=
"divTableHead"
>
head6
</div>
</div>
</div>
<div
class=
"divTableBody"
>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_1
</div>
<div
class=
"divTableCell"
>
cell2_1
</div>
<div
class=
"divTableCell"
>
cell3_1
</div>
<div
class=
"divTableCell"
>
cell4_1
</div>
<div
class=
"divTableCell"
>
cell5_1
</div>
<div
class=
"divTableCell"
>
cell6_1
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_2
</div>
<div
class=
"divTableCell"
>
cell2_2
</div>
<div
class=
"divTableCell"
>
cell3_2
</div>
<div
class=
"divTableCell"
>
cell4_2
</div>
<div
class=
"divTableCell"
>
cell5_2
</div>
<div
class=
"divTableCell"
>
cell6_2
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_3
</div>
<div
class=
"divTableCell"
>
cell2_3
</div>
<div
class=
"divTableCell"
>
cell3_3
</div>
<div
class=
"divTableCell"
>
cell4_3
</div>
<div
class=
"divTableCell"
>
cell5_3
</div>
<div
class=
"divTableCell"
>
cell6_3
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_4
</div>
<div
class=
"divTableCell"
>
cell2_4
</div>
<div
class=
"divTableCell"
>
cell3_4
</div>
<div
class=
"divTableCell"
>
cell4_4
</div>
<div
class=
"divTableCell"
>
cell5_4
</div>
<div
class=
"divTableCell"
>
cell6_4
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_5
</div>
<div
class=
"divTableCell"
>
cell2_5
</div>
<div
class=
"divTableCell"
>
cell3_5
</div>
<div
class=
"divTableCell"
>
cell4_5
</div>
<div
class=
"divTableCell"
>
cell5_5
</div>
<div
class=
"divTableCell"
>
cell6_5
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_6
</div>
<div
class=
"divTableCell"
>
cell2_6
</div>
<div
class=
"divTableCell"
>
cell3_6
</div>
<div
class=
"divTableCell"
>
cell4_6
</div>
<div
class=
"divTableCell"
>
cell5_6
</div>
<div
class=
"divTableCell"
>
cell6_6
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_7
</div>
<div
class=
"divTableCell"
>
cell2_7
</div>
<div
class=
"divTableCell"
>
cell3_7
</div>
<div
class=
"divTableCell"
>
cell4_7
</div>
<div
class=
"divTableCell"
>
cell5_7
</div>
<div
class=
"divTableCell"
>
cell6_7
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_8
</div>
<div
class=
"divTableCell"
>
cell2_8
</div>
<div
class=
"divTableCell"
>
cell3_8
</div>
<div
class=
"divTableCell"
>
cell4_8
</div>
<div
class=
"divTableCell"
>
cell5_8
</div>
<div
class=
"divTableCell"
>
cell6_8
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_9
</div>
<div
class=
"divTableCell"
>
cell2_9
</div>
<div
class=
"divTableCell"
>
cell3_9
</div>
<div
class=
"divTableCell"
>
cell4_9
</div>
<div
class=
"divTableCell"
>
cell5_9
</div>
<div
class=
"divTableCell"
>
cell6_9
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_10
</div>
<div
class=
"divTableCell"
>
cell2_10
</div>
<div
class=
"divTableCell"
>
cell3_10
</div>
<div
class=
"divTableCell"
>
cell4_10
</div>
<div
class=
"divTableCell"
>
cell5_10
</div>
<div
class=
"divTableCell"
>
cell6_10
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_11
</div>
<div
class=
"divTableCell"
>
cell2_11
</div>
<div
class=
"divTableCell"
>
cell3_11
</div>
<div
class=
"divTableCell"
>
cell4_11
</div>
<div
class=
"divTableCell"
>
cell5_11
</div>
<div
class=
"divTableCell"
>
cell6_11
</div>
</div>
<div
class=
"divTableRow"
>
<div
class=
"divTableCell"
>
cell1_12
</div>
<div
class=
"divTableCell"
>
cell2_12
</div>
<div
class=
"divTableCell"
>
cell3_12
</div>
<div
class=
"divTableCell"
>
cell4_12
</div>
<div
class=
"divTableCell"
>
cell5_12
</div>
<div
class=
"divTableCell"
>
cell6_12
</div>
</div>
</div>
</div>
</div>
</body>
\ No newline at end of file
calc/includes/functions.php
View file @
a81b6ac3
...
@@ -44,7 +44,7 @@ define('VOLUME_TO_LITER' ,array(
...
@@ -44,7 +44,7 @@ define('VOLUME_TO_LITER' ,array(
"liters"
=>
1
,
"liters"
=>
1
,
"milliliters"
=>
0.001
,
"milliliters"
=>
0.001
,
));
));
// Using const with arrays requires PHP 5.6 or higher
const
MASS_TO_KILOGRAM
=
array
(
const
MASS_TO_KILOGRAM
=
array
(
"ounces"
=>
0.0283495
,
"ounces"
=>
0.0283495
,
"pounds"
=>
0.453592
,
"pounds"
=>
0.453592
,
...
@@ -68,6 +68,7 @@ function float_to_string($float, $precision=10) {
...
@@ -68,6 +68,7 @@ function float_to_string($float, $precision=10) {
return
$string
;
return
$string
;
}
}
// Length
// Length
// Convert every value to meters
function
convert_to_meters
(
$value
,
$from_unit
)
{
function
convert_to_meters
(
$value
,
$from_unit
)
{
if
(
array_key_exists
(
$from_unit
,
LENGTH_TO_METER
))
{
if
(
array_key_exists
(
$from_unit
,
LENGTH_TO_METER
))
{
return
$value
*
LENGTH_TO_METER
[
$from_unit
];
return
$value
*
LENGTH_TO_METER
[
$from_unit
];
...
@@ -242,4 +243,3 @@ function optionize($string){
...
@@ -242,4 +243,3 @@ function optionize($string){
return
str_replace
(
' '
,
'_'
,
strtolower
(
$string
));
return
str_replace
(
' '
,
'_'
,
strtolower
(
$string
));
}
}
?>
other_calc/login/index.html
View file @
a81b6ac3
...
@@ -92,38 +92,7 @@
...
@@ -92,38 +92,7 @@
<script
src=
"js/index.js"
></script>
<script
src=
"js/index.js"
></script>
<script
src=
"../js/jquery.js"
></script>
<script
src=
"../js/jquery.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
$
(
"#login"
).
on
(
'click'
,
function
(){
var
username
=
$
(
"#username"
).
val
();
var
email
=
$
(
"#email"
).
val
();
var
password
=
$
(
"#password"
).
val
();
if
(
email
==
""
||
password
==
""
||
username
==
""
)
alert
(
'Please check input'
);
else
{
$
.
ajax
(
{
url
:
'login.php'
,
method
:
'POST'
,
data
:
{
login
:
1
,
emailPHP
:
email
,
usernamePHP
:
username
,
passwordPHP
:
password
},
success
:
function
(
response
)
{
$
(
"#response"
).
html
(
response
);
if
(
response
.
indexOf
(
'success'
)
>-
1
){
window
.
location
=
'../home.php'
;
}
},
dataType
:
'text'
}
);
}
});
});
</script>
</body>
</body>
...
...
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