This commit is contained in:
Sparky4567 2018-02-25 20:28:26 +02:00
commit ad4a4ba50e
657 changed files with 61474 additions and 0 deletions

15
.htaccess Normal file
View File

@ -0,0 +1,15 @@
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2017 Diego Najar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Binary file not shown.

View File

@ -0,0 +1,11 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"news": {
"name": "News",
"list": []
},
"sleeping-city": {
"name": "Sleeping city",
"list": []
}
}

View File

@ -0,0 +1,51 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"about-us": {
"description": "",
"username": "admin",
"tags": [],
"status": "static",
"type": "page",
"date": "2018-02-24 16:32:52",
"dateModified": "2018-02-24 21:35:40",
"position": 3,
"coverImage": "portal.jpg",
"category": "",
"md5file": "15ad608af1afcc0cd474dd75b79a1a16",
"uuid": "f6eb7016beef5df5f8f5865a7de880d6",
"allowComments": true,
"template": ""
},
"support-us": {
"description": "",
"username": "admin",
"tags": [],
"status": "static",
"type": "page",
"date": "2018-02-24 20:03:10",
"dateModified": "2018-02-24 21:37:55",
"position": 5,
"coverImage": "gears.jpg",
"category": "",
"md5file": "a73fdf8091a6bd254ec7843a7124ffe1",
"uuid": "3259b25dc26651b66332c5f88283a422",
"allowComments": true,
"template": ""
},
"klaida": {
"description": "",
"username": "admin",
"tags": [],
"status": "published",
"type": "page",
"date": "2018-02-24 20:51:17",
"dateModified": "2018-02-24 23:19:29",
"position": 6,
"coverImage": "error.jpg",
"category": "",
"md5file": "43fef34ab61f353fcf6e06a6aabc4188",
"uuid": "9719276def511a2ef151090d0f95ef40",
"allowComments": true,
"template": ""
}
}

View File

@ -0,0 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"position": 0
}

View File

@ -0,0 +1,6 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"label": "Categories",
"hideCero": true,
"position": 1
}

View File

@ -0,0 +1,7 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"label": "Latest content",
"homeLink": true,
"amountOfItems": 5,
"position": 1
}

View File

@ -0,0 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"position": 1
}

View File

@ -0,0 +1,5 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"defaultImage": "",
"position": 1
}

View File

@ -0,0 +1,5 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"amountOfItems": 5,
"position": 0
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title/>
<link>http://127.0.0.1</link>
<description/>
<item>
<title>Klaida</title>
<link>http://127.0.0.1/klaida</link>
<description>&lt;p&gt;</description>
<pubDate>Šeš, 24 Vas 2018 20:51:17 +0200</pubDate>
<guid isPermaLink="false">9719276def511a2ef151090d0f95ef40</guid>
</item>
</channel>
</rss>

View File

@ -0,0 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"position": 0
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://127.0.0.1</loc>
</url>
<url>
<loc>http://127.0.0.1/klaida</loc>
<lastmod>2018-02-24</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

View File

@ -0,0 +1,6 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"label": "Static Pages",
"homeLink": true,
"position": 1
}

View File

@ -0,0 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"position": 1
}

View File

@ -0,0 +1,11 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"minutesBlocked": 0,
"numberFailuresAllowed": 1000,
"blackList": {
"127.0.0.1": {
"lastFailure": 1519542078,
"numberFailures": 1
}
}
}

View File

@ -0,0 +1,30 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"title": "",
"slogan": "",
"description": "",
"footer": "Copyright \u00a9 2018 mrdarko.lt",
"itemsPerPage": "6",
"language": "lt_LT",
"locale": "en, en_US, en_AU, en_CA, en_GB, en_IE, en_NZ",
"timezone": "Europe\/Vilnius",
"theme": "clean-blog-master",
"adminTheme": "default",
"homepage": " ",
"pageNotFound": "klaida",
"uriPage": "\/",
"uriTag": "\/tag\/",
"uriCategory": "\/category\/",
"uriBlog": "\/blog\/",
"url": "http:\/\/127.0.0.1",
"emailFrom": "no-reply@127.0.0.1",
"orderBy": "position",
"currentBuild": "20180123",
"twitter": "",
"facebook": "https:\/\/www.facebook.com\/WhoIsMrDarko\/",
"codepen": "",
"googlePlus": "",
"instagram": "",
"github": "",
"dateFormat": "F j, Y"
}

View File

@ -0,0 +1,83 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
[
{
"date": "2018-02-25 16:56:38",
"dictionaryKey": "content-deleted",
"notes": "tavar",
"idExecution": "5a92cea6931fe",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:55:30",
"dictionaryKey": "content-edited",
"notes": "Tavar",
"idExecution": "5a92ce627fb58",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:52:24",
"dictionaryKey": "new-content-created",
"notes": "Tavar",
"idExecution": "5a92cda7e1565",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:51:53",
"dictionaryKey": "content-deleted",
"notes": "nemo",
"idExecution": "5a92cd890651f",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:51:47",
"dictionaryKey": "content-deleted",
"notes": "pay",
"idExecution": "5a92cd83ab223",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:49:44",
"dictionaryKey": "new-content-created",
"notes": "Pay",
"idExecution": "5a92cd086bd21",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:49:09",
"dictionaryKey": "content-deleted",
"notes": "pay-me",
"idExecution": "5a92cce4ee982",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 16:48:08",
"dictionaryKey": "new-content-created",
"notes": "Pay me",
"idExecution": "5a92cca876442",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 15:54:05",
"dictionaryKey": "content-edited",
"notes": "Nemo",
"idExecution": "5a92bffd3a7ef",
"method": "POST",
"username": "admin"
},
{
"date": "2018-02-25 15:53:57",
"dictionaryKey": "new-content-created",
"notes": "",
"idExecution": "5a92bff56acbc",
"method": "POST",
"username": "admin"
}
]

View File

@ -0,0 +1,2 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
[]

View File

@ -0,0 +1,21 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
{
"admin": {
"firstName": "Andrius",
"lastName": "Pratusis",
"role": "admin",
"password": "7a517635e7e0eb29d32a5675e6cc6a3e30f40278",
"salt": "a%ldqjav",
"email": "andrius.pratusis1993@gmail.com",
"registered": "2018-02-23 20:23:13",
"tokenRemember": "",
"tokenAuth": "cd09afc5c0d5575133acc99a0010591c",
"tokenAuthTTL": "2009-03-15 14:00",
"twitter": "",
"facebook": "https:\/\/www.facebook.com\/andriuspratusis",
"googlePlus": "",
"instagram": "",
"username": "admin",
"codepen": ""
}
}

View File

@ -0,0 +1,3 @@
Title: About us
Content:
<p>Šis puslapis - rašytojų priglobstis. Ir nesvarbu koks žanras yra tavo mėgstamiausias. Laukiami visi. Dėl techninių sumetimų rašytojai gali prisidėti tik gavę specialius kvietimus.</p>

View File

@ -0,0 +1,6 @@
Title: Klaida
Content:
<p><!-- pagebreak --> Klaida 404. Deja šis puslapis nerastas. Kažko ieškote ir nerandate? Susisiekite su administratoriumi. </p>
<p>El. Paštas <a href="mailto:andrius.pratusis1993@gmail.com?subject=Iskilo klausimas">andrius.pratusis1993@gmail.com</a></p>
<p> </p>
<p><iframe src="//www.youtube.com/embed/QH2-TGUlwu4?autoplay=1" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>

View File

@ -0,0 +1,3 @@
Title: Support Us
Content:
<p>This is empty</p>

BIN
bl-content/paypal/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) 2015 PayPal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,14 @@
CHECKOUT WITH PAYPAL REST API DEMO WITH CHECKOUT.JS V4
1) Download PHP server.
Use a server such as XAMPP (https://www.apachefriends.org/index.html) to be able to host the Demo code sample.
2) Browse to the htdocs directory of xampp. Unzip the downloaded demo code folder and place it in this htdocs directory.
3) Start the Apache server in XAMPP from the XAMPP control panel.
4) Open the website in the browser and access it as: http://my_domain/php_code_folder_name/index.php
Here, my_domain will be localhost if hosting on your own machine.
The php_code_folder_name is the name of the folder under which the downloaded code resides ('Checkout' folder in case you have not changed the default name).
5) Read further instructions on the above page you open.

View File

@ -0,0 +1,24 @@
<?php
/*
* Cancel Order page
*/
if (session_id() == "")
session_start();
include('header.php');
?>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<h4>
You cancelled the order.
</h4>
<br/>
Return to <a href="index.php">home page</a>.
</div>
<div class="col-md-4"></div>
</div>
<?php
include('footer.php');
?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,35 @@
<?php
/*
* Cancel Order page
*/
if (session_id() == "")
session_start();
include('header.php');
$arr = $_SESSION["error"];
?>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<div class="alert alert-danger" role="alert">
<p class="text-center"><strong>The payment could not be completed.</strong></p>
</div>
<br />
<strong>Reason: </strong> <?php echo $arr["json"]["name"]; ?> <br />
<br />
<strong>Message: </strong> <?php echo $arr["json"]["message"]; ?> <br />
<br />
<br />
Return to <a href="index.php">home page</a>.
</div>
<div class="col-md-4"></div>
</div>
<?php
include('footer.php');
?>

View File

