wordpress config + law-/live- carta themes

This commit is contained in:
Andrey Morgachev
2018-08-16 09:55:53 +03:00
commit 3b5be35fe8
65 changed files with 5457 additions and 0 deletions

26
.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
!htdocs/
htdocs/*
!htdocs/wp-content/
!htdocs/wp-config.php
!htdocs/wp-config-local-sample.php
htdocs/wp-content/*
!htdocs/wp-content/mu-plugins/
!htdocs/wp-content/plugins/
!htdocs/wp-content/themes/
!htdocs/wp-content/index.php
!htdocs/wp-content/sunrise.php
htdocs/wp-content/mu-plugins/*
!htdocs/wp-content/mu-plugins/domain_mapping.php
htdocs/wp-content/plugins/*
!htdocs/wp-content/plugins/index.php
htdocs/wp-content/themes/*
!htdocs/wp-content/themes/lawcarta
!htdocs/wp-content/themes/livecarta
!htdocs/wp-content/themes/index.php
vendor/

29
composer.json Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "lawcarta/wordpress",
"description": "LawCarta WordPress Site",
"require": {
"wpackagist-plugin/svg-support": "~2.3.15",
"wpackagist-plugin/toggle-wpautop": "~1.2.5",
"wpackagist-plugin/tinymce-advanced": "~4.8.0",
"wpackagist-plugin/contact-form-7": "~5.0.3",
"wpackagist-plugin/flamingo": "~1.9",
"wpackagist-plugin/really-simple-captcha": "~2.0.1",
"wpackagist-plugin/enhanced-media-library": "~2.6.4"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"extra": {
"installer-paths": {
"htdocs/wp-content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"htdocs/wp-content/themes/{$name}/": [
"type:wordpress-theme"
]
}
}
}

278
composer.lock generated Normal file
View File

@@ -0,0 +1,278 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8f1b0c2c233bc65a8beacc1f7117be9d",
"packages": [
{
"name": "composer/installers",
"version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
"reference": "049797d727261bf27f2690430d935067710049c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2",
"reference": "049797d727261bf27f2690430d935067710049c2",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0"
},
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
},
"require-dev": {
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "^4.8.36"
},
"type": "composer-plugin",
"extra": {
"class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Installers\\": "src/Composer/Installers"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kyle Robinson Young",
"email": "kyle@dontkry.com",
"homepage": "https://github.com/shama"
}
],
"description": "A multi-framework Composer library installer",
"homepage": "https://composer.github.io/installers/",
"keywords": [
"Craft",
"Dolibarr",
"Eliasis",
"Hurad",
"ImageCMS",
"Kanboard",
"Lan Management System",
"MODX Evo",
"Mautic",
"Maya",
"OXID",
"Plentymarkets",
"Porto",
"RadPHP",
"SMF",
"Thelia",
"WolfCMS",
"agl",
"aimeos",
"annotatecms",
"attogram",
"bitrix",
"cakephp",
"chef",
"cockpit",
"codeigniter",
"concrete5",
"croogo",
"dokuwiki",
"drupal",
"eZ Platform",
"elgg",
"expressionengine",
"fuelphp",
"grav",
"installer",
"itop",
"joomla",
"kohana",
"laravel",
"lavalite",
"lithium",
"magento",
"majima",
"mako",
"mediawiki",
"modulework",
"modx",
"moodle",
"osclass",
"phpbb",
"piwik",
"ppi",
"puppet",
"pxcms",
"reindex",
"roundcube",
"shopware",
"silverstripe",
"sydes",
"symfony",
"typo3",
"wordpress",
"yawik",
"zend",
"zikula"
],
"time": "2017-12-29T09:13:20+00:00"
},
{
"name": "wpackagist-plugin/contact-form-7",
"version": "5.0.3",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/contact-form-7/",
"reference": "tags/5.0.3"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/contact-form-7.5.0.3.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/contact-form-7/"
},
{
"name": "wpackagist-plugin/enhanced-media-library",
"version": "2.6.4",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/enhanced-media-library/",
"reference": "tags/2.6.4"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/enhanced-media-library.2.6.4.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/enhanced-media-library/"
},
{
"name": "wpackagist-plugin/flamingo",
"version": "1.9",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/flamingo/",
"reference": "tags/1.9"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/flamingo.1.9.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/flamingo/"
},
{
"name": "wpackagist-plugin/really-simple-captcha",
"version": "2.0.1",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/really-simple-captcha/",
"reference": "tags/2.0.1"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/really-simple-captcha.2.0.1.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/really-simple-captcha/"
},
{
"name": "wpackagist-plugin/svg-support",
"version": "2.3.15",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/svg-support/",
"reference": "tags/2.3.15"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/svg-support.2.3.15.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/svg-support/"
},
{
"name": "wpackagist-plugin/tinymce-advanced",
"version": "4.8.0",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/tinymce-advanced/",
"reference": "tags/4.8.0"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/tinymce-advanced.4.8.0.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/tinymce-advanced/"
},
{
"name": "wpackagist-plugin/toggle-wpautop",
"version": "1.2.5",
"source": {
"type": "svn",
"url": "https://plugins.svn.wordpress.org/toggle-wpautop/",
"reference": "tags/1.2.5"
},
"dist": {
"type": "zip",
"url": "https://downloads.wordpress.org/plugin/toggle-wpautop.1.2.5.zip",
"reference": null,
"shasum": null
},
"require": {
"composer/installers": "~1.0"
},
"type": "wordpress-plugin",
"homepage": "https://wordpress.org/plugins/toggle-wpautop/"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}

1
devops/.env.sample Normal file
View File

@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=lawcarta_wp

4
devops/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/storage/
.env
docker-compose.override.yml
*.sql

45
devops/docker-compose.yml Normal file
View File

@@ -0,0 +1,45 @@
version: '3'
services:
mysql:
image: mysql:5.7
volumes:
- "./storage/mysql:/var/lib/mysql"
- "./storage/logs/mysql:/var/log/mysql"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-pass4dev}
- MYSQL_DATABASE=${MYSQL_DATABASE:-db4dev}
- MYSQL_USER=${MYSQL_USER:-user4dev}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-pass4dev}
restart: always
php_fpm:
build:
context: ./php_fpm
depends_on:
- mysql
volumes:
- "../htdocs/wp-content:/var/www/html/wp-content"
- "../htdocs/wp-config.php:/var/www/html/wp-config.php"
- "htdocs:/var/www/html"
environment:
- DB_NAME=${DB_NAME:-db4dev}
- DB_USER=${DB_USER:-user4dev}
- DB_PASSWORD=${DB_PASSWORD:-pass4dev}
- DB_HOST=${DB_HOST:-mysql}
restart: always
nginx:
image: nginx:1.15-alpine
depends_on:
- php_fpm
volumes:
- "./nginx/nginx.conf:/etc/nginx/nginx.conf:ro"
- "./storage/logs/nginx:/var/log/nginx"
- "../htdocs/wp-content:/var/www/html/wp-content"
- "../htdocs/wp-config.php:/var/www/html/wp-config.php:ro"
- "htdocs:/var/www/html"
restart: always
volumes:
htdocs:

63
devops/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,63 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
client_max_body_size 10m;
server {
listen 80;
server_name lawcarta.loc livecarta.loc;
root /var/www/html;
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass php_fpm:9000;
}
}
}

View File

@@ -0,0 +1,8 @@
FROM wordpress:4.9-fpm
RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr/include \
&& docker-php-ext-install gd

View File

@@ -0,0 +1,8 @@
<?php
define( 'DB_NAME', 'local_db_name' );
define( 'DB_USER', 'local_db_user' );
define( 'DB_PASSWORD', 'local_db_password' );
define( 'DB_HOST', 'local_db_host' );
define('DOMAIN_CURRENT_SITE', 'local_domain_current_site');

78
htdocs/wp-config.php Normal file
View File

@@ -0,0 +1,78 @@
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
} else {
define('DB_NAME', getenv('DB_NAME'));
define('DB_USER', getenv('DB_USER'));
define('DB_PASSWORD', getenv('DB_PASSWORD'));
define('DB_HOST', getenv('DB_HOST'));
define('WP_LOCAL_DEV', true);
define('WP_DEBUG', true);
define('DOMAIN_CURRENT_SITE', 'lawcarta.loc');
}
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
/** Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('SUNRISE', 'on');
/**
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'i*V4B`A#NWjOUQu->3vSB@zE1#gtH4#02;1q,t[Wzd%1C&$K+-k2yXFz-r3LSR<#');
define('SECURE_AUTH_KEY', ':*S8U~Xl~`+QUWMxDp%1e?7`:-nt9Ccz@.d0o Y/)LRJCls&r[:zl]+NeUxu1V|v');
define('LOGGED_IN_KEY', 'GG&iWQx&fPj6Q]lx*Ts1F!QNKV:qVVRS&Y-P/-NN!|4wrz:_*EQcXIuy};piV|-e');
define('NONCE_KEY', '|kLD9iG,F/kw,225&|VZNH(VoE[&{EDQkb7YA0h<{N`2}I7 }=8qdGl&OeD[UzBk');
define('AUTH_SALT', '2TMhC58*(LTTaPdK8:hWl6+yCV-]p%M-*HN$]:HZ7,y|P3ew-$D( i}.|r+<VXH|');
define('SECURE_AUTH_SALT', '?~*:ck|!M_@:CV- )quHp50vcN<;72q*j5u+YD%3DpM.-L/p|3QYQP|N/78KKmSo');
define('LOGGED_IN_SALT', '1X?t.RE+q@V?X*0PxOxwzehc)_vTk,y/nc5;bWXBD|H6UFM5OiWS6X[]i|vg}Au8');
define('NONCE_SALT', '3!Fc.@gSB}&Q2lr[HRx^K}+p[wx!RaC496P ^U/fsgcP_>QCOVoicd@234)D$L/5');
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,840 @@
<?php
/*
Plugin Name: WordPress MU Domain Mapping
Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/
Description: Map any blog on a WordPress website to another domain.
Version: 0.5.5.1
Author: Donncha O Caoimh
Author URI: http://ocaoimh.ie/
*/
/* Copyright Donncha O Caoimh (http://ocaoimh.ie/)
With contributions by Ron Rennick(http://wpmututorials.com/), Greg Sidberry and others.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
function dm_text_domain() {
load_plugin_textdomain( 'wordpress-mu-domain-mapping', basename( dirname( __FILE__ ) ) . 'languages', 'wordpress-mu-domain-mapping/languages' );
}
add_action( 'init', 'dm_text_domain' );
function domain_mapping_warning() {
echo "<div id='domain-mapping-warning' class='updated fade'><p><strong>".__( 'Domain Mapping Disabled.', 'wordpress-mu-domain-mapping' )."</strong> ".sprintf(__('You must <a href="%1$s">create a network</a> for it to work.', 'wordpress-mu-domain-mapping' ), "http://codex.wordpress.org/Create_A_Network")."</p></div>";
}
function dm_add_pages() {
global $current_site, $wpdb, $wp_db_version, $wp_version;
if ( !isset( $current_site ) && $wp_db_version >= 15260 ) { // WP 3.0 network hasn't been configured
add_action('admin_notices', 'domain_mapping_warning');
return false;
}
if ( $current_site->path != "/" ) {
wp_die( __( "The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.", 'wordpress-mu-domain-mapping' ) );
}
if ( get_site_option( 'dm_user_settings' ) && $current_site->blog_id != $wpdb->blogid && !dm_sunrise_warning( false ) ) {
add_management_page(__( 'Domain Mapping', 'wordpress-mu-domain-mapping'), __( 'Domain Mapping', 'wordpress-mu-domain-mapping'), 'manage_options', 'domainmapping', 'dm_manage_page' );
}
}
add_action( 'admin_menu', 'dm_add_pages' );
function dm_network_pages() {
add_submenu_page('settings.php', 'Domain Mapping', 'Domain Mapping', 'manage_options', 'dm_admin_page', 'dm_admin_page');
add_submenu_page('settings.php', 'Domains', 'Domains', 'manage_options', 'dm_domains_admin', 'dm_domains_admin');
}
add_action( 'network_admin_menu', 'dm_network_pages' );
// Default Messages for the users Domain Mapping management page
// This can now be replaced by using:
// remove_action('dm_echo_updated_msg','dm_echo_default_updated_msg');
// add_action('dm_echo_updated_msg','my_custom_updated_msg_function');
function dm_echo_default_updated_msg() {
switch( $_GET[ 'updated' ] ) {
case "add":
$msg = __( 'New domain added.', 'wordpress-mu-domain-mapping' );
break;
case "exists":
$msg = __( 'New domain already exists.', 'wordpress-mu-domain-mapping' );
break;
case "primary":
$msg = __( 'New primary domain.', 'wordpress-mu-domain-mapping' );
break;
case "del":
$msg = __( 'Domain deleted.', 'wordpress-mu-domain-mapping' );
break;
}
echo "<div class='updated fade'><p>$msg</p></div>";
}
add_action('dm_echo_updated_msg','dm_echo_default_updated_msg');
function maybe_create_db() {
global $wpdb;
get_dm_hash(); // initialise the remote login hash
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
$wpdb->dmtablelogins = $wpdb->base_prefix . 'domain_mapping_logins';
if ( dm_site_admin() ) {
$created = 0;
if ( $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->dmtable}'") != $wpdb->dmtable ) {
$wpdb->query( "CREATE TABLE IF NOT EXISTS `{$wpdb->dmtable}` (
`id` bigint(20) NOT NULL auto_increment,
`blog_id` bigint(20) NOT NULL,
`domain` varchar(255) NOT NULL,
`active` tinyint(4) default '1',
PRIMARY KEY (`id`),
KEY `blog_id` (`blog_id`,`domain`,`active`)
);" );
$created = 1;
}
if ( $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->dmtablelogins}'") != $wpdb->dmtablelogins ) {
$wpdb->query( "CREATE TABLE IF NOT EXISTS `{$wpdb->dmtablelogins}` (
`id` varchar(32) NOT NULL,
`user_id` bigint(20) NOT NULL,
`blog_id` bigint(20) NOT NULL,
`t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);" );
$created = 1;
}
if ( $created ) {
?> <div id="message" class="updated fade"><p><strong><?php _e( 'Domain mapping database table created.', 'wordpress-mu-domain-mapping' ) ?></strong></p></div> <?php
}
}
}
function dm_domains_admin() {
global $wpdb, $current_site;
if ( false == dm_site_admin() ) { // paranoid? moi?
return false;
}
dm_sunrise_warning();
if ( $current_site->path != "/" ) {
wp_die( sprintf( __( "<strong>Warning!</strong> This plugin will only work if WordPress is installed in the root directory of your webserver. It is currently installed in &#8217;%s&#8217;.", "wordpress-mu-domain-mapping" ), $current_site->path ) );
}
echo '<h2>' . __( 'Domain Mapping: Domains', 'wordpress-mu-domain-mapping' ) . '</h2>';
if ( !empty( $_POST[ 'action' ] ) ) {
check_admin_referer( 'domain_mapping' );
$domain = strtolower( $_POST[ 'domain' ] );
switch( $_POST[ 'action' ] ) {
case "edit":
$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->dmtable} WHERE domain = %s", $domain ) );
if ( $row ) {
dm_edit_domain( $row );
} else {
echo "<h3>" . __( 'Domain not found', 'wordpress-mu-domain-mapping' ) . "</h3>";
}
break;
case "save":
if ( $_POST[ 'blog_id' ] != 0 AND
$_POST[ 'blog_id' ] != 1 AND
null == $wpdb->get_var( $wpdb->prepare( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id != %d AND domain = %s", $_POST[ 'blog_id' ], $domain ) )
) {
if ( $_POST[ 'orig_domain' ] == '' ) {
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtable} ( `blog_id`, `domain`, `active` ) VALUES ( %d, %s, %d )", $_POST[ 'blog_id' ], $domain, $_POST[ 'active' ] ) );
echo "<p><strong>" . __( 'Domain Add', 'wordpress-mu-domain-mapping' ) . "</strong></p>";
} else {
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->dmtable} SET blog_id = %d, domain = %s, active = %d WHERE domain = %s", $_POST[ 'blog_id' ], $domain, $_POST[ 'active' ], $_POST[ 'orig_domain' ] ) );
echo "<p><strong>" . __( 'Domain Updated', 'wordpress-mu-domain-mapping' ) . "</strong></p>";
}
}
break;
case "del":
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dmtable} WHERE domain = %s", $domain ) );
echo "<p><strong>" . __( 'Domain Deleted', 'wordpress-mu-domain-mapping' ) . "</strong></p>";
break;
case "search":
$rows = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->dmtable} WHERE domain LIKE %s", $domain ) );
dm_domain_listing( $rows, sprintf( __( "Searching for %s", 'wordpress-mu-domain-mapping' ), esc_html( $domain ) ) );
break;
}
if ( $_POST[ 'action' ] == 'update' ) {
if ( preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $_POST[ 'ipaddress' ] ) )
update_site_option( 'dm_ipaddress', $_POST[ 'ipaddress' ] );
if ( ! preg_match( '/(--|\.\.)/', $_POST[ 'cname' ] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST[ 'cname' ] ) )
update_site_option( 'dm_cname', stripslashes( $_POST[ 'cname' ] ) );
else
update_site_option( 'dm_cname', '' );
update_site_option( 'dm_301_redirect', intval( $_POST[ 'permanent_redirect' ] ) );
}
}
echo "<h3>" . __( 'Search Domains', 'wordpress-mu-domain-mapping' ) . "</h3>";
echo '<form method="POST">';
wp_nonce_field( 'domain_mapping' );
echo '<input type="hidden" name="action" value="search" />';
echo '<p>';
echo _e( "Domain:", 'wordpress-mu-domain-mapping' );
echo " <input type='text' name='domain' value='' /></p>";
echo "<p><input type='submit' class='button-secondary' value='" . __( 'Search', 'wordpress-mu-domain-mapping' ) . "' /></p>";
echo "</form><br />";
dm_edit_domain();
$rows = $wpdb->get_results( "SELECT * FROM {$wpdb->dmtable} ORDER BY id DESC LIMIT 0,20" );
dm_domain_listing( $rows );
echo '<p>' . sprintf( __( '<strong>Note:</strong> %s', 'wordpress-mu-domain-mapping' ), dm_idn_warning() ) . "</p>";
}
function dm_edit_domain( $row = false ) {
if ( is_object( $row ) ) {
echo "<h3>" . __( 'Edit Domain', 'wordpress-mu-domain-mapping' ) . "</h3>";
} else {
echo "<h3>" . __( 'New Domain', 'wordpress-mu-domain-mapping' ) . "</h3>";
$row = new stdClass();
$row->blog_id = '';
$row->domain = '';
$_POST[ 'domain' ] = '';
$row->active = 1;
}
echo "<form method='POST'><input type='hidden' name='action' value='save' /><input type='hidden' name='orig_domain' value='" . esc_attr( $_POST[ 'domain' ] ) . "' />";
wp_nonce_field( 'domain_mapping' );
echo "<table class='form-table'>\n";
echo "<tr><th>" . __( 'Site ID', 'wordpress-mu-domain-mapping' ) . "</th><td><input type='text' name='blog_id' value='{$row->blog_id}' /></td></tr>\n";
echo "<tr><th>" . __( 'Domain', 'wordpress-mu-domain-mapping' ) . "</th><td><input type='text' name='domain' value='{$row->domain}' /></td></tr>\n";
echo "<tr><th>" . __( 'Primary', 'wordpress-mu-domain-mapping' ) . "</th><td><input type='checkbox' name='active' value='1' ";
echo $row->active == 1 ? 'checked=1 ' : ' ';
echo "/></td></tr>\n";
if ( get_site_option( 'dm_no_primary_domain' ) == 1 ) {
echo "<tr><td colspan='2'>" . __( '<strong>Warning!</strong> Primary domains are currently disabled.', 'wordpress-mu-domain-mapping' ) . "</td></tr>";
}
echo "</table>";
echo "<p><input type='submit' class='button-primary' value='" .__( 'Save', 'wordpress-mu-domain-mapping' ). "' /></p></form><br /><br />";
}
function dm_domain_listing( $rows, $heading = '' ) {
if ( $rows ) {
if ( file_exists( ABSPATH . 'wp-admin/network/site-info.php' ) ) {
$edit_url = network_admin_url( 'site-info.php' );
} elseif ( file_exists( ABSPATH . 'wp-admin/ms-sites.php' ) ) {
$edit_url = admin_url( 'ms-sites.php' );
} else {
$edit_url = admin_url( 'wpmu-blogs.php' );
}
if ( $heading != '' )
echo "<h3>$heading</h3>";
echo '<table class="widefat" cellspacing="0"><thead><tr><th>'.__( 'Site ID', 'wordpress-mu-domain-mapping' ).'</th><th>'.__( 'Domain', 'wordpress-mu-domain-mapping' ).'</th><th>'.__( 'Primary', 'wordpress-mu-domain-mapping' ).'</th><th>'.__( 'Edit', 'wordpress-mu-domain-mapping' ).'</th><th>'.__( 'Delete', 'wordpress-mu-domain-mapping' ).'</th></tr></thead><tbody>';
foreach( $rows as $row ) {
echo "<tr><td><a href='" . add_query_arg( array( 'action' => 'editblog', 'id' => $row->blog_id ), $edit_url ) . "'>{$row->blog_id}</a></td><td><a href='http://{$row->domain}/'>{$row->domain}</a></td><td>";
echo $row->active == 1 ? __( 'Yes', 'wordpress-mu-domain-mapping' ) : __( 'No', 'wordpress-mu-domain-mapping' );
echo "</td><td><form method='POST'><input type='hidden' name='action' value='edit' /><input type='hidden' name='domain' value='{$row->domain}' />";
wp_nonce_field( 'domain_mapping' );
echo "<input type='submit' class='button-secondary' value='" .__( 'Edit', 'wordpress-mu-domain-mapping' ). "' /></form></td><td><form method='POST'><input type='hidden' name='action' value='del' /><input type='hidden' name='domain' value='{$row->domain}' />";
wp_nonce_field( 'domain_mapping' );
echo "<input type='submit' class='button-secondary' value='" .__( 'Del', 'wordpress-mu-domain-mapping' ). "' /></form>";
echo "</td></tr>";
}
echo '</table>';
if ( get_site_option( 'dm_no_primary_domain' ) == 1 ) {
echo "<p>" . __( '<strong>Warning!</strong> Primary domains are currently disabled.', 'wordpress-mu-domain-mapping' ) . "</p>";
}
}
}
function dm_admin_page() {
global $wpdb, $current_site;
if ( false == dm_site_admin() ) { // paranoid? moi?
return false;
}
dm_sunrise_warning();
maybe_create_db();
if ( $current_site->path != "/" ) {
wp_die( sprintf( __( "<strong>Warning!</strong> This plugin will only work if WordPress is installed in the root directory of your webserver. It is currently installed in &#8217;%s&#8217;.", "wordpress-mu-domain-mapping" ), $current_site->path ) );
}
// set up some defaults
if ( get_site_option( 'dm_remote_login', 'NA' ) == 'NA' )
add_site_option( 'dm_remote_login', 1 );
if ( get_site_option( 'dm_redirect_admin', 'NA' ) == 'NA' )
add_site_option( 'dm_redirect_admin', 1 );
if ( get_site_option( 'dm_user_settings', 'NA' ) == 'NA' )
add_site_option( 'dm_user_settings', 1 );
if ( !empty( $_POST[ 'action' ] ) ) {
check_admin_referer( 'domain_mapping' );
if ( $_POST[ 'action' ] == 'update' ) {
$ipok = true;
$ipaddresses = explode( ',', $_POST[ 'ipaddress' ] );
foreach( $ipaddresses as $address ) {
if ( ( $ip = trim( $address ) ) && !preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $ip ) ) {
$ipok = false;
break;
}
}
if( $ipok )
update_site_option( 'dm_ipaddress', $_POST[ 'ipaddress' ] );
if ( intval( $_POST[ 'always_redirect_admin' ] ) == 0 )
$_POST[ 'dm_remote_login' ] = 0; // disable remote login if redirecting to mapped domain
update_site_option( 'dm_remote_login', intval( $_POST[ 'dm_remote_login' ] ) );
if ( ! preg_match( '/(--|\.\.)/', $_POST[ 'cname' ] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST[ 'cname' ] ) )
update_site_option( 'dm_cname', stripslashes( $_POST[ 'cname' ] ) );
else
update_site_option( 'dm_cname', '' );
update_site_option( 'dm_301_redirect', isset( $_POST[ 'permanent_redirect' ] ) ? intval( $_POST[ 'permanent_redirect' ] ) : 0 );
update_site_option( 'dm_redirect_admin', isset( $_POST[ 'always_redirect_admin' ] ) ? intval( $_POST[ 'always_redirect_admin' ] ) : 0 );
update_site_option( 'dm_user_settings', isset( $_POST[ 'dm_user_settings' ] ) ? intval( $_POST[ 'dm_user_settings' ] ) : 0 );
update_site_option( 'dm_no_primary_domain', isset( $_POST[ 'dm_no_primary_domain' ] ) ? intval( $_POST[ 'dm_no_primary_domain' ] ) : 0 );
}
}
echo '<h3>' . __( 'Domain Mapping Configuration', 'wordpress-mu-domain-mapping' ) . '</h3>';
echo '<form method="POST">';
echo '<input type="hidden" name="action" value="update" />';
echo "<p>" . __( "As a super admin on this network you can set the IP address users need to point their DNS A records at <em>or</em> the domain to point CNAME record at. If you don't know what the IP address is, ping this blog to get it.", 'wordpress-mu-domain-mapping' ) . "</p>";
echo "<p>" . __( "If you use round robin DNS or another load balancing technique with more than one IP, enter each address, separating them by commas.", 'wordpress-mu-domain-mapping' ) . "</p>";
_e( "Server IP Address: ", 'wordpress-mu-domain-mapping' );
echo "<input type='text' name='ipaddress' value='" . get_site_option( 'dm_ipaddress' ) . "' /><br />";
// Using a CNAME is a safer method than using IP adresses for some people (IMHO)
echo "<p>" . __( "If you prefer the use of a CNAME record, you can set the domain here. This domain must be configured with an A record or ANAME pointing at an IP address. Visitors may experience problems if it is a CNAME of another domain.", 'wordpress-mu-domain-mapping' ) . "</p>";
echo "<p>" . __( "NOTE, this voids the use of any IP address set above", 'wordpress-mu-domain-mapping' ) . "</p>";
_e( "Server CNAME domain: ", 'wordpress-mu-domain-mapping' );
echo "<input type='text' name='cname' value='" . get_site_option( 'dm_cname' ) . "' /> (" . dm_idn_warning() . ")<br />";
echo '<p>' . __( 'The information you enter here will be shown to your users so they can configure their DNS correctly. It is for informational purposes only', 'wordpress-mu-domain-mapping' ) . '</p>';
echo "<h3>" . __( 'Domain Options', 'wordpress-mu-domain-mapping' ) . "</h3>";
echo "<ol><li><input type='checkbox' name='dm_remote_login' value='1' ";
echo get_site_option( 'dm_remote_login' ) == 1 ? "checked='checked'" : "";
echo " /> " . __( 'Remote Login', 'wordpress-mu-domain-mapping' ) . "</li>";
echo "<li><input type='checkbox' name='permanent_redirect' value='1' ";
echo get_site_option( 'dm_301_redirect' ) == 1 ? "checked='checked'" : "";
echo " /> " . __( "Permanent redirect (better for your blogger's pagerank)", 'wordpress-mu-domain-mapping' ) . "</li>";
echo "<li><input type='checkbox' name='dm_user_settings' value='1' ";
echo get_site_option( 'dm_user_settings' ) == 1 ? "checked='checked'" : "";
echo " /> " . __( 'User domain mapping page', 'wordpress-mu-domain-mapping' ) . "</li> ";
echo "<li><input type='checkbox' name='always_redirect_admin' value='1' ";
echo get_site_option( 'dm_redirect_admin' ) == 1 ? "checked='checked'" : "";
echo " /> " . __( "Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)", 'wordpress-mu-domain-mapping' ) . "</li>";
echo "<li><input type='checkbox' name='dm_no_primary_domain' value='1' ";
echo get_site_option( 'dm_no_primary_domain' ) == 1 ? "checked='checked'" : "";
echo " /> " . __( "Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.", 'wordpress-mu-domain-mapping' ) . "</li></ol>";
wp_nonce_field( 'domain_mapping' );
echo "<p><input class='button-primary' type='submit' value='" . __( "Save", 'wordpress-mu-domain-mapping' ) . "' /></p>";
echo "</form><br />";
}
function dm_handle_actions() {
global $wpdb, $parent_file;
$url = add_query_arg( array( 'page' => 'domainmapping' ), admin_url( $parent_file ) );
if ( !empty( $_POST[ 'action' ] ) ) {
$domain = $wpdb->escape( $_POST[ 'domain' ] );
if ( $domain == '' ) {
wp_die( "You must enter a domain" );
}
check_admin_referer( 'domain_mapping' );
do_action('dm_handle_actions_init', $domain);
switch( $_POST[ 'action' ] ) {
case "add":
do_action('dm_handle_actions_add', $domain);
if( null == $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain = '$domain'" ) && null == $wpdb->get_row( "SELECT blog_id FROM {$wpdb->dmtable} WHERE domain = '$domain'" ) ) {
if ( $_POST[ 'primary' ] ) {
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->dmtable} SET active = 0 WHERE blog_id = %d", $wpdb->blogid ) );
}
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtable} ( `id` , `blog_id` , `domain` , `active` ) VALUES ( NULL, %d, %s, %d )", $wpdb->blogid, $domain, $_POST[ 'primary' ] ) );
wp_redirect( add_query_arg( array( 'updated' => 'add' ), $url ) );
exit;
} else {
wp_redirect( add_query_arg( array( 'updated' => 'exists' ), $url ) );
exit;
}
break;
case "primary":
do_action('dm_handle_actions_primary', $domain);
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->dmtable} SET active = 0 WHERE blog_id = %d", $wpdb->blogid ) );
$orig_url = parse_url( get_original_url( 'siteurl' ) );
if( $domain != $orig_url[ 'host' ] ) {
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->dmtable} SET active = 1 WHERE domain = %s", $domain ) );
}
wp_redirect( add_query_arg( array( 'updated' => 'primary' ), $url ) );
exit;
break;
}
} elseif( $_GET[ 'action' ] == 'delete' ) {
$domain = $wpdb->escape( $_GET[ 'domain' ] );
if ( $domain == '' ) {
wp_die( __( "You must enter a domain", 'wordpress-mu-domain-mapping' ) );
}
check_admin_referer( "delete" . $_GET['domain'] );
do_action('dm_handle_actions_del', $domain);
$wpdb->query( "DELETE FROM {$wpdb->dmtable} WHERE domain = '$domain'" );
wp_redirect( add_query_arg( array( 'updated' => 'del' ), $url ) );
exit;
}
}
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'domainmapping' )
add_action( 'admin_init', 'dm_handle_actions' );
function dm_sunrise_warning( $die = true ) {
if ( !file_exists( WP_CONTENT_DIR . '/sunrise.php' ) ) {
if ( !$die )
return true;
if ( dm_site_admin() ) {
wp_die( sprintf( __( "Please copy sunrise.php to %s/sunrise.php and ensure the SUNRISE definition is in %swp-config.php", 'wordpress-mu-domain-mapping' ), WP_CONTENT_DIR, ABSPATH ) );
} else {
wp_die( __( "This plugin has not been configured correctly yet.", 'wordpress-mu-domain-mapping' ) );
}
} elseif ( !defined( 'SUNRISE' ) ) {
if ( !$die )
return true;
if ( dm_site_admin() ) {
wp_die( sprintf( __( "Please uncomment the line <em>define( 'SUNRISE', 'on' );</em> or add it to your %swp-config.php", 'wordpress-mu-domain-mapping' ), ABSPATH ) );
} else {
wp_die( __( "This plugin has not been configured correctly yet.", 'wordpress-mu-domain-mapping' ) );
}
} elseif ( !defined( 'SUNRISE_LOADED' ) ) {
if ( !$die )
return true;
if ( dm_site_admin() ) {
wp_die( sprintf( __( "Please edit your %swp-config.php and move the line <em>define( 'SUNRISE', 'on' );</em> above the last require_once() in that file or make sure you updated sunrise.php.", 'wordpress-mu-domain-mapping' ), ABSPATH ) );
} else {
wp_die( __( "This plugin has not been configured correctly yet.", 'wordpress-mu-domain-mapping' ) );
}
}
return false;
}
function dm_manage_page() {
global $wpdb, $parent_file;
if ( isset( $_GET[ 'updated' ] ) ) {
do_action('dm_echo_updated_msg');
}
dm_sunrise_warning();
echo "<div class='wrap'><h2>" . __( 'Domain Mapping', 'wordpress-mu-domain-mapping' ) . "</h2>";
if ( false == get_site_option( 'dm_ipaddress' ) && false == get_site_option( 'dm_cname' ) ) {
if ( dm_site_admin() ) {
_e( "Please set the IP address or CNAME of your server in the <a href='wpmu-admin.php?page=dm_admin_page'>site admin page</a>.", 'wordpress-mu-domain-mapping' );
} else {
_e( "This plugin has not been configured correctly yet.", 'wordpress-mu-domain-mapping' );
}
echo "</div>";
return false;
}
$protocol = is_ssl() ? 'https://' : 'http://';
$domains = $wpdb->get_results( "SELECT * FROM {$wpdb->dmtable} WHERE blog_id = '{$wpdb->blogid}'", ARRAY_A );
if ( is_array( $domains ) && !empty( $domains ) ) {
$orig_url = parse_url( get_original_url( 'siteurl' ) );
$domains[] = array( 'domain' => $orig_url[ 'host' ], 'path' => $orig_url[ 'path' ], 'active' => 0 );
echo "<h3>" . __( 'Active domains on this blog', 'wordpress-mu-domain-mapping' ) . "</h3>";
echo '<form method="POST">';
echo "<table><tr><th>" . __( 'Primary', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Domain', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Delete', 'wordpress-mu-domain-mapping' ) . "</th></tr>\n";
$primary_found = 0;
$del_url = add_query_arg( array( 'page' => 'domainmapping', 'action' => 'delete' ), admin_url( $parent_file ) );
foreach( $domains as $details ) {
if ( 0 == $primary_found && $details[ 'domain' ] == $orig_url[ 'host' ] ) {
$details[ 'active' ] = 1;
}
echo "<tr><td>";
echo "<input type='radio' name='domain' value='{$details[ 'domain' ]}' ";
if ( $details[ 'active' ] == 1 )
echo "checked='1' ";
echo "/>";
$url = "{$protocol}{$details[ 'domain' ]}{$details[ 'path' ]}";
echo "</td><td><a href='$url'>$url</a></td><td style='text-align: center'>";
if ( $details[ 'domain' ] != $orig_url[ 'host' ] && $details[ 'active' ] != 1 ) {
echo "<a href='" . wp_nonce_url( add_query_arg( array( 'domain' => $details[ 'domain' ] ), $del_url ), "delete" . $details[ 'domain' ] ) . "'>Del</a>";
}
echo "</td></tr>";
if ( 0 == $primary_found )
$primary_found = $details[ 'active' ];
}
?></table><?php
echo '<input type="hidden" name="action" value="primary" />';
echo "<p><input type='submit' class='button-primary' value='" . __( 'Set Primary Domain', 'wordpress-mu-domain-mapping' ) . "' /></p>";
wp_nonce_field( 'domain_mapping' );
echo "</form>";
echo "<p>" . __( "* The primary domain cannot be deleted.", 'wordpress-mu-domain-mapping' ) . "</p>";
if ( get_site_option( 'dm_no_primary_domain' ) == 1 ) {
echo __( '<strong>Warning!</strong> Primary domains are currently disabled.', 'wordpress-mu-domain-mapping' );
}
}
echo "<h3>" . __( 'Add new domain', 'wordpress-mu-domain-mapping' ) . "</h3>";
echo '<form method="POST">';
echo '<input type="hidden" name="action" value="add" />';
echo "<p>http://<input type='text' name='domain' value='' />/<br />";
wp_nonce_field( 'domain_mapping' );
echo "<input type='checkbox' name='primary' value='1' /> " . __( 'Primary domain for this blog', 'wordpress-mu-domain-mapping' ) . "</p>";
echo "<p><input type='submit' class='button-secondary' value='" . __( "Add", 'wordpress-mu-domain-mapping' ) . "' /></p>";
echo "</form><br />";
if ( get_site_option( 'dm_cname' ) ) {
$dm_cname = get_site_option( 'dm_cname');
echo "<p>" . sprintf( __( 'If you want to redirect a domain you will need to add a DNS "CNAME" record pointing to the following domain name for this server: <strong>%s</strong>', 'wordpress-mu-domain-mapping' ), $dm_cname ) . "</p>";
echo "<p>" . __( 'Google have published <a href="http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=58317" target="_blank">instructions</a> for creating CNAME records on various hosting platforms such as GoDaddy and others.', 'wordpress-mu-domain-mapping' ) . "</p>";
} else {
echo "<p>" . __( 'If your domain name includes a hostname like "www", "blog" or some other prefix before the actual domain name you will need to add a CNAME for that hostname in your DNS pointing at this blog URL.', 'wordpress-mu-domain-mapping' ) . "</p>";
$dm_ipaddress = get_site_option( 'dm_ipaddress', 'IP not set by admin yet.' );
if ( strpos( $dm_ipaddress, ',' ) ) {
echo "<p>" . sprintf( __( 'If you want to redirect a domain you will need to add DNS "A" records pointing at the IP addresses of this server: <strong>%s</strong>', 'wordpress-mu-domain-mapping' ), $dm_ipaddress ) . "</p>";
} else {
echo "<p>" . sprintf( __( 'If you want to redirect a domain you will need to add a DNS "A" record pointing at the IP address of this server: <strong>%s</strong>', 'wordpress-mu-domain-mapping' ), $dm_ipaddress ) . "</p>";
}
}
echo '<p>' . sprintf( __( '<strong>Note:</strong> %s', 'wordpress-mu-domain-mapping' ), dm_idn_warning() ) . "</p>";
echo "</div>";
}
function domain_mapping_siteurl( $setting ) {
global $wpdb, $current_blog;
// To reduce the number of database queries, save the results the first time we encounter each blog ID.
static $return_url = array();
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
if ( !isset( $return_url[ $wpdb->blogid ] ) ) {
$s = $wpdb->suppress_errors();
if ( get_site_option( 'dm_no_primary_domain' ) == 1 ) {
$domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '{$wpdb->blogid}' AND domain = '" . $wpdb->escape( $_SERVER[ 'HTTP_HOST' ] ) . "' LIMIT 1" );
if ( null == $domain ) {
$return_url[ $wpdb->blogid ] = untrailingslashit( get_original_url( "siteurl" ) );
return $return_url[ $wpdb->blogid ];
}
} else {
// get primary domain, if we don't have one then return original url.
$domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '{$wpdb->blogid}' AND active = 1 LIMIT 1" );
if ( null == $domain ) {
$return_url[ $wpdb->blogid ] = untrailingslashit( get_original_url( "siteurl" ) );
return $return_url[ $wpdb->blogid ];
}
}
$wpdb->suppress_errors( $s );
$protocol = is_ssl() ? 'https://' : 'http://';
if ( $domain ) {
$return_url[ $wpdb->blogid ] = untrailingslashit( $protocol . $domain );
$setting = $return_url[ $wpdb->blogid ];
} else {
$return_url[ $wpdb->blogid ] = false;
}
} elseif ( $return_url[ $wpdb->blogid ] !== FALSE) {
$setting = $return_url[ $wpdb->blogid ];
}
return $setting;
}
// url is siteurl or home
function get_original_url( $url, $blog_id = 0 ) {
global $wpdb;
if ( $blog_id != 0 ) {
$id = $blog_id;
} else {
$id = $wpdb->blogid;
}
static $orig_urls = array();
if ( ! isset( $orig_urls[ $id ] ) ) {
if ( defined( 'DOMAIN_MAPPING' ) )
remove_filter( 'pre_option_' . $url, 'domain_mapping_' . $url );
if ( $blog_id == 0 ) {
$orig_url = get_option( $url );
} else {
$orig_url = get_blog_option( $blog_id, $url );
}
if ( is_ssl() ) {
$orig_url = str_replace( "http://", "https://", $orig_url );
} else {
$orig_url = str_replace( "https://", "http://", $orig_url );
}
if ( $blog_id == 0 ) {
$orig_urls[ $wpdb->blogid ] = $orig_url;
} else {
$orig_urls[ $blog_id ] = $orig_url;
}
if ( defined( 'DOMAIN_MAPPING' ) )
add_filter( 'pre_option_' . $url, 'domain_mapping_' . $url );
}
return $orig_urls[ $id ];
}
function domain_mapping_adminurl( $url, $path, $blog_id = 0 ) {
$index = strpos( $url, '/wp-admin' );
if( $index !== false ) {
$url = get_original_url( 'siteurl', $blog_id ) . substr( $url, $index );
// make sure admin_url is ssl if current page is ssl, or admin ssl is forced
if( ( is_ssl() || force_ssl_admin() ) && 0 === strpos( $url, 'http://' ) ) {
$url = 'https://' . substr( $url, 7 );
}
}
return $url;
}
function domain_mapping_post_content( $post_content ) {
global $wpdb;
$orig_url = get_original_url( 'siteurl' );
$url = domain_mapping_siteurl( 'NA' );
if ( $url == 'NA' )
return $post_content;
return str_replace( $orig_url, $url, $post_content );
}
function dm_redirect_admin() {
// don't redirect admin ajax calls
if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin/admin-ajax.php' ) !== false )
return;
if ( get_site_option( 'dm_redirect_admin' ) ) {
// redirect mapped domain admin page to original url
$url = get_original_url( 'siteurl' );
if ( false === strpos( $url, $_SERVER[ 'HTTP_HOST' ] ) ) {
wp_redirect( untrailingslashit( $url ) . $_SERVER[ 'REQUEST_URI' ] );
exit;
}
} else {
global $current_blog;
// redirect original url to primary domain wp-admin/ - remote login is disabled!
$url = domain_mapping_siteurl( false );
$request_uri = str_replace( $current_blog->path, '/', $_SERVER[ 'REQUEST_URI' ] );
if ( false === strpos( $url, $_SERVER[ 'HTTP_HOST' ] ) ) {
wp_redirect( str_replace( '//wp-admin', '/wp-admin', trailingslashit( $url ) . $request_uri ) );
exit;
}
}
}
function redirect_login_to_orig() {
if ( !get_site_option( 'dm_remote_login' ) || $_GET[ 'action' ] == 'logout' || isset( $_GET[ 'loggedout' ] ) ) {
return false;
}
$url = get_original_url( 'siteurl' );
if ( $url != site_url() ) {
$url .= "/wp-login.php";
echo "<script type='text/javascript'>\nwindow.location = '$url'</script>";
}
}
// fixes the plugins_url
function domain_mapping_plugins_uri( $full_url, $path=NULL, $plugin=NULL ) {
return get_option( 'siteurl' ) . substr( $full_url, stripos( $full_url, PLUGINDIR ) - 1 );
}
function domain_mapping_themes_uri( $full_url ) {
return str_replace( get_original_url ( 'siteurl' ), get_option( 'siteurl' ), $full_url );
}
if ( defined( 'DOMAIN_MAPPING' ) ) {
add_filter( 'plugins_url', 'domain_mapping_plugins_uri', 1 );
add_filter( 'theme_root_uri', 'domain_mapping_themes_uri', 1 );
add_filter( 'pre_option_siteurl', 'domain_mapping_siteurl' );
add_filter( 'pre_option_home', 'domain_mapping_siteurl' );
add_filter( 'the_content', 'domain_mapping_post_content' );
add_action( 'wp_head', 'remote_login_js_loader' );
add_action( 'login_head', 'redirect_login_to_orig' );
add_action( 'wp_logout', 'remote_logout_loader', 9999 );
add_filter( 'stylesheet_uri', 'domain_mapping_post_content' );
add_filter( 'stylesheet_directory', 'domain_mapping_post_content' );
add_filter( 'stylesheet_directory_uri', 'domain_mapping_post_content' );
add_filter( 'template_directory', 'domain_mapping_post_content' );
add_filter( 'template_directory_uri', 'domain_mapping_post_content' );
add_filter( 'plugins_url', 'domain_mapping_post_content' );
} else {
add_filter( 'admin_url', 'domain_mapping_adminurl', 10, 3 );
}
add_action( 'admin_init', 'dm_redirect_admin' );
if ( isset( $_GET[ 'dm' ] ) )
add_action( 'template_redirect', 'remote_login_js' );
function remote_logout_loader() {
global $current_site, $current_blog, $wpdb;
$wpdb->dmtablelogins = $wpdb->base_prefix . 'domain_mapping_logins';
$protocol = is_ssl() ? 'https://' : 'http://';
$hash = get_dm_hash();
$key = md5( time() );
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtablelogins} ( `id`, `user_id`, `blog_id`, `t` ) VALUES( %s, 0, %d, NOW() )", $key, $current_blog->blog_id ) );
if ( get_site_option( 'dm_redirect_admin' ) ) {
wp_redirect( $protocol . $current_site->domain . $current_site->path . "?dm={$hash}&action=logout&blogid={$current_blog->blog_id}&k={$key}&t=" . mt_rand() );
exit;
}
}
function redirect_to_mapped_domain() {
global $current_blog, $wpdb;
// don't redirect the main site
if ( is_main_site() )
return;
// don't redirect post previews
if ( isset( $_GET['preview'] ) && $_GET['preview'] == 'true' )
return;
// don't redirect theme customizer (WP 3.4)
if ( isset( $_POST['customize'] ) && isset( $_POST['theme'] ) && $_POST['customize'] == 'on' )
return;
$protocol = is_ssl() ? 'https://' : 'http://';
$url = domain_mapping_siteurl( false );
if ( $url && $url != untrailingslashit( $protocol . $current_blog->domain . $current_blog->path ) ) {
$redirect = get_site_option( 'dm_301_redirect' ) ? '301' : '302';
if ( ( defined( 'VHOST' ) && constant( "VHOST" ) != 'yes' ) || ( defined( 'SUBDOMAIN_INSTALL' ) && constant( 'SUBDOMAIN_INSTALL' ) == false ) ) {
$_SERVER[ 'REQUEST_URI' ] = str_replace( $current_blog->path, '/', $_SERVER[ 'REQUEST_URI' ] );
}
header( "Location: {$url}{$_SERVER[ 'REQUEST_URI' ]}", true, $redirect );
exit;
}
}
add_action( 'template_redirect', 'redirect_to_mapped_domain' );
function get_dm_hash() {
$remote_login_hash = get_site_option( 'dm_hash' );
if ( null == $remote_login_hash ) {
$remote_login_hash = md5( time() );
update_site_option( 'dm_hash', $remote_login_hash );
}
return $remote_login_hash;
}
function remote_login_js() {
global $current_blog, $current_user, $wpdb;
if ( 0 == get_site_option( 'dm_remote_login' ) )
return false;
$wpdb->dmtablelogins = $wpdb->base_prefix . 'domain_mapping_logins';
$hash = get_dm_hash();
$protocol = is_ssl() ? 'https://' : 'http://';
if ( $_GET[ 'dm' ] == $hash ) {
if ( $_GET[ 'action' ] == 'load' ) {
if ( !is_user_logged_in() )
exit;
$key = md5( time() . mt_rand() );
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtablelogins} ( `id`, `user_id`, `blog_id`, `t` ) VALUES( %s, %d, %d, NOW() )", $key, $current_user->ID, $_GET[ 'blogid' ] ) );
$url = add_query_arg( array( 'action' => 'login', 'dm' => $hash, 'k' => $key, 't' => mt_rand() ), $_GET[ 'back' ] );
echo "window.location = '$url'";
exit;
} elseif ( $_GET[ 'action' ] == 'login' ) {
if ( $details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->dmtablelogins} WHERE id = %s AND blog_id = %d", $_GET[ 'k' ], $wpdb->blogid ) ) ) {
if ( $details->blog_id == $wpdb->blogid ) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dmtablelogins} WHERE id = %s", $_GET[ 'k' ] ) );
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dmtablelogins} WHERE t < %d", ( time() - 120 ) ) ); // remote logins survive for only 2 minutes if not used.
wp_set_auth_cookie( $details->user_id );
wp_redirect( remove_query_arg( array( 'dm', 'action', 'k', 't', $protocol . $current_blog->domain . $_SERVER[ 'REQUEST_URI' ] ) ) );
exit;
} else {
wp_die( __( "Incorrect or out of date login key", 'wordpress-mu-domain-mapping' ) );
}
} else {
wp_die( __( "Unknown login key", 'wordpress-mu-domain-mapping' ) );
}
} elseif ( $_GET[ 'action' ] == 'logout' ) {
if ( $details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->dmtablelogins} WHERE id = %d AND blog_id = %d", $_GET[ 'k' ], $_GET[ 'blogid' ] ) ) ) {
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dmtablelogins} WHERE id = %s", $_GET[ 'k' ] ) );
$blog = get_blog_details( $_GET[ 'blogid' ] );
wp_clear_auth_cookie();
wp_redirect( trailingslashit( $blog->siteurl ) . "wp-login.php?loggedout=true" );
exit;
} else {
wp_die( __( "Unknown logout key", 'wordpress-mu-domain-mapping' ) );
}
}
}
}
function remote_login_js_loader() {
global $current_site, $current_blog;
if ( 0 == get_site_option( 'dm_remote_login' ) || is_user_logged_in() )
return false;
$protocol = is_ssl() ? 'https://' : 'http://';
$hash = get_dm_hash();
echo "<script src='{$protocol}{$current_site->domain}{$current_site->path}?dm={$hash}&amp;action=load&amp;blogid={$current_blog->blog_id}&amp;siteid={$current_blog->site_id}&amp;t=" . mt_rand() . "&amp;back=" . urlencode( $protocol . $current_blog->domain . $_SERVER[ 'REQUEST_URI' ] ) . "' type='text/javascript'></script>";
}
// delete mapping if blog is deleted
function delete_blog_domain_mapping( $blog_id, $drop ) {
global $wpdb;
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
if ( $blog_id && $drop ) {
// Get an array of domain names to pass onto any delete_blog_domain_mapping actions
$domains = $wpdb->get_col( $wpdb->prepare( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = %d", $blog_id ) );
do_action('dm_delete_blog_domain_mappings', $domains);
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dmtable} WHERE blog_id = %d", $blog_id ) );
}
}
add_action( 'delete_blog', 'delete_blog_domain_mapping', 1, 2 );
// show mapping on site admin blogs screen
function ra_domain_mapping_columns( $columns ) {
$columns[ 'map' ] = __( 'Mapping' );
return $columns;
}
add_filter( 'wpmu_blogs_columns', 'ra_domain_mapping_columns' );
function ra_domain_mapping_field( $column, $blog_id ) {
global $wpdb;
static $maps = false;
if ( $column == 'map' ) {
if ( $maps === false ) {
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
$work = $wpdb->get_results( "SELECT blog_id, domain FROM {$wpdb->dmtable} ORDER BY blog_id" );
$maps = array();
if($work) {
foreach( $work as $blog ) {
$maps[ $blog->blog_id ][] = $blog->domain;
}
}
}
if( !empty( $maps[ $blog_id ] ) && is_array( $maps[ $blog_id ] ) ) {
foreach( $maps[ $blog_id ] as $blog ) {
echo $blog . '<br />';
}
}
}
}
add_action( 'manage_blogs_custom_column', 'ra_domain_mapping_field', 1, 3 );
add_action( 'manage_sites_custom_column', 'ra_domain_mapping_field', 1, 3 );
function dm_site_admin() {
if ( function_exists( 'is_super_admin' ) ) {
return is_super_admin();
} elseif ( function_exists( 'is_site_admin' ) ) {
return is_site_admin();
} else {
return true;
}
}
function dm_idn_warning() {
return sprintf( __( 'International Domain Names should be in <a href="%s">punycode</a> format.', 'wordpress-mu-domain-mapping' ), "http://api.webnic.cc/idnconversion.html" );
}
?>

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,37 @@
<?php
if ( !defined( 'SUNRISE_LOADED' ) )
define( 'SUNRISE_LOADED', 1 );
if ( defined( 'COOKIE_DOMAIN' ) ) {
die( 'The constant "COOKIE_DOMAIN" is defined (probably in wp-config.php). Please remove or comment out that define() line.' );
}
$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
$dm_domain = $_SERVER[ 'HTTP_HOST' ];
if( ( $nowww = preg_replace( '|^www\.|', '', $dm_domain ) ) != $dm_domain )
$where = $wpdb->prepare( 'domain IN (%s,%s)', $dm_domain, $nowww );
else
$where = $wpdb->prepare( 'domain = %s', $dm_domain );
$wpdb->suppress_errors();
$domain_mapping_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->dmtable} WHERE {$where} ORDER BY CHAR_LENGTH(domain) DESC LIMIT 1" );
$wpdb->suppress_errors( false );
if( $domain_mapping_id ) {
$current_blog = $wpdb->get_row("SELECT * FROM {$wpdb->blogs} WHERE blog_id = '$domain_mapping_id' LIMIT 1");
$current_blog->domain = $dm_domain;
$current_blog->path = '/';
$blog_id = $domain_mapping_id;
$site_id = $current_blog->site_id;
define( 'COOKIE_DOMAIN', $dm_domain );
$current_site = $wpdb->get_row( "SELECT * from {$wpdb->site} WHERE id = '{$current_blog->site_id}' LIMIT 0,1" );
$current_site->blog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" );
if ( function_exists( 'get_site_option' ) )
$current_site->site_name = get_site_option( 'site_name' );
elseif ( function_exists( 'get_current_site_name' ) )
$current_site = get_current_site_name( $current_site );
define( 'DOMAIN_MAPPING', 1 );
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
/*!
* New UI Styles.
*/
.casebook-view p .highlight.note-highlight{background:#90ee90}.note-editor .ae-btn-audio,.note-editor .ae-btn-video,.note-editor .ae-mode-edit,.note-editor .ae-mode-edit .delete,.note-editor .ae-share,.note-editor .label-share{display:none}.note-view .stars{display:none}.download-btns{margin-right:110px}.download-btns label{width:49%;margin:0;white-space:nowrap;color:#46362d}.download-btns label input{position:relative;top:1px}.download-btns .button{width:48.9%}@media (max-width:1180px){.download-btns .button,.download-btns label{width:100%}}.modal h2{margin:0 0 20px}.merge-notes-table table{width:100%}.merge-notes-table table td,.merge-notes-table table th{padding:5px 15px 10px 0;width:1%;text-align:left;vertical-align:top}.merge-notes-table table td:last-child,.merge-notes-table table th:last-child{padding-right:0;width:auto}.merge-notes-table table th{white-space:nowrap;vertical-align:middle;border-bottom:1px solid #ccc;padding-bottom:15px}.merge-notes-table table tbody tr:first-child td{padding-top:15px}.merge-notes-s2 .form-group{padding-left:140px;position:relative;line-height:30px;min-height:30px}.merge-notes-s2 .form-group>label{position:absolute;left:0;top:0;line-height:30px}.merge-notes-s2 .form-group.add-stud{padding-right:80px}.merge-notes-s2 .form-group.add-stud .button{position:absolute;right:0;top:0}.merge-notes-s2 .form-group.add-stud select.form-control{padding:4px 12px;height:30px}.merge-notes-s2 .button{display:inline-block}.merge-notes-s2 span.red{color:red}.merge-notes-s2 .added-stud{display:block;padding:0 0 0 17px}.merge-notes-s2 .added-stud .remove-stud{margin-left:10px}.merge-notes-s2 .added-stud .remove-stud:hover{text-decoration:none;color:#000}.merge-notes-s2 .added-stud.sample{display:none}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="lawcarta" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe14d;" glyph-name="copy" d="M810 42.667v598h-468v-598h468zM810 724.667c46 0 86-38 86-84v-598c0-46-40-86-86-86h-468c-46 0-86 40-86 86v598c0 46 40 84 86 84h468zM682 896.667v-86h-512v-598h-84v598c0 46 38 86 84 86h512z" />
<glyph unicode="&#xe14e;" glyph-name="cut" d="M810 810.667h128v-42l-298-300-86 86zM512 404.667c12 0 22 10 22 22s-10 22-22 22-22-10-22-22 10-22 22-22zM256 84.667c46 0 86 38 86 86s-40 86-86 86-86-38-86-86 40-86 86-86zM256 596.667c46 0 86 38 86 86s-40 86-86 86-86-38-86-86 40-86 86-86zM412 612.667l526-528v-42h-128l-298 298-100-100c10-22 14-44 14-70 0-94-76-170-170-170s-170 76-170 170 76 170 170 170c26 0 48-4 70-14l100 100-100 100c-22-10-44-14-70-14-94 0-170 76-170 170s76 170 170 170 170-76 170-170c0-26-4-48-14-70z" />
<glyph unicode="&#xe14f;" glyph-name="paste" d="M810 84.667v684h-84v-128h-428v128h-84v-684h596zM512 852.667c-24 0-42-18-42-42s18-42 42-42 42 18 42 42-18 42-42 42zM810 852.667c46 0 86-38 86-84v-684c0-46-40-84-86-84h-596c-46 0-86 38-86 84v684c0 46 40 84 86 84h178c18 50 64 86 120 86s102-36 120-86h178z" />
<glyph unicode="&#xe15a;" glyph-name="redo" d="M786 486.667l152 154v-384h-384l156 154c-60 50-136 80-220 80-152 0-280-98-324-234l-100 32c58 178 226 308 424 308 114 0 218-42 296-110z" />
<glyph unicode="&#xe166;" glyph-name="undo" d="M534 596.667c198 0 364-130 424-308l-100-32c-44 136-172 234-324 234-84 0-160-30-220-80l156-154h-384v384l152-154c78 68 182 110 296 110z" />
<glyph unicode="&#xe20e;" glyph-name="menu" d="M128 704h768v-86h-768v86zM128 406v84h768v-84h-768zM128 192v86h768v-86h-768z" />
<glyph unicode="&#xe238;" glyph-name="bold" d="M576 276.667c36 0 64 28 64 64s-28 64-64 64h-150v-128h150zM426 660.667v-128h128c36 0 64 28 64 64s-28 64-64 64h-128zM666 478.667c56-26 92-82 92-146 0-90-68-162-158-162h-302v598h268c96 0 170-76 170-172 0-44-28-90-70-118z" />
<glyph unicode="&#xe23f;" glyph-name="italic" d="M426 768.667h342v-128h-120l-144-342h94v-128h-342v128h120l144 342h-94v128z" />
<glyph unicode="&#xe246;" glyph-name="strikethrough" d="M128 340.667v86h768v-86h-768zM214 768.667h596v-128h-212v-128h-172v128h-212v128zM426 128.667v128h172v-128h-172z" />
<glyph unicode="&#xe249;" glyph-name="underlined" d="M214 128.667h596v-86h-596v86zM512 212.667c-142 0-256 114-256 256v342h106v-342c0-82 68-148 150-148s150 66 150 148v342h106v-342c0-142-114-256-256-256z" />
<glyph unicode="&#xe600;" glyph-name="account-settings" horiz-adv-x="1079" d="M622.703 399.568h69.189c20.757 27.676 34.595 62.27 41.514 96.865l-48.432 48.432c0 13.838 0 27.676 0 48.432 0 13.838 0 27.676 0 48.432l48.432 48.432c-6.919 34.595-20.757 69.189-41.514 96.865h-69.189c-20.757 20.757-41.514 48.432-62.27 62.27v69.189c-27.676 20.757-62.27 34.595-96.865 41.514l-48.432-48.432c-13.838 0-27.676 0-48.432 0-13.838 0-27.676 0-48.432 0l-48.432 48.432c-34.595-6.919-69.189-20.757-96.865-41.514v-69.189c-20.757-20.757-48.432-41.514-62.27-62.27h-69.189c-20.757-27.676-34.595-62.27-41.514-96.865l48.432-48.432c0-13.838 0-27.676 0-48.432 0-13.838 0-27.676 0-48.432l-48.432-48.432c6.919-34.595 20.757-69.189 41.514-96.865h69.189c20.757-20.757 41.514-48.432 62.27-62.27v-69.189c27.676-20.757 62.27-34.595 96.865-41.514l48.432 48.432c13.838 0 27.676 0 48.432 0 13.838 0 27.676 0 48.432 0l48.432-48.432c34.595 6.919 69.189 20.757 96.865 41.514v69.189c27.676 13.838 48.432 34.595 62.27 62.27zM373.622 482.595c-55.351 0-103.784 48.432-103.784 103.784s48.432 103.784 103.784 103.784c55.351 0 103.784-48.432 103.784-103.784 0-62.27-48.432-103.784-103.784-103.784zM1037.838 143.568l41.514 20.757c0 20.757 0 48.432-6.919 69.189l-41.514 6.919c-6.919 6.919-6.919 20.757-13.838 27.676s-13.838 13.838-13.838 27.676l13.838 41.514c-13.838 20.757-34.595 34.595-55.351 41.514l-34.595-27.676c-20.757 6.919-34.595 13.838-55.351 13.838l-20.757 41.514c-20.757 0-48.432 0-69.189-6.919l-6.919-41.514c-6.919-6.919-20.757-6.919-27.676-13.838s-13.838-13.838-27.676-13.838l-41.514 13.838c-20.757-13.838-34.595-34.595-41.514-55.351l27.676-34.595c-6.919-20.757-13.838-34.595-13.838-55.351l-41.514-20.757c0-20.757 0-48.432 6.919-69.189l41.514-6.919c6.919-6.919 6.919-20.757 13.838-27.676s13.838-13.838 13.838-27.676l-13.838-41.514c13.838-20.757 34.595-34.595 55.351-41.514l34.595 27.676c20.757-6.919 41.514-13.838 55.351-13.838l20.757-41.514c20.757 0 48.432 0 69.189 6.919l6.919 41.514c6.919 6.919 20.757 6.919 27.676 13.838s13.838 13.838 27.676 13.838l41.514-13.838c20.757 13.838 34.595 34.595 41.514 55.351l-27.676 34.595c6.919 13.838 13.838 34.595 13.838 55.351zM864.865 102.054c-34.595-20.757-76.108-6.919-96.865 27.676s-6.919 76.108 27.676 96.865c34.595 20.757 76.108 6.919 96.865-27.676s6.919-76.108-27.676-96.865z" />
<glyph unicode="&#xe601;" glyph-name="add" d="M449.73 510.27h-387.459c-34.595 0-62.27-27.676-62.27-62.27s27.676-62.27 62.27-62.27h387.459v-387.459c0-34.595 27.676-62.27 62.27-62.27s62.27 27.676 62.27 62.27v387.459h387.459c34.595 0 62.27 27.676 62.27 62.27 0 20.757-6.919 34.595-20.757 41.514-13.838 13.838-27.676 20.757-41.514 20.757h-387.459v387.459c0 20.757-6.919 34.595-20.757 41.514-13.838 13.838-27.676 20.757-41.514 20.757-34.595 0-62.27-27.676-62.27-62.27v-387.459z" />
<glyph unicode="&#xe602;" glyph-name="add-subchapter" horiz-adv-x="1503" d="M1299.457 572.773h-516.918v-115.862h516.918c17.824 0 26.737 8.913 35.65 17.824s17.824 26.738 17.824 35.65c0 35.65-26.737 62.387-53.474 62.387zM1299.457 857.97h-1060.574c-35.65 0-53.474-26.737-53.474-53.474 0-35.65 26.738-53.474 53.474-53.474h1060.574c35.65 0 53.474 26.737 53.474 53.474s-26.737 53.474-53.474 53.474zM149.758 243.015l204.985-204.985 169.335 169.335 151.511-160.423v516.918h-508.007l151.511-151.511z" />
<glyph unicode="&#xe603;" glyph-name="add-subchapter-plus" horiz-adv-x="1212" d="M298.667 388.265h-221.867c-42.667 0-76.8-34.133-76.8-76.8s34.133-76.8 76.8-76.8h221.867v-221.867c0-42.667 34.133-76.8 76.8-76.8s76.8 34.133 76.8 76.8v221.867h221.867c42.667 0 76.8 34.133 76.8 76.8 0 25.6-8.533 42.667-25.6 51.2-17.067 17.067-34.133 25.6-51.2 25.6h-221.867v221.867c0 25.6-8.533 42.667-25.6 51.2-17.067 17.067-34.133 25.6-51.2 25.6-42.667 0-76.8-34.133-76.8-76.8v-221.867zM1160.536 678.397h-494.935v-110.934h494.935c17.067 0 25.6 8.533 34.133 17.067s17.067 25.6 17.067 34.133c0 34.133-25.6 59.733-51.2 59.733zM1160.536 959.997h-1015.469c-34.133 0-51.2-25.6-51.2-51.2 0-34.133 25.6-51.2 51.2-51.2h1015.469c34.133 0 51.2 25.6 51.2 51.2s-25.6 51.2-51.2 51.2z" />
<glyph unicode="&#xe604;" glyph-name="add-subsection" horiz-adv-x="1115" d="M1065.29 431.484h-478.968v-107.355h478.968c16.516 0 24.774 8.258 33.032 16.516s16.516 24.774 16.516 33.032c0 33.032-24.774 57.806-49.548 57.806zM82.581 860.904h982.71c16.516 0 24.774 8.258 33.032 16.516s16.516 24.774 16.516 33.032c0 24.774-24.774 49.548-49.548 49.548h-982.71c-33.032 0-49.548-24.774-49.548-49.548-8.258-24.774 16.516-49.548 49.548-49.548zM1065.29 695.742h-982.71c-33.032 0-49.548-24.774-49.548-49.548 0-33.032 24.774-49.548 49.548-49.548h982.71c33.032 0 49.548 24.774 49.548 49.548s-24.774 49.548-49.548 49.548zM487.226 423.226h-470.71l140.387-140.387-156.903-156.903 189.935-189.935 156.903 156.903 140.387-148.645z" />
<glyph unicode="&#xe605;" glyph-name="add-subsection-plus" horiz-adv-x="969" d="M238.933 297.813h-177.493c-34.133 0-61.44-27.307-61.44-61.44s27.307-61.44 61.44-61.44h177.493v-177.493c0-34.133 27.307-61.44 61.44-61.44s61.44 27.307 61.44 61.44v177.493h177.493c34.133 0 61.44 27.307 61.44 61.44 0 20.48-6.827 34.133-20.48 40.96-13.653 13.653-27.307 20.48-40.96 20.48h-177.493v177.493c0 20.48-6.827 34.133-20.48 40.96-13.653 13.653-27.307 20.48-40.96 20.48-34.133 0-61.44-27.307-61.44-61.44v-177.493zM928.427 516.267h-395.947v-88.747h395.947c13.653 0 20.48 6.827 27.307 13.653s13.653 20.48 13.653 27.307c0 27.307-20.48 47.787-40.96 47.787zM116.053 878.080h812.373c13.653 0 20.48 6.827 27.307 13.653s13.653 20.48 13.653 27.307c0 20.48-20.48 40.96-40.96 40.96h-812.373c-27.307 0-40.96-20.48-40.96-40.96-6.827-20.48 13.653-40.96 40.96-40.96zM928.427 741.547h-812.373c-27.307 0-40.96-20.48-40.96-40.96 0-27.307 20.48-40.96 40.96-40.96h812.373c27.307 0 40.96 20.48 40.96 40.96s-20.48 40.96-40.96 40.96z" />
<glyph unicode="&#xe609;" glyph-name="close" d="M512 553.412l-384 384c-30.118 30.118-75.294 30.118-105.412 0s-30.118-75.294 0-105.412l384-384-384-384c-30.118-30.118-30.118-75.294 0-105.412s75.294-30.118 105.412 0l384 384 384-384c30.118-30.118 75.294-30.118 105.412 0 15.059 15.059 22.588 37.647 22.588 52.706 0 22.588-7.529 37.647-22.588 52.706l-384 384 384 384c15.059 15.059 22.588 37.647 22.588 52.706 0 22.588-7.529 37.647-22.588 52.706-30.118 30.118-75.294 30.118-105.412 0l-384-384z" />
<glyph unicode="&#xe60a;" glyph-name="close-circle" d="M518.071 960c-286.463 0-511.976-225.561-518.071-505.929 0-280.368 225.556-511.976 505.924-518.071 286.463 0 511.976 225.561 518.071 505.929 0 286.463-225.556 511.976-505.924 518.071zM283.434 729.892c12.19 0 24.313-4.547 33.455-13.69l195.106-201.181 201.066 195.11c18.285 18.285 48.851 18.285 67.136 0s18.285-48.855 0-67.14l-201.176-194.991 194.99-201.181c18.285-18.285 18.285-48.736 0-67.021-12.19-6.095-24.355-12.142-36.545-12.142s-24.38-0.048-30.475 12.142l-194.996 201.181-201.176-195.11c-12.19-6.095-24.355-12.142-36.545-12.142s-24.38-0.048-30.475 12.142c-18.285 18.285-18.285 48.855 0 67.14l201.176 194.991-195.106 201.181c-18.285 18.285-18.285 48.736 0 67.021 9.142 9.142 21.375 13.69 33.565 13.69z" />
<glyph unicode="&#xe60c;" glyph-name="drag" horiz-adv-x="1253" d="M808.252 683.069h-766.39c-12.881 0-25.761-12.881-25.761-25.761s12.881-25.761 25.761-25.761h766.39c12.881 0 25.761 12.881 25.761 25.761s-12.881 25.761-25.761 25.761zM808.252 470.541h-766.39c-12.881 0-25.761-12.881-25.761-25.761s12.881-25.761 25.761-25.761h766.39c12.881 0 25.761 12.881 25.761 25.761 0 19.321-12.881 25.761-25.761 25.761zM808.252 264.453h-766.39c-12.881 0-25.761-12.881-25.761-25.761s12.881-25.761 25.761-25.761h766.39c12.881 0 25.761 12.881 25.761 25.761s-12.881 25.761-25.761 25.761zM1065.862 122.767v663.346c0 19.321 19.321 38.642 38.642 38.642v0c19.321 0 38.642-19.321 38.642-38.642v0-663.346c0-19.321-19.321-38.642-38.642-38.642v0c-19.321 0-38.642 19.321-38.642 38.642v0zM1040.101 715.27v0h-70.843l141.686 244.73 141.686-244.73h-212.528zM1104.503 792.553v0 0 0 0zM969.258 180.73h283.371l-141.686-244.73-141.686 244.73zM1110.943 97.006v0 0 0 0z" />
<glyph unicode="&#xe60d;" glyph-name="edit" d="M868.456 525.772c0 0 0 0 0 0l155.544 155.544-278.684 278.684-661.063-661.063-84.253-362.937 362.937 84.253 71.291 71.291c0 0 0 0 0 0s0 0 0 0l434.228 434.228c0 0 0 0 0 0zM745.316 778.532l97.215-97.215-19.443-19.443-97.215 97.215 19.443 19.443zM388.861 227.646l-97.215 97.215 343.494 343.494 97.215-97.215-343.494-343.494zM168.506 104.506l32.405 129.62 97.215-97.215-129.62-32.405z" />
<glyph unicode="&#xe60e;" glyph-name="insert-case" horiz-adv-x="1017" d="M291.49 742.682h528.75c13.558 0 20.337-6.779 20.337-20.337s-13.558-20.337-20.337-20.337h-528.75c-13.558 0-20.337 6.779-20.337 20.337 0 6.779 13.558 20.337 20.337 20.337zM291.49 546.095h528.75c13.558 0 20.337-6.779 20.337-20.337s-13.558-20.337-20.337-20.337h-528.75c-13.558 0-20.337 6.779-20.337 20.337s13.558 20.337 20.337 20.337zM494.855 349.509h325.384c13.558 0 20.337-6.779 20.337-20.337s-13.558-20.337-20.337-20.337h-325.384c-13.558 0-20.337 6.779-20.337 20.337s13.558 20.337 20.337 20.337zM94.904 783.355v-366.057h88.125v366.057c0 47.452 40.673 88.125 88.125 88.125h569.423c47.452 0 88.125-40.673 88.125-88.125v-535.528c0-47.452-40.673-88.125-88.125-88.125h-352.5v-88.125h352.5c101.683 0 176.25 81.346 176.25 176.25v535.528c0 101.683-81.346 176.25-176.25 176.25h-569.423c-94.904 6.779-176.25-74.567-176.25-176.25zM399.952 342.73h-386.394l115.24-122.019-128.798-122.019 155.913-162.692 128.798 128.798 115.24-115.24z" />
<glyph unicode="&#xe60f;" glyph-name="insert-footnote" horiz-adv-x="1061" d="M896.934 877.781l-284.029-366.248v-7.474l448.467 59.796v-201.81l-448.467 52.321v-7.474l284.029-358.774-186.861-104.642-179.387 411.095h-7.474l-194.336-418.569-171.912 104.642 284.029 358.774v7.474l-440.993-59.796v201.81l433.518-59.796v7.474l-276.555 358.774 179.387 104.642 186.861-411.095h7.474l179.387 411.095 186.861-82.219z" />
<glyph unicode="&#xe610;" glyph-name="open-doc" horiz-adv-x="887" d="M880.64 802.987l-157.013 157.013h-471.040c-102.4 0-184.32-81.92-184.32-184.32v-361.813h81.92v361.813c0 54.613 47.787 102.4 102.4 102.4h430.080l116.053-116.053v-634.88c0-54.613-47.787-102.4-102.4-102.4h-225.28v-88.747h225.28c102.4 0 184.32 81.92 184.32 184.32v682.667zM628.053 707.413h259.413l-259.413 238.933zM402.773 338.773h-389.12l116.053-116.053-129.707-129.707 157.013-157.013 129.707 129.707 116.053-122.88z" />
<glyph unicode="&#xe611;" glyph-name="options" horiz-adv-x="260" d="M259.606 830.197c0-71.688-58.115-129.803-129.803-129.803s-129.803 58.115-129.803 129.803c0 71.688 58.115 129.803 129.803 129.803s129.803-58.115 129.803-129.803zM259.606 447.999c0-71.688-58.115-129.803-129.803-129.803s-129.803 58.115-129.803 129.803c0 71.688 58.115 129.803 129.803 129.803s129.803-58.115 129.803-129.803zM259.606 65.802c0-71.688-58.115-129.803-129.803-129.803s-129.803 58.115-129.803 129.803c0 71.688 58.115 129.803 129.803 129.803s129.803-58.115 129.803-129.803z" />
<glyph unicode="&#xe612;" glyph-name="remove" horiz-adv-x="796" d="M55.351 710.919v-684.973c0-48.432 41.514-89.946 89.946-89.946h505.081c48.432 0 89.946 41.514 89.946 89.946v684.973h-684.973zM0 897.73v-103.784h795.676v103.784h-262.919v62.27h-269.838v-62.27z" />
<glyph unicode="&#xe613;" glyph-name="rename" horiz-adv-x="1517" d="M237.034 267.852l-104.296-322.37h-132.741l350.815 1014.519h161.185l350.815-1014.519h-142.222l-104.296 322.37h-379.259zM568.886 372.149l-104.296 293.926c-18.963 66.37-37.926 123.259-56.889 189.63v0c-18.963-56.889-28.444-123.259-47.407-180.148l-104.296-293.926h312.889zM1507.553 116.149c0-66.37 0-123.259 9.481-170.667h-113.778l-9.481 94.815c-37.926-56.889-123.259-104.296-227.556-104.296-151.704 0-227.556 104.296-227.556 208.593 0 180.148 161.185 274.963 436.148 274.963v9.481c0 56.889-18.963 170.667-170.667 170.667-66.37 0-142.222-18.963-189.63-56.889l-28.444 85.333c56.889 37.926 151.704 66.37 237.037 66.37 227.556 0 274.963-151.704 274.963-303.407v-274.963zM1384.293 315.26c-142.222 0-312.889-18.963-312.889-161.185 0-85.333 56.889-123.259 123.259-123.259 94.815 0 151.704 56.889 180.148 123.259 0 9.481 9.481 28.444 9.481 37.926v123.259z" />
<glyph unicode="&#xe614;" glyph-name="search" horiz-adv-x="1021" d="M373.622 212.757c-96.865 0-193.73 34.595-262.919 110.703v0c-76.108 76.108-110.703 166.054-110.703 262.919v0c0 96.865 34.595 193.73 110.703 262.919v0c76.108 76.108 166.054 110.703 262.919 110.703v0c96.865 0 193.73-34.595 262.919-110.703v0 0c76.108-76.108 110.703-166.054 110.703-262.919v0c0-96.865-34.595-193.73-110.703-262.919v0c-69.189-76.108-166.054-110.703-262.919-110.703v0c0 0 0 0 0 0v0zM179.892 780.108c-55.351-55.351-83.027-124.541-83.027-193.73v0c0-69.189 27.676-138.378 83.027-193.73v0c55.351-55.351 124.541-83.027 193.73-83.027v0c69.189 0 138.378 27.676 193.73 83.027v0c55.351 55.351 83.027 124.541 83.027 193.73v0c0 69.189-27.676 138.378-83.027 193.73v0 0c-55.351 55.351-124.541 83.027-193.73 83.027v0c-69.189-6.919-138.378-34.595-193.73-83.027v0zM844.108-36.324l-276.757 276.757c-41.514 41.514-41.514 103.784 0 145.297v0c41.514 41.514 103.784 41.514 145.297 0v0l276.757-276.757c41.514-41.514 41.514-103.784 0-145.297v0c-20.757-20.757-48.432-27.676-69.189-27.676v0c-27.676 0-55.351 6.919-76.108 27.676v0z" />
<glyph unicode="&#xe615;" glyph-name="settings" horiz-adv-x="1031" d="M86.536-64h72.113v288.451h-72.113v-288.451zM86.536 960v-310.085h72.113v310.085h-72.113zM483.156 960v-512h72.113v512h-72.113zM483.156-64h72.113v86.535h-72.113v-86.535zM872.564 960v-93.746h72.113v93.746h-72.113zM872.564-64h72.113v504.789h-72.113v-504.789zM0 606.647h245.183v-338.93h-245.183v338.93zM396.62 404.733h245.183v-338.93h-245.183v338.93zM786.029 822.985h245.183v-338.93h-245.183v338.93z" />
<glyph unicode="&#xe616;" glyph-name="user-profile" horiz-adv-x="1250" d="M617.024-64c649.366 0 632.715 183.154 632.715 199.805 0 8.325-8.325 8.325-8.325 8.325-24.976 24.976-308.033 141.528-357.984 141.528s-83.252 33.301-91.577 58.276c-8.325 24.976 33.301 116.553 24.976 133.203 0 0 16.65-8.325 24.976-8.325s16.65 8.325 16.65 24.976c0 8.325 8.325 49.951 8.325 49.951s8.325 33.301 8.325 49.951c0 24.976-8.325 24.976-16.65 24.976s0 74.927 0 74.927c0 0 24.976 141.528-33.301 166.504-8.325 33.301-33.301 41.626-58.276 58.276 0 8.325-66.602 41.626-141.528 41.626v0c0 0-8.325 0-8.325 0s-8.325 0-8.325 0v0c-74.927-8.325-141.528-33.301-141.528-41.626-24.976-16.65-49.951-24.976-58.276-58.276-58.276-24.976-33.301-166.504-33.301-166.504s8.325-74.927 0-74.927c-8.325 0-16.65 0-16.65-24.976 0-16.65 8.325-49.951 8.325-49.951s8.325-41.626 8.325-49.951c0-16.65 8.325-24.976 16.65-24.976s24.976 8.325 24.976 8.325c-8.325-16.65 33.301-108.228 24.976-133.203s-49.951-58.276-91.577-58.276c-49.951 0-308.033-108.228-333.008-133.203-8.325-8.325-8.325-16.65-16.65-33.301-8.325-33.301 24.976-183.154 616.065-183.154z" />
<glyph unicode="&#xe617;" glyph-name="view" horiz-adv-x="1502" d="M979.57 452.231c0-126.195-102.301-228.496-228.496-228.496s-228.496 102.301-228.496 228.496c0 126.195 102.301 228.496 228.496 228.496s228.496-102.301 228.496-228.496zM751.074-64c-321.587 0-609.322 194.645-744.727 482.38-8.463 16.926-8.463 42.314 0 59.24 135.405 296.198 423.141 482.38 744.727 482.38s609.322-194.645 744.727-482.38c8.463-16.926 8.463-42.314 0-59.24-135.405-296.198-423.141-482.38-744.727-482.38zM158.678 452.231c118.479-220.033 346.975-363.901 592.397-363.901s473.917 143.868 592.397 363.901c-118.479 220.033-346.975 363.901-592.397 363.901s-473.917-143.868-592.397-363.901z" />
<glyph unicode="&#xe900;" glyph-name="star-half" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538zM512 206.502l-0.942-0.496 0.942 570.768 111.736-226.396 249.836-36.304-180.788-176.222 42.678-248.83-223.462 117.48z" />
<glyph unicode="&#xe901;" glyph-name="star-full" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
<glyph unicode="&#xe902;" glyph-name="star-empty" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538zM512 206.502l-223.462-117.48 42.676 248.83-180.786 176.222 249.84 36.304 111.732 226.396 111.736-226.396 249.836-36.304-180.788-176.222 42.678-248.83-223.462 117.48z" />
<glyph unicode="&#xe903;" glyph-name="add-text-block" horiz-adv-x="896" d="M727.893-64h-727.893v851.285h727.893v-851.285zM86.357 28.523h542.848v666.219h-542.848v-666.219zM265.259 287.616l-49.344-160.384h-67.861l172.715 499.669h80.192l172.715-499.669h-67.861l-55.509 160.384h-185.067zM431.808 336.96l-49.344 141.888c-12.331 30.848-18.496 61.696-24.683 92.523v0c-6.165-30.848-18.496-61.696-24.683-92.523l-49.344-148.053h148.053zM727.893 960h166.549v-166.549h-166.549v166.549z" />
<glyph unicode="&#xe904;" glyph-name="book" d="M512.853 732.444l-419.499-228.494s-85.166-76.157 4.732-189.622l414.777-150.773-3.154 31.090-394.268 141.446s-48.89 68.392-3.154 124.345l397.426-136.781 457.387 245.584zM516.897 660.821l280.579-94.612-92.501-45.372-281.896 92.894zM967.088 508.612l-39.433-21.751v-68.398l-417.963-224.003 3.015-30.743 454.372 245.419z" />
<glyph unicode="&#xe905;" glyph-name="grad-cap" d="M512 832l470.016-256v-342.016h-86.016v296.021l-384-210.005-470.016 256zM214.016 397.995l297.984-164.011 297.984 164.011v-171.947l-297.984-162.048-297.984 162.005v171.947z" />
<glyph unicode="&#xe906;" glyph-name="next" d="M170.667 746.667v-597.333l276.288 298.667-276.288 298.667zM577.045 746.667v-597.333l276.288 298.667-276.288 298.667z" />
<glyph unicode="&#xe907;" glyph-name="audio" d="M64 647.883c-35.349 0-64-29.826-64-66.627v-266.506c0-36.8 28.651-66.627 64-66.627h181.333l224-233.193v866.145l-224-233.193h-181.333zM682.667 448.003c0 107.247-73.408 196.97-170.667 217.602v-68.692c61.611-19.166 106.667-78.619 106.667-148.91s-45.056-129.744-106.667-148.91v-68.692c97.259 20.632 170.667 110.356 170.667 217.602zM853.333 448.003c0 165.323-96.896 307.526-234.667 368.289v-73.889c101.376-55.944 170.667-166.855 170.667-294.401s-69.291-238.456-170.667-294.401v-73.889c137.771 60.763 234.667 202.967 234.667 368.289zM725.333 960.006v-76.443c140.651-89.901 234.667-251.493 234.667-435.56s-94.016-345.636-234.667-435.56v-76.443c177.301 96.475 298.667 289.714 298.667 512.003s-121.365 415.528-298.667 512.003z" />
<glyph unicode="&#xe908;" glyph-name="prev" d="M853.333 746.667v-597.333l-276.288 298.667 276.288 298.667zM446.955 746.667v-597.333l-276.288 298.667 276.288 298.667z" />
<glyph unicode="&#xe909;" glyph-name="shop" horiz-adv-x="1155" d="M527.463 32.215c0-53.138-43.077-96.215-96.215-96.215s-96.215 43.077-96.215 96.215c0 53.138 43.077 96.215 96.215 96.215s96.215-43.077 96.215-96.215zM946.685 32.215c0-53.138-43.077-96.215-96.215-96.215s-96.215 43.077-96.215 96.215c0 53.138 43.077 96.215 96.215 96.215s96.215-43.077 96.215-96.215zM1096.161 655.893c-121.987 0-592.752 0-592.752 0s-34.362-8.591-34.362-46.389c0-37.799 34.362-49.826 34.362-49.826h530.899l-29.208-101.369c-146.040 0-522.309 0-522.309 0s-32.644-6.872-32.644-42.953c0-36.081 32.644-46.389 32.644-46.389h496.537l-27.49-94.497h-541.208l-36.081 285.208-12.027 96.215c0 0-10.309 89.342-15.463 125.423-6.872 36.081-97.933 82.47-297.235 175.248-46.389 20.617-84.188-65.289 0-109.96l156.349-72.161c0 0 36.081-20.617 39.517-49.826s67.007-498.255 67.007-498.255 1.718-65.289 61.852-65.289c60.134 0 546.362 0 596.188 0s60.134 51.544 60.134 51.544l118.55 350.497c-1.718 0 34.362 92.779-53.262 92.779z" />
<glyph unicode="&#xe90a;" glyph-name="text" horiz-adv-x="1117" d="M739.77 642.025c-6.284 47.849-24.204 80.221-53.783 97.117-16.617 9.286-41.449 14.383-74.496 15.267v-349.417c0-24.413 4.282-40.634 12.8-48.593 8.541-8.006 26.298-12.009 53.295-12.009v-16.849h-236.428v16.849c25.903 0 43.101 4.049 51.665 12.148 8.518 8.099 12.777 24.25 12.777 48.454v349.417c-32.372-0.884-57.228-5.981-74.496-15.267-31.721-17.315-49.641-49.711-53.737-97.117h-19.13l0.675 133.748h399.313l0.628-133.748h-19.084zM1024 960h-930.909c-51.409 0-93.091-41.681-93.091-93.091v-651.636c0-51.409 41.681-93.091 93.091-93.091h139.636v-186.182l197.818 186.182h593.455c51.409 0 93.091 41.681 93.091 93.091v651.636c0 51.409-41.681 93.091-93.091 93.091z" />
<glyph unicode="&#xe90b;" glyph-name="mic" d="M480 256c88.366 0 160 71.634 160 160v384c0 88.366-71.634 160-160 160s-160-71.634-160-160v-384c0-88.366 71.636-160 160-160zM704 512v-96c0-123.71-100.29-224-224-224-123.712 0-224 100.29-224 224v96h-64v-96c0-148.238 112.004-270.3 256-286.22v-129.78h-128v-64h320v64h-128v129.78c143.994 15.92 256 137.982 256 286.22v96h-64z" />
<glyph unicode="&#xe90c;" glyph-name="insert-symbol" d="M704 64h256l64 128v-256h-384v214.214c131.112 56.484 224 197.162 224 361.786 0 214.432-157.598 382.266-352 382.266-194.406 0-352-167.832-352-382.266 0-164.624 92.886-305.302 224-361.786v-214.214h-384v256l64-128h256v32.59c-187.63 66.46-320 227.402-320 415.41 0 247.424 229.23 448 512 448s512-200.576 512-448c0-188.008-132.37-348.95-320-415.41v-32.59z" />
<glyph unicode="&#xe90d;" glyph-name="skip-prev" d="M406 426.667l362 256v-512zM256 682.667h86v-512h-86v512z" />
<glyph unicode="&#xe90e;" glyph-name="skip-next" d="M682 682.667h86v-512h-86v512zM256 170.667v512l362-256z" />
<glyph unicode="&#xe90f;" glyph-name="stop" d="M256 682.667h512v-512h-512v512z" />
<glyph unicode="&#xe910;" glyph-name="pause" d="M598 724.667h170v-596h-170v596zM256 128.667v596h170v-596h-170z" />
<glyph unicode="&#xe911;" glyph-name="video" horiz-adv-x="1463" d="M590.664 247.978v405.038l362.371-202.518-362.371-202.518zM1217.607 863.923h-972.353c-59.669 0-108.047-48.065-108.047-107.347v-617.199c0-59.258 48.378-107.323 108.047-107.323h972.353c59.669 0 108.023 48.065 108.023 107.323v617.199c0 59.283-48.354 107.347-108.023 107.347z" />
<glyph unicode="&#xe912;" glyph-name="video-camera" d="M1024 749.714v-621.714q0-24-22.286-33.714-7.429-2.857-14.286-2.857-15.429 0-25.714 10.857l-230.286 230.286v-94.857q0-68-48.286-116.286t-116.286-48.286h-402.286q-68 0-116.286 48.286t-48.286 116.286v402.286q0 68 48.286 116.286t116.286 48.286h402.286q68 0 116.286-48.286t48.286-116.286v-94.286l230.286 229.714q10.286 10.857 25.714 10.857 6.857 0 14.286-2.857 22.286-9.714 22.286-33.714z" />
<glyph unicode="&#xe913;" glyph-name="warning" d="M1010.432 121.248l-383.968 768c-21.664 43.36-65.952 70.752-114.464 70.752s-92.8-27.392-114.464-70.752l-383.968-768c-19.84-39.68-17.728-86.816 5.6-124.576 23.328-37.696 64.512-60.672 108.864-60.672h767.904c44.384 0 85.568 22.976 108.864 60.672 23.328 37.76 25.44 84.896 5.632 124.576zM575.936 96c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v64c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32v-64zM575.936 352c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v320c0 17.664 14.304 32 32 32h64c17.696 0 32-14.336 32-32v-320z" />
<glyph unicode="&#xe914;" glyph-name="edit2" horiz-adv-x="1019" d="M507.429 274.286l66.286 66.286-86.857 86.857-66.286-66.286v-32h54.857v-54.857h32zM758.857 685.714q-9.143 9.143-18.857-0.571l-200-200q-9.714-9.714-0.571-18.857t18.857 0.571l200 200q9.714 9.714 0.571 18.857zM804.571 346.286v-108.571q0-68-48.286-116.286t-116.286-48.286h-475.429q-68 0-116.286 48.286t-48.286 116.286v475.429q0 68 48.286 116.286t116.286 48.286h475.429q36 0 66.857-14.286 8.571-4 10.286-13.143 1.714-9.714-5.143-16.571l-28-28q-8-8-18.286-4.571-13.143 3.429-25.714 3.429h-475.429q-37.714 0-64.571-26.857t-26.857-64.571v-475.429q0-37.714 26.857-64.571t64.571-26.857h475.429q37.714 0 64.571 26.857t26.857 64.571v72q0 7.429 5.143 12.571l36.571 36.571q8.571 8.571 20 4t11.429-16.571zM749.714 768l164.571-164.571-384-384h-164.571v164.571zM1003.429 692.571l-52.571-52.571-164.571 164.571 52.571 52.571q16 16 38.857 16t38.857-16l86.857-86.857q16-16 16-38.857t-16-38.857z" />
<glyph unicode="&#xe915;" glyph-name="brush" d="M881.76 690.56c-43.36-52.704-162.24-198.24-256.672-313.92l-119.904 121.728c108.448 96.512 242.688 215.808 291.2 258.528 86.304 76.064 161.984 121.312 178.432 102.816 10.304-10.24-17.056-76.672-93.056-169.152zM604.128 351.040c-36.576-44.768-68.064-83.328-87.328-106.976l-141.952 138.336c23.008 20.48 61.312 54.56 105.728 94.048l123.552-125.408zM495.648 218.144v0.384c-82.4-316.16-448.576-134.4-448.576-134.4s153.632-19.36 153.632 123.936c0 138.912 141.184 151.456 149.856 152.096l145.376-141.664c0-0.032-0.288-0.352-0.288-0.352z" />
<glyph unicode="&#xe916;" glyph-name="link" d="M440.236 324.234c-13.31 0-26.616 5.076-36.77 15.23-95.134 95.136-95.134 249.934 0 345.070l192 192c46.088 46.086 107.36 71.466 172.534 71.466s126.448-25.38 172.536-71.464c95.132-95.136 95.132-249.934 0-345.070l-87.766-87.766c-20.308-20.308-53.23-20.308-73.54 0-20.306 20.306-20.306 53.232 0 73.54l87.766 87.766c54.584 54.586 54.584 143.404 0 197.99-26.442 26.442-61.6 41.004-98.996 41.004s-72.552-14.562-98.996-41.006l-192-191.998c-54.586-54.586-54.586-143.406 0-197.992 20.308-20.306 20.306-53.232 0-73.54-10.15-10.152-23.462-15.23-36.768-15.23zM256-52c-65.176 0-126.45 25.38-172.534 71.464-95.134 95.136-95.134 249.934 0 345.070l87.764 87.764c20.308 20.306 53.234 20.306 73.54 0 20.308-20.306 20.308-53.232 0-73.54l-87.764-87.764c-54.586-54.586-54.586-143.406 0-197.992 26.44-26.44 61.598-41.002 98.994-41.002s72.552 14.562 98.998 41.006l192 191.998c54.584 54.586 54.584 143.406 0 197.992-20.308 20.308-20.306 53.232 0 73.54 20.306 20.306 53.232 20.306 73.54-0.002 95.132-95.134 95.132-249.932 0.002-345.068l-192.002-192c-46.090-46.088-107.364-71.466-172.538-71.466z" />
<glyph unicode="&#xe917;" glyph-name="coin" d="M480 896c-265.096 0-480-214.904-480-480 0-265.098 214.904-480 480-480 265.098 0 480 214.902 480 480 0 265.096-214.902 480-480 480zM480 32c-212.078 0-384 171.922-384 384s171.922 384 384 384c212.078 0 384-171.922 384-384s-171.922-384-384-384zM512 448v128h128v64h-128v64h-64v-64h-128v-256h128v-128h-128v-64h128v-64h64v64h128.002l-0.002 256h-128zM448 448h-64v128h64v-128zM576.002 256h-64.002v128h64.002v-128z" />
<glyph unicode="&#xe918;" glyph-name="sort" horiz-adv-x="585" d="M585.143 329.143c0-9.714-4-18.857-10.857-25.714l-256-256c-6.857-6.857-16-10.857-25.714-10.857s-18.857 4-25.714 10.857l-256 256c-6.857 6.857-10.857 16-10.857 25.714 0 20 16.571 36.571 36.571 36.571h512c20 0 36.571-16.571 36.571-36.571zM585.143 548.571c0-20-16.571-36.571-36.571-36.571h-512c-20 0-36.571 16.571-36.571 36.571 0 9.714 4 18.857 10.857 25.714l256 256c6.857 6.857 16 10.857 25.714 10.857s18.857-4 25.714-10.857l256-256c6.857-6.857 10.857-16 10.857-25.714z" />
<glyph unicode="&#xe919;" glyph-name="check" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
<glyph unicode="&#xe91a;" glyph-name="download-pdf" horiz-adv-x="939" d="M845.505 217.835v-46.972c0-75.156-56.367-140.917-131.523-140.917h-497.908c-75.156 0-131.523 56.367-131.523 140.917v46.972h-84.55v-46.972c0-122.128 93.945-225.468 216.073-225.468h507.303c122.128 0 216.073 103.339 216.073 225.468v46.972h-93.945zM845.505 584.22h-206.679v375.78h-347.596v-375.78h-197.284l375.78-375.78z" />
<glyph unicode="&#xe91b;" glyph-name="duplicate" horiz-adv-x="1068" d="M632.099 479.605v120.099c0 82.173-63.21 151.704-145.383 151.704h-341.333c-82.173 0-145.383-69.531-145.383-151.704v-512c0-82.173 63.21-151.704 145.383-151.704h341.333c63.21 0 120.099 44.247 139.062 101.136h-63.21c-12.642-25.284-44.247-44.247-75.852-44.247h-341.333c-50.568 0-88.494 37.926-88.494 88.494v518.321c0 50.568 37.926 88.494 88.494 88.494h341.333c44.247 0 82.173-37.926 82.173-88.494v-113.778h63.21zM575.21 416.395h278.123v-278.123l-75.852 75.852-139.062-139.062-126.42 126.42 139.062 139.062zM619.457 612.346v-63.21h-183.309v189.63h56.889c69.531 0 126.42-56.889 126.42-126.42zM967.111 207.802c-12.642-6.321-25.284-6.321-44.247-6.321v-63.21c25.284 0 50.568 6.321 75.852 18.963l-31.605 50.568zM1011.358 289.975c0-18.963-6.321-31.605-12.642-44.247l50.568-25.284c12.642 25.284 18.963 50.568 18.963 69.531v0h-56.889zM1011.358 410.074v-63.21h56.889v63.21h-56.889zM1011.358 536.494v-63.21h56.889v63.21h-56.889zM1011.358 656.593v-63.21h56.889v63.21h-56.889zM455.111 884.148c-12.642-18.963-18.963-50.568-18.963-69.531v0h56.889c0 18.963 6.321 31.605 12.642 44.247l-50.568 25.284zM581.531 960c-25.284 0-50.568-6.321-69.531-18.963l31.605-50.568c12.642 6.321 25.284 12.642 37.926 12.642v56.889zM771.16 960v-56.889h63.21v56.889h-63.21zM644.741 960v-56.889h63.21v56.889h-63.21zM1068.247 827.259v-107.457h-56.889v44.247h-139.062v195.951h69.531c69.531 0 126.42-56.889 126.42-132.741z" />
<glyph unicode="&#xe953;" glyph-name="calendar" d="M320 576h128v-128h-128zM512 576h128v-128h-128zM704 576h128v-128h-128zM128 192h128v-128h-128zM320 192h128v-128h-128zM512 192h128v-128h-128zM320 384h128v-128h-128zM512 384h128v-128h-128zM704 384h128v-128h-128zM128 384h128v-128h-128zM832 960v-64h-128v64h-448v-64h-128v64h-128v-1024h960v1024h-128zM896 0h-832v704h832v-704z" />
<glyph unicode="&#xe968;" glyph-name="redo2" d="M576 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
<glyph unicode="&#xe9d2;" glyph-name="bookmark" d="M192 960v-1024l320 320 320-320v1024z" />
<glyph unicode="&#xea03;" glyph-name="point-up" d="M960 352v160c0 52.934-43.066 96-96 96-17.104 0-33.176-4.494-47.098-12.368-17.076 26.664-46.958 44.368-80.902 44.368-24.564 0-47.004-9.274-64-24.504-16.996 15.23-39.436 24.504-64 24.504-11.214 0-21.986-1.934-32-5.484v229.484c0 52.934-43.066 96-96 96s-96-43.066-96-96v-394.676l-176.018 93.836c-14.536 8.4-31.126 12.84-47.982 12.84-52.934 0-96-43.066-96-96 0-26.368 10.472-50.954 29.49-69.226 0.248-0.238 0.496-0.47 0.75-0.7l239.17-218.074h-45.41c-17.672 0-32-14.326-32-32v-192c0-17.674 14.328-32 32-32h640c17.674 0 32 14.326 32 32v192c0 17.674-14.326 32-32 32h-44.222l72.844 145.69c2.222 4.442 3.378 9.342 3.378 14.31zM896 96c0-17.674-14.326-32-32-32s-32 14.326-32 32 14.326 32 32 32 32-14.326 32-32zM896 359.554l-83.776-167.554h-383.826l-290.818 265.166c-6.18 6.070-9.58 14.164-9.58 22.834 0 17.644 14.356 32 32 32 5.46 0 10.612-1.31 15.324-3.894 0.53-0.324 1.070-0.632 1.622-0.926l224-119.416c9.92-5.288 21.884-4.986 31.52 0.8 9.638 5.782 15.534 16.196 15.534 27.436v448c0 17.644 14.356 32 32 32s32-14.356 32-32v-320c0-17.672 14.326-32 32-32s32 14.328 32 32c0 17.644 14.356 32 32 32s32-14.356 32-32c0-17.672 14.326-32 32-32s32 14.328 32 32c0 17.644 14.356 32 32 32s32-14.356 32-32v-32c0-17.672 14.326-32 32-32s32 14.328 32 32c0 17.644 14.356 32 32 32s32-14.356 32-32v-152.446z" />
<glyph unicode="&#xea1c;" glyph-name="caret" d="M192 832l640-384-640-384z" />
<glyph unicode="&#xea88;" glyph-name="google-plus" d="M559.066 896c0 0-200.956 0-267.94 0-120.12 0-233.17-91.006-233.17-196.422 0-107.726 81.882-194.666 204.088-194.666 8.498 0 16.756 0.17 24.842 0.752-7.93-15.186-13.602-32.288-13.602-50.042 0-29.938 16.104-54.21 36.468-74.024-15.386 0-30.242-0.448-46.452-0.448-148.782 0.002-263.3-94.758-263.3-193.020 0-96.778 125.542-157.314 274.334-157.314 169.624 0 263.306 96.244 263.306 193.028 0 77.6-22.896 124.072-93.686 174.134-24.216 17.144-70.53 58.836-70.53 83.344 0 28.72 8.196 42.868 51.428 76.646 44.312 34.624 75.672 83.302 75.672 139.916 0 67.406-30.020 133.098-86.372 154.772h84.954l59.96 43.344zM465.48 240.542c2.126-8.972 3.284-18.206 3.284-27.628 0-78.2-50.392-139.31-194.974-139.31-102.842 0-177.116 65.104-177.116 143.3 0 76.642 92.126 140.444 194.964 139.332 24-0.254 46.368-4.116 66.67-10.69 55.826-38.826 95.876-60.762 107.172-105.004zM300.818 532.224c-69.038 2.064-134.636 77.226-146.552 167.86-11.916 90.666 34.37 160.042 103.388 157.99 69.010-2.074 134.638-74.814 146.558-165.458 11.906-90.66-34.39-162.458-103.394-160.392zM832 704v192h-64v-192h-192v-64h192v-192h64v192h192v64z" />
<glyph unicode="&#xea8c;" glyph-name="facebook-2" d="M672 768c-88.366 0-160-71.634-160-160v-96h-128v-128h128v-448h128v448h144l32 128h-176v96c0 17.672 14.326 32 32 32h160v128h-160z" />
<glyph unicode="&#xea8d;" glyph-name="facebook" d="M853.35 960h-682.702c-94.25 0-170.648-76.42-170.648-170.686v-682.63c0-94.266 76.398-170.684 170.648-170.684h341.352v448h-128v128h128v96c0 88.366 71.634 160 160 160h160v-128h-160c-17.674 0-32-14.328-32-32v-96h176l-32-128h-144v-448h213.35c94.25 0 170.65 76.418 170.65 170.684v682.63c0 94.266-76.4 170.686-170.65 170.686z" />
<glyph unicode="&#xea91;" glyph-name="twitter-2" d="M1024 765.582c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xea92;" glyph-name="twitter" d="M853.342 960h-682.656c-93.874 0-170.686-76.81-170.686-170.69v-682.624c0-93.936 76.812-170.686 170.686-170.686h682.656c93.876 0 170.658 76.75 170.658 170.69v682.62c0 93.88-76.782 170.69-170.658 170.69zM766.478 578.52c0.252-5.632 0.38-11.296 0.38-16.988 0-173.51-132.070-373.588-373.584-373.588-74.15 0-143.168 21.738-201.276 58.996 10.272-1.218 20.724-1.84 31.322-1.84 61.518 0 118.134 20.992 163.072 56.21-57.458 1.054-105.948 39.020-122.658 91.184 8.018-1.532 16.244-2.36 24.704-2.36 11.976 0 23.578 1.61 34.592 4.61-60.064 12.066-105.326 65.132-105.326 128.75 0 0.554 0 1.104 0.012 1.652 17.7-9.834 37.948-15.742 59.47-16.424-35.232 23.546-58.414 63.736-58.414 109.292 0 24.064 6.476 46.62 17.78 66.010 64.76-79.44 161.51-131.712 270.634-137.19-2.238 9.612-3.4 19.632-3.4 29.924 0 72.512 58.792 131.298 131.304 131.298 37.766 0 71.892-15.944 95.842-41.462 29.908 5.886 58.008 16.814 83.38 31.862-9.804-30.662-30.624-56.394-57.732-72.644 26.56 3.174 51.866 10.232 75.412 20.674-17.594-26.328-39.854-49.454-65.514-67.966z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="img/favicon/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="96.000000pt" height="96.000000pt" viewBox="0 0 96.000000 96.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,96.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M450 933 c-14 -2 -39 -11 -57 -19 -17 -8 -40 -14 -50 -14 -48 0 -146
-69 -204 -143 -21 -29 -44 -57 -49 -64 -6 -7 -10 -20 -10 -31 0 -10 -7 -27
-15 -38 -20 -27 -21 -240 -1 -281 8 -15 23 -46 33 -67 39 -84 185 -205 249
-206 10 -1 30 -7 44 -15 64 -36 259 -3 349 60 18 13 113 108 126 126 32 46 76
172 81 229 3 46 -20 132 -60 220 -17 38 -100 131 -148 165 -42 30 -200 86
-238 84 -14 -1 -36 -4 -50 -6z m249 -364 c110 -110 111 -112 111 -158 0 -37
-5 -52 -24 -70 -45 -42 -156 -24 -156 26 0 21 -8 16 -77 -47 -59 -54 -70 -60
-108 -60 -41 0 -47 5 -150 107 -125 125 -142 154 -119 208 28 68 127 82 179
25 10 -11 23 -20 29 -20 6 0 33 23 60 50 45 46 52 50 96 50 47 0 49 -1 159
-111z"/>
<path d="M473 579 c-24 -22 -43 -42 -43 -45 0 -2 18 -24 41 -49 22 -24 44 -56
48 -70 l7 -27 66 58 c37 33 67 64 67 69 1 6 -21 32 -47 58 -60 59 -83 60 -139
6z"/>
<path d="M242 568 c-24 -24 -12 -54 41 -106 29 -29 56 -52 59 -52 9 0 58 45
58 53 0 18 -116 117 -136 117 -6 0 -15 -5 -22 -12z"/>
<path d="M671 434 c-48 -40 -41 -56 22 -52 47 3 52 6 55 27 3 15 -3 30 -14 38
-24 18 -28 17 -63 -13z"/>
<path d="M420 385 c-7 -8 -10 -25 -6 -40 8 -33 45 -33 76 0 25 27 25 27 -7 44
-29 15 -48 14 -63 -4z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,14 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

View File

@@ -0,0 +1,35 @@
</div><!-- .content -->
<footer>
<div class="cont">
<div class="footer-right">
<?php if (has_nav_menu('bottom')) {
wp_nav_menu([
'menu' => 'bottom',
'menu_class' => 'nav',
'container' => 'div',
'container_class' => 'footer-menu',
'depth' => 1,
'theme_location' => 'bottom',
]);
}
if (has_nav_menu('social')):
?>
<div class="footer-social">
<!--
<a href="#" class="twitter"><span class="icon-twitter"></span></a>
<a href="#" class="facebook"><span class="icon-facebook"></span></a>
-->
</div>
<?php endif; ?>
</div>
<div class="footer-copyright">&copy; <?= get_option('lawcarta_company'); ?>. All rights reserved.</div>
</div>
</footer>
</div><!-- .wrapper -->
<?php wp_footer(); ?>
</body>
</html>

View File

@@ -0,0 +1,126 @@
<?php
/**
* Setup WordPress
*/
add_action('after_setup_theme', function () {
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support('title-tag');
register_nav_menus([
'top' => __('Top Menu', 'lawcarta'),
'bottom' => __('Bottom Menu', 'lawcarta'),
'social' => __( 'Social Links Menu', 'lawcarta' ),
]);
add_editor_style([
lawcarta_fonts_url(),
'assets/css/style.min.css',
'assets/css/newcss.min.css',
'assets/css/custom.css',
'assets/css/livecarta.css'
]);
});
/**
* Setup title
*/
add_filter('document_title_separator', function () {
return '|';
});
add_filter('document_title_parts', function ($title) {
unset($title['tagline']);
return $title;
}, 10, 1);
/**
* Enqueue scripts and styles.
*/
function lawcarta_fonts_url() {
$font_families = [
'Open Sans:300,400,600,700',
'PT Serif:400,700',
];
$query_args = [
'family' => urlencode(implode('|', $font_families)),
];
$fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css');
return esc_url_raw($fonts_url);
}
add_action('wp_enqueue_scripts', function () {
wp_enqueue_style('lawcarta-fonts', lawcarta_fonts_url(), array(), null);
wp_enqueue_script('custom-jquery', '//code.jquery.com/jquery-2.2.4.min.js', [], null, true);
wp_enqueue_style('bootstrap', '//stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', ['lawcarta-fonts'], null);
wp_enqueue_script('bootstrap', '//stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', ['custom-jquery'], null, true);
wp_enqueue_style('jquery-ui', '//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css', ['bootstrap'], null);
wp_enqueue_script('jquery-ui', '//code.jquery.com/ui/1.12.1/jquery-ui.min.js', ['custom-jquery'], null, true);
wp_enqueue_style('lawcarta-external-style', get_theme_file_uri('/assets/css/style.min.css'), ['jquery-ui']);
wp_enqueue_style('lawcarta-newcss', get_theme_file_uri('/assets/css/newcss.min.css'), ['lawcarta-external-style']);
wp_enqueue_style('lawcarta-custom', get_theme_file_uri('/assets/css/custom.css'), ['lawcarta-newcss']);
wp_enqueue_style('lawcarta-style', get_stylesheet_uri(), ['lawcarta-custom']);
});
/**
* Filter Menu Item Class
*/
add_filter('nav_menu_item_args', function ($args, $item) {
$classes = get_post_meta($item->ID, '_menu_item_classes', true);
if (is_array($classes)) {
$classes = array_filter($classes);
if (count($classes) > 0) {
$args->link_before = '<i class="' . implode(' ', $classes) . '"></i> ';
}
}
return $args;
}, 10, 2);
add_filter('nav_menu_css_class', function ($classes, $item, $args) {
$classes = [];
if ($args->theme_location === 'bottom' && in_array('current-menu-item', $classes)) {
$classes[] = 'active';
}
return $classes;
}, 10, 3);
/**
* Setup Admin Portal
*/
function lawcarta_company_field_cb() {
$setting = get_option('lawcarta_company');
$setting = isset( $setting ) ? esc_attr( $setting ) : '';
echo '<input type="text" name="lawcarta_company" value="' . $setting . '">';
}
add_action('admin_init', function () {
register_setting('general', 'lawcarta_company', [
'type' => 'string',
]);
add_settings_field(
'lawcarta_company_field',
__('Company Name', 'lawcarta'),
'lawcarta_company_field_cb',
'general'
);
});
/**
* Setup TinyMCE
*/
add_filter('tiny_mce_before_init', function ($settings) {
$opts = '*[*]';
$settings['valid_elements'] = $opts;
$settings['extended_valid_elements'] = $opts;
$settings['valid_children']="+a[div|p|ul|ol|li|h1|h2|h3|h4|h5|h5|h6]";
return $settings;
});

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<link rel="apple-touch-icon" sizes="60x60" href="<?= get_theme_file_uri('/assets/img/favicon/apple-touch-icon.png'); ?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?= get_theme_file_uri('/assets/img/favicon/favicon-32x32.png'); ?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?= get_theme_file_uri('/assets/img/favicon/favicon-16x16.png'); ?>">
<link rel="manifest" href="<?= get_theme_file_uri('/assets/img/favicon/site.webmanifest'); ?>">
<link rel="mask-icon" href="<?= get_theme_file_uri('/assets/img/favicon/safari-pinned-tab.svg'); ?>" color="#5bbad5">
<link rel="shortcut icon" href="<?= get_theme_file_uri('/assets/img/favicon/favicon.ico'); ?>" type="image/x-icon">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="<?= get_theme_file_uri('/assets/img/favicon/browserconfig.xml'); ?>">
<meta name="theme-color" content="#ffffff">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class="wrapper">
<header>
<div class="cont">
<a href="<?= site_url(); ?>" class="main-logo"><img src="<?= get_theme_file_uri('/assets/img/logo.png'); ?>"></a>
<?php
if (has_nav_menu('top')) {
wp_nav_menu([
'menu' => 'top',
'menu_class' => 'navTab nav',
'container' => 'div',
'container_class' => 'header-menu',
'depth' => 1,
'theme_location' => 'top',
]);
}
?>
</div>
</header>
<div class="content">

View File

@@ -0,0 +1,5 @@
<?php get_header(); ?>
<?php get_footer(); ?>

View File

@@ -0,0 +1,21 @@
<?php
get_header();
if (have_posts()):
while (have_posts()):
the_post();
?>
<div class="top-panel empty"></div>
<div class="cont back-white">
<div class="text-page">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
</div>
<?php
endwhile;
endif;
get_footer();

View File

@@ -0,0 +1,15 @@
<?php
/**
* Template Name: Home Page
*/
get_header();
if (have_posts()):
while (have_posts()):
the_post();
the_content();
endwhile;
endif;
get_footer();

View File

@@ -0,0 +1,23 @@
<?php
/**
* Template Name: White Page
*/
get_header();
if (have_posts()):
while (have_posts()):
the_post();
?>
<div class="wrapper white">
<article class="promo">
<?= the_content(); ?>
</article>
</div>
<?php
endwhile;
endif;
get_footer();

View File

@@ -0,0 +1,11 @@
/*
Theme Name: LawCarta
Theme URI: https://www.lawcarta.com
Description: LawCarta Theme
Author: LawCarta
Author URI: https://www.lawcarta.com
Version: 1.0.0
.
LawCarta Theme.
.
*/

View File

@@ -0,0 +1,414 @@
/* LiveCarta */
.casebook-item .casebook-top:after {
height: 43px;
bottom: 18px;
background-image: url("../img/live-book-logo.png"); }
/* Buttons. */
.button {
background: #ff6b00; }
.button.xl {
height: 36px;
line-height: 36px;
padding: 0 8px; }
.button.xxl {
border-radius: 25px;
padding: 0 28px;
border: none;
height: 40px;
line-height: 40px; }
.button.add-chapter {
background: #0c4e91;
color: #fff; }
.button.add-chapter-front {
background: #0c4e91; }
.button.mp-top-left {
background: #ff6b00;
border-color: #ff6b00;
color: #fff; }
.button.mp-top-left:hover {
opacity: 1;
background: #ff8933;
border-color: #ff8933; }
.button.mp-top-right {
background: #134d94;
border-color: #134d94;
color: #fff; }
.button.mp-top-right:hover {
background: #1965c1;
background: #1965c1;
opacity: 1; }
.button.mp-btn {
background: #ff6b00;
border-color: #ff6b00; }
.button.mp-btn:hover {
opacity: 1;
background: #cc5600;
border-color: #cc5600; }
.button.bordered {
background: #fff;
border: 2px solid #134d96;
color: #134d96;
-webkit-box-shadow: none;
box-shadow: none;
line-height: 36px; }
.button.bordered.xxl {
-webkit-box-shadow: none;
box-shadow: none; }
.button.bordered:hover {
background: rgba(0, 0, 0, 0.05); }
.button.back-btn {
background: #fff;
border: 2px solid #0c4e91;
color: #0c4e91;
-webkit-box-shadow: none;
box-shadow: none; }
.button.back-btn.xxl {
line-height: 36px; }
.button.back-btn:hover {
background: rgba(0, 0, 0, 0.05);
color: #0c4e91;
opacity: 1; }
.button.green {
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #0c4e91;
border: 2px solid #0c4e91;
background: #fff;
-webkit-box-shadow: none !important;
box-shadow: none !important;
line-height: 25px; }
.button.green.xl {
line-height: 32px; }
.casebook-list .add-casebook {
background: #ff6b00;
border-color: #ff6b00;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
header {
background: #fff; }
header .main-logo {
height: 33px;
top: 20px; }
header .header-menu ul li a {
color: #0c4e91;
font-weight: bold; }
header .header-menu ul li a:hover {
color: #0c4e91;
border-bottom-color: #0c4e91; }
header .header-menu ul li a.selected {
color: #0c4e91;
border-bottom-color: #0c4e91; }
header .header-menu ul li.active a {
color: #ff6b00; }
header .header-menu ul li.active a:hover {
border-bottom-color: #ff6b00; }
header .sign-block a {
color: #ff6b00;
font-weight: bold; }
header .sign-block a:hover {
color: #ff6b00; }
header .sign-block > a, header .sign-block .signed-user {
color: #ff6b00; }
header .sign-block > a:hover, header .sign-block .signed-user:hover {
color: #ff6b00;
border-bottom-color: #ff6b00; }
header .sign-block > a .icon-caret, header .sign-block > a .icon-account-settings, header .sign-block .signed-user .icon-caret, header .sign-block .signed-user .icon-account-settings {
color: #0c4e91; }
header .sign-block .button.bordered {
color: #ff6b00;
border-color: #ff6b00;
border-radius: 20px;
height: 40px;
line-height: 36px; }
header .sign-block .button.bordered:hover {
border: 2px solid #ff6b00;
background: #ff6b00;
color: #fff; }
.form-group label {
color: #036; }
/* Tabset. */
ul.tabset-tabs li {
display: block;
float: left;
position: relative;
-webkit-box-shadow: none;
box-shadow: none; }
ul.tabset-tabs li + li {
margin-left: -1px; }
ul.tabset-tabs li a {
cursor: pointer;
display: block;
height: 40px;
line-height: 40px;
padding: 0 16px;
font-size: 14px;
color: #666;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
background: #fff;
border: 1px solid #cdc6c0;
border-radius: 0;
position: relative;
-webkit-box-shadow: none;
box-shadow: none;
font-weight: 400;
margin: 0;
top: -1px; }
@media (min-width: 640px) {
ul.tabset-tabs li a {
font-size: 18px;
padding: 0 16px; } }
ul.tabset-tabs li a:hover {
text-decoration: none;
background: #e0ded7;
color: #4d4d4d; }
ul.tabset-tabs li.active a {
color: #ff6b00;
font-weight: 400;
padding: 0 16px;
border-color: #cdc6c0;
border-bottom: none; }
ul.tabset-tabs li.active a:after {
content: "";
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 3px;
background: #ff6b00; }
ul.tabset-tabs li.active a:focus, ul.tabset-tabs li.active a:hover {
color: #ff6b00; }
/* Main Page */
.main-page .mp-top {
background-image: url(../img/main-page/top-bg-live.jpg); }
.main-page .mp-top .top-text {
background: -webkit-gradient(linear, left top, right top, from(rgba(19, 77, 149, 0.4)), to(rgba(1, 26, 51, 0.4)));
background: linear-gradient(to right, rgba(19, 77, 149, 0.4), rgba(1, 26, 51, 0.4)); }
.main-page .mp-capabs h4 {
color: #3090f0; }
.main-page .mp-capabs .cap-col .cc-img {
border: none;
background: #fff;
-webkit-box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.4);
box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.4); }
.main-page .mp-capabs .cap-col .cc-title {
color: #003366; }
.main-page .mp-capabs .cap-col .cc-text {
color: #475669; }
.main-page .mp-capabs .buttons {
margin-top: 60px;
text-align: center; }
.main-page .feature-block .cont {
color: #475669; }
.main-page .feature-block.with-bg {
background: -webkit-gradient(linear, left top, right top, from(#539aea), to(#0e3f7b));
background: linear-gradient(to right, #539aea, #0e3f7b); }
.main-page .feature-block.with-bg .cont {
color: #ffffff; }
.main-page .mp-footer {
background: -webkit-gradient(linear, left top, right top, from(#539aea), to(#0e3f7b));
background: linear-gradient(to right, #539aea, #0e3f7b); }
.main-page .mp-footer .buttons {
margin: 25px 0 22px; }
.main-page .mp-footer .buttons .button {
min-width: 175px; }
.main-page .mp-footer .copyright {
color: #fff;
font-size: 9px;
font-weight: 300;
margin-top: 5px; }
.main-page .mp-footer .bot-logo {
opacity: 0.35; }
h1, .sign-page h1 {
color: #3090f0; }
.sign-page .form-group label {
color: #003366; }
.casebook-header {
background: none;
background: #fefefe; }
.casebook-header:before {
display: none; }
.casebook-header .cont {
border: none; }
.casebook-tabs-links ul li, .casebook-tabs-links .right-download {
color: #475669;
cursor: pointer;
display: block;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
background: #fff;
font-weight: 400;
border: 1px solid #cdc6c0;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
margin: 0; }
.casebook-tabs-links ul li.selected, .casebook-tabs-links .right-download.selected {
margin-top: 0;
background: #fff;
color: #ff6b00;
font-weight: 400;
height: 40px;
line-height: 40px;
position: relative;
border-bottom: none;
padding: 0 16px; }
.casebook-tabs-links ul li.selected:before, .casebook-tabs-links .right-download.selected:before {
content: "";
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 3px;
background: #ff6b00; }
.casebook-tabs-links ul li {
float: left; }
.casebook-tabs-links ul li + li {
margin-left: -1px; }
.front-accordion .fa-head {
border: 1px solid #779bca;
color: #475669;
background: #fff;
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
position: relative;
z-index: 2; }
.front-accordion .fa-head .collapse-link {
color: #475669; }
.front-accordion .fa-head .collapse-link span {
color: #0c4e91; }
.front-accordion .form-group label {
color: #0c4e91; }
.casebook-chapter .chapter-head, .casebook-chapter .casebook-chapter .chapter-head {
border: 1px solid #779bca;
color: #475669;
background: #fff;
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
position: relative;
z-index: 2; }
.casebook-chapter .chapter-head .collapse-link .icon-caret, .casebook-chapter .casebook-chapter .chapter-head .collapse-link .icon-caret {
color: #0c4e91; }
.faux-modal .fa-mo-header {
background: #0c4e91; }
.faux-modal .fa-mo-header .cont {
color: #fff; }
.faux-modal .fa-mo-header .cont .fa-mo-close {
color: #fff; }
.faux-modal .fa-mo-header .cont .fa-mo-close:hover {
opacity: 0.7; }
.top-panel {
background: #134d96; }
.top-panel .cont {
color: #fff; }
.top-panel.cb-header {
background: #134d96; }
.top-panel.cb-header .casebook-name {
color: #fff; }
.top-panel.cb-header .button.green {
background: none;
border: 2px solid #fff;
color: #fff; }
.top-panel.cb-header .button.green .icon-view {
color: #fff; }
.top-panel h1 {
color: #fff; }
.casebook-item .casebook-bottom .casebook-title {
color: #475669; }
.casebook-item .casebook-bottom .casebook-author {
color: #475669; }
.casebook-item.add .add-btn {
border-color: #134d95;
background: #134d95; }
.chapters-nav .nav li a:hover,
.chapters-nav .nav li.active a,
.chapters-nav .nav li.active a:focus {
border-color: #144d96; }
.casebook-item .casebook-top {
background: #fff; }
.top-search .ts-tipsy {
color: #475669; }
.top-search .ts-search-bar .icon-search {
color: #475669; }
.casebook-header .casebook-name {
color: #0c4e91; }
.table-footnotes tr th {
color: #0c4e91; }
body .clickdesk-ultra .cdw-chat-bar-buttons span {
background: #1b62b9 !important; }
body .clickdesk-ultra .click-desk-closed-container .click-desk-closed-header {
background: #134d94 !important; }
body .clickdesk-ultra input.cdw-chat-contact-send-button {
background: #134d94 !important; }
body .clickdesk-ultra input.cdw-chat-contact-send-button:hover {
background: #1965c1 !important; }
body .clickdesk-ultra .cdw-chat-header {
background: #134d94 !important; }
body #clickdesk_popup {
-webkit-box-shadow: 0 0 7px rgba(0, 0, 0, 0.7);
box-shadow: 0 0 7px rgba(0, 0, 0, 0.7); }
.filter-bar .btn-link b {
color: #475669; }
.modal .modal-body .form-group.label-checkbox label {
color: #0c4e91; }
.checkout-table {
color: #475669; }
.checkout-table tr th {
font-size: 15px;
color: #003366; }
.checkout-table tr .book-title {
font-size: 14px;
color: #48566b; }
.checkout-table tr .book-info {
color: #475669; }
.checkout-btns .button.xxl {
line-height: 40px; }
.checkout-btns .button.back-btn {
line-height: 36px; }
.docs-accordion .accordion-heading a {
color: #003366; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/img/faviconlive/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="70.000000pt" height="70.000000pt" viewBox="0 0 70.000000 70.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,70.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M270 661 c-147 -48 -234 -164 -234 -311 0 -127 61 -227 177 -287 45
-24 64 -28 137 -28 73 0 93 4 142 28 65 32 121 90 152 156 30 65 30 197 0 262
-52 112 -153 180 -277 185 -40 2 -83 0 -97 -5z m198 -76 c28 -13 52 -26 52
-29 0 -3 -21 5 -47 16 -62 28 -170 30 -230 6 -24 -10 -43 -15 -43 -12 0 3 19
14 43 24 62 29 158 27 225 -5z m39 -172 c93 -97 102 -125 58 -168 -29 -30 -55
-32 -85 -7 -28 23 -19 48 11 31 11 -5 29 -7 40 -4 29 10 22 59 -9 63 -17 3
-42 -15 -101 -72 -103 -101 -109 -101 -217 7 -46 47 -86 95 -90 111 -10 41 22
80 70 84 34 3 42 -2 117 -78 44 -44 77 -85 74 -91 -4 -5 -21 -7 -39 -4 -39 8
-67 -16 -49 -43 20 -32 50 -18 128 57 l76 74 -43 44 c-23 23 -49 43 -57 43 -8
0 -30 -14 -48 -32 -26 -25 -36 -29 -45 -20 -9 9 -3 21 27 52 61 63 82 58 182
-47z"/>
<path d="M167 419 c-28 -16 -20 -42 31 -92 l48 -47 24 25 24 25 -40 41 c-49
51 -65 60 -87 48z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,14 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/img/faviconlive/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,10 @@
<?php
/**
* Enqueue scripts and styles.
*/
function livecarta_scripts() {
wp_enqueue_style('livecarta-external-style', get_theme_file_uri('/assets/css/livecarta.css'), ['lawcarta-custom']);
wp_enqueue_style('lawcarta-style', get_stylesheet_uri(), ['livecarta-external-style']);
}
add_action('wp_enqueue_scripts', 'livecarta_scripts');

View File

@@ -0,0 +1,12 @@
/*
Theme Name: LiveCarta
Theme URI: https://www.livecarta.com
Description: LiveCarta Theme
Author: LiveCarta
Author URI: https://www.livecarta.com
Template: lawcarta
Version: 1.0.0
.
LiveCarta Theme.
.
*/