diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b518b20 --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +DB_USER = "" +DB_PASS = "" +DB_NAME = "" +STRIPE_PUBLIC_KEY = "pk_test_xxxx" +STRIPE_SECRET_KEY = "sk_test_xxxx" +FRESHCERY_EMAIL = "example@gmail.com" +FRESHCERY_EMAIL_PASS = "gmail app key" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e26bea --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode/launch.json +payment_system/vendor/ +.env diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..59b0bb5 --- /dev/null +++ b/.htaccess @@ -0,0 +1,19 @@ +RewriteEngine On + +# โœ… Skip existing files and folders +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d + +# โœ… Custom clean route mappings +RewriteRule ^login$ auth/login.php [L] +RewriteRule ^register$ auth/register.php [L] +RewriteRule ^logout$ auth/logout.php [L] +RewriteRule ^dashboard$ admin-panel/admin.php [L] +RewriteRule ^categories$ admin-panel/categories.php [L] +RewriteRule ^products$ admin-panel/products.php [L] +RewriteRule ^orders$ admin-panel/orders.php [L] +RewriteRule ^admin-logout$ auth/admin-logout.php +RewriteRule ^productsb$ /admin-panel/include/product.php +# โœ… Optional: Generic fallback for root-level files (like /about โ†’ about.php) +RewriteRule ^([a-zA-Z0-9_-]+)$ $1.php [L] + \ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..48c841e --- /dev/null +++ b/Readme.md @@ -0,0 +1,63 @@ + + +

Freshcery

+ +

Fresh from Farms to Your Doorstep ๐ŸŒฟ

+ +--- + +## ๐Ÿš€ About the Project + +**Freshcery** is an online platform that connects local farmers directly to customers, ensuring that you receive **freshly harvested products** right at your doorstep. The platform supports sustainable agriculture and helps promote locally-grown produce. + +--- + +## ๐Ÿ› ๏ธ Technologies Used + +- ๐Ÿ˜ **PHP 8.3** +- ๐Ÿ›ข๏ธ **MySQL** +- ๐ŸŒ **Apache Web Server** + +--- + +## โš™๏ธ Installation & Setup + +> ๐Ÿ“Œ **Important:** Before running the project, make sure to: + +1. **Clone the repository**: + ```bash + git clone https://github.com/your-username/freshcery.git + cd freshcery + ``` + +2. **Copy the `.env.example` file and configure environment variables**: + ```bash + cp .env.example .env + ``` + + Update the `.env` file with your database credentials and other environment-specific settings. + +3. **Install PHP dependencies using Composer**: + ```bash + composer install + ``` + +4. **Set up your local web server**: + - Use Apache with PHP enabled. + - Point the document root to the appropriate folder (e.g., `public/` or `payment_system/`). + +5. **Import the database**: + ```sql + You may import the database by viewing the db.txt from the `assets/` folder + ``` + +--- + +## ๐Ÿ’ก Future Scope + +- Implementing a locate location feature +- Add a track order feature + +--- + +## ๐Ÿง‘โ€๐ŸŒพ Made with โค๏ธ to support local farmers! \ No newline at end of file diff --git a/about.php b/about.php new file mode 100755 index 0000000..045c833 --- /dev/null +++ b/about.php @@ -0,0 +1,93 @@ + +
+ +
+
+
+
+

Freshcery

+
+ Groceries Organic Store +
+
+
+

+ Occaecat sunt id anim officia laborum incididunt dolore sit consequat consectetur enim fugiat aute culpa consequat cillum incididunt officia sed esse laborum anim aliqua et duis reprehenderit commodo do dolor dolor deserunt esse in aute anim adipisicing deserunt eu tempor veniam magna magna nulla in ea nulla elit est do veniam dolor pariatur in ut deserunt adipisicing est anim proident occaecat aliquip sunt enim occaecat cillum commodo in duis fugiat pariatur officia aliquip anim in dolore id id pariatur pariatur enim quis excepteur proident incididunt dolor consequat nisi et veniam occaecat sed exercitation dolore eiusmod elit sed voluptate adipisicing ut irure ad ut ex deserunt exercitation amet in eu quis ut occaecat non sunt labore reprehenderit elit commodo aute ea occaecat tempor dolor sed ut cillum aute et pariatur sit consequat commodo sunt sit amet nulla commodo aute laborum non ullamco ea laboris do adipisicing quis consequat adipisicing ea cupidatat et minim pariatur sed amet cillum commodo pariatur fugiat duis id amet ut exercitation voluptate culpa fugiat nostrud aute. +

+
+
+ +
+
+ +
+
+
+ Straight from the Farm +
+

+ Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. +

+

+ Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. +

+

+ Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. +

+
+
+ +
+
+
+ Know Your Farmers +
+

+ We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. Youโ€™re welcome to visit the farms and see the love they put into growing your food. +

+

+ We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. Youโ€™re welcome to visit the farms and see the love they put into growing your food. +

+

+ We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. Youโ€™re welcome to visit the farms and see the love they put into growing your food. +

+
+
+ +
+
+ +
+
+ +
+
+
+ Improving Farmersโ€™ Livelihood +
+

+ Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. +

+

+ Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. +

+

+ Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. +

+
+
+
+
+
+ \ No newline at end of file diff --git a/admin-panel/admin.php b/admin-panel/admin.php new file mode 100644 index 0000000..d0af0fa --- /dev/null +++ b/admin-panel/admin.php @@ -0,0 +1,130 @@ + + + + + + + + + Admin Panel + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
Products
+

number of products:

+
+
+
+
+
+
+
Orders
+

number of orders:

+
+
+
+
+
+
+
Categories
+

number of categories:

+
+
+
+
+
+
+
+
+
Products per Category
+ +
+
+
+
+
+
+
Top 5 Ordered Products
+ +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/admin-panel/categories.php b/admin-panel/categories.php new file mode 100644 index 0000000..f988983 --- /dev/null +++ b/admin-panel/categories.php @@ -0,0 +1,281 @@ + + + + + + + + Admin Panel + + + + + + + + + + + + + + + + +prepare("SELECT * FROM categories "); +$query->execute(); +$categories = $query->fetchAll(PDO::FETCH_OBJ); + +$count = $pdo->prepare("SELECT count(*) FROM categories"); +$count->execute(); +$_SESSION['categories_count'] = $count->fetchColumn(); +?> + + +
+ +
+

CATEGORIES

+ +
+
+ + + + + + + + + + + + 0): foreach ($categories as $category): ?> + + + + + + + + +
+

error!

+
+ + +
category-IDcategory-imagecategory-nameDescriptionAction
id; ?>name; ?>description; ?> + + Delete +
+
+
+ +
+ + +
+ +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/admin-panel/include/categories.function.php b/admin-panel/include/categories.function.php new file mode 100644 index 0000000..31d7678 --- /dev/null +++ b/admin-panel/include/categories.function.php @@ -0,0 +1,69 @@ +prepare($query); + $stmt->execute([ + 'name' => $name, + 'description' => $description, + 'image' => $image, + 'icon' => $icon + ]); + return true; + } catch (PDOException $e) { + return false; + } +} + +/** + * Update an existing category. + */ +function updateCategory($id, $name, $description, $icon, $image) +{ + global $pdo; + + try { + $query = "UPDATE categories SET name=:name, description=:description, image=:image, icon=:icon WHERE id=:id"; + $stmt = $pdo->prepare($query); + $stmt->execute([ + 'id' => $id, + 'name' => $name, + 'description' => $description, + 'image' => $image, + 'icon' => $icon + ]); + return true; + } catch (PDOException $e) { + return false; + } +} + +/** + * Delete a category. + */ +function deleteCategory($id) +{ + global $pdo; + + try { + $stmt = $pdo->prepare("DELETE FROM categories WHERE id=:id"); + $stmt->execute(['id' => $id]); + return true; + } catch (PDOException $e) { + return false; + } +} diff --git a/admin-panel/include/categories_add.inc.php b/admin-panel/include/categories_add.inc.php new file mode 100644 index 0000000..0cc26c0 --- /dev/null +++ b/admin-panel/include/categories_add.inc.php @@ -0,0 +1,36 @@ +prepare($query); + $stmt->execute([ + 'id' => $id, + 'name' => $name, + 'description' => $description, + 'image' => $image, + 'icon' => $icon + ]); + + // Redirect after successful insertion + header("Location: ../categories.php?message=success"); + exit(); + } catch (PDOException $e) { + // Redirect with error message if insertion fails + header("Location: ../categories.php?message=error"); + exit(); + } +} diff --git a/admin-panel/include/category.inc.php b/admin-panel/include/category.inc.php new file mode 100644 index 0000000..85261bc --- /dev/null +++ b/admin-panel/include/category.inc.php @@ -0,0 +1,65 @@ +prepare($query); + $stmt->execute([ + 'title' => $title, + 'description' => $description, + 'price' => $price, + 'quantity' => $quantity, + 'image' => $image, + 'exp_date' => $exp_date, + 'category_id' => $category_id + ]); + + return "Product added successfully!"; + } catch (PDOException $e) { + return "Error adding product: " . $e->getMessage(); + } +} + +// Function to update a product +function updateProduct($pdo, $id, $title, $description, $price, $quantity, $image, $exp_date, $category_id) { + try { + $query = "UPDATE products SET title=:title, description=:description, price=:price, quantity=:quantity, + image=:image, exp_date=:exp_date, category_id=:category_id WHERE id=:id;"; + + $stmt = $pdo->prepare($query); + $stmt->execute([ + 'id' => $id, + 'title' => $title, + 'description' => $description, + 'price' => $price, + 'quantity' => $quantity, + 'image' => $image, + 'exp_date' => $exp_date, + 'category_id' => $category_id + ]); + + return "Product updated successfully!"; + } catch (PDOException $e) { + return "Error updating product: " . $e->getMessage(); + } +} + +// Function to delete a product +function deleteProduct($pdo, $id) { + try { + $query = "DELETE FROM products WHERE id = :id;"; + $stmt = $pdo->prepare($query); + $stmt->execute(['id' => $id]); + + return "Product deleted successfully!"; + } catch (PDOException $e) { + return "Error deleting product: " . $e->getMessage(); + } +} +?> diff --git a/admin-panel/include/product.php b/admin-panel/include/product.php new file mode 100644 index 0000000..e6ee8b8 --- /dev/null +++ b/admin-panel/include/product.php @@ -0,0 +1,109 @@ + diff --git a/admin-panel/include/product_add.inc.php b/admin-panel/include/product_add.inc.php new file mode 100644 index 0000000..1813f15 --- /dev/null +++ b/admin-panel/include/product_add.inc.php @@ -0,0 +1,42 @@ +prepare($query); + $stmt->execute([ + 'title' => $title, + 'description' => $description, + 'price' => $price, + 'quantity' => $quantity, + 'image' => $image, + 'exp_date' => $exp_date, + 'category_id' => $category_id + ]); + + // Redirect after successful insertion + header("Location: ../products.php?message=success"); + exit(); + } catch (PDOException $e) { + // Redirect with error message if insertion fails + header("Location: ../products.php?message=error"); + exit(); + } +} diff --git a/admin-panel/nav.php b/admin-panel/nav.php new file mode 100644 index 0000000..692675b --- /dev/null +++ b/admin-panel/nav.php @@ -0,0 +1,57 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/admin-panel/orders.php b/admin-panel/orders.php new file mode 100644 index 0000000..02c7e9e --- /dev/null +++ b/admin-panel/orders.php @@ -0,0 +1,81 @@ + + + + + + + Admin Panel + + + + + + + + + + + + + + + + +prepare("SELECT * FROM orders "); +$products->execute(); +$orders = $products->fetchAll(PDO::FETCH_OBJ); + +$count = $pdo->prepare("SELECT count(*) FROM orders"); +$count->execute(); +$_SESSION['orders_count'] = $count->fetchColumn(); +?> + + +
+ +

ORDERS

+
+ + + + + + + + + + + + + 0): ?> + + + + + + + + + + + +
+

error!

+
+ + +
Order-IDZip-codephone_numberDateTotalStatus
id; ?>zip_code; ?>phone_number; ?>created_at; ?>Rp. Total_order_value; ?>status; ?>
+
+
+ + + + \ No newline at end of file diff --git a/admin-panel/products.php b/admin-panel/products.php new file mode 100644 index 0000000..cf29dd0 --- /dev/null +++ b/admin-panel/products.php @@ -0,0 +1,526 @@ + + + + + + + + Admin Panel + + + + + + + + + + + + + + + + + + +prepare("SELECT * FROM products "); +$query->execute(); +$products = $query->fetchAll(PDO::FETCH_OBJ); +$count = $pdo->prepare("SELECT count(*) FROM products"); +$count->execute(); +$_SESSION['product_count'] = $count->fetchColumn(); + + +$stmt = $pdo->query("SELECT id, name FROM categories"); +$categories = $stmt->fetchAll(PDO::FETCH_OBJ); +?> + + +
+ + " . $_GET['message'] . ""; + } + ?> +
+

PRODUCTS

+ +
+ +
+ + + + + + + + + + + + + 0): ?> + + + + + + + + + + + + +
+

error!

+
+ + +
product-IDproduct-imageproduct-namepriceQuantityAction
id; ?>title; ?>price; ?>quantity; ?> + +
+ + + +
+
+ + + +
+
+
+ + +
+
+ + + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/admin-panel/styles/style.css b/admin-panel/styles/style.css new file mode 100644 index 0000000..fc8af8d --- /dev/null +++ b/admin-panel/styles/style.css @@ -0,0 +1,42 @@ + body { + background: #ffffff; + } + + #wrapper { + padding: 90px 15px; + } + + .navbar-expand-lg .navbar-nav.side-nav { + flex-direction: column; + } + + .card { + margin-bottom: 15px; + border-radius: 0; + box-shadow: 0 3px 5px rgba(0, 0, 0, .1); + } + + .header-top { + box-shadow: 0 3px 5px rgba(0, 0, 0, .1) + } + + @media(min-width:992px) { + #wrapper { + margin-left: 200px; + padding: 90px 15px 15px; + } + + .navbar-nav.side-nav { + background: #343a40; + box-shadow: 2px 1px 2px rgba(0, 0, 0, .1); + position: fixed; + top: 56px; + flex-direction: column !important; + left: 0; + width: 200px; + overflow-y: auto; + bottom: 0; + overflow-x: hidden; + padding-bottom: 40px + } + } \ No newline at end of file diff --git a/assets/css/theme.css b/assets/css/theme.css new file mode 100755 index 0000000..4b5424a --- /dev/null +++ b/assets/css/theme.css @@ -0,0 +1,522 @@ +/*! + + ========================================================= + * o2system-ui-kit - v1.0.0 + ========================================================= + + */ +body { + color: #333333; + font-size: 14px; + font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif; + background: #fff; +} + +h1, h2, h3, h4, h5, h6 { + text-transform: uppercase !important; + font-weight: 700 !important; +} + +.badge { + padding: 0.25em 0.4em; +} + +.btn-primary { + background: linear-gradient(135deg, #E91E63, #ff5c8d); + border-color: #E91E63; + transition: all 0.3s ease; + color: #fff; + position: relative; + overflow: hidden; + z-index: 1; +} + +.btn-primary:hover, +.btn-primary:focus { + background: linear-gradient(135deg, #ff5c8d, #E91E63); + border-color: #ff5c8d; + box-shadow: 0 0 15px rgba(255, 92, 141, 0.6), + 0 0 25px rgba(233, 30, 99, 0.4); + transform: scale(1.04); +} + +.btn-primary::after { + content: ''; + position: absolute; + top: 0; + left: -75%; + width: 50%; + height: 100%; + background: linear-gradient(120deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); + transform: skewX(-20deg); + transition: 0.75s; + z-index: 2; +} + +.btn-primary:hover::after { + left: 130%; +} + +.btn.focus, +.btn:focus { + box-shadow: none; +} + +.pace .pace-progress { + background: #E91E63; +} +.pace .pace-progress-inner { + box-shadow: 0 0 10px #E91E63, 0 0 5px #E91E63; +} +.pace .pace-activity { + border-top-color: #E91E63; + border-left-color: #E91E63; +} + +.pagination .page-item .page-link { + color: #E91E63; +} +.pagination .page-item .page-link:focus { + box-shadow: none; +} +.pagination .page-item.active .page-link { + background-color: #E91E63; + border-color: #E91E63; + color: #FFF; +} + +.dropdown-item:hover, .dropdown-item.active, .dropdown-item:active { + background-color: #E91E63; + color: #fff; +} + +.gray-bg { + background: #f8f8f8; +} + +.bg-primary { + background-color: #E91E63 !important; +} + +.vertical-center { + min-height: 100%; + /* Fallback for browsers do NOT support vh unit */ + min-height: 100vh; + /* These two lines are counted as one :-) */ + display: flex; + align-items: center; +} + +.full-height { + height: 100vh; +} + +section { + padding: 80px 0; +} +section .card-title { + font-size: 1rem; +} + +.title { + text-align: center; + color: #E91E63; + margin-bottom: 3rem; +} + +.subtitle { + text-align: center; + color: #E91E63; + margin-bottom: 3rem; + font-size: 2rem; +} + +.text-success { + color: #4A9304 !important; +} + +.text-primary { + color: #E91E63 !important; +} + +.badge-primary { + background: #E91E63 !important; +} + +.owl-carousel .owl-nav { + display: block !important; + margin: 0; +} +.owl-carousel .owl-nav div { + /* background: $primary-color; */ + border-radius: 0; + color: #E91E63; + font-size: 50px; + height: 50px; + line-height: 35px; + margin: -20px 0 0; + opacity: 0; + padding: 0; + position: absolute; + right: 20px; + text-align: center; + top: 50%; + width: 40px; + z-index: 1; + transition: all 0.3s linear 0s; +} +.owl-carousel .owl-nav div.owl-prev { + left: 20px; +} +.owl-carousel .owl-nav div.owl-prev:hover { + /* background: #E91E63; */ +} +.owl-carousel .owl-nav div.owl-next:hover { + /* background: #E91E63; */ +} +.owl-carousel:hover .owl-nav div.owl-next { + opacity: 1 !important; + right: 0 !important; +} +.owl-carousel:hover .owl-nav div.owl-prev { + opacity: 1 !important; + left: 0 !important; +} + +.contact1 .form-control { + padding: .75rem; + border: 2px solid rgba(120, 130, 140, 0.13); + font-size: 1rem; +} + +.page-header .navbar .navbar-brand img { + height: 60px; +} +.page-header .navbar .navbar-nav .nav-link { + color: #FFF; + font-size: 1rem; + padding-right: 1rem; + padding-left: 1rem; +} +.page-header .navbar .navbar-nav .nav-link:focus, .page-header .navbar .navbar-nav .nav-link:hover, .page-header .navbar .navbar-nav .nav-link.active { + color: #E91E63; +} +.page-header .navbar .navbar-nav .dropdown .badge { + position: absolute; + top: 5px; + font-weight: 400; + text-align: center; +} +.page-header .navbar.bg-white { + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1); +} +.page-header .navbar.bg-white .navbar-nav .nav-link { + color: #333333; +} +.page-header .navbar.bg-white .navbar-nav .nav-link:focus, .page-header .navbar.bg-white .navbar-nav .nav-link:hover, .page-header .navbar.bg-white .navbar-nav .nav-link.active { + color: #E91E63; +} +.page-header .navbar .avatar-header { + width: 25px; + height: 25px; + overflow: hidden; + border: 1px solid #eee; + border-radius: 50%; + display: inline-table; +} +.page-header .navbar .avatar-header img { + width: 100%; + height: auto; +} +.page-header .navbar .shopping-cart { + width: 300px; + right: 0; + left: auto; +} +.page-header .navbar .shopping-cart ul { + padding: 0; + margin: 0; + list-style: none; +} +.page-header .navbar .shopping-cart .drop-title { + padding: 11px 20px 15px; + border-bottom: 1px solid rgba(120, 130, 140, 0.13); +} +.page-header .navbar .shopping-cart .drop-title.d-flex { + border-top: 1px solid rgba(120, 130, 140, 0.13); +} +.page-header .navbar .shopping-cart .shopping-cart-list { + height: 200px; + position: relative; + overflow-y: auto; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media { + border-bottom: 1px solid rgba(120, 130, 140, 0.13); + padding: 10px 15px; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media h5 { + font-size: 0.8rem; + margin-top: 0; + margin-bottom: 0; + color: #333333; + font-weight: 400; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media h5 a { + color: #333333; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media h5 a:focus, .page-header .navbar .shopping-cart .shopping-cart-list .media h5 a:hover, .page-header .navbar .shopping-cart .shopping-cart-list .media h5 a.active { + color: #E91E63; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media p { + margin: 0; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media .price span { + display: inline-block; + margin-right: 5px; + color: #E91E63; + font-size: 0.8rem; +} +.page-header .navbar .shopping-cart .shopping-cart-list .media .price span.discount { + font-size: 0.7rem; + text-decoration: line-through; +} + +.banner .jumbotron { + margin-bottom: 0; +} +.banner .jumbotron .container { + position: relative; + z-index: 5; +} +.banner .jumbotron .container .card { + margin-top: 2.3rem; + z-index: 5; + background-color: transparent; +} +.banner .jumbotron .container .card .card-icon .card-icon-i { + border-color: #FFF; + color: #FFF; +} +.banner .jumbotron .container .card .card-icon .card-icon-i i { + color: #FFF; +} +.banner .jumbotron .container .card .card-body .card-title { + color: #FFF; + text-transform: uppercase; +} + +.card .card-icon-i.text-success { + border-color: #4A9304; +} + +.shop-categories a { + color: #333333; +} +.shop-categories a .media { + padding: 1rem; + border: 1px solid #ddd; +} +.shop-categories a .media span { + font-size: 1rem; + text-align: center; +} +.shop-categories a .media span i { + font-size: 3rem; + color: #4A9304; +} +.shop-categories a .media h5 { + font-size: 1rem; + margin: 0; + color: #E91E63; +} +.shop-categories a .media p { + font-size: 0.8rem; + margin: 0; + min-height: 38px; +} + +.product-carousel .owl-stage-outer { + padding: 10px 0; +} + +.card-product { + text-align: center; +} +.card-product .card-title { + margin-bottom: 0; +} +.card-product .card-title a { + color: #333333; +} +.card-product .card-title a:hover, .card-product .card-title a:focus { + color: #E91E63; +} +.card-product .card-price span.reguler { + color: #E91E63; + font-size: 1rem; +} +.card-product .card-price span.discount { + color: #777777; + font-size: 0.8rem; +} + +.product-detail { + padding-top: 5rem; +} +.product-detail h1.detail-title { + font-size: 1rem; +} +.product-detail .stock { + color: #fff; + border-radius: 2px; + padding: 3px 10px; +} +.product-detail .stock.available { + background: #46be8a; +} +.product-detail .stock.empty { + background: #f96868; +} +.product-detail .price { + font-size: 1.5rem; + color: #E91E63; +} +.product-detail .old-price { + text-decoration: line-through; +} + +.slider-zoom { + position: relative; +} + +.slider-thumbnail { + position: relative; + min-height: 119px; + margin-top: 5px; + margin-bottom: 15px; + /* .thumbelina-but.horiz.left{ + left: 0; + } + + .thumbelina-but.horiz.right{ + right: 0; + } */ +} +.slider-thumbnail li { + cursor: pointer; + padding: 0; +} + +.card-login { + margin: 0 auto; + width: 400px; + background: rgba(255, 255, 255, 0.5) !important; + border-color: rgba(0, 0, 0, 0.125); +} + +@media (max-width: 767px) { + .card-login { + width: 95%; + } +} +footer { + background-color: #f8f8f8; + padding: 50px 0; + padding-bottom: 0; + border-top: 1px solid #eee; +} +footer h5 { + font-size: 1rem; + font-weight: 400; +} +footer ul { + padding: 0; + margin: 0; + list-style: none; + margin-bottom: 1rem; + position: relative; + overflow: hidden; +} +footer ul li { + display: block; + margin: 0.5rem 0; +} +footer ul li a { + color: #333333; +} +footer ul li a:hover, footer ul li a:focus { + color: #E91E63; +} +footer ul li.download-app { + width: 150px; + overflow: hidden; + border-radius: 4px; + background-color: #333; +} +footer ul li.download-app img { + width: 152px; + height: auto; +} +footer ul li.download-app:hover, footer ul li.download-app:focus { + background-color: #E91E63; +} +footer ul li .mockup { + position: absolute; +} +footer ul li .mockup img { + width: 100%; +} +footer ul.social li { + display: inline-block; + margin: 0.5rem 1rem; + margin-top: 0; +} +footer ul.social li a { + font-size: 1.5rem; +} +footer ul.social li:first-child { + margin-left: 0; +} +footer .copyright { + margin: 0; + /* margin-top: 40px; */ + padding: 10px; + text-align: center; + border-top: 1px solid #eee; +} + +.custom-alert { + background-color: #dc3545; /* Bootstrap danger red */ + color: #fff; + padding: 14px 24px; + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + z-index: 9999; + font-size: 16px; + font-weight: 500; + width: 400px; + max-width: 100%; + margin: 0 auto; + text-align: center; + animation: fadeInOut 3.5s ease-in-out forwards; +} + +@keyframes fadeInOut { + 0% { + opacity: 0; + transform: translateY(-10px); + } + 10%, 90% { + opacity: 1; + transform: translateY(0); + } + 100% { + opacity: 0; + transform: translateY(-10px); + } +} + + +/*# sourceMappingURL=theme.css.map */ + + diff --git a/assets/css/theme.css.map b/assets/css/theme.css.map new file mode 100755 index 0000000..ac0b350 --- /dev/null +++ b/assets/css/theme.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAAA;;;;;;GAMG;ACNH,IAAK;EACJ,KAAK,ECGmB,OAAwB;EDFhD,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,iDAAiD;EAC3D,UAAU,EAAE,IAAI;;;AAGpB,sBAAuB;EACnB,cAAc,EAAE,oBAAoB;EACpC,WAAW,EAAE,cAAc;;;AAG/B,MAAM;EACF,OAAO,EAAE,YAAY;;;AAGzB,YAAY;EACR,UAAU,ECTI,OAAc;EDU5B,YAAY,ECVE,OAAc;;ADY5B,sCAAgB;EACZ,UAAU,ECbA,OAAc;EDcxB,YAAY,ECdF,OAAc;;;ADmB5B,sBAAgB;EACZ,UAAU,EAAE,IAAI;;;AAKpB,oBAAe;EACX,UAAU,EC1BA,OAAc;;AD4B5B,0BAAqB;EACjB,UAAU,EAAE,iCAA+C;;AAE/D,oBAAe;EACX,gBAAgB,EChCN,OAAc;EDiCxB,iBAAiB,ECjCP,OAAc;;;ADuCxB,iCAAU;EACN,KAAK,ECxCC,OAAc;;AD0CpB,uCAAO;EACH,UAAU,EAAE,IAAI;;AAKpB,wCAAU;EACN,gBAAgB,ECjDd,OAAc;EDkDhB,YAAY,EClDV,OAAc;EDmDhB,KAAK,EC5CS,IAAI;;;ADmD9B,kEAA4B;EACxB,gBAAgB,EC3DN,OAAc;ED4DxB,KAAK,EAAE,IAAI;;;AAInB,QAAQ;EACP,UAAU,EAAE,OAAO;;;AAGpB,WAAW;EACP,gBAAgB,EAAE,kBAAyB;;;AAG/C,gBAAiB;EACb,UAAU,EAAE,IAAI;EAAG,kDAAkD;EACrE,UAAU,EAAE,KAAK;EAAE,kDAAkD;EAErE,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;;;AAGvB,YAAY;EACR,MAAM,EAAE,KAAK;;;AAGjB,OAAO;EACH,OAAO,EAAE,MAAM;;AAEf,mBAAW;EACP,SAAS,EAAE,IAAI;;;AAIvB,MAAM;EACF,UAAU,EAAE,MAAM;EAClB,KAAK,EC9FS,OAAc;ED+F5B,aAAa,EAAE,IAAI;;;AAGvB,SAAS;EACL,UAAU,EAAE,MAAM;EAClB,KAAK,ECpGS,OAAc;EDqG5B,aAAa,EAAE,IAAI;EACnB,SAAS,EAAE,IAAI;;;AAGnB,aAAa;EACT,KAAK,EAAE,kBAAkB;;;AAG7B,aAAa;EACT,KAAK,EAAE,kBAAyB;;;AAGpC,cAAc;EACV,UAAU,EAAE,kBAAyB;;;AAIrC,sBAAS;EACL,OAAO,EAAE,gBAAgB;EA8BzB,MAAM,EAAE,CAAC;;AA7BT,0BAAI;EACA,iCAAiC;EACjC,aAAa,EAAE,CAAC;EAChB,KAAK,EC3HC,OAAc;ED4HpB,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,SAAS;EACjB,OAAO,EAAE,CAAC;EACV,OAAO,EAAE,CAAC;EACV,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,kBAAkB;;AAElC,mCAAa;EACT,IAAI,EAAE,IAAI;;AACV,yCAAQ;EACJ,iCAAiC;;AAIrC,yCAAQ;EACJ,iCAAiC;;AAQrC,yCAAa;EACT,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,YAAY;;AAEvB,yCAAa;EACT,OAAO,EAAE,YAAY;EACrB,IAAI,EAAE,YAAY;;;AAO9B,uBAAc;EACV,OAAO,EAAE,MAAM;EACf,MAAM,EAAE,mCAAmC;EAC3C,SAAS,EAAE,IAAI;;;AE/KpB,sCAAG;EACF,MAAM,EAAE,IAAI;;AAKb,0CAAS;EACR,KAAK,EDKqB,IAAI;ECJ9B,SAAS,EAAE,IAAI;EACf,aAAa,EAAE,IAAI;EACnB,YAAY,EAAE,IAAI;;AAElB,qJAA0B;EACzB,KAAK,EDRQ,OAAc;;ACa5B,iDAAM;EACL,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,MAAM;;AAKrB,6BAAU;EACT,UAAU,EAAE,4BAAwB;;AAEnC,mDAAS;EACR,KAAK,ED9Be,OAAwB;;ACgC5C,gLAA0B;EACzB,KAAK,ED7BO,OAAc;;ACmC9B,mCAAc;EACb,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,MAAM;EAChB,MAAM,EAAE,cAAc;EACtB,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,YAAY;;AAErB,uCAAG;EACF,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;;AAId,mCAAc;EACb,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,CAAC;EACR,IAAI,EAAE,IAAI;;AAEV,sCAAE;EACD,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,IAAI;;AAGjB,+CAAW;EACV,OAAO,EAAE,cAAc;EACvB,aAAa,EAAE,mCAAgC;;AAE/C,sDAAQ;EACP,UAAU,EAAE,mCAAgC;;AAI9C,uDAAmB;EAClB,MAAM,EAAE,KAAK;EACb,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,IAAI;;AAGhB,8DAAM;EACL,aAAa,EAAE,mCAAgC;EAC/C,OAAO,EAAE,SAAS;;AAClB,iEAAE;EACD,SAAS,EAAE,MAAM;EACjB,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,CAAC;EAChB,KAAK,EDtFc,OAAwB;ECuF3C,WAAW,EAAE,GAAG;;AAEhB,mEAAC;EACA,KAAK,ED1Fa,OAAwB;;AC4F1C,gOAA0B;EACzB,KAAK,EDzFK,OAAc;;AC8F3B,gEAAC;EACA,MAAM,EAAE,CAAC;;AAIT,0EAAI;EACH,OAAO,EAAE,YAAY;EACrB,YAAY,EAAE,GAAG;EACjB,KAAK,EDtGM,OAAc;ECuGzB,SAAS,EAAE,MAAM;;AAEjB,mFAAU;EACT,SAAS,EAAE,MAAM;EACjB,eAAe,EAAE,YAAY;;;AClHpC,kBAAU;EACT,aAAa,EAAE,CAAC;;AAChB,6BAAU;EACT,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,CAAC;;AAEV,mCAAK;EACJ,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,CAAC;EACV,gBAAgB,EAAE,WAAW;;AAG5B,2DAAY;EACX,YAAY,EFCY,IAAI;EEA5B,KAAK,EFAmB,IAAI;;AEE5B,6DAAC;EACA,KAAK,EFHkB,IAAI;;AEQ7B,0DAAW;EACV,KAAK,EFTmB,IAAI;EEU5B,cAAc,EAAE,SAAS;;;AAU7B,+BAAc;EACb,YAAY,EAAE,OAAO;;;ACnCvB,kBAAC;EACA,KAAK,EHEkB,OAAwB;;AGD/C,yBAAM;EACL,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,cAAc;;AACtB,8BAAI;EACH,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,MAAM;;AAElB,gCAAC;EACA,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO;;AAIhB,4BAAE;EACD,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,CAAC;EACT,KAAK,EHXS,OAAc;;AGc7B,2BAAC;EACA,SAAS,EAAE,MAAM;EACjB,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,IAAI;;;AAOnB,kCAAiB;EAChB,OAAO,EAAE,MAAM;;;AAIjB,aAAa;EACZ,UAAU,EAAE,MAAM;;AAClB,yBAAW;EACV,aAAa,EAAE,CAAC;;AAEhB,2BAAC;EACA,KAAK,EHvCiB,OAAwB;;AGyC9C,oEAAgB;EACf,KAAK,EHtCS,OAAc;;AG4C9B,sCAAa;EACT,KAAK,EH7CO,OAAc;EG8C1B,SAAS,EAAE,IAAI;;AAGhB,uCAAa;EACZ,KAAK,EHpDc,OAA0B;EGqD7C,SAAS,EAAE,MAAM;;;AAKvB,eAAe;EACd,WAAW,EAAE,IAAI;;AAGhB,+BAAc;EACb,SAAS,EAAE,IAAI;;AAIjB,sBAAM;EACL,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,QAAQ;;AAEjB,gCAAW;EACV,UAAU,EHrEW,OAAO;;AGwE7B,4BAAO;EACN,UAAU,EHtEW,OAAO;;AG0E9B,sBAAM;EACL,SAAS,EAAE,MAAM;EACjB,KAAK,EHjFW,OAAc;;AGoF/B,0BAAU;EACT,eAAe,EAAE,YAAY;;;AAI/B,YAAY;EACX,QAAQ,EAAE,QAAQ;;;AAGnB,iBAAiB;EAChB,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,IAAI;EAEnB;;;;;;OAMI;;AAEJ,oBAAE;EACD,MAAM,EAAE,OAAO;EACf,OAAO,EAAE,CAAC;;;ACrHZ,WAAW;EACV,MAAM,EAAE,MAAM;EACd,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,mCAA4B;EACxC,YAAY,EAAE,oBAAoB;;;AAGnC,yBAAwB;EACvB,WAAW;IACV,KAAK,EAAE,GAAG;;;ACTZ,MAAM;EACL,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,MAAM;EACf,cAAc,EAAE,CAAC;EACjB,UAAU,EAAE,cAAc;;AAE1B,SAAE;EACD,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;;AAGjB,SAAE;EACD,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,IAAI;EAChB,aAAa,EAAE,IAAI;EACnB,QAAQ,EAAE,QAAQ;EAClB,QAAQ,EAAE,MAAM;;AAEhB,YAAE;EACD,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,QAAQ;;AAEhB,cAAC;EACA,KAAK,ELpBgB,OAAwB;;AKsB7C,0CAAgB;EACf,KAAK,ELnBQ,OAAc;;AKwB7B,yBAAc;EACb,KAAK,EAAE,KAAK;EACZ,QAAQ,EAAE,MAAM;EAChB,aAAa,EAAE,GAAG;EAClB,gBAAgB,EAAE,IAAI;;AAEtB,6BAAG;EACF,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;;AAGb,gEAAgB;EACf,gBAAgB,ELpCH,OAAc;;AKwC7B,oBAAO;EACN,QAAQ,EAAE,QAAQ;;AAElB,wBAAG;EACF,KAAK,EAAE,IAAI;;AAMb,mBAAE;EACD,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,WAAW;EACnB,UAAU,EAAE,CAAC;;AAEb,qBAAC;EACA,SAAS,EAAE,MAAM;;AAGlB,+BAAa;EACZ,WAAW,EAAE,CAAC;;AAMlB,iBAAU;EACT,MAAM,EAAE,CAAC;EACT,uBAAuB;EACvB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,cAAc", +"sources": ["../sass/theme.scss","../sass/_partials/_global.scss","../sass/_partials/_color.scss","../sass/_partials/_header.scss","../sass/_partials/_landing.scss","../sass/_partials/_shop.scss","../sass/_partials/_login.scss","../sass/_partials/_footer.scss"], +"names": [], +"file": "theme.css" +} \ No newline at end of file diff --git a/assets/db.txt b/assets/db.txt new file mode 100644 index 0000000..cd98fe3 --- /dev/null +++ b/assets/db.txt @@ -0,0 +1,177 @@ +create database freshcery; + + +CREATE TABLE `users` ( + `id` int NOT NULL auto_increment primary key, + `fullname` varchar(200) NOT NULL, + `email` varchar(200) NOT NULL, + `username` varchar(200) NOT NULL , + `mypassword` varchar(200) NOT NULL, + `image` varchar(200) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `categories` ( + `id` int(3) NOT NULL primary key, + `name` varchar(200) NOT NULL, + `image` varchar(200) NOT NULL, + `icon` varchar(200) NOT NULL, + `description` varchar(200) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +INSERT INTO `categories` (`id`,`name`, `image`, `icon`, `description`) +VALUES (1,'Vegetables', 'vegetables.jpg', 'bistro-carrot', 'Fresh farm vegetables from local growers'),(2,'Fruits', 'fruits.jpg', 'bistro-apple', 'Variety of Fruits From Local Growers'); + + +INSERT INTO `categories` (`id`,`name`, `image`, `icon`, `description`) +VALUES (3,'Frozen', 'frozen.jpg', 'bistro-french-fries', 'In house made Frozen products'),(4,'Packed products', 'package.jpg', 'bistro-appetizer', 'In house made Packed raw Products'); + +INSERT INTO `categories` (`id`,`name`, `image`, `icon`, `description`) +VALUES (5,'Meat', 'meat.jpg', 'bistro-chicken', 'meat'); + + +CREATE TABLE `products` ( + `id` int(3) NOT NULL primary key auto_increment, + `title` varchar(200) NOT NULL, + `description` text NOT NULL, + `price` varchar(10) NOT NULL, + `quantity` int(3) NOT NULL DEFAULT 1, + `image` varchar(200) NOT NULL, + `exp_date` varchar(200) NOT NULL, + `category_id` int(3) NOT NULL, + `status` int(1) NOT NULL DEFAULT 1, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +INSERT INTO `products` (`title`, `description`, `price`, `quantity`, `image`, `exp_date`, `category_id`, `status`) VALUES +('Carrots', 'Crunchy and sweet organic carrots.', '35/kg', 100, 'vegetables.jpg', '2025-04-30', 1, 1), +('mango', 'alphonso mango', '60/piece', 20, 'fruits.jpg', '2025-04-02', 2, 1), +('Tomatoes', 'Freshly grown organic tomatoes', '25/kg', 30, 'vegetables.jpg', '2025-04-20', 1, 1); + + +INSERT INTO `products` (`title`, `description`, `price`, `quantity`, `image`, `exp_date`, `category_id`, `status`) VALUES +('french fries', 'Crunchy fries.', '250/kg', 100, 'frozen.jpg', '2025-10-30', 3, 1), +('mackains smiley', 'stay happy with smiles', '200/kg', 20, 'frozen.jpg', '2025-10-02', 4, 1), +('mix sprouts', 'mixture of sprouts 200g', '135', 30, 'package.jpg', '2025-04-01', 4, 1); + + +ALTER TABLE `products` +ADD CONSTRAINT `fk_category_product` +FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`) +ON DELETE CASCADE; + + + +INSERT INTO `products` (`id`, `title`, `description`, `price`, `quantity`, `image`, `exp_date`, `category_id`, `status`) VALUES +(7, 'orange', 'simple orange', '60/500g', 20, 'fruits.jpg', '2025-04-02', 2, 1); +INSERT INTO `products` (`id`, `title`, `description`, `price`, `quantity`, `image`, `exp_date`, `category_id`, `status`) VALUES +(8, 'bannana', 'simple bannana', '60/kg', 200, 'fruits.jpg', '2025-04-05', 2, 1); + + + +CREATE TABLE `cart` ( + `id` int NOT NULL auto_increment primary key, + `pro_id` int NOT NULL, + `pro_title` varchar(200) NOT NULL, + `pro_image` varchar(200) NOT NULL, + `pro_price` varchar(20) NOT NULL, + `pro_qty` int NOT NULL, + `pro_total` int(10) NOT NULL, + `user_id` int NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE `orders` ( + `id` BIGINT PRIMARY KEY DEFAULT (UUID_SHORT()), + `name` varchar(200) NOT NULL, + `address` varchar(200) NOT NULL, + `city` varchar(200) NOT NULL, + `country` varchar(200) NOT NULL, + `zip_code` int(20) NOT NULL, + `email` varchar(200) NOT NULL, + `phone_number` BIGINT NOT NULL, + `order_notes` text NOT NULL, + `status` varchar(200) NOT NULL DEFAULT 'sent to admins', + `Total_order_value` int(20) NOT NULL, + `user_id` int(10) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +ALTER TABLE `users` +ADD COLUMN `role` ENUM('admin', 'user') NOT NULL DEFAULT 'user'; + +ALTER TABLE orders +MODIFY COLUMN status VARCHAR(200) NOT NULL DEFAULT 'Failed'; + +ALTER TABLE categories +MODIFY COLUMN id INT NOT NULL auto_increment; + +describe categories; + +ALTER TABLE categories +MODIFY COLUMN id INT NOT NULL auto_increment = 10; + +ALTER TABLE categories +AUTO_INCREMENT = 10; + + + +CREATE TABLE `products` ( + `id` int(3) NOT NULL primary key auto_increment, + `title` varchar(200) NOT NULL, + `description` text NOT NULL, + `price` varchar(10) NOT NULL, + `quantity` int(3) NOT NULL DEFAULT 1, + `image` varchar(200) NOT NULL, + `exp_date` varchar(200) NOT NULL, + `category_id` int(3) NOT NULL, + `status` int(1) NOT NULL DEFAULT 1, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE `cart` ( + `id` int NOT NULL auto_increment primary key, + `pro_id` int NOT NULL, + `pro_title` varchar(200) NOT NULL, + `pro_image` varchar(200) NOT NULL, + `pro_price` varchar(20) NOT NULL, + `pro_qty` int NOT NULL, + `pro_total` int(10) NOT NULL, + `user_id` int NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE `orders` ( + `id` BIGINT PRIMARY KEY DEFAULT (UUID_SHORT()), + `name` varchar(200) NOT NULL, + `address` varchar(200) NOT NULL, + `city` varchar(200) NOT NULL, + `country` varchar(200) NOT NULL, + `zip_code` int(20) NOT NULL, + `email` varchar(200) NOT NULL, + `phone_number` BIGINT NOT NULL, + `order_notes` text NOT NULL, + `status` varchar(200) NOT NULL DEFAULT 'sent to admins', + `Total_order_value` int(20) NOT NULL, + `user_id` int(10) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp() +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +CREATE TABLE order_details ( + id INT AUTO_INCREMENT PRIMARY KEY, + order_id BIGINT, + pro_id INT, + pro_title VARCHAR(255), + pro_total INT, + total_order_value INT +); + +ALTER TABLE order_details +ADD COLUMN created_at timestamp NOT NULL DEFAULT current_timestamp(); \ No newline at end of file diff --git a/assets/fonts/font-awesome/font-awesome.css b/assets/fonts/font-awesome/font-awesome.css new file mode 100755 index 0000000..5d9067c --- /dev/null +++ b/assets/fonts/font-awesome/font-awesome.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:a 2s infinite linear;animation:a 2s infinite linear}.fa-pulse{-webkit-animation:a 1s infinite steps(8);animation:a 1s infinite steps(8)}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-aws:before{content:"\f375"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comments:before{content:"\f086"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crosshairs:before{content:"\f05b"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-dot-circle:before{content:"\f192"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drupal:before{content:"\f1a9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-excel:before{content:"\f1c3"}.fa-file-image:before{content:"\f1c5"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-firstdraft:before{content:"\f3a1"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frown:before{content:"\f119"}.fa-futbol:before{content:"\f1e3"}.fa-gamepad:before{content:"\f11b"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-male:before{content:"\f183"}.fa-map:before{content:"\f279"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-maxcdn:before{content:"\f136"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-meh:before{content:"\f11a"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-moon:before{content:"\f186"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-paragraph:before{content:"\f1dd"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-percent:before{content:"\f295"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phone:before{content:"\f095"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-print:before{content:"\f02f"}.fa-product-hunt:before{content:"\f288"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-rebel:before{content:"\f1d0"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-road:before{content:"\f018"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-rupee-sign:before{content:"\f156"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shower:before{content:"\f2cc"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-spotify:before{content:"\f1bc"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-strava:before{content:"\f428"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-circle:before{content:"\f2bd"}.fa-user-md:before{content:"\f0f0"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-warehouse:before{content:"\f494"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(webfonts/fa-brands-400.eot);src:url(webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-brands-400.woff2) format("woff2"),url(webfonts/fa-brands-400.woff) format("woff"),url(webfonts/fa-brands-400.ttf) format("truetype"),url(webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(webfonts/fa-regular-400.eot);src:url(webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-regular-400.woff2) format("woff2"),url(webfonts/fa-regular-400.woff) format("woff"),url(webfonts/fa-regular-400.ttf) format("truetype"),url(webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(webfonts/fa-solid-900.eot);src:url(webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(webfonts/fa-solid-900.woff2) format("woff2"),url(webfonts/fa-solid-900.woff) format("woff"),url(webfonts/fa-solid-900.ttf) format("truetype"),url(webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:Font Awesome\ 5 Free}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/assets/fonts/font-awesome/webfonts/fa-brands-400.eot b/assets/fonts/font-awesome/webfonts/fa-brands-400.eot new file mode 100755 index 0000000..0a1ef3f Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-brands-400.eot differ diff --git a/assets/fonts/font-awesome/webfonts/fa-brands-400.svg b/assets/fonts/font-awesome/webfonts/fa-brands-400.svg new file mode 100755 index 0000000..4c23753 --- /dev/null +++ b/assets/fonts/font-awesome/webfonts/fa-brands-400.svg @@ -0,0 +1,1008 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/font-awesome/webfonts/fa-brands-400.ttf b/assets/fonts/font-awesome/webfonts/fa-brands-400.ttf new file mode 100755 index 0000000..f990851 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-brands-400.ttf differ diff --git a/assets/fonts/font-awesome/webfonts/fa-brands-400.woff b/assets/fonts/font-awesome/webfonts/fa-brands-400.woff new file mode 100755 index 0000000..2e87401 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-brands-400.woff differ diff --git a/assets/fonts/font-awesome/webfonts/fa-brands-400.woff2 b/assets/fonts/font-awesome/webfonts/fa-brands-400.woff2 new file mode 100755 index 0000000..0d575fd Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-brands-400.woff2 differ diff --git a/assets/fonts/font-awesome/webfonts/fa-regular-400.eot b/assets/fonts/font-awesome/webfonts/fa-regular-400.eot new file mode 100755 index 0000000..cda0a84 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-regular-400.eot differ diff --git a/assets/fonts/font-awesome/webfonts/fa-regular-400.svg b/assets/fonts/font-awesome/webfonts/fa-regular-400.svg new file mode 100755 index 0000000..2875252 --- /dev/null +++ b/assets/fonts/font-awesome/webfonts/fa-regular-400.svg @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/font-awesome/webfonts/fa-regular-400.ttf b/assets/fonts/font-awesome/webfonts/fa-regular-400.ttf new file mode 100755 index 0000000..ee13f84 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-regular-400.ttf differ diff --git a/assets/fonts/font-awesome/webfonts/fa-regular-400.woff b/assets/fonts/font-awesome/webfonts/fa-regular-400.woff new file mode 100755 index 0000000..bcd8343 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-regular-400.woff differ diff --git a/assets/fonts/font-awesome/webfonts/fa-regular-400.woff2 b/assets/fonts/font-awesome/webfonts/fa-regular-400.woff2 new file mode 100755 index 0000000..35cc7b3 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-regular-400.woff2 differ diff --git a/assets/fonts/font-awesome/webfonts/fa-solid-900.eot b/assets/fonts/font-awesome/webfonts/fa-solid-900.eot new file mode 100755 index 0000000..ef75106 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-solid-900.eot differ diff --git a/assets/fonts/font-awesome/webfonts/fa-solid-900.svg b/assets/fonts/font-awesome/webfonts/fa-solid-900.svg new file mode 100755 index 0000000..0ae8e32 --- /dev/null +++ b/assets/fonts/font-awesome/webfonts/fa-solid-900.svg @@ -0,0 +1,1518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/font-awesome/webfonts/fa-solid-900.ttf b/assets/fonts/font-awesome/webfonts/fa-solid-900.ttf new file mode 100755 index 0000000..17bb674 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-solid-900.ttf differ diff --git a/assets/fonts/font-awesome/webfonts/fa-solid-900.woff b/assets/fonts/font-awesome/webfonts/fa-solid-900.woff new file mode 100755 index 0000000..4cf2a4f Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-solid-900.woff differ diff --git a/assets/fonts/font-awesome/webfonts/fa-solid-900.woff2 b/assets/fonts/font-awesome/webfonts/fa-solid-900.woff2 new file mode 100755 index 0000000..eea9aa2 Binary files /dev/null and b/assets/fonts/font-awesome/webfonts/fa-solid-900.woff2 differ diff --git a/assets/fonts/sb-bistro/sb-bistro.css b/assets/fonts/sb-bistro/sb-bistro.css new file mode 100755 index 0000000..0e6877d --- /dev/null +++ b/assets/fonts/sb-bistro/sb-bistro.css @@ -0,0 +1,222 @@ +/** +* @package Bistro 1.0 +* @author ShapeBootstrap http://shapebootstrap.net +* @copyright (c) 2013 - 2015 ShapeBootstrap +* Generated by IcoMoon https://icomoon.io/app +* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later +*/ + +@font-face { + font-family: 'sb-bistro'; + src:url('sb-bistro.eot?-2sivhm'); + src:url('sb-bistro.eot?#iefix-2sivhm') format('embedded-opentype'), + url('sb-bistro.ttf?-2sivhm') format('truetype'), + url('sb-bistro.woff?-2sivhm') format('woff'), + url('sb-bistro.svg?-2sivhm#sb-bistro-') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="sb-bistro"], [class*="sb-bistro"] { + font-family: 'sb-bistro'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.sb-bistro-appetizer:before { + content: "\e600"; +} +.sb-bistro-apple:before { + content: "\e601"; +} +.sb-bistro-blender:before { + content: "\e602"; +} +.sb-bistro-bowl:before { + content: "\e603"; +} +.sb-bistro-burger:before { + content: "\e604"; +} +.sb-bistro-cake:before { + content: "\e605"; +} +.sb-bistro-carrot:before { + content: "\e606"; +} +.sb-bistro-chef-hat:before { + content: "\e607"; +} +.sb-bistro-chicken-1:before { + content: "\e608"; +} +.sb-bistro-chicken:before { + content: "\e609"; +} +.sb-bistro-clock:before { + content: "\e60a"; +} +.sb-bistro-coffee:before { + content: "\e60b"; +} +.sb-bistro-cone-icecream:before { + content: "\e60c"; +} +.sb-bistro-dessert:before { + content: "\e60d"; +} +.sb-bistro-dinner:before { + content: "\e60e"; +} +.sb-bistro-drinks:before { + content: "\e60f"; +} +.sb-bistro-drumstick:before { + content: "\e610"; +} +.sb-bistro-egg-bacon:before { + content: "\e611"; +} +.sb-bistro-fish-1:before { + content: "\e612"; +} +.sb-bistro-fish:before { + content: "\e613"; +} +.sb-bistro-french-fries:before { + content: "\e614"; +} +.sb-bistro-fried-egg:before { + content: "\e615"; +} +.sb-bistro-fruits:before { + content: "\e616"; +} +.sb-bistro-hot-pan:before { + content: "\e617"; +} +.sb-bistro-hotdog:before { + content: "\e618"; +} +.sb-bistro-icecream-1:before { + content: "\e619"; +} +.sb-bistro-icecream-2:before { + content: "\e61a"; +} +.sb-bistro-icecream:before { + content: "\e61b"; +} +.sb-bistro-jackfruit:before { + content: "\e61c"; +} +.sb-bistro-kettle:before { + content: "\e61d"; +} +.sb-bistro-kiwi:before { + content: "\e61e"; +} +.sb-bistro-lemon:before { + content: "\e61f"; +} +.sb-bistro-lunch:before { + content: "\e620"; +} +.sb-bistro-menu:before { + content: "\e621"; +} +.sb-bistro-muffin:before { + content: "\e622"; +} +.sb-bistro-offer:before { + content: "\e623"; +} +.sb-bistro-pan:before { + content: "\e624"; +} +.sb-bistro-pizza:before { + content: "\e625"; +} +.sb-bistro-popsicle:before { + content: "\e626"; +} +.sb-bistro-roast-leg:before { + content: "\e627"; +} +.sb-bistro-rss:before { + content: "\e628"; +} +.sb-bistro-saslik:before { + content: "\e629"; +} +.sb-bistro-sausage:before { + content: "\e62a"; +} +.sb-bistro-spoon-plate:before { + content: "\e62b"; +} +.sb-bistro-spoons:before { + content: "\e62c"; +} +.sb-bistro-steak:before { + content: "\e62d"; +} +.sb-bistro-stockpot:before { + content: "\e62e"; +} +.sb-bistro-taco:before { + content: "\e62f"; +} +.sb-bistro-tea:before { + content: "\e630"; +} +.sb-bistro-tomato:before { + content: "\e631"; +} +.sb-bistro-apron:before { + content: "\e632"; +} +.sb-bistro-contact:before { + content: "\e633"; +} +.sb-bistro-social:before { + content: "\e634"; +} +.sb-bistro-facebook:before { + content: "\e635"; +} +.sb-bistro-twitter:before { + content: "\e636"; +} +.sb-bistro-behance:before { + content: "\e637"; +} +.sb-bistro-pinterest:before { + content: "\e638"; +} +.sb-bistro-googleplus:before { + content: "\e639"; +} +.sb-bistro-vimeo:before { + content: "\e63a"; +} +.sb-bistro-instagram:before { + content: "\e63b"; +} +.sb-bistro-linkedin:before { + content: "\e63c"; +} +.sb-bistro-dribbble:before { + content: "\e63d"; +} +.sb-bistro-youtube:before { + content: "\e63e"; +} diff --git a/assets/fonts/sb-bistro/sb-bistro.eot b/assets/fonts/sb-bistro/sb-bistro.eot new file mode 100755 index 0000000..1a512f1 Binary files /dev/null and b/assets/fonts/sb-bistro/sb-bistro.eot differ diff --git a/assets/fonts/sb-bistro/sb-bistro.svg b/assets/fonts/sb-bistro/sb-bistro.svg new file mode 100755 index 0000000..4ef98b6 --- /dev/null +++ b/assets/fonts/sb-bistro/sb-bistro.svg @@ -0,0 +1,73 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/fonts/sb-bistro/sb-bistro.ttf b/assets/fonts/sb-bistro/sb-bistro.ttf new file mode 100755 index 0000000..4c72e72 Binary files /dev/null and b/assets/fonts/sb-bistro/sb-bistro.ttf differ diff --git a/assets/fonts/sb-bistro/sb-bistro.woff b/assets/fonts/sb-bistro/sb-bistro.woff new file mode 100755 index 0000000..c1aafb9 Binary files /dev/null and b/assets/fonts/sb-bistro/sb-bistro.woff differ diff --git a/assets/img/Tomato.jpg b/assets/img/Tomato.jpg new file mode 100644 index 0000000..10d276d Binary files /dev/null and b/assets/img/Tomato.jpg differ diff --git a/assets/img/amulnuttytreats.jpeg b/assets/img/amulnuttytreats.jpeg new file mode 100644 index 0000000..09c6531 Binary files /dev/null and b/assets/img/amulnuttytreats.jpeg differ diff --git a/assets/img/apple.jpeg b/assets/img/apple.jpeg new file mode 100644 index 0000000..b84ab70 Binary files /dev/null and b/assets/img/apple.jpeg differ diff --git a/assets/img/banana.jpeg b/assets/img/banana.jpeg new file mode 100644 index 0000000..761bf61 Binary files /dev/null and b/assets/img/banana.jpeg differ diff --git a/assets/img/bg-header.jpg b/assets/img/bg-header.jpg new file mode 100755 index 0000000..e445fc6 Binary files /dev/null and b/assets/img/bg-header.jpg differ diff --git a/assets/img/carrot.jpeg b/assets/img/carrot.jpeg new file mode 100644 index 0000000..f501094 Binary files /dev/null and b/assets/img/carrot.jpeg differ diff --git a/assets/img/favicon.jpeg b/assets/img/favicon.jpeg new file mode 100644 index 0000000..0f7a129 Binary files /dev/null and b/assets/img/favicon.jpeg differ diff --git a/assets/img/favicon.jpg b/assets/img/favicon.jpg new file mode 100644 index 0000000..d2e0f7f Binary files /dev/null and b/assets/img/favicon.jpg differ diff --git a/assets/img/first.png b/assets/img/first.png new file mode 100644 index 0000000..e69de29 diff --git a/assets/img/fish.jpg b/assets/img/fish.jpg new file mode 100755 index 0000000..0a15d97 Binary files /dev/null and b/assets/img/fish.jpg differ diff --git a/assets/img/frenchfries.jpeg b/assets/img/frenchfries.jpeg new file mode 100644 index 0000000..2722c21 Binary files /dev/null and b/assets/img/frenchfries.jpeg differ diff --git a/assets/img/frozen.jpg b/assets/img/frozen.jpg new file mode 100755 index 0000000..bf833e2 Binary files /dev/null and b/assets/img/frozen.jpg differ diff --git a/assets/img/fruits.jpg b/assets/img/fruits.jpg new file mode 100755 index 0000000..fbda80d Binary files /dev/null and b/assets/img/fruits.jpg differ diff --git a/assets/img/grapes.jpeg b/assets/img/grapes.jpeg new file mode 100644 index 0000000..b2ec45c Binary files /dev/null and b/assets/img/grapes.jpeg differ diff --git a/assets/img/logo/avatar-alt.jpg b/assets/img/logo/avatar-alt.jpg new file mode 100755 index 0000000..f51f56d Binary files /dev/null and b/assets/img/logo/avatar-alt.jpg differ diff --git a/assets/img/logo/avatar.jpg b/assets/img/logo/avatar.jpg new file mode 100755 index 0000000..5264c9a Binary files /dev/null and b/assets/img/logo/avatar.jpg differ diff --git a/assets/img/logo/avatar.png b/assets/img/logo/avatar.png new file mode 100644 index 0000000..fb209e0 Binary files /dev/null and b/assets/img/logo/avatar.png differ diff --git a/assets/img/logo/logo-white.png b/assets/img/logo/logo-white.png new file mode 100755 index 0000000..9a943be Binary files /dev/null and b/assets/img/logo/logo-white.png differ diff --git a/assets/img/logo/logo.png b/assets/img/logo/logo.png new file mode 100755 index 0000000..986e441 Binary files /dev/null and b/assets/img/logo/logo.png differ diff --git a/assets/img/maccainalootikki.jpeg b/assets/img/maccainalootikki.jpeg new file mode 100644 index 0000000..fd805b7 Binary files /dev/null and b/assets/img/maccainalootikki.jpeg differ diff --git a/assets/img/meats.jpg b/assets/img/meats.jpg new file mode 100755 index 0000000..37a5db7 Binary files /dev/null and b/assets/img/meats.jpg differ diff --git a/assets/img/mockup.png b/assets/img/mockup.png new file mode 100755 index 0000000..b5696e9 Binary files /dev/null and b/assets/img/mockup.png differ diff --git a/assets/img/mozrellasticks.jpeg b/assets/img/mozrellasticks.jpeg new file mode 100644 index 0000000..8dc0612 Binary files /dev/null and b/assets/img/mozrellasticks.jpeg differ diff --git a/assets/img/onion.jpeg b/assets/img/onion.jpeg new file mode 100644 index 0000000..1529c02 Binary files /dev/null and b/assets/img/onion.jpeg differ diff --git a/assets/img/oranges.jpeg b/assets/img/oranges.jpeg new file mode 100644 index 0000000..e65527f Binary files /dev/null and b/assets/img/oranges.jpeg differ diff --git a/assets/img/package.jpg b/assets/img/package.jpg new file mode 100755 index 0000000..7a1884f Binary files /dev/null and b/assets/img/package.jpg differ diff --git a/assets/img/playstore.png b/assets/img/playstore.png new file mode 100755 index 0000000..abd1ab7 Binary files /dev/null and b/assets/img/playstore.png differ diff --git a/assets/img/potatoes.jpeg b/assets/img/potatoes.jpeg new file mode 100644 index 0000000..b993d9a Binary files /dev/null and b/assets/img/potatoes.jpeg differ diff --git a/assets/img/sponsor.jpg b/assets/img/sponsor.jpg new file mode 100755 index 0000000..4fef275 Binary files /dev/null and b/assets/img/sponsor.jpg differ diff --git a/assets/img/vegetables.jpg b/assets/img/vegetables.jpg new file mode 100755 index 0000000..3561b40 Binary files /dev/null and b/assets/img/vegetables.jpg differ diff --git a/assets/js/jquery-migrate.js b/assets/js/jquery-migrate.js new file mode 100755 index 0000000..a2813c5 --- /dev/null +++ b/assets/js/jquery-migrate.js @@ -0,0 +1,2 @@ +/*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */ +"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window); \ No newline at end of file diff --git a/assets/js/jquery.js b/assets/js/jquery.js new file mode 100755 index 0000000..644d35e --- /dev/null +++ b/assets/js/jquery.js @@ -0,0 +1,4 @@ +/*! 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&&c0&&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+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +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(;h1,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\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +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-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]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(""; + exit(); +} +?> + + + + +?> \ No newline at end of file diff --git a/auth/login.php b/auth/login.php new file mode 100755 index 0000000..c3f6301 --- /dev/null +++ b/auth/login.php @@ -0,0 +1,127 @@ + window.location.href='" . freshcery . "'"; // so that whenever if a user is already logged in then that user cant acces the login page directly by editing the url +} +$errorMessage = ""; + +if (isset($_POST['login'])) { + $username = htmlspecialchars($_POST['username']); + $password = $_POST['password']; + + if (empty($username) || empty($password)) { + $errorMessage = "One or more inputs are empty."; + } else { + $query = "SELECT * FROM users WHERE username='$username'"; + $login = $pdo->prepare($query); + $login->execute(); + $fetch = $login->fetch(PDO::FETCH_ASSOC); + + if ($login->rowCount() > 0) { + if (password_verify($password, $fetch['mypassword'])) { + $_SESSION['username'] = $fetch['username']; + $_SESSION['email'] = $fetch['email']; + $_SESSION['user_id'] = $fetch['id']; + $_SESSION['image'] = $fetch['image']; + + if ($fetch['role'] === 'admin') { + echo ""; + } else { + echo ""; + } + exit(); + } else { + $errorMessage = "Incorrect password."; + } + } else { + $errorMessage = "User not found."; + } + } +} +?> +
+ +
+ + \ No newline at end of file diff --git a/auth/logout.php b/auth/logout.php new file mode 100644 index 0000000..466008c --- /dev/null +++ b/auth/logout.php @@ -0,0 +1,22 @@ +window.location.href='http://freshcery';"; + exit(); +} +?> + + + + +?> \ No newline at end of file diff --git a/auth/register.php b/auth/register.php new file mode 100755 index 0000000..ab06c81 --- /dev/null +++ b/auth/register.php @@ -0,0 +1,208 @@ + window.location.href='" . freshcery . "'"; +} +if (isset($_POST['Register'])) { + $fullname = htmlspecialchars(trim($_POST['fullname'])); + $username = htmlspecialchars(trim($_POST['username'])); + $email = trim($_POST['email']); + $password = $_POST['password']; + $confirm_password = $_POST['confirm_password']; + + if (!isset($_POST['terms'])) { + $termsError = "You must agree to the Terms & Conditions."; + } + + if (empty($fullname) || empty($username) || empty($password) || empty($email)) { + $formError = "All fields are required."; + } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + $formError = "Invalid email format."; + } elseif ($password !== $confirm_password) { + $formError = "Passwords do not match."; + } else { + // Check if username exists + $checkUserQuery = 'SELECT COUNT(*) FROM users WHERE username = :username'; + $checkStmt = $pdo->prepare($checkUserQuery); + $checkStmt->execute([':username' => $username]); + $userExists = $checkStmt->fetchColumn(); + + if ($userExists > 0) { + $usernameError = "Username is already taken."; + } else { + // Insert the user + $image = "user.png"; + $query = 'INSERT INTO users (fullname, username, email, mypassword, image) + VALUES (:fullname, :username, :email, :mypassword, :image);'; + $insert = $pdo->prepare($query); + $insert->execute([ + ':fullname' => $fullname, + ':username' => $username, + ':email' => $email, + ':mypassword' => password_hash($password, PASSWORD_DEFAULT), + ':image' => $image + ]); + + header('Location: login'); + exit; + } + } +} +?> + +
+ +
+ + + + diff --git a/cart.php b/cart.php new file mode 100755 index 0000000..7a62124 --- /dev/null +++ b/cart.php @@ -0,0 +1,230 @@ +prepare("select * from cart where user_id=$_SESSION[user_id]"); +$products->execute(); +$cart_products = $products->fetchAll(PDO::FETCH_OBJ); +if (isset($_POST['submit'])) { + $inp_price = $_POST['inp_price']; + $_SESSION['price'] = $inp_price; + + echo ""; +} +?> +
+ +
+
+
+
+
+ + + + + + + + + + + + + + 0): + foreach ($cart_products as $PRODUCT_IN_CART): + ?> + + + + + + + + + + +
+

Cart is empty !!!

+
+ + +
ProductsPriceQuantityUpdateSubtotalDelete
+ + + pro_title; ?>
+
+ Rp pro_price; ?> + + + + UPDATE + Rp. + pro_total; ?> + + +
+
+
+
+ Continue Shopping + +
+

Your cart is empty. Start shopping now!

+
+ + +
+
+
+
+
+ + + + + +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/checkout.php b/checkout.php new file mode 100755 index 0000000..fbd13c8 --- /dev/null +++ b/checkout.php @@ -0,0 +1,336 @@ +load(); +\Stripe\Stripe::setApiKey($_ENV['STRIPE_SECRET_KEY']); + +$products = $pdo->prepare("SELECT * FROM cart WHERE user_id = :user_id"); +$products->execute([':user_id' => $_SESSION['user_id']]); +$cart_products = $products->fetchAll(PDO::FETCH_OBJ); +if (isset($_POST['order_details'])) { + $name = htmlspecialchars($_POST['name']); + $address = htmlspecialchars($_POST['address']); + $city = htmlspecialchars($_POST['city']); + $country = htmlspecialchars($_POST['country']); + $zip_code = htmlspecialchars($_POST['zip_code']); + $email = $_POST['email']; + $phone_number = htmlspecialchars($_POST['phone_number']); + $order_notes = htmlspecialchars($_POST['order_notes']); + $user_id = $_SESSION['user_id']; + $Total_order_value = $_SESSION['payment']; //this signifies the total order total + if (empty($name) || empty($address) || empty($city) || empty($country) || empty($zip_code) || empty($email) || empty($phone_number)) { + $errorMessage = "One or more inputs are empty."; + } else { + $query = 'INSERT INTO orders (name,address, city, country, zip_code,email,phone_number,order_notes,Total_order_value,user_id) VALUES ( :name, :address, :city, :country, :zip_code, :email, :phone_number, :order_notes, :Total_order_value, :user_id);'; + $insert = $pdo->prepare($query); + $insert->execute([ + ':name' => $name, + ':address' => $address, + ':city' => $city, + ':country' => $country, + ':zip_code' => $zip_code, + ':email' => $email, + ':phone_number' => $phone_number, + ':order_notes' => $order_notes, + ':Total_order_value' => $Total_order_value, + ':user_id' => $user_id, + ]); + + $_SESSION['Total_order_value'] = $Total_order_value; + $errorMessage = "Order details verified"; + if (isset($_SESSION['Total_order_value'])) { + $order_details = $pdo->prepare('select id FROM orders WHERE user_id = :user_id order by created_at desc limit 1;'); + $order_details->execute([':user_id' => $_SESSION['user_id']]); + $order_details_id = $order_details->fetch(PDO::FETCH_ASSOC); + $_SESSION['order_details_id'] = $order_details_id; + } + } +} + +if (isset($_SESSION['Total_order_value'])) { + $order_details = $pdo->prepare('select pro_id FROM cart WHERE user_id = :user_id'); + $order_details->execute([':user_id' => $_SESSION['user_id']]); +} +$shipping_charges = 80; +?> + +
+ +
+
+
+
+
BILLING DETAILS
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
YOUR ORDER
+
+ + + + + + + + + 0)): + foreach ($cart_products as $PRODUCT_IN_CART):?> + + + + + +
+

error!

+
+ + + + + + + + + + + + + + + + +
ProductsSubtotal
+ pro_title; ?> x pro_qty; ?>
+
Rp. + pro_total; ?> +
+ Cart Subtotal + + Rp. +
+ Shipping + + Rp. +
+ ORDER TOTAL + + Rp. + +
+
+ + +
+ +

+ Iโ€™ve read & accept the terms & conditions +

+ PROCEED TO CHECKOUT +
+ +
+
+



+
+ +
+ +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/configration/db.config.php b/configration/db.config.php new file mode 100755 index 0000000..a35a7c3 --- /dev/null +++ b/configration/db.config.php @@ -0,0 +1,25 @@ +load(); + + +//now to restrict the viewership of this page directly through the url we ca nuse: + +// if(!isset($_SERVER['HTTP_REFERER'])){ +// //when someone try to access by url gets redirected to homepage-> index.php +// header("Location: http://freshcery/"); +// } +$db_user = $_ENV['DB_USER']; +$db_pass = $_ENV['DB_PASS']; +$db_name = $_ENV['DB_NAME']; +$dsn = "mysql:host=localhost;dbname=$db_name;charset=utf8mb4"; + +try { + $pdo = new PDO($dsn, $db_user, $db_pass); + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} catch (PDOException $e) { + echo $e->getMessage(); +} +?> \ No newline at end of file diff --git a/contact.php b/contact.php new file mode 100755 index 0000000..e14aa59 --- /dev/null +++ b/contact.php @@ -0,0 +1,75 @@ + +
+ + +
+
+
+
+
+
+ +

Send Us a Message

+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
  • + contact us +
  • +
    +
    +
    +
    +
    +
    +
    +

    + Freshcery Headquarter +

    + +

    + Simform 501
    + Bopal Ambli road
    + Ahmedabad 38001 +

    + +

    + 9408441939
    + freshcery@gmail.com +

    +
    +
    +
    +
    +
    + +


    +
    +
    + \ No newline at end of file diff --git a/delete-product.php b/delete-product.php new file mode 100644 index 0000000..51666c6 --- /dev/null +++ b/delete-product.php @@ -0,0 +1,17 @@ +prepare("DELETE from cart WHERE id = '$id' "); + if ($update->execute()) { + echo "Product deleted successfully."; + } else { + echo "Error deleting product."; + } +} +?> + diff --git a/detail-product.php b/detail-product.php new file mode 100755 index 0000000..f14ce3d --- /dev/null +++ b/detail-product.php @@ -0,0 +1,200 @@ +Invalid Product ID!"); +} +$product_id = intval($_GET['id']); +if ($product_id <= 0) { + die("

    Invalid Product ID!

    "); +} +$query = "SELECT p.*, c.name AS category_name, c.id AS category_id + FROM products p + JOIN categories c ON p.category_id = c.id + WHERE p.id = ?"; +$stmt = $pdo->prepare($query); +$stmt->execute([$product_id]); +$product = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$product) { + die("

    Product Not Found!

    "); +} + +$category_id = $product['category_id']; + +// โœ… Fetch related products in the same category (excluding current product) +$related_query = "SELECT * FROM products WHERE category_id = ? AND id != ? LIMIT 5"; +$stmt = $pdo->prepare($related_query); +$stmt->execute([$category_id, $product_id]); +$related_products = $stmt->fetchAll(PDO::FETCH_ASSOC); + +if (isset($_POST['submit'])) { + $pro_id = $_POST['pro_id']; + $pro_title = $_POST['pro_title']; + $pro_image = $_POST['pro_image']; + $pro_price = $_POST['pro_price']; + $pro_qty = $_POST['pro_qty']; + $user_id = $_POST['user_id']; + + $pro_total = floatval($pro_price) * intval($pro_qty); + + $query = "INSERT INTO cart (pro_id, pro_title, pro_image, pro_price, pro_qty, pro_total, user_id) + VALUES (:pro_id, :pro_title, :pro_image, :pro_price, :pro_qty, :pro_total, :user_id)"; + $insert = $pdo->prepare($query); + + // Bind the parameters + $insert->bindParam(":pro_id", $pro_id); + $insert->bindParam(":pro_title", $pro_title); + $insert->bindParam(":pro_image", $pro_image); + $insert->bindParam(":pro_price", $pro_price); + $insert->bindParam(":pro_qty", $pro_qty); + $insert->bindParam(":pro_total", $pro_total); + $insert->bindParam(":user_id", $user_id); + $insert->execute(); +} +?> +
    + +
    +
    +
    +
    + Product Image +
    +
    +

    + Category:
    + Price: Rp +

    +

    Quantity

    + +
    + + + + + + + +
    +
    + +
    +
    + +

    + + + + +
    +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/faq.php b/faq.php new file mode 100755 index 0000000..8165d30 --- /dev/null +++ b/faq.php @@ -0,0 +1,83 @@ + +
    + + +
    +
    +
    +
    +

    1. What is Freshchery?

    +

    Freshchery delivers groceries from the stores you love to your doorstep in as little as one hour! We empower you to shop at your trusted stores using our own trained and experienced Personal Shoppers, and then ensure a safe delivery to you.

    +

    2. What stores are supported?

    +

    We support a selected number of stores in your area including Ranch Market, Farmers Market, Lotte Mart, Transmart Carrefour, Super Indo, Grand Lucky, Red&White and LOKA Lifestyle Supermarket. We are constantly adding new stores from your area, empowering you to shop from those stores. The stores that serve you are based on your location, and the availability of stores in your proximity.

    +

    3. Do you serve my area?

    +

    Currently we serve the Greater Jakarta area, including Tangeran, BSD, Bekasi and Depok as well as Surabaya and Bandung central areas. Check if we deliver to your area by downloading the App or using our Website. You can type your address and see the list of stores available. We keep adding stores on a regular basis! If your favorite store is not listed you can suggest it to us via the  โ€œRequest New Storesโ€ button at the bottom of the  supermarkets list.

    +

    4. How fast do you deliver?

    +

    We deliver to you in the next hour, or at any other one-hour time-slot today and in the next 6 days.

    +

    5. How much does delivery cost?

    +

    It costs IDR20,000 for the delivery on all delivery slots. And FREE DELIVERY for order placed above IDR500,000 in May 2017 only

    +

    6. What are the delivery hours?

    +

    Our delivery hours are based on the opening hours of the stores we work with. Usually between 10am and 10pm. You can place your orders at any time of the day.

    +

    7. Can I collect any kinds of club points from the supermarkets?

    +

    Currently we do not support the collection of membership points or other savings from stores. Be sure to keep an eye on email and social media updates for updates on how weโ€™re expanding to improve this functionality.

    +

    8. What happens if any of my items are out of stock?

    +

    We receive price and stock updates on a daily base from our retail partners. After placing your order, you will be asked what our Personal Shopper should do in case one of more of your items are out of stock. You can select for the whole order or for each unique product the following actions: choose โ€œlet shopper pickโ€ if you want our shoppers to pick the most suitable replacement for you or โ€œcall meโ€ if you prefer to receive a phone call. Alternatively, you can also select โ€œdo not replaceโ€.

    +

    9. Are there price differences from the store?
    + For some stores, we may add a small service charge on top of the store price. If you notice an item that you think is priced incorrectly, please reach out to us! We reserve the right to cancel items that are priced incorrectly due to error.

    +

    10. How do you treat items that are non-Halal?

    +

    We allow you to buy non-Halal items using Freshchery, and are very careful to ensure that at no point during checkout, delivery, or any other time, non-Halal and Halal items get in contact with each other. To ensure that, we use different bags and clearly separated parts of the box for the transport of non-Halal items.

    +

    11. Would I get the Freshchery shopping bag for my order?

    +

    As long as the stocks are available, our Driver will put your order on our very own reuseable shopping bag. If you donโ€™t get the shopping bag, it could be happened because the stocks are empty. But we will restock our shopping bag in the stores maximum at 1 week, donโ€™t worry.

    +

    12. Can you assure the quality of the products that I bought?

    +

    Of course! We can assure the quality of the items for you, our beloved customer. If you found any bad quality items, you can contact our Customer Service and we will replace it.

    +

    13. How do I check the status of my order?

    +

    You will get notified when your order is packed, order is on its way and has almost arrived. Remember to turn on your push notification in your phone settings. You can also go on โ€œMy Ordersโ€ section in the app to check live-time status.

    +

    14. How do I edit or cancel my order?

    +

    You can edit your order until the shopper starts picking your items. Go to โ€œMy Ordersโ€ section in the app and select the order you want to edit. Click on โ€œEdit Orderโ€ to change one of the following:

    +
      +
    • Add or remove items
    • +
    • Change delivery slot
    • +
    • Change payment method
    • +
    • Change address
    • +
    • Cancel order
    • +
    +

    15. How do I report a problem with my order?

    +

    You can contact us following the โ€œHelpโ€ button in the app and selecting โ€œContact Usโ€. We respond very quickly!

    +

    16. When will I receive my refund?

    +

    Payment will be made within 14 days by crediting your credit card.

    +

    17. How do I review my receipt?

    +

    You will receive an electronic receipt via e-mail after your order is delivered.

    +

    18. How do I return my Freshchery bags?

    +

    We encourage you to return your Freshchery bags that are still in good condition to your next Freshchery shopper for reuse. Feel free to use them for your own errands too.

    +

    19. How do I return items?

    +

    If something seems to be wrong with your order, such as a missing item or an incorrect item, you can reject the items when our rider arrives at your doorstep. We will charge you only for the delivered items. Once an item is accepted by you, it cannot be returned. We do not currently support a return process for any items you may have accidentally purchased via Freshchery. You are more than welcome to coordinate returns directly with your store. Keep in mind that we do keep the in-store receipts for accounting purposes.

    +

    20. Why is my card authorized for more than my order total?

    +

    Like a restaurant or a bar, Freshchery temporarily authorizes your card for slightly more than your order total. As soon as your order is complete, we charge your card for exactly what was delivered. Your bank will update the final charge on your statement in 3 โ€“ 7 business days after delivery. The temporary authorization can be for up to Rp 100,000 more than the order total. It helps account for charges like items sold by weight. If your final order total exceeds the authorization amount, there may be a second charge for the difference. You can see all charges reflected at the bottom of your receipt, which is available after delivery.

    +

    21. Who will select my items?

    +

    All our Personal Shoppers and Drivers are highly trained at selecting the best groceries for you. We employ Personal Shoppers that pick grocery and Drivers to deliver to your doorstep; in some stores, we may rely directly on Drivers to deliver your grocery.

    +

    22. Who will deliver my order?

    +

    Your orders will be delivered by specially trained and screened Drivers.

    +

    23. What if all Personal Shoppers are busy?

    +

    Occasionally our Personal Shoppers get overwhelmed with orders. During these times, the next available delivery slot may be later in the day. Use the delivery checker in the app to see the next available delivery for your order.

    +

    24. I have many more questions for you!

    +

    Contact us! We will be there at support.indonesia@Freshchery.com.

    + + +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/include/cart_function.php b/include/cart_function.php new file mode 100644 index 0000000..cfc476f --- /dev/null +++ b/include/cart_function.php @@ -0,0 +1,10 @@ + + +prepare("SELECT COUNT(*) FROM cart WHERE user_id = :user_id"); + $stmt->bindParam(':user_id', $user_id, PDO::PARAM_INT); + $stmt->execute(); + $result = $stmt->fetch(PDO::FETCH_ASSOC); + + return $result['COUNT(*)']; +}?> \ No newline at end of file diff --git a/include/footer.php b/include/footer.php new file mode 100644 index 0000000..be9fec1 --- /dev/null +++ b/include/footer.php @@ -0,0 +1,83 @@ +
    +
    +
    +
    +
    About
    +

    Nisi esse dolor irure dolor eiusmod ex deserunt proident cillum eu qui enim occaecat sunt aliqua anim eiusmod qui ut voluptate.

    +
    +
    +
    Links
    + +
    +
    +
    Contact
    + +
    Follow Us
    + +
    +
    +
    Get Our App
    +
      +
    • + +
    • +
    • +
      + +
      +
    • +
    +
    +
    +
    + +
    + + + + + + + + + + + + + diff --git a/include/header.php b/include/header.php new file mode 100644 index 0000000..42e30f3 --- /dev/null +++ b/include/header.php @@ -0,0 +1,89 @@ + + + + + + + Freshcery | Groceries Organic Store + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100755 index 0000000..5119ff8 --- /dev/null +++ b/index.php @@ -0,0 +1,163 @@ +prepare($query); + $categories->execute(); + $allcategories = $categories->fetchAll(PDO::FETCH_OBJ); +} catch (PDOException $e) { + die("Database error: " . $e->getMessage()); // Or log the error +} +?> +
    + +
    +

    Why Freschery

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    + Straight from the Farm +

    +

    + Our farm-to-table concept emphasizes on getting the fresh produce directly from local farms to your tables within one day, hence you know you get the freshest produce straight from harvest. +

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    + Know Your Farmers +

    +

    + We want you to know exactly who is growing your food by having the farmers profile on each item and farmers page. Youโ€™re welcome to visit the farms and see the love they put into growing your food. +

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    + Improving Farmersโ€™ Livelihood +

    +

    + Slowly but sure, by cutting the complex supply chain and food system, we hope to improve the welfare of farmers by giving them the returns they deserve for their hard work. +

    +
    +
    +
    +
    + SHOP NOW +
    +
    +
    +
    +
    +

    Categories

    + +
    +
    + \ No newline at end of file diff --git a/payment_system/composer-setup.php b/payment_system/composer-setup.php new file mode 100644 index 0000000..a5efbed --- /dev/null +++ b/payment_system/composer-setup.php @@ -0,0 +1,1748 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +setupEnvironment(); +process(is_array($argv) ? $argv : array()); + +/** + * Initializes various values + * + * @throws RuntimeException If uopz extension prevents exit calls + */ +function setupEnvironment() +{ + ini_set('display_errors', 1); + + if (extension_loaded('uopz') && !(ini_get('uopz.disable') || ini_get('uopz.exit'))) { + // uopz works at opcode level and disables exit calls + if (function_exists('uopz_allow_exit')) { + @uopz_allow_exit(true); + } else { + throw new RuntimeException('The uopz extension ignores exit calls and breaks this installer.'); + } + } + + $installer = 'ComposerInstaller'; + + if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ($version = getenv('COMPOSERSETUP')) { + $installer = sprintf('Composer-Setup.exe/%s', $version); + } + } + + define('COMPOSER_INSTALLER', $installer); +} + +/** + * Processes the installer + */ +function process($argv) +{ + // Determine ANSI output from --ansi and --no-ansi flags + setUseAnsi($argv); + + $help = in_array('--help', $argv) || in_array('-h', $argv); + if ($help) { + displayHelp(); + exit(0); + } + + $check = in_array('--check', $argv); + $force = in_array('--force', $argv); + $quiet = in_array('--quiet', $argv); + $channel = 'stable'; + if (in_array('--snapshot', $argv)) { + $channel = 'snapshot'; + } elseif (in_array('--preview', $argv)) { + $channel = 'preview'; + } elseif (in_array('--1', $argv)) { + $channel = '1'; + } elseif (in_array('--2', $argv)) { + $channel = '2'; + } elseif (in_array('--2.2', $argv)) { + $channel = '2.2'; + } + $disableTls = in_array('--disable-tls', $argv); + $installDir = getOptValue('--install-dir', $argv, false); + $version = getOptValue('--version', $argv, false); + $filename = getOptValue('--filename', $argv, 'composer.phar'); + $cafile = getOptValue('--cafile', $argv, false); + + if (!checkParams($installDir, $version, $cafile)) { + exit(1); + } + + $ok = checkPlatform($warnings, $quiet, $disableTls, true); + + if ($check) { + // Only show warnings if we haven't output any errors + if ($ok) { + showWarnings($warnings); + showSecurityWarning($disableTls); + } + exit($ok ? 0 : 1); + } + + if ($ok || $force) { + if ($channel === '1' && !$quiet) { + out('Warning: You forced the install of Composer 1.x via --1, but Composer 2.x is the latest stable version. Updating to it via composer self-update --stable is recommended.', 'error'); + } + + $installer = new Installer($quiet, $disableTls, $cafile); + if ($installer->run($version, $installDir, $filename, $channel)) { + showWarnings($warnings); + showSecurityWarning($disableTls); + exit(0); + } + } + + exit(1); +} + +/** + * Displays the help + */ +function displayHelp() +{ + echo << $value) { + $next = $key + 1; + if (0 === strpos($value, $opt)) { + if ($optLength === strlen($value) && isset($argv[$next])) { + return trim($argv[$next]); + } else { + return trim(substr($value, $optLength + 1)); + } + } + } + + return $default; +} + +/** + * Checks that user-supplied params are valid + * + * @param mixed $installDir The required istallation directory + * @param mixed $version The required composer version to install + * @param mixed $cafile Certificate Authority file + * + * @return bool True if the supplied params are okay + */ +function checkParams($installDir, $version, $cafile) +{ + $result = true; + + if (false !== $installDir && !is_dir($installDir)) { + out("The defined install dir ({$installDir}) does not exist.", 'info'); + $result = false; + } + + if (false !== $version && 1 !== preg_match('/^\d+\.\d+\.\d+(\-(alpha|beta|RC)\d*)*$/', $version)) { + out("The defined install version ({$version}) does not match release pattern.", 'info'); + $result = false; + } + + if (false !== $cafile && (!file_exists($cafile) || !is_readable($cafile))) { + out("The defined Certificate Authority (CA) cert file ({$cafile}) does not exist or is not readable.", 'info'); + $result = false; + } + return $result; +} + +/** + * Checks the platform for possible issues running Composer + * + * Errors are written to the output, warnings are saved for later display. + * + * @param array $warnings Populated by method, to be shown later + * @param bool $quiet Quiet mode + * @param bool $disableTls Bypass tls + * @param bool $install If we are installing, rather than diagnosing + * + * @return bool True if there are no errors + */ +function checkPlatform(&$warnings, $quiet, $disableTls, $install) +{ + getPlatformIssues($errors, $warnings, $install); + + // Make openssl warning an error if tls has not been specifically disabled + if (isset($warnings['openssl']) && !$disableTls) { + $errors['openssl'] = $warnings['openssl']; + unset($warnings['openssl']); + } + + if (!empty($errors)) { + // Composer-Setup.exe uses "Some settings" to flag platform errors + out('Some settings on your machine make Composer unable to work properly.', 'error'); + out('Make sure that you fix the issues listed below and run this script again:', 'error'); + outputIssues($errors); + return false; + } + + if (empty($warnings) && !$quiet) { + out('All settings correct for using Composer', 'success'); + } + return true; +} + +/** + * Checks platform configuration for common incompatibility issues + * + * @param array $errors Populated by method + * @param array $warnings Populated by method + * @param bool $install If we are installing, rather than diagnosing + * + * @return bool If any errors or warnings have been found + */ +function getPlatformIssues(&$errors, &$warnings, $install) +{ + $errors = array(); + $warnings = array(); + + if ($iniPath = php_ini_loaded_file()) { + $iniMessage = PHP_EOL.'The php.ini used by your command-line PHP is: ' . $iniPath; + } else { + $iniMessage = PHP_EOL.'A php.ini file does not exist. You will have to create one.'; + } + $iniMessage .= PHP_EOL.'If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.'; + + if (ini_get('detect_unicode')) { + $errors['unicode'] = array( + 'The detect_unicode setting must be disabled.', + 'Add the following to the end of your `php.ini`:', + ' detect_unicode = Off', + $iniMessage + ); + } + + if (extension_loaded('suhosin')) { + $suhosin = ini_get('suhosin.executor.include.whitelist'); + $suhosinBlacklist = ini_get('suhosin.executor.include.blacklist'); + if (false === stripos($suhosin, 'phar') && (!$suhosinBlacklist || false !== stripos($suhosinBlacklist, 'phar'))) { + $errors['suhosin'] = array( + 'The suhosin.executor.include.whitelist setting is incorrect.', + 'Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):', + ' suhosin.executor.include.whitelist = phar '.$suhosin, + $iniMessage + ); + } + } + + if (!function_exists('json_decode')) { + $errors['json'] = array( + 'The json extension is missing.', + 'Install it or recompile php without --disable-json' + ); + } + + if (!extension_loaded('Phar')) { + $errors['phar'] = array( + 'The phar extension is missing.', + 'Install it or recompile php without --disable-phar' + ); + } + + if (!extension_loaded('filter')) { + $errors['filter'] = array( + 'The filter extension is missing.', + 'Install it or recompile php without --disable-filter' + ); + } + + if (!extension_loaded('hash')) { + $errors['hash'] = array( + 'The hash extension is missing.', + 'Install it or recompile php without --disable-hash' + ); + } + + if (!extension_loaded('iconv') && !extension_loaded('mbstring')) { + $errors['iconv_mbstring'] = array( + 'The iconv OR mbstring extension is required and both are missing.', + 'Install either of them or recompile php without --disable-iconv' + ); + } + + if (!ini_get('allow_url_fopen')) { + $errors['allow_url_fopen'] = array( + 'The allow_url_fopen setting is incorrect.', + 'Add the following to the end of your `php.ini`:', + ' allow_url_fopen = On', + $iniMessage + ); + } + + if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) { + $ioncube = ioncube_loader_version(); + $errors['ioncube'] = array( + 'Your ionCube Loader extension ('.$ioncube.') is incompatible with Phar files.', + 'Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:', + ' zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so', + $iniMessage + ); + } + + if (version_compare(PHP_VERSION, '5.3.2', '<')) { + $errors['php'] = array( + 'Your PHP ('.PHP_VERSION.') is too old, you must upgrade to PHP 5.3.2 or higher.' + ); + } + + if (version_compare(PHP_VERSION, '5.3.4', '<')) { + $warnings['php'] = array( + 'Your PHP ('.PHP_VERSION.') is quite old, upgrading to PHP 5.3.4 or higher is recommended.', + 'Composer works with 5.3.2+ for most people, but there might be edge case issues.' + ); + } + + if (!extension_loaded('openssl')) { + $warnings['openssl'] = array( + 'The openssl extension is missing, which means that secure HTTPS transfers are impossible.', + 'If possible you should enable it or recompile php with --with-openssl' + ); + } + + if (extension_loaded('openssl') && OPENSSL_VERSION_NUMBER < 0x1000100f) { + // Attempt to parse version number out, fallback to whole string value. + $opensslVersion = trim(strstr(OPENSSL_VERSION_TEXT, ' ')); + $opensslVersion = substr($opensslVersion, 0, strpos($opensslVersion, ' ')); + $opensslVersion = $opensslVersion ? $opensslVersion : OPENSSL_VERSION_TEXT; + + $warnings['openssl_version'] = array( + 'The OpenSSL library ('.$opensslVersion.') used by PHP does not support TLSv1.2 or TLSv1.1.', + 'If possible you should upgrade OpenSSL to version 1.0.1 or above.' + ); + } + + if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && ini_get('apc.enable_cli')) { + $warnings['apc_cli'] = array( + 'The apc.enable_cli setting is incorrect.', + 'Add the following to the end of your `php.ini`:', + ' apc.enable_cli = Off', + $iniMessage + ); + } + + if (!$install && extension_loaded('xdebug')) { + $warnings['xdebug_loaded'] = array( + 'The xdebug extension is loaded, this can slow down Composer a little.', + 'Disabling it when using Composer is recommended.' + ); + + if (ini_get('xdebug.profiler_enabled')) { + $warnings['xdebug_profile'] = array( + 'The xdebug.profiler_enabled setting is enabled, this can slow down Composer a lot.', + 'Add the following to the end of your `php.ini` to disable it:', + ' xdebug.profiler_enabled = 0', + $iniMessage + ); + } + } + + if (!extension_loaded('zlib')) { + $warnings['zlib'] = array( + 'The zlib extension is not loaded, this can slow down Composer a lot.', + 'If possible, install it or recompile php with --with-zlib', + $iniMessage + ); + } + + if (defined('PHP_WINDOWS_VERSION_BUILD') + && (version_compare(PHP_VERSION, '7.2.23', '<') + || (version_compare(PHP_VERSION, '7.3.0', '>=') + && version_compare(PHP_VERSION, '7.3.10', '<')))) { + $warnings['onedrive'] = array( + 'The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.', + 'Upgrade your PHP ('.PHP_VERSION.') to use this location with Composer.' + ); + } + + if (extension_loaded('uopz') && !(ini_get('uopz.disable') || ini_get('uopz.exit'))) { + $warnings['uopz'] = array( + 'The uopz extension ignores exit calls and may not work with all Composer commands.', + 'Disabling it when using Composer is recommended.' + ); + } + + ob_start(); + phpinfo(INFO_GENERAL); + $phpinfo = ob_get_clean(); + if (preg_match('{Configure Command(?: *| *=> *)(.*?)(?:|$)}m', $phpinfo, $match)) { + $configure = $match[1]; + + if (false !== strpos($configure, '--enable-sigchild')) { + $warnings['sigchild'] = array( + 'PHP was compiled with --enable-sigchild which can cause issues on some platforms.', + 'Recompile it without this flag if possible, see also:', + ' https://bugs.php.net/bug.php?id=22999' + ); + } + + if (false !== strpos($configure, '--with-curlwrappers')) { + $warnings['curlwrappers'] = array( + 'PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.', + 'Recompile it without this flag if possible' + ); + } + } + + // Stringify the message arrays + foreach ($errors as $key => $value) { + $errors[$key] = PHP_EOL.implode(PHP_EOL, $value); + } + + foreach ($warnings as $key => $value) { + $warnings[$key] = PHP_EOL.implode(PHP_EOL, $value); + } + + return !empty($errors) || !empty($warnings); +} + + +/** + * Outputs an array of issues + * + * @param array $issues + */ +function outputIssues($issues) +{ + foreach ($issues as $issue) { + out($issue, 'info'); + } + out(''); +} + +/** + * Outputs any warnings found + * + * @param array $warnings + */ +function showWarnings($warnings) +{ + if (!empty($warnings)) { + out('Some settings on your machine may cause stability issues with Composer.', 'error'); + out('If you encounter issues, try to change the following:', 'error'); + outputIssues($warnings); + } +} + +/** + * Outputs an end of process warning if tls has been bypassed + * + * @param bool $disableTls Bypass tls + */ +function showSecurityWarning($disableTls) +{ + if ($disableTls) { + out('You have instructed the Installer not to enforce SSL/TLS security on remote HTTPS requests.', 'info'); + out('This will leave all downloads during installation vulnerable to Man-In-The-Middle (MITM) attacks', 'info'); + } +} + +/** + * colorize output + */ +function out($text, $color = null, $newLine = true) +{ + $styles = array( + 'success' => "\033[0;32m%s\033[0m", + 'error' => "\033[31;31m%s\033[0m", + 'info' => "\033[33;33m%s\033[0m" + ); + + $format = '%s'; + + if (isset($styles[$color]) && USE_ANSI) { + $format = $styles[$color]; + } + + if ($newLine) { + $format .= PHP_EOL; + } + + printf($format, $text); +} + +/** + * Returns the system-dependent Composer home location, which may not exist + * + * @return string + */ +function getHomeDir() +{ + $home = getenv('COMPOSER_HOME'); + if ($home) { + return $home; + } + + $userDir = getUserDir(); + + if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + return $userDir.'/Composer'; + } + + $dirs = array(); + + if (useXdg()) { + // XDG Base Directory Specifications + $xdgConfig = getenv('XDG_CONFIG_HOME'); + if (!$xdgConfig) { + $xdgConfig = $userDir . '/.config'; + } + + $dirs[] = $xdgConfig . '/composer'; + } + + $dirs[] = $userDir . '/.composer'; + + // select first dir which exists of: $XDG_CONFIG_HOME/composer or ~/.composer + foreach ($dirs as $dir) { + if (is_dir($dir)) { + return $dir; + } + } + + // if none exists, we default to first defined one (XDG one if system uses it, or ~/.composer otherwise) + return $dirs[0]; +} + +/** + * Returns the location of the user directory from the environment + * @throws RuntimeException If the environment value does not exists + * + * @return string + */ +function getUserDir() +{ + $userEnv = defined('PHP_WINDOWS_VERSION_MAJOR') ? 'APPDATA' : 'HOME'; + $userDir = getenv($userEnv); + + if (!$userDir) { + throw new RuntimeException('The '.$userEnv.' or COMPOSER_HOME environment variable must be set for composer to run correctly'); + } + + return rtrim(strtr($userDir, '\\', '/'), '/'); +} + +/** + * @return bool + */ +function useXdg() +{ + foreach (array_keys($_SERVER) as $key) { + if (strpos($key, 'XDG_') === 0) { + return true; + } + } + + if (is_dir('/etc/xdg')) { + return true; + } + + return false; +} + +function validateCaFile($contents) +{ + // assume the CA is valid if php is vulnerable to + // https://www.sektioneins.de/advisories/advisory-012013-php-openssl_x509_parse-memory-corruption-vulnerability.html + if ( + PHP_VERSION_ID <= 50327 + || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50422) + || (PHP_VERSION_ID >= 50500 && PHP_VERSION_ID < 50506) + ) { + return !empty($contents); + } + + return (bool) openssl_x509_parse($contents); +} + +class Installer +{ + private $quiet; + private $disableTls; + private $cafile; + private $displayPath; + private $target; + private $tmpFile; + private $tmpCafile; + private $baseUrl; + private $algo; + private $errHandler; + private $httpClient; + private $pubKeys = array(); + private $installs = array(); + + /** + * Constructor - must not do anything that throws an exception + * + * @param bool $quiet Quiet mode + * @param bool $disableTls Bypass tls + * @param mixed $cafile Path to CA bundle, or false + */ + public function __construct($quiet, $disableTls, $caFile) + { + if (($this->quiet = $quiet)) { + ob_start(); + } + $this->disableTls = $disableTls; + $this->cafile = $caFile; + $this->errHandler = new ErrorHandler(); + } + + /** + * Runs the installer + * + * @param mixed $version Specific version to install, or false + * @param mixed $installDir Specific installation directory, or false + * @param string $filename Specific filename to save to, or composer.phar + * @param string $channel Specific version channel to use + * @throws Exception If anything other than a RuntimeException is caught + * + * @return bool If the installation succeeded + */ + public function run($version, $installDir, $filename, $channel) + { + try { + $this->initTargets($installDir, $filename); + $this->initTls(); + $this->httpClient = new HttpClient($this->disableTls, $this->cafile); + $result = $this->install($version, $channel); + + // in case --1 or --2 is passed, we leave the default channel for next self-update to stable + if (1 === preg_match('{^\d+$}D', $channel)) { + $channel = 'stable'; + } + + if ($result && $channel !== 'stable' && !$version && defined('PHP_BINARY')) { + $null = (defined('PHP_WINDOWS_VERSION_MAJOR') ? 'NUL' : '/dev/null'); + @exec(escapeshellarg(PHP_BINARY) .' '.escapeshellarg($this->target).' self-update --'.$channel.' --set-channel-only -q > '.$null.' 2> '.$null, $output); + } + } catch (Exception $e) { + $result = false; + } + + // Always clean up + $this->cleanUp($result); + + if (isset($e)) { + // Rethrow anything that is not a RuntimeException + if (!$e instanceof RuntimeException) { + throw $e; + } + out($e->getMessage(), 'error'); + } + return $result; + } + + /** + * Initialization methods to set the required filenames and composer url + * + * @param mixed $installDir Specific installation directory, or false + * @param string $filename Specific filename to save to, or composer.phar + * @throws RuntimeException If the installation directory is not writable + */ + protected function initTargets($installDir, $filename) + { + $this->displayPath = ($installDir ? rtrim($installDir, '/').'/' : '').$filename; + $installDir = $installDir ? realpath($installDir) : getcwd(); + + if (!is_writeable($installDir)) { + throw new RuntimeException('The installation directory "'.$installDir.'" is not writable'); + } + + $this->target = $installDir.DIRECTORY_SEPARATOR.$filename; + $this->tmpFile = $installDir.DIRECTORY_SEPARATOR.basename($this->target, '.phar').'-temp.phar'; + + $uriScheme = $this->disableTls ? 'http' : 'https'; + $this->baseUrl = $uriScheme.'://getcomposer.org'; + } + + /** + * A wrapper around methods to check tls and write public keys + * @throws RuntimeException If SHA384 is not supported + */ + protected function initTls() + { + if ($this->disableTls) { + return; + } + + if (!in_array('sha384', array_map('strtolower', openssl_get_md_methods()))) { + throw new RuntimeException('SHA384 is not supported by your openssl extension'); + } + + $this->algo = defined('OPENSSL_ALGO_SHA384') ? OPENSSL_ALGO_SHA384 : 'SHA384'; + $home = $this->getComposerHome(); + + $this->pubKeys = array( + 'dev' => $this->installKey(self::getPKDev(), $home, 'keys.dev.pub'), + 'tags' => $this->installKey(self::getPKTags(), $home, 'keys.tags.pub') + ); + + if (empty($this->cafile) && !HttpClient::getSystemCaRootBundlePath()) { + $this->cafile = $this->tmpCafile = $this->installKey(HttpClient::getPackagedCaFile(), $home, 'cacert-temp.pem'); + } + } + + /** + * Returns the Composer home directory, creating it if required + * @throws RuntimeException If the directory cannot be created + * + * @return string + */ + protected function getComposerHome() + { + $home = getHomeDir(); + + if (!is_dir($home)) { + $this->errHandler->start(); + + if (!mkdir($home, 0777, true)) { + throw new RuntimeException(sprintf( + 'Unable to create Composer home directory "%s": %s', + $home, + $this->errHandler->message + )); + } + $this->installs[] = $home; + $this->errHandler->stop(); + } + return $home; + } + + /** + * Writes public key data to disc + * + * @param string $data The public key(s) in pem format + * @param string $path The directory to write to + * @param string $filename The name of the file + * @throws RuntimeException If the file cannot be written + * + * @return string The path to the saved data + */ + protected function installKey($data, $path, $filename) + { + $this->errHandler->start(); + + $target = $path.DIRECTORY_SEPARATOR.$filename; + $installed = file_exists($target); + $write = file_put_contents($target, $data, LOCK_EX); + @chmod($target, 0644); + + $this->errHandler->stop(); + + if (!$write) { + throw new RuntimeException(sprintf('Unable to write %s to: %s', $filename, $path)); + } + + if (!$installed) { + $this->installs[] = $target; + } + + return $target; + } + + /** + * The main install function + * + * @param mixed $version Specific version to install, or false + * @param string $channel Version channel to use + * + * @return bool If the installation succeeded + */ + protected function install($version, $channel) + { + $retries = 3; + $result = false; + $infoMsg = 'Downloading...'; + $infoType = 'info'; + + while ($retries--) { + if (!$this->quiet) { + out($infoMsg, $infoType); + $infoMsg = 'Retrying...'; + $infoType = 'error'; + } + + if (!$this->getVersion($channel, $version, $url, $error)) { + out($error, 'error'); + continue; + } + + if (!$this->downloadToTmp($url, $signature, $error)) { + out($error, 'error'); + continue; + } + + if (!$this->verifyAndSave($version, $signature, $error)) { + out($error, 'error'); + continue; + } + + $result = true; + break; + } + + if (!$this->quiet) { + if ($result) { + out(PHP_EOL."Composer (version {$version}) successfully installed to: {$this->target}", 'success'); + out("Use it: php {$this->displayPath}", 'info'); + out(''); + } else { + out('The download failed repeatedly, aborting.', 'error'); + } + } + return $result; + } + + /** + * Sets the version url, downloading version data if required + * + * @param string $channel Version channel to use + * @param false|string $version Version to install, or set by method + * @param null|string $url The versioned url, set by method + * @param null|string $error Set by method on failure + * + * @return bool If the operation succeeded + */ + protected function getVersion($channel, &$version, &$url, &$error) + { + $error = ''; + + if ($version) { + if (empty($url)) { + $url = $this->baseUrl."/download/{$version}/composer.phar"; + } + return true; + } + + $this->errHandler->start(); + + if ($this->downloadVersionData($data, $error)) { + $this->parseVersionData($data, $channel, $version, $url); + } + + $this->errHandler->stop(); + return empty($error); + } + + /** + * Downloads and json-decodes version data + * + * @param null|array $data Downloaded version data, set by method + * @param null|string $error Set by method on failure + * + * @return bool If the operation succeeded + */ + protected function downloadVersionData(&$data, &$error) + { + $url = $this->baseUrl.'/versions'; + $errFmt = 'The "%s" file could not be %s: %s'; + + if (!$json = $this->httpClient->get($url)) { + $error = sprintf($errFmt, $url, 'downloaded', $this->errHandler->message); + return false; + } + + if (!$data = json_decode($json, true)) { + $error = sprintf($errFmt, $url, 'json-decoded', $this->getJsonError()); + return false; + } + return true; + } + + /** + * A wrapper around the methods needed to download and save the phar + * + * @param string $url The versioned download url + * @param null|string $signature Set by method on successful download + * @param null|string $error Set by method on failure + * + * @return bool If the operation succeeded + */ + protected function downloadToTmp($url, &$signature, &$error) + { + $error = ''; + $errFmt = 'The "%s" file could not be downloaded: %s'; + $sigUrl = $url.'.sig'; + $this->errHandler->start(); + + if (!$fh = fopen($this->tmpFile, 'w')) { + $error = sprintf('Could not create file "%s": %s', $this->tmpFile, $this->errHandler->message); + + } elseif (!$this->getSignature($sigUrl, $signature)) { + $error = sprintf($errFmt, $sigUrl, $this->errHandler->message); + + } elseif (!fwrite($fh, $this->httpClient->get($url))) { + $error = sprintf($errFmt, $url, $this->errHandler->message); + } + + if (is_resource($fh)) { + fclose($fh); + } + $this->errHandler->stop(); + return empty($error); + } + + /** + * Verifies the downloaded file and saves it to the target location + * + * @param string $version The composer version downloaded + * @param string $signature The digital signature to check + * @param null|string $error Set by method on failure + * + * @return bool If the operation succeeded + */ + protected function verifyAndSave($version, $signature, &$error) + { + $error = ''; + + if (!$this->validatePhar($this->tmpFile, $pharError)) { + $error = 'The download is corrupt: '.$pharError; + + } elseif (!$this->verifySignature($version, $signature, $this->tmpFile)) { + $error = 'Signature mismatch, could not verify the phar file integrity'; + + } else { + $this->errHandler->start(); + + if (!rename($this->tmpFile, $this->target)) { + $error = sprintf('Could not write to file "%s": %s', $this->target, $this->errHandler->message); + } + chmod($this->target, 0755); + $this->errHandler->stop(); + } + + return empty($error); + } + + /** + * Parses an array of version data to match the required channel + * + * @param array $data Downloaded version data + * @param mixed $channel Version channel to use + * @param false|string $version Set by method + * @param mixed $url The versioned url, set by method + */ + protected function parseVersionData(array $data, $channel, &$version, &$url) + { + foreach ($data[$channel] as $candidate) { + if ($candidate['min-php'] <= PHP_VERSION_ID) { + $version = $candidate['version']; + $url = $this->baseUrl.$candidate['path']; + break; + } + } + + if (!$version) { + $error = sprintf( + 'None of the %d %s version(s) of Composer matches your PHP version (%s / ID: %d)', + count($data[$channel]), + $channel, + PHP_VERSION, + PHP_VERSION_ID + ); + throw new RuntimeException($error); + } + } + + /** + * Downloads the digital signature of required phar file + * + * @param string $url The signature url + * @param null|string $signature Set by method on success + * + * @return bool If the download succeeded + */ + protected function getSignature($url, &$signature) + { + if (!$result = $this->disableTls) { + $signature = $this->httpClient->get($url); + + if ($signature) { + $signature = json_decode($signature, true); + $signature = base64_decode($signature['sha384']); + $result = true; + } + } + + return $result; + } + + /** + * Verifies the signature of the downloaded phar + * + * @param string $version The composer versione + * @param string $signature The downloaded digital signature + * @param string $file The temp phar file + * + * @return bool If the operation succeeded + */ + protected function verifySignature($version, $signature, $file) + { + if (!$result = $this->disableTls) { + $path = preg_match('{^[0-9a-f]{40}$}', $version) ? $this->pubKeys['dev'] : $this->pubKeys['tags']; + $pubkeyid = openssl_pkey_get_public('file://'.$path); + + $result = 1 === openssl_verify( + file_get_contents($file), + $signature, + $pubkeyid, + $this->algo + ); + + // PHP 8 automatically frees the key instance and deprecates the function + if (PHP_VERSION_ID < 80000) { + openssl_free_key($pubkeyid); + } + } + + return $result; + } + + /** + * Validates the downloaded phar file + * + * @param string $pharFile The temp phar file + * @param null|string $error Set by method on failure + * + * @return bool If the operation succeeded + */ + protected function validatePhar($pharFile, &$error) + { + if (ini_get('phar.readonly')) { + return true; + } + + try { + // Test the phar validity + $phar = new Phar($pharFile); + // Free the variable to unlock the file + unset($phar); + $result = true; + + } catch (Exception $e) { + if (!$e instanceof UnexpectedValueException && !$e instanceof PharException) { + throw $e; + } + $error = $e->getMessage(); + $result = false; + } + return $result; + } + + /** + * Returns a string representation of the last json error + * + * @return string The error string or code + */ + protected function getJsonError() + { + if (function_exists('json_last_error_msg')) { + return json_last_error_msg(); + } else { + return 'json_last_error = '.json_last_error(); + } + } + + /** + * Cleans up resources at the end of the installation + * + * @param bool $result If the installation succeeded + */ + protected function cleanUp($result) + { + if (!$result) { + // Output buffered errors + if ($this->quiet) { + $this->outputErrors(); + } + // Clean up stuff we created + $this->uninstall(); + } elseif ($this->tmpCafile) { + @unlink($this->tmpCafile); + } + } + + /** + * Outputs unique errors when in quiet mode + * + */ + protected function outputErrors() + { + $errors = explode(PHP_EOL, ob_get_clean()); + $shown = array(); + + foreach ($errors as $error) { + if ($error && !in_array($error, $shown)) { + out($error, 'error'); + $shown[] = $error; + } + } + } + + /** + * Uninstalls newly-created files and directories on failure + * + */ + protected function uninstall() + { + foreach (array_reverse($this->installs) as $target) { + if (is_file($target)) { + @unlink($target); + } elseif (is_dir($target)) { + @rmdir($target); + } + } + + if ($this->tmpFile !== null && file_exists($this->tmpFile)) { + @unlink($this->tmpFile); + } + } + + public static function getPKDev() + { + return <<message) { + $this->message .= PHP_EOL; + } + $this->message .= preg_replace('{^file_get_contents\(.*?\): }', '', $msg); + } + + /** + * Starts error-handling if not already active + * + * Any message is cleared + */ + public function start() + { + if (!$this->active) { + set_error_handler(array($this, 'handleError')); + $this->active = true; + } + $this->message = ''; + } + + /** + * Stops error-handling if active + * + * Any message is preserved until the next call to start() + */ + public function stop() + { + if ($this->active) { + restore_error_handler(); + $this->active = false; + } + } +} + +class NoProxyPattern +{ + private $composerInNoProxy = false; + private $rulePorts = array(); + + public function __construct($pattern) + { + $rules = preg_split('{[\s,]+}', $pattern, null, PREG_SPLIT_NO_EMPTY); + + if ($matches = preg_grep('{getcomposer\.org(?::\d+)?}i', $rules)) { + $this->composerInNoProxy = true; + + foreach ($matches as $match) { + if (strpos($match, ':') !== false) { + list(, $port) = explode(':', $match); + $this->rulePorts[] = (int) $port; + } + } + } + } + + /** + * Returns true if NO_PROXY contains getcomposer.org + * + * @param string $url http(s)://getcomposer.org + * + * @return bool + */ + public function test($url) + { + if (!$this->composerInNoProxy) { + return false; + } + + if (empty($this->rulePorts)) { + return true; + } + + if (strpos($url, 'http://') === 0) { + $port = 80; + } else { + $port = 443; + } + + return in_array($port, $this->rulePorts); + } +} + +class HttpClient { + + /** @var null|string */ + private static $caPath; + + private $options = array('http' => array()); + private $disableTls = false; + + public function __construct($disableTls = false, $cafile = false) + { + $this->disableTls = $disableTls; + if ($this->disableTls === false) { + if (!empty($cafile) && !is_dir($cafile)) { + if (!is_readable($cafile) || !validateCaFile(file_get_contents($cafile))) { + throw new RuntimeException('The configured cafile (' .$cafile. ') was not valid or could not be read.'); + } + } + $options = $this->getTlsStreamContextDefaults($cafile); + $this->options = array_replace_recursive($this->options, $options); + } + } + + public function get($url) + { + $context = $this->getStreamContext($url); + $result = file_get_contents($url, false, $context); + + if ($result && extension_loaded('zlib')) { + $decode = false; + foreach ($http_response_header as $header) { + if (preg_match('{^content-encoding: *gzip *$}i', $header)) { + $decode = true; + continue; + } elseif (preg_match('{^HTTP/}i', $header)) { + $decode = false; + } + } + + if ($decode) { + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + $result = zlib_decode($result); + } else { + // work around issue with gzuncompress & co that do not work with all gzip checksums + $result = file_get_contents('compress.zlib://data:application/octet-stream;base64,'.base64_encode($result)); + } + + if (!$result) { + throw new RuntimeException('Failed to decode zlib stream'); + } + } + } + + return $result; + } + + protected function getStreamContext($url) + { + if ($this->disableTls === false) { + if (PHP_VERSION_ID < 50600) { + $this->options['ssl']['SNI_server_name'] = parse_url($url, PHP_URL_HOST); + } + } + // Keeping the above mostly isolated from the code copied from Composer. + return $this->getMergedStreamContext($url); + } + + protected function getTlsStreamContextDefaults($cafile) + { + $ciphers = implode(':', array( + 'ECDHE-RSA-AES128-GCM-SHA256', + 'ECDHE-ECDSA-AES128-GCM-SHA256', + 'ECDHE-RSA-AES256-GCM-SHA384', + 'ECDHE-ECDSA-AES256-GCM-SHA384', + 'DHE-RSA-AES128-GCM-SHA256', + 'DHE-DSS-AES128-GCM-SHA256', + 'kEDH+AESGCM', + 'ECDHE-RSA-AES128-SHA256', + 'ECDHE-ECDSA-AES128-SHA256', + 'ECDHE-RSA-AES128-SHA', + 'ECDHE-ECDSA-AES128-SHA', + 'ECDHE-RSA-AES256-SHA384', + 'ECDHE-ECDSA-AES256-SHA384', + 'ECDHE-RSA-AES256-SHA', + 'ECDHE-ECDSA-AES256-SHA', + 'DHE-RSA-AES128-SHA256', + 'DHE-RSA-AES128-SHA', + 'DHE-DSS-AES128-SHA256', + 'DHE-RSA-AES256-SHA256', + 'DHE-DSS-AES256-SHA', + 'DHE-RSA-AES256-SHA', + 'AES128-GCM-SHA256', + 'AES256-GCM-SHA384', + 'AES128-SHA256', + 'AES256-SHA256', + 'AES128-SHA', + 'AES256-SHA', + 'AES', + 'CAMELLIA', + 'DES-CBC3-SHA', + '!aNULL', + '!eNULL', + '!EXPORT', + '!DES', + '!RC4', + '!MD5', + '!PSK', + '!aECDH', + '!EDH-DSS-DES-CBC3-SHA', + '!EDH-RSA-DES-CBC3-SHA', + '!KRB5-DES-CBC3-SHA', + )); + + /** + * CN_match and SNI_server_name are only known once a URL is passed. + * They will be set in the getOptionsForUrl() method which receives a URL. + * + * cafile or capath can be overridden by passing in those options to constructor. + */ + $options = array( + 'ssl' => array( + 'ciphers' => $ciphers, + 'verify_peer' => true, + 'verify_depth' => 7, + 'SNI_enabled' => true, + ) + ); + + /** + * Attempt to find a local cafile or throw an exception. + * The user may go download one if this occurs. + */ + if (!$cafile) { + $cafile = self::getSystemCaRootBundlePath(); + } + if (is_dir($cafile)) { + $options['ssl']['capath'] = $cafile; + } elseif ($cafile) { + $options['ssl']['cafile'] = $cafile; + } else { + throw new RuntimeException('A valid cafile could not be located automatically.'); + } + + /** + * Disable TLS compression to prevent CRIME attacks where supported. + */ + if (version_compare(PHP_VERSION, '5.4.13') >= 0) { + $options['ssl']['disable_compression'] = true; + } + + return $options; + } + + /** + * function copied from Composer\Util\StreamContextFactory::initOptions + * + * Any changes should be applied there as well, or backported here. + * + * @param string $url URL the context is to be used for + * @return resource Default context + * @throws \RuntimeException if https proxy required and OpenSSL uninstalled + */ + protected function getMergedStreamContext($url) + { + $options = $this->options; + + // Handle HTTP_PROXY/http_proxy on CLI only for security reasons + if ((PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') && (!empty($_SERVER['HTTP_PROXY']) || !empty($_SERVER['http_proxy']))) { + $proxy = parse_url(!empty($_SERVER['http_proxy']) ? $_SERVER['http_proxy'] : $_SERVER['HTTP_PROXY']); + } + + // Prefer CGI_HTTP_PROXY if available + if (!empty($_SERVER['CGI_HTTP_PROXY'])) { + $proxy = parse_url($_SERVER['CGI_HTTP_PROXY']); + } + + // Override with HTTPS proxy if present and URL is https + if (preg_match('{^https://}i', $url) && (!empty($_SERVER['HTTPS_PROXY']) || !empty($_SERVER['https_proxy']))) { + $proxy = parse_url(!empty($_SERVER['https_proxy']) ? $_SERVER['https_proxy'] : $_SERVER['HTTPS_PROXY']); + } + + // Remove proxy if URL matches no_proxy directive + if (!empty($_SERVER['NO_PROXY']) || !empty($_SERVER['no_proxy']) && parse_url($url, PHP_URL_HOST)) { + $pattern = new NoProxyPattern(!empty($_SERVER['no_proxy']) ? $_SERVER['no_proxy'] : $_SERVER['NO_PROXY']); + if ($pattern->test($url)) { + unset($proxy); + } + } + + if (!empty($proxy)) { + $proxyURL = isset($proxy['scheme']) ? $proxy['scheme'] . '://' : ''; + $proxyURL .= isset($proxy['host']) ? $proxy['host'] : ''; + + if (isset($proxy['port'])) { + $proxyURL .= ":" . $proxy['port']; + } elseif (strpos($proxyURL, 'http://') === 0) { + $proxyURL .= ":80"; + } elseif (strpos($proxyURL, 'https://') === 0) { + $proxyURL .= ":443"; + } + + // check for a secure proxy + if (strpos($proxyURL, 'https://') === 0) { + if (!extension_loaded('openssl')) { + throw new RuntimeException('You must enable the openssl extension to use a secure proxy.'); + } + if (strpos($url, 'https://') === 0) { + throw new RuntimeException('PHP does not support https requests through a secure proxy.'); + } + } + + // http(s):// is not supported in proxy + $proxyURL = str_replace(array('http://', 'https://'), array('tcp://', 'ssl://'), $proxyURL); + + $options['http'] = array( + 'proxy' => $proxyURL, + ); + + // add request_fulluri for http requests + if ('http' === parse_url($url, PHP_URL_SCHEME)) { + $options['http']['request_fulluri'] = true; + } + + // handle proxy auth if present + if (isset($proxy['user'])) { + $auth = rawurldecode($proxy['user']); + if (isset($proxy['pass'])) { + $auth .= ':' . rawurldecode($proxy['pass']); + } + $auth = base64_encode($auth); + + $options['http']['header'] = "Proxy-Authorization: Basic {$auth}\r\n"; + } + } + + if (isset($options['http']['header'])) { + $options['http']['header'] .= "Connection: close\r\n"; + } else { + $options['http']['header'] = "Connection: close\r\n"; + } + if (extension_loaded('zlib')) { + $options['http']['header'] .= "Accept-Encoding: gzip\r\n"; + } + $options['http']['header'] .= "User-Agent: ".COMPOSER_INSTALLER."\r\n"; + $options['http']['protocol_version'] = 1.1; + $options['http']['timeout'] = 600; + + return stream_context_create($options); + } + + /** + * This method was adapted from Sslurp. + * https://github.com/EvanDotPro/Sslurp + * + * (c) Evan Coury + * + * For the full copyright and license information, please see below: + * + * Copyright (c) 2013, Evan Coury + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + public static function getSystemCaRootBundlePath() + { + if (self::$caPath !== null) { + return self::$caPath; + } + + // If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that. + // This mimics how OpenSSL uses the SSL_CERT_FILE env variable. + $envCertFile = getenv('SSL_CERT_FILE'); + if ($envCertFile && is_readable($envCertFile) && validateCaFile(file_get_contents($envCertFile))) { + return self::$caPath = $envCertFile; + } + + // If SSL_CERT_DIR env variable points to a valid certificate/bundle, use that. + // This mimics how OpenSSL uses the SSL_CERT_FILE env variable. + $envCertDir = getenv('SSL_CERT_DIR'); + if ($envCertDir && is_dir($envCertDir) && is_readable($envCertDir)) { + return self::$caPath = $envCertDir; + } + + $configured = ini_get('openssl.cafile'); + if ($configured && strlen($configured) > 0 && is_readable($configured) && validateCaFile(file_get_contents($configured))) { + return self::$caPath = $configured; + } + + $configured = ini_get('openssl.capath'); + if ($configured && is_dir($configured) && is_readable($configured)) { + return self::$caPath = $configured; + } + + $caBundlePaths = array( + '/etc/pki/tls/certs/ca-bundle.crt', // Fedora, RHEL, CentOS (ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package) + '/etc/ssl/ca-bundle.pem', // SUSE, openSUSE (ca-certificates package) + '/usr/local/share/certs/ca-root-nss.crt', // FreeBSD (ca_root_nss_package) + '/usr/ssl/certs/ca-bundle.crt', // Cygwin + '/opt/local/share/curl/curl-ca-bundle.crt', // OS X macports, curl-ca-bundle package + '/usr/local/share/curl/curl-ca-bundle.crt', // Default cURL CA bunde path (without --with-ca-bundle option) + '/usr/share/ssl/certs/ca-bundle.crt', // Really old RedHat? + '/etc/ssl/cert.pem', // OpenBSD + '/usr/local/etc/ssl/cert.pem', // FreeBSD 10.x + '/usr/local/etc/openssl/cert.pem', // OS X homebrew, openssl package + '/usr/local/etc/openssl@1.1/cert.pem', // OS X homebrew, openssl@1.1 package + '/opt/homebrew/etc/openssl@3/cert.pem', // macOS silicon homebrew, openssl@3 package + '/opt/homebrew/etc/openssl@1.1/cert.pem', // macOS silicon homebrew, openssl@1.1 package + ); + + foreach ($caBundlePaths as $caBundle) { + if (@is_readable($caBundle) && validateCaFile(file_get_contents($caBundle))) { + return self::$caPath = $caBundle; + } + } + + foreach ($caBundlePaths as $caBundle) { + $caBundle = dirname($caBundle); + if (is_dir($caBundle) && glob($caBundle.'/*')) { + return self::$caPath = $caBundle; + } + } + + return self::$caPath = false; + } + + public static function getPackagedCaFile() + { + return <<=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "doctrine/annotations": "^1.2.6 || ^1.13.3", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.7.2", + "yoast/phpunit-polyfills": "^1.0.4" + }, + "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "ext-openssl": "Needed for secure SMTP sending and DKIM signing", + "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", + "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2024-11-24T18:04:13+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" + }, + { + "name": "stripe/stripe-php", + "version": "v17.1.1", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "01ca9b5fdd899b8e4b69f83b85e09d96f6240220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/01ca9b5fdd899b8e4b69f83b85e09d96f6240220", + "reference": "01ca9b5fdd899b8e4b69f83b85e09d96f6240220", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "3.72.0", + "phpstan/phpstan": "^1.2", + "phpunit/phpunit": "^5.7 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ], + "support": { + "issues": "https://github.com/stripe/stripe-php/issues", + "source": "https://github.com/stripe/stripe-php/tree/v17.1.1" + }, + "time": "2025-04-05T00:09:14+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.1", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:52:34+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/payment_system/config.php b/payment_system/config.php new file mode 100644 index 0000000..18f0658 --- /dev/null +++ b/payment_system/config.php @@ -0,0 +1,11 @@ +load(); + +\Stripe\Stripe::setApiKey($_ENV['STRIPE_SECRET_KEY']); // <-- Replace with your real Stripe secret key +$publishableKey=$_ENV['STRIPE_SECRET_KEY']; + +?> \ No newline at end of file diff --git a/shop.php b/shop.php new file mode 100755 index 0000000..3b198a1 --- /dev/null +++ b/shop.php @@ -0,0 +1,121 @@ +prepare($query); + $categories->execute(); + $allcategories = $categories->fetchAll(PDO::FETCH_OBJ); + + $query = "SELECT c.id AS category_id, c.name AS category_name, c.image AS category_image, + c.icon AS category_icon, p.id AS product_id, p.title, p.description, + p.price, p.image AS product_image, p.exp_date, p.status + FROM categories c + LEFT JOIN products p ON c.id = p.category_id + ORDER BY c.id, p.id"; + + $stmt = $pdo->prepare($query); + $stmt->execute(); + $rows = $stmt->fetchAll(PDO::FETCH_OBJ); + + $categories = []; + foreach ($rows as $row) { + $categories[$row->category_id]['name'] = $row->category_name; + $categories[$row->category_id]['image'] = $row->category_image; + $categories[$row->category_id]['icon'] = $row->category_icon; + if ($row->product_id) { + $categories[$row->category_id]['products'][] = [ + 'id' => $row->product_id, + 'title' => $row->title, + 'description' => $row->description, + 'price' => $row->price, + 'image' => $row->product_image, + 'exp_date' => $row->exp_date, + 'status' => $row->status + ]; + } + } +} catch (PDOException $e) { + die("Database error: " . $e->getMessage()); +} +?> + + +
    + + + + $category): ?> +
    +
    +
    +
    +

    + + +

    + +
    +
    +
    +
    + +
    + \ No newline at end of file diff --git a/submit.php b/submit.php new file mode 100644 index 0000000..07674d6 --- /dev/null +++ b/submit.php @@ -0,0 +1,248 @@ +load(); + +$order_details = $pdo->prepare('select pro_id,pro_title,pro_total FROM cart WHERE user_id = :user_id'); +$order_details->execute([':user_id' => $_SESSION['user_id']]); +$products = $order_details->fetchAll(PDO::FETCH_ASSOC); +$order_id = $_SESSION['order_details_id']['id']; +$total_order_value = $_SESSION['Total_order_value']; +foreach ($products as $product) { + $insert = $pdo->prepare(' + INSERT INTO order_details (order_id, pro_id, pro_title, pro_total, total_order_value) + VALUES (:order_id, :pro_id, :pro_title, :pro_total, :total_order_value); + '); + $insert->execute([ + ':order_id' => $order_id, + ':pro_id' => $product['pro_id'], + ':pro_title' => $product['pro_title'], + ':pro_total' => $product['pro_total'], + ':total_order_value' => $total_order_value + ]); +} +if (isset($_POST['stripeToken'])) { + \Stripe\Stripe::setVerifySslCerts(false); + $token = $_POST['stripeToken']; + \Stripe\Stripe::setApiKey($_ENV['STRIPE_SECRET_KEY']); + $data = \Stripe\Charge::create([ + "amount" => $_SESSION['payment'] * 100, // amount in paise + "currency" => "inr", + "description" => "Freshcery", + "source" => $token, + "metadata" => [ + "order_id" => $_SESSION['order_details_id']['id'], + "user_email" => $_SESSION['email'] + ] + ]); + $mail = new PHPMailer(); + try { + $order_id = $_SESSION['order_details_id']['id']; + $query = "SELECT pro_title, pro_total FROM order_details WHERE order_id = :order_id"; + $stmt = $pdo->prepare($query); + $stmt->execute(['order_id' => $order_id]); + $order_products = []; + while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { + $order_products[] = $row; + } + $mail->isSMTP(); + $mail->Host = 'smtp.gmail.com'; + $mail->SMTPAuth = true; + $mail->Username = $_ENV['FRESHCERY_EMAIL']; + $mail->Password = $_ENV['FRESHCERY_EMAIL_PASS']; // use App Password from Gmail + $mail->SMTPSecure = 'tls'; + $mail->Port = 587; + + $mail->setFrom('hrishikeshthakkar.19@gmail.com', 'Freshcery'); + $mail->addAddress($_SESSION['email'], $_SESSION['username']); + + $mail->isHTML(true); + $mail->Subject = 'Your Freshcery Order Confirmation'; + + $mail->Body = ' + + + + + +
    +
    + Freshcery Logo +
    + +
    +

    Thank you for your order!

    +

    Hi ' . $_SESSION['username'] . ',

    +

    We appreciate your purchase. Your order has been successfully placed.

    +

    Order ID: #' . $_SESSION['order_details_id']['id'] . '

    + +

    Order Summary:

    + + + + + + + + '; + foreach ($order_products as $product) { + $mail->Body .= ' + + + + '; + } + $mail->Body .= ' + + + + + +
    Product NameSubtotal
    ' . $product['pro_title'] . 'โ‚น' . $product['pro_total'] . '
    Delivery Charges โ‚น80
    + +
    + Total: โ‚น' . $_SESSION['Total_order_value'] . ' +
    +
    +
    + + '; + $mail->send(); + } catch (Exception $e) { + } + $_SESSION['payment'] = $data; + if (isset($_SESSION['user_id'])) { + $delete = $pdo->prepare('DELETE FROM cart WHERE user_id = :user_id'); + $delete->execute([':user_id' => $_SESSION['user_id']]); + unset($_SESSION['Total_order_value']); + $update = $pdo->prepare('UPDATE orders SET status = "payment done" WHERE user_id = :user_id'); + $update->execute(params: [':user_id' => $_SESSION['user_id']]); + } +?> + + + + + + + Payment Success + + + + + +
    +
    +

    Payment Successful โœ…

    +

    Thank you for your payment!

    +

    Redirecting to the homepage...

    +
    +
    +
    + + + + \ No newline at end of file diff --git a/transaction.php b/transaction.php new file mode 100755 index 0000000..348ba74 --- /dev/null +++ b/transaction.php @@ -0,0 +1,61 @@ +prepare("SELECT * FROM orders WHERE user_id = :user_id"); +$products->execute([':user_id' => $_SESSION['user_id']]); +$orders = $products->fetchAll(PDO::FETCH_OBJ); +?> +
    + + +
    +
    +
    +
    +
    + + + + + + + + + + + + 0): + foreach ($orders as $order): ?> + + + + + + + + +
    +

    error!

    +
    + + +
    Order-IDDateTotalStatus
    id; ?>created_at; ?>Rp. Total_order_value; ?>status; ?>
    +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/update-product.php b/update-product.php new file mode 100644 index 0000000..c3d8b32 --- /dev/null +++ b/update-product.php @@ -0,0 +1,23 @@ +prepare("UPDATE cart SET pro_qty = :pro_qty, pro_total = :pro_total WHERE id = :id"); + + $update->bindParam(':pro_qty', $pro_qty, PDO::PARAM_INT); + $update->bindParam(':pro_total', $total, PDO::PARAM_STR); + $update->bindParam(':id', $id, PDO::PARAM_INT); + + if ($update->execute()) { + echo "Product updated successfully."; + } else { + echo "Error updating product."; + } +} +?> +