@ -0,0 +1,8 @@
</div> <!-- Row-Fluid ends here -->
</div> <!--Container-Fluid ends here -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,43 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Checkout with PayPal Demo</title>
<!--Including Bootstrap style files-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<style>
/* http://angrytools.com/gradient/ */
.bg-color {
color: white;
background: -moz-linear-gradient(0deg, #004094 0%, #0096D9 50%, #004094 100%); /* ff3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%, #004094), color-stop(50%, #0096D9), color-stop(100%, #004094)); /* safari4+,chrome */
background: -webkit-linear-gradient(0deg, #004094 0%, #0096D9 50%, #004094 100%); /* safari5.1+,chrome10+ */
background: -o-linear-gradient(0deg, #004094 0%, #0096D9 50%, #004094 100%); /* opera 11.10+ */
background: -ms-linear-gradient(0deg, #004094 0%, #0096D9 50%, #004094 100%); /* ie10+ */
background: linear-gradient(90deg, #004094 0%, #0096D9 50%, #004094 100%); /* w3c */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#004094', endColorstr='#004094',GradientType=1 ); /* ie6-9 */
}
.mark{
max-width: 45%;
}
.mark-input-field{
height:30px !important;
}
.hero-unit {
background-color: #e0e2e5;
border-radius: 10px;
font-weight: bold;
padding: 13px;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="well bg-color">
<h2 class="text-center">Checkout with PayPal Demo</h2>
<h4 class="text-center">REST API with Checkout.js v4</h4>
</div>
<div class="row-fluid">

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

404
bl-content/paypal/index.php Normal file
View File

@ -0,0 +1,404 @@
<?php
/*
* Home Page - has Sample Buyer credentials, Camera (Product) Details and Instructiosn for using the code sample
*/
// include('apiCallsData.php');
include('header.php');
include_once('paypalConfig.php');
?>
<style>
tr{
line-height:30px;
}
td{
padding:5px;
}
</style>
<div class="row">
<div class="col-md-3">
<div>
<img src="img/camera.jpg" width="200" height="150"/>
</div>
<h3>Digital SLR Camera </h3>
<br/><br/>
<table class="table table-striped">
<tr><td colspan="2"><h4> Sample Sandbox Buyer Credentials:</h4></td></tr>
<tr><th>Buyer Email</th><th>Password</th></tr>
<tr><td>emily_doe@buyer.com</td><td>qwer1234</td></tr>
<tr><td>bill_bong@buyer.com</td><td>qwer1234</td></tr>
<tr><td>jack_potter@buyer.com</td><td>123456789</td></tr>
<tr><td>harry_doe@buyer.com</td><td>123456789</td></tr>
<tr><td>ron_brown@buyer.com</td><td>qwer1234</td></tr>
<tr><td>bella_brown@buyer.com</td><td>qwer1234</td></tr>
</table>
</div>
<div class="col-md-4">
<h3> Pricing Details </h3>
<form action="startPayment.php" method="POST">
<input type="text" name="csrf" value="<?php echo($_SESSION['csrf']);?>" hidden readonly/>
<table>
<!-- Item Details - Actual values set in apiCallsData.php -->
<tr><td>Camera </td><td><input class="form-control" type="text" name="camera_amount" value="300" readonly></input></td></tr>
<tr><td>Tax </td><td><input class="form-control" type="text" id="tax_amt" name="tax" value="5" readonly></input> </td></tr>
<tr><td>Insurance </td><td><input class="form-control" type="text" name="insurance" id="insurance_fee"value="10" readonly></input> </td></tr>
<tr><td>Handling Fee </td><td><input class="form-control" type="text" name="handling_fee" id="handling_fee" value="5" readonly></input> </td></tr>
<tr><td>Estimated Shipping </td><td><input class="form-control" type="text" name="estimated_shipping" value="2" id="shipping_amt" readonly></input> </td></tr>
<tr><td>Shipping Discount </td><td><input class="form-control" type="text" id="shipping_discount" name="shipping_discount" value="-2" readonly></input> </td></tr>
<tr><td>Total Amount </td><td><input class="form-control" type="text" name="total_amount" id="total_amt" value="320" readonly></input> </td></tr>
<tr><td>Currency</td><td>
<select class="form-control" name="currencyCodeType">
<option value="AUD">AUD</option>
<option value="BRL">BRL</option>
<option value="CAD">CAD</option>
<option value="CZK">CZK</option>
<option value="DKK">DKK</option>
<option value="EUR">EUR</option>
<option value="HKD">HKD</option>
<option value="MYR">MYR</option>
<option value="MXN">MXN</option>
<option value="NOK">NOK</option>
<option value="NZD">NZD</option>
<option value="PHP">PHP</option>
<option value="PLN">PLN</option>
<option value="GBP">GBP</option>
<option value="RUB">RUB</option>
<option value="SGD">SGD</option>
<option value="SEK">SEK</option>
<option value="CHF">CHF</option>
<option value="THB">THB</option>
<option value="USD" selected>USD</option>
</td></tr>
</table>
<br/>
<!--Container for Checkout with PayPal button-->
<div id="myContainer"></div>
<div id="paypal-end" style="display:none">
<h2>Your payment is complete</h2>
<!-- <pre id="paypal-execute-details"></pre> -->
<div class="hero-unit">
<!-- Display the Transaction Details-->
<h4> <span id="paypal-execute-details-first-name""></span>
<span id="paypal-execute-details-last-name"></span>, Thank you for your Order </h4>
<h4> Shipping Details: </h4>
<span id="paypal-execute-details-recipient-name"></span><br>
<span id="paypal-execute-details-addressLine1"></span>
<span id="paypal-execute-details-addressLine2"></span><br>
<span id="paypal-execute-details-city"></span><br>
<span id="paypal-execute-details-state"></span> -
<span id="paypal-execute-details-postal-code"></span></p>
<p>Transaction ID: <span id="paypal-execute-details-transaction-ID"></span></p>
<p>Payment Total Amount: <span id="paypal-execute-details-final-amount"></span> </p>
<p>Currency Code: <span id="paypal-execute-details-currency"></span></p>
<p>Payment Status: <span id="paypal-execute-details-payment-state"></span></p>
<p>Payment Type: <span id="paypal-execute-details-transaction-type"></span> </p>
<h3> Click <a href='index.php'>here </a> to return to Home Page</h3>
</div>
</div>
<div id="confirm" style="display: none;">
<div>Ship to:</div>
<div><span id="recipient"></span>, <span id="line1"></span>, <span id="city"></span></div>
<div><span id="state"></span>, <span id="zip"></span>, <span id="country"></span> <span id="shipping_amt_updated" hidden></span></div>
<button id="confirmButton">Complete Payment</button>
</div>
<br/>
<span style="margin-left:60px">OR</span>
<br/><br/>
<div>
<button class="btn btn-primary" formaction="shipping.php" role="button">Proceed to Checkout</button>
</div>
</form>
</div>
<div class="col-md-5" id="instruction">
<h4> README: </h4>
<p>
1) Click on 'PayPal Checkout button and see the experience.
<br>
2) If you get any Firewall warning, add rule to the Firewall to allow incoming connections for your application.
<br>
3) Checkout with PayPal using a buyer sandbox account provided on this page. And you're done!
<br>
4) The sample code uses default sandbox REST App credentials which are set in index.php PayPal button section. You can get your own REST app credentials by creating a REST app with the steps outlined <i><a href="https://developer.paypal.com/docs/integration/direct/make-your-first-call/#create-a-paypal-app" target="_blank">here</a></i>.
<br>
5) Make following changes in paypal_config.php:<br>
- If using your own Sandbox seller account, update 'client'->'sandbox' parameter in Checkout.js v4 script (in index.php and shipping.php) with your Sandbox REST app Client ID.<br>
- env parameter oin Checkout.js v4 script: Kept 'sandbox' for working with Sandbox, it will be 'production' for LIVE.<br>
</p>
<h4 id="incontext"> In-Context Checkout integration steps with Checkout.js v4: </h4>
1) Copy the files and folders under 'Checkout' package to the same location where you have your shopping cart page.
<br>
2) Include the following Checkout.js v4 script on your shopping cart page:
<br><br>
<pre><code>&lt;script type="text/javascript"&gt;
paypal.Button.render({
env: 'sandbox', // sandbox | production
// PayPal Client IDs - replace with your own
// Create a PayPal app: https://developer.paypal.com/developer/applications/create
client: {
sandbox: '<Sandbox client id>',
production: '<insert production client id>'
},
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions) {
// Make a call to the REST api to create the payment
return actions.payment.create({
meta: {
partner_attribution_id: '<?php echo(SBN_CODE)?>'
},
payment: {
transactions: [
{
amount: { total: '0.01', currency: 'USD' }
}
]
}
});
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function() {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
&lt;/script&gt;
&lt;script src="//www.paypalobjects.com/api/checkout.js" async&gt;&lt;/script&gt;</code></pre><br>
3) Open your browser and navigate to your Shopping cart page. Click on 'Checkout with PayPal' button and complete the flow.<br>
4) You can use the sample Buyer Sandbox credentials provided on index.php/home page. <br/>
5) Read overview of REST API <a href="https://developer.paypal.com/docs/integration/direct/rest-payments-overview/" target=_blank>here</a> and find the API reference <a href="https://developer.paypal.com/docs/api/" target="_blank">here</a>. You can also try the interactive demo <a href="https://developer.paypal.com/demo/checkout/#/pattern/client" target="_blank">here</a>.<br/><br/>
<br><br>
</div>
</div>
<!-- <div id="shipping_amt_updated"> add $2 shipping</div>
-->
<script src="//www.paypalobjects.com/api/checkout.js"></script>
<!-- PayPal In-Context Checkout script -->
<script type="text/javascript">
var client = {
sandbox: '<?php echo(CLIENT_ID)?>'
};
var environment = 'sandbox';
var transaction = {
transactions: [
{
amount: {
total: '15.00',
currency: 'USD'
}
}
]
};
function showDom(id) {
var arr;
if (!Array.isArray(id)) {
arr = [id];
} else {
arr = id;
}
arr.forEach(function (domid) {
document.getElementById(domid).style.display = 'initial';
});
}
function hideDom(id) {
var arr;
if (!Array.isArray(id)) {
arr = [id];
} else {
arr = id;
}
arr.forEach(function (domid) {
document.getElementById(domid).style.display = 'none';
});
}
function handleResponse(result) {
document.getElementById('confirm').style.display ='none';
// var resultDOM = document.getElementById('paypal-execute-details').textContent;
// document.getElementById('paypal-execute-details').textContent = JSON.stringify(result, null, 2);
var resultDOM = JSON.stringify(result, null, 2);
console.log(resultDOM);
$json_response = result;
// console.log($json_response['id']);
var payID = $json_response['id'];
var paymentState = $json_response['state'];
var finalAmount = $json_response['transactions'][0]['amount']['total'];
var currency = $json_response['transactions'][0]['amount']['currency'];
var transactionID= $json_response['transactions'][0]['related_resources'][0]['sale']['id'];
var payerFirstName = $json_response['payer']['payer_info']['first_name'];
var payerLastName = $json_response['payer']['payer_info']['last_name'];
var recipientName= $json_response['payer']['payer_info']['shipping_address']['recipient_name'],FILTER_SANITIZE_SPECIAL_CHARS;
var addressLine1= $json_response['payer']['payer_info']['shipping_address']['line1'];
var addressLine2 = $json_response['payer']['payer_info']['shipping_address']['line2'];
var city= $json_response['payer']['payer_info']['shipping_address']['city'];
var state= $json_response['payer']['payer_info']['shipping_address']['state'];
var postalCode =$json_response['payer']['payer_info']['shipping_address']['postal_code'];
var transactionType = $json_response['intent'];
// var countryCode= filter_var($json_response['payer']['payer_info']['shipping_address']['country_code'],FILTER_SANITIZE_SPECIAL_CHARS);
document.getElementById('paypal-execute-details-postal-code').textContent = postalCode;
document.getElementById('paypal-execute-details-state').textContent = state;
document.getElementById('paypal-execute-details-recipient-name').textContent = recipientName;
document.getElementById('paypal-execute-details-transaction-type').textContent = transactionType;
document.getElementById('paypal-execute-details-transaction-ID').textContent = transactionID;
document.getElementById('paypal-execute-details-first-name').textContent = payerFirstName;
// document.getElementById('paypal-execute-details-last-name').textContent = payerLastName;
document.getElementById('paypal-execute-details-payment-state').textContent = paymentState;
document.getElementById('paypal-execute-details-final-amount').textContent = finalAmount;
document.getElementById('paypal-execute-details-currency').textContent = currency;
document.getElementById('paypal-execute-details-addressLine1').textContent = addressLine1;
document.getElementById('paypal-execute-details-addressLine2').textContent = addressLine2;
document.getElementById('paypal-execute-details-city').textContent = city;
showDom('paypal-end');
var button = document.getElementById('myContainer');
// button.link.style.display = 'none';
var instructionNode = document.getElementById('instruction');
instructionNode.style.display= 'none';
}
paypal.Button.render({
// Set your environment
env: 'sandbox', // sandbox | production
client: {
sandbox: '<?php echo(CLIENT_ID)?>'
},
// Wait for the PayPal button to be clicked
payment: function(actions) {
var tax_amt = document.getElementById('tax_amt').value;
var shipping_discount = document.getElementById('shipping_discount').value;
var handling_fee = document.getElementById('handling_fee').value;
var insurance_fee = document.getElementById('insurance_fee').value;
// var shippingSel = document.getElementById('shipping_method');
var shipping_amt = document.getElementById('shipping_amt').value;
var total_amt = document.getElementById('total_amt').value;
return actions.payment.create({
meta: {
partner_attribution_id: '<?php echo(SBN_CODE)?>'
},
payment: {
transactions: [
{
amount: {
total: total_amt ,
currency: 'USD',
details:
{
subtotal: total_amt - shipping_amt,
shipping: shipping_amt,
}
}
}
]
}
});
},
// Wait for the payment to be authorized by the customer
onAuthorize: function(data, actions) {
return actions.payment.get().then(function(data) {
var currentShippingVal = data.transactions[0].amount.details.shipping;
var shipping = data.payer.payer_info.shipping_address;
var currentTotal = data.transactions[0].amount.total;
document.querySelector('#recipient').innerText = shipping.recipient_name;
document.querySelector('#line1').innerText = shipping.line1;
document.querySelector('#city').innerText = shipping.city;
document.querySelector('#state').innerText = shipping.state;
document.querySelector('#zip').innerText = shipping.postal_code;
document.querySelector('#country').innerText = shipping.country_code;
var updatedShipping = parseInt(currentShippingVal) + parseInt(2);
document.querySelector('#shipping_amt_updated').innerText = updatedShipping;
console.log('Updated Shipping : '+ updatedShipping);
//total_amt =+ total_amt + shipping_amt_updated;
document.querySelector('#myContainer').style.display = 'none';
document.querySelector('#confirm').style.display = 'block';
// Listen for click on confirm button
document.querySelector('#confirmButton').addEventListener('click', function() {
// Disable the button and show a loading message
document.querySelector('#confirm').innerText = 'Loading...';
document.querySelector('#confirm').disabled = true;
// Execute the payment
var totalAmount = currentTotal - parseInt(updatedShipping);
var subtotal = currentTotal - parseInt(updatedShipping);
return actions.payment.execute(
{
transactions: [
{
amount: {
total: totalAmount,
currency: 'USD',
details:
{
subtotal: subtotal,
shipping: updatedShipping,
}
}
}
]
}).then(handleResponse);
})
// return actions.payment.execute().then(handleResponse);
})
}
}, '#myContainer');
</script>
<?php
include('footer.php');
?>

6
bl-content/paypal/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
<?php
//Client Id of REST app
define("CLIENT_ID", "Ad3NzM6j46kMX4klm9NRun8ilKunmncjz9jfPTiYp47gMuM0NR3yi6mrCWRgoL4Q3_3dcIGlp8oohZS9");
//ButtonSource Tracker Code
define("SBN_CODE","PP-DemoPortal-EC-JSV4-php-REST");
?>

View File

@ -0,0 +1,494 @@
<?php
/*
* Shipping Details page : part of the Proceed to Checkout/Mark flow. Buyer can enter shipping address information and choose shipping option on this page.
*/
if (session_id() == "")
session_start();
include('header.php');
include_once('paypalConfig.php');
?>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<h4>
Please provide your shipping information:
<form action="startPayment.php" method="POST">
<input type="text" name="csrf" value="<?php echo($_SESSION['csrf']);?>" hidden readonly/>
<input type="text" name="markFlow" value="true" hidden></input>
<br/>
<table>
<tr><td width="30%">Full Name</td><td><input class="form-control" type="text" id="recipient_name" name="recipient_name" value="Jane Doe"></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>Address</td><td><input class="form-control" type="text" name="line1" id="line1" value="55 East 52nd Street"></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>Address 1</td><td><input class="form-control" type="text" name="line2" id="line2" value="21st Floor"></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>City</td><td><input class="form-control" type="text" name="city" id="city" value="New York" ></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>State</td><td><input class="form-control" type="text" name="state" id="state" value="NY" ></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>Postal Code</td><td><input class="form-control" type="text" name="postal_code" id="postal_code" value="10022" ></input></td></tr>
<tr><td><br/></td></tr>
<tr><td>Country</td><td><select class="form-control" name="country_code" id="country_code">
<option value="AF">Afghanistan</option>
<option value="AX">Aland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia</option>
<option value="BA">Bosnia and Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BV">Bouvet Island</option>
<option value="BR">Brazil</option>
<option value="IO">British Indian Ocean Territory</option>
<option value="BN">Brunei Darussalam</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CX">Christmas Island</option>
<option value="CC">Cocos (Keeling) Islands</option>
<option value="CO">Colombia</option>
<option value="KM">Comoros</option>
<option value="CG">Congo</option>
<option value="CD">Congo, The Democratic Republic of The</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CI">Cote D'ivoire</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FK">Falkland Islands (Malvinas)</option>
<option value="FO">Faroe Islands</option>
<option value="FJ">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="TF">French Southern Territories</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GG">Guernsey</option>
<option value="GN">Guinea</option>
<option value="GW">Guinea-bissau</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HM">Heard Island and Mcdonald Islands</option>
<option value="VA">Holy See (Vatican City State)</option>
<option value="HN">Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IR">Iran, Islamic Republic of</option>
<option value="IQ">Iraq</option>
<option value="IE">Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JE">Jersey</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="KP">Korea, Democratic People's Republic of</option>
<option value="KR">Korea, Republic of</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyzstan</option>
<option value="LA">Lao People's Democratic Republic</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libyan Arab Jamahiriya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macao</option>
<option value="MK">Macedonia, The Former Yugoslav Republic of</option>
<option value="MG">Madagascar</option>
<option value="MW">Malawi</option>
<option value="MY">Malaysia</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="YT">Mayotte</option>
<option value="MX">Mexico</option>
<option value="FM">Micronesia, Federated States of</option>
<option value="MD">Moldova, Republic of</option>
<option value="MC">Monaco</option>
<option value="MN">Mongolia</option>
<option value="ME">Montenegro</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option value="NA">Namibia</option>
<option value="NR">Nauru</option>
<option value="NP">Nepal</option>
<option value="NL">Netherlands</option>
<option value="AN">Netherlands Antilles</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NU">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="MP">Northern Mariana Islands</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau</option>
<option value="PS">Palestinian Territory, Occupied</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PN">Pitcairn</option>
<option value="PL">Poland</option>
<option value="PT">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="RE">Reunion</option>
<option value="RO">Romania</option>
<option value="RU">Russian Federation</option>
<option value="RW">Rwanda</option>
<option value="SH">Saint Helena</option>
<option value="KN">Saint Kitts and Nevis</option>
<option value="LC">Saint Lucia</option>
<option value="PM">Saint Pierre and Miquelon</option>
<option value="VC">Saint Vincent and The Grenadines</option>
<option value="WS">Samoa</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome and Principe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SK">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="SO">Somalia</option>
<option value="ZA">South Africa</option>
<option value="GS">South Georgia and The South Sandwich Islands</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SJ">Svalbard and Jan Mayen</option>
<option value="SZ">Swaziland</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland</option>
<option value="SY">Syrian Arab Republic</option>
<option value="TW">Taiwan, Province of China</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania, United Republic of</option>
<option value="TH">Thailand</option>
<option value="TL">Timor-leste</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad and Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TM">Turkmenistan</option>
<option value="TC">Turks and Caicos Islands</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US" selected>United States</option>
<option value="UM">United States Minor Outlying Islands</option>
<option value="UY">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VE">Venezuela</option>
<option value="VN">Viet Nam</option>
<option value="VG">Virgin Islands, British</option>
<option value="VI">Virgin Islands, U.S.</option>
<option value="WF">Wallis and Futuna</option>
<option value="EH">Western Sahara</option>
<option value="YE">Yemen</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>
</select>
</td></tr>
<tr><td><br/></td></tr>
<tr><td>Shipping Type </td><td><select class="form-control" name="shipping_method" id="shipping_method" style="width: 250px;" class="required-entry">
<optgroup label="United Parcel Service" style="font-style:normal;">
<option value="8.00">
Worldwide Expedited - $8.00</option>
<option value="4.00">
Worldwide Express Saver - $4.00</option>
</optgroup>
<optgroup label="Flat Rate" style="font-style:normal;">
<option value="2.00" selected>
Fixed - $2.00</option>
</optgroup>
</select><br>
</td></tr>
<tr><td colspan="2" id="payment-selection-title">Payment Methods:</td></tr>
<tr><td colspan="2" id="payment-selection">
<div class="radio">
<label>
<input type="radio" name="paymentMethod" id="paypal_payment_option" value="paypal_express" checked>
<img src="https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image&amp;buttontype=ecmark&amp;locale=en_US" alt="Acceptance Mark" class="v-middle"></input>&nbsp;
<a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside" onclick="javascript:window.open('https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=0, top=0, width=400, height=350'); return false;">What is PayPal?</a>
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="paymentMethod" id="credit_card_option" value="credit_card" disabled>
Credit Card
</label>
</div>
</td>
</tr>
<tr><td><br/></td></tr>
</table>
<div id="myContainer"></div>
<div id="paypal-end" style="display:none">
<h2>Your payment is complete</h2>
<div class="hero-unit">
<!-- Display the Transaction Details-->
<h4> <span id="paypal-execute-details-first-name""></span>
<span id="paypal-execute-details-last-name"></span>, Thank you for your Order </h4>
<h4> Shipping Details: </h4>
<span id="paypal-execute-details-recipient-name"></span><br>
<span id="paypal-execute-details-addressLine1"></span>
<span id="paypal-execute-details-addressLine2"></span><br>
<span id="paypal-execute-details-city"></span><br>
<span id="paypal-execute-details-state"></span> -
<span id="paypal-execute-details-postal-code"></span></p>
<p>Transaction ID: <span id="paypal-execute-details-transaction-ID"></span></p>
<p>Payment Total Amount: <span id="paypal-execute-details-final-amount"></span> </p>
<p>Currency Code: <span id="paypal-execute-details-currency"></span></p>
<p>Payment Status: <span id="paypal-execute-details-payment-state"></span></p>
<p>Payment Type: <span id="paypal-execute-details-transaction-type"></span> </p>
<h3> Click <a href='index.php'>here </a> to return to Home Page</h3>
</div>
</div>
</form>
</h4>
<br/>
</div>
<div class="col-md-4"></div>
</div>
<!-- PayPal In-Context Checkout script -->
<script src="//www.paypalobjects.com/api/checkout.js"></script>
<!-- PayPal In-Context Checkout script -->
<script type="text/javascript">
var client = {
sandbox: '<?php echo(CLIENT_ID)?>'
};
var environment = 'sandbox';
var transaction = '';
function showDom(id) {
var arr;
if (!Array.isArray(id)) {
arr = [id];
} else {
arr = id;
}
arr.forEach(function (domid) {
document.getElementById(domid).style.display = 'initial';
});
}
function handleResponse(result) {
// document.getElementById('paypal-execute-details').textContent = JSON.stringify(result, null, 2);
// showDom('paypal-end');
var resultDOM = JSON.stringify(result, null, 2);
$json_response = result;
// console.log($json_response['id']);
var payID = $json_response['id'];
var paymentState = $json_response['state'];
var finalAmount = $json_response['transactions'][0]['amount']['total'];
var currency = $json_response['transactions'][0]['amount']['currency'];
var transactionID= $json_response['transactions'][0]['related_resources'][0]['sale']['id'];
var payerFirstName = $json_response['payer']['payer_info']['first_name'];
var payerLastName = $json_response['payer']['payer_info']['last_name'];
var recipientName= $json_response['payer']['payer_info']['shipping_address']['recipient_name'],FILTER_SANITIZE_SPECIAL_CHARS;
var addressLine1= $json_response['payer']['payer_info']['shipping_address']['line1'];
var addressLine2 = $json_response['payer']['payer_info']['shipping_address']['line2'];
var city= $json_response['payer']['payer_info']['shipping_address']['city'];
var state= $json_response['payer']['payer_info']['shipping_address']['state'];
var postalCode =$json_response['payer']['payer_info']['shipping_address']['postal_code'];
var transactionType = $json_response['intent'];
// var countryCode= filter_var($json_response['payer']['payer_info']['shipping_address']['country_code'],FILTER_SANITIZE_SPECIAL_CHARS);
document.getElementById('paypal-execute-details-postal-code').textContent = postalCode;
document.getElementById('paypal-execute-details-state').textContent = state;
document.getElementById('paypal-execute-details-recipient-name').textContent = recipientName;
document.getElementById('paypal-execute-details-transaction-type').textContent = transactionType;
document.getElementById('paypal-execute-details-transaction-ID').textContent = transactionID;
document.getElementById('paypal-execute-details-first-name').textContent = payerFirstName;
// document.getElementById('paypal-execute-details-last-name').textContent = payerLastName;
document.getElementById('paypal-execute-details-payment-state').textContent = paymentState;
document.getElementById('paypal-execute-details-final-amount').textContent = finalAmount;
document.getElementById('paypal-execute-details-currency').textContent = currency;
document.getElementById('paypal-execute-details-addressLine1').textContent = addressLine1;
document.getElementById('paypal-execute-details-addressLine2').textContent = addressLine2;
document.getElementById('paypal-execute-details-city').textContent = city;
var paymentOptionTitle = document.getElementById('payment-selection-title');
var paymentOption = document.getElementById('payment-selection');
paymentOptionTitle.parentNode.style.display= 'none';
paymentOption.parentNode.style.dispaly='none';
showDom('paypal-end');
}
paypal.Button.render({
// Set your environment
env: 'sandbox', // sandbox | production
client: {
sandbox: '<?php echo(CLIENT_ID)?>'
},
// Set to 'Pay Now'
commit: true,
// Wait for the PayPal button to be clicked
payment: function(actions) {
var fullname = document.getElementById('recipient_name').value;
var line1 = document.getElementById('line1').value;
var line2 = document.getElementById('line2').value;
var shipToCity = document.getElementById('city').value;
var shipToState = document.getElementById('state').value;
var shipToZip=document.getElementById('postal_code').value;
var shipToCountry=document.getElementById('country_code').value;
var shippingSel = document.getElementById('shipping_method');
var shipping_amt = shippingSel.options[shippingSel.selectedIndex].value;
var total_amt = parseFloat(320) - parseFloat(2) + parseFloat(shipping_amt);
return actions.payment.create({
meta: {
partner_attribution_id: '<?php echo(SBN_CODE)?>'
},
payment: {
transactions: [
{
amount: {
total: total_amt ,
currency: 'USD',
details:
{
subtotal: total_amt - shipping_amt,
shipping: shipping_amt,
}
},
item_list:
{
shipping_address:
{
recipient_name: fullname,
line1: line1,
line2: line2,
city: shipToCity,
country_code: shipToCountry,
postal_code: shipToZip,
phone: "011862212345678",
state: shipToState,
}
}
}
]
}
});
},
// Wait for the payment to be authorized by the customer
onAuthorize: function(data, actions) {
return actions.payment.execute().then(handleResponse);
}
}, '#myContainer');
</script>
<?php
include('footer.php');
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -0,0 +1,113 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class dbJSON
{
public $db;
public $dbBackup;
public $file;
public $firstLine;
// $file, the JSON file.
// $firstLine, TRUE if you want to remove the first line, FALSE otherwise.
function __construct($file, $firstLine=true)
{
$this->file = $file;
$this->db = array();
$this->dbBackup = array();
$this->firstLine = $firstLine;
if(file_exists($file))
{
// Read JSON file.
$lines = file($file);
// Remove the first line, the first line is for security reasons.
if($firstLine) {
unset($lines[0]);
}
// Regenerate the JSON file.
$implode = implode($lines);
// Unserialize, JSON to Array.
$array = $this->unserialize($implode);
if(empty($array)) {
//Log::set(__METHOD__.LOG_SEP.'Invalid JSON file: '.$file.', cannot be decoded. Check the file content.');
}
else {
$this->db = $array;
$this->dbBackup = $array;
}
}
}
public function restoreDB()
{
$this->db = $this->dbBackup;
return true;
}
// Returns the amount of database items.
public function count()
{
return count($this->db);
}
// Returns the value from the field.
public function getField($field)
{
if(isset($this->db[$field])) {
return $this->db[$field];
}
return $this->dbFields[$field]['value'];
}
// Save the JSON file.
public function save()
{
$data = '';
if($this->firstLine) {
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
}
// Serialize database
$data .= $this->serialize($this->db);
// Backup the new database.
$this->dbBackup = $this->db;
// LOCK_EX flag to prevent anyone else writing to the file at the same time.
if( file_put_contents($this->file, $data, LOCK_EX) ) {
return true;
}
else {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
return false;
}
}
// Returns a JSON encoded string on success or FALSE on failure.
private function serialize($data)
{
return json_encode($data, JSON_PRETTY_PRINT);
}
// Returns the value encoded in json in appropriate PHP type.
private function unserialize($data)
{
// NULL is returned if the json cannot be decoded.
$decode = json_decode($data, true);
// If NULL returns false.
if(empty($decode)) {
return false;
}
return $decode;
}
}

View File

@ -0,0 +1,177 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
/*
Database structure
{
"videos": {
"name": "Videos",
"list": [ "my-page", "second-page" ]
},
"pets": {
"name": "Pets",
"list": [ "cats-and-dogs" ]
}
}
*/
class dbList extends dbJSON
{
public $db = array();
function __construct($file)
{
parent::__construct($file);
}
// Returns an array with a list of key of pages, FALSE if out of range
public function getList($key, $pageNumber, $amountOfItems)
{
if (empty($key)) {
return false;
}
if (!isset($this->db[$key])) {
Log::set(__METHOD__.LOG_SEP.'Error key does not exist '.$key);
return false;
}
$list = $this->db[$key]['list'];
if ($amountOfItems==-1) {
// Invert keys to values, is necesary returns as key the key pages
//$list = array_flip($list);
return $list;
}
// The first page number is 1, so the real is 0
$realPageNumber = $pageNumber - 1;
$total = count($list);
$init = (int) $amountOfItems * $realPageNumber;
$end = (int) min( ($init + $amountOfItems - 1), $total );
$outrange = $init<0 ? true : $init>$end;
if($outrange) {
Log::set(__METHOD__.LOG_SEP.'Error out of range');
return false;
}
//$list = array_flip($list);
return array_slice($list, $init, $amountOfItems, true);
}
public function generateKey($name)
{
$key = Text::cleanUrl($name);
if (empty($key)) {
return false;
}
return $key;
}
public function add($name)
{
$key = $this->generateKey($name);
if ($key===false) {
Log::set(__METHOD__.LOG_SEP.'Error when try to generate the key');
return false;
}
if (isset($this->db[$key])) {
Log::set(__METHOD__.LOG_SEP.'Error key already exist: '.$key);
return false;
}
$this->db[$key]['name'] = Sanitize::html($name);
$this->db[$key]['list'] = array();
$this->sortAlphanumeric();
$this->save();
return $key;
}
public function remove($key)
{
if( !isset($this->db[$key]) ) {
Log::set(__METHOD__.LOG_SEP.'The key does not exist, key: '.$key);
return false;
}
unset($this->db[$key]);
return $this->save();
}
public function edit($oldKey, $newName)
{
$newKey = $this->generateKey($newName);
$this->db[$newKey]['name'] = Sanitize::html($newName);
$this->db[$newKey]['list'] = $this->db[$oldKey]['list'];
// Remove the old key
if( $oldKey != $newKey ) {
unset( $this->db[$oldKey] );
}
$this->sortAlphanumeric();
$this->save();
return $newKey;
}
// Sort the categories by "Natural order"
private function sortAlphanumeric()
{
// Sort key alphanumeric strings, a01, a10, b10, c02
return ksort($this->db);
}
// Returns the name associated to the key, FALSE if the key doesn't exist
public function getName($key)
{
if( isset($this->db[$key]) ) {
return $this->db[$key]['name'];
}
return false;
}
// Returns an array with key=>name of the list
public function getKeyNameArray()
{
$tmp = array();
foreach($this->db as $key=>$fields) {
$tmp[$key] = $fields['name'];
}
return $tmp;
}
// Returns the amount of items for some key
public function countItems($key)
{
if( isset($this->db[$key]) ) {
return count($this->db[$key]['list']);
}
return 0;
}
public function exists($key)
{
return isset( $this->db[$key] );
}
// Returns an array with a portion of the database filtered by key
// Returns array( 'name'=>'', 'list'=>array() )
public function getMap($key)
{
if( isset($this->db[$key]) ) {
return $this->db[$key];
}
return false;
}
}

View File

@ -0,0 +1,317 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class Plugin {
// (string) directory name, just the name
// Ex: sitemap
public $directoryName;
// (string) Absoulute database filename and path
// Ex: /www/bludit/bl-content/plugins/sitemap/db.php
public $filenameDb;
// (string) Absoulute metadata filename and path
// Ex: /www/bludit/bl-plugins/sitemap/metadata.json
public $filenameMetadata;
// (array) Plugin metadata
// Ex: array('author'=>'',...., 'notes'=>'')
public $metadata;
// (string) Class name
// Ex: pluginSitemap
public $className;
// (array) Database unserialized
public $db;
// (array) Database fields, only for initialize
public $dbFields;
// (boolean) Enable or disable default Save and Cancel button on plugin settings
public $formButtons;
function __construct()
{
$this->dbFields = array();
$reflector = new ReflectionClass(get_class($this));
// Directory name
$this->directoryName = basename(dirname($reflector->getFileName()));
// Class Name
$this->className = $reflector->getName();
$this->formButtons = true;
// Call the method init() from the children
$this->init();
// Init empty database with default values
$this->db = $this->dbFields;
$this->filenameDb = PATH_PLUGINS_DATABASES.$this->directoryName.DS.'db.php';
// --- Metadata ---
$this->filenameMetadata = PATH_PLUGINS.$this->directoryName().DS.'metadata.json';
$metadataString = file_get_contents($this->filenameMetadata);
$this->metadata = json_decode($metadataString, true);
// If the plugin is installed then get the database
if($this->installed()) {
$Tmp = new dbJSON($this->filenameDb);
$this->db = $Tmp->db;
}
}
// DEPRECATED
// 2017-06-19
public function setDb($args)
{
foreach($this->dbFields as $key=>$value) {
if( isset($args[$key]) ) {
$value = Sanitize::html( $args[$key] );
if($value==='false') { $value = false; }
elseif($value==='true') { $value = true; }
settype($value, gettype($this->dbFields[$key]));
$this->db[$key] = $value;
}
}
$this->save();
}
public function save()
{
$tmp = new dbJSON($this->filenameDb);
$tmp->db = $this->db;
return $tmp->save();
}
public function htmlPath()
{
return HTML_PATH_PLUGINS.$this->directoryName.'/';
}
public function phpPath()
{
return PATH_PLUGINS.$this->directoryName.DS;
}
public function phpPathDB()
{
return PATH_PLUGINS_DATABASES.$this->directoryName.DS;
}
// Returns the value of the key from the metadata of the plugin, FALSE if the key doen't exit
public function getMetadata($key)
{
if(isset($this->metadata[$key])) {
return $this->metadata[$key];
}
return false;
}
// Set a key / value on the metadata of the plugin
public function setMetadata($key, $value)
{
$this->metadata[$key] = $value;
return true;
}
// Returns the value of the field from the database
// (string) $field
// (boolean) $html, TRUE returns the value sanitized, FALSE unsanitized
public function getValue($field, $html=true)
{
if( isset($this->db[$field]) ) {
if($html) {
return $this->db[$field];
}
else {
return Sanitize::htmlDecode($this->db[$field]);
}
}
return false;
}
// DEPRECATED
// 2017-06-16
public function getDbField($key, $html=true)
{
if(isset($this->db[$key])) {
if($html) {
// All fields from DBField are sanitized.
return $this->db[$key];
}
else {
// Decode HTML tags, this action unsanitized the variable.
return Sanitize::htmlDecode($this->db[$key]);
}
}
return '';
}
public function name()
{
return $this->getMetadata('name');
}
public function description()
{
return $this->getMetadata('description');
}
public function author()
{
return $this->getMetadata('author');
}
public function email()
{
return $this->getMetadata('email');
}
public function website()
{
return $this->getMetadata('website');
}
public function position()
{
return $this->getValue('position');
}
public function version()
{
return $this->getMetadata('version');
}
public function releaseDate()
{
return $this->getMetadata('releaseDate');
}
public function className()
{
return $this->className;
}
public function formButtons()
{
return $this->formButtons;
}
public function isCompatible()
{
$bluditRoot = explode('.', BLUDIT_VERSION);
$compatible = explode(',', $this->getMetadata('compatible'));
foreach( $compatible as $version ) {
$root = explode('.', $version);
if( $root[0]==$bluditRoot[0] && $root[1]==$bluditRoot[1] ) {
return true;
}
}
return false;
}
public function directoryName()
{
return $this->directoryName;
}
// Return TRUE if the installation success, otherwise FALSE.
public function install($position=1)
{
if($this->installed()) {
return false;
}
// Create plugin directory for databases and other files
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, 0755, true);
// Create database
$this->dbFields['position'] = $position;
$this->setDb($this->dbFields);
return true;
}
public function uninstall()
{
$path = PATH_PLUGINS_DATABASES.$this->directoryName;
return Filesystem::deleteRecursive($path);
}
public function installed()
{
return file_exists($this->filenameDb);
}
public function workspace()
{
return PATH_PLUGINS_DATABASES.$this->directoryName.DS;
}
public function init()
{
// This method is used on childre classes.
// The user can define his own field of the database
}
public function post()
{
$args = $_POST;
foreach($this->dbFields as $key=>$value) {
if( isset($args[$key]) ) {
$value = Sanitize::html( $args[$key] );
if($value==='false') { $value = false; }
elseif($value==='true') { $value = true; }
settype($value, gettype($this->dbFields[$key]));
$this->db[$key] = $value;
}
}
return $this->save();
}
// Returns the parameters after the URI, FALSE if the URI doesn't match with the webhook
// Example: https://www.mybludit.com/api/foo/bar
public function webhook($URI=false, $returnsAfterURI=false, $fixed=true)
{
global $Url;
if (empty($URI)) {
return false;
}
// Check URI start with the webhook
$startString = HTML_PATH_ROOT.$URI;
$URI = $Url->uri();
$length = mb_strlen($startString, CHARSET);
if (mb_substr($URI, 0, $length)!=$startString) {
return false;
}
$afterURI = mb_substr($URI, $length);
if (!empty($afterURI)) {
if ($fixed) {
return false;
}
if ($afterURI[0]!='/') {
return false;
}
}
if ($returnsAfterURI) {
return $afterURI;
}
Log::set(__METHOD__.LOG_SEP.'Webhook requested.');
return true;
}
}

View File

@ -0,0 +1,4 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Title of the page
$layout['title'] .= ' - '.$Language->g('About');

View File

@ -0,0 +1,35 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (createUser($_POST)) {
Redirect::page('users');
}
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Add a new user');

View File

@ -0,0 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Categories');

View File

@ -0,0 +1,64 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
$plugin = false;
$pluginClassName = $layout['parameters'];
// Check if the plugin exists
if( isset($plugins['all'][$pluginClassName]) ) {
$plugin = $plugins['all'][$pluginClassName];
}
else {
Redirect::page('plugins');
}
// Check if the plugin has the method form()
if( !method_exists($plugin, 'form') ) {
Redirect::page('plugins');
}
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
// Add to syslog
$Syslog->add(array(
'dictionaryKey'=>'plugin-configured',
'notes'=>$plugin->name()
));
// Call the method post of the plugin
if( $plugin->post() ) {
// Create an alert
Alert::set( $Language->g('The changes have been saved') );
Redirect::page('configure-plugin/'.$plugin->className());
}
else {
// Create an alert
Alert::set( $Language->g('Complete all fields') );
}
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Plugin').' - '.$plugin->name();

View File

@ -0,0 +1,39 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// List of published pages
$onlyPublished = true;
$amountOfItems = ITEMS_PER_PAGE_ADMIN;
$pageNumber = $Url->pageNumber();
$published = $dbPages->getList($pageNumber, $amountOfItems, $onlyPublished);
// Check if out of range the pageNumber
if (empty($published) && $Url->pageNumber()>1) {
Redirect::page('content');
}
$drafts = $dbPages->getDraftDB(true);
$scheduled = $dbPages->getScheduledDB(true);
$static = $dbPages->getStaticDB(true);
// Title of the page
$layout['title'] .= ' - '.$Language->g('Manage content');

View File

@ -0,0 +1,39 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Functions
// ============================================================================
function updateBludit() {
global $Site;
// Check if Bludit need to be update.
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
Log::set('UPDATE SYSTEM - Starting.');
// From Bludit v2.0.x to v2.1.x
if ($Site->currentBuild() < '20171102') {
// Nothing to do
}
// Set the current build number
$Site->set(array('currentBuild'=>BLUDIT_BUILD));
Log::set('UPDATE SYSTEM - Finished.');
}
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// Try update Bludit
updateBludit();
// Title of the page
$layout['title'] .= ' - '.$Language->g('Dashboard');

View File

@ -0,0 +1,61 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// This function is used on the VIEW to show the tables
function printTable($title, $array) {
echo '<h2>'.$title.'</h2>';
echo '
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th class="uk-width-1-5"></th>
<th class="uk-width-3-5"></th>
</tr>
</thead>
<tbody>
';
foreach ($array as $key=>$value) {
if($value===false) { $value = 'false'; }
elseif($value===true) { $value = 'true'; }
echo '<tr>';
echo '<td>'.$key.'</td>';
if (is_array($value)) {
echo '<td>'.json_encode($value).'</td>';
} else {
echo '<td>'.Sanitize::html($value).'</td>';
}
echo '</tr>';
}
echo '
</tbody>
</table>
';
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$layout['title'] .= ' - '.$Language->g('Developers');

View File

@ -0,0 +1,48 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['delete'])) {
deleteCategory($_POST['categoryKey']);
}
elseif (isset($_POST['edit'])) {
editCategory($_POST['categoryKey'], $_POST['category']);
}
Redirect::page('categories');
}
// ============================================================================
// Main after POST
// ============================================================================
$categoryKey = $layout['parameters'];
if (!$dbCategories->exists($categoryKey)) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the category: '.$categoryKey);
Redirect::page('categories');
}
$category = $dbCategories->getName($layout['parameters']);
// Title of the page
$layout['title'] .= ' - '.$Language->g('Edit Category').' - '.$category;

View File

@ -0,0 +1,48 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if( isset($_POST['delete-page']) ) {
if( deletePage($_POST['key']) ) {
Alert::set( $Language->g('The changes have been saved') );
Redirect::page('content');
}
}
else {
$key = editPage($_POST);
if( $key!==false ) {
Alert::set( $Language->g('The changes have been saved') );
Redirect::page('edit-content/'.$key);
}
}
Redirect::page('content');
}
// ============================================================================
// Main after POST
// ============================================================================
$pageKey = $layout['parameters'];
$page = buildPage($pageKey);
if ($page===false) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey);
Redirect::page('content');
}
// Title of the page
$layout['title'] .= ' - '.$Language->g('Edit content').' - '.$page->title();

View File

@ -0,0 +1,56 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
// Prevent non-administrators to change other users
if($Login->role()!=='admin') {
$_POST['username'] = $Login->username();
unset($_POST['role']);
}
if(isset($_POST['delete-user-all'])) {
deleteUser($_POST, $deleteContent=true);
}
elseif(isset($_POST['delete-user-associate'])) {
deleteUser($_POST, $deleteContent=false);
}
elseif(isset($_POST['disable-user'])) {
disableUser($_POST['username']);
}
else {
editUser($_POST);
}
Alert::set($Language->g('The changes have been saved'));
}
// ============================================================================
// Main after POST
// ============================================================================
// Prevent non-administrators to change other users
if($Login->role()!=='admin') {
$layout['parameters'] = $Login->username();
}
$User = $dbUsers->getUser($layout['parameters']);
// If the user doesn't exist, redirect to the users list.
if($User===false) {
Redirect::page('users');
}
// Title of the page
$layout['title'] .= ' - '.$Language->g('Edit user');

View File

@ -0,0 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$pluginClassName = $layout['parameters'];
activatePlugin($pluginClassName);
Redirect::page('plugins');

View File

@ -0,0 +1,44 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$themeDirname = $layout['parameters'];
if( Sanitize::pathFile(PATH_THEMES.$themeDirname) ) {
// Set the theme
$Site->set(array('theme'=>$themeDirname));
// Add to syslog
$Syslog->add(array(
'dictionaryKey'=>'new-theme-configured',
'notes'=>$themeDirname
));
// Create an alert
Alert::set( $Language->g('The changes have been saved') );
}
// Redirect
Redirect::page('themes');

View File

@ -0,0 +1,123 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
function checkPost($args)
{
global $Security;
global $Language;
global $dbUsers;
global $Site;
if($Security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes'));
return false;
}
// Remove illegal characters from email
$email = Sanitize::email($args['email']);
if(Valid::email($email))
{
// Get username associated to an email.
$username = $dbUsers->getByEmail($email);
if($username!=false)
{
// Generate the token and the token expiration date.
$token = $dbUsers->setTokenEmail($username);
// ---- EMAIL ----
$link = $Site->url().'admin/login-email?tokenEmail='.$token.'&username='.$username;
$subject = $Language->g('BLUDIT Login access code');
$message = Text::replaceAssoc(
array(
'{{WEBSITE_NAME}}'=>$Site->title(),
'{{LINK}}'=>'<a href="'.$link.'">'.$link.'</a>'
),
$Language->g('email-notification-login-access-code')
);
$sent = Email::send(array(
'from'=>$Site->emailFrom(),
'fromName'=>$Site->title(),
'to'=>$email,
'subject'=>$subject,
'message'=>$message
));
if($sent) {
Alert::set($Language->g('check-your-inbox-for-your-login-access-code'));
return true;
}
else {
Alert::set($Language->g('There was a problem sending the email'));
return false;
}
}
}
// Bruteforce protection, add IP to blacklist.
$Security->addLoginFail();
Alert::set($Language->g('check-your-inbox-for-your-login-access-code'));
return false;
}
function checkGet($args)
{
global $Security;
global $Language;
global $Login;
if($Security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes'));
return false;
}
// Verify User sanitize the input
if( $Login->verifyUserByToken($args['username'], $args['tokenEmail']) )
{
// Renew the tokenCRFS. This token will be the same inside the session for multiple forms.
$Security->generateTokenCSRF();
Redirect::page('admin', 'dashboard');
return true;
}
// Bruteforce protection, add IP to blacklist.
$Security->addToBlacklist();
return false;
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// GET Method
// ============================================================================
if( !empty($_GET['tokenEmail']) && !empty($_GET['username']) )
{
checkGet($_GET);
}
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
checkPost($_POST);
}
// ============================================================================
// Main after POST
// ============================================================================

View File

@ -0,0 +1,77 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
function checkLogin($args)
{
global $Security;
global $Login;
global $Language;
if ($Security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes'));
return false;
}
if ($Login->verifyUser($_POST['username'], $_POST['password'])) {
if (isset($_POST['remember'])) {
$Login->setRememberMe($_POST['username']);
}
// Renew the token. This token will be the same inside the session for multiple forms.
$Security->generateTokenCSRF();
Redirect::page('dashboard');
return true;
}
// Bruteforce protection, add IP to the blacklist
$Security->addToBlacklist();
// Create alert
Alert::set($Language->g('Username or password incorrect'));
return false;
}
function checkRememberMe()
{
global $Security;
global $Login;
if ($Security->isBlocked()) {
return false;
}
if ($Login->verifyUserByRemember()) {
$Security->generateTokenCSRF();
Redirect::page('dashboard');
return true;
}
return false;
}
// ============================================================================
// Main before POST
// ============================================================================
if ($_SERVER['REQUEST_METHOD']!=='POST') {
checkRememberMe();
}
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD']=='POST') {
checkLogin($_POST);
}
// ============================================================================
// Main after POST
// ============================================================================

View File

@ -0,0 +1,25 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
if ($Login->logout()) {
Redirect::home();
}

View File

@ -0,0 +1,34 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
createCategory($_POST['category']);
Redirect::page('categories');
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('New category');

View File

@ -0,0 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
createPage($_POST);
Redirect::page('content');
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('New content');

View File

@ -0,0 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Plugins');

View File

@ -0,0 +1,48 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-advanced');
}
// ============================================================================
// Main after POST
// ============================================================================
$allPages = buildAllpages($publishedPages=true, $staticPages=true, $draftPages=false, $scheduledPages=false);
// Homepage select options
$homepageOptions = array(' '=>'- '.$L->g('Latest content').' -');
foreach ($allPages as $key=>$page) {
$parentKey = $page->parentKey();
if ($parentKey) {
$homepageOptions[$key] = $pagesByParentByKey[PARENT][$parentKey]->title() .'->'. $page->title();
} else {
$homepageOptions[$key] = $page->title();
}
ksort($homepageOptions);
}
// Title of the page
$layout['title'] .= ' - '.$Language->g('Advanced Settings');

View File

@ -0,0 +1,34 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-general');
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('General Settings');

View File

@ -0,0 +1,34 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
editSettings($_POST);
Redirect::page('settings-regional');
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Language and timezone');

View File

@ -0,0 +1,27 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$themes = buildThemes();
// Title of the page
$layout['title'] .= ' - '.$Language->g('Themes');

View File

@ -0,0 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$pluginClassName = $layout['parameters'];
deactivatePlugin($pluginClassName);
Redirect::page('plugins');

View File

@ -0,0 +1,82 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Functions
// ============================================================================
function setPassword($username, $new_password, $confirm_password)
{
global $dbUsers;
global $Language;
global $Syslog;
// Password length
if( strlen($new_password) < 6 )
{
Alert::set($Language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL);
return false;
}
if($new_password===$confirm_password)
{
if( $dbUsers->setPassword($username, $new_password) ) {
Alert::set($Language->g('The changes have been saved'), ALERT_STATUS_OK);
// Add to syslog
$Syslog->add(array(
'dictionaryKey'=>'user-password-changed',
'notes'=>$username
));
return true;
}
else {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to change the user password.');
return false;
}
}
else {
Alert::set($Language->g('The password and confirmation password do not match'), ALERT_STATUS_FAIL);
return false;
}
}
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
// Prevent editors to administrate other users.
if($Login->role()!=='admin')
{
$_POST['username'] = $Login->username();
unset($_POST['role']);
}
if( setPassword($_POST['username'], $_POST['new_password'], $_POST['confirm_password']) ) {
Redirect::page('users');
}
}
// ============================================================================
// Main after POST
// ============================================================================
if($Login->role()!=='admin') {
$layout['parameters'] = $Login->username();
}
$_user = $dbUsers->getDb($layout['parameters']);
// If the user doesn't exist, redirect to the users list.
if($_user===false) {
Redirect::page('users');
}
$_user['username'] = $layout['parameters'];
// Title of the page
$layout['title'] .= ' - '.$Language->g('Change password');

View File

@ -0,0 +1,34 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role()!=='admin') {
Alert::set($Language->g('You do not have sufficient permissions'));
Redirect::page('dashboard');
}
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$Site->set($_POST);
}
// ============================================================================
// Main after POST
// ============================================================================
// Title of the page
$layout['title'] .= ' - '.$Language->g('Users');

View File

@ -0,0 +1,766 @@
/* UIKIT HACKs
---------------------------------------------------------------- */
.uk-width-1-4 {
width: 15%;
}
.uk-width-3-4 {
width: 84%;
}
.label-draft,
.label-fixed,
.label-sticky,
.label-scheduled,
.label-empty-title,
.label-time {
background: #A979D1 none repeat scroll 0 0;
border-radius: 2px;
color: #ffffff;
display: inline-block;
padding: 0 8px;
text-align: center;
vertical-align: middle;
margin-right: 5px;
font-size: 0.8em;
}
.label-fixed {
background: #7BD179;
}
.label-scheduled {
background: #7BD179;
}
.label-empty-title {
background: #53D192;
}
.label-time {
font-style: italic;
background: #A979D1;
}
.uk-tab-responsive > a::before {
content: "\f078";
padding-right: 3px;
}
/* UIKIT HACKs tabs
---------------------------------------------------------------- */
.uk-nav-dropdown > li > a:focus,
.uk-nav-dropdown > li > a:hover {
background-color: #007add !important;
}
/* UIKIT HACKs buttons
---------------------------------------------------------------- */
.uk-button {
border-radius: 2px !important;
padding: 1px 20px !important;
margin-right: 5px;
}
.uk-button-primary {
background-color: #007add !important;
}
.uk-button-primary:hover,
.uk-button-primary:focus {
background-color: #0069BE !important;
}
/* CSS defaults
---------------------------------------------------------------- */
body {
overflow-y: scroll;
}
#bl-container {
margin: 0 auto 20px;
max-width: 1800px;
}
/* TOPBAR
---------------------------------------------------------------- */
.bl-navbar-bg {
background: #222;
color: #fff;
}
#bl-navbar {
margin: 0 auto 20px;
max-width: 1800px;
}
#bl-navbar img.logo {
height: 25px;
margin-bottom: 8px;
margin-left: 22px;
margin-right: 0px;
}
#bl-navbar a {
color: #fff;
}
#bl-navbar span.bl-brand {
font-size: 15px;
line-height: 35px;
text-transform: uppercase;
color: #fff;
}
#bl-navbar a.bl-brand:hover {
text-decoration: none;
}
#bl-navbar .bl-navbar-right {
float: right;
line-height: 35px;
margin: 0 35px 0 0;
}
/* SIDEBAR
---------------------------------------------------------------- */
#bl-sidebar {
max-width: 220px;
}
#bl-sidebar a {
color: #777 !important;
}
#bl-sidebar a:hover {
color: #007add !important;
}
#bl-sidebar li.uk-active {
border-left: 3px solid #007add;
}
#bl-sidebar li.uk-active a {
color: #007add !important;
}
#bl-sidebar .uk-nav {
margin: 0px 0 0 20px !important;
}
#bl-sidebar .uk-nav-header {
font-weight: normal !important;
font-size: 16px;
}
.uk-navbar-toggle {
margin-top: -2px;
text-shadow: 0 !important;
color: #fff;
}
/* VIEW
---------------------------------------------------------------- */
#bl-view {
padding-right: 10px;
}
#bl-view .uk-width-2-10 {
}
.plugin-incompatible,
.theme-incompatible {
background: #ffdc7d;
border: 1px dashed #eec24a;
color: #826106;
display: table-cell;
font-size: 12px;
margin-top: 6px;
padding: 1px 10px;
}
/* DASHBOARD
---------------------------------------------------------------- */
#dashboard-panel .uk-panel {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
padding: 10px !important;
}
#dashboard-panel .uk-panel h4.panel-title {
text-transform: uppercase;
font-size: 14px !important;
}
div.dashboard-links {
background-color: #fafafa !important;
border: 1px solid #f8f8f8;
box-shadow: 5px 1px 1px #fdfdfd;
margin-bottom: 10px;
padding: 50px 20px;
}
div.dashboard-links h4 {
margin-bottom: -8px !important;
}
#dashboard-panel .notification-date {
font-size: 0.8em;
}
#dashboard-hello {
background-color: #FBDF6B;
padding: 20px;
margin-bottom: 8px;
}
/* FORM
---------------------------------------------------------------- */
.uk-form input:not([type]), .uk-form input[type="text"], .uk-form input[type="password"], .uk-form input[type="email"], .uk-form input[type="url"], .uk-form input[type="search"], .uk-form input[type="tel"], .uk-form input[type="number"], .uk-form input[type="datetime"], .uk-form input[type="datetime-local"], .uk-form input[type="date"], .uk-form input[type="month"], .uk-form input[type="time"], .uk-form input[type="week"], .uk-form input[type="color"], .uk-form select, .uk-form textarea {
border-radius: 2px !important;
}
.uk-form-help-block {
color: #777 !important;
font-size: 0.9em !important;
}
.bl-publish-sidebar ul {
margin: 0;
padding: 0;
}
.bl-publish-sidebar li {
margin: 0;
padding: 0;
list-style: none;
}
.bl-publish-sidebar li:not(:first-child) {
margin-top: 10px;
}
.bl-publish-sidebar .uk-form-label {
font-size: 0.9em;
text-transform: uppercase;
font-weight: normal;
}
.bl-publish-sidebar .sidebar-view {
display: none;
}
.bl-publish-sidebar h2.sidebar-button {
font-size: 0.9em;
text-transform: uppercase;
border-bottom: 1px solid #ddd;
cursor: pointer;
}
.uk-form legend {
margin-top: 20px;
}
.uk-form legend.first-child {
margin-top: 0 !important;
}
button.aslink {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
border: 0 none;
color: #07d;
cursor: pointer;
display: block;
font-size: 1em;
margin: 0 !important;
padding: 0 !important;
}
button.aslink:hover {
text-decoration: underline;
}
/* TABLE
---------------------------------------------------------------- */
.uk-table td.children {
padding-left: 20px;
}
.uk-table td, .uk-table th {
padding: 14px 8px !important;
}
.uk-table td.child-title {
padding-left: 20px !important;
}
/* RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 960px) {
.uk-grid {
margin: 0 !important;
}
#bl-container {
margin: 0 10px !important;
}
#bl-view {
width: 100% !important;
padding: 0 !important;
}
.bl-brand {
margin: 0 !important;
}
.bl-publish-sidebar {
width: 100% !important;
padding: 0 !important;
margin-bottom: 25px !important;
}
.bl-publish-view {
width: 100% !important;
padding: 0 !important;
}
}
/* OLD
---------------------------------------------------------------- */
#logo {
background: #f4f4f4;
padding:20px 0;
}
h2.title {
margin: 0 0 20px 0;
}
button.delete-button {
background: none;
border: 0 none;
color: #da2727;
cursor: pointer;
font-size: 0.9em;
display: block;
margin-bottom: 10px;
}
button.delete-button:hover {
text-decoration: underline;
}
#jscontent {
height: 400px;
}
table.statistics tr:last-child td {
border-bottom: none !important;
}
/* ----------- ALERT ----------- */
#alert {
top: 0;
color: #ffffff;
padding: 8px 80px;
display: none;
position: fixed;
text-align: center;
z-index: 100;
right: 0;
}
.alert-ok {
background: #4374C1;
}
.alert-fail {
background: #c14343;
}
/* ----------- FORM ----------- */
#bludit-tags {
margin-top: 15px;
}
#bludit-tags .uk-button {
margin-top: 5px;
}
#jstagList {
margin-top: 15px;
font-size: 0.9em;
}
#jstagList span.unselect,
#jstagList span.select {
margin-top: 7px;
margin-right: 7px;
padding: 1px 15px;
cursor: pointer;
display: inline-block;
border-radius: 3px;
background: #f1f1f1;
vertical-align: middle;
}
#jstagList span.unselect:before {
font-family: FontAwesome;
content: "\f067";
padding-right: 5px;
}
#jstagList span.unselect {
color: #AAA;
}
#jstagList span.unselect:hover {
color: #888;
}
#jstagList span.select:before {
font-family: FontAwesome;
content: "\f00c";
padding-right: 5px;
}
#jstagList span.select {
color: #2196f3;
padding: 2px 13px;
}
/* ----------- BLUDIT IMAGES V8 ----------- */
#bludit-images-v8 {
}
#bludit-images-v8 .bludit-thumbnail {
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
display: inline-block;
height: auto;
margin: 2px;
padding: 0;
width: 15% !important;
}
#bludit-images-v8-upload {
width: 100%;
padding: 0;
margin-bottom: 15px !important;
}
#bludit-images-v8-drag-drop {
padding: 20px;
}
#bludit-images-v8-progressbar {
display: none;
margin: 20px;
}
#bludit-images-v8-thumbnails {
max-height: 350px;
overflow: auto;
font-size: 0;
}
/* Bludit Menu v8 */
#bludit-menuV8 {
display: none;
z-index: 1020;
position: absolute;
overflow: hidden;
border: 1px solid #CCC;
background: #FFF;
color: #333;
border-radius: 2px;
list-style-type: none;
padding: 5px;
margin: 0;
}
#bludit-menuV8 li {
padding: 8px 12px;
cursor: pointer;
}
#bludit-menuV8 li:hover {
background-color: #2672ec;
color: #fff;
}
#bludit-menuV8 li i {
margin-right: 10px;
}
/* ----------- BLUDIT QUICK IMAGES ----------- */
#bludit-quick-images {
}
#bludit-quick-images a.moreImages {
margin: 15px 0 0;
width: 100%;
background: #F5F5F5 !important;
color: #555;
}
#bludit-quick-images h4.label {
background: #f8f8f8;
color: #aaa;
padding: 2px 5px;
font-size: 0.9em;
}
#bludit-quick-images-thumbnails {
font-size: 0;
}
#bludit-quick-images .bludit-thumbnail {
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
display: inline-block;
height: auto;
margin: 2px;
padding: 0;
width: 31% !important;
}
/* ----------- BLUDIT COVER IMAGE ----------- */
#bludit-cover-image {
}
#cover-image-thumbnail {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
color: #666;
height: 130px;
padding: 0;
width: 100%;
}
#cover-image-upload {
color: #999;
position: relative;
top: 35%;
}
#cover-image-delete {
background: rgba(255, 255, 255, 0.7);
bottom: 0;
color: #000;
display: none;
font-size: 2.2em;
padding: 4px 10px;
position: absolute;
right: 0;
cursor: pointer;
}
#cover-image-progressbar {
display: none;
left: 5%;
position: relative;
top: 33%;
width: 90%;
}
/* ----------- BLUDIT PROFILE PICTURE ----------- */
#bludit-profile-picture-drag-drop {
width: 100%;
padding: 15px 0;
}
#bludit-profile-picture-progressbar {
display: none;
margin: 15px 0 0;
width: 100%;
}
/* ----------- LOGIN FORM ----------- */
div.login-box > h1 {
font-weight: lighter;
letter-spacing: 4px;
margin-bottom: 50px;
}
div.login-form {
background: #f1f1f1 none repeat scroll 0 0;
padding: 20px;
width: 400px;
}
/* ----------- PLUGIN LIST / THEME LIST ----------- */
tr.plugin-installed,
tr.theme-installed {
background: #F2F7FF !important;
}
div.plugin-name i.settings-icon {
float: right;
margin-top: 3px;
margin-left: 3px;
}
i.incompatible-warning {
color: #FFC425;
padding-right: 5px;
}
div.plugin-links > a {
display: inline-block;
margin-top: 5px;
}
div.plugin-links > span.separator {
color: #ccc;
}
/* ----------- PAGINATOR ----------- */
#paginator {
margin: 30px 0;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
#paginator ul {
list-style-type: none;
margin: 15px 0;
padding: 0;
font-size: 1em;
text-align: left;
}
#paginator li {
display: inline;
margin: 0 5px;
}
#paginator li.disabled {
color: #ccc;
}
#paginator a {
color: #333;
}
/* ----------- PLUGINS FORM ----------- */
#jsformplugin div {
margin-bottom: 15px;
display: table;
width: 100%;
}
#jsformplugin button[type=submit] {
margin-left: 200px;
border-radius: 2px;
padding: 1px 20px;
border: 1px solid rgba(0,0,0,.06);
line-height: 28px;
min-height: 30px;
cursor: pointer;
}
#jsformplugin button[type=submit].left {
margin: 0 5px 0 0;
border-radius: 2px;
padding: 1px 20px;
border: 1px solid rgba(0,0,0,.06);
line-height: 28px;
min-height: 30px;
cursor: pointer;
}
#jsformplugin button[type=submit].blue {
background: #007add !important;
color: #fff;
}
#jsformplugin button[type=submit].small {
font-size: 0.9em;
min-height: 20px;
background: #f5f5f5;
}
#jsformplugin button[type=submit].small:hover {
background: #f2f2f2;
}
#jsformplugin > div > label,
#jsformplugin > div > input[type=text],
#jsformplugin > div > input[type=checkbox],
#jsformplugin > div > textarea,
#jsformplugin > div > select {
display: table-cell;
}
#jsformplugin > div > span.tip {
color: #999;
margin-top: 5px;
font-size: 0.9em;
display: block;
}
#jsformplugin > div > label {
width: 200px;
}
#jsformplugin > div > textarea,
#jsformplugin > div > input[type=text] {
width: 50%;
}
#jsformplugin > div > select {
width: 35%;
}
#jsformplugin > div > textarea {
min-height: 100px;
}
@media (max-width: 960px) {
#jsformplugin div {
display: block;
}
#jsformplugin button[type=submit] {
margin: 0;
}
}

View File

@ -0,0 +1,67 @@
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
html {
background: rgba(250,250,250,1);
background: -moz-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(250,250,250,1)), color-stop(68%, rgba(240,240,240,1)), color-stop(100%, rgba(232,232,232,1)));
background: -webkit-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -o-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -ms-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: linear-gradient(135deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#e8e8e8', GradientType=1 );
}
.uk-form * {
border-radius: 2px !important;
}
input[type="text"],
input[type="password"] {
border-color: #EBEBEB !important;
border-radius: 2px !important;
color: #333;
}
input:disabled {
background: #ccc;
}
.uk-vertical-align-middle {
margin-top: -150px;
}
.uk-panel {
background: #ffffff;
display: block;
margin: 20px 0;
padding: 20px;
position: relative;
text-align: left;
}
/* ----------- BLUDIT ----------- */
h1.title {
font-weight: lighter;
letter-spacing: 4px;
text-transform: uppercase;
}
h3 {
margin-top: 0px !important;
}
.content {
}
#jsshowPassword {
color: #999;
cursor: pointer;
font-size: 1em;
margin-top: 10px;
}
#jscompleteEmail {
cursor: pointer;
text-decoration: underline;
}

View File

@ -0,0 +1,568 @@
.xdsoft_datetimepicker {
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
background: #fff;
border-bottom: 1px solid #bbb;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-top: 1px solid #ccc;
color: #333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 8px;
padding-left: 0;
padding-top: 2px;
position: absolute;
z-index: 9999;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: none;
}
.xdsoft_datetimepicker.xdsoft_rtl {
padding: 8px 0 8px 8px;
}
.xdsoft_datetimepicker iframe {
position: absolute;
left: 0;
top: 0;
width: 75px;
height: 210px;
background: transparent;
border: none;
}
/*For IE8 or lower*/
.xdsoft_datetimepicker button {
border: none !important;
}
.xdsoft_noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.xdsoft_noselect::selection { background: transparent }
.xdsoft_noselect::-moz-selection { background: transparent }
.xdsoft_datetimepicker.xdsoft_inline {
display: inline-block;
position: static;
box-shadow: none;
}
.xdsoft_datetimepicker * {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
margin: 0;
}
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
display: none;
}
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
display: block;
}
.xdsoft_datetimepicker .xdsoft_datepicker {
width: 224px;
float: left;
margin-left: 8px;
}
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker {
float: right;
margin-right: 8px;
margin-left: 0;
}
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
width: 256px;
}
.xdsoft_datetimepicker .xdsoft_timepicker {
width: 58px;
float: left;
text-align: center;
margin-left: 8px;
margin-top: 0;
}
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker {
float: right;
margin-right: 8px;
margin-left: 0;
}
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
margin-top: 8px;
margin-bottom: 3px
}
.xdsoft_datetimepicker .xdsoft_monthpicker {
position: relative;
text-align: center;
}
.xdsoft_datetimepicker .xdsoft_label i,
.xdsoft_datetimepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_today_button {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
}
.xdsoft_datetimepicker .xdsoft_label i {
opacity: 0.5;
background-position: -92px -19px;
display: inline-block;
width: 9px;
height: 20px;
vertical-align: middle;
}
.xdsoft_datetimepicker .xdsoft_prev {
float: left;
background-position: -20px 0;
}
.xdsoft_datetimepicker .xdsoft_today_button {
float: left;
background-position: -70px 0;
margin-left: 5px;
}
.xdsoft_datetimepicker .xdsoft_next {
float: right;
background-position: 0 0;
}
.xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_prev ,
.xdsoft_datetimepicker .xdsoft_today_button {
background-color: transparent;
background-repeat: no-repeat;
border: 0 none;
cursor: pointer;
display: block;
height: 30px;
opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
outline: medium none;
overflow: hidden;
padding: 0;
position: relative;
text-indent: 100%;
white-space: nowrap;
width: 20px;
min-width: 0;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
float: none;
background-position: -40px -15px;
height: 15px;
width: 30px;
display: block;
margin-left: 14px;
margin-top: 7px;
}
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next {
float: none;
margin-left: 0;
margin-right: 14px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
background-position: -40px 0;
margin-bottom: 7px;
margin-top: 0;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
height: 151px;
overflow: hidden;
border-bottom: 1px solid #ddd;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #f5f5f5;
border-top: 1px solid #ddd;
color: #666;
font-size: 12px;
text-align: center;
border-collapse: collapse;
cursor: pointer;
border-bottom-width: 0;
height: 25px;
line-height: 25px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
border-top-width: 0;
}
.xdsoft_datetimepicker .xdsoft_today_button:hover,
.xdsoft_datetimepicker .xdsoft_next:hover,
.xdsoft_datetimepicker .xdsoft_prev:hover {
opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
}
.xdsoft_datetimepicker .xdsoft_label {
display: inline;
position: relative;
z-index: 9999;
margin: 0;
padding: 5px 3px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
background-color: #fff;
float: left;
width: 182px;
text-align: center;
cursor: pointer;
}
.xdsoft_datetimepicker .xdsoft_label:hover>span {
text-decoration: underline;
}
.xdsoft_datetimepicker .xdsoft_label:hover i {
opacity: 1.0;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
border: 1px solid #ccc;
position: absolute;
right: 0;
top: 30px;
z-index: 101;
display: none;
background: #fff;
max-height: 160px;
overflow-y: hidden;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
color: #fff;
background: #ff8000;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
padding: 2px 10px 2px 5px;
text-decoration: none !important;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
background: #33aaff;
box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff;
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_month {
width: 100px;
text-align: right;
}
.xdsoft_datetimepicker .xdsoft_calendar {
clear: both;
}
.xdsoft_datetimepicker .xdsoft_year{
width: 48px;
margin-left: 5px;
}
.xdsoft_datetimepicker .xdsoft_calendar table {
border-collapse: collapse;
width: 100%;
}
.xdsoft_datetimepicker .xdsoft_calendar td > div {
padding-right: 5px;
}
.xdsoft_datetimepicker .xdsoft_calendar th {
height: 25px;
}
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
width: 14.2857142%;
background: #f5f5f5;
border: 1px solid #ddd;
color: #666;
font-size: 12px;
text-align: right;
vertical-align: middle;
padding: 0;
border-collapse: collapse;
cursor: pointer;
height: 25px;
}
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
width: 12.5%;
}
.xdsoft_datetimepicker .xdsoft_calendar th {
background: #f1f1f1;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
color: #33aaff;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
background: #ffe9d2;
box-shadow: #ffb871 0 1px 4px 0 inset;
color: #000;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
background: #c1ffc9;
box-shadow: #00dd1c 0 1px 4px 0 inset;
color: #000;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
background: #33aaff;
box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff;
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
cursor: default;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
opacity: 0.2;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
}
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
color: #fff !important;
background: #ff8000 !important;
box-shadow: none !important;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
background: #33aaff !important;
box-shadow: #178fe5 0 1px 3px 0 inset !important;
color: #fff !important;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
color: inherit !important;
background: inherit !important;
box-shadow: inherit !important;
}
.xdsoft_datetimepicker .xdsoft_calendar th {
font-weight: 700;
text-align: center;
color: #999;
cursor: default;
}
.xdsoft_datetimepicker .xdsoft_copyright {
color: #ccc !important;
font-size: 10px;
clear: both;
float: none;
margin-left: 8px;
}
.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
.xdsoft_time_box {
position: relative;
border: 1px solid #ccc;
}
.xdsoft_scrollbar >.xdsoft_scroller {
background: #ccc !important;
height: 20px;
border-radius: 3px;
}
.xdsoft_scrollbar {
position: absolute;
width: 7px;
right: 0;
top: 0;
bottom: 0;
cursor: pointer;
}
.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar {
left: 0;
right: auto;
}
.xdsoft_scroller_box {
position: relative;
}
.xdsoft_datetimepicker.xdsoft_dark {
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
background: #000;
border-bottom: 1px solid #444;
border-left: 1px solid #333;
border-right: 1px solid #333;
border-top: 1px solid #333;
color: #ccc;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
border-bottom: 1px solid #222;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #0a0a0a;
border-top: 1px solid #222;
color: #999;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
background-color: #000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
border: 1px solid #333;
background: #000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
color: #000;
background: #007fff;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
background: #cc5500;
box-shadow: #b03e00 0 1px 3px 0 inset;
color: #000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0a0a0a;
border: 1px solid #222;
color: #999;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0e0e0e;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
color: #cc5500;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
background: #ffe9d2;
box-shadow: #ffb871 0 1px 4px 0 inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
background: #c1ffc9;
box-shadow: #00dd1c 0 1px 4px 0 inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
background: #cc5500;
box-shadow: #b03e00 0 1px 3px 0 inset;
color: #000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
color: #000 !important;
background: #007fff !important;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
color: #666;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
.xdsoft_dark .xdsoft_time_box {
border: 1px solid #333;
}
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
background: #333 !important;
}
.xdsoft_datetimepicker .xdsoft_save_selected {
display: block;
border: 1px solid #dddddd !important;
margin-top: 5px;
width: 100%;
color: #454551;
font-size: 13px;
}
.xdsoft_datetimepicker .blue-gradient-button {
font-family: "museo-sans", "Book Antiqua", sans-serif;
font-size: 12px;
font-weight: 300;
color: #82878c;
height: 28px;
position: relative;
padding: 4px 17px 4px 33px;
border: 1px solid #d7d8da;
background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
/* IE10+ */
background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
/* IE6-9 */
}
.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
color: #454551;
background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* Opera 11.10+ */
background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
/* IE10+ */
background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
/* IE6-9 */
}

View File

@ -0,0 +1,58 @@
/* ----------- UIKIT HACKs FOR BLUDIT ----------- */
html {
background: rgba(250,250,250,1);
background: -moz-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(250,250,250,1)), color-stop(68%, rgba(240,240,240,1)), color-stop(100%, rgba(232,232,232,1)));
background: -webkit-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -o-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: -ms-linear-gradient(-45deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
background: linear-gradient(135deg, rgba(250,250,250,1) 0%, rgba(240,240,240,1) 68%, rgba(232,232,232,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#e8e8e8', GradientType=1 );
}
* {
border-radius: 2px !important;
}
input[type="text"],
input[type="password"] {
border-color: #EBEBEB !important;
border-radius: 2px !important;
color: #333;
}
.uk-alert {
padding: 22px 0 !important;
}
/* ----------- BLUDIT ----------- */
div.login-box {
width: 400px;
max-width: calc(100% - 40px);
}
div.login-box > h1 {
font-weight: lighter;
letter-spacing: 4px;
margin-bottom: 50px;
margin-top: -100px;
}
div.login-form {
text-align: left;
}
div.login-form > h2 {
color: #777;
margin-bottom: 30px;
}
a.login-email {
border: 0;
color: #777;
display: block;
margin: 20px 0;
padding: 0;
text-align: left;
}

View File

@ -0,0 +1,2 @@
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}

View File

@ -0,0 +1,2 @@
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}*+.uk-placeholder{margin-top:15px}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}

View File

@ -0,0 +1,2 @@
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="pattern-0" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse" viewBox="0 0 100 100">
<path d="M 0 0 L 50 0 L 50 100 L 0 100 Z" style="fill: black;"/>
</pattern>
</defs>
<path style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-miterlimit: 4; stroke-dasharray: none; stroke-width: 24.1239;" d="M 145.686 14.63 C 141.613 8.89 130.833 68.155 113.248 128.344 C 108.415 144.89 115.288 161.582 117.782 176.059 C 121.971 183.412 126.134 194.145 129.663 207.523 C 130.852 212.029 131.89 216.619 132.816 221.212 C 123.039 245.985 117.522 274.055 117.522 303.808 C 117.522 331.213 122.224 357.181 130.601 380.471 C 146.382 392.392 161.695 409.741 174.269 431.302 C 180.153 441.39 185.014 451.718 188.888 461.98 C 209.024 476.655 232.243 485.043 256.97 485.043 C 280.324 485.043 302.327 477.571 321.665 464.381 C 325.671 453.331 330.362 441.894 337.169 431.302 C 350.642 410.34 367.256 390.2 384.224 378 C 395.979 359.286 397.512 331.335 396.418 303.808 C 395.283 275.244 391.314 248.191 382.244 224.145 C 383.028 218.304 384.004 212.46 385.214 206.717 C 388.261 192.245 392.179 180.77 396.288 173.244 C 397.911 159.088 403.396 142.737 398.19 126.913 C 377.42 63.769 380.058 117.247 374.011 122.306 C 366.364 128.705 325.935 65.939 327.529 128.344 C 327.702 135.15 328.069 141.8 328.596 148.266 C 307.662 131.942 282.324 152.098 256.136 152.098 C 229.291 152.098 205.058 132.425 183.779 149.512 C 184.059 142.203 184.108 134.65 183.911 126.913 C 182.317 64.508 171.016 50.32 145.686 14.63 Z" id="path2987"/>
<path id="path3763" d="M 256.314 390.825 C 246.312 390.825 223.405 410.421 223.405 423.826 C 223.405 427.497 224.537 430.973 226.554 434.092 C 230.352 435.689 234.037 438.012 237.065 440.902 C 238.481 442.253 239.65 443.635 240.582 445.009 C 245.429 446.974 251.018 448.098 256.97 448.098 C 262.593 448.098 267.889 447.097 272.542 445.33 C 273.509 443.851 274.748 442.358 276.274 440.902 C 279.518 437.806 283.517 435.361 287.6 433.762 C 289.485 430.731 290.537 427.367 290.537 423.826 C 290.537 410.421 266.971 390.825 256.314 390.825 Z" style="fill: rgb(0, 0, 0); stroke: rgb(0, 0, 0); stroke-miterlimit: 4; stroke-dasharray: none; stroke-width: 24.1239;"/>
<path style="fill: rgb(0, 0, 0); stroke: rgb(0, 0, 0); stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-width: 24.1239;" d="M 228.658 314.39 C 264.037 255.967 201.722 177.034 170.636 242.749 C 156.716 272.177 189.433 341.163 228.658 314.39 Z" id="path3779"/>
<path style="fill: rgb(0, 0, 0); stroke: rgb(0, 0, 0); stroke-miterlimit: 4; stroke-width: 18;" d="M 323.461 270.414 C 323.461 276.224 318.143 280.937 311.582 280.937 C 305.022 280.937 299.702 276.224 299.702 270.414 C 299.702 264.6 305.022 259.888 311.582 259.888 C 318.143 259.888 323.461 264.6 323.461 270.414 Z" id="path3785"/>
<path style="stroke: rgb(0, 0, 0); stroke-miterlimit: 4; fill: rgb(255, 255, 255); stroke-width: 24.1239;" d="M 232.976 268.819 C 232.976 284.42 220.013 297.069 204.021 297.069 C 188.032 297.069 175.068 284.42 175.068 268.819 C 175.068 253.21 188.032 240.565 204.021 240.565 C 220.013 240.565 232.976 253.21 232.976 268.819 Z" id="path-1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,174 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="<?php echo CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex,nofollow">
<title><?php echo $layout['title'] ?></title>
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/uikit.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/upload.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/form-file.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/placeholder.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/progress.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/default.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/jquery.datetimepicker.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_CORE_CSS.'font-awesome/css/font-awesome.min.css?version='.BLUDIT_VERSION ?>">
<!-- Javascript -->
<script charset="utf-8" src="<?php echo HTML_PATH_CORE_JS.'jquery.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/uikit.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/upload.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/jquery.datetimepicker.js?version='.BLUDIT_VERSION ?>"></script>
<!-- Plugins -->
<?php Theme::plugins('adminHead') ?>
</head>
<body>
<!-- Plugins -->
<?php Theme::plugins('adminBodyBegin') ?>
<!-- Alert -->
<script>
$(document).ready(function() {
<?php
if( Alert::defined() ) {
echo '$("#alert").slideDown().delay(3500).slideUp();';
}
?>
$(window).click(function() {
$("#alert").hide();
});
});
</script>
<div id="alert" class="<?php echo (Alert::status()==ALERT_STATUS_OK)?'alert-ok':'alert-fail'; ?>">
<?php Alert::p() ?>
</div>
<!-- Offcanvas for Mobile -->
<a href="#offcanvas" class="uk-navbar-toggle uk-hidden-large" data-uk-offcanvas></a>
<div id="offcanvas" class="uk-offcanvas">
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-offcanvas">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><?php $L->p('New content') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><?php $L->p('Manage content') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Manage categories') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Manage users') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('General settings') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><?php $L->p('Advanced settings') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><?php $L->p('Language') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="bl-navbar-bg">
<nav id="bl-navbar">
<img id="bludit-logo" class="logo" src="<?php echo HTML_PATH_ADMIN_THEME ?>img/logo.svg" />
<span class="bl-brand">BLUDIT</span>
<div class="bl-navbar-right">
<?php $L->p('Welcome') ?> <?php echo $Login->username() ?> -
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><?php $L->p('Logout') ?></a>
</div>
</nav>
</div>
<div id="bl-container">
<div class="uk-grid uk-grid-small">
<div id="bl-sidebar" class="uk-width-1-4 uk-visible-large">
<ul class="uk-nav">
<li <?php echo ($layout['view']=='dashboard')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a>
</li>
<li>
<a target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><?php $L->p('Website') ?></a>
</li>
<li class="uk-nav-header"><?php $L->p('Publish') ?></li>
<li <?php echo ($layout['view']=='new-content')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><?php $L->p('New content') ?></a>
</li>
<li class="uk-nav-header"><?php $L->p('Manage') ?></li>
<li <?php echo ($layout['view']=='content')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><?php $L->p('Content') ?></a>
</li>
<?php if($Login->role() == 'admin') { ?>
<li <?php echo ($layout['view']=='categories')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>
</li>
<li <?php echo ($layout['view']=='users')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Users') ?></a>
</li>
<li class="uk-nav-header"><?php $L->p('Settings') ?></li>
<li <?php echo ($layout['view']=='settings-general')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-general' ?>"><?php $L->p('General') ?></a>
</li>
<li <?php echo ($layout['view']=='settings-advanced')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-advanced' ?>"><?php $L->p('Advanced') ?></a>
</li>
<li <?php echo ($layout['view']=='settings-regional')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'settings-regional' ?>"><?php $L->p('Language') ?></a>
</li>
<li <?php echo ($layout['view']=='plugins')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>"><?php $L->p('Plugins') ?></a>
</li>
<li <?php echo ($layout['view']=='themes')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>"><?php $L->p('Themes') ?></a>
</li>
<li <?php echo ($layout['view']=='about')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a>
</li>
<?php } ?>
</ul>
</div>
<div id="bl-view" class="uk-width-3-4">
<?php
if( Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php') ) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
} else {
echo '<h1 style="width:100%; text-align:center">'.$L->g('Page not found').'</h1>';
echo '<h2 style="width:100%; text-align:center">'.$L->g('Have you seen my ball').'</h2>';
}
?>
</div>
</div>
<script>
$( "#bludit-logo" ).dblclick(function() {
alert( "Hey! what are you doing ?" );
});
</script>
<!-- Javascript -->
<?php include(PATH_JS.'functions.php') ?>
<!-- Plugins -->
<?php Theme::plugins('adminBodyEnd') ?>
</body>
</html>

View File

@ -0,0 +1,429 @@
<?php
class HTML {
// Returns HTML and Javascript code for the box TAGs when you create/edit content
public static function tags($args) {
global $L;
// Javascript
$javascript = '<script>';
$javascript .= file_get_contents(PATH_JS.'bludit-tags.js', true);
$javascript .= '</script>';
// HTML
$html = '<div id="bludit-tags" class="uk-form-row">';
$html .= ' <input type="hidden" id="jstags" name="tags" value="">';
$html .= ' <label for="jstagInput" class="uk-form-label">'.$args['label'].'</label>';
$html .= ' <div class="uk-form-controls">';
$html .= ' <input id="jstagInput" type="text" class="uk-width-1-1" autocomplete="off">';
$html .= ' <button id="jstagAdd" class="uk-button">'.$L->g('Add').'</button>';
$html .= ' <div id="jstagList">';
foreach ($args['allTags'] as $tag) {
$html .= ' <span data-tag="'.$tag.'" class="'.( in_array($tag, $args['selectedTags'])?'select':'unselect' ).'">'.$tag.'</span>';
}
$html .= ' </div>';
$html .= ' </div>';
$html .= '</div>';
echo $html.$javascript;
}
public static function title($args)
{
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
$html = '<h2 class="title" '.$id.'><i class="uk-icon-'.$args['icon'].'"></i> '.$args['title'].'</h2>';
echo $html;
}
public static function formOpen($args)
{
$class = empty($args['class']) ? '' : ' '.$args['class'];
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
$html = '<form class="uk-form'.$class.'" '.$id.' method="post" action="" autocomplete="off">';
echo $html;
}
public static function formClose()
{
$html = '</form>';
$script = '<script>
$(document).ready(function() {
// Prevent the form submit when press enter key.
$("form").keypress(function(e) {
if( (e.which == 13) && (e.target.type !== "textarea") ) {
return false;
}
});
});
</script>';
echo $html.$script;
}
// label, name, value, tip
public static function formInputText($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '<div class="uk-form-row">';
if(!empty($args['label'])) {
$html .= '<label for="'.$id.'" class="uk-form-label">'.$args['label'].'</label>';
}
$html .= '<div class="uk-form-controls">';
$html .= '<input id="'.$id.'" name="'.$args['name'].'" type="'.$type.'" '.$class.' '.$placeholder.' autocomplete="off" '.$disabled.' value="'.$args['value'].'">';
if(!empty($args['tip'])) {
$html .= '<p class="uk-form-help-block">'.$args['tip'].'</p>';
}
$html .= '</div>';
$html .= '</div>';
echo $html;
}
// label, name, value, tip
public static function formInputRadio($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '<div class="uk-form-row">';
$html .= '<div class="uk-form-controls">';
$html .= '<label for="'.$id.'" class="uk-form-label">';
$html .= '<input id="'.$id.'" name="'.$args['name'].'" type="'.$type.'" '.$class.' '.$placeholder.' autocomplete="off" '.$disabled.' value="'.$args['value'].'">';
$html .= $args['label'].'</label>';
if(!empty($args['tip'])) {
$html .= '<p class="uk-form-help-block">'.$args['tip'].'</p>';
}
$html .= '</div>';
$html .= '</div>';
echo $html;
}
public static function formInputPassword($args)
{
$args['type'] = 'password';
self::formInputText($args);
}
public static function formTextarea($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$placeholder = empty($args['placeholder']) ? '' : 'placeholder="'.$args['placeholder'].'"';
$rows = empty($args['rows']) ? '' : 'rows="'.$args['rows'].'"';
$html = '<div class="uk-form-row">';
if(!empty($args['label'])) {
$html .= '<label for="'.$id.'" class="uk-form-label">'.$args['label'].'</label>';
}
$html .= '<div class="uk-form-controls">';
$html .= '<textarea id="'.$id.'" name="'.$args['name'].'" '.$class.' '.$placeholder.' '.$rows.'>'.$args['value'].'</textarea>';
if(!empty($args['tip'])) {
$html .= '<p class="uk-form-help-block">'.$args['tip'].'</p>';
}
$html .= '</div>';
$html .= '</div>';
echo $html;
}
public static function formSelect($args)
{
$id = 'js'.$args['name'];
$type = isset($args['type']) ? $args['type'] : 'text';
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$disabled = empty($args['disabled']) ? '' : 'disabled';
$html = '<div class="uk-form-row">';
$html .= '<label for="'.$id.'" class="uk-form-label">'.$args['label'].'</label>';
$html .= '<div class="uk-form-controls">';
$html .= '<select id="'.$id.'" name="'.$args['name'].'" '.$class.' '.$disabled.'>';
if(isset($args['addEmptySpace'])) {
$html .= '<option value=""></option>';
}
foreach($args['options'] as $key=>$value) {
$html .= '<option value="'.$key.'"'.( ($args['selected']==$key)?' selected="selected"':'').'>'.$value.'</option>';
}
$html .= '</select>';
$html .= '<p class="uk-form-help-block">'.$args['tip'].'</p>';
$html .= '</div>';
$html .= '</div>';
echo $html;
}
public static function formInputHidden($args)
{
$id = 'js'.$args['name'];
$html = '<input type="hidden" id="'.$id.'" name="'.$args['name'].'" value="'.$args['value'].'">';
echo $html;
}
public static function legend($args)
{
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
$html = '<legend '.$class.'>'.$args['value'].'</legend>';
echo $html;
}
public static function bluditQuickImages()
{
// Javascript code
include(PATH_JS.'bludit-quick-images.js');
global $L;
$html = '<!-- BLUDIT QUICK IMAGES -->';
$html .= '
<div id="bludit-quick-images">
<div id="bludit-quick-images-thumbnails" onmousedown="return false">
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true);
array_splice($thumbnailList, THUMBNAILS_AMOUNT);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '<img class="bludit-thumbnail" data-filename="'.$filename.'" src="'.HTML_PATH_UPLOADS_THUMBNAILS.$filename.'" alt="Thumbnail">';
}
$html .= '
</div>
';
$html .= '<div class="empty-images uk-block uk-text-center uk-block-muted" '.( !empty($thumbnailList)?'style="display:none"':'' ).'>'.$L->g('There are no images').'</div>';
$html .= '
<a data-uk-modal href="#bludit-images-v8" class="moreImages uk-button">'.$L->g('Upload and More Images').'</a>
</div>
';
echo $html;
}
public static function bluditCoverImage($coverImage="")
{
global $L;
// Javascript code
include(PATH_JS.'bludit-cover-image.js');
$style = '';
if(!empty($coverImage)) {
$style = 'background-image: url('.HTML_PATH_UPLOADS_THUMBNAILS.$coverImage.')';
}
$html = '<!-- BLUDIT COVER IMAGE -->';
$html .= '
<div id="bludit-cover-image">
<div id="cover-image-thumbnail" class="uk-form-file uk-placeholder uk-text-center" style="'.$style.'">
<input type="hidden" name="coverImage" id="cover-image-upload-filename" value="'.$coverImage.'">
<div id="cover-image-upload" '.( empty($coverImage)?'':'style="display: none;"' ).'>
<div><i class="uk-icon-picture-o"></i> '.$L->g('Cover image').'</div>
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="cover-image-file-select" type="file"></div>
</div>
<div id="cover-image-delete" '.( empty($coverImage)?'':'style="display: block;"' ).'>
<div><i class="uk-icon-trash-o"></i></div>
</div>
<div id="cover-image-progressbar" class="uk-progress">
<div class="uk-progress-bar" style="width: 0%;">0%</div>
</div>
</div>
</div>
';
echo $html;
}
public static function bluditMenuV8()
{
// Javascript code
include(PATH_JS.'bludit-menu-v8.js');
global $L;
$html = '<!-- BLUDIT MENU V8 -->';
$html .= '
<ul id="bludit-menuV8">
<li id="bludit-menuV8-insert"><i class="uk-icon-plus"></i>'.$L->g('Insert image').'</li>
<li id="bludit-menuV8-cover"><i class="uk-icon-picture-o"></i>'.$L->g('Set as cover image').'</li>
<li id="bludit-menuV8-delete"><i class="uk-icon-trash"></i>'.$L->g('Delete image').'</li>
</ul>
';
echo $html;
}
public static function bluditImagesV8()
{
global $L;
// Javascript code
include(PATH_JS.'bludit-images-v8.js');
$html = '<!-- BLUDIT IMAGES V8 -->';
$html .= '
<div id="bludit-images-v8" class="uk-modal">
<div class="uk-modal-dialog">
<div id="bludit-images-v8-upload" class="uk-form-file uk-placeholder uk-text-center">
<div id="bludit-images-v8-drag-drop">
<div><i class="uk-icon-picture-o"></i> '.$L->g('Upload image').'</div>
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="bludit-images-v8-file-select" type="file"></div>
</div>
<div id="bludit-images-v8-progressbar" class="uk-progress">
<div class="uk-progress-bar" style="width: 0%;">0%</div>
</div>
</div>
<div id="bludit-images-v8-thumbnails">
';
$thumbnailList = Filesystem::listFiles(PATH_UPLOADS_THUMBNAILS,'*','*',true);
foreach($thumbnailList as $file) {
$filename = basename($file);
$html .= '<img class="bludit-thumbnail" src="'.HTML_PATH_UPLOADS_THUMBNAILS.$filename.'" data-filename="'.$filename.'" alt="Thumbnail">';
}
$html .= '
</div>
';
$html .= '<div class="empty-images uk-block uk-text-center uk-block-muted" '.( !empty($thumbnailList)?'style="display:none"':'' ).'>'.$L->g('There are no images').'</div>';
$html .= '
<div class="uk-modal-footer">
'.$L->g('Click on the image for options').' <a href="" class="uk-modal-close">'.$L->g('Click here to cancel').'</a>
</div>
</div>
</div>
';
echo $html;
}
public static function profileUploader($username)
{
global $L;
$html = '<!-- BLUDIT PROFILE UPLOADER -->';
$html .= '
<div id="bludit-profile-picture">
<div id="bludit-profile-picture-image">';
if(file_exists(PATH_UPLOADS_PROFILES.$username.'.png')) {
$html .= '<img class="uk-border-rounded" src="'.HTML_PATH_UPLOADS_PROFILES.$username.'.png" alt="Profile picture">';
}
else {
$html .= '<div class="uk-block uk-border-rounded uk-block-muted uk-block-large">'.$L->g('Profile picture').'</div>';
}
$html .= '
</div>
<div id="bludit-profile-picture-progressbar" class="uk-progress">
<div class="uk-progress-bar" style="width: 0%;">0%</div>
</div>
<div id="bludit-profile-picture-drag-drop" class="uk-form-file uk-placeholder uk-text-center">
<div>'.$L->g('Upload image').'</div>
<div style="font-size:0.8em;">'.$L->g('Drag and drop or click here').'<input id="bludit-profile-picture-file-select" type="file"></div>
</div>
</div>
';
$script = '
<script>
$(document).ready(function() {
var settings =
{
type: "json",
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
allow : "*.(jpg|jpeg|gif|png)",
params: {"tokenCSRF":tokenCSRF, "type":"profilePicture", "username":"'.$username.'"},
loadstart: function() {
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "0%").text("0%");
$("#bludit-profile-picture-progressbar").show();
},
progress: function(percent) {
percent = Math.ceil(percent);
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", percent+"%").text(percent+"%");
},
allcomplete: function(response) {
$("#bludit-profile-picture-progressbar").find(".uk-progress-bar").css("width", "100%").text("100%");
$("#bludit-profile-picture-progressbar").hide();
$("#bludit-profile-picture-image").html("<img class=\"uk-border-rounded\" src=\"'.HTML_PATH_UPLOADS_PROFILES.$username.'.png?time='.time().'\">");
},
notallowed: function(file, settings) {
alert("'.$L->g('Supported image file types').' "+settings.allow);
}
};
UIkit.uploadSelect($("#bludit-profile-picture-file-select"), settings);
UIkit.uploadDrop($("#bludit-profile-picture-drag-drop"), settings);
});
</script>
';
echo $html.$script;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
!function(e){var t;window.UIkit2&&(t=e(UIkit2)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit2)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json");for(var s in n.headers)a.setRequestHeader(s,n.headers[s]);a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.originalEvent.dataTransfer&&n.originalEvent.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.originalEvent.dataTransfer.files]),t(n.originalEvent.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,headers:{},before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});

View File

@ -0,0 +1,49 @@
<!DOCTYPE HTML>
<html class="uk-height-1-1 uk-notouch">
<head>
<meta charset="<?php echo CHARSET ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex,nofollow">
<title>Bludit</title>
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/uikit/uikit.almost-flat.min.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_ADMIN_THEME.'css/login.css?version='.BLUDIT_VERSION ?>">
<link rel="stylesheet" type="text/css" href="<?php echo HTML_PATH_CORE_CSS.'font-awesome/css/font-awesome.min.css?version='.BLUDIT_VERSION ?>">
<!-- Javascript -->
<script charset="utf-8" src="<?php echo HTML_PATH_CORE_JS.'jquery.min.js?version='.BLUDIT_VERSION ?>"></script>
<script charset="utf-8" src="<?php echo HTML_PATH_ADMIN_THEME.'js/uikit/uikit.min.js?version='.BLUDIT_VERSION ?>"></script>
<!-- Plugins -->
<?php Theme::plugins('loginHead') ?>
</head>
<body class="uk-height-1-1">
<!-- Plugins -->
<?php Theme::plugins('loginBodyBegin') ?>
<div class="uk-vertical-align uk-text-center uk-height-1-1">
<div class="uk-vertical-align-middle login-box">
<h1>BLUDIT</h1>
<?php
if (Alert::defined()) {
echo '<div class="uk-alert uk-alert-danger">'.Alert::get().'</div>';
}
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
}
?>
</div>
</div>
<!-- Plugins -->
<?php Theme::plugins('loginBodyEnd') ?>
</body>
</html>

View File

@ -0,0 +1,42 @@
<?php
HTML::title(array('title'=>$L->g('About'), 'icon'=>'support'));
echo '
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th class="uk-width-1-5"></th>
<th class="uk-width-3-5"></th>
</tr>
</thead>
<tbody>
';
echo '<tr>';
echo '<td>Bludit Edition</td>';
if (defined('BLUDIT_PRO')) {
echo '<td>PRO - '.$L->g('Thanks for support Bludit').'</td>';
} else {
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
}
echo '</tr>';
echo '<tr>';
echo '<td>Bludit Version</td>';
echo '<td>'.BLUDIT_VERSION.'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>Bludit Codename</td>';
echo '<td>'.BLUDIT_CODENAME.'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>Bludit Build Number</td>';
echo '<td>'.BLUDIT_BUILD.'</td>';
echo '</tr>';
echo '
</tbody>
</table>
';

View File

@ -0,0 +1,60 @@
<?php
HTML::title(array('title'=>$L->g('Add a new user'), 'icon'=>'user-plus'));
HTML::formOpen(array('id'=>'add-user-form', 'class'=>'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$Security->getTokenCSRF()
));
HTML::formInputText(array(
'name'=>'new_username',
'label'=>$L->g('Username'),
'value'=>(isset($_POST['new_username'])?$_POST['new_username']:''),
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'new_password',
'label'=>$L->g('Password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formInputPassword(array(
'name'=>'confirm_password',
'label'=>$L->g('Confirm Password'),
'value'=>'',
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
HTML::formSelect(array(
'name'=>'role',
'label'=>$L->g('Role'),
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
'selected'=>'editor',
'tip'=>''
));
HTML::formInputText(array(
'name'=>'email',
'label'=>$L->g('Email'),
'value'=>(isset($_POST['email'])?$_POST['email']:''),
'class'=>'uk-width-1-2 uk-form-medium',
'tip'=>''
));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">'.$L->g('Save').'</button>
<a href="'.HTML_PATH_ADMIN_ROOT.'users" class="uk-button">'.$L->g('Cancel').'</a>
</div>
</div>';
HTML::formClose();

View File

@ -0,0 +1,30 @@
<?php
HTML::title(array('title'=>$L->g('Categories'), 'icon'=>'tag'));
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'new-category"><i class="uk-icon-plus"></i> '.$L->g('Add a new category').'</a>';
echo '
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th>'.$L->g('Name').'</th>
<th>'.$L->g('URL').'</th>
</tr>
</thead>
<tbody>
';
$categories = $dbCategories->getKeyNameArray();
foreach($categories as $categoryKey=>$category)
{
echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$categoryKey.'">'.$category.'</a></td>';
echo '<td><a href="'.DOMAIN_CATEGORIES.$categoryKey.'">'.$Url->filters('category', false).$categoryKey.'</a></td>';
echo '</tr>';
}
echo '
</tbody>
</table>
';

Some files were not shown because too many files have changed in this diff Show More