Add the front-end of the page

This commit is contained in:
mathieu committed 2018-12-12 15:04:47 +09:00
1 parent 3dfce942aa
commit 38c619544e
20 files changed
+619 -541

No files matched your search

+6 -1
View File
@@ -10,11 +10,16 @@ RewriteRule ^ - [L]
# RewriteCond %{HTTP_HOST} ^eldotravo.fr$
# RewriteRule ^(.*)$ http://www.eldotravo.fr/$1 [R=301,L,E=END:1]
# Redirection des fichiers static pour www.eldotravo.fr
# Redirection des fichiers static pour fitness.sanchez-mathieu.fr
RewriteCond %{HTTP_HOST} ^fitness.sanchez-mathieu.fr$
RewriteCond %{DOCUMENT_ROOT}/static%{REQUEST_URI} -f
RewriteRule ^(.*)$ static/$1 [L,E=END:1]
# Redirection des fichiers static pour fitness.sanchez-mathieu.test
RewriteCond %{HTTP_HOST} ^fitness.sanchez-mathieu.test$
RewriteCond %{DOCUMENT_ROOT}/static%{REQUEST_URI} -f
RewriteRule ^(.*)$ static/$1 [L,E=END:1]
# RewriteRule ^haute-garonne/toulouse/installation-entretien-climatisation /haute-garonne/toulouse/climatisation.php [L]
# Redirection de toutes les requêtes vers Index.php
+2 -2
View File
@@ -13,7 +13,7 @@ setlocale( LC_TIME, "fr_FR.UTF-8" );
error_reporting( E_ALL );
require( 'src/Lib/functions.php' );
require( 'src/config.php' );
require( 'src/Config.php' );
require 'src/Autoloader.php';
Autoloader::register();
@@ -35,7 +35,7 @@ if ( count( $pages ) > 1 && $pages[ count( $pages ) - 1 ] == '' ) {
if ( $pages[ 0 ] == 'api' && isset( $pages[ 1 ] ) && preg_match( '#^([a-z]+)$#', $pages[ 1 ], $api1 ) && isset( $pages[ 2 ] ) && preg_match( '#^([a-z-]+)$#', $pages[ 2 ], $api2 ) ) {
new APIRouter( $api1[ 0 ], $api2[ 0 ] );
} else if ( preg_match( '#^test\.dev$#', $_SERVER['SERVER_NAME'] ) ) {
} else if ( preg_match( '#^fitness.sanchez-mathieu\.test$#', $_SERVER[ 'SERVER_NAME' ] ) || preg_match( '#^fitness.sanchez-mathieu\.fr$#', $_SERVER[ 'SERVER_NAME' ] ) ) {
new SiteRouter( $pages );
} else {
new Error( 404 );
+2 -1
View File
@@ -14,7 +14,8 @@ class APIError extends Controller {
* @param string $publicMessage
* @param string $code
*/
public function __construct( int $ErrCode = 500, string $devMessage = 'Erreur inconnue', string $publicMessage = 'Une erreur inconnue s\'est produite', string $code = '' ) {
public function __construct( int $ErrCode = 500, string $devMessage = 'Erreur inconnue',
string $publicMessage = 'Une erreur inconnue s\'est produite', string $code = '' ) {
parent::__construct();
$tabCode = [
+3 -3
View File
@@ -6,9 +6,9 @@ class Config {
const SITE_JS_VERSION = '1.00';
const SITE_CSS_VERSION = '1.00';
const TITLE_HEADER = 'Mon titre de site';
const DESCRIPTION_HEADER = 'Ma description pour les robots';
const TITLE_HEADER = 'Fitness';
const DESCRIPTION_HEADER = 'Site for find all the fitness exercise you need';
const NAMESPACE = 'WebProjectFitness';
const FAVICON_PATH = '/img/favicon.png';
const FAVICON_PATH = '/img/favicon.ico';
}
+462 -461
View File
@@ -964,6 +964,106 @@ class PHPMailer {
return $addresses;
}
/**
* Check that a string looks like an email address.
*
* @param string $address The email address to check
* @param string $patternselect A selector for the validation pattern to use :
* * `auto` Pick best pattern automatically;
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
* * `pcre` Use old PCRE implementation;
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
* * `noregex` Don't use a regex: super fast, really dumb.
*
* @return boolean
* @static
* @access public
*/
public static function validateAddress( $address, $patternselect = 'auto' ) {
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
if ( strpos( $address, "\n" ) !== false or strpos( $address, "\r" ) !== false ) {
return false;
}
if ( !$patternselect or $patternselect == 'auto' ) {
//Check this constant first so it works when extension_loaded() is disabled by safe mode
//Constant was added in PHP 5.2.4
if ( defined( 'PCRE_VERSION' ) ) {
//This pattern can get stuck in a recursive loop in PCRE <= 8.0.2
if ( version_compare( PCRE_VERSION, '8.0.3' ) >= 0 ) {
$patternselect = 'pcre8';
} else {
$patternselect = 'pcre';
}
} elseif ( function_exists( 'extension_loaded' ) and extension_loaded( 'pcre' ) ) {
//Fall back to older PCRE
$patternselect = 'pcre';
} else {
//Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension
if ( version_compare( PHP_VERSION, '5.2.0' ) >= 0 ) {
$patternselect = 'php';
} else {
$patternselect = 'noregex';
}
}
}
switch ( $patternselect ) {
case 'pcre8':
/**
* Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains.
* @link http://squiloople.com/2009/12/20/email-address-validation/
* @copyright 2009-2010 Michael Rushton
* Feel free to use and redistribute this code. But please keep this copyright notice.
*/
return (boolean)preg_match(
'/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
'((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
'(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
'([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
'(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
'(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
'|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
'|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
'|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
$address
);
case 'pcre':
//An older regex that doesn't need a recent PCRE
return (boolean)preg_match(
'/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' .
'[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' .
'(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' .
'@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' .
'(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' .
'[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' .
'::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' .
'[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' .
'::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
'|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD',
$address
);
case 'html5':
/**
* This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
* @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
*/
return (boolean)preg_match(
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
'[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
$address
);
case 'noregex':
//No PCRE! Do something _very_ approximate!
//Check the address is 3 chars or longer and contains an @ that's not the first or last char
return ( strlen( $address ) >= 3
and strpos( $address, '@' ) >= 1
and strpos( $address, '@' ) != strlen( $address ) - 1 );
case 'php':
default:
return (boolean)filter_var( $address, FILTER_VALIDATE_EMAIL );
}
}
/**
* Set the From and FromName properties.
*
@@ -1536,6 +1636,176 @@ class PHPMailer {
}
}
/**
* Word-wrap message.
* For use with mailers that do not automatically perform wrapping
* and for quoted-printable encoded messages.
* Original written by philippe.
*
* @param string $message The message to wrap
* @param integer $length The line length to wrap to
* @param boolean $qp_mode Whether to run in Quoted-Printable mode
*
* @access public
* @return string
*/
public function wrapText( $message, $length, $qp_mode = false ) {
if ( $qp_mode ) {
$soft_break = sprintf( ' =%s', $this->LE );
} else {
$soft_break = $this->LE;
}
// If utf-8 encoding is used, we will need to make sure we don't
// split multibyte characters when we wrap
$is_utf8 = ( strtolower( $this->CharSet ) == 'utf-8' );
$lelen = strlen( $this->LE );
$crlflen = strlen( self::CRLF );
$message = $this->fixEOL( $message );
//Remove a trailing line break
if ( substr( $message, -$lelen ) == $this->LE ) {
$message = substr( $message, 0, -$lelen );
}
//Split message into lines
$lines = explode( $this->LE, $message );
//Message will be rebuilt in here
$message = '';
foreach ( $lines as $line ) {
$words = explode( ' ', $line );
$buf = '';
$firstword = true;
foreach ( $words as $word ) {
if ( $qp_mode and ( strlen( $word ) > $length ) ) {
$space_left = $length - strlen( $buf ) - $crlflen;
if ( !$firstword ) {
if ( $space_left > 20 ) {
$len = $space_left;
if ( $is_utf8 ) {
$len = $this->utf8CharBoundary( $word, $len );
} elseif ( substr( $word, $len - 1, 1 ) == '=' ) {
$len--;
} elseif ( substr( $word, $len - 2, 1 ) == '=' ) {
$len -= 2;
}
$part = substr( $word, 0, $len );
$word = substr( $word, $len );
$buf .= ' ' . $part;
$message .= $buf . sprintf( '=%s', self::CRLF );
} else {
$message .= $buf . $soft_break;
}
$buf = '';
}
while ( strlen( $word ) > 0 ) {
if ( $length <= 0 ) {
break;
}
$len = $length;
if ( $is_utf8 ) {
$len = $this->utf8CharBoundary( $word, $len );
} elseif ( substr( $word, $len - 1, 1 ) == '=' ) {
$len--;
} elseif ( substr( $word, $len - 2, 1 ) == '=' ) {
$len -= 2;
}
$part = substr( $word, 0, $len );
$word = substr( $word, $len );
if ( strlen( $word ) > 0 ) {
$message .= $part . sprintf( '=%s', self::CRLF );
} else {
$buf = $part;
}
}
} else {
$buf_o = $buf;
if ( !$firstword ) {
$buf .= ' ';
}
$buf .= $word;
if ( strlen( $buf ) > $length and $buf_o != '' ) {
$message .= $buf_o . $soft_break;
$buf = $word;
}
}
$firstword = false;
}
$message .= $buf . self::CRLF;
}
return $message;
}
/**
* Ensure consistent line endings in a string.
* Changes every end of line from CRLF, CR or LF to $this->LE.
* @access public
*
* @param string $str String to fixEOL
*
* @return string
*/
public function fixEOL( $str ) {
// Normalise to \n
$nstr = str_replace( array( "\r\n", "\r" ), "\n", $str );
// Now convert LE as needed
if ( $this->LE !== "\n" ) {
$nstr = str_replace( "\n", $this->LE, $nstr );
}
return $nstr;
}
/**
* Find the last character boundary prior to $maxLength in a utf-8
* quoted-printable encoded string.
* Original written by Colin Brown.
* @access public
*
* @param string $encodedText utf-8 QP text
* @param integer $maxLength Find the last character boundary prior to this length
*
* @return integer
*/
public function utf8CharBoundary( $encodedText, $maxLength ) {
$foundSplitPos = false;
$lookBack = 3;
while ( !$foundSplitPos ) {
$lastChunk = substr( $encodedText, $maxLength - $lookBack, $lookBack );
$encodedCharPos = strpos( $lastChunk, '=' );
if ( false !== $encodedCharPos ) {
// Found start of encoded character byte within $lookBack block.
// Check the encoded byte value (the 2 chars after the '=')
$hex = substr( $encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2 );
$dec = hexdec( $hex );
if ( $dec < 128 ) {
// Single byte character.
// If the encoded char was found at pos 0, it will fit
// otherwise reduce maxLength to start of the encoded char
if ( $encodedCharPos > 0 ) {
$maxLength = $maxLength - ( $lookBack - $encodedCharPos );
}
$foundSplitPos = true;
} elseif ( $dec >= 192 ) {
// First byte of a multi byte character
// Reduce maxLength to split at start of character
$maxLength = $maxLength - ( $lookBack - $encodedCharPos );
$foundSplitPos = true;
} elseif ( $dec < 192 ) {
// Middle byte of a multi byte character, look further back
$lookBack += 3;
}
} else {
// No encoded character found
$foundSplitPos = true;
}
}
return $maxLength;
}
/**
* Detect if a string contains a line longer than the maximum line length allowed.
*
@@ -1772,6 +2042,196 @@ class PHPMailer {
return implode( '', $mime );
}
/**
* Encode a header string optimally.
* Picks shortest of Q, B, quoted-printable or none.
* @access public
*
* @param string $str
* @param string $position
*
* @return string
*/
public function encodeHeader( $str, $position = 'text' ) {
$matchcount = 0;
switch ( strtolower( $position ) ) {
case 'phrase':
if ( !preg_match( '/[\200-\377]/', $str ) ) {
// Can't use addslashes as we don't know the value of magic_quotes_sybase
$encoded = addcslashes( $str, "\0..\37\177\\\"" );
if ( ( $str == $encoded ) && !preg_match( '/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str ) ) {
return ( $encoded );
} else {
return ( "\"$encoded\"" );
}
}
$matchcount = preg_match_all( '/[^\040\041\043-\133\135-\176]/', $str, $matches );
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'comment':
$matchcount = preg_match_all( '/[()"]/', $str, $matches );
// Intentional fall-through
case 'text':
default:
$matchcount += preg_match_all( '/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches );
break;
}
//There are no chars that need encoding
if ( $matchcount == 0 ) {
return ( $str );
}
$maxlen = 75 - 7 - strlen( $this->CharSet );
// Try to select the encoding which should produce the shortest output
if ( $matchcount > strlen( $str ) / 3 ) {
// More than a third of the content will need encoding, so B encoding will be most efficient
$encoding = 'B';
if ( function_exists( 'mb_strlen' ) && $this->hasMultiBytes( $str ) ) {
// Use a custom function which correctly encodes and wraps long
// multibyte strings without breaking lines within a character
$encoded = $this->base64EncodeWrapMB( $str, "\n" );
} else {
$encoded = base64_encode( $str );
$maxlen -= $maxlen % 4;
$encoded = trim( chunk_split( $encoded, $maxlen, "\n" ) );
}
} else {
$encoding = 'Q';
$encoded = $this->encodeQ( $str, $position );
$encoded = $this->wrapText( $encoded, $maxlen, true );
$encoded = str_replace( '=' . self::CRLF, "\n", trim( $encoded ) );
}
$encoded = preg_replace( '/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded );
$encoded = trim( str_replace( "\n", $this->LE, $encoded ) );
return $encoded;
}
/**
* Check if a string contains multi-byte characters.
* @access public
*
* @param string $str multi-byte text to wrap encode
*
* @return boolean
*/
public function hasMultiBytes( $str ) {
if ( function_exists( 'mb_strlen' ) ) {
return ( strlen( $str ) > mb_strlen( $str, $this->CharSet ) );
} else { // Assume no multibytes (we can't handle without mbstring functions anyway)
return false;
}
}
/**
* Encode and wrap long multibyte strings for mail headers
* without breaking lines within a character.
* Adapted from a function by paravoid
* @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
* @access public
*
* @param string $str multi-byte text to wrap encode
* @param string $linebreak string to use as linefeed/end-of-line
*
* @return string
*/
public function base64EncodeWrapMB( $str, $linebreak = null ) {
$start = '=?' . $this->CharSet . '?B?';
$end = '?=';
$encoded = '';
if ( $linebreak === null ) {
$linebreak = $this->LE;
}
$mb_length = mb_strlen( $str, $this->CharSet );
// Each line must have length <= 75, including $start and $end
$length = 75 - strlen( $start ) - strlen( $end );
// Average multi-byte ratio
$ratio = $mb_length / strlen( $str );
// Base64 has a 4:3 ratio
$avgLength = floor( $length * $ratio * .75 );
for ( $i = 0; $i < $mb_length; $i += $offset ) {
$lookBack = 0;
do {
$offset = $avgLength - $lookBack;
$chunk = mb_substr( $str, $i, $offset, $this->CharSet );
$chunk = base64_encode( $chunk );
$lookBack++;
} while ( strlen( $chunk ) > $length );
$encoded .= $chunk . $linebreak;
}
// Chomp the last linefeed
$encoded = substr( $encoded, 0, -strlen( $linebreak ) );
return $encoded;
}
/**
* Encode a string using Q encoding.
* @link http://tools.ietf.org/html/rfc2047
*
* @param string $str the text to encode
* @param string $position Where the text is going to be used, see the RFC for what that means
*
* @access public
* @return string
*/
public function encodeQ( $str, $position = 'text' ) {
// There should not be any EOL in the string
$pattern = '';
$encoded = str_replace( array( "\r", "\n" ), '', $str );
switch ( strtolower( $position ) ) {
case 'phrase':
// RFC 2047 section 5.3
$pattern = '^A-Za-z0-9!*+\/ -';
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'comment':
// RFC 2047 section 5.2
$pattern = '\(\)"';
// intentional fall-through
// for this reason we build the $pattern without including delimiters and []
case 'text':
default:
// RFC 2047 section 5.1
// Replace every high ascii, control, =, ? and _ characters
$pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern;
break;
}
$matches = array();
if ( preg_match_all( "/[{$pattern}]/", $encoded, $matches ) ) {
// If the string contains an '=', make sure it's the first thing we replace
// so as to avoid double-encoding
$eqkey = array_search( '=', $matches[ 0 ] );
if ( false !== $eqkey ) {
unset( $matches[ 0 ][ $eqkey ] );
array_unshift( $matches[ 0 ], '=' );
}
foreach ( array_unique( $matches[ 0 ] ) as $char ) {
$encoded = str_replace( $char, '=' . sprintf( '%02X', ord( $char ) ), $encoded );
}
}
// Replace every spaces to _ (more readable than =20)
return str_replace( ' ', '_', $encoded );
}
/**
* Strip newlines to prevent header injection.
* @access public
*
* @param string $str
*
* @return string
*/
public function secureHeader( $str ) {
return trim( str_replace( array( "\r", "\n" ), '', $str ) );
}
/**
* Check if an error occurred.
* @access public
@@ -2595,366 +3055,6 @@ class PHPMailer {
return $result;
}
/**
* Strip newlines to prevent header injection.
* @access public
*
* @param string $str
*
* @return string
*/
public function secureHeader( $str ) {
return trim( str_replace( array( "\r", "\n" ), '', $str ) );
}
/**
* Encode a header string optimally.
* Picks shortest of Q, B, quoted-printable or none.
* @access public
*
* @param string $str
* @param string $position
*
* @return string
*/
public function encodeHeader( $str, $position = 'text' ) {
$matchcount = 0;
switch ( strtolower( $position ) ) {
case 'phrase':
if ( ! preg_match( '/[\200-\377]/', $str ) ) {
// Can't use addslashes as we don't know the value of magic_quotes_sybase
$encoded = addcslashes( $str, "\0..\37\177\\\"" );
if ( ( $str == $encoded ) && ! preg_match( '/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str ) ) {
return ( $encoded );
} else {
return ( "\"$encoded\"" );
}
}
$matchcount = preg_match_all( '/[^\040\041\043-\133\135-\176]/', $str, $matches );
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'comment':
$matchcount = preg_match_all( '/[()"]/', $str, $matches );
// Intentional fall-through
case 'text':
default:
$matchcount += preg_match_all( '/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches );
break;
}
//There are no chars that need encoding
if ( $matchcount == 0 ) {
return ( $str );
}
$maxlen = 75 - 7 - strlen( $this->CharSet );
// Try to select the encoding which should produce the shortest output
if ( $matchcount > strlen( $str ) / 3 ) {
// More than a third of the content will need encoding, so B encoding will be most efficient
$encoding = 'B';
if ( function_exists( 'mb_strlen' ) && $this->hasMultiBytes( $str ) ) {
// Use a custom function which correctly encodes and wraps long
// multibyte strings without breaking lines within a character
$encoded = $this->base64EncodeWrapMB( $str, "\n" );
} else {
$encoded = base64_encode( $str );
$maxlen -= $maxlen % 4;
$encoded = trim( chunk_split( $encoded, $maxlen, "\n" ) );
}
} else {
$encoding = 'Q';
$encoded = $this->encodeQ( $str, $position );
$encoded = $this->wrapText( $encoded, $maxlen, true );
$encoded = str_replace( '=' . self::CRLF, "\n", trim( $encoded ) );
}
$encoded = preg_replace( '/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded );
$encoded = trim( str_replace( "\n", $this->LE, $encoded ) );
return $encoded;
}
/**
* Check if a string contains multi-byte characters.
* @access public
*
* @param string $str multi-byte text to wrap encode
*
* @return boolean
*/
public function hasMultiBytes( $str ) {
if ( function_exists( 'mb_strlen' ) ) {
return ( strlen( $str ) > mb_strlen( $str, $this->CharSet ) );
} else { // Assume no multibytes (we can't handle without mbstring functions anyway)
return false;
}
}
/**
* Encode and wrap long multibyte strings for mail headers
* without breaking lines within a character.
* Adapted from a function by paravoid
* @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
* @access public
*
* @param string $str multi-byte text to wrap encode
* @param string $linebreak string to use as linefeed/end-of-line
*
* @return string
*/
public function base64EncodeWrapMB( $str, $linebreak = null ) {
$start = '=?' . $this->CharSet . '?B?';
$end = '?=';
$encoded = '';
if ( $linebreak === null ) {
$linebreak = $this->LE;
}
$mb_length = mb_strlen( $str, $this->CharSet );
// Each line must have length <= 75, including $start and $end
$length = 75 - strlen( $start ) - strlen( $end );
// Average multi-byte ratio
$ratio = $mb_length / strlen( $str );
// Base64 has a 4:3 ratio
$avgLength = floor( $length * $ratio * .75 );
for ( $i = 0; $i < $mb_length; $i += $offset ) {
$lookBack = 0;
do {
$offset = $avgLength - $lookBack;
$chunk = mb_substr( $str, $i, $offset, $this->CharSet );
$chunk = base64_encode( $chunk );
$lookBack ++;
} while ( strlen( $chunk ) > $length );
$encoded .= $chunk . $linebreak;
}
// Chomp the last linefeed
$encoded = substr( $encoded, 0, - strlen( $linebreak ) );
return $encoded;
}
/**
* Encode a string using Q encoding.
* @link http://tools.ietf.org/html/rfc2047
*
* @param string $str the text to encode
* @param string $position Where the text is going to be used, see the RFC for what that means
*
* @access public
* @return string
*/
public function encodeQ( $str, $position = 'text' ) {
// There should not be any EOL in the string
$pattern = '';
$encoded = str_replace( array( "\r", "\n" ), '', $str );
switch ( strtolower( $position ) ) {
case 'phrase':
// RFC 2047 section 5.3
$pattern = '^A-Za-z0-9!*+\/ -';
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'comment':
// RFC 2047 section 5.2
$pattern = '\(\)"';
// intentional fall-through
// for this reason we build the $pattern without including delimiters and []
case 'text':
default:
// RFC 2047 section 5.1
// Replace every high ascii, control, =, ? and _ characters
$pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern;
break;
}
$matches = array();
if ( preg_match_all( "/[{$pattern}]/", $encoded, $matches ) ) {
// If the string contains an '=', make sure it's the first thing we replace
// so as to avoid double-encoding
$eqkey = array_search( '=', $matches[0] );
if ( false !== $eqkey ) {
unset( $matches[0][ $eqkey ] );
array_unshift( $matches[0], '=' );
}
foreach ( array_unique( $matches[0] ) as $char ) {
$encoded = str_replace( $char, '=' . sprintf( '%02X', ord( $char ) ), $encoded );
}
}
// Replace every spaces to _ (more readable than =20)
return str_replace( ' ', '_', $encoded );
}
/**
* Word-wrap message.
* For use with mailers that do not automatically perform wrapping
* and for quoted-printable encoded messages.
* Original written by philippe.
*
* @param string $message The message to wrap
* @param integer $length The line length to wrap to
* @param boolean $qp_mode Whether to run in Quoted-Printable mode
*
* @access public
* @return string
*/
public function wrapText( $message, $length, $qp_mode = false ) {
if ( $qp_mode ) {
$soft_break = sprintf( ' =%s', $this->LE );
} else {
$soft_break = $this->LE;
}
// If utf-8 encoding is used, we will need to make sure we don't
// split multibyte characters when we wrap
$is_utf8 = ( strtolower( $this->CharSet ) == 'utf-8' );
$lelen = strlen( $this->LE );
$crlflen = strlen( self::CRLF );
$message = $this->fixEOL( $message );
//Remove a trailing line break
if ( substr( $message, - $lelen ) == $this->LE ) {
$message = substr( $message, 0, - $lelen );
}
//Split message into lines
$lines = explode( $this->LE, $message );
//Message will be rebuilt in here
$message = '';
foreach ( $lines as $line ) {
$words = explode( ' ', $line );
$buf = '';
$firstword = true;
foreach ( $words as $word ) {
if ( $qp_mode and ( strlen( $word ) > $length ) ) {
$space_left = $length - strlen( $buf ) - $crlflen;
if ( ! $firstword ) {
if ( $space_left > 20 ) {
$len = $space_left;
if ( $is_utf8 ) {
$len = $this->utf8CharBoundary( $word, $len );
} elseif ( substr( $word, $len - 1, 1 ) == '=' ) {
$len --;
} elseif ( substr( $word, $len - 2, 1 ) == '=' ) {
$len -= 2;
}
$part = substr( $word, 0, $len );
$word = substr( $word, $len );
$buf .= ' ' . $part;
$message .= $buf . sprintf( '=%s', self::CRLF );
} else {
$message .= $buf . $soft_break;
}
$buf = '';
}
while ( strlen( $word ) > 0 ) {
if ( $length <= 0 ) {
break;
}
$len = $length;
if ( $is_utf8 ) {
$len = $this->utf8CharBoundary( $word, $len );
} elseif ( substr( $word, $len - 1, 1 ) == '=' ) {
$len --;
} elseif ( substr( $word, $len - 2, 1 ) == '=' ) {
$len -= 2;
}
$part = substr( $word, 0, $len );
$word = substr( $word, $len );
if ( strlen( $word ) > 0 ) {
$message .= $part . sprintf( '=%s', self::CRLF );
} else {
$buf = $part;
}
}
} else {
$buf_o = $buf;
if ( ! $firstword ) {
$buf .= ' ';
}
$buf .= $word;
if ( strlen( $buf ) > $length and $buf_o != '' ) {
$message .= $buf_o . $soft_break;
$buf = $word;
}
}
$firstword = false;
}
$message .= $buf . self::CRLF;
}
return $message;
}
/**
* Ensure consistent line endings in a string.
* Changes every end of line from CRLF, CR or LF to $this->LE.
* @access public
*
* @param string $str String to fixEOL
*
* @return string
*/
public function fixEOL( $str ) {
// Normalise to \n
$nstr = str_replace( array( "\r\n", "\r" ), "\n", $str );
// Now convert LE as needed
if ( $this->LE !== "\n" ) {
$nstr = str_replace( "\n", $this->LE, $nstr );
}
return $nstr;
}
/**
* Find the last character boundary prior to $maxLength in a utf-8
* quoted-printable encoded string.
* Original written by Colin Brown.
* @access public
*
* @param string $encodedText utf-8 QP text
* @param integer $maxLength Find the last character boundary prior to this length
*
* @return integer
*/
public function utf8CharBoundary( $encodedText, $maxLength ) {
$foundSplitPos = false;
$lookBack = 3;
while ( ! $foundSplitPos ) {
$lastChunk = substr( $encodedText, $maxLength - $lookBack, $lookBack );
$encodedCharPos = strpos( $lastChunk, '=' );
if ( false !== $encodedCharPos ) {
// Found start of encoded character byte within $lookBack block.
// Check the encoded byte value (the 2 chars after the '=')
$hex = substr( $encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2 );
$dec = hexdec( $hex );
if ( $dec < 128 ) {
// Single byte character.
// If the encoded char was found at pos 0, it will fit
// otherwise reduce maxLength to start of the encoded char
if ( $encodedCharPos > 0 ) {
$maxLength = $maxLength - ( $lookBack - $encodedCharPos );
}
$foundSplitPos = true;
} elseif ( $dec >= 192 ) {
// First byte of a multi byte character
// Reduce maxLength to split at start of character
$maxLength = $maxLength - ( $lookBack - $encodedCharPos );
$foundSplitPos = true;
} elseif ( $dec < 192 ) {
// Middle byte of a multi byte character, look further back
$lookBack += 3;
}
} else {
// No encoded character found
$foundSplitPos = true;
}
}
return $maxLength;
}
/**
* Get the array of strings for the current language.
* @return array
@@ -3537,7 +3637,8 @@ class PHPMailer {
*
* @return boolean True on successfully adding an attachment
*/
public function addEmbeddedImage( $path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline' ) {
public function addEmbeddedImage( $path, $cid, $name = '', $encoding = 'base64', $type = '',
$disposition = 'inline' ) {
if ( !@is_file( $path ) ) {
$this->setError( $this->lang( 'file_access' ) . $path );
@@ -3777,106 +3878,6 @@ class PHPMailer {
return false;
}
/**
* Check that a string looks like an email address.
*
* @param string $address The email address to check
* @param string $patternselect A selector for the validation pattern to use :
* * `auto` Pick best pattern automatically;
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
* * `pcre` Use old PCRE implementation;
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
* * `noregex` Don't use a regex: super fast, really dumb.
*
* @return boolean
* @static
* @access public
*/
public static function validateAddress( $address, $patternselect = 'auto' ) {
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
if ( strpos( $address, "\n" ) !== false or strpos( $address, "\r" ) !== false ) {
return false;
}
if ( ! $patternselect or $patternselect == 'auto' ) {
//Check this constant first so it works when extension_loaded() is disabled by safe mode
//Constant was added in PHP 5.2.4
if ( defined( 'PCRE_VERSION' ) ) {
//This pattern can get stuck in a recursive loop in PCRE <= 8.0.2
if ( version_compare( PCRE_VERSION, '8.0.3' ) >= 0 ) {
$patternselect = 'pcre8';
} else {
$patternselect = 'pcre';
}
} elseif ( function_exists( 'extension_loaded' ) and extension_loaded( 'pcre' ) ) {
//Fall back to older PCRE
$patternselect = 'pcre';
} else {
//Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension
if ( version_compare( PHP_VERSION, '5.2.0' ) >= 0 ) {
$patternselect = 'php';
} else {
$patternselect = 'noregex';
}
}
}
switch ( $patternselect ) {
case 'pcre8':
/**
* Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains.
* @link http://squiloople.com/2009/12/20/email-address-validation/
* @copyright 2009-2010 Michael Rushton
* Feel free to use and redistribute this code. But please keep this copyright notice.
*/
return (boolean) preg_match(
'/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
'((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
'(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
'([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
'(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
'(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
'|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
'|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
'|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
$address
);
case 'pcre':
//An older regex that doesn't need a recent PCRE
return (boolean) preg_match(
'/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' .
'[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' .
'(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' .
'@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' .
'(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' .
'[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' .
'::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' .
'[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' .
'::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
'|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD',
$address
);
case 'html5':
/**
* This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
* @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
*/
return (boolean) preg_match(
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
'[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
$address
);
case 'noregex':
//No PCRE! Do something _very_ approximate!
//Check the address is 3 chars or longer and contains an @ that's not the first or last char
return ( strlen( $address ) >= 3
and strpos( $address, '@' ) >= 1
and strpos( $address, '@' ) != strlen( $address ) - 1 );
case 'php':
default:
return (boolean) filter_var( $address, FILTER_VALIDATE_EMAIL );
}
}
}
/**
+1 -1
View File
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//FR" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body class="body" style="background-color: whitesmoke !important;padding: 40px 0;line-height: 22px;width: 100%;">
<div class="contain"
+9 -4
View File
@@ -6,10 +6,15 @@ use Exception;
use PDO;
class BDD {
const SQL_SERVER = 'http://web3.pulseheberg.net'; // BDD Server
const SQL_LOGIN = 'why7n0_fitness'; // BDD Login
const SQL_PASSWORD = 'KpB728zu'; // BDD Password
const SQL_DB = 'why7n0_fitness'; // BDD Name
// const SQL_SERVER = 'http://web3.pulseheberg.net'; // BDD Server
// const SQL_LOGIN = 'why7n0_fitness'; // BDD Login
// const SQL_PASSWORD = 'KpB728zu'; // BDD Password
// const SQL_DB = 'why7n0_fitness'; // BDD Name
const SQL_SERVER = 'localhost'; // BDD Server
const SQL_LOGIN = 'root'; // BDD Login
const SQL_PASSWORD = ''; // BDD Password
const SQL_DB = 'fitness'; // BDD Name
private static $bdd;
+3 -2
View File
@@ -41,7 +41,8 @@ class Logs {
* @param string|null $line
* @param string|null $date
*/
public function __construct( int $id = null, string $level = null, string $message = null, string $file = null, string $line = null, string $date = null ) {
public function __construct( int $id = null, string $level = null, string $message = null, string $file = null,
string $line = null, string $date = null ) {
if ( $id === null ) {
return;
}
@@ -74,7 +75,7 @@ class Logs {
public static function getLastLogs( int $limit ) {
$req = BDD::instance()->prepare( 'SELECT *
FROM ' . BDTables::LOGS . '
ORDER BY date DESC
ORDER BY `date` DESC
LIMIT :limit' );
$req->bindValue( 'limit', $limit, PDO::PARAM_INT );
$req->execute();
+30 -2
View File
@@ -1,3 +1,31 @@
<div>
Bonjour 2
<div class="row" style="margin-bottom: 0">
<div class="col s2 green lighten-1 white-text" style="height: 750px;">
<div class="row">
<div class="col s12 center-align">
<h5>Selected part of the body</h5>
</div>
<div class="col s12">
<img src="/img/muscles.jpg" style="width: 100%;">
</div>
<div class="col s12" id="list-exercices-select-part">
<div class="container">
<h5>Exercise List</h5>
<div>Please select a muscle</div>
</div>
</div>
</div>
</div>
<div class="col s10">
<div class="container">
<h2>Title</h2>
<div class="center-align">
<iframe width="560" height="315" src="https://www.youtube.com/embed/1gLmEOSwQMs" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
<div class="exercise-info-container blue-grey lighten-4 left-align">
Test
</div>
</div>
</div>
</div>
</div>
+14 -3
View File
@@ -1,6 +1,17 @@
<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/javascript.js?v=<?= WebProjectFitness\Config::SITE_JS_VERSION ?>"></script>
<link href="/css/style.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
</main>
<footer class="page-footer green darken-3">
<div class="footer-copyright">
<div class="container">
Made by <a class="blue-text text-lighten-3" target="_blank" href="https://www.sanchez-mathieu.fr">Mathieu
Sanchez</a>, Pablo Berenguel, Anthony Andrianjatovo and Najib Kardjoudj
</div>
</div>
</footer>
<script src="/js/jquery-3.3.1.min.js"></script>
<script async src="/js/materialize.min.js"></script>
<script async src="/js/javascript.js?v=<?= WebProjectFitness\Config::SITE_JS_VERSION ?>"></script>
</body>
</html>
+35 -7
View File
@@ -10,7 +10,7 @@
<meta name="apple-mobile-web-app-status-bar-style" id="status-bar" content="white-translucent">
<meta name="format-detection" content="telephone=no">
<meta name="author" content="Eldotravo">
<meta name="author" content="Mathieu Sanchez">
<title><?= $this->head[ 'title' ] ?></title>
<meta name="description" content="<?= $this->head[ 'description' ] ?>">
@@ -18,17 +18,19 @@
<meta property="og:title" content="<?= $this->head[ 'title' ] ?>"/>
<meta property="og:description" content="<?= $this->head[ 'description' ] ?>"/>
<meta property="og:url" content="https://<?= $_SERVER[ 'SERVER_NAME' ] . $_SERVER[ 'REQUEST_URI' ] ?>"/>
<meta property="og:image" content="https://<?= $_SERVER['SERVER_NAME'] . \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<meta property="og:image"
content="//<?= $_SERVER[ 'SERVER_NAME' ] . \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<!-- <meta property="fb:app_id" content="1000452166691027" /> -->
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700%7CRoboto+Condensed:400,700%7CMaterial+Icons'
rel='stylesheet' type='text/css'>
<link href="/css/materialize.min.css" rel="stylesheet">
<link href="/css/theme.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
<link href="/css/select2.css" rel="stylesheet">
<link href="/css/style.css?v=<?= WebProjectFitness\Config::SITE_CSS_VERSION ?>" rel="stylesheet">
<link rel="image_src" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<link rel="icon" type="image/png" href="<?php \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<link rel="image_src" href="//<?= $_SERVER[ 'SERVER_NAME' ] . \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<link rel="icon" type="image/ico"
href="//<?= $_SERVER[ 'SERVER_NAME' ] . \WebProjectFitness\Config::FAVICON_PATH ?>"/>
<meta name="theme-color" content="#ffffff">
@@ -38,4 +40,30 @@
</head>
<body>
<body class="grey lighten-4">
<ul id="user" class="dropdown-content">
<li><a>Your Account</a></li>
<li class="divider"></li>
<li><a>Your Saved Exercises</a></li>
<li class="divider"></li>
<li><a>Your Training</a></li>
</ul>
<div class="navbar-fixed">
<nav class="green darken-3" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" class="brand-logo">
<img src="/img/logo.svg" alt="Logo for Your Exercise" height="64px"/>
</a>
<ul class="right hide-on-med-and-down">
<li>
<a class="dropdown-trigger" data-target="user">Name Of The Account<i class="material-icons right">arrow_drop_down</i></a>
</li>
</ul>
</div>
</nav>
</div>
<main>
+13
View File
@@ -0,0 +1,13 @@
/*!
* Materialize v1.0.0 (http://materializecss.com)
* Copyright 2014-2017 Materialize
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
*/
.materialize-red{background-color:#e51c23 !important}.materialize-red-text{color:#e51c23 !important}.materialize-red.lighten-5{background-color:#fdeaeb !important}.materialize-red-text.text-lighten-5{color:#fdeaeb !important}.materialize-red.lighten-4{background-color:#f8c1c3 !important}.materialize-red-text.text-lighten-4{color:#f8c1c3 !important}.materialize-red.lighten-3{background-color:#f3989b !important}.materialize-red-text.text-lighten-3{color:#f3989b !important}.materialize-red.lighten-2{background-color:#ee6e73 !important}.materialize-red-text.text-lighten-2{color:#ee6e73 !important}.materialize-red.lighten-1{background-color:#ea454b !important}.materialize-red-text.text-lighten-1{color:#ea454b !important}.materialize-red.darken-1{background-color:#d0181e !important}.materialize-red-text.text-darken-1{color:#d0181e !important}.materialize-red.darken-2{background-color:#b9151b !important}.materialize-red-text.text-darken-2{color:#b9151b !important}.materialize-red.darken-3{background-color:#a21318 !important}.materialize-red-text.text-darken-3{color:#a21318 !important}.materialize-red.darken-4{background-color:#8b1014 !important}.materialize-red-text.text-darken-4{color:#8b1014 !important}.red{background-color:#F44336 !important}.red-text{color:#F44336 !important}.red.lighten-5{background-color:#FFEBEE !important}.red-text.text-lighten-5{color:#FFEBEE !important}.red.lighten-4{background-color:#FFCDD2 !important}.red-text.text-lighten-4{color:#FFCDD2 !important}.red.lighten-3{background-color:#EF9A9A !important}.red-text.text-lighten-3{color:#EF9A9A !important}.red.lighten-2{background-color:#E57373 !important}.red-text.text-lighten-2{color:#E57373 !important}.red.lighten-1{background-color:#EF5350 !important}.red-text.text-lighten-1{color:#EF5350 !important}.red.darken-1{background-color:#E53935 !important}.red-text.text-darken-1{color:#E53935 !important}.red.darken-2{background-color:#D32F2F !important}.red-text.text-darken-2{color:#D32F2F !important}.red.darken-3{background-color:#C62828 !important}.red-text.text-darken-3{color:#C62828 !important}.red.darken-4{background-color:#B71C1C !important}.red-text.text-darken-4{color:#B71C1C !important}.red.accent-1{background-color:#FF8A80 !important}.red-text.text-accent-1{color:#FF8A80 !important}.red.accent-2{background-color:#FF5252 !important}.red-text.text-accent-2{color:#FF5252 !important}.red.accent-3{background-color:#FF1744 !important}.red-text.text-accent-3{color:#FF1744 !important}.red.accent-4{background-color:#D50000 !important}.red-text.text-accent-4{color:#D50000 !important}.pink{background-color:#e91e63 !important}.pink-text{color:#e91e63 !important}.pink.lighten-5{background-color:#fce4ec !important}.pink-text.text-lighten-5{color:#fce4ec !important}.pink.lighten-4{background-color:#f8bbd0 !important}.pink-text.text-lighten-4{color:#f8bbd0 !important}.pink.lighten-3{background-color:#f48fb1 !important}.pink-text.text-lighten-3{color:#f48fb1 !important}.pink.lighten-2{background-color:#f06292 !important}.pink-text.text-lighten-2{color:#f06292 !important}.pink.lighten-1{background-color:#ec407a !important}.pink-text.text-lighten-1{color:#ec407a !important}.pink.darken-1{background-color:#d81b60 !important}.pink-text.text-darken-1{color:#d81b60 !important}.pink.darken-2{background-color:#c2185b !important}.pink-text.text-darken-2{color:#c2185b !important}.pink.darken-3{background-color:#ad1457 !important}.pink-text.text-darken-3{color:#ad1457 !important}.pink.darken-4{background-color:#880e4f !important}.pink-text.text-darken-4{color:#880e4f !important}.pink.accent-1{background-color:#ff80ab !important}.pink-text.text-accent-1{color:#ff80ab !important}.pink.accent-2{background-color:#ff4081 !important}.pink-text.text-accent-2{color:#ff4081 !important}.pink.accent-3{background-color:#f50057 !important}.pink-text.text-accent-3{color:#f50057 !important}.pink.accent-4{background-color:#c51162 !important}.pink-text.text-accent-4{color:#c51162 !important}.purple{background-color:#9c27b0 !important}.purple-text{color:#9c27b0 !important}.purple.lighten-5{background-color:#f3e5f5 !important}.purple-text.text-lighten-5{color:#f3e5f5 !important}.purple.lighten-4{background-color:#e1bee7 !important}.purple-text.text-lighten-4{color:#e1bee7 !important}.purple.lighten-3{background-color:#ce93d8 !important}.purple-text.text-lighten-3{color:#ce93d8 !important}.purple.lighten-2{background-color:#ba68c8 !important}.purple-text.text-lighten-2{color:#ba68c8 !important}.purple.lighten-1{background-color:#ab47bc !important}.purple-text.text-lighten-1{color:#ab47bc !important}.purple.darken-1{background-color:#8e24aa !important}.purple-text.text-darken-1{color:#8e24aa !important}.purple.darken-2{background-color:#7b1fa2 !important}.purple-text.text-darken-2{color:#7b1fa2 !important}.purple.darken-3{background-color:#6a1b9a !important}.purple-text.text-darken-3{color:#6a1b9a !important}.purple.darken-4{background-color:#4a148c !important}.purple-text.text-darkeLine truncated
* Waves v0.6.0
* http://fian.my.id/Waves
*
* Copyright 2014 Alfiana E. Sibuea and other contributors
* Released under the MIT license
* https://github.com/fians/Waves/blob/master/LICENSE
*/.waves-effect{position:relative;cursor:pointer;display:inline-block;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;vertical-align:middle;z-index:1;-webkit-transition:.3s ease-out;transition:.3s ease-out}.waves-effect .waves-ripple{position:absolute;border-radius:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;opacity:0;background:rgba(0,0,0,0.2);-webkit-transition:all 0.7s ease-out;transition:all 0.7s ease-out;-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform;-webkit-transform:scale(0);transform:scale(0);pointer-events:none}.waves-effect.waves-light .waves-ripple{background-color:rgba(255,255,255,0.45)}.waves-effect.waves-red .waves-ripple{background-color:rgba(244,67,54,0.7)}.waves-effect.waves-yellow .waves-ripple{background-color:rgba(255,235,59,0.7)}.waves-effect.waves-orange .waves-ripple{background-color:rgba(255,152,0,0.7)}.waves-effect.waves-purple .waves-ripple{background-color:rgba(156,39,176,0.7)}.waves-effect.waves-green .waves-ripple{background-color:rgba(76,175,80,0.7)}.waves-effect.waves-teal .waves-ripple{background-color:rgba(0,150,136,0.7)}.waves-effect input[type="button"],.waves-effect input[type="reset"],.waves-effect input[type="submit"]{border:0;font-style:normal;font-size:inherit;text-transform:inherit;background:none}.waves-effect img{position:relative;z-index:-1}.waves-notransition{-webkit-transition:none !important;transition:none !important}.waves-circle{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.waves-input-wrapper{border-radius:0.2em;vertical-align:bottom}.waves-input-wrapper .waves-button-input{position:relative;top:0;left:0;z-index:1}.waves-circle{text-align:center;width:2.5em;height:2.5em;line-height:2.5em;border-radius:50%;-webkit-mask-image:none}.waves-block{display:block}.waves-effect .waves-ripple{z-index:-1}.modal{display:none;position:fixed;left:0;right:0;background-color:#fafafa;padding:0;max-height:70%;width:55%;margin:auto;overflow-y:auto;border-radius:2px;will-change:top, opacity}.modal:focus{outline:none}@media only screen and (max-width: 992px){.modal{width:80%}}.modal h1,.modal h2,.modal h3,.modal h4{margin-top:0}.modal .modal-content{padding:24px}.modal .modal-close{cursor:pointer}.modal .modal-footer{border-radius:0 0 2px 2px;background-color:#fafafa;padding:4px 6px;height:56px;width:100%;text-align:right}.modal .modal-footer .btn,.modal .modal-footer .btn-large,.modal .modal-footer .btn-small,.modal .modal-footer .btn-flat{margin:6px 0}.modal-overlay{position:fixed;z-index:999;top:-25%;left:0;bottom:0;right:0;height:125%;width:100%;background:#000;display:none;will-change:opacity}.modal.modal-fixed-footer{padding:0;height:70%}.modal.modal-fixed-footer .modal-content{position:absolute;height:calc(100% - 56px);max-height:100%;width:100%;overflow-y:auto}.modal.modal-fixed-footer .modal-footer{border-top:1px solid rgba(0,0,0,0.1);position:absolute;bottom:0}.modal.bottom-sheet{top:auto;bottom:-100%;margin:0;width:100%;max-height:45%;border-radius:0;will-change:bottom, opacity}.collapsible{border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;margin:.5rem 0 1rem 0}.collapsible-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-tap-highlight-color:transparent;line-height:1.5;padding:1rem;background-color:#fff;border-bottom:1px solid #ddd}.collapsible-header:focus{outline:0}.collapsible-header i{width:2rem;font-size:1.6rem;display:inline-block;text-align:center;margin-right:1rem}.keyboard-focused .collapsible-header:focus{background-color:#eee}.collapsible-body{display:none;border-bottom:1px solid #ddd;-webkit-box-sizing:border-box;box-sizing:border-box;padding:2rem}.sidenav .collapsible,.sidenav.fixed .collapsible{border:none;-webkit-box-shadow:none;box-shadow:none}.sidenav .collapsible li,.sidenav.fixed .collapsible li{padding:0}.sidenav .collapsible-header,.sidenav.fixed .collapsible-header{background-color:transparent;border:none;line-height:inherit;height:inherit;padding:0 16px}.sidenav .collapsible-header:hover,.sidenav.fixed .collapsible-header:hover{background-color:rgba(0,0,0,0.05)}.sidenav .collapsible-header i,.sidenav.fixed .collapsible-header i{line-height:inherit}.sidenav .collapsible-body,.sidenav.fixed .collapsible-body{border:0;background-color:#fff}.sidenav .collapsible-body li a,.sidenav.fixed .collapsible-body li a{padding:0 23.5px 0 31px}.collapsible.popout{border:none;-webkit-box-shadow:none;box-shadow:none}.collapsible.popout>li{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);margin:0 24px;-webkit-transition:margin 0.35s cubLine truncated
+10 -50
View File
@@ -1,55 +1,15 @@
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
#logo-container {
height: 64px;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
#logo-container img {
width: 40px;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
.exercise-info-container {
width: 560px;
min-height: 100px;
margin: 20px auto 0;
border-radius: 5px;
padding: 10px 15px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+16
View File
@@ -0,0 +1,16 @@
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<path d="m512 256c0 141.386719-114.613281 256-256 256s-256-114.613281-256-256 114.613281-256 256-256 256 114.613281 256 256zm0 0"
fill="#00f3ff"/>
<path d="m511.488281 271.984375-73.429687-73.433594-4.605469 6.117188-34.941406-34.941407-94.503907 104.117188-113.820312-113.816406-113.1875 156.417968 195.039062 195.039063c128.625-7.953125 231.523438-110.871094 239.449219-239.5zm0 0"
fill="#00c2ef"/>
<path d="m99.152344 218.707031h311.503906v74.585938h-311.503906zm0 0" fill="#613394"/>
<path d="m255.761719 218.707031h154.894531v74.585938h-154.894531zm0 0" fill="#4b1b7a"/>
<path d="m145.632812 322.320312h-52.28125c-14.183593 0-25.683593-11.5-25.683593-25.683593v-81.273438c0-14.183593 11.5-25.683593 25.683593-25.683593h52.28125zm0 0"
fill="#ff551c"/>
<path d="m190.1875 351.972656h-54.726562c-16.421876 0-29.730469-13.308594-29.730469-29.726562v-132.492188c0-16.417968 13.308593-29.726562 29.730469-29.726562h54.726562zm0 0"
fill="#2864f0"/>
<path d="m366.367188 189.679688h52.28125c14.183593 0 25.683593 11.5 25.683593 25.683593v81.273438c0 14.183593-11.5 25.683593-25.683593 25.683593h-52.28125zm0 0"
fill="#f24500"/>
<path d="m321.8125 160.027344h54.726562c16.421876 0 29.730469 13.308594 29.730469 29.726562v132.492188c0 16.417968-13.308593 29.726562-29.730469 29.726562h-54.726562zm0 0"
fill="#0053bf"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+5
View File
@@ -0,0 +1,5 @@
$(document).ready(() => {
$(".dropdown-trigger").dropdown();
});
-4
View File
@@ -1,4 +0,0 @@
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={IDLine truncated
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e=Line truncated
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?bLine truncated
+2
View File
@@ -0,0 +1,2 @@
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)Line truncated
+6
View File
@@ -0,0 +1,6 @@
/*!
* Materialize v1.0.0 (http://materializecss.com)
* Copyright 2014-2017 Materialize
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
*/
var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0},_createClass=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var i,o=document,a=window,t=Array.prototype,r=t.slice,n=t.filter,s=t.push,e=function(){},h=function(t){return typeof t==typeof e&&t.call},d=function(t){return"string"==typeof t},l=/^#[\w-]*$/,u=/^\.[\w-]*$/,c=/<.+>/,p=/^\w+$/;function v(t,e){e=e||o;var i=u.test(t)?e.getElementsByClassName(t.slice(1)):p.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t);return i}function f(t){if(!i){var e=(i=o.implementation.createHTMLDocument(null)).createElement("base");e.href=o.location.href,i.head.appendChild(e)}return i.body.innerHTML=t,i.body.childNodes}function m(t){"loading"!==o.readyState?t():o.addEventListener("DOMContentLoaded",t)}function g(t,e){if(!t)return this;if(t.cash&&t!==a)return t;var i,n=t,s=0;if(d(t))n=l.test(t)?o.getElementById(t.slice(1)):c.test(t)?f(t):v(t,e);else if(h(t))return m(t),this;if(!n)return this;if(n.nodeType||n===a)this[0]=n,this.length=1;else for(i=this.length=n.length;s<i;s++)this[s]=n[s];return this}function _(t,e){return new g(t,e)}var y=_.fn=_.prototype=g.prototype={cash:!0,length:0,push:s,splice:t.splice,map:t.map,init:g};function k(t,e){for(var i=t.length,n=0;n<i&&!1!==e.call(t[n],t[n],n,t);n++);}function b(t,e){var i=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!i&&i.call(t,e)}function w(e){return d(e)?b:e.cash?function(t){return e.is(t)}:function(t,e){return t===e}}function C(t){return _(r.call(t).filter(function(t,e,i){return i.indexOf(t)===e}))}Object.defineProperty(y,"constructor",{value:_}),_.parseHTML=f,_.noop=e,_.isFunction=h,_.isString=d,_.extend=y.extend=function(t){t=t||{};var e=r.call(arguments),i=e.length,n=1;for(1===e.length&&(t=this,n=0);n<i;n++)if(e[n])for(var s in e[n])e[n].hasOwnProperty(s)&&(t[s]=e[n][s]);return t},_.extend({merge:function(t,e){for(var i=+e.length,n=t.length,s=0;s<i;n++,s++)t[n]=e[s];return t.length=n,t},each:k,matches:b,unique:C,isArray:Array.isArray,isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}});var E=_.uid="_cash"+Date.now();function M(t){return t[E]=t[E]||{}}function O(t,e,i){return M(t)[e]=i}function x(t,e){var i=M(t);return void 0===i[e]&&(i[e]=t.dataset?t.dataset[e]:_(t).attr("data-"+e)),i[e]}y.extend({data:function(e,i){if(d(e))return void 0===i?x(this[0],e):this.each(function(t){return O(t,e,i)});for(var t in e)this.data(t,e[t]);return this},removeData:function(s){return this.each(function(t){return i=s,void((n=M(e=t))?delete n[i]:e.dataset?delete e.dataset[i]:_(e).removeAttr("data-"+name));var e,i,n})}});var L=/\S+/g;function T(t){return d(t)&&t.match(L)}function $(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function B(t,e,i){t.classList?t.classList.add(e):i.indexOf(" "+e+" ")&&(t.className+=" "+e)}function D(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")}y.extend({addClass:function(t){var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){B(e,t,i)})}):this},attr:function(e,i){if(e){if(d(e))return void 0===i?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each(function(t){t.setAttribute?t.setAttribute(e,i):t[e]=i});for(var t in e)this.attr(t,e[t]);return this}},hasClass:function(t){var e=!1,i=T(t);return i&&i.length&&this.each(function(t){return!(e=$(t,i[0]))}),e},prop:function(e,i){if(d(e))return void 0===i?this[0][e]:this.each(function(t){t[e]=i});for(var t in e)this.prop(t,e[t]);return this},removeAttr:function(e){return this.each(function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]})},removeClass:function(t){if(!arguments.length)return this.attr("class","");var i=T(t);return i?this.each(function(e){k(i,function(t){D(e,t)})}):this},removeProp:function(e){return this.each(function(t){delete t[e]})},toggleClass:function(t,e){if(void 0!==e)return this[e?"addClassLine truncated