diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 45e4a66..0000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README b/README deleted file mode 100644 index ae12630..0000000 --- a/README +++ /dev/null @@ -1,31 +0,0 @@ -== LICENSE == - -All parts of CVM are licensed under the WTFPL. Other licenses may apply to libraries or components that were incorporated from other projects. -Please read the LICENSE file for the full license text. - - -== USING SHADOW SOURCE FILES == - -Shadow source files are saved JSON objects from the multi-layer CSS3 shadow generator at http://haless.cryto.net/shadow/. To edit a shadow, simply load the string in the applicable text file into the shadow generator, and after editing save the shadow configuration and generate new CSS code. - - -== DIRECTORY STRUCTURE == - -repository root -|- design/ The first design proposal for the user frontend -| |- css/ CSS files for the design proposal -| `- images/ Images for the design proposal -`- graphics/ Original source files for images (.xcf, .svg, ...) and CSS3 shadows (.txt). -`- frontend/ Code for the frontend (this is the actual panel) -| |- classes/ Contains all class definitions -| |- cphp/ Contains the CPHP framework -| | ` components/ Contains additional CPHP components -| |- includes/ Contains all included/required files for the frontend -| |- locales/ Contains all CPHP locale files -| `- templates/ Contains all CPHP template files -`- runhelper/ This directory contains the runhelper script for the slave nodes - -== DEPENDENCIES == - -* autossh -* ... diff --git a/command_daemon/start_tunnel.py b/command_daemon/start_tunnel.py deleted file mode 100755 index a007f42..0000000 --- a/command_daemon/start_tunnel.py +++ /dev/null @@ -1,28 +0,0 @@ -import sys, os, subprocess - -stfu = open("/dev/null", "w") - -def run_command(args): - pr = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - data = pr.communicate() - pr.wait() - return pr.returncode - -host = sys.argv[1] -user = sys.argv[2] -port = int(sys.argv[3]) -keyfile = sys.argv[4] -session_key = sys.argv[5] - -if run_command(["ssh", "%s@%s" % (user, host), "-o", "UserKnownHostsFile=/etc/cvm/knownhosts", "-o", "StrictHostKeyChecking=no", "-i", keyfile, "cd /etc/cvm/command_daemon; echo '%s' > session_key && ./command_daemon" % session_key]) == 0: - # Make autossh verify the connection is still alive every 10 seconds. - os.environ["AUTOSSH_POLL"] = "10" - os.environ["AUTOSSH_FIRST_POLL"] = "10" - - if run_command(["autossh", "-f", "-i", keyfile, "-M", str(port + 1), "-o", "UserKnownHostsFile=/etc/cvm/knownhosts", "-o", "StrictHostKeyChecking=no", "%s@%s" % (user, host), "-L", "%s:localhost:3434" % port, "-N"]) == 0: - sys.stdout.write("Tunnel established.\n"); - exit(0) - else: - sys.stderr.write("Failed to establish tunnel.\n") -else: - sys.stderr.write("Failed to start daemon.\n") diff --git a/config.json b/config.json deleted file mode 100644 index 6490d5a..0000000 --- a/config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "database": { - "driver": "mysql", - "pdo": "true", - "hostname": "localhost", - "username": "root", - "password": "", - "database": "cvm" - }, - "locale": { - "path": "locales", - "extension": "lng", - "default_locale": "english", - "default_timezone": "Europe/Amsterdam" - }, - "memcache": { - "enabled": true, - "compressed": true, - "hostname": "localhost", - "port": 11211 - }, - "class_map": { - "user": "User", - "node": "Node", - "container": "Container", - "template": "Template" - }, - "components": [ - "router", - "errorhandler" - ], - "authentication": { - "salt": "abcdef", - "session_length": 2592000 - }, - "theme": "pure" -} diff --git a/console/master/dropper b/console/master/dropper deleted file mode 100755 index de7af3f..0000000 --- a/console/master/dropper +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/python - -import socket, sys, termios, tty, select, urllib, urllib2, json, warnings, getpass - -with warnings.catch_warnings(): - warnings.simplefilter("ignore") - import paramiko - -key = "abcde" -endpoint = "http://cvm.local/api.local.php" - -def posix_shell(chan, ctid): - oldtty = termios.tcgetattr(sys.stdin) - - enable_input = False - - try: - tty.setraw(sys.stdin.fileno()) - tty.setcbreak(sys.stdin.fileno()) - chan.settimeout(0.0) - - chan.send('%s\n' % ctid) - - while True: - r, w, e = select.select([chan, sys.stdin], [], []) - if chan in r: - try: - buff = chan.recv(1024) - - if len(buff) == 0: - print '\r\nYou have been logged out of your container. Goodbye!\r\n', - break - - if "entered into" in buff: - # Successfully entered into the container, we can enable user input now. - enable_input = True - - sys.stdout.write(buff) - sys.stdout.flush() - except socket.timeout: - pass - if sys.stdin in r: - if enable_input == True: - buff = sys.stdin.read(1) - - if len(buff) == 0: - break - - chan.send(buff) - - finally: - termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty) - -def open_shell(hostname, user, container): - ssh = paramiko.SSHClient() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - - sshkey = paramiko.RSAKey.from_private_key_file('/etc/cvm/key') - - ssh.connect(hostname, username=user, pkey=sshkey) - - chan = ssh.invoke_shell() - posix_shell(chan, container) - - chan.close() - ssh.close() - -def api_request(parameters, method="GET"): - if method == "GET": - querystring = urllib.urlencode(parameters) - req = urllib2.Request(endpoint + "?" + querystring) - response = urllib2.urlopen(req) - result = response.read() - return json.loads(result) - -def show_list(): - print "" - for key, vps in vpsmap.items(): - node = nodemap[vps['node_id']] - print "%s. %s (%s [%s], %s)" % (key, vps['hostname'], node['name'], node['hostname'], node['physical_location']) - - print "" - choice = raw_input("Make your choice: ") - - try: - current_vps = vpsmap[int(choice)] - current_node = nodemap[current_vps['node_id']] - - open_shell(current_node['hostname'], "vz", current_vps['internal_id']) - except KeyError, ValueError: - print "That was not a valid option. Try again. " - show_list() - except paramiko.AuthenticationException: - print "Could not connect to the node." - exit(1) - -print "#############################################################" -print "### CVM OpenVZ shell dropper ###" -print "#############################################################" -print "" -print "Please enter your VPS panel login details to continue." -print "" -username = raw_input("Username: ") -password = getpass.getpass("Password: ") -print "" - -auth_result = api_request({ - 'key': key, - 'action': "verify_user", - 'username': username, - 'password': password -}) - -if auth_result['data']['correct'] == True: - vpslist = api_request({ - 'key': key, - 'action': "list_vps", - 'userid': auth_result["data"]["userid"] - }) - - print "Select the container you wish to log in to." - print "" - - i = 1 - vpsmap = {} - nodelist = [] - nodemap = {} - - for vps in vpslist["data"]: - vpsmap[i] = vps - - if vps["node_id"] not in nodelist: - nodelist.append(vps["node_id"]) - - i += 1 - - for node in nodelist: - nodemap[node] = api_request({ - 'key': key, - 'action': "node_info", - 'nodeid': node - })['data'] - - show_list() - - exit(0) -else: - print "The supplied login details are invalid." - print "Your session will now be closed." - exit(1) diff --git a/console/slave/dropper b/console/slave/dropper deleted file mode 100755 index 49b28a2..0000000 --- a/console/slave/dropper +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/python -import sys, subprocess - -ctid = raw_input() -subprocess.call('clear') -subprocess.call(['sudo', 'vzctl', 'enter', ctid]) diff --git a/docs/api/client.html b/docs/api/client.html deleted file mode 100644 index 9784018..0000000 --- a/docs/api/client.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -

CVM Client API Documentation

Table of contents

Overview

The CVM Client API is a more or less RESTful API. That means it uses the standard HTTP 'verbs' like GET, POST, DELETE, etc. to execute certain commands. Authentication takes place per request (there is no concept of 'sessions') through the use of custom HTTP headers. Each API token pair is linked to a particular user, and can only be used for that user. A user can have multiple token pairs. Token pairs can be revoked at any time via the panel.

Authentication

The CVM Client API expects two custom HTTP headers as authentication.
API-Public-Token
This is the public part of your API token pair. It's used to identify who you are.
API-Private-Token
This is the private part of your API token pair. It's used to verify your access.
If no valid token pair is passed on with your request, the server will return a 401 Not Authorized status code.
If your token pair does not have access to the client API, the server will return a 403 Forbidden status code.

Response format

The API responses will always be in JSON format. If errors occurred, an errors key will be present containing an array of errors. If there is a response, a response key will be present containing the response.
Example: Valid API call
Code:
/api/client/vps/list
Output:
{
-    "response": {
-	"vpses": [{
-	    "id": "1",
-	    "virtualization_type": "1",
-	    "hostname": "test-vz.cryto.net",
-	    "guaranteed_ram": "128",
-	    "burstable_ram": "256",
-	    "disk_space": "5000",
-	    "cpu_count": "1",
-	    "traffic_in_limit": "500000000000",
-	    "traffic_out_limit": "500000000000",
-	    "traffic_in_used": "912727849",
-	    "traffic_out_used": "16923948"
-	}, {
-	    "id": "2",
-	    "virtualization_type": "1",
-	    "hostname": "test2.cryto.net",
-	    "guaranteed_ram": "512",
-	    "burstable_ram": "768",
-	    "disk_space": "40000",
-	    "cpu_count": "240",
-	    "traffic_in_limit": "500000000000",
-	    "traffic_out_limit": "500000000000",
-	    "traffic_in_used": "0",
-	    "traffic_out_used": "0"
-	}]
-    }
-}
Example: API call with invalid token pair
Code:
/api/client/vps/list
Output:
{
-    "errors": ["No valid API token pair was specified."]
-}

API Calls

GET /api/client/vps/list
This call will return a list of VPSes associated with the currently authenticated user. It takes no arguments.

Keys in the response objects

id
The numeric ID of this VPS. You will need this in further API calls.
node
The host node that this VPS exists on. You will need this in further node-related API calls.
virtualization_type
The virtualization platform used for this VPS. Right now the only supported value is 1 (OpenVZ).
hostname
The configured hostname of the VPS.
guaranteed_ram
The configured amount of guaranteed RAM, in megabytes.
burstable_ram
The configured amount of burstable RAM, in megabytes. This key may not be present if vSwap is used.
disk_space
The configured amount of disk space, in megabytes.
cpu_count
The amount of configured CPUs (or rather, CPU units) that this VPS has access to.
traffic_limit
The total traffic limit, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
traffic_used
The total amount of traffic used, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
traffic_in_limit
The total incoming traffic limit, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
traffic_in_used
The total amount of incoming traffic used, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
traffic_out_limit
The total outgoing traffic limit, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
traffic_out_used
The total amount of outgoing traffic used, in bytes. This may not be present, depending on the method of traffic measuring. See the explanation below.
Important: If traffic accounting for the VPS is combined (incoming + outgoing), a traffic_limit and traffic_used key will be present. If traffic accounting for the VPS is split, the keys traffic_in_limit, traffic_in_used, traffic_out_limit, and traffic_out_used will be present.
Example: Valid call to /api/client/vps/list
Output:
{
-    "response": {
-	"vpses": [{
-	    "id": "1",
-	    "node": "1",
-	    "virtualization_type": "1",
-	    "hostname": "test-vz.cryto.net",
-	    "guaranteed_ram": "128",
-	    "burstable_ram": "256",
-	    "disk_space": "5000",
-	    "cpu_count": "1",
-	    "traffic_in_limit": "500000000000",
-	    "traffic_out_limit": "500000000000",
-	    "traffic_in_used": "912727849",
-	    "traffic_out_used": "16923948"
-	}, {
-	    "id": "2",
-	    "node": "1",
-	    "virtualization_type": "1",
-	    "hostname": "test2.cryto.net",
-	    "guaranteed_ram": "512",
-	    "burstable_ram": "768",
-	    "disk_space": "40000",
-	    "cpu_count": "2",
-	    "traffic_in_limit": "500000000000",
-	    "traffic_out_limit": "500000000000",
-	    "traffic_in_used": "0",
-	    "traffic_out_used": "0"
-	}]
-    }
-}
- - diff --git a/docs/api/client.zpy b/docs/api/client.zpy deleted file mode 100644 index d04cd9c..0000000 --- a/docs/api/client.zpy +++ /dev/null @@ -1,230 +0,0 @@ -# CVM Client API Documentation - -{TOC} - -## Overview - -The CVM Client API is a more or less RESTful API. That means it uses the standard HTTP 'verbs' like GET, POST, DELETE, etc. to execute certain commands. -Authentication takes place per request (there is no concept of 'sessions') through the use of custom HTTP headers. Each API token pair is linked to a particular -user, and can only be used for that user. A user can have multiple token pairs. Token pairs can be revoked at any time via the panel. - -## Authentication - -The CVM Client API expects two custom HTTP headers as authentication. - -API-Public-Token:: - This is the public part of your API token pair. It's used to identify who you are. - -API-Private-Token:: - This is the private part of your API token pair. It's used to verify your access. - -If no valid token pair is passed on with your request, the server will return a `401 Not Authorized` status code. - -If your token pair does not have access to the client API, the server will return a `403 Forbidden` status code. - -## Response format - -The API responses will always be in JSON format. If errors occurred, an `errors` key will be present containing an array of errors. If there is a response, a `response` key will -be present containing the response. - -@ Valid API call - - $ /api/client/vps/list - - > { - "response": { - "vpses": [{ - "id": "1", - "virtualization_type": "1", - "hostname": "test-vz.cryto.net", - "guaranteed_ram": "128", - "burstable_ram": "256", - "disk_space": "5000", - "cpu_count": "1", - "traffic_in_limit": "500000000000", - "traffic_out_limit": "500000000000", - "traffic_in_used": "912727849", - "traffic_out_used": "16923948" - }, { - "id": "2", - "virtualization_type": "1", - "hostname": "test2.cryto.net", - "guaranteed_ram": "512", - "burstable_ram": "768", - "disk_space": "40000", - "cpu_count": "240", - "traffic_in_limit": "500000000000", - "traffic_out_limit": "500000000000", - "traffic_in_used": "0", - "traffic_out_used": "0" - }] - } - } - -@ API call with invalid token pair - - $ /api/client/vps/list - - > { - "errors": ["No valid API token pair was specified."] - } - -## API Calls - -^ GET /api/client/vps/list - - This call will return a list of VPSes associated with the currently authenticated user. It takes no arguments. - - ### Keys in the response objects - - id:: - The numeric ID of this VPS. You will need this in further API calls. - - node:: - The host node that this VPS exists on. You will need this in further node-related API calls. - - virtualization_type:: - The virtualization platform used for this VPS. Right now the only supported value is `1` (OpenVZ). - - hostname:: - The configured hostname of the VPS. - - guaranteed_ram:: - The configured amount of guaranteed RAM, in __megabytes__. - - burstable_ram:: - The configured amount of burstable RAM, in __megabytes__. **This key may not be present if vSwap is used.** - - disk_space:: - The configured amount of disk space, in __megabytes__. - - cpu_count:: - The amount of configured CPUs (or rather, CPU units) that this VPS has access to. - - traffic_limit:: - The total traffic limit, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - traffic_used:: - The total amount of traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - traffic_in_limit:: - The total incoming traffic limit, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - traffic_in_used:: - The total amount of incoming traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - traffic_out_limit:: - The total outgoing traffic limit, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - traffic_out_used:: - The total amount of outgoing traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring. See the explanation below.** - - ! If traffic accounting for the VPS is combined (incoming + outgoing), a `traffic_limit` and `traffic_used` key will be present. If traffic accounting for the VPS is split, the keys `traffic_in_limit`, `traffic_in_used`, `traffic_out_limit`, and `traffic_out_used` will be present. - - @ Valid call to /api/client/vps/list - - > { - "response": { - "vpses": [{ - "id": "1", - "node": "1", - "virtualization_type": "1", - "hostname": "test-vz.cryto.net", - "guaranteed_ram": "128", - "burstable_ram": "256", - "disk_space": "5000", - "cpu_count": "1", - "traffic_in_limit": "500000000000", - "traffic_out_limit": "500000000000", - "traffic_in_used": "912727849", - "traffic_out_used": "16923948" - }, { - "id": "2", - "node": "1", - "virtualization_type": "1", - "hostname": "test2.cryto.net", - "guaranteed_ram": "512", - "burstable_ram": "768", - "disk_space": "40000", - "cpu_count": "2", - "traffic_in_limit": "500000000000", - "traffic_out_limit": "500000000000", - "traffic_in_used": "0", - "traffic_out_used": "0" - }] - } - } - -^ GET /api/client/vps/**id**/status - - This returns the current status and metrics for the specified VPS. The response will be a single object. - - ### Arguments - - id:: - The ID of the VPS you wish to retrieve the status for. - - ### Keys in the response object - - traffic_used:: - The total amount of traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring.** - - traffic_in_used:: - The total amount of incoming traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring.** - - traffic_out_used:: - The total amount of outgoing traffic used, in __bytes__. **This may not be present, depending on the method of traffic measuring.** - - ram_used:: - The amount of RAM that is currently in use for the VPS, in __bytes__. - - disk_used:: - The amount of disk space currently used by the VPS, in __bytes__. - - status:: - The current status of the VPS. - - running:: - The VPS is active and booted. - - stopped:: - The VPS is active and shut down. - - suspended:: - The VPS is suspended. - - terminated:: - The VPS is terminated. - - unknown:: - The status of the VPS is unknown. This can happen when, for example, the host node can't be reached. - -^ POST /api/client/vps/**id**/start - - Starts the specified VPS. Returns either a `200` status code with an empty response if successful, a `500` status code with an error message if the VPS fails to start, or - a `503` status code with an error message if the host node is unreachable. - - ### Arguments - - id:: - The ID of the VPS you wish to start. - -^ POST /api/client/vps/**id**/stop - - Shuts down the specified VPS. Returns either a `200` status code with an empty response if successful, a `500` status code with an error message if the VPS fails to shut down, - or a `503` status code with an error message if the host node is unreachable. - - ### Arguments - - id:: - The ID of the VPS you wish to stop. - -^ POST /api/client/vps/**id**/restart - - Restarts the specified VPS. Returns either a `200` status code with an empty response if successful, a `500` status code with an error message if the VPS fails to restart, or - a `503` status code with an error message if the host node is unreachable. - - ### Arguments - - id:: - The ID of the VPS you wish to restart. diff --git a/frontend/api.local.php b/frontend/api.local.php deleted file mode 100644 index ef5592c..0000000 --- a/frontend/api.local.php +++ /dev/null @@ -1,119 +0,0 @@ -CachedQuery("SELECT * FROM users WHERE `Username` = :Username", array(":Username" => $_GET['username']))) - { - $sUser = new User($result); - - if($sUser->VerifyPassword($_GET['password']) === true) - { - $return_object = array( - 'correct' => true, - 'userid' => $sUser->sId - ); - $return_success = true; - } - else - { - $return_object = array( - 'correct' => false, - 'userid' => 0 - ); - $return_success = true; - } - } - else - { - $return_object = array( - 'correct' => false, - 'userid' => 0 - ); - } - break; - - case "list_vps": - if(!empty($_GET['userid'])) - { - $result = $database->CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $_GET['userid'])); - } - else - { - $result = $database->CachedQuery("SELECT * FROM containers"); - } - - if($result) - { - $sVpses = array(); - - foreach($result->data as $row) - { - $sVps = new Vps($row); - $sVpses[] = array( - 'hostname' => $sVps->sHostname, - 'internal_id' => $sVps->sInternalId, - 'node_id' => $sVps->sNodeId, - 'status' => $sVps->sStatus - ); - } - - $return_object = $sVpses; - $return_success = true; - } - break; - - case "vps_info": - // TODO: return VPS info - break; - - case "node_info": - try - { - $sNode = new Node($_GET['nodeid']); - $return_object = array( - 'name' => $sNode->sName, - 'hostname' => $sNode->sHostname, - 'port' => $sNode->sPort, - 'user' => $sNode->sUser, - 'physical_location' => $sNode->sPhysicalLocation, - 'private_key' => $sNode->sPrivateKey, - 'public_key' => $sNode->sPublicKey, - 'has_custom_key' => $sNode->sHasCustomKey - ); - } - catch (NotFoundException $e) - { - // Silently pass. - } - break; - } -} -else -{ - $return_object = "Authentication failure."; -} - -echo(json_encode(array( - 'status' => $return_success, - 'data' => $return_object -))); diff --git a/frontend/authenticators/admin.php b/frontend/authenticators/admin.php deleted file mode 100644 index ac00348..0000000 --- a/frontend/authenticators/admin.php +++ /dev/null @@ -1,34 +0,0 @@ -uVariables['display_menu'] = true; - -try -{ - $sUser->RequireAccessLevel(20); - - $sRouterAuthenticated = true; -} -catch (InsufficientAccessLevelException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-unauthorized-title'], - 'message' => $locale->strings['error-unauthorized-text'] - )); - - $sRouterAuthenticated = false; - - $router->uVariables['display_menu'] = false; -} diff --git a/frontend/authenticators/api/client.php b/frontend/authenticators/api/client.php deleted file mode 100644 index e49be1b..0000000 --- a/frontend/authenticators/api/client.php +++ /dev/null @@ -1,57 +0,0 @@ -CachedQuery("SELECT * FROM api_keys WHERE `PublicToken` = :Token", array(":Token" => $public_token))) -{ - $sApiKey = new ApiKey($result); - - if($sApiKey->VerifyToken($private_token)) - { - if($sApiKey->sKeyType >= API_CLIENT) - { - $sRouterAuthenticated = true; - } - else - { - $sResponseCode = 403; - $sResponse = array( - "errors" => array( - "The specified API token pair does not have access to this API." - ) - ); - } - } - else - { - $sResponseCode = 401; - $sResponse = array( - "errors" => array( - "No valid API token pair was specified." - ) - ); - } -} -else -{ - $sResponseCode = 401; - $sResponse = array( - "errors" => array( - "No valid API token pair was specified." - ) - ); -} diff --git a/frontend/authenticators/vps.php b/frontend/authenticators/vps.php deleted file mode 100644 index aef94ff..0000000 --- a/frontend/authenticators/vps.php +++ /dev/null @@ -1,59 +0,0 @@ -uVariables['display_menu'] = true; - -try -{ - $sVps = new Vps($router->uParameters[1]); - - if($sVps->sUserId != $sUser->sId && $sUser->sAccessLevel < 20) - { - throw new UnauthorizedException("You are not authorized to control this VPS."); - } - - $sRouterAuthenticated = true; - - try - { - $sVps->CheckAllowed(); - } - catch (VpsSuspendedException $e) - { - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/warning", $locale->strings, array( - 'title' => $locale->strings['warning-suspended-title'], - 'message' => $locale->strings['warning-suspended-text'] - )); - } - catch (VpsTerminatedException $e) - { - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/warning", $locale->strings, array( - 'title' => $locale->strings['warning-terminated-title'], - 'message' => $locale->strings['warning-terminated-text'] - )); - } -} -catch(NotFoundException $e) -{ - $router->uVariables['display_menu'] = false; - $sMainContents = NewTemplater::Render("{$sTheme}/client/vps/error/notfound", $locale->strings, array()); - $sRouterAuthenticated = false; -} -catch(UnauthorizedException $e) -{ - $router->uVariables['display_menu'] = false; - $sRouterAuthenticated = false; -} - diff --git a/frontend/classes/apikey.php b/frontend/classes/apikey.php deleted file mode 100644 index f213b98..0000000 --- a/frontend/classes/apikey.php +++ /dev/null @@ -1,86 +0,0 @@ - array( - 'PublicToken' => "PublicToken", - 'PrivateToken' => "PrivateToken", - 'Salt' => "Salt" - ), - 'numeric' => array( - 'UserId' => "UserId", - 'KeyType' => "KeyType" - ), - 'user' => array( - 'User' => "UserId" - ) - ); - - public function GenerateSalt() - { - $this->uSalt = random_string(10); - } - - public function GenerateHash() - { - if(!empty($this->uSalt)) - { - if(!empty($this->uToken)) - { - $this->uPrivateToken = $this->CreateHash($this->uToken); - } - else - { - throw new MissingDataException("ApiKey object is missing a token."); - } - } - else - { - throw new MissingDataException("ApiKey object is missing a salt."); - } - } - - public function CreateHash($input) - { - global $settings; - $hash = crypt($input, "$5\$rounds=50000\${$this->uSalt}{$settings['salt']}$"); - $parts = explode("$", $hash); - return $parts[4]; - } - - public function VerifyToken($token) - { - if($this->CreateHash($token) == $this->sPrivateToken) - { - return true; - } - else - { - return false; - } - } - - public function SetPrivateToken($token) - { - $this->uToken = $token; - $this->GenerateHash(); - } -} diff --git a/frontend/classes/iprange.php b/frontend/classes/iprange.php deleted file mode 100644 index afed82a..0000000 --- a/frontend/classes/iprange.php +++ /dev/null @@ -1,261 +0,0 @@ -sInput = $input; - - $slashcount = substr_count($input, "/"); - - if($slashcount == 1) - { - /* The input is probably a CIDR range. */ - $this->sInputType = INPUT_TYPE_RANGE; - $this->ValidateRangeFormat(); - - } - elseif($slashcount == 0) - { - /* The input is probably an IP. */ - $this->sInputType = INPUT_TYPE_IP; - $this->ValidateIpFormat(); - } - else - { - throw new InvalidArgumentException("The given input is not a valid IP or IP range."); - } - - if($this->sInputType == INPUT_TYPE_RANGE) - { - if($this->sType == IP_TYPE_IPV6) - { - $this->ExpandIpv6(); - $result = IpRange::ParseRange($this->sIp, $this->sSize, ":", SEGMENT_BITS_IPV6, true); - } - elseif($this->sType == IP_TYPE_IPV4) - { - $result = IpRange::ParseRange($this->sIp, $this->sSize); - } - - $this->sStart = $result['start']; - $this->sEnd = $result['end']; - $this->sCount = $result['count']; - } - else - { - $this->sStart = $this->sIp; - $this->sEnd = $this->sIp; - $this->sCount = 1; - } - } - - private function ValidateRangeFormat() - { - list($ip, $size) = explode("/", $this->sInput, 2); - - if($this->ValidateIpFormat($ip) === true) - { - if(is_numeric($size)) - { - if($this->sType == IP_TYPE_IPV4 && (int)$size >= 0 && (int)$size <= 32) - { - $this->sSize = $size; - return true; - } - elseif($this->sType == IP_TYPE_IPV6 && (int)$size >= 0 && (int)$size <= 128) - { - $this->sSize = $size; - return true; - } - } - } - - /* Fallback case. */ - throw new InvalidArgumentException("The given input is not a valid IP or IP range."); - } - - private function ValidateIpFormat($ip = null) - { - if(is_null($ip)) - { - $ip = $this->sInput; - } - - if(strpos($ip, ".") !== false) - { - // Probably an IPv4 address. - if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) - { - $this->sType = IP_TYPE_IPV4; - $this->sIp = $ip; - return true; - } - } - elseif(strpos($ip, ":") !== false) - { - // Probably an IPv6 address. - if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $this->sType = IP_TYPE_IPV6; - $this->sIp = $ip; - return true; - } - } - - /* Fallback case. */ - throw new InvalidArgumentException("The given input is not a valid IP or IP range."); - } - - private function ExpandIpv6() - { - // Note: this function does NOT do any validation! - $ip = $this->sIp; - $parts = explode(":", $ip); - $empty_part = false; - $missing = 0; - - foreach($parts as $part) - { - if($part == "") - { - $empty_part = true; - $missing = 1; - } - } - - $available_parts = count($parts) - $missing; - - if($available_parts < 8 || $empty_part === true) - { - $needed = 8 - $available_parts; - - $abbrev_position = strpos($ip, "::"); - - $left = substr($ip, 0, $abbrev_position); - $right = substr($ip, $abbrev_position + 2); - - $left_parts = explode(":", $left); - $right_parts = explode(":", $right); - $filler_parts = array_fill(0, $needed, "0000"); - - $final_array = array_merge($left_parts, $filler_parts); - $final_array = array_merge($final_array, $right_parts); - } - else - { - $final_array = $parts; - } - - foreach($final_array as &$part) - { - $part = str_pad($part, 4, "0", STR_PAD_LEFT); - } - - $this->sIp = implode(":", $final_array); - return true; - } - - public static function ParseRange($start, $size, $delimiter = ".", $segment_bits = 8, $hex = false) - { - $segments = explode($delimiter, $start); - - /* Determine the maximum size of one segment */ - $segment_size = pow(2, $segment_bits); - - /* Calculate the amount of bits in the entire IP address */ - $ip_bits = count($segments) * $segment_bits; - - /* Calculate the total amount of IPs possible for this IP format */ - $total_ips = pow(2, $ip_bits - $size); - - if($hex === true) - { - $segments = array_map("hexdec", $segments); - } - - /* Calculate the maximum size (in IPs) of the currently used IP format */ - $max_size = count($segments) * $segment_bits; - - /* Determine what segment we are going to modify */ - $applicable_segment = floor($size / $segment_bits) + 1; - - /* Ensure that the specified size is possible */ - if($size > $max_size) - { - /* The size exceeds the total space for this type of IP */ - return false; - } - elseif($size == $max_size) - { - /* Only 1 IP. */ - $start_segments = $segments; - } - else - { - /* Determine the amount of IPs for the given size */ - $class_size = pow(2, ($applicable_segment * $segment_bits) - $size); - - /* Round down the applicable segment if necessary to ensure the starting point is valid */ - $segments[$applicable_segment - 1] = floor($segments[$applicable_segment - 1] / $class_size) * $class_size; - - $start_segments = $segments; - - /* Add the amount of IPs (inclusive) to the applicable segment */ - $segments[$applicable_segment - 1] += $class_size - 1; - - /* Set all segments to the right of the applicable segment to the right value. */ - if(count($segments) > $applicable_segment - 1) - { - for($i = $applicable_segment + 1; $i <= count($segments); $i++) - { - $segments[$i - 1] = $segment_size - 1; - $start_segments[$i - 1] = 0; - } - } - } - - if($hex === true) - { - $segments = array_map("dechex", $segments); - $start_segments = array_map("dechex", $start_segments); - } - - return array( - 'start' => implode($delimiter, $start_segments), - 'end' => implode($delimiter, $segments), - 'count' => $total_ips - ); - } -} - -?> diff --git a/frontend/classes/node.php b/frontend/classes/node.php deleted file mode 100644 index 393937a..0000000 --- a/frontend/classes/node.php +++ /dev/null @@ -1,133 +0,0 @@ - array( - 'Name' => "Name", - 'Hostname' => "Hostname", - 'PhysicalLocation' => "PhysicalLocation", - 'PrivateKey' => "CustomPrivateKey", - 'PublicKey' => "CustomPublicKey", - 'User' => "User", - 'TunnelKey' => "TunnelKey" - ), - 'numeric' => array( - 'Port' => "Port", - 'TunnelPort' => "TunnelPort" - ), - 'boolean' => array( - 'HasCustomKey' => "HasCustomKey" - ) - ); - - public $ssh = null; - - protected function EventConstructed() - { - global $settings; - - $this->ssh = new SshConnector(); - - $this->ssh->host = $this->sHostname; - $this->ssh->port = $this->sPort; - $this->ssh->user = $this->sUser; - $this->ssh->tunnel_port = $this->sTunnelPort; - $this->ssh->tunnel_key = $this->sTunnelKey; - $this->ssh->node = $this; - - if($this->HasCustomKey === true) - { - $this->ssh->key = $this->sPrivateKey; - $this->ssh->pubkey = $this->sPublicKey; - } - else - { - $this->ssh->key = $settings['master_privkey']; - $this->ssh->pubkey = $settings['master_pubkey']; - } - } - - public function __get($name) - { - switch($name) - { - case "sRealHostname": - return $this->GetHostname(); - break; - case "sDiskFree": - return $this->GetDiskFree(); - break; - case "sDiskUsed": - return $this->GetDiskUsed(); - break; - default: - return parent::__get($name); - break; - } - } - - public function GetHostname() - { - return $this->ssh->RunCommandCached("hostname", true)->stdout; - } - - public function GetDiskFree() - { - $disk = $this->GetDisk(); - return $disk['free']; - } - - public function GetDiskUsed() - { - $disk = $this->GetDisk(); - return $disk['used']; - } - - public function GetDisk() - { - $result = $this->ssh->RunCommandCached("df -l -x tmpfs", true); - $lines = explode("\n", $result->stdout); - array_shift($lines); - - $total_free = 0; - $total_used = 0; - $total_total = 0; - - foreach($lines as $disk) - { - $disk = trim($disk); - - if(!empty($disk)) - { - $values = split_whitespace($disk); - $total_free += (int)$values[3] / 1024; - $total_used += (int)$values[2] / 1024; - $total_total += ((int)$values[2] + (int)$values[3]) / 1024; - } - } - - return array( - 'free' => $total_free, - 'used' => $total_used, - 'total' => $total_total - ); - } -} diff --git a/frontend/classes/setting.php b/frontend/classes/setting.php deleted file mode 100644 index 330df08..0000000 --- a/frontend/classes/setting.php +++ /dev/null @@ -1,43 +0,0 @@ - array( - "Key" => "Key", - "Value" => "Value" - ), - 'timestamp' => array( - "LastChanged" => "LastChanged" - ) - ); - - public static function ByKey($key, $cache_duration = 60) - { - return Setting::CreateFromQuery("SELECT * FROM settings WHERE `Key` = :Key", array(":Key" => $key), $cache_duration, true); - } - - public function ChangeValue($value) - { - $this->uValue = $value; - $this->uLastChanged = time(); - $this->InsertIntoDatabase(); - } -} diff --git a/frontend/classes/sshconnector.php b/frontend/classes/sshconnector.php deleted file mode 100644 index 5e1d818..0000000 --- a/frontend/classes/sshconnector.php +++ /dev/null @@ -1,345 +0,0 @@ -DoCommand($command, $throw_exception); - } - catch (SshConnectException $e) - { - $error = $e->getMessage(); - $command = implode(" ", $command); - $this->failed = true; - throw new SshConnectException("Could not run command {$command}: Failed to connect: {$error}"); - } - catch (SshAuthException $e) - { - $error = $e->getMessage(); - $command = implode(" ", $command); - $this->failed = true; - throw new SshConnectException("Could not run command {$command}: Failed to authenticate: {$error}"); - } - } - - public function RunCommandCached($command, $throw_exception = false) - { - if(!isset($this->cache[serialize($command)])) - { - $result = $this->RunCommand($command, $throw_exception); - $this->cache[serialize($command)] = $result; - return $result; - } - else - { - return $this->cache[serialize($command)]; - } - } - - public function Connect() - { - /* TODO: TIME_WAIT status for a previous socket on the same port may cause issues - * when attempting to restart the command daemon. There is currently no way - * to detect this from the code, and it makes all subsequent requests fail - * (silently?) because the tunnel is available but nothing is listening on - * the other end. This kind of edge case should be detected and dealt with. - * A browser displays a 'no data received' error in this case. */ - if($this->failed) - { - throw new SshConnectException("A previous connection attempt failed."); - } - - $sHost = escapeshellarg($this->host); - $sUser = escapeshellarg($this->user); - $sPort = $this->tunnel_port = $this->node->uTunnelPort = $this->ChoosePort(); - $sKeyFile = escapeshellarg($this->key); - $this->node->uTunnelKey = $this->tunnel_key = random_string(16); - $sSessionKey = escapeshellarg($this->node->uTunnelKey); - - $command = "python /etc/cvm/start_tunnel.py {$sHost} {$sUser} {$sPort} {$sKeyFile} {$sSessionKey}"; - - cphp_debug_snapshot(array( - "action" => "start tunnel", - "db-tunnelkey" => $this->node->sTunnelKey, - "db-utunnelkey" => $this->node->uTunnelKey, - "ssh-tunnelkey" => $this->tunnel_key, - "arg-tunnelkey" => $sSessionKey - )); - - exec($command, $output, $returncode); - - if($returncode === 0) - { - /* autossh returns before the SSH connection has actually been established. We'll make the - * script sleep until a connection has been established, with a timeout of 10 seconds, after - * which an exception is raised. The polling interval is 100ms. */ - - $start_time = time(); - - while(true) - { - if(time() > $start_time + 10) - { - throw new SshConnectException("The SSH tunnel could not be fully established within the timeout period."); - } - - if($pollsock = @fsockopen("localhost", $this->tunnel_port, $errno, $errstr, 1)) - { - /* The tunnel has been fully established. */ - - fclose($pollsock); - break; - } - - usleep(100000); - } - - cphp_debug_snapshot(array( - "action" => "pre insert db", - "db-tunnelkey" => $this->node->sTunnelKey, - "db-utunnelkey" => $this->node->uTunnelKey, - "ssh-tunnelkey" => $this->tunnel_key, - "arg-tunnelkey" => $sSessionKey - )); - - $this->node->InsertIntoDatabase(); - - cphp_debug_snapshot(array( - "action" => "inserted db", - "db-tunnelkey" => $this->node->sTunnelKey, - "db-utunnelkey" => $this->node->uTunnelKey, - "ssh-tunnelkey" => $this->tunnel_key, - "arg-tunnelkey" => $sSessionKey - )); - - return true; - } - else - { - throw new SshConnectException("Could not establish tunnel to {$this->host}:{$this->port}."); - } - } - - private function ChoosePort() - { - try - { - $sPorts = array(); - - foreach(Node::CreateFromQuery("SELECT * FROM nodes WHERE `TunnelPort` != 0") as $node) - { - $sPorts[] = $node->sTunnelPort; - $sPorts[] = $node->sTunnelPort + 1; - $sPorts[] = $node->sTunnelPort + 2; - } - - /* TODO: Figure out a more intelligent way of choosing ports. */ - $start = max($sPorts) + 1; - } - catch (NotFoundException $e) - { - $start = 2000; - } - - $current = $start; - - while(true) - { - if($current > 65534) - { - /* TODO: We really need to deal with this properly... */ - throw new SshConnectException("No free tunnel ports left."); - } - - if(!$this->TestPort($current)) - { - if(!$this->TestPort($current + 1)) - { - if(!$this->TestPort($current + 2)) - { - break; - } - else - { - $current = $current + 3; - } - } - else - { - $current = $current + 2; - } - } - else - { - $current = $current + 1; - } - } - - return $current; - } - - private function TestPort($port) - { - if($testsock = @fsockopen("localhost", $port, $errno, $errstr, 1)) - { - fclose($testsock); - return true; - } - else - { - return false; - } - } - - private function DoCommand($command, $throw_exception, $allow_retry = true) - { - cphp_debug_snapshot(array( - "action" => "pre run command", - "db-tunnelkey" => $this->node->sTunnelKey, - "db-utunnelkey" => $this->node->uTunnelKey, - "ssh-tunnelkey" => $this->tunnel_key, - "command" => $command, - "allow-retry" => $allow_retry - )); - - $cmd = urlencode(json_encode($command)); - $url = "http://localhost:{$this->tunnel_port}/?key={$this->tunnel_key}&command={$cmd}"; - - /* Setting a HTTP timeout is going to break long-running requests. - * What the hell was I thinking?! - $context = stream_context_create(array( - 'http' => array( - 'timeout' => 2.0 - ) - ));*/ - - $response = @file($url, 0, $context); - - cphp_debug_snapshot(array( - "action" => "post run command", - "db-tunnelkey" => $this->node->sTunnelKey, - "db-utunnelkey" => $this->node->uTunnelKey, - "ssh-tunnelkey" => $this->tunnel_key, - "command" => $command, - "allow-retry" => $allow_retry, - "response" => $response - )); - - if($response === false) - { - /* Determine why the connection failed, and what we need to do to fix it. */ - if($testsock = @fsockopen("localhost", $this->tunnel_port, $errno, $errstr, 1)) - { - /* The socket works fine. */ - fclose($testsock); - - /* Since the socket works but we can't make a request, there is most - * likely a serious problem with the command daemon (stuck, crashed, - * etc.) We'll throw an exception. TODO: Log error. */ - $this->failed = true; - throw new SshCommandException("The command daemon is unavailable."); - } - else - { - /* The tunnel is gone for some reason. Either the connection broke - * and autossh is busy reconnecting, or autossh broke entirely. We - * will attempt to connect to the monitoring port to see if autossh - * is still running or not. */ - if($testsock = @fsockopen("localhost", ($this->tunnel_port + 2), $errno, $errstr, 1)) - { - /* The socket works fine. */ - fclose($testsock); - - /* Most likely autossh is very busy trying to reconnect to the node. We'll throw a - * connection exception for now. TODO: Consider waiting with a specified timeout. */ - $this->failed = true; - throw new SshConnectException("The SSH connection to this node is currently unavailable."); - } - else - { - if($allow_retry) - { - $this->Connect(); - $res = $this->DoCommand($command, $throw_exception, false); - } - else - { - $this->failed = true; - throw new SshConnectException("Could not connect to node."); - /* TODO: Log error, this is probably very bad. */ - } - } - } - } - else - { - $response = json_decode(implode("", $response)); - - $json_error = json_last_error(); - - if($json_error !== JSON_ERROR_NONE) - { - switch($json_last_error) - { - case JSON_ERROR_DEPTH: - $err_msg = "Maximum stack depth exceeded."; - break; - case JSON_ERROR_STATE_MISMATCH: - $err_msg = "Underflow or modes mismatch."; - break; - case JSON_ERROR_CTRL_CHAR: - $err_msg = "Unexpected control character found."; - break; - case JSON_ERROR_SYNTAX: - $err_msg = "Syntax error, malformed JSON."; - break; - case JSON_ERROR_UTF8: - $err_msg = "Malformed UTF-8 characters, possibly incorrectly encoded."; - break; - default: - $err_msg = "Unknown error {$json_error}."; - } - - throw new SshCommandException("An error occurred while decoding the response from the slave: {$err_msg}"); - } - } - - if($response->returncode != 0 && $throw_exception === true) - { - throw new SshExitException("Non-zero exit code returned: {$response->stderr}", $response->returncode); - } - - return $response; - } -} diff --git a/frontend/classes/template.php b/frontend/classes/template.php deleted file mode 100644 index 7bf9c2b..0000000 --- a/frontend/classes/template.php +++ /dev/null @@ -1,46 +0,0 @@ - array( - 'Name' => "Name", - 'TemplateName' => "TemplateName", - 'Description' => "Description" - ), - 'boolean' => array( - 'IsSupported' => "Supported", - 'IsAvailable' => "Available", - 'IsOutdated' => "Outdated" - ) - ); - - function CheckAvailable() - { - if($this->sIsAvailable === true) - { - return true; - } - else - { - throw new TemplateUnavailableException("This template is not available."); - } - } -} diff --git a/frontend/classes/user.php b/frontend/classes/user.php deleted file mode 100644 index 8145729..0000000 --- a/frontend/classes/user.php +++ /dev/null @@ -1,122 +0,0 @@ - array( - 'Username' => "Username", - 'EmailAddress' => "EmailAddress", - 'Hash' => "Hash", - 'Salt' => "Salt" - ), - 'numeric' => array( - 'AccessLevel' => "AccessLevel" - ) - ); - - public $prototype_export = array( - 'Username', - 'EmailAddress', - 'AccessLevel' - ); - - public function __get($name) - { - switch($name) - { - case "sVpsCount": - return $this->GetVpsCount(); - break; - default: - return parent::__get($name); - break; - } - } - - public function GetVpsCount() - { - global $database; - - if($result = $database->CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $this->sId))) - { - return count($result->data); - } - else - { - return 0; - } - } - - public function GenerateSalt() - { - $this->uSalt = random_string(10); - } - - public function GenerateHash() - { - if(!empty($this->uSalt)) - { - if(!empty($this->uPassword)) - { - $this->uHash = $this->CreateHash($this->uPassword); - } - else - { - throw new MissingDataException("User object is missing a password."); - } - } - else - { - throw new MissingDataException("User object is missing a salt."); - } - } - - public function CreateHash($input) - { - global $settings; - $hash = crypt($input, "$5\$rounds=50000\${$this->uSalt}{$settings['salt']}$"); - $parts = explode("$", $hash); - return $parts[4]; - } - - public function VerifyPassword($password) - { - if($this->CreateHash($password) == $this->sHash) - { - return true; - } - else - { - return false; - } - } - - public function RequireAccessLevel($level) - { - if($this->sAccessLevel < $level) - { - throw new InsufficientAccessLevelException("You do not have the required access level to perform this action."); - } - else - { - return true; - } - } -} diff --git a/frontend/classes/vps.php b/frontend/classes/vps.php deleted file mode 100644 index e9df5a5..0000000 --- a/frontend/classes/vps.php +++ /dev/null @@ -1,729 +0,0 @@ - array( - 'Hostname' => "Hostname", - 'InternalId' => "InternalId", - 'RootPassword' => "RootPassword" - ), - 'numeric' => array( - 'NodeId' => "NodeId", - 'TemplateId' => "TemplateId", - 'UserId' => "UserId", - 'VirtualizationType' => "VirtualizationType", - 'DiskSpace' => "DiskSpace", - 'GuaranteedRam' => "GuaranteedRam", - 'BurstableRam' => "BurstableRam", - 'CpuCount' => "CpuCount", - 'Status' => "Status", - 'IncomingTrafficUsed' => "IncomingTrafficUsed", - 'IncomingTrafficLast' => "IncomingTrafficLast", - 'OutgoingTrafficUsed' => "OutgoingTrafficUsed", - 'OutgoingTrafficLast' => "OutgoingTrafficLast", - 'IncomingTrafficLimit' => "IncomingTrafficLimit", - 'OutgoingTrafficLimit' => "OutgoingTrafficLimit", - 'TotalTrafficLimit' => "TotalTrafficLimit" - ), - 'timestamp' => array( - "TerminationDate" => "TerminationDate" - ), - 'boolean' => array( - "IsTerminated" => "Terminated" - ), - 'node' => array( - 'Node' => "NodeId" - ), - 'template' => array( - 'Template' => "TemplateId" - ), - 'user' => array( - 'User' => "UserId" - ) - ); - - public function __get($name) - { - switch($name) - { - case "sRamUsed": - return $this->GetRamUsed(); - break; - case "sRamTotal": - return $this->GetRamTotal(); - break; - case "sDiskUsed": - return $this->GetDiskUsed(); - break; - case "sDiskTotal": - return $this->GetDiskTotal(); - break; - case "sBandwidthUsed": - return $this->GetBandwidthUsed(); - break; - case "sCurrentStatus": - return (int)$this->GetCurrentStatus(); - break; - case "sStatusText": - return $this->GetStatusText(); - break; - default: - return parent::__get($name); - break; - } - } - - public function GetBandwidthUsed() - { - return ($this->sOutgoingTrafficUsed + $this->IncomingTrafficUsed) / (1024 * 1024); - } - - public function GetCurrentStatus() - { - if($this->sStatus == CVM_STATUS_SUSPENDED || $this->sStatus == CVM_STATUS_TERMINATED) - { - return $this->sStatus; - } - else - { - try - { - $command = array("sudo", "vzctl", "status", $this->sInternalId); - - $result = $this->sNode->ssh->RunCommandCached($command, false); - - if($result->returncode == 0) - { - $values = split_whitespace($result->stdout); - - if($values[4] == "running") - { - return CVM_STATUS_STARTED; - } - else - { - return CVM_STATUS_STOPPED; - } - } - } - catch (SshCommandException $e) - { - return CVM_STATUS_STOPPED; - } - } - } - - public function GetStatusText() - { - /* TODO: Add several more options: - * - unknown - * - deleted / non-existent - * - terminated - */ - - $status = $this->sCurrentStatus; - - if($status == CVM_STATUS_STARTED) - { - return "running"; - } - elseif($status == CVM_STATUS_STOPPED) - { - return "stopped"; - } - elseif($status == CVM_STATUS_SUSPENDED) - { - return "suspended"; - } - else - { - return "unknown"; - } - } - - public function GetRamUsed() - { - $ram = $this->GetRam(); - return $ram['used']; - } - - public function GetRamTotal() - { - $ram = $this->GetRam(); - return $ram['total']; - } - - public function GetRam() - { - try - { - $result = $this->RunCommandCached("free -m", true); - $lines = explode("\n", $result->stdout); - array_shift($lines); - - $total_free = 0; - $total_used = 0; - $total_total = 0; - - foreach($lines as $line) - { - $line = trim($line); - $values = split_whitespace($line); - - if(trim($values[0]) == "Mem:") - { - $total_total = $values[1]; - $total_used = $values[2]; - $total_free = $values[3]; - } - - } - } - catch (SshCommandException $e) - { - $total_free = 0; - $total_used = 0; - $total_total = 0; - } - - return array( - 'free' => $total_free, - 'used' => $total_used, - 'total' => $total_total - ); - } - - public function GetDiskUsed() - { - $disk = $this->GetDisk(); - return $disk['used']; - } - - public function GetDiskTotal() - { - $disk = $this->GetDisk(); - return $disk['total']; - } - - public function GetDisk() - { - try - { - $result = $this->RunCommandCached("df -l -x tmpfs", true); - $lines = explode("\n", $result->stdout); - array_shift($lines); - - $total_free = 0; - $total_used = 0; - $total_total = 0; - - foreach($lines as $disk) - { - $disk = trim($disk); - - if(!empty($disk)) - { - $values = split_whitespace($disk); - $total_free += (int)$values[3] / 1024; - $total_used += (int)$values[2] / 1024; - $total_total += ((int)$values[2] + (int)$values[3]) / 1024; - } - } - } - catch (SshCommandException $e) - { - $total_free = 0; - $total_used = 0; - $total_total = 0; - } - - return array( - 'free' => $total_free, - 'used' => $total_used, - 'total' => $total_total - ); - } - - public function CheckAllowed() - { - if($this->sStatus == CVM_STATUS_SUSPENDED) - { - throw new VpsSuspendedException("No operations can be performed on this VPS beacuse it is suspended.", 1, $this->sInternalId); - } - elseif($this->sStatus == CVM_STATUS_TERMINATED) - { - throw new VpsTerminatedException("No operations can be performed on this VPS beacuse it is terminated.", 1, $this->sInternalId); - } - else - { - return true; - } - } - - public function SetOptions($options) - { - if(is_array($options)) - { - $command_elements = array("sudo", "vzctl", "set", $this->sInternalId); - - foreach($options as $key => $value) - { - $command_elements[] = "--{$key}"; - $command_elements[] = $value; - } - - $command_elements[] = "--save"; - - $this->sNode->ssh->RunCommand($command_elements, true); - } - else - { - throw new InvalidArgumentException("The option argument to Vps::SetOptions should be an array."); - } - } - - public function RunCommand($command, $throw_exception = false) - { - return $this->sNode->ssh->RunCommand(array("sudo", "vzctl", "exec", $this->sInternalId, $command), $throw_exception); - } - - public function RunCommandCached($command, $throw_exception = false) - { - return $this->sNode->ssh->RunCommandCached(array("sudo", "vzctl", "exec", $this->sInternalId, $command), $throw_exception); - } - - public function Deploy($conf = array()) - { - $sRootPassword = random_string(20); - - $this->uRootPassword = $sRootPassword; - $this->InsertIntoDatabase(); - - $command = array("sudo", "vzctl", "create", $this->sInternalId, "--ostemplate", $this->sTemplate->sTemplateName); - - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0 && strpos($result->stderr, "ERROR") === false) - { - $this->uStatus = CVM_STATUS_CREATED; - $this->InsertIntoDatabase(); - - $dummy_processes = 1000; - $dummy_files = $this->sGuaranteedRam * 32; - $dummy_sockets = $this->sGuaranteedRam * 3; - - $sKMemSize = (isset($conf['sKMemSize'])) ? $conf['sKMemSize'] : (40 * 1024 * ($dummy_processes / 2)) + ($dummy_files * 384 * 100); - $sKMemSizeLimit = (isset($conf['sKMemSizeLimit'])) ? $conf['sKMemSizeLimit'] : (int)($sKMemSize * 1.1); - $sLockedPages = (isset($conf['sLockedPages'])) ? $conf['sLockedPages'] : $dummy_processes; - $sShmPages = (isset($conf['sShmPages'])) ? $conf['sShmPages'] : $this->sGuaranteedRam . "M"; - $sOomGuarPages = (isset($conf['sOomGuarPages'])) ? $conf['sOomGuarPages'] : $this->sGuaranteedRam . "M"; - $sTcpSock = (isset($conf['sTcpSock'])) ? $conf['sTcpSock'] : $dummy_sockets; - $sOtherSock = (isset($conf['sOtherSock'])) ? $conf['sOtherSock'] : $dummy_sockets; - $sFLock = (isset($conf['sFLock'])) ? $conf['sFLock'] : $dummy_processes; - $sFLockLimit = (isset($conf['sFLockLimit'])) ? $conf['sFLockLimit'] : (int)($sFLock * 1.1); - $sTcpSndBuf = (isset($conf['sTcpSndBuf'])) ? $conf['sTcpSndBuf'] : round($this->sGuaranteedRam * 1024 / 5) . "K"; - $sTcpRcvBuf = (isset($conf['sTcpRcvBuf'])) ? $conf['sTcpRcvBuf'] : round($this->sGuaranteedRam * 1024 / 5) . "K"; - $sOtherBuf = (isset($conf['sOtherBuf'])) ? $conf['sOtherBuf'] : round($this->sGuaranteedRam * 1024 / 5) . "K"; - $sOtherBufLimit = (isset($conf['sOtherBufLimit'])) ? $conf['sOtherBufLimit'] : (int)($sOtherBuf + (2 * $dummy_processes * 16)); - $sTcpSndBufLimit = (isset($conf['sTcpSndBufLimit'])) ? $conf['sTcpSndBufLimit'] : (int)($sTcpSndBuf + (2 * $dummy_processes * 16)); - $sTcpRcvBufLimit = (isset($conf['sTcpRcvBufLimit'])) ? $conf['sTcpRcvBufLimit'] : (int)($sTcpRcvBuf + (2 * $dummy_processes * 16)); - $sDgramBuf = (isset($conf['sDgramBuf'])) ? $conf['sDgramBuf'] : round($this->sGuaranteedRam * 1024 / 5) . "K"; - $sNumFile = (isset($conf['sNumFile'])) ? $conf['sNumFile'] : $dummy_files; - $sNumProc = (isset($conf['sNumProc'])) ? $conf['sNumProc'] : $dummy_processes; - $sDCache = (isset($conf['sDCache'])) ? $conf['sDCache'] : $dummy_files * 384; - $sDCacheLimit = (isset($conf['sDCacheLimit'])) ? $conf['sDCacheLimit'] : (int)($sDCache * 1.1); - $sAvgProc = (isset($conf['sAvgProc'])) ? $conf['sAvgProc'] : $dummy_processes / 2; - - $command = array("sudo", "vzctl", "set", $this->sInternalId, - "--onboot", "yes", - "--setmode", "restart", - "--hostname", $this->sHostname, - "--nameserver", "8.8.8.8", - "--nameserver", "8.8.4.4", - "--numproc", $this->sCpuCount, - "--vmguarpages", "{$this->sGuaranteedRam}M:unlimited", - "--privvmpages", "{$this->sBurstableRam}M:{$this->sBurstableRam}M", - "--quotatime", "0", - "--diskspace", "{$this->sDiskSpace}M:{$this->sDiskSpace}M", - "--userpasswd", "root:{$sRootPassword}", - "--kmemsize", "{$sKMemSize}:{$sKMemSizeLimit}", - "--lockedpages", "{$sLockedPages}:{$sLockedPages}", - "--shmpages", "{$sShmPages}:{$sShmPages}", - "--physpages", "0:unlimited", - "--oomguarpages", "{$sOomGuarPages}:unlimited", - "--numtcpsock", "{$sTcpSock}:{$sTcpSock}", - "--numflock", "{$sFLock}:{$sFLockLimit}", - "--numpty", "32:32", - "--numsiginfo", "512:512", - "--tcpsndbuf", "{$sTcpSndBuf}:{$sTcpSndBufLimit}", - "--tcprcvbuf", "{$sTcpRcvBuf}:{$sTcpRcvBufLimit}", - "--othersockbuf", "{$sOtherBuf}:{$sOtherBufLimit}", - "--dgramrcvbuf", "{$sDgramBuf}:{$sDgramBuf}", - "--numothersock", "{$sOtherSock}:{$sOtherSock}", - "--numfile", "{$sNumFile}:{$sNumFile}", - "--numproc", "{$sNumProc}:{$sNumProc}", - "--dcachesize", "{$sDCache}:{$sDCacheLimit}", - "--numiptent", "128:128", - "--diskinodes", "200000:220000", - "--avnumproc", "{$sAvgProc}:{$sAvgProc}", - "--save" - ); - - /* - This may be useful if we turn out to have a kernel that supports vswap - - $command = shrink_command("vzctl set {$this->sInternalId} - --onboot yes - --setmode restart - --hostname {$this->sHostname} - --nameserver 8.8.8.8 - --nameserver 8.8.4.4 - --numproc {$this->sCpuCount} - --quotatime 0 - --diskspace {$this->sDiskSpace}M:{$this->sDiskSpace}M - --userpasswd root:{$sRootPassword} - --numtcpsock 360:360 - --numflock 188:206 - --numpty 16:16 - --numsiginfo 256:256 - --tcpsndbuf 1720320:2703360 - --tcprcvbuf 1720320:2703360 - --othersockbuf 1126080:2097152 - --dgramrcvbuf 262144:262144 - --numothersock 360:360 - --numfile 9312:9312 - --dcachesize 3409920:3624960 - --numiptent 128:128 - --diskinodes 200000:220000 - --avnumproc 180:180 - --ram {$this->sGuaranteedRam}M - --swap {$this->sBurstableRam}M - --save - ");*/ - - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0) - { - $this->uStatus = CVM_STATUS_CONFIGURED; - $this->InsertIntoDatabase(); - - return true; - } - else - { - throw new VpsConfigureException($result->stderr, $result->returncode, $this->sInternalId); - } - } - else - { - throw new VpsCreateException($result->stderr, $result->returncode, $this->sInternalId); - } - } - - public function Destroy() - { - if($this->sCurrentStatus == CVM_STATUS_STARTED) - { - $this->Stop(); - } - - $command = array("sudo", "vzctl", "destroy", $this->sInternalId); - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0) - { - return true; - } - else - { - throw new VpsDestroyException("Destroying VPS failed: {$result->stderr}", $result->returncode, $this->sInternalId); - } - } - - public function Reinstall() - { - try - { - $this->Destroy(); - $this->Deploy(); - } - catch (VpsDestroyException $e) - { - throw new VpsReinstallException("Reinstalling VPS failed during destroying: " . $e->getMessage(), $e->getCode(), $this->sInternalId, $e); - } - catch (VpsCreateException $e) - { - throw new VpsReinstallException("Reinstalling VPS failed during creation: " . $e->getMessage(), $e->getCode(), $this->sInternalId, $e); - } - catch (VpsConfigureException $e) - { - throw new VpsReinstallException("Reinstalling VPS failed during configuration: " . $e->getMessage(), $e->getCode(), $this->sInternalId, $e); - } - } - - public function Start($forced = false) - { - if($this->sStatus == CVM_STATUS_SUSPENDED && $forced == false) - { - throw new VpsSuspendedException("The VPS cannot be started as it is suspended.", 1, $this->sInternalId); - } - elseif($this->sStatus == CVM_STATUS_TERMINATED && $forced == false) - { - throw new VpsTerminatedException("The VPS cannot be started as it is terminated.", 1, $this->sInternalId); - } - else - { - $command = array("sudo", "vzctl", "start", $this->sInternalId); - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0) - { - $this->uStatus = CVM_STATUS_STARTED; - $this->InsertIntoDatabase(); - return true; - } - else - { - throw new VpsStartException($result->stderr, $result->returncode, $this->sInternalId); - } - } - } - - public function Stop() - { - if($this->sStatus == CVM_STATUS_SUSPENDED) - { - throw new VpsSuspendedException("The VPS cannot be stopped as it is suspended.", 1, $this->sInternalId); - } - elseif($this->sStatus == CVM_STATUS_TERMINATED) - { - throw new VpsTerminatedException("The VPS cannot be stopped as it is terminated.", 1, $this->sInternalId); - } - else - { - $command = array("sudo", "vzctl", "stop", $this->sInternalId); - $result = $this->sNode->ssh->RunCommand($command, false); - - /* vzctl is retarded enough to return code 0 when the command fails because the container isn't running, - * so we'll have to check stderr for specific error strings as well. Come on guys, it's 2012. */ - if($result->returncode == 0 && strpos($result->stderr, "Unable to stop") === false) - { - $this->uStatus = CVM_STATUS_STOPPED; - $this->InsertIntoDatabase(); - return true; - } - else - { - throw new VpsStopException($result->stderr, $result->returncode, $this->sInternalId); - } - } - } - - public function Suspend() - { - if($this->sStatus == CVM_STATUS_SUSPENDED) - { - throw new VpsSuspendException("The VPS is already suspended.", 1, $this->sInternalId); - } - elseif($this->sStatus == CVM_STATUS_TERMINATED) - { - throw new VpsSuspendException("The VPS cannot be suspended because it is already terminated.", 1, $this->sInternalId); - } - else - { - try - { - $this->Stop(); - $this->uStatus = CVM_STATUS_SUSPENDED; - $this->InsertIntoDatabase(); - } - catch (VpsStopException $e) - { - throw new VpsSuspendException("Suspension failed as the VPS could not be stopped.", 1, $this->sInternalId, $e); - } - } - } - - public function Unsuspend() - { - if($this->sStatus == CVM_STATUS_SUSPENDED) - { - try - { - $this->Start(true); - $this->uStatus = CVM_STATUS_STARTED; - $this->InsertIntoDatabase(); - } - catch (VpsStartException $e) - { - throw new VpsUnsuspendException("Unsuspension failed as the VPS could not be started.", 1, $this->sInternalId, $e); - } - } - else - { - throw new VpsUnsuspendException("The VPS is not suspended.", 1, $this->sInternalId); - } - } - - public function Terminate() - { - if($this->sStatus != CVM_STATUS_TERMINATED) - { - try - { - $this->Stop(); - } - catch (VpsStopException $e) - { - /*throw new VpsTerminateException("Termination failed as the VPS could not be stopped.", 1, $this->sInternalId, $e);*/ - /* TODO: Throw warning about being unable to stop it, after checking VPS status. */ - } - - $this->uStatus = CVM_STATUS_TERMINATED; - $this->uTerminationDate = time(); - $this->InsertIntoDatabase(); - } - else - { - throw new VpsTerminateException("The VPS is already terminated.", 1, $this->sInternalId); - } - } - - public function Unterminate() - { - if($this->sStatus == CVM_STATUS_TERMINATED) - { - try - { - $this->Start(true); - } - catch (VpsStartException $e) - { - /*throw new VpsUnterminateException("Untermination failed as the VPS could not be started.", 1, $this->sInternalId, $e);*/ - /* TODO: Throw warning about being unable to start it, after checking VPS status. */ - } - - $this->uStatus = CVM_STATUS_STARTED; - $this->InsertIntoDatabase(); - } - else - { - throw new VpsUnterminateException("The VPS is not terminated.", 1, $this->sInternalId); - } - } - - public function AddIp($ip) - { - $command = array("sudo", "vzctl", "set", $this->sInternalId, "--ipadd", $ip, "--save"); - - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0) - { - return true; - } - else - { - throw new VpsIpAddException($result->stderr, $result->returncode, $this->sInternalId); - } - } - - public function RemoveIp($ip) - { - $command = array("sudo", "vzctl", "set", $this->sInternalId, "--ipdel", $ip, "--save"); - - $result = $this->sNode->ssh->RunCommand($command, false); - - if($result->returncode == 0) - { - return true; - } - else - { - throw new VpsIpRemoveException($result->stderr, $result->returncode, $this->sInternalId); - } - } - - public function UpdateTraffic() - { - /* TODO: Don't rely on grep, and parse the output in this function itself. Also try to find another way to do this without relying - * on the container at all. */ - $result = $this->sNode->ssh->RunCommand(array("sudo", "vzctl", "exec", $this->sInternalId, "cat /proc/net/dev | grep venet0"), false); - - if($result->returncode == 0) - { - $lines = split_lines($result->stdout); - $values = split_whitespace(str_replace(":", " ", $lines[0])); - - $uIncoming = $values[1]; - $uOutgoing = $values[9]; - - if($uIncoming < (int)$this->sIncomingTrafficLast || $uOutgoing < (int)$this->sOutgoingTrafficLast) - { - // the counter has reset (wrap-around, reboot, etc.) - $uNewIncoming = $uIncoming; - $uNewOutgoing = $uOutgoing; - } - else - { - $uNewIncoming = $uIncoming - $this->sIncomingTrafficLast; - $uNewOutgoing = $uOutgoing - $this->sOutgoingTrafficLast; - } - - $this->uIncomingTrafficUsed = $this->sIncomingTrafficUsed + $uNewIncoming; - $this->uOutgoingTrafficUsed = $this->sOutgoingTrafficUsed + $uNewOutgoing; - - $this->uIncomingTrafficLast = $uIncoming; - $this->uOutgoingTrafficLast = $uOutgoing; - - $this->InsertIntoDatabase(); - } - else - { - throw new VpsTrafficRetrieveException($result->stderr, $result->returncode, $this->sInternalId); - } - } - - public function SetRootPassword($password) - { - if($this->sStatus == CVM_STATUS_SUSPENDED) - { - throw new VpsSuspendedException("The root password cannot be changed, because the VPS is suspended.", 1, $this->sInternalId); - } - elseif($this->sStatus == CVM_STATUS_TERMINATED) - { - throw new VpsTerminatedException("The root password cannot be changed, because the VPS is terminated.", 1, $this->sInternalId); - } - else - { - $this->SetOptions(array( - 'userpasswd' => "root:{$password}" - )); - } - } - - public function EnableTunTap() - { - /* TODO: Finish EnableTunTap function, check whether tun module is available on host */ - $command = array("sudo", "vzctl", "set", $this->sInternalId, "--devnodes", "net/tun:rw", "--save"); - } -} diff --git a/frontend/cphp b/frontend/cphp deleted file mode 120000 index aaeddf6..0000000 --- a/frontend/cphp +++ /dev/null @@ -1 +0,0 @@ -../../cphp \ No newline at end of file diff --git a/frontend/cron.15.php b/frontend/cron.15.php deleted file mode 100644 index 9b68837..0000000 --- a/frontend/cron.15.php +++ /dev/null @@ -1,37 +0,0 @@ -CachedQuery("SELECT * FROM containers")) -{ - foreach($result->data as $row) - { - $sVps = new Vps($row); - - try - { - $sVps->UpdateTraffic(); - } - catch (VpsTrafficRetrieveException $e) - { - if($sVps->sCurrentStatus == CVM_STATUS_STARTED) - { - // This is not supposed to fail, as the VPS is running. - // Something shady going on. - // TODO: Log exception - } - } - } -} diff --git a/frontend/includes/.gitignore b/frontend/includes/.gitignore deleted file mode 100644 index c6dc218..0000000 --- a/frontend/includes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -include.config.api.php diff --git a/frontend/includes/include.base.php b/frontend/includes/include.base.php deleted file mode 100644 index 0a1287d..0000000 --- a/frontend/includes/include.base.php +++ /dev/null @@ -1,39 +0,0 @@ - diff --git a/frontend/includes/include.constants.php b/frontend/includes/include.constants.php deleted file mode 100644 index 8460b29..0000000 --- a/frontend/includes/include.constants.php +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/frontend/includes/include.exceptions.php b/frontend/includes/include.exceptions.php deleted file mode 100644 index 2e212cc..0000000 --- a/frontend/includes/include.exceptions.php +++ /dev/null @@ -1,62 +0,0 @@ -id = $id; - - parent::__construct($message, $code, $previous); - } - - public function getId() - { - return $this->id; - } -} - -class VpsCreateException extends VpsException {} -class VpsConfigureException extends VpsException {} -class VpsStartException extends VpsException {} -class VpsStopException extends VpsException {} -class VpsSuspendException extends VpsException {} -class VpsUnsuspendException extends VpsException {} -class VpsTerminateException extends VpsException {} -class VpsUnterminateException extends VpsException {} -class VpsSuspendedException extends VpsException {} -class VpsTerminatedException extends VpsException {} -class VpsDestroyException extends VpsException {} -class VpsReinstallException extends VpsException {} -class VpsDeployException extends VpsException {} -class VpsIpAddException extends VpsException {} -class VpsIpRemoveException extends VpsException {} -class VpsTrafficRetrieveException extends VpsException {} - -class UnauthorizedException extends Exception {} -class InsufficientAccessLevelException extends Exception {} -class TemplateUnavailableException extends Exception {} - -class ParsingException extends Exception {} diff --git a/frontend/includes/include.misc.php b/frontend/includes/include.misc.php deleted file mode 100644 index c050620..0000000 --- a/frontend/includes/include.misc.php +++ /dev/null @@ -1,229 +0,0 @@ - $field_error) - { - if(empty($source[$field_name])) - { - $errors[] = $field_error; - } - } - - return $errors; -} - -function array_add(&$array, $value) -{ - /* Why use a separate function to add an item to an array if the $name[] construct exists? - * We only want to add an element to an array if the element isn't in the array yet, hence - * the need for a custom function. - * NOTE: This function works in-place. */ - if(in_array($value, $array) === false) - { - $array[] = $value; - } -} - -function validate_hostname($hostname) -{ - if(preg_match("/^[a-z\d](-*[a-z\d])*(\.[a-z\d](-*[a-z\d])*)*$/", $hostname)) - { - return true; - } - else - { - return false; - } -} - -function first_unused_ctid() -{ - /* [OpenVZ only] This function finds the first valid unused CTID and returns it. */ - global $database; - - $id_list = array(); - $highest = 101; - - /* Collect all known CTIDs and keep track of the highest CTID. */ - if($result = $database->CachedQuery("SELECT `InternalId` FROM containers WHERE `VirtualizationType` = 1", array(), 0)) - { - foreach($result->data as $row) - { - $id = filter_var($row['InternalId'] ,FILTER_VALIDATE_INT); - - if($id !== false) - { - $id_list[] = $id; - - if($id > $highest) - { - $highest = $id; - } - } - } - } - - /* Generate a list of all possible CTIDs between 101 and the highest CTID, and find - * all possible CTIDs that do not exist in the known CTID list. We use array_merge - * because otherwise the array indexes may not start from 0. */ - $all_ids = range(101, $highest, 1); - $missing = array_merge(array_diff($all_ids, $id_list)); - - if(count($missing) > 0) - { - /* Return the first unused CTID. */ - return $missing[0]; - } - else - { - /* All CTIDs up to the highest CTID have been used. We'll just return the CTID - * that is one above the highest known CTID. */ - return $highest + 1; - } -} - -function format_size($input, $multiplier = 1024, $group = false, $decimal_places = 0, $return_array = false) -{ - if($input > pow($multiplier, 8)) - { - $unit = "Y"; - $number = $input / pow($multiplier, 8); - } - elseif($input > pow($multiplier, 7)) - { - $unit = "Z"; - $number = $input / pow($multiplier, 7); - } - elseif($input > pow($multiplier, 6)) - { - $unit = "E"; - $number = $input / pow($multiplier, 6); - } - elseif($input > pow($multiplier, 5)) - { - $unit = "P"; - $number = $input / pow($multiplier, 5); - } - elseif($input > pow($multiplier, 4)) - { - $unit = "T"; - $number = $input / pow($multiplier, 4); - } - elseif($input > pow($multiplier, 3)) - { - $unit = "G"; - $number = $input / pow($multiplier, 3); - } - elseif($input > pow($multiplier, 2)) - { - $unit = "M"; - $number = $input / pow($multiplier, 2); - } - elseif($input > $multiplier) - { - $unit = "K"; - $number = $input / $multiplier; - } - else - { - $unit = ""; - $number = $input; - } - - if($group === true) - { - $number = number_format($number, $decimal_places); - } - else - { - $number = round($number, $decimal_places); - } - - if($return_array == true) - { - return array($number, $unit); - } - else - { - return $number . $unit; - } -} - -function status_code($code) -{ - $codes = array( - 100 => "Continue", - 101 => "Switching Protocols", - 200 => "OK", - 201 => "Created", - 202 => "Accepted", - 203 => "Non-Authoritative Information", - 204 => "No Content", - 205 => "Reset Content", - 206 => "Partial Content", - 300 => "Multiple Choices", - 301 => "Moved Permanently", - 302 => "Moved Temporarily", - 303 => "See Other", - 304 => "Not Modified", - 305 => "Use Proxy", - 400 => "Bad Request", - 401 => "Unauthorized", - 402 => "Payment Required", - 403 => "Forbidden", - 404 => "Not Found", - 405 => "Method Not Allowed", - 406 => "Not Acceptable", - 407 => "Proxy Authentication Required", - 408 => "Request Time-out", - 409 => "Conflict", - 410 => "Gone", - 411 => "Length Required", - 412 => "Precondition Failed", - 413 => "Request Entity Too Large", - 414 => "Request-URI Too Large", - 415 => "Unsupported Media Type", - 418 => "I'm a teapot", - 500 => "Internal Server Error", - 501 => "Not Implemented", - 502 => "Bad Gateway", - 503 => "Service Unavailable", - 504 => "Gateway Time-out", - 505 => "HTTP Version not supported", - ); - - if(array_key_exists($code, $codes)) - { - $text = $codes[$code]; - } - else - { - throw new Exception("The specified HTTP status code does not exist."); - } - - if(strpos(php_sapi_name(), "cgi") !== false) - { - header("Status: {$code} {$text}"); - } - else - { - $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'); - header("{$protocol} {$code} {$text}"); - } -} diff --git a/frontend/includes/include.parsing.php b/frontend/includes/include.parsing.php deleted file mode 100644 index 46ee8ca..0000000 --- a/frontend/includes/include.parsing.php +++ /dev/null @@ -1,94 +0,0 @@ - diff --git a/frontend/index.php b/frontend/index.php deleted file mode 100644 index a6b0615..0000000 --- a/frontend/index.php +++ /dev/null @@ -1,14 +0,0 @@ -Help mee! - -userbox-loggedin; Je bent ingelogd als {%?username}. -userbox-account; Accountinstellingen -userbox-list; Mijn VPSen -userbox-logout; Uitloggen - -menu-overview; Overzicht -menu-statistics; Statistieken -menu-reinstall; Herinstalleren -menu-backups; Backups -menu-console; Console -menu-ip; IP-toewijzing -menu-alerts; Notificaties -menu-api; API - -login-username; Gebruikersnaam -login-password; Wachtwoord - -overview-quota-title-disk; Schijfruimte -overview-quota-title-ram; RAM -overview-quota-title-traffic; Dataverkeer -overview-title-configuration; VPS-configuratie -overview-title-status; Status -overview-title-location; Serverlocatie -overview-title-node; Host-server -overview-title-os; Besturingssysteem -overview-title-ipv4; IPv4-adressen -overview-title-ipv6; IPv6-adressen -overview-title-guaranteed; Gegarandeerde RAM -overview-title-burstable; Burstable RAM -overview-title-disk; Schijfruimte -overview-title-traffic; Dataverkeer -overview-title-bandwidth; Bandbreedtte -overview-status-running; Gestart -overview-status-stopped; Gestopt -overview-status-suspended; Geblokkeerd -overview-status-unknown; Onbekend -overview-button-start; Start VPS -overview-button-restart; Herstart VPS -overview-button-stop; Stop VPS - -list-column-hostname; Hostnaam -list-column-platform; Platform -list-column-node; Host-server -list-column-disk; Schijfruimte -list-column-ram; RAM -list-column-template; Sjabloon -list-status-running; Gestart -list-status-stopped; Gestopt -list-status-suspended; Geblokkeerd - -reinstall-warning; Ik begrijp dat bij het herinstalleren van mijn VPS alle gegevens die zich op de VPS bevinden onherroepelijk verloren gaan, en niet hersteld kunnen worden. Er zijn geen verdere bevestigingen, na het aanklikken van onderstaande knop wordt de herinstallatie gestart. Deze kan niet geannuleerd worden. diff --git a/frontend/locales/english.json b/frontend/locales/english.json deleted file mode 100644 index a97dd54..0000000 --- a/frontend/locales/english.json +++ /dev/null @@ -1 +0,0 @@ -{"console-title-port": {"message": "Port", "description": ""}, "toolbar-createuser": {"message": "Create user", "description": ""}, "button-login": {"message": "Login", "description": ""}, "edituser-access": {"message": "Account type", "description": ""}, "error-reinstall-notselected-title": {"message": "No template selected", "description": ""}, "title-overview": {"message": "Overview", "description": ""}, "error-admin-vpses-add-burstable": {"message": "You did not enter a valid burstable RAM specification.", "description": ""}, "title-unauthorized": {"message": "Unauthorized", "description": ""}, "addvps-guaranteed": {"message": "Guaranteed RAM", "description": ""}, "error-start-suspended-title": {"message": "VPS is suspended", "description": ""}, "event-1week-ago": {"message": "1 week ago", "description": ""}, "overview-title-bandwidth": {"message": "Bandwidth", "description": ""}, "error-stop-failed-title": {"message": "VPS failed to stop", "description": ""}, "button-admin-edituser": {"message": "Apply changes", "description": ""}, "addnode-customkeypair": {"message": "Custom keypair", "description": ""}, "console-step2": {"message": "After logging in with the above details, you will have to enter your VPS panel login details, after which you can select a VPS to invoke a root shell on.", "description": ""}, "console-step1": {"message": "To use the out-of-band console, connect through SSH using the following details:", "description": ""}, "error-logout-notloggedin-text": {"message": "You can only logout when you are already logged in.", "description": ""}, "error-reinstall-suspended-text": {"message": "You can not reinstall this VPS, because it is suspended. If you believe this is in error, please contact support.", "description": ""}, "menu-backups": {"message": "Backups", "description": ""}, "error-stop-success-title": {"message": "VPS stopped", "description": ""}, "list-status-unknown": {"message": "Status unknown", "description": ""}, "title-password": {"message": "Set new root password", "description": ""}, "password-field-confirm": {"message": "Confirm password", "description": ""}, "console-title-password": {"message": "Password", "description": ""}, "button-admin-vps-suspend": {"message": "Suspend VPS", "description": ""}, "error-start-terminated-title": {"message": "VPS is terminated", "description": ""}, "addvps-node": {"message": "Node", "description": ""}, "button-reinstall": {"message": "Reinstall", "description": ""}, "error-reinstall-failed-title": {"message": "Reinstallation failed", "description": ""}, "event-minutes-ago": {"message": "%1$d minutes ago", "description": ""}, "reinstall-warning": {"message": "I understand that by reinstalling my VPS, all data on the VPS is permanently lost and cannot be recovered. There will be no further confirmations, after clicking the Reinstall button the reinstallation process cannot be aborted.", "description": ""}, "error-admin-vpses-add-guaranteed": {"message": "You did not enter a valid guaranteed RAM specification.", "description": ""}, "error-admin-user-title": {"message": "That user does not exist", "description": ""}, "error-password-missing-title": {"message": "Fields missing", "description": ""}, "error-admin-nodes-add-hostname": {"message": "You did not fill in a valid hostname.", "description": ""}, "error-logout-success-text": {"message": "You have been successfully logged out. You can now close this page.", "description": ""}, "button-admin-vps-terminate": {"message": "Terminate VPS", "description": ""}, "button-password": {"message": "Set new root password", "description": ""}, "error-admin-vpses-add-hostname": {"message": "You entered an invalid hostname.", "description": ""}, "list-column-hostname": {"message": "Hostname", "description": ""}, "button-admin-addvps": {"message": "Create VPS", "description": ""}, "error-suspend-error-text": {"message": "The VPS could not be suspended.", "description": ""}, "title-admin-nodelist": {"message": "Node overview", "description": ""}, "error-password-nomatch-title": {"message": "Passwords do not match", "description": ""}, "event-weeks-ago": {"message": "%1$d weeks ago", "description": ""}, "admin-overview-message": {"message": "In the future, this page will hold a log of all most recent events. For now, it's just an empty page.", "description": ""}, "error-password-success-text": {"message": "Your new root password was successfully configured. Please ensure to change your root password again from your VPS after logging in.", "description": ""}, "addvps-template": {"message": "Template", "description": ""}, "error-start-terminated-text": {"message": "Your VPS could not be started, as it is terminated.", "description": ""}, "title-admin-vps-terminate": {"message": "Terminate VPS", "description": ""}, "warning-password-title": {"message": "Security warning", "description": ""}, "console-introduction": {"message": "If you cannot access your VPS for some reason, you can use the out-of-band console (also known as shell dropper) to invoke a root shell.", "description": ""}, "overview-status-unknown": {"message": "Unknown", "description": ""}, "overview-quota-title-traffic-outgoing": {"message": "Outgoing traffic", "description": ""}, "error-terminate-error-title": {"message": "Failed to terminate VPS", "description": ""}, "error-start-running-title": {"message": "VPS can't be started", "description": ""}, "error-stop-terminated-title": {"message": "VPS is terminated", "description": ""}, "warning-password-text": {"message": "Configuring your root password through this panel may expose it to the VPS provider. Only use this feature in an emergency situation, and always change your password again afterwards, from within your VPS.", "description": ""}, "list-status-stopped": {"message": "Stopped", "description": ""}, "error-unsuspend-error-title": {"message": "Failed to unsuspend VPS", "description": ""}, "error-restart-start-title": {"message": "VPS failed to start", "description": ""}, "error-reinstall-notfound-title": {"message": "Reinstallation aborted", "description": ""}, "userbox-account": {"message": "Account settings", "description": ""}, "overview-quota-title-traffic-incoming": {"message": "Incoming traffic", "description": ""}, "error-suspended-title": {"message": "This VPS is suspended", "description": ""}, "error-admin-vpses-add-user": {"message": "You did not select a valid user.", "description": ""}, "error-password-missing-text": {"message": "Both fields are required. Please try again.", "description": ""}, "addnode-publickey": {"message": "Public key", "description": ""}, "error-suspend-success-text": {"message": "The VPS has been suspended and can no longer be used by the owner.", "description": ""}, "toolbar-addnode": {"message": "Add node", "description": ""}, "title-admin-addvps": {"message": "Create VPS", "description": ""}, "error-reinstall-success-text": {"message": "Your VPS was successfully reinstalled.", "description": ""}, "error-terminated-title": {"message": "This VPS has been terminated", "description": ""}, "error-password-nomatch-text": {"message": "Both entries must be identical. Please try again.", "description": ""}, "error-form": {"message": "One or more problems occurred.", "description": ""}, "list-status-suspended": {"message": "Suspended", "description": ""}, "event-1day-ago": {"message": "1 day ago", "description": ""}, "overview-status-stopped": {"message": "Stopped", "description": ""}, "admin-title-id": {"message": "User ID", "description": ""}, "overview-title-location": {"message": "Server location", "description": ""}, "event-hours-ago": {"message": "%1$d hours ago", "description": ""}, "warning-suspended-text": {"message": "You cannot change any configuration or perform any actions on this VPS. If you feel this should not be the case, please contact support.", "description": ""}, "edituser-username": {"message": "Username", "description": ""}, "error-unauthorized-title": {"message": "You are not authorized to view this page", "description": ""}, "admin-level-nodeadmin": {"message": "Node administrator", "description": ""}, "error-stop-suspended-title": {"message": "VPS is suspended", "description": ""}, "error-start-suspended-text": {"message": "Your VPS could not be started, as it is currently suspended. If you believe this is in error, please file a support ticket.", "description": ""}, "reinstall-patience": {"message": "(be patient; this may take a while)", "description": ""}, "error-reinstall-unavailable-text": {"message": "The template you selected is not available. Please select a different template.", "description": ""}, "error-terminate-success-text": {"message": "The VPS has been terminated and can no longer be used by the owner.", "description": ""}, "error-reinstall-notselected-text": {"message": "You did not select a template from the list. Please select a template and try again.", "description": ""}, "vps-admin-unsuspend-text": {"message": "Are you sure you wish to unsuspend this VPS? The owner will be able to use it again.", "description": ""}, "menu-ip": {"message": "IP Allocation", "description": ""}, "addnode-location": {"message": "Physical location", "description": ""}, "error-password-invalid-title": {"message": "Failed to configure root password", "description": ""}, "error-password-terminated-text": {"message": "You can not configure the root password for this VPS, because it has been terminated.", "description": ""}, "addvps-burstable": {"message": "Burstable RAM", "description": ""}, "error-unsuspend-success-text": {"message": "The VPS has been unsuspended and can now be used by the owner again.", "description": ""}, "userbox-loggedin": {"message": "You are logged in as {%?username}.", "description": ""}, "vps-admin-terminate": {"message": "Terminate", "description": ""}, "error-notfound-title": {"message": "VPS not found", "description": ""}, "error-password-terminated-title": {"message": "Failed to configure root password", "description": ""}, "error-admin-vpses-add-cpucount": {"message": "You did not enter a valid amount of CPUs.", "description": ""}, "error-stop-stopped-text": {"message": "Your VPS cannot be stopped because it is not running.", "description": ""}, "error-reinstall-unavailable-title": {"message": "Reinstallation aborted", "description": ""}, "error-stop-terminated-text": {"message": "Your VPS could not be stopped, as it is terminated.", "description": ""}, "overview-button-stop": {"message": "Stop VPS", "description": ""}, "title-admin-edituser": {"message": "Edit user", "description": ""}, "login-password": {"message": "Password", "description": ""}, "toolbar-createvps": {"message": "Create VPS", "description": ""}, "error-admin-nodes-add-privatekey": {"message": "You did not upload a valid private key.", "description": ""}, "warning-terminated-text": {"message": "You cannot change any configuration or perform any actions on this VPS, as it is terminated.", "description": ""}, "error-admin-nodes-add-name": {"message": "You did not fill in a valid name.", "description": ""}, "overview-title-traffic": {"message": "Traffic", "description": ""}, "event-1hour-ago": {"message": "1 hour ago", "description": ""}, "overview-status-running": {"message": "Running", "description": ""}, "error-start-success-title": {"message": "VPS started", "description": ""}, "overview-title-traffic-outgoing": {"message": "Outgoing traffic", "description": ""}, "event-now": {"message": "now", "description": ""}, "admin-title-accesslevel": {"message": "Access level", "description": ""}, "error-admin-vpses-add-template": {"message": "You did not select a valid template.", "description": ""}, "overview-title-status": {"message": "Status", "description": ""}, "error-terminate-success-title": {"message": "VPS terminated", "description": ""}, "error-reinstall-terminated-text": {"message": "You can not reinstall this VPS, because it has been terminated.", "description": ""}, "warning-suspended-title": {"message": "This VPS is suspended", "description": ""}, "title-console": {"message": "Out-of-band console", "description": ""}, "overview-title-disk": {"message": "Disk space", "description": ""}, "error-stop-failed-text": {"message": "Your VPS could not be stopped. If this error persists, please file a support ticket.", "description": ""}, "error-stop-suspended-text": {"message": "Your VPS could not be stopped, as it is currently suspended. If you believe this is in error, please file a support ticket.", "description": ""}, "_time": {"message": "%H:%M:%S", "description": ""}, "list-column-nodeid": {"message": "Node ID", "description": ""}, "menu-alerts": {"message": "Alerts", "description": ""}, "button-admin-vps-transfer": {"message": "Transfer VPS", "description": ""}, "login-username": {"message": "Username", "description": ""}, "list-column-location": {"message": "Physical location", "description": ""}, "header-vps-admin": {"message": "Administrative tasks", "description": ""}, "event-seconds-ago": {"message": "%1$d seconds ago", "description": ""}, "menu-admin-users": {"message": "Users", "description": ""}, "overview-title-node": {"message": "Host node", "description": ""}, "overview-button-restart": {"message": "Restart VPS", "description": ""}, "event-days-ago": {"message": "%1$d days ago", "description": ""}, "admin-level-masteradmin": {"message": "Master administrator", "description": ""}, "error-unterminate-success-text": {"message": "The VPS has been unterminated and can now be used by the owner again.", "description": ""}, "addnode-name": {"message": "Name", "description": ""}, "addvps-traffic": {"message": "Traffic allocation", "description": ""}, "menu-admin-vpses": {"message": "VPSes", "description": ""}, "addvps-diskspace": {"message": "Disk space", "description": ""}, "title-admin-vps-unsuspend": {"message": "Unsuspend VPS", "description": ""}, "error-restart-success-title": {"message": "VPS restarted", "description": ""}, "overview-title-guaranteed": {"message": "Guaranteed RAM", "description": ""}, "overview-title-configuration": {"message": "VPS configuration", "description": ""}, "title-login": {"message": "Login to your VPS panel", "description": ""}, "_datetime_short": {"message": "%d/%m/%Y %H:%M:%S", "description": ""}, "console-title-username": {"message": "Username", "description": ""}, "event-1year-ago": {"message": "1 year ago", "description": ""}, "edituser-email": {"message": "Email address", "description": ""}, "menu-admin-overview": {"message": "Overview", "description": ""}, "event-1minutes-ago": {"message": "1 minute ago", "description": ""}, "menu-api": {"message": "API", "description": ""}, "menu-reinstall": {"message": "Reinstall", "description": ""}, "button-admin-vps-unterminate": {"message": "Unterminate VPS", "description": ""}, "event-past": {"message": "in the past", "description": ""}, "list-column-platform": {"message": "Platform", "description": ""}, "vps-admin-suspend": {"message": "Suspend / unsuspend", "description": ""}, "error-suspend-success-title": {"message": "VPS suspended", "description": ""}, "error-unsuspend-error-text": {"message": "The VPS could not be unsuspended.", "description": ""}, "overview-button-start": {"message": "Start VPS", "description": ""}, "error-reinstall-start-title": {"message": "Failed to start", "description": ""}, "addvps-user": {"message": "User", "description": ""}, "error-start-success-text": {"message": "Your VPS was successfully started.", "description": ""}, "error-admin-nodes-add-location": {"message": "You did not fill in a valid physical location.", "description": ""}, "admin-level-enduser": {"message": "End user", "description": ""}, "error-password-suspended-title": {"message": "Failed to configure root password", "description": ""}, "error-start-failed-text": {"message": "Your VPS could not be started. If this error persists, please file a support ticket.", "description": ""}, "overview-title-os": {"message": "Operating system", "description": ""}, "addvps-hostname": {"message": "Hostname (optional)", "description": ""}, "error-login-invalid-text": {"message": "The login details you provided are invalid. Please try again.", "description": ""}, "_locale": {"message": "en_US.UTF-8,en_US", "description": ""}, "password-field-password": {"message": "New root password", "description": ""}, "error-stop-success-text": {"message": "Your VPS was successfully stopped.", "description": ""}, "userbox-admin": {"message": "Administration panel", "description": ""}, "list-status-running": {"message": "Running", "description": ""}, "error-restart-success-text": {"message": "Your VPS was successfully restarted.", "description": ""}, "overview-title-burstable": {"message": "Burstable RAM", "description": ""}, "error-reinstall-success-title": {"message": "Reinstallation succeeded!", "description": ""}, "error-unterminate-success-title": {"message": "VPS unterminated", "description": ""}, "notfound": {"message": "The specified VPS was not found.", "description": ""}, "console-title-hostname": {"message": "Hostname", "description": ""}, "error-admin-nodes-add-upload": {"message": "Something went wrong while processing the uploaded keys. Ensure that the keys directory is writable.", "description": ""}, "title-admin-nodeinfo": {"message": "Node lookup", "description": ""}, "title-admin-vps-transfer": {"message": "Transfer VPS ownership", "description": ""}, "warning-terminated-title": {"message": "This VPS has been terminated", "description": ""}, "error-logout-notloggedin-title": {"message": "You are not logged in", "description": ""}, "event-1second-ago": {"message": "1 second ago", "description": ""}, "header-admin-user-vpses": {"message": "VPSes owned by this user", "description": ""}, "error-login-invalid-title": {"message": "Login failed", "description": ""}, "error-notfound-text": {"message": "The VPS you selected was not found.", "description": ""}, "error-stop-stopped-title": {"message": "VPS can't be stopped", "description": ""}, "admin-level-reseller": {"message": "Reseller", "description": ""}, "error-password-suspended-text": {"message": "You can not configure the root password for this VPS, because it is suspended. If you believe this is in error, please contact support.", "description": ""}, "error-unauthorized-text": {"message": "Your access level is not sufficient or you are not logged in.", "description": ""}, "error-password-invalid-text": {"message": "Your password may be in an invalid format. Try again with a different password.", "description": ""}, "title-reinstall": {"message": "Reinstall your VPS", "description": ""}, "menu-statistics": {"message": "Statistics", "description": ""}, "menu-admin-nodes": {"message": "Nodes", "description": ""}, "error-reinstall-terminated-title": {"message": "Reinstallation aborted", "description": ""}, "admin-title-vpses": {"message": "VPS count", "description": ""}, "title-admin-overview": {"message": "Administrative overview", "description": ""}, "list-column-ram": {"message": "RAM", "description": ""}, "error-restart-terminated-text": {"message": "Your VPS could not be restarted, as it is terminated.", "description": ""}, "button-admin-vps-unsuspend": {"message": "Unsuspend VPS", "description": ""}, "error-terminate-error-text": {"message": "The VPS could not be terminated.", "description": ""}, "title-admin-userlist": {"message": "User overview", "description": ""}, "overview-title-ipv6": {"message": "IPv6 addresses", "description": ""}, "title-admin-vps-suspend": {"message": "Suspend VPS", "description": ""}, "overview-title-ipv4": {"message": "IPv4 addresses", "description": ""}, "addnode-privatekey": {"message": "Private key", "description": ""}, "title-admin-userinfo": {"message": "User lookup", "description": ""}, "error-admin-nodes-add-publickey": {"message": "You did not upload a valid public key.", "description": ""}, "error-reinstall-failed-text": {"message": "Something went wrong during the reinstallation of your VPS. Please try again. If the reinstallation fails again, please contact support.", "description": ""}, "event-1month-ago": {"message": "1 month ago", "description": ""}, "list-column-disk": {"message": "Disk space", "description": ""}, "_datetime_long": {"message": "%A %B %d, %Y %H:%M:%S", "description": ""}, "error-restart-suspended-text": {"message": "Your VPS could not be restarted, as it is currently suspended. If you believe this is in error, please file a support ticket.", "description": ""}, "vps-admin-suspend-text": {"message": "Are you sure you wish to suspend this VPS? The owner will no longer be able to use it, until it is unsuspended!", "description": ""}, "error-reinstall-suspended-title": {"message": "Reinstallation aborted", "description": ""}, "error-start-failed-title": {"message": "VPS failed to start", "description": ""}, "addnode-hostname": {"message": "Hostname", "description": ""}, "error-admin-vpses-add-node": {"message": "You did not select a valid node.", "description": ""}, "userbox-logout": {"message": "Log out", "description": ""}, "error-restart-suspended-title": {"message": "VPS is suspended", "description": ""}, "list-column-template": {"message": "Template", "description": ""}, "header-admin-node-vpses": {"message": "VPSes on this node", "description": ""}, "userbox-list": {"message": "My VPSes", "description": ""}, "error-reinstall-notfound-text": {"message": "The template you selected does not exist (anymore). Please select a different template.", "description": ""}, "error-start-running-text": {"message": "Your VPS cannot be started because it is already running.", "description": ""}, "vps-admin-unterminate-text": {"message": "Are you sure you wish to unterminate this VPS? The owner will be able to use it again.", "description": ""}, "toolbar-editnode": {"message": "Edit node details", "description": ""}, "vps-admin-terminate-text": {"message": "Are you sure you wish to terminate this VPS? The VPS will be suspended immediately, and deleted after several hours. As long as it is not deleted, the termination can be undone.", "description": ""}, "event-future": {"message": "in the future", "description": ""}, "error-reinstall-confirm-text": {"message": "You did not tick the checkbox at the bottom of the page. Please carefully read the warning, tick the checkbox, and try again.", "description": ""}, "_date_short": {"message": "%d/%m/%Y", "description": ""}, "overview-quota-title-ram": {"message": "RAM", "description": ""}, "error-unterminate-error-text": {"message": "The VPS could not be unterminated.", "description": ""}, "error-reinstall-confirm-title": {"message": "Reinstallation aborted", "description": ""}, "overview-quota-title-traffic": {"message": "Traffic", "description": ""}, "button-admin-addnode": {"message": "Add node", "description": ""}, "error-admin-user-text": {"message": "The user you tried to look up does not exist.", "description": ""}, "event-months-ago": {"message": "%1$d months ago", "description": ""}, "overview-quota-title-disk": {"message": "Disk space", "description": ""}, "title-admin-vpslist": {"message": "VPS overview", "description": ""}, "error-restart-terminated-title": {"message": "VPS is terminated", "description": ""}, "menu-overview": {"message": "Overview", "description": ""}, "list-column-node": {"message": "Node", "description": ""}, "title-admin-addnode": {"message": "Add node", "description": ""}, "error-suspend-error-title": {"message": "Failed to suspend VPS", "description": ""}, "error-unsuspend-success-title": {"message": "VPS unsuspended", "description": ""}, "error-password-success-title": {"message": "Password configuration succeeded!", "description": ""}, "menu-password": {"message": "Root Password", "description": ""}, "event-years-ago": {"message": "%1$d years ago", "description": ""}, "admin-title-email": {"message": "Email address", "description": ""}, "addvps-cpucount": {"message": "CPUs", "description": ""}, "error-admin-vpses-add-disk": {"message": "You did not enter a valid disk space specification.", "description": ""}, "admin-title-username": {"message": "Username", "description": ""}, "_date_long": {"message": "%A %B %d, %Y", "description": ""}, "footer": {"message": "CVM is a free and open source VPS control panel. Want to contribute?", "description": ""}, "title-admin-vps-unterminate": {"message": "Unterminate VPS", "description": ""}, "vps-admin-transfer": {"message": "Transfer", "description": ""}, "error-reinstall-start-text": {"message": "The VPS was successfully reinstalled, but it could not be started. If the issue persists, please contact support.", "description": ""}, "error-restart-start-text": {"message": "Your VPS could not be started. If this error persists, please file a support ticket.", "description": ""}, "menu-console": {"message": "Console", "description": ""}, "error-logout-success-title": {"message": "Successfully logged out", "description": ""}, "error-unterminate-error-title": {"message": "Failed to unterminate VPS", "description": ""}, "error-admin-vpses-add-traffic": {"message": "You did not enter a valid traffic allocation specification.", "description": ""}, "overview-status-suspended": {"message": "Suspended", "description": ""}, "overview-title-traffic-incoming": {"message": "Incoming traffic", "description": ""}, "toolbar-edituser": {"message": "Edit user details", "description": ""}} diff --git a/frontend/locales/english.lng b/frontend/locales/english.lng deleted file mode 100644 index 68a2c8e..0000000 --- a/frontend/locales/english.lng +++ /dev/null @@ -1,342 +0,0 @@ -## Basic locale settings -_locale; en_US.UTF-8,en_US -_datetime_short; %d/%m/%Y %H:%M:%S -_datetime_long; %A %B %d, %Y %H:%M:%S -_date_short; %d/%m/%Y -_date_long; %A %B %d, %Y -_time; %H:%M:%S - -## Relative time indications -event-now; now -event-future; in the future -event-past; in the past -event-1second-ago; 1 second ago -event-seconds-ago; %1$d seconds ago -event-1minutes-ago; 1 minute ago -event-minutes-ago; %1$d minutes ago -event-1hour-ago; 1 hour ago -event-hours-ago; %1$d hours ago -event-1day-ago; 1 day ago -event-days-ago; %1$d days ago -event-1week-ago; 1 week ago -event-weeks-ago; %1$d weeks ago -event-1month-ago; 1 month ago -event-months-ago; %1$d months ago -event-1year-ago; 1 year ago -event-years-ago; %1$d years ago - -## Miscellaneous -footer; CVM is a free and open source VPS control panel. Want to contribute? -title-unauthorized; Unauthorized -error-unauthorized-title; You are not authorized to view this page -error-unauthorized-text; Your access level is not sufficient or you are not logged in. -error-notfound-title; VPS not found -error-notfound-text; The VPS you selected was not found. - -## Login -title-login; Login to your VPS panel -error-login-invalid-title; Login failed -error-login-invalid-text; The login details you provided are invalid. Please try again. -login-username; Username -login-password; Password -button-login; Login - -## Logout -error-logout-success-title; Successfully logged out -error-logout-success-text; You have been successfully logged out. You can now close this page. -error-logout-notloggedin-title; You are not logged in -error-logout-notloggedin-text; You can only logout when you are already logged in. - -## User box -userbox-loggedin; You are logged in as {%?username}. -userbox-account; Account settings -userbox-list; My VPSes -userbox-logout; Log out -userbox-admin; Administration panel - -## End user menu items -menu-overview; Overview -menu-statistics; Statistics -menu-reinstall; Reinstall -menu-backups; Backups -menu-console; Console -menu-ip; IP Allocation -menu-alerts; Alerts -menu-api; API -menu-password; Root Password - -## Administration panel menu items -menu-admin-overview; Overview -menu-admin-users; Users -menu-admin-vpses; VPSes -menu-admin-nodes; Nodes -menu-admin-templates; Templates - -## Global warnings and errors -error-form; One or more problems occurred. -warning-suspended-title; This VPS is suspended -warning-suspended-text; You cannot change any configuration or perform any actions on this VPS. If you feel this should not be the case, please contact support. -warning-terminated-title; This VPS has been terminated -warning-terminated-text; You cannot change any configuration or perform any actions on this VPS, as it is terminated. -error-suspended-title; This VPS is suspended -error-terminated-title; This VPS has been terminated - -## VPS overview page -title-overview; Overview -notfound; The specified VPS was not found. -overview-quota-title-disk; Disk space -overview-quota-title-ram; RAM -overview-quota-title-traffic; Traffic -overview-quota-title-traffic-incoming; Incoming traffic -overview-quota-title-traffic-outgoing; Outgoing traffic -overview-title-configuration; VPS configuration -overview-title-status; Status -overview-title-location; Server location -overview-title-node; Host node -overview-title-os; Operating system -overview-title-ipv4; IPv4 addresses -overview-title-ipv6; IPv6 addresses -overview-title-guaranteed; Guaranteed RAM -overview-title-burstable; Burstable RAM -overview-title-disk; Disk space -overview-title-traffic; Traffic -overview-title-traffic-incoming; Incoming traffic -overview-title-traffic-outgoing; Outgoing traffic -overview-title-bandwidth; Bandwidth -overview-status-running; Running -overview-status-stopped; Stopped -overview-status-suspended; Suspended -overview-status-unknown; Unknown -overview-button-start; Start VPS -overview-button-restart; Restart VPS -overview-button-stop; Stop VPS -header-vps-admin; Administrative tasks -vps-admin-suspend; Suspend / unsuspend -vps-admin-transfer; Transfer -vps-admin-terminate; Terminate - -## Start VPS -error-start-success-title; VPS started -error-start-success-text; Your VPS was successfully started. -error-start-suspended-title; VPS is suspended -error-start-suspended-text; Your VPS could not be started, as it is currently suspended. If you believe this is in error, please file a support ticket. -error-start-terminated-title; VPS is terminated -error-start-terminated-text; Your VPS could not be started, as it is terminated. -error-start-failed-title; VPS failed to start -error-start-failed-text; Your VPS could not be started. If this error persists, please file a support ticket. -error-start-running-title; VPS can't be started -error-start-running-text; Your VPS cannot be started because it is already running. - -## Stop VPS -error-stop-success-title; VPS stopped -error-stop-success-text; Your VPS was successfully stopped. -error-stop-suspended-title; VPS is suspended -error-stop-suspended-text; Your VPS could not be stopped, as it is currently suspended. If you believe this is in error, please file a support ticket. -error-stop-terminated-title; VPS is terminated -error-stop-terminated-text; Your VPS could not be stopped, as it is terminated. -error-stop-failed-title; VPS failed to stop -error-stop-failed-text; Your VPS could not be stopped. If this error persists, please file a support ticket. -error-stop-stopped-title; VPS can't be stopped -error-stop-stopped-text; Your VPS cannot be stopped because it is not running. - -## Restart VPS -error-restart-success-title; VPS restarted -error-restart-success-text; Your VPS was successfully restarted. -error-restart-suspended-title; VPS is suspended -error-restart-suspended-text; Your VPS could not be restarted, as it is currently suspended. If you believe this is in error, please file a support ticket. -error-restart-terminated-title; VPS is terminated -error-restart-terminated-text; Your VPS could not be restarted, as it is terminated. -error-restart-start-title; VPS failed to start -error-restart-start-text; Your VPS could not be started. If this error persists, please file a support ticket. - -## Suspend VPS -title-admin-vps-suspend; Suspend VPS -vps-admin-suspend-text; Are you sure you wish to suspend this VPS? The owner will no longer be able to use it, until it is unsuspended! -error-suspend-success-title; VPS suspended -error-suspend-success-text; The VPS has been suspended and can no longer be used by the owner. -error-suspend-error-title; Failed to suspend VPS -error-suspend-error-text; The VPS could not be suspended. -button-admin-vps-suspend; Suspend VPS - -## Unsuspend VPS -title-admin-vps-unsuspend; Unsuspend VPS -vps-admin-unsuspend-text; Are you sure you wish to unsuspend this VPS? The owner will be able to use it again. -error-unsuspend-success-title; VPS unsuspended -error-unsuspend-success-text; The VPS has been unsuspended and can now be used by the owner again. -error-unsuspend-error-title; Failed to unsuspend VPS -error-unsuspend-error-text; The VPS could not be unsuspended. -button-admin-vps-unsuspend; Unsuspend VPS - -## Terminate VPS -title-admin-vps-terminate; Terminate VPS -vps-admin-terminate-text; Are you sure you wish to terminate this VPS? The VPS will be suspended immediately, and deleted after several hours. As long as it is not deleted, the termination can be undone. -error-terminate-success-title; VPS terminated -error-terminate-success-text; The VPS has been terminated and can no longer be used by the owner. -error-terminate-error-title; Failed to terminate VPS -error-terminate-error-text; The VPS could not be terminated. -button-admin-vps-terminate; Terminate VPS - -## Unterminate VPS -title-admin-vps-unterminate; Unterminate VPS -vps-admin-unterminate-text; Are you sure you wish to unterminate this VPS? The owner will be able to use it again. -error-unterminate-success-title; VPS unterminated -error-unterminate-success-text; The VPS has been unterminated and can now be used by the owner again. -error-unterminate-error-title; Failed to unterminate VPS -error-unterminate-error-text; The VPS could not be unterminated. -button-admin-vps-unterminate; Unterminate VPS - -## Transfer VPS -title-admin-vps-transfer; Transfer VPS ownership -button-admin-vps-transfer; Transfer VPS - -## Terminate VPS -title-admin-vps-terminate; Terminate VPS -button-admin-vps-terminate; Terminate VPS - -## Reinstall VPS -title-reinstall; Reinstall your VPS -error-reinstall-success-title; Reinstallation succeeded! -error-reinstall-success-text; Your VPS was successfully reinstalled. -error-reinstall-confirm-title; Reinstallation aborted -error-reinstall-confirm-text; You did not tick the checkbox at the bottom of the page. Please carefully read the warning, tick the checkbox, and try again. -error-reinstall-notfound-title; Reinstallation aborted -error-reinstall-notfound-text; The template you selected does not exist (anymore). Please select a different template. -error-reinstall-notselected-title; No template selected -error-reinstall-notselected-text; You did not select a template from the list. Please select a template and try again. -error-reinstall-unavailable-title; Reinstallation aborted -error-reinstall-unavailable-text; The template you selected is not available. Please select a different template. -error-reinstall-failed-title; Reinstallation failed -error-reinstall-failed-text; Something went wrong during the reinstallation of your VPS. Please try again. If the reinstallation fails again, please contact support. -error-reinstall-start-title; Failed to start -error-reinstall-start-text; The VPS was successfully reinstalled, but it could not be started. If the issue persists, please contact support. -error-reinstall-suspended-title; Reinstallation aborted -error-reinstall-suspended-text; You can not reinstall this VPS, because it is suspended. If you believe this is in error, please contact support. -error-reinstall-terminated-title; Reinstallation aborted -error-reinstall-terminated-text; You can not reinstall this VPS, because it has been terminated. -reinstall-warning; I understand that by reinstalling my VPS, all data on the VPS is permanently lost and cannot be recovered. There will be no further confirmations, after clicking the Reinstall button the reinstallation process cannot be aborted. -reinstall-patience; (be patient; this may take a while) -button-reinstall; Reinstall - -## Change root password -title-password; Set new root password -error-password-success-title; Password configuration succeeded! -error-password-success-text; Your new root password was successfully configured. Please ensure to change your root password again from your VPS after logging in. -error-password-nomatch-title; Passwords do not match -error-password-nomatch-text; Both entries must be identical. Please try again. -error-password-missing-title; Fields missing -error-password-missing-text; Both fields are required. Please try again. -error-password-suspended-title; Failed to configure root password -error-password-suspended-text; You can not configure the root password for this VPS, because it is suspended. If you believe this is in error, please contact support. -error-password-terminated-title; Failed to configure root password -error-password-terminated-text; You can not configure the root password for this VPS, because it has been terminated. -error-password-invalid-title; Failed to configure root password -error-password-invalid-text; Your password may be in an invalid format. Try again with a different password. -warning-password-title; Security warning -warning-password-text; Configuring your root password through this panel may expose it to the VPS provider. Only use this feature in an emergency situation, and always change your password again afterwards, from within your VPS. -password-field-password; New root password -password-field-confirm; Confirm password -button-password; Set new root password - -## Out-of-band console -title-console; Out-of-band console -console-introduction; If you cannot access your VPS for some reason, you can use the out-of-band console (also known as shell dropper) to invoke a root shell. -console-step1; To use the out-of-band console, connect through SSH using the following details: -console-step2; After logging in with the above details, you will have to enter your VPS panel login details, after which you can select a VPS to invoke a root shell on. -console-title-hostname; Hostname -console-title-port; Port -console-title-username; Username -console-title-password; Password - -## User list -title-admin-userlist; User overview -toolbar-createuser; Create user - -## User lookup -title-admin-userinfo; User lookup -error-admin-user-title; That user does not exist -error-admin-user-text; The user you tried to look up does not exist. -toolbar-edituser; Edit user details -admin-title-id; User ID -admin-title-username; Username -admin-title-email; Email address -admin-title-accesslevel; Access level -admin-title-vpses; VPS count -admin-level-enduser; End user -admin-level-reseller; Reseller -admin-level-nodeadmin; Node administrator -admin-level-masteradmin; Master administrator -header-admin-user-vpses; VPSes owned by this user - -## User editing -title-admin-edituser; Edit user -edituser-username; Username -edituser-email; Email address -edituser-access; Account type -button-admin-edituser; Apply changes - -## VPS list -title-admin-vpslist; VPS overview -list-column-hostname; Hostname -list-column-platform; Platform -list-column-node; Node -list-column-disk; Disk space -list-column-ram; RAM -list-column-template; Template -list-column-location; Physical location -list-column-nodeid; Node ID -list-status-running; Running -list-status-stopped; Stopped -list-status-suspended; Suspended -list-status-unknown; Status unknown - -## Node list -title-admin-nodelist; Node overview -toolbar-addnode; Add node - -## Node lookup -title-admin-nodeinfo; Node lookup -toolbar-createvps; Create VPS -toolbar-editnode; Edit node details -header-admin-node-vpses; VPSes on this node - -## Add node -title-admin-addnode; Add node -error-admin-nodes-add-name; You did not fill in a valid name. -error-admin-nodes-add-hostname; You did not fill in a valid hostname. -error-admin-nodes-add-location; You did not fill in a valid physical location. -error-admin-nodes-add-publickey; You did not upload a valid public key. -error-admin-nodes-add-privatekey; You did not upload a valid private key. -error-admin-nodes-add-upload; Something went wrong while processing the uploaded keys. Ensure that the keys directory is writable. -addnode-name; Name -addnode-hostname; Hostname -addnode-location; Physical location -addnode-customkeypair; Custom keypair -addnode-publickey; Public key -addnode-privatekey; Private key -button-admin-addnode; Add node - -## Create VPS -title-admin-addvps; Create VPS -error-admin-vpses-add-node; You did not select a valid node. -error-admin-vpses-add-user; You did not select a valid user. -error-admin-vpses-add-template; You did not select a valid template. -error-admin-vpses-add-disk; You did not enter a valid disk space specification. -error-admin-vpses-add-guaranteed; You did not enter a valid guaranteed RAM specification. -error-admin-vpses-add-burstable; You did not enter a valid burstable RAM specification. -error-admin-vpses-add-cpucount; You did not enter a valid amount of CPUs. -error-admin-vpses-add-traffic; You did not enter a valid traffic allocation specification. -error-admin-vpses-add-hostname; You entered an invalid hostname. -addvps-node; Node -addvps-user; User -addvps-diskspace; Disk space -addvps-guaranteed; Guaranteed RAM -addvps-burstable; Burstable RAM -addvps-cpucount; CPUs -addvps-traffic; Traffic allocation -addvps-hostname; Hostname (optional) -addvps-template; Template -button-admin-addvps; Create VPS - -## Administrative overview -title-admin-overview; Administrative overview -admin-overview-message; In the future, this page will hold a log of all most recent events. For now, it's just an empty page. diff --git a/frontend/locales/romanian.lng b/frontend/locales/romanian.lng deleted file mode 100644 index cb68bb1..0000000 --- a/frontend/locales/romanian.lng +++ /dev/null @@ -1,86 +0,0 @@ -_locale; ro_RO.UTF-8,ro_RO -_datetime_short; %d/%m/%Y %H:%M:%S -_datetime_long; %A %B %d, %Y %H:%M:%S -_date_short; %d/%m/%Y -_date_long; %A %B %d, %Y -_time; %H:%M:%S - -event-now; acum -event-future; in viitor -event-past; in trecut -event-1second-ago; cu o secunda in urma -event-seconds-ago; cu %1$d secunde in urma -event-1minutes-ago; cu un minut in urma -event-minutes-ago; cu %1$d minute in urma -event-1hour-ago; cu o ora in urma -event-hours-ago; cu %1$d ore in urma -event-1day-ago; cu o zi in urma -event-days-ago; cu %1$d zile in urma -event-1week-ago; saptamana trecuta -event-weeks-ago; cu %1$d saptamani in urma -event-1month-ago; luna trecuta -event-months-ago; cu %1$d luni in urma -event-1year-ago; anul trecut -event-years-ago; cu %1$d ani in urma - -title-overview; Prezentare generala -title-login; Autentificare la panoul de VPS -title-reinstall; Reinstalarea VPS-ului - -button-login; Autentificare -button-reinstall; Reinstalare - -notfound; VPS-ul specificat nu a putut fi gasit -footer; CVM este un panou de control pentru VPS-uri, gratuit si open source. Vrei sa contribui? - -userbox-loggedin; Esti logat ca {%?username}. -userbox-account; Setari cont -userbox-list; VPS-urile mele -userbox-logout; Iesire (logout) - -menu-overview; Sumar -menu-statistics; Statistici -menu-reinstall; Reinstalare -menu-backups; Backups -menu-console; Consola -menu-ip; Alocarea IP-urilor -menu-alerts; Alerte -menu-api; API - -login-username; Username -login-password; Parola - -overview-quota-title-disk; Spatiu pe disc -overview-quota-title-ram; RAM -overview-quota-title-traffic; Trafic -overview-title-configuration; Configuratie VPS -overview-title-status; Status -overview-title-location; Locatie server -overview-title-node; Nod gazda -overview-title-os; Sistem de operare -overview-title-ipv4; Adrese IPv4 -overview-title-ipv6; Adrese IPv6 -overview-title-guaranteed; RAM Garantat -overview-title-burstable; RAM burst -overview-title-disk; Spatiu pe disc -overview-title-traffic; Trafic -overview-title-bandwidth; Banda -overview-status-running; Pornit -overview-status-stopped; Oprit -overview-status-suspended; Suspendat -overview-status-unknown; Necunoscut -overview-button-start; Pornire VPS -overview-button-restart; Restart VPS -overview-button-stop; Oprire VPS - -list-column-hostname; Hostname -list-column-platform; Platforma -list-column-node; Gazda -list-column-disk; Spatiu pe disc -list-column-ram; RAM -list-column-template; Template -list-status-running; Activ -list-status-stopped; Oprit -list-status-suspended; Suspendat - -reinstall-warning; Inteleg ca prin reinstalarea VPS-ului, toate datele de pe VPS vor fi permanent pierdute si nu pot fi recuperate. Nu vor mai urma alte confirmari, dupa apasarea butonului Reinstalare procesul de reinstalare nu poate fi intrerupt. diff --git a/frontend/modules/admin/node/add.php b/frontend/modules/admin/node/add.php deleted file mode 100644 index 897d5e7..0000000 --- a/frontend/modules/admin/node/add.php +++ /dev/null @@ -1,101 +0,0 @@ -strings['error-admin-nodes-add-name']; - } - - if(empty($_POST['hostname']) || preg_match(REGEX_HOSTNAME, $_POST['hostname']) === 0) - { - $sErrors[] = $locale->strings['error-admin-nodes-add-hostname']; - } - - if(empty($_POST['location'])) - { - $sErrors[] = $locale->strings['error-admin-nodes-add-location']; - } - - if(isset($_POST['customkey'])) - { - $sKeyId = random_string(20); - - /* TODO: Ensure validity of the custom keys. */ - - if($_FILES["publickey"]["error"] == UPLOAD_ERR_OK) - { - $sPublicKeyName = "{$sKeyId}.public.key"; - } - else - { - $sErrors[] = $locale->strings['error-admin-nodes-add-publickey']; - } - - if($_FILES["privatekey"]["error"] == UPLOAD_ERR_OK) - { - $sPrivateKeyName = "{$sKeyId}.private.key"; - } - else - { - $sErrors[] = $locale->strings['error-admin-nodes-add-privatekey']; - } - } - else - { - $sPublicKeyName = ""; - $sPrivateKeyName = ""; - } - - if(empty($sErrors)) - { - if(isset($_POST['customkey'])) - { - $sSuccess = move_uploaded_file($_FILES['publickey']['tmp_name'], "/etc/cvm/keys/{$sPublicKeyName}") && - move_uploaded_file($_FILES['privatekey']['tmp_name'], "/etc/cvm/keys/{$sPrivateKeyName}"); - if(!$sSuccess) - { - $sErrors[] = $locale->strings['error-admin-nodes-add-upload']; - } - } - else - { - $sSuccess = true; - } - - if($sSuccess) - { - $sNode = new Node(0); - $sNode->uName = $_POST['name']; - $sNode->uHostname = $_POST['hostname']; - $sNode->uPhysicalLocation = $_POST['location']; - $sNode->uHasCustomKey = isset($_POST['customkey']); - $sNode->uPublicKey = $sPublicKeyName; - $sNode->uPrivateKey = $sPrivateKeyName; - $sNode->uUser = "cvm"; - $sNode->uPort = 22; - $sNode->InsertIntoDatabase(); - - redirect("/admin/nodes/"); - } - } -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/node/add", $locale->strings, array( - 'errors' => $sErrors -)); diff --git a/frontend/modules/admin/node/list.php b/frontend/modules/admin/node/list.php deleted file mode 100644 index 5c68082..0000000 --- a/frontend/modules/admin/node/list.php +++ /dev/null @@ -1,34 +0,0 @@ -CachedQuery("SELECT * FROM nodes")) -{ - foreach($result->data as $row) - { - $sNode = new Node($row); - - $sNodeList[] = array( - 'id' => $sNode->sId, - 'hostname' => $sNode->sHostname, - 'location' => $sNode->sPhysicalLocation - ); - } -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/node/list", $locale->strings, array( - 'nodes' => $sNodeList -)); diff --git a/frontend/modules/admin/node/lookup.php b/frontend/modules/admin/node/lookup.php deleted file mode 100644 index 3d07813..0000000 --- a/frontend/modules/admin/node/lookup.php +++ /dev/null @@ -1,67 +0,0 @@ -uParameters[1]); - - $sVpsList = array(); - - if($result = $database->CachedQuery("SELECT * FROM containers WHERE `NodeId` = :NodeId", array(":NodeId" => $sNode->sId))) - { - foreach($result->data as $row) - { - $sVps = new Vps($row); - - try - { - $sStatus = $sVps->sStatusText; - } - catch (SshException $e) - { - $sStatus = "unknown"; - } - - $sVpsList[] = array( - 'id' => $sVps->sId, - 'hostname' => $sVps->sHostname, - 'node' => $sVps->sNode->sName, - 'node-hostname' => $sVps->sNode->sHostname, - 'template' => $sVps->sTemplate->sName, - 'diskspace' => number_format($sVps->sDiskSpace / 1024), - 'diskspace-unit' => "GB", - 'guaranteed-ram' => $sVps->sGuaranteedRam, - 'guaranteed-ram-unit' => "MB", - 'status' => $sStatus, - 'virtualization-type' => $sVps->sVirtualizationType - ); - } - } - - $sPageContents = NewTemplater::Render("{$sTheme}/admin/node/lookup", $locale->strings, array( - 'id' => $sNode->sId, - 'hostname' => $sNode->sHostname, - 'location' => $sNode->sPhysicalLocation, - 'vpses' => $sVpsList - )); -} -catch (NotFoundException $e) -{ - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-admin-node-title'], - 'message' => $locale->strings['error-admin-node-text'] - )); -} - diff --git a/frontend/modules/admin/overview/index.php b/frontend/modules/admin/overview/index.php deleted file mode 100644 index b8f6cc2..0000000 --- a/frontend/modules/admin/overview/index.php +++ /dev/null @@ -1,16 +0,0 @@ -strings, array()); diff --git a/frontend/modules/admin/template/add.php b/frontend/modules/admin/template/add.php deleted file mode 100644 index 81a7db0..0000000 --- a/frontend/modules/admin/template/add.php +++ /dev/null @@ -1,77 +0,0 @@ -uMethod == "post") -{ - $handler = new CPHPFormHandler(); - - try - { - $handler - ->RequireKey("filename") - ->RequireKey("name") - ->RequireKey("description") - ->RequireNonEmpty("filename") - ->RequireNonEmpty("name") - ->ValidateCustom("filename", "The specified template file does not exist.", function($key, $value, $args, $handler){ - return file_exists("/etc/cvm/templates/{$value}"); - }) - ->Done(); - - foreach($handler->GetGroupedValues("filename", "name", "description") as $uTemplateData) - { - $sTemplate = new Template(); - $sTemplate->uName = $uTemplateData["name"]; - $sTemplate->uTemplateName = $uTemplateData["filename"]; - $sTemplate->uDescription = $uTemplateData["description"]; - $sTemplate->uIsSupported = true; - $sTemplate->uIsOutdated = false; - $sTemplate->uIsAvailable = true; - $sTemplate->InsertIntoDatabase(); - } - - redirect("/admin/templates/"); - } - catch (FormValidationException $e) - { - var_dump($e->GetOffendingKeys()); - var_dump($e->GetErrors()); - } -} -else -{ - $sUnknownTemplates = array(); - - $handle = opendir("/etc/cvm/templates"); - while(($filename = readdir($handle)) !== false) - { - if($filename != "." && $filename != "..") - { - try - { - Template::CreateFromQuery("SELECT * FROM templates WHERE `TemplateName` = :Filename", array("Filename" => $filename), 0); - } - catch (NotFoundException $e) - { - $sUnknownTemplates[] = $filename; - } - } - } - closedir($handle); - - $sPageContents = NewTemplater::Render("{$sTheme}/admin/template/add", $locale->strings, array( - "templates" => $sUnknownTemplates - )); -} diff --git a/frontend/modules/admin/template/list.php b/frontend/modules/admin/template/list.php deleted file mode 100644 index 90ff6ba..0000000 --- a/frontend/modules/admin/template/list.php +++ /dev/null @@ -1,40 +0,0 @@ - $sTemplate->sId, - "name" => $sTemplate->sName, - "filename" => $sTemplate->sTemplateName, - "description" => $sTemplate->sDescription, - "supported" => $sTemplate->sIsSupported, - "outdated" => $sTemplate->sIsOutdated, - "available" => $sTemplate->sIsAvailable - ); - } -} -catch (NotFoundException $e) -{ - /* pass */ -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/template/list", $locale->strings, array( - "templates" => $sTemplates -)); diff --git a/frontend/modules/admin/user/edit.php b/frontend/modules/admin/user/edit.php deleted file mode 100644 index 9cf61e0..0000000 --- a/frontend/modules/admin/user/edit.php +++ /dev/null @@ -1,78 +0,0 @@ -uParameters[1]); -} -catch (NotFoundException $e) -{ - throw new RouterException("Specified user does not exist."); -} - -$sErrors = array(); - -if($router->uMethod == "post") -{ - if(empty($_POST['username']) || preg_match("/^[a-z0-9_.-]+$/i", $_POST['username']) === 0) - { - $sErrors[] = "You did not enter a valid username."; - } - - if(empty($_POST['email']) || filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) - { - $sErrors[] = "You did not enter a valid e-mail address."; - } - - if(empty($_POST['access']) || preg_match("/^[0-9]+$/", $_POST['access']) === 0) - { - $sErrors[] = "You did not specify a valid user type."; - } - else - { - if($sUser->sAccessLevel == 30 && $_POST['access'] < 30) - { - /* This user is a master admin, check if any other master admins exist before lowering - * the permissions of this one, to prevent lock-outs. */ - - try - { - User::CreateFromQuery("SELECT * FROM users WHERE `AccessLevel` = 30 AND `Id` != :Id", array(":Id" => $sUser->sId), 0); - } - catch (NotFoundException $e) - { - $sErrors[] = "You can't remove your master administrator permissions if no other master administrators exist!"; - } - } - } - - if(empty($sErrors)) - { - $sUser->uUsername = $_POST['username']; - $sUser->uEmailAddress = $_POST['email']; - $sUser->uAccessLevel = $_POST['access']; - $sUser->InsertIntoDatabase(); - redirect("/admin/user/{$sUser->sId}/"); - } -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/user/edit", $locale->strings, array( - "errors" => $sErrors, - "id" => $router->uParameters[1] -), array( - "username" => $sUser->sUsername, - "email" => $sUser->sEmailAddress, - "access" => $sUser->sAccessLevel -)); diff --git a/frontend/modules/admin/user/list.php b/frontend/modules/admin/user/list.php deleted file mode 100644 index 64cdb0c..0000000 --- a/frontend/modules/admin/user/list.php +++ /dev/null @@ -1,33 +0,0 @@ -CachedQuery("SELECT * FROM users ORDER BY `AccessLevel` DESC"); - -$sUserList = array(); - -foreach($result->data as $row) -{ - $sUserEntry = new User($row); - $sUserList[] = array( - 'id' => $sUserEntry->sId, - 'username' => $sUserEntry->sUsername, - 'email' => $sUserEntry->sEmailAddress, - 'accesslevel' => $sUserEntry->sAccessLevel - ); -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/user/list", $locale->strings, array( - 'users' => $sUserList -)); diff --git a/frontend/modules/admin/user/lookup.php b/frontend/modules/admin/user/lookup.php deleted file mode 100644 index bc93165..0000000 --- a/frontend/modules/admin/user/lookup.php +++ /dev/null @@ -1,71 +0,0 @@ -uParameters[1]); - - $sVpsList = array(); - - if($result = $database->CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $sUserEntry->sId))) - { - foreach($result->data as $row) - { - $sVps = new Vps($row); - - try - { - $sStatus = $sVps->sStatusText; - } - catch (SshException $e) - { - $sStatus = "unknown"; - } - - $sVpsList[] = array( - 'id' => $sVps->sId, - 'hostname' => $sVps->sHostname, - 'node' => $sVps->sNode->sName, - 'node-hostname' => $sVps->sNode->sHostname, - 'template' => $sVps->sTemplate->sName, - 'diskspace' => number_format($sVps->sDiskSpace / 1024), - 'diskspace-unit' => "GB", - 'guaranteed-ram' => $sVps->sGuaranteedRam, - 'guaranteed-ram-unit' => "MB", - 'status' => $sStatus, - 'virtualization-type' => $sVps->sVirtualizationType - ); - } - } - - $sPageContents = NewTemplater::Render("{$sTheme}/admin/user/lookup", $locale->strings, array( - 'id' => $sUserEntry->sId, - 'username' => $sUserEntry->sUsername, - 'email' => $sUserEntry->sEmailAddress, - 'accesslevel' => $sUserEntry->sAccessLevel, - 'vpscount' => $sUserEntry->sVpsCount, - 'vpses' => $sVpsList - )); -} -catch (NotFoundException $e) -{ - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-admin-user-title'], - 'message' => $locale->strings['error-admin-user-text'] - )); -} - diff --git a/frontend/modules/admin/vps/create.php b/frontend/modules/admin/vps/create.php deleted file mode 100644 index 37b1e53..0000000 --- a/frontend/modules/admin/vps/create.php +++ /dev/null @@ -1,213 +0,0 @@ - $locale->strings['error-admin-vpses-add-node'], - 'user' => $locale->strings['error-admin-vpses-add-user'], - 'diskspace' => $locale->strings['error-admin-vpses-add-disk'], - 'guaranteed' => $locale->strings['error-admin-vpses-add-guaranteed'], - 'burstable' => $locale->strings['error-admin-vpses-add-burstable'], - 'cpucount' => $locale->strings['error-admin-vpses-add-cpucount'], - 'traffic' => $locale->strings['error-admin-vpses-add-traffic'], - 'template' => $locale->strings['error-admin-vpses-add-template'] - ), $sErrors); - - try - { - $disk_space = parse_size($_POST['diskspace']); - } - catch(ParsingException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-disk']); - } - - try - { - $guaranteed_ram = parse_size($_POST['guaranteed']); - } - catch(ParsingException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-guaranteed']); - } - - try - { - $burstable_ram = parse_size($_POST['burstable']); - } - catch(ParsingException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-burstable']); - } - - try - { - $traffic = parse_size($_POST['traffic']); - } - catch(ParsingException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-traffic']); - } - - if(is_numeric($_POST['cpucount'])) - { - $cpu_count = (int) $_POST['cpucount']; - } - else - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-cpucount']); - } - - try - { - $node = new Node($_POST['node']); - } - catch(NotFoundException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-node']); - } - - try - { - $user = new User($_POST['user']); - } - catch(NotFoundException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-user']); - } - - try - { - $template = new Template($_POST['template']); - } - catch(NotFoundException $e) - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-template']); - } - - if(!empty($_POST['hostname'])) - { - if(validate_hostname($_POST['hostname'])) - { - $hostname = $_POST['hostname']; - } - else - { - array_add($sErrors, $locale->strings['error-admin-vpses-add-hostname']); - } - } - else - { - $hostname = random_string(12); - } - - if(empty($sErrors)) - { - $sVps = new Vps(0); - $sVps->uHostname = $hostname; - $sVps->uInternalId = first_unused_ctid(); - $sVps->uNodeId = $node->sId; - $sVps->uTemplateId = $template->sId; - $sVps->uUserId = $user->sId; - $sVps->uVirtualizationType = CVM_VIRTUALIZATION_OPENVZ; - $sVps->uGuaranteedRam = ($guaranteed_ram / 1024 / 1024); /* MB */ - $sVps->uBurstableRam = ($burstable_ram / 1024 / 1024); /* MB */ - $sVps->uDiskSpace = ($disk_space / 1024 / 1024); /* MB */ - $sVps->uCpuCount = $cpu_count; - $sVps->uStatus = CVM_STATUS_BLANK; - $sVps->uIncomingTrafficLimit = $traffic; - $sVps->uOutgoingTrafficLimit = $traffic; - $sVps->uTotalTrafficLimit = $traffic; - $sVps->InsertIntoDatabase(); - $sVps->Deploy(); - - /* TODO: Flash message. */ - - redirect("/admin/node/{$node->sId}/"); - } -} - -/* This is a bit hacky - there's no better method for this yet. If the node or user has to be - * pre-determined (according to the requested URL), it is stored in the relevant POST variable - * so that the templater will think it was an already selected option, thereby causing the - * desired behaviour: pre-selecting the particular option. */ - -if(!empty($router->uVariables['prefilled_node'])) -{ - $_POST['node'] = $router->uParameters[1]; -} - -if(!empty($router->uVariables['prefilled_user'])) -{ - $_POST['user'] = $router->uParameters[1]; -} - -$result = $database->CachedQuery("SELECT * FROM nodes"); - -$sNodes = array(); - -foreach($result->data as $row) -{ - $sNode = new Node($row); - - $sNodes[] = array( - 'id' => $sNode->sId, - 'name' => $sNode->sName, - 'location' => $sNode->sPhysicalLocation - ); -} - -$sTemplates = array(); - -if($result = $database->CachedQuery("SELECT * FROM templates WHERE `Available` = 1")) -{ - foreach($result->data as $row) - { - $sTemplate = new Template($row); - - $sTemplates[] = array( - 'id' => $sTemplate->sId, - 'name' => $sTemplate->sName - ); - } -} -else -{ - /* TODO: Show an error when no templates are available. */ -} - -$result = $database->CachedQuery("SELECT * FROM users WHERE `AccessLevel` > 0"); - -$sUsers = array(); - -foreach($result->data as $row) -{ - $sUserOption = new User($row); - - $sUsers[] = array( - 'id' => $sUserOption->sId, - 'username' => $sUserOption->sUsername - ); -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/add", $locale->strings, array( - 'errors' => $sErrors, - 'nodes' => $sNodes, - 'users' => $sUsers, - 'templates' => $sTemplates -)); diff --git a/frontend/modules/admin/vps/list.php b/frontend/modules/admin/vps/list.php deleted file mode 100644 index e2ce9d6..0000000 --- a/frontend/modules/admin/vps/list.php +++ /dev/null @@ -1,51 +0,0 @@ -CachedQuery("SELECT * FROM containers")) -{ - foreach($result->data as $row) - { - $sVps = new Vps($row); - - try - { - $sStatus = $sVps->sStatusText; - } - catch (SshException $e) - { - $sStatus = "unknown"; - } - - $sVpsList[] = array( - 'id' => $sVps->sId, - 'hostname' => $sVps->sHostname, - 'node' => $sVps->sNode->sName, - 'node-hostname' => $sVps->sNode->sHostname, - 'template' => $sVps->sTemplate->sName, - 'diskspace' => number_format($sVps->sDiskSpace / 1024), - 'diskspace-unit' => "GB", - 'guaranteed-ram' => $sVps->sGuaranteedRam, - 'guaranteed-ram-unit' => "MB", - 'status' => $sStatus, - 'virtualization-type' => $sVps->sVirtualizationType - ); - } -} - -$sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/list", $locale->strings, array( - 'vpses' => $sVpsList -)); diff --git a/frontend/modules/admin/vps/suspend.php b/frontend/modules/admin/vps/suspend.php deleted file mode 100644 index 8d8ba5d..0000000 --- a/frontend/modules/admin/vps/suspend.php +++ /dev/null @@ -1,75 +0,0 @@ -RequireAccessLevel(20); - - $sVps = new Vps($router->uParameters[1]); - - if(isset($_POST['submit'])) - { - if($_POST['action'] == "suspend") - { - $sVps->Suspend(); - - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-suspend-success-title'], - 'message' => $locale->strings['error-suspend-success-text'] - )); - } - elseif($_POST['action'] == "unsuspend") - { - $sVps->Unsuspend(); - - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-unsuspend-success-title'], - 'message' => $locale->strings['error-unsuspend-success-text'] - )); - } - - $sVps->RefreshData(); - - /* TODO: Flash message and redirect to VPS lookup page. */ - } - - $sSuspended = ($sVps->sStatus == CVM_STATUS_SUSPENDED) ? true : false; - - $sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/suspend", $locale->strings, array( - 'id' => $sVps->sId, - 'suspended' => $sSuspended - )); -} -catch (NotFoundException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-notfound-title'], - 'message' => $locale->strings['error-notfound-text'] - )); -} -catch (VpsSuspendException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-suspend-error-title'], - 'message' => $locale->strings['error-suspend-error-text'] - )); -} -catch (VpsUnsuspendException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-unsuspend-error-title'], - 'message' => $locale->strings['error-unsuspend-error-text'] - )); -} diff --git a/frontend/modules/admin/vps/terminate.php b/frontend/modules/admin/vps/terminate.php deleted file mode 100644 index 5548850..0000000 --- a/frontend/modules/admin/vps/terminate.php +++ /dev/null @@ -1,77 +0,0 @@ -RequireAccessLevel(30); - - $sVps = new Vps($router->uParameters[1]); - - if(isset($_POST['submit'])) - { - if($_POST['action'] == "terminate") - { - $sVps->Terminate(); - - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-terminate-success-title'], - 'message' => $locale->strings['error-terminate-success-text'] - )); - } - elseif($_POST['action'] == "unterminate") - { - $sVps->Unterminate(); - - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-unterminate-success-title'], - 'message' => $locale->strings['error-unterminate-success-text'] - )); - } - - $sVps->RefreshData(); - - /* TODO: Flash message and redirect to VPS lookup page. */ - } - - $sTerminated = ($sVps->sStatus == CVM_STATUS_TERMINATED) ? true : false; - - $sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/terminate", $locale->strings, array( - 'id' => $sVps->sId, - 'terminated' => $sTerminated, - 'can-unterminate' => !$sVps->IsTerminated - )); -} -catch (NotFoundException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-notfound-title'], - 'message' => $locale->strings['error-notfound-text'] - )); -} -catch (VpsTerminateException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-terminate-error-title'], - 'message' => $locale->strings['error-terminate-error-text'] - )); -} -catch (VpsUnterminateException $e) -{ - $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-unterminate-error-title'], - 'message' => $locale->strings['error-unterminate-error-text'] - )); -} - diff --git a/frontend/modules/api/client/vps/list.php b/frontend/modules/api/client/vps/list.php deleted file mode 100644 index 511feeb..0000000 --- a/frontend/modules/api/client/vps/list.php +++ /dev/null @@ -1,66 +0,0 @@ -CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(':UserId' => $sApiKey->sUser->sId))) -{ - $sVpses = array(); - - foreach($result->data as $row) - { - $sVps = new Vps($row); - - $sVpsData = array( - 'id' => $sVps->sId, - 'virtualization_type' => $sVps->sVirtualizationType, - 'hostname' => $sVps->sHostname, - 'guaranteed_ram' => $sVps->sGuaranteedRam, - 'burstable_ram' => $sVps->sBurstableRam, - 'disk_space' => $sVps->sDiskSpace, - 'cpu_count' => $sVps->sCpuCount, - 'node' => $sVps->sNodeId - ); - - if($sVps->sTotalTrafficLimit == 0) - { - /* Split traffic accounting */ - $sVpsData['traffic_in_limit'] = $sVps->sIncomingTrafficLimit; - $sVpsData['traffic_out_limit'] = $sVps->sOutgoingTrafficLimit; - $sVpsData['traffic_in_used'] = $sVps->sIncomingTrafficUsed; - $sVpsData['traffic_out_used'] = $sVps->sOutgoingTrafficUsed; - } - else - { - /* Combined traffic accounting */ - $sVpsData['traffic_limit'] = $sVps->sTotalTrafficLimit; - $sVpsData['traffic_used'] = $sVps->sIncomingTrafficUsed + $sVps->sOutgoingTrafficUsed; - } - - $sVpses[] = $sVpsData; - } - - $sResponse = array( - 'response' => array( - 'vpses' => $sVpses - ) - ); -} -else -{ - $sResponse = array( - 'response' => array( - 'vpses' => array() - ) - ); -} diff --git a/frontend/modules/client/vps/action/restart.php b/frontend/modules/client/vps/action/restart.php deleted file mode 100644 index dbde64f..0000000 --- a/frontend/modules/client/vps/action/restart.php +++ /dev/null @@ -1,55 +0,0 @@ -Stop(); - } - catch(VpsStopException $e) - { - // we can make this silently fail, as the only important thing is that it starts again - } - - $sVps->Start(); - $sVps->sCurrentStatus = CVM_STATUS_STARTED; - - $sError .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-stop-restart-success'], - 'message' => $locale->strings['error-stop-restart-success'] - )); -} -catch (VpsSuspendedException $e) -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-restart-suspended-title'], - 'message' => $locale->strings['error-restart-suspended-text'] - )); -} -catch (VpsTerminatedException $e) -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-restart-terminated-title'], - 'message' => $locale->strings['error-restart-terminated-text'] - )); -} -catch(VpsStartException $e) -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-restart-start-title'], - 'message' => $locale->strings['error-restart-start-text'] - )); -} diff --git a/frontend/modules/client/vps/action/start.php b/frontend/modules/client/vps/action/start.php deleted file mode 100644 index 732db7e..0000000 --- a/frontend/modules/client/vps/action/start.php +++ /dev/null @@ -1,56 +0,0 @@ -sCurrentStatus != CVM_STATUS_STARTED) -{ - try - { - $sVps->Start(); - $sVps->sCurrentStatus = CVM_STATUS_STARTED; - - $sError .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-start-success-title'], - 'message' => $locale->strings['error-start-success-text'] - )); - } - catch (VpsSuspendedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-start-suspended-title'], - 'message' => $locale->strings['error-start-suspended-text'] - )); - } - catch (VpsTerminatedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-start-terminated-title'], - 'message' => $locale->strings['error-start-terminated-text'] - )); - } - catch (VpsStartException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-start-failed-title'], - 'message' => $locale->strings['error-start-failed-text'] - )); - } -} -else -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-start-running-title'], - 'message' => $locale->strings['error-start-running-text'] - )); -} diff --git a/frontend/modules/client/vps/action/stop.php b/frontend/modules/client/vps/action/stop.php deleted file mode 100644 index bc7907a..0000000 --- a/frontend/modules/client/vps/action/stop.php +++ /dev/null @@ -1,56 +0,0 @@ -sCurrentStatus != CVM_STATUS_STOPPED) -{ - try - { - $sVps->Stop(); - $sVps->sCurrentStatus = CVM_STATUS_STOPPED; - - $sError .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-stop-success-title'], - 'message' => $locale->strings['error-stop-success-text'] - )); - } - catch (VpsSuspendedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-stop-suspended-title'], - 'message' => $locale->strings['error-stop-suspended-text'] - )); - } - catch (VpsTerminatedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-stop-terminated-title'], - 'message' => $locale->strings['error-stop-terminated-text'] - )); - } - catch(VpsStopException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-stop-failed-title'], - 'message' => $locale->strings['error-stop-failed-text'] - )); - } -} -else -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-stop-stopped-title'], - 'message' => $locale->strings['error-stop-stopped-text'] - )); -} diff --git a/frontend/modules/client/vps/console.php b/frontend/modules/client/vps/console.php deleted file mode 100644 index bb10b77..0000000 --- a/frontend/modules/client/vps/console.php +++ /dev/null @@ -1,21 +0,0 @@ -strings, array( - 'host' => htmlspecialchars($_SERVER['SERVER_NAME']), - 'port' => 22, - 'username' => "vzshell", - 'password' => "vzshell" -)); diff --git a/frontend/modules/client/vps/list.php b/frontend/modules/client/vps/list.php deleted file mode 100644 index ae97d75..0000000 --- a/frontend/modules/client/vps/list.php +++ /dev/null @@ -1,58 +0,0 @@ -CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(":UserId" => $sUser->sId))) - { - foreach($result->data as $row) - { - $sVps = new Vps($row); - - try - { - $sStatus = $sVps->sStatusText; - } - catch (SshException $e) - { - $sStatus = "unknown"; - } - - $sVpsList[] = array( - 'id' => $sVps->sId, - 'hostname' => $sVps->sHostname, - 'node' => $sVps->sNode->sName, - 'node-hostname' => $sVps->sNode->sHostname, - 'template' => $sVps->sTemplate->sName, - 'diskspace' => number_format($sVps->sDiskSpace / 1024), - 'diskspace-unit' => "GB", - 'guaranteed-ram' => $sVps->sGuaranteedRam, - 'guaranteed-ram-unit' => "MB", - 'status' => $sStatus, - 'virtualization-type' => $sVps->sVirtualizationType - ); - } - } - - $sMainContents = NewTemplater::Render("{$sTheme}/client/vps/list", $locale->strings, array( - 'vpses' => $sVpsList - )); -} -else -{ - redirect("/login"); -} diff --git a/frontend/modules/client/vps/lookup.php b/frontend/modules/client/vps/lookup.php deleted file mode 100644 index ad7248d..0000000 --- a/frontend/modules/client/vps/lookup.php +++ /dev/null @@ -1,121 +0,0 @@ -uVariables['action'])) -{ - if($router->uVariables['action'] == "start") - { - require("modules/client/vps/action/start.php"); - } - elseif($router->uVariables['action'] == "stop") - { - require("modules/client/vps/action/stop.php"); - } - elseif($router->uVariables['action'] == "restart") - { - require("modules/client/vps/action/restart.php"); - } -} - -if($sVps->sTotalTrafficLimit != 0) -{ - $sTrafficLimit = $sVps->sTotalTrafficLimit; - $sTrafficSplit = false; -} -else -{ - $sTrafficLimit = $sVps->sIncomingTrafficLimit + $sVps->sOutgoingTrafficLimit; - $sTrafficSplit = true; -} - -$sVariables = array( - 'id' => $sVps->sId, - 'server-location' => $sVps->sNode->sPhysicalLocation, - 'operating-system' => $sVps->sTemplate->sName, - 'guaranteed-ram' => "{$sVps->sGuaranteedRam}MB", - 'burstable-ram' => "{$sVps->sBurstableRam}MB", - 'disk-space' => "{$sVps->sDiskSpace}MB", - 'total-traffic-limit' => format_size($sVps->sTotalTrafficLimit, 1024, true, 0) . "B", - 'incoming-traffic-limit'=> format_size($sVps->sIncomingTrafficLimit, 1024, true, 0) . "B", - 'outgoing-traffic-limit'=> format_size($sVps->sOutgoingTrafficLimit, 1024, true, 0) . "B", - 'bandwidth-limit' => "100mbit", - 'status' => $sVps->sStatusText, - 'traffic-split' => $sTrafficSplit -); - -if($sTrafficSplit == true) -{ - $sVariables = array_merge($sVariables, array( - 'inbound-used' => number_format(($sVps->sIncomingTrafficUsed) / 1024 / 1024 / 1024, 2), - 'inbound-total' => number_format($sIncomingTrafficLimit / 1024 / 1024 / 1024, 0), - 'inbound-percentage' => number_format(($sVps->sIncomingTrafficUsed) / $sTrafficLimit, 2), - 'inbound-unit' => "GB", - 'outbound-used' => number_format(($sVps->sOutgoingTrafficUsed) / 1024 / 1024 / 1024, 2), - 'outbound-total' => number_format($sOutgoingTrafficLimit / 1024 / 1024 / 1024, 0), - 'outbound-percentage' => number_format(($sVps->sOutgoingTrafficUsed) / $sTrafficLimit, 2), - 'outbound-unit' => "GB" - )); -} -else -{ - $sVariables = array_merge($sVariables, array( - 'traffic-used' => number_format(($sVps->sIncomingTrafficUsed + $sVps->sOutgoingTrafficUsed) / 1024 / 1024 / 1024, 2), - 'traffic-total' => number_format($sTrafficLimit / 1024 / 1024 / 1024, 0), - 'traffic-percentage' => number_format(($sVps->sIncomingTrafficUsed + $sVps->sOutgoingTrafficUsed) / $sTrafficLimit, 2), - 'traffic-unit' => "GB" - )); -} - -try -{ - $sVariables = array_merge($sVariables, array( - 'disk-used' => number_format($sVps->sDiskUsed / 1024, 2), - 'disk-total' => number_format($sVps->sDiskTotal / 1024, 2), - 'disk-percentage' => ($sVps->sDiskTotal == 0) ? 0 : number_format(($sVps->sDiskUsed / $sVps->sDiskTotal) * 100, 2), - 'disk-unit' => "GB" - )); -} -catch (SshExitException $e) -{ - $sVariables = array_merge($sVariables, array( - 'disk-used' => 0, - 'disk-total' => 0, - 'disk-percentage' => 0, - 'disk-unit' => "GB" - )); -} - -try -{ - $sVariables = array_merge($sVariables, array( - 'ram-used' => $sVps->sRamUsed, - 'ram-total' => $sVps->sRamTotal, - 'ram-percentage' => ($sVps->sRamTotal == 0) ? 0 : number_format(($sVps->sRamUsed / $sVps->sRamTotal) * 100, 2), - 'ram-unit' => "MB" - )); -} -catch (SshExitException $e) -{ - $sVariables = array_merge($sVariables, array( - 'ram-used' => 0, - 'ram-total' => 0, - 'ram-percentage' => 0, - 'ram-unit' => "MB" - )); -} - - -$sPageContents = NewTemplater::Render("{$sTheme}/client/vps/lookup", $locale->strings, $sVariables); - diff --git a/frontend/modules/client/vps/password.php b/frontend/modules/client/vps/password.php deleted file mode 100644 index 6df41b5..0000000 --- a/frontend/modules/client/vps/password.php +++ /dev/null @@ -1,82 +0,0 @@ -SetRootPassword($_POST['password']); - - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-password-success-title'], - 'message' => $locale->strings['error-password-success-text'] - )); - } - else - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-password-nomatch-title'], - 'message' => $locale->strings['error-password-nomatch-text'] - )); - } - } - else - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-password-missing-title'], - 'message' => $locale->strings['error-password-missing-text'] - )); - } - } - catch (VpsSuspendedException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-password-suspended-title'], - 'message' => $locale->strings['error-password-suspended-text'] - )); - } - catch (VpsTerminatedException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-password-terminated-title'], - 'message' => $locale->strings['error-password-terminated-text'] - )); - } - catch (SshExitException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-password-invalid-title'], - 'message' => $locale->strings['error-password-invalid-text'] - )); - } -} - -if($display_form === true) -{ - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/warning", $locale->strings, array( - 'title' => $locale->strings['warning-password-title'], - 'message' => $locale->strings['warning-password-text'] - )); - - $sPageContents .= NewTemplater::Render("{$sTheme}/client/vps/password", $locale->strings, array( - 'id' => $sVps->sId - )); -} diff --git a/frontend/modules/client/vps/reinstall.php b/frontend/modules/client/vps/reinstall.php deleted file mode 100644 index 63fb7c6..0000000 --- a/frontend/modules/client/vps/reinstall.php +++ /dev/null @@ -1,119 +0,0 @@ -CheckAllowed(); - $sTemplate = new Template($_POST['template']); - $sTemplate->CheckAvailable(); - - if(isset($_POST['confirm'])) - { - $sVps->uTemplateId = $sTemplate->sId; - $sVps->InsertIntoDatabase(); - $sVps->Reinstall(); - $sVps->Start(); - - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-success-title'], - 'message' => $locale->strings['error-reinstall-success-text'] - )); - } - else - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-confirm-title'], - 'message' => $locale->strings['error-reinstall-confirm-text'] - )); - } - } - catch (NotFoundException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-notfound-title'], - 'message' => $locale->strings['error-reinstall-notfound-text'] - )); - } - catch (TemplateUnavailableException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-unavailable-title'], - 'message' => $locale->strings['error-reinstall-unavailable-text'] - )); - } - catch (VpsReinstallException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-failed-title'], - 'message' => $locale->strings['error-reinstall-failed-text'] - )); - } - catch (VpsStartException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-start-title'], - 'message' => $locale->strings['error-reinstall-start-text'] - )); - } - catch (VpsSuspendedException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-suspended-title'], - 'message' => $locale->strings['error-reinstall-suspended-text'] - )); - } - catch (VpsTerminatedException $e) - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-terminated-title'], - 'message' => $locale->strings['error-reinstall-terminated-text'] - )); - } - } - else - { - $sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-reinstall-notselected-title'], - 'message' => $locale->strings['error-reinstall-notselected-text'] - )); - } -} - -if($display_form === true) -{ - $result = $database->CachedQuery("SELECT * FROM templates WHERE `Available` = '1'"); - - $sTemplateList = array(); - - foreach($result->data as $row) - { - $sTemplate = new Template($row); - $sTemplateList[] = array( - 'id' => $sTemplate->sId, - 'name' => $sTemplate->sName, - 'description' => $sTemplate->sDescription - ); - } - - $sPageContents .= NewTemplater::Render("{$sTheme}/client/vps/reinstall", $locale->strings, array( - 'templates' => $sTemplateList - )); -} diff --git a/frontend/modules/error/access.php b/frontend/modules/error/access.php deleted file mode 100644 index 020fedf..0000000 --- a/frontend/modules/error/access.php +++ /dev/null @@ -1,16 +0,0 @@ -CachedQuery("SELECT * FROM users WHERE `Username` = :Username", array(":Username" => $_POST['username']))) - { - $sLoginUser = new User($result); - - if($sLoginUser->VerifyPassword($_POST['password'])) - { - $_SESSION['userid'] = $sLoginUser->sId; - header("Location: /"); - die(); - } - else - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-login-invalid-title'], - 'message' => $locale->strings['error-login-invalid-text'] - )); - } - } - else - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-login-invalid-title'], - 'message' => $locale->strings['error-login-invalid-text'] - )); - } -} - -$sMainContents = NewTemplater::Render("{$sTheme}/shared/login", $locale->strings, array( - 'error' => $sError, - 'field-username' => $sFieldUsername -)); diff --git a/frontend/modules/shared/logout.php b/frontend/modules/shared/logout.php deleted file mode 100644 index b5d4e6e..0000000 --- a/frontend/modules/shared/logout.php +++ /dev/null @@ -1,33 +0,0 @@ -strings, array( - 'title' => $locale->strings['error-logout-success-title'], - 'message' => $locale->strings['error-logout-success-text'] - )); -} -else -{ - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-logout-notloggedin-title'], - 'message' => $locale->strings['error-logout-notloggedin-text'] - )); -} diff --git a/frontend/modules/test.php b/frontend/modules/test.php deleted file mode 100644 index 9040635..0000000 --- a/frontend/modules/test.php +++ /dev/null @@ -1,83 +0,0 @@ -sStart != $desired_start) - { - echo("IpRange unit test failed due to sStart mismatch. Expected: {$desired_start}    Actual: {$obj->sStart}
"); - } - - if($obj->sEnd != $desired_end) - { - echo("IpRange unit test failed due to sEnd mismatch. Expected: {$desired_end}    Actual: {$obj->sEnd}
"); - } - - if($obj->sSize != $desired_size) - { - echo("IpRange unit test failed due to sSize mismatch. Expected: {$desired_size}    Actual: {$obj->sSize}
"); - } - - if($obj->sType != $desired_type) - { - echo("IpRange unit test failed due to sType mismatch. Expected: {$desired_type}    Actual: {$obj->sType}
"); - } - - } - catch (Exception $e) - { - echo("IpRange unit test failed due to exception! Input: {$input}    Error message: " . $e->getMessage() . "
"); - } -} - -test_iprange("fe80:0000:0000:0000:e0d3:f0ff:fe28:5f47/64", "fe80:0:0:0:0:0:0:0", "fe80:0:0:0:ffff:ffff:ffff:ffff", 64, 6); -test_iprange("fe80:0000:0000:0000:e0d3:f0ff:fe28:5f47", "fe80:0000:0000:0000:e0d3:f0ff:fe28:5f47", "fe80:0000:0000:0000:e0d3:f0ff:fe28:5f47", 0, 6); -test_iprange("0.0.0.0/1", "0.0.0.0", "127.255.255.255", 1, 4); -test_iprange("162.16.47.0/16", "162.16.0.0", "162.16.255.255", 16, 4); -test_iprange("192.168.1.0/27", "192.168.1.0", "192.168.1.31", 27, 4); -test_iprange("192.168.1.0/32", "192.168.1.0", "192.168.1.0", 32, 4); -test_iprange("192.168.1.0", "192.168.1.0", "192.168.1.0", 0, 4); - -$sVps = new Vps(0); -$sVps->uHostname = "test6.cryto.net"; -$sVps->uInternalId = "110"; -$sVps->uNodeId = 2; -$sVps->uTemplateId = 1; -$sVps->uUserId = 1; -$sVps->uVirtualizationType = CVM_VIRTUALIZATION_OPENVZ; -$sVps->uGuaranteedRam = 256; -$sVps->uBurstableRam = 384; -$sVps->uDiskSpace = 6000; -$sVps->uCpuCount = 1; -$sVps->uStatus = CVM_STATUS_BLANK; -$sVps->uIncomingTrafficLimit = 500000000000; -$sVps->uOutgoingTrafficLimit = 500000000000; -$sVps->uTotalTrafficLimit = 1000000000000; -$sVps->InsertIntoDatabase(); - -$sVps->Deploy(); -*/ -/* -var_dump( - parse_size("15m"), parse_size("24 KB"), parse_size("51"), - parse_size("2 TiB"), parse_size("4.9GiB"), parse_size("0.75GB"), - parse_size("20gb", 1000), parse_size("14.6 TiB", 1000), parse_size("84YB") -); -*/ -/* -var_dump(first_unused_ctid()); -*/ - -//var_dump(format_size(900), format_size(900000), format_size(900000000), format_size(900000000000), format_size(900000000000000), format_size(9000000000000000)); - -$sKey = new ApiKey(0); -$sKey->GenerateSalt(); -$sKey->uPublicToken = random_string(32); -$new_token = random_string(32); -echo($new_token); -$sKey->SetPrivateToken($new_token); -$sKey->uUserId = 1; -$sKey->InsertIntoDatabase(); diff --git a/frontend/rewrite.php b/frontend/rewrite.php deleted file mode 100644 index b0166e4..0000000 --- a/frontend/rewrite.php +++ /dev/null @@ -1,314 +0,0 @@ -theme; - -$sTemplateParameters = array(); - -if(!empty($_SESSION['userid'])) -{ - $sUser = new User($_SESSION['userid']); - $sLoggedIn = true; - $template_global_vars['accesslevel'] = $sUser->sAccessLevel; - $sTemplateParameters = array_merge($sTemplateParameters, array( - 'username' => $sUser->sUsername - )); -} -else -{ - $sUser = new User(0); - $sLoggedIn = false; - $template_global_vars['accesslevel'] = 0; -} - -$sMainContents = ""; -$sMainClass = ""; -$sPageTitle = ""; -$sResponse = array(); -$sResponseCode = 200; - -/* Initialize some variables to ensure that they are available throughout the application. - * Due to the way PHP variable scoping works (and the way CPHP works around this), variables - * are only available at the end of rewrite.php if they were set *before* routing the request. */ -$sVps = null; -$sPageContents = ""; -$router = null; -$sError = null; - -try -{ - $router = new CPHPRouter(); - - $router->ignore_query = true; - - $router->routes = array( - 0 => array( - '^/?$' => "modules/client/vps/list.php", - '^/list/?$' => "modules/client/vps/list.php", - '^/account/?$' => "modules/client/account/index.php", - '^/login/?$' => "modules/shared/login.php", - '^/logout/?$' => "modules/shared/logout.php", - /* Frontpage/overview */ - '^/([0-9]+)/?$' => array( - 'target' => "modules/client/vps/lookup.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps" - ), - /* VPS - Start */ - '^/([0-9]+)/start/?$' => array( - 'target' => "modules/client/vps/lookup.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps", - '_action' => "start" - ), - /* VPS - Stop */ - '^/([0-9]+)/stop/?$' => array( - 'target' => "modules/client/vps/lookup.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps", - '_action' => "stop" - ), - /* VPS - Restart */ - '^/([0-9]+)/restart/?$' => array( - 'target' => "modules/client/vps/lookup.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps", - '_action' => "restart" - ), - /* VPS - Reinstall */ - '^/([0-9]+)/reinstall/?$' => array( - 'target' => "modules/client/vps/reinstall.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps" - ), - /* VPS - Change password */ - '^/([0-9]+)/password/?$' => array( - 'target' => "modules/client/vps/password.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps" - ), - /* VPS - Console */ - '^/([0-9]+)/console/?$' => array( - 'target' => "modules/client/vps/console.php", - 'authenticator' => "authenticators/vps.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "vps" - ), - /* Admin - Overview */ - '^/admin/?$' => array( - 'target' => "modules/admin/overview/index.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Users - Overview */ - '^/admin/users/?$' => array( - 'target' => "modules/admin/user/list.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Users - Lookup */ - '^/admin/user/([0-9]+)/?$' => array( - 'target' => "modules/admin/user/lookup.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Users - Edit */ - '^/admin/user/([0-9]+)/edit/?$' => array( - 'target' => "modules/admin/user/edit.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Users - Create VPS */ - '^/admin/user/([0-9]+)/add/?$' => array( - 'target' => "modules/admin/vps/create.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin", - '_prefilled_user' => true - ), - /* Admin - VPSes - Overview */ - '^/admin/vpses/?$' => array( - 'target' => "modules/admin/vps/list.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - VPSes - Create VPS */ - '^/admin/vpses/add/?$' => array( - 'target' => "modules/admin/vps/create.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - VPSes - Suspend */ - '^/admin/vps/([0-9]+)/suspend/?$' => array( - 'target' => "modules/admin/vps/suspend.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - VPSes - Transfer */ - '^/admin/vps/([0-9]+)/transfer/?$' => array( - 'target' => "modules/admin/vps/transfer.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - VPSes - Terminate */ - '^/admin/vps/([0-9]+)/terminate/?$' => array( - 'target' => "modules/admin/vps/terminate.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Templates - Overview */ - '^/admin/templates/?$' => array( - 'target' => "modules/admin/template/list.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Templates - Lookup */ - '^/admin/templates/([0-9]+)/?$' => array( - 'target' => "modules/admin/template/lookup.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Templates - Add */ - '^/admin/templates/add/?$' => array( - 'target' => "modules/admin/template/add.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Nodes - Overview */ - '^/admin/nodes/?$' => array( - 'target' => "modules/admin/node/list.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Nodes - Lookup */ - '^/admin/node/([0-9]+)/?$' => array( - 'target' => "modules/admin/node/lookup.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Nodes - Add */ - '^/admin/nodes/add/?$' => array( - 'target' => "modules/admin/node/add.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin" - ), - /* Admin - Nodes - Create VPS */ - '^/admin/node/([0-9]+)/add/?$' => array( - 'target' => "modules/admin/vps/create.php", - 'authenticator' => "authenticators/admin.php", - 'auth_error' => "modules/error/access.php", - '_menu' => "admin", - '_prefilled_node' => true - ), - /* API - Client - List VPSes */ - '^/api/client/list' => array( - 'target' => "modules/api/client/vps/list.php", - 'authenticator' => "authenticators/api/client.php", - 'auth_error' => "modules/error/api/access.php", - '_raw' => true - ), - '^/test/?$' => "modules/test.php" - ) - ); - - try - { - $router->RouteRequest(); - } - catch (VpsSuspendedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-suspended-title'], - 'message' => $e->getMessage() - )); - } - catch (VpsTerminatedException $e) - { - $sError .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-terminated-title'], - 'message' => $e->getMessage() - )); - } - - if(empty($router->uVariables['raw'])) - { - if(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "vps" && $router->uVariables['display_menu'] === true) - { - $sMainContents .= NewTemplater::Render("{$sTheme}/client/vps/main", $locale->strings, array( - 'error' => $sError, - 'contents' => $sPageContents, - 'id' => $sVps->sId - )); - } - elseif(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "admin" && $router->uVariables['display_menu'] === true) - { - $sMainContents .= NewTemplater::Render("{$sTheme}/admin/main", $locale->strings, array( - 'error' => $sError, - 'contents' => $sPageContents - )); - } - } -} -catch (UnauthorizedException $e) -{ - $sPageTitle = $locale->strings['title-unauthorized']; - - $sMainContents = NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( - 'title' => $locale->strings['error-unauthorized-title'], - 'message' => $locale->strings['error-unauthorized-text'] - )); -} - -if(empty($router->uVariables['raw'])) -{ - $sTemplateParameters = array_merge($sTemplateParameters, array( - 'logged-in' => $sLoggedIn, - 'title' => $sPageTitle, - 'main' => $sMainContents, - 'menu-visible' => (isset($router->uVariables['menu']) && $router->sAuthenticated === true), - 'generation' => round(microtime(true) - $timing_start, 6) - )); - - echo(NewTemplater::Render("{$sTheme}/shared/main", $locale->strings, $sTemplateParameters)); -} -else -{ - status_code($sResponseCode); - echo(json_encode($sResponse)); -} diff --git a/frontend/templates/default/admin/main.tpl b/frontend/templates/default/admin/main.tpl deleted file mode 100644 index efcf68d..0000000 --- a/frontend/templates/default/admin/main.tpl +++ /dev/null @@ -1,11 +0,0 @@ - - -{%?contents} - -
diff --git a/frontend/templates/default/admin/node/add.tpl b/frontend/templates/default/admin/node/add.tpl deleted file mode 100644 index 6dd92c5..0000000 --- a/frontend/templates/default/admin/node/add.tpl +++ /dev/null @@ -1,58 +0,0 @@ -

{%!title-admin-addnode}

- -{%if isempty|errors == false} -
-
{%!error-form}
-
-
    - {%foreach error in errors} -
  • {%?error}
  • - {%/foreach} -
-
-
-{%/if} - -
-
- - {%input type="text" group="addnode" name="name"} -
-
- -
- - {%input type="text" group="addnode" name="hostname"} -
-
- -
- - {%input type="text" group="addnode" name="location"} -
-
- -
- - {%input type="checkbox" group="addnode" name="customkey" data-enable-group="customkey" class="enabler"} -
-
- -
- - {%input type="file" group="addnode" name="publickey" disabled="disabled"} -
-
- -
- - {%input type="file" group="addnode" name="privatekey" disabled="disabled"} -
-
- -
-
- -
-
-
diff --git a/frontend/templates/default/admin/node/list.tpl b/frontend/templates/default/admin/node/list.tpl deleted file mode 100644 index 10d56b2..0000000 --- a/frontend/templates/default/admin/node/list.tpl +++ /dev/null @@ -1,25 +0,0 @@ -
- {%!toolbar-addnode} -
-
- -

{%!title-admin-nodelist}

- - - - - - - {%foreach node in nodes} - - - - - {%/foreach} -
{%!list-column-hostname}{%!list-column-location}
- - {%?node[hostname]} - - - {%?node[location]} -
diff --git a/frontend/templates/default/admin/node/lookup.tpl b/frontend/templates/default/admin/node/lookup.tpl deleted file mode 100644 index fb7e811..0000000 --- a/frontend/templates/default/admin/node/lookup.tpl +++ /dev/null @@ -1,78 +0,0 @@ -
- {%!toolbar-createvps} - {%!toolbar-editnode} -
-
- -

{%!title-admin-nodeinfo}

- - - - - - - - - - - - - - -
{%!list-column-nodeid}{%?id}
{%!list-column-hostname}{%?hostname}
{%!list-column-location}{%?location}
- -

{%!header-admin-node-vpses}

- - - - - - - - - - {%if isset|vpses == true} - {%foreach vps in vpses} - - - - - - - - - {%/foreach} - {%/if} -
{%!list-column-hostname}{%!list-column-platform}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
- {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
diff --git a/frontend/templates/default/admin/overview/index.tpl b/frontend/templates/default/admin/overview/index.tpl deleted file mode 100644 index f83d783..0000000 --- a/frontend/templates/default/admin/overview/index.tpl +++ /dev/null @@ -1,3 +0,0 @@ -

{%!title-admin-overview}

- -

{%!admin-overview-message}

diff --git a/frontend/templates/default/admin/template/add.tpl b/frontend/templates/default/admin/template/add.tpl deleted file mode 100644 index e3e353b..0000000 --- a/frontend/templates/default/admin/template/add.tpl +++ /dev/null @@ -1,26 +0,0 @@ -

Add templates

- -{%if isempty|templates == true} -

- To add new templates, add the corresponding tar.gz files to /etc/cvm/templates on the master node, and reload this page. - New files will be automatically detected, and you will be able to add them as templates from this page. -

- -

- All templates will be automatically synchronized to slave nodes. -

-{%else} -
- {%foreach template in templates} -
-

{%?template}

- -
- - {%input type="text" group="addtemplate" name="name[]"} -
-
-
- {%/foreach} -
-{%/if} diff --git a/frontend/templates/default/admin/user/edit.tpl b/frontend/templates/default/admin/user/edit.tpl deleted file mode 100644 index 6ada2b7..0000000 --- a/frontend/templates/default/admin/user/edit.tpl +++ /dev/null @@ -1,45 +0,0 @@ -

{%!title-admin-edituser}

- -{%if isempty|errors == false} -
-
{%!error-form}
-
-
    - {%foreach error in errors} -
  • {%?error}
  • - {%/foreach} -
-
-
-{%/if} - -
-
- - {%input type="text" group="edituser" name="username"} -
-
- -
- - {%input type="text" group="edituser" name="email"} -
-
- -
- - {%select type="text" group="edituser" name="access"} - {%option value="1" text="{%!admin-level-enduser}"} - - {%option value="20" text="{%!admin-level-nodeadmin}"} - {%option value="30" text="{%!admin-level-masteradmin}"} - {%/select} -
-
- -
-
- -
-
-
diff --git a/frontend/templates/default/admin/user/list.tpl b/frontend/templates/default/admin/user/list.tpl deleted file mode 100644 index 21f9c6f..0000000 --- a/frontend/templates/default/admin/user/list.tpl +++ /dev/null @@ -1,31 +0,0 @@ -
- {%!toolbar-createuser} -
-
- -

{%!title-admin-userlist}

- - - - - - - - {%foreach user in users} - - - - - - {%/foreach} -
{%!admin-title-username}{%!admin-title-email}{%!admin-title-accesslevel}
{%?user[username]}{%?user[email]} - {%if user[accesslevel] == 1} - {%!admin-level-enduser} - {%/if}{%if user[accesslevel] == 10} - {%!admin-level-reseller} - {%/if}{%if user[accesslevel] == 20} - {%!admin-level-nodeadmin} - {%/if}{%if user[accesslevel] == 30} - {%!admin-level-masteradmin} - {%/if} -
diff --git a/frontend/templates/default/admin/user/lookup.tpl b/frontend/templates/default/admin/user/lookup.tpl deleted file mode 100644 index 0a4d217..0000000 --- a/frontend/templates/default/admin/user/lookup.tpl +++ /dev/null @@ -1,93 +0,0 @@ -
- {%!toolbar-createvps} - {%!toolbar-edituser} -
-
- -

{%!title-admin-userinfo}

- - - - - - - - - - - - - - - - - - - - - - -
{%!admin-title-id}{%?id}
{%!admin-title-username}{%?username}
{%!admin-title-email}{%?email}
{%!admin-title-accesslevel} - {%if accesslevel == 1} - {%!admin-level-enduser} - {%/if}{%if accesslevel == 10} - {%!admin-level-reseller} - {%/if}{%if accesslevel == 20} - {%!admin-level-nodeadmin} - {%/if}{%if accesslevel == 30} - {%!admin-level-masteradmin} - {%/if} -
{%!admin-title-vpses}{%?vpscount}
- -

{%!header-admin-user-vpses}

- - - - - - - - - - {%foreach vps in vpses} - - - - - - - - {%/foreach} -
{%!list-column-hostname}{%!list-column-platform}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
- {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
diff --git a/frontend/templates/default/admin/vps/add.tpl b/frontend/templates/default/admin/vps/add.tpl deleted file mode 100644 index fc0db22..0000000 --- a/frontend/templates/default/admin/vps/add.tpl +++ /dev/null @@ -1,88 +0,0 @@ -

{%!title-admin-addvps}

- -{%if isempty|errors == false} -
-
{%!error-form}
-
-
    - {%foreach error in errors} -
  • {%?error}
  • - {%/foreach} -
-
-
-{%/if} - -
-
- - {%select group="addvps" name="node"} - {%foreach node in nodes} - {%option value="(?node[id])" text="(?node[name]) ((?node[location]))"} - {%/foreach} - {%/select} -
-
- -
- - {%select group="addvps" name="template"} - {%foreach template in templates} - {%option value="(?template[id])" text="(?template[name])"} - {%/foreach} - {%/select} -
-
- -
- - {%select group="addvps" name="user"} - {%foreach user in users} - {%option value="(?user[id])" text="(?user[username]) (#(?user[id]))"} - {%/foreach} - {%/select} -
-
- -
- - {%input type="text" group="addvps" name="diskspace"} -
-
- -
- - {%input type="text" group="addvps" name="guaranteed"} -
-
- -
- - {%input type="text" group="addvps" name="burstable"} -
-
- -
- - {%input type="text" group="addvps" name="cpucount"} -
-
- -
- - {%input type="text" group="addvps" name="traffic"} -
-
- -
- - {%input type="text" group="addvps" name="hostname"} -
-
- -
-
- -
-
-
diff --git a/frontend/templates/default/admin/vps/list.tpl b/frontend/templates/default/admin/vps/list.tpl deleted file mode 100644 index 031ff96..0000000 --- a/frontend/templates/default/admin/vps/list.tpl +++ /dev/null @@ -1,54 +0,0 @@ -

{%!title-admin-vpslist}

- - - - - - - - - - - {%foreach vps in vpses} - - - - - - - - - {%/foreach} -
{%!list-column-hostname}{%!list-column-platform}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
- {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
diff --git a/frontend/templates/default/admin/vps/suspend.tpl b/frontend/templates/default/admin/vps/suspend.tpl deleted file mode 100644 index 974d940..0000000 --- a/frontend/templates/default/admin/vps/suspend.tpl +++ /dev/null @@ -1,14 +0,0 @@ -
- {%if suspended == false} -

{%!title-admin-vps-suspend}

-

{%!vps-admin-suspend-text}

- - - {%/if}{%if suspended == true} -

{%!title-admin-vps-unsuspend}

-

{%!vps-admin-unsuspend-text}

- - - {%/if} -
- diff --git a/frontend/templates/default/admin/vps/terminate.tpl b/frontend/templates/default/admin/vps/terminate.tpl deleted file mode 100644 index f38842d..0000000 --- a/frontend/templates/default/admin/vps/terminate.tpl +++ /dev/null @@ -1,18 +0,0 @@ -
- {%if terminated == false} -

{%!title-admin-vps-terminate}

-

{%!vps-admin-terminate-text}

- - - {%else} - {%if can-unterminate == true} -

{%!title-admin-vps-unterminate}

-

{%!vps-admin-unterminate-text}

- - - {%else} - Cannot unterminate - {%/if} - {%/if} -
- diff --git a/frontend/templates/default/client/vps/console.tpl b/frontend/templates/default/client/vps/console.tpl deleted file mode 100644 index 6f6fd35..0000000 --- a/frontend/templates/default/client/vps/console.tpl +++ /dev/null @@ -1,26 +0,0 @@ -

{%!title-console}

- -

{%!console-introduction}

- -

{%!console-step1}

- - - - - - - - - - - - - - - - - - -
{%!console-title-hostname}{%?host}
{%!console-title-port}{%?port}
{%!console-title-username}{%?username}
{%!console-title-password}{%?password}
- -

{%!console-step2}

diff --git a/frontend/templates/default/client/vps/error/notfound.tpl b/frontend/templates/default/client/vps/error/notfound.tpl deleted file mode 100644 index 979773e..0000000 --- a/frontend/templates/default/client/vps/error/notfound.tpl +++ /dev/null @@ -1 +0,0 @@ -{%!notfound} diff --git a/frontend/templates/default/client/vps/list.tpl b/frontend/templates/default/client/vps/list.tpl deleted file mode 100644 index c9a465e..0000000 --- a/frontend/templates/default/client/vps/list.tpl +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - {%foreach vps in vpses} - - - - - - - - - - {%/foreach} -
{%!list-column-hostname}{%!list-column-platform}{%!list-column-node}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
- {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - - {%?vps[node]} - ({%?vps[node-hostname]}) - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
diff --git a/frontend/templates/default/client/vps/lookup.tpl b/frontend/templates/default/client/vps/lookup.tpl deleted file mode 100644 index 57d501d..0000000 --- a/frontend/templates/default/client/vps/lookup.tpl +++ /dev/null @@ -1,138 +0,0 @@ -

{%!title-overview}

- -
- {%if traffic-split == false} -
-

{%!overview-quota-title-disk}

-
-
-
{%?disk-used}/{%?disk-total}{%?disk-unit}
-
-
-
-

{%!overview-quota-title-ram}

-
-
-
{%?ram-used}/{%?ram-total}{%?ram-unit}
-
-
-
-

{%!overview-quota-title-traffic}

-
-
-
{%?traffic-used}/{%?traffic-total}{%?traffic-unit}
-
-
- {%else} -
-

{%!overview-quota-title-disk}

-
-
-
{%?disk-used}/{%?disk-total}{%?disk-unit}
-
-
-
-

{%!overview-quota-title-ram}

-
-
-
{%?ram-used}/{%?ram-total}{%?ram-unit}
-
-
-
-

{%!overview-quota-title-traffic-incoming}

-
-
-
{%?inbound-used}/{%?inbound-total}{%?inbound-unit}
-
-
-
-

{%!overview-quota-title-traffic-outgoing}

-
-
-
{%?outbound-used}/{%?outbound-total}{%?outbound-unit}
-
-
- {%/if} -
-
- -
- - - {%!overview-button-start} - - - - {%!overview-button-restart} - - - - {%!overview-button-stop} - -
-
- -

{%!overview-title-configuration}

- - - - - - - - - - - - - - - - - - - - - {%if total-traffic-limit == "0B"} - - - - - {%else} - - - {%/if} - - - - - - - - - - - - - -
{%!overview-title-status} - {%if status == running} - {%!overview-status-running} - {%/if}{%if status == stopped} - {%!overview-status-stopped} - {%/if}{%if status == suspended} - {%!overview-status-suspended} - {%/if}{%if status == unknown} - {%!overview-status-unknown} - {%/if} - {%!overview-title-os}{%?operating-system}
{%!overview-title-guaranteed}{%?guaranteed-ram}{%!overview-title-burstable}{%?burstable-ram}
{%!overview-title-disk}{%?disk-space}{%!overview-title-bandwidth}{%?bandwidth-limit}
{%!overview-title-traffic-incoming}{%?incoming-traffic-limit}{%!overview-title-traffic-outgoing}{%?outgoing-traffic-limit}{%!overview-title-traffic}{%?total-traffic-limit}
{%!overview-title-location}{%?server-location}
{%!overview-title-ipv4}
{%!overview-title-ipv6}
- -{%if accesslevel >= 20} -

{%!header-vps-admin}

-
- {%!vps-admin-suspend} - {%!vps-admin-transfer} - {%!vps-admin-terminate} -
-
-{%/if} diff --git a/frontend/templates/default/client/vps/main.tpl b/frontend/templates/default/client/vps/main.tpl deleted file mode 100644 index 396a8e5..0000000 --- a/frontend/templates/default/client/vps/main.tpl +++ /dev/null @@ -1,19 +0,0 @@ - - -{%if isset|error == true} - {%?error} -{%/if} - -{%?contents} - -
diff --git a/frontend/templates/default/client/vps/password.tpl b/frontend/templates/default/client/vps/password.tpl deleted file mode 100644 index 85fa7d8..0000000 --- a/frontend/templates/default/client/vps/password.tpl +++ /dev/null @@ -1,22 +0,0 @@ -

{%!title-password}

- - -
-
- - {%input type="text" group="password" name="password"} -
-
- -
- - {%input type="text" group="password" name="confirm"} -
-
- -
-
- -
-
-
diff --git a/frontend/templates/default/client/vps/reinstall.tpl b/frontend/templates/default/client/vps/reinstall.tpl deleted file mode 100644 index b05188d..0000000 --- a/frontend/templates/default/client/vps/reinstall.tpl +++ /dev/null @@ -1,23 +0,0 @@ -

{%!title-reinstall}

- -
- {%foreach template in templates} -
-
- - -
-
{%?template[description]}
-
- {%/foreach} - -
- - -
- -
- -  {%!reinstall-patience} -
-
diff --git a/frontend/templates/default/shared/error/error.tpl b/frontend/templates/default/shared/error/error.tpl deleted file mode 100644 index d3bf12f..0000000 --- a/frontend/templates/default/shared/error/error.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
-
{%?title}
-
{%?message}
-
diff --git a/frontend/templates/default/shared/error/info.tpl b/frontend/templates/default/shared/error/info.tpl deleted file mode 100644 index 99851b7..0000000 --- a/frontend/templates/default/shared/error/info.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
-
{%?title}
-
{%?message}
-
diff --git a/frontend/templates/default/shared/error/success.tpl b/frontend/templates/default/shared/error/success.tpl deleted file mode 100644 index 35a0279..0000000 --- a/frontend/templates/default/shared/error/success.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
-
{%?title}
-
{%?message}
-
diff --git a/frontend/templates/default/shared/error/warning.tpl b/frontend/templates/default/shared/error/warning.tpl deleted file mode 100644 index fcc3721..0000000 --- a/frontend/templates/default/shared/error/warning.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
-
{%?title}
-
{%?message}
-
diff --git a/frontend/templates/default/shared/login.tpl b/frontend/templates/default/shared/login.tpl deleted file mode 100644 index d33c961..0000000 --- a/frontend/templates/default/shared/login.tpl +++ /dev/null @@ -1,25 +0,0 @@ -

{%!title-login}

- -{%?error} - -
-
- - {%input type="text" group="login" name="username"} -
-
- -
- - {%input type="password" group="login" name="password"} -
-
- -
-
- Forgot? -
- -
-
-
diff --git a/frontend/templates/default/shared/main.tpl b/frontend/templates/default/shared/main.tpl deleted file mode 100644 index 20cada4..0000000 --- a/frontend/templates/default/shared/main.tpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - CVM - - - - - - - - - -
-
- - {%if logged-in == true} -
-
{%!userbox-loggedin}
- {%if accesslevel >= 20} - {%!userbox-admin} - {%/if} - {%!userbox-account} - {%!userbox-list} - {%!userbox-logout} -
- {%/if} -
- - -
- - - - diff --git a/frontend/templates/default/static/css/chosen.css b/frontend/templates/default/static/css/chosen.css deleted file mode 100644 index 737f3d8..0000000 --- a/frontend/templates/default/static/css/chosen.css +++ /dev/null @@ -1,397 +0,0 @@ -/* @group Base */ -.chzn-container { - font-size: 13px; - position: relative; - display: inline-block; - zoom: 1; - *display: inline; - vertical-align: middle; -} -.chzn-container .chzn-drop { - background: #fff; - border: 1px solid #aaa; - border-top: 0; - position: absolute; - top: 29px; - left: 0; - -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15); - -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15); - -o-box-shadow : 0 4px 5px rgba(0,0,0,.15); - box-shadow : 0 4px 5px rgba(0,0,0,.15); - z-index: 999; -} -/* @end */ - -/* @group Single Chosen */ -.chzn-container-single .chzn-single { - background-color: #ffffff; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 ); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); - background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: -ms-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-image: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - -webkit-border-radius: 5px; - -moz-border-radius : 5px; - border-radius : 5px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; - border: 1px solid #aaaaaa; - -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1); - display: block; - overflow: hidden; - white-space: nowrap; - position: relative; - height: 23px; - line-height: 24px; - padding: 0 0 0 8px; - color: #444444; - text-decoration: none; -} -.chzn-container-single .chzn-single span { - margin-right: 26px; - display: block; - overflow: hidden; - white-space: nowrap; - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; - text-overflow: ellipsis; -} -.chzn-container-single .chzn-single abbr { - display: block; - position: absolute; - right: 26px; - top: 6px; - width: 12px; - height: 13px; - font-size: 1px; - background: url(img/chosen-sprite.png) right top no-repeat; -} -.chzn-container-single .chzn-single abbr:hover { - background-position: right -11px; -} -.chzn-container-single .chzn-single div { - position: absolute; - right: 0; - top: 0; - display: block; - height: 100%; - width: 18px; -} -.chzn-container-single .chzn-single div b { - background: url('img/chosen-sprite.png') no-repeat 0 0; - display: block; - width: 100%; - height: 100%; -} -.chzn-container-single .chzn-search { - padding: 3px 4px; - position: relative; - margin: 0; - white-space: nowrap; - z-index: 1010; -} -.chzn-container-single .chzn-search input { - background: #fff url('img/chosen-sprite.png') no-repeat 100% -22px; - background: url('img/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('img/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%); - margin: 1px 0; - padding: 4px 20px 4px 5px; - outline: 0; - border: 1px solid #aaa; - font-family: sans-serif; - font-size: 1em; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -ms-box-sizing: content-box; - box-sizing:content-box; -} -.chzn-container-single .chzn-drop { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius : 0 0 4px 4px; - border-radius : 0 0 4px 4px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; -} -/* @end */ - -.chzn-container-single-nosearch .chzn-search input { - position: absolute; - left: -9000px; -} - -/* @group Multi Chosen */ -.chzn-container-multi .chzn-choices { - background-color: #fff; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%); - border: 1px solid #aaa; - margin: 0; - padding: 0; - cursor: text; - overflow: hidden; - height: auto !important; - height: 1%; - position: relative; - display:inline-block; - *display:inline; -} -.chzn-container-multi .chzn-choices li { - display:inline-block; - *display:inline; - list-style: none; -} -.chzn-container-multi .chzn-choices .search-field { - white-space: nowrap; - margin: 0; - padding: 0; -} -.chzn-container-multi .chzn-choices .search-field input { - color: #666; - background: transparent !important; - border: 0 !important; - font-family: sans-serif; - font-size: 100%; - height: 15px; - padding: 5px; - margin: 1px 0; - outline: 0; - -webkit-box-shadow: none; - -moz-box-shadow : none; - -o-box-shadow : none; - box-shadow : none; -} -.chzn-container-multi .chzn-choices .search-field .default { - color: #999; -} -.chzn-container-multi .chzn-choices .search-choice { - -webkit-border-radius: 3px; - -moz-border-radius : 3px; - border-radius : 3px; - -moz-background-clip : padding; - -webkit-background-clip: padding-box; - background-clip : padding-box; - background-color: #e4e4e4; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 ); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05); - color: #333; - border: 1px solid #aaaaaa; - line-height: 13px; - padding: 3px 20px 3px 5px; - margin: 3px 0 3px 5px; - position: relative; - cursor: default; -} -.chzn-container-multi .chzn-choices .search-choice-focus { - background: #d4d4d4; -} -.chzn-container-multi .chzn-choices .search-choice .search-choice-close { - display: block; - position: absolute; - right: 3px; - top: 4px; - width: 12px; - height: 13px; - font-size: 1px; - background: url(img/chosen-sprite.png) right top no-repeat; -} -.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover { - background-position: right -11px; -} -.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { - background-position: right -11px; -} -/* @end */ - -/* @group Results */ -.chzn-container .chzn-results { - margin: 0 4px 4px 0; - max-height: 240px; - padding: 0 0 0 4px; - position: relative; - overflow-x: hidden; - overflow-y: auto; -} -.chzn-container-multi .chzn-results { - margin: -1px 0 0; - padding: 0; -} -.chzn-container .chzn-results li { - display: none; - line-height: 15px; - padding: 5px 6px; - margin: 0; - list-style: none; -} -.chzn-container .chzn-results .active-result { - cursor: pointer; - display: list-item; -} -.chzn-container .chzn-results .highlighted { - background-color: #3875d7; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 ); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); - background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: -ms-linear-gradient(top, #3875d7 20%, #2a62bc 90%); - background-image: linear-gradient(top, #3875d7 20%, #2a62bc 90%); - color: #fff; -} -.chzn-container .chzn-results li em { - background: #feffde; - font-style: normal; -} -.chzn-container .chzn-results .highlighted em { - background: transparent; -} -.chzn-container .chzn-results .no-results { - background: #f4f4f4; - display: list-item; -} -.chzn-container .chzn-results .group-result { - cursor: default; - color: #999; - font-weight: bold; -} -.chzn-container .chzn-results .group-option { - padding-left: 15px; -} -.chzn-container-multi .chzn-drop .result-selected { - display: none; -} -.chzn-container .chzn-results-scroll { - background: white; - margin: 0 4px; - position: absolute; - text-align: center; - width: 321px; /* This should by dynamic with js */ - z-index: 1; -} -.chzn-container .chzn-results-scroll span { - display: inline-block; - height: 17px; - text-indent: -5000px; - width: 9px; -} -.chzn-container .chzn-results-scroll-down { - bottom: 0; -} -.chzn-container .chzn-results-scroll-down span { - background: url('img/chosen-sprite.png') no-repeat -4px -3px; -} -.chzn-container .chzn-results-scroll-up span { - background: url('img/chosen-sprite.png') no-repeat -22px -3px; -} -/* @end */ - -/* @group Active */ -.chzn-container-active .chzn-single { - -webkit-box-shadow: 0 0 5px #6DB9FF; - -moz-box-shadow : 0 0 5px #6DB9FF; - -o-box-shadow : 0 0 5px #6DB9FF; - box-shadow : 0 0 5px #6DB9FF; - border: 1px solid #50B1FE; -} -.chzn-container-active .chzn-single-with-drop { - border: 1px solid #aaa; - -webkit-box-shadow: 0 1px 0 #fff inset; - -moz-box-shadow : 0 1px 0 #fff inset; - -o-box-shadow : 0 1px 0 #fff inset; - box-shadow : 0 1px 0 #fff inset; - background-color: #eee; - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 ); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); - background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: -ms-linear-gradient(top, #eeeeee 20%, #ffffff 80%); - background-image: linear-gradient(top, #eeeeee 20%, #ffffff 80%); - -webkit-border-bottom-left-radius : 0; - -webkit-border-bottom-right-radius: 0; - -moz-border-radius-bottomleft : 0; - -moz-border-radius-bottomright: 0; - border-bottom-left-radius : 0; - border-bottom-right-radius: 0; -} -.chzn-container-active .chzn-single-with-drop div { - background: transparent; - border-left: none; -} -.chzn-container-active .chzn-single-with-drop div b { - background-position: -18px 1px; -} -.chzn-container-active .chzn-choices { - -webkit-box-shadow: 0 0 5px #6DB9FF; - -moz-box-shadow : 0 0 5px #6DB9FF; - -o-box-shadow : 0 0 5px #6DB9FF; - box-shadow : 0 0 5px #6DB9FF; - border: 1px solid #50B1FE; -} -.chzn-container-active .chzn-choices .search-field input { - color: #111 !important; -} -/* @end */ - -/* @group Disabled Support */ -.chzn-disabled { - cursor: default; - opacity:0.5 !important; -} -.chzn-disabled .chzn-single { - cursor: default; -} -.chzn-disabled .chzn-choices .search-choice .search-choice-close { - cursor: default; -} - -/* @group Right to Left */ -.chzn-rtl { text-align: right; } -.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; } -.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; } - -.chzn-rtl .chzn-single div { left: 3px; right: auto; } -.chzn-rtl .chzn-single abbr { - left: 26px; - right: auto; -} -.chzn-rtl .chzn-choices .search-field input { direction: rtl; } -.chzn-rtl .chzn-choices li { float: right; } -.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; } -.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;} -.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; } -.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; } -.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; } -.chzn-rtl .chzn-search input { - background: #fff url('img/chosen-sprite.png') no-repeat -38px -22px; - background: url('img/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('img/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%); - background: url('img/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%); - padding: 4px 5px 4px 20px; - direction: rtl; -} -/* @end */ diff --git a/frontend/templates/default/static/css/cvm.css b/frontend/templates/default/static/css/cvm.css deleted file mode 100644 index cfdea1a..0000000 --- a/frontend/templates/default/static/css/cvm.css +++ /dev/null @@ -1,662 +0,0 @@ -html, body -{ - font-family: 'Open Sans', sans-serif; - background-color: #E4EAEA; -} - -h1, h2, h3, h4, h5 -{ - margin: 0px; - color: #343352; -} - -h1 -{ - margin-bottom: 7px; -} - -h2 -{ - margin-bottom: 9px; -} - -h3 -{ - font-size: 20px; - margin-top: 8px; - margin-bottom: 3px; -} - -p -{ - margin: 5px 0px; -} - -table -{ - font-size: 15px; - border-spacing: 0px; - width: 100%; -} - -th -{ - text-align: left; - background-color: #31305E; - color: white; - padding: 3px 4px; -} - -td -{ - vertical-align: top; - padding: 4px 4px 0px 4px; -} - -table.vertical th -{ - padding: 3px 7px; -} - -td.vps-status img -{ - margin-top: 3px; -} - -table.vpsinfo, table.console -{ - border: 2px solid #31305E; -} - -table.vertical td -{ - padding: 2px 13px; -} - -table.console -{ - margin: 12px 0px; -} - -table.vpsinfo th -{ - width: 150px; - text-align: right; -} - -table.console th -{ - width: 120px; -} - -table.userinfo th -{ - width: 180px; -} - -table.nodeinfo th -{ - width: 180px; -} - -table.userlist td -{ - padding-bottom: 4px; -} - -.clickable a -{ - color: black; - text-decoration: none; -} - -tr.clickable:hover -{ - background-color: #BABAD0; -} - -.clear -{ - clear: both; -} - -.clickable -{ - cursor: pointer; -} - -.centered -{ - text-align: center; -} - -.padded -{ - padding: 10px 25px; -} - -.spaced -{ - margin-top: 15px; - margin-bottom: 10px; -} - -.preload -{ - width: 1px; - height: 1px; -} - -.wrapper -{ - width: 900px; - margin: 0px auto; -} - -.header -{ - font-size: 40px; - font-weight: bold; -} - -.userbox -{ - font-size: 16px; - font-weight: normal; - float: right; - margin-top: 28px; - text-align: right; -} - -.userbox a, .userbox a:active, .vps-admin a, .vps-admin a:active -{ - display: block; - float: left; - padding: 5px 8px; - margin: 6px 3px 3px 3px; - font-size: 14px; - font-weight: bold; - text-decoration: none; - background-color: #31305E; - color: white; -} - -.userbox a:hover, .vps-admin a:hover -{ - background-color: #15144E; -} - -.main -{ - position: relative; - background-color: #F1F1F1; - padding: 9px 13px; - border: 2px solid #817F9D; - min-height: 400px; -} - -.main.shift -{ - padding-left: 225px; -} - -.sidebar -{ - position: absolute; - top: 16px; - left: 8px; - width: 200px; - background-color: #DCDCDC; -} - -.sidebar a.sidebutton -{ - display: block; - padding: 5px 8px; - text-decoration: none; - color: #343352; - font-size: 18px; - font-weight: bold; - padding-left: 30px; - background-repeat: no-repeat; - background-position: 8px 10px; -} - -.sidebar a.sidebutton:hover -{ - background-color: #CDCCDE; -} - -#button_overview -{ - background-image: url(../images/menu/overview.png); -} - -#button_statistics -{ - background-image: url(../images/menu/statistics.png); -} - -#button_webshell -{ - background-image: url(../images/menu/console.png); -} - -#button_ip -{ - background-image: url(../images/menu/ip.png); -} - -#button_reinstall -{ - background-image: url(../images/menu/reinstall.png); -} - -#button_backup -{ - background-image: url(../images/menu/backup.png); -} - -#button_api -{ - background-image: url(../images/menu/api.png); -} - -#button_alerts -{ - background-image: url(../images/menu/alerts.png); -} - -#button_password -{ - background-image: url(../images/menu/lock.png); -} - -.quota-item -{ - float: left; - width: 203px; - margin-right: 23px; - margin-bottom: 10px; -} - -.quota-bar -{ - position: relative; - border: 1px solid #343352; - width: 100%; - height: 18px; -} - -.quota-bar-inner -{ - background-color: #12005E; - height: 100%; -} - -.quota-bar-label -{ - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - font-size: 13px; - font-weight: bold; - color: white; - padding-left: 5px; - /*text-shadow: 0px 0px 3px #000673, 0px 0px 1px #000000, 0px 0px 3px #000000, 0px 0px 2px #000673; - -webkit-text-shadow: 0px 0px 3px #000673, 0px 0px 1px #000000, 0px 0px 3px #000000, 0px 0px 2px #000673; - -moz-text-shadow: 0px 0px 3px #000673, 0px 0px 1px #000000, 0px 0px 3px #000000, 0px 0px 2px #000673; - -o-text-shadow: 0px 0px 3px #000673, 0px 0px 1px #000000, 0px 0px 3px #000000, 0px 0px 2px #000673; - -ms-text-shadow: 0px 0px 3px #000673, 0px 0px 1px #000000, 0px 0px 3px #000000, 0px 0px 2px #000673;*/ - text-shadow: 1px 0px 0px #000673, -1px 0px 0px #000673, 0px 1px 0px #000673, 0px -1px 0px #000673; - -webkit-text-shadow: 1px 0px 0px #000673, -1px 0px 0px #000673, 0px 1px 0px #000673, 0px -1px 0px #000673; - -moz-text-shadow: 1px 0px 0px #000673, -1px 0px 0px #000673, 0px 1px 0px #000673, 0px -1px 0px #000673; - -o-text-shadow: 1px 0px 0px #000673, -1px 0px 0px #000673, 0px 1px 0px #000673, 0px -1px 0px #000673; - -ms-text-shadow: 1px 0px 0px #000673, -1px 0px 0px #000673, 0px 1px 0px #000673, 0px -1px 0px #000673; -} - -.quota-item.wide -{ - width: 316px; -} - -.quota-item.last -{ - margin-right: 0px; -} - -.quota -{ - margin-bottom: 19px; -} - -.infobox -{ - border: 1px solid #B0B0B0; - background-color: #EDEDED; - padding: 6px 9px; -} - -.controlbox -{ - margin-bottom: 23px; -} - -.controlbutton -{ - border: 2px solid #343352; - font-size: 24px; - color: #343352; - text-align: center; - font-weight: bold; - float: left; - text-decoration: none; - padding: 9px; - margin-right: 12px; - width: 189px; -} - -.controlbutton.last -{ - margin-right: 0px; -} - -.controlbutton img -{ - display: block; - margin: 0px auto; -} - -.controlbutton:hover -{ - background-color: #CDD0E1; -} - -.controlbutton.disabled, .constrolbutton.disabled:hover -{ - border: 2px solid #737379; - background-color: #9B9B9B; - cursor: default; -} - -.online -{ - color: #078812; - font-weight: bold; -} - -.offline -{ - color: #A7101C; - font-weight: bold; -} - -.suspended -{ - color: #5B5F6B; - font-weight: bold; -} - -.unknown -{ - color: black; - font-weight: bold; -} - -.footer -{ - font-size: 14px; - margin-top: 4px; -} - -.nodename -{ - font-size: 14px; -} - -.hostname -{ - font-size: 13px; - color: gray; -} - -.unit -{ - color: gray; -} - -/* CPHPErrorHandler styles */ - -.errorhandler -{ - margin: 10px 0px; - padding: 8px 10px; - padding-left: 46px; - background-position: 8px 6px; - background-repeat: no-repeat; - min-height: 24px; -} - -.errorhandler .error-title -{ - font-weight: bold; - font-size: 120%; -} - -.errorhandler.error-error -{ - background-color: #FCCBC9; - border: 1px solid red; - background-image: url(../images/error/error.png); -} - -.errorhandler.error-info -{ - background-color: #C9F6FC; - border: 1px solid blue; - background-image: url(../images/error/info.png); -} - -.errorhandler.error-warning -{ - background-color: #FBFCC9; - border: 1px solid #C5BA00; - background-image: url(../images/error/warning.png); -} - -.errorhandler.error-success -{ - background-color: #DEFCC9; - border: 1px solid #4CC500; - background-image: url(../images/error/success.png); -} - -.errorhandler ul -{ - margin: 0px; - padding-left: 24px; -} - - -input -{ - padding: 4px 6px; -} - -input, label -{ - /*margin-top: 0px !important; - margin-bottom: 0px !important;*/ -} - -button.column -{ - margin-left: 1.6% !important; - margin-right: 1.6% !important; -} - -.template-option -{ - border: 1px solid #31305E; - margin: 11px 0px; -} - -.template-name -{ - background-color: #31305E; - padding: 4px 3px; - color: white; - font-weight: bold; -} - -.template-name input -{ - float: left; - margin-top: 6px; - margin-right: 5px; - vertical-align: middle; -} - -.template-description -{ - padding: 6px 7px; -} - -.confirm-text -{ - padding-left: 24px; - display: block; -} - -.confirm input -{ - float: left; - margin-right: 4px; - margin-top: 7px; -} - -.toolbar -{ - background-color: #DDDDDF; - padding: 3px; - margin-bottom: 8px; - margin-top: 7px; - border: 2px solid #817F9D; - padding-left: 38px; - background-image: url(../images/misc/wrench.png); - background-repeat: no-repeat; - background-position: 4px center; -} - -.toolbar a -{ - display: block; - float: left; - color: white; - padding: 4px 6px; - text-decoration: none; - background-color: #5D5C79; - font-weight: bold; - font-size: 15px; - margin-right: 5px; -} - -.toolbar a:hover -{ - background-color: #4E4D69; -} - -.darkform -{ - margin-bottom: 6px; -} - -form.dark, .darkform -{ - background-color: #31305E; - color: white; - padding: 6px 0.5% 4px 0.5%; - font-size: 15px; - font-weight: bold; - width: 75%; -} - -form.dark label, form .filler, .darkform label -{ - display: block; - float: left; - margin: 3px 1%; - width: 45.8%; -} - -form.dark input, form.dark select, .darkform input -{ - display: block; - float: left; - width: 48%; - border: 0px; - margin: 3px 0.4%; - padding: 4px 2%; - box-sizing: content-box; -} - -form.dark input[type="checkbox"], .darkform input[type="checkbox"] -{ - width: auto; - margin-top: 7px; -} - -form.dark input[type="file"], .darkform input[type="file"] -{ - height: 24px; - font-size: 13px; - margin-top: 4px; - margin-bottom: 0px; - padding: 0px 0px; -} - -form.dark button[type="submit"], .darkform button[type="submit"] -{ - float: right; - margin: 9px 7px 7px 7px; - font-size: 15px; - font-weight: bold; -} - -form.dark .field.disabled, .darkform .field.disabled -{ - background-color: #444452; - color: #B5B5B5; -} - -form.dark .filler a, .darkform .filler a -{ - display: block; - color: white; - font-size: 13px; - margin-top: 12px; -} - -form.dark h3, .darkform h3 -{ - color: #F1F1F1; - margin: 6px 1% 4px 1%; -} - -form.login -{ - width: 40%; - margin: 64px auto; -} - -form.login label, form.login .filler -{ - width: 40.8%; -} - -form.login input -{ - width: 52%; -} diff --git a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.eot b/frontend/templates/default/static/css/fonts/base/icomoon-webfont.eot deleted file mode 100644 index a91cad9..0000000 Binary files a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.eot and /dev/null differ diff --git a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.svg b/frontend/templates/default/static/css/fonts/base/icomoon-webfont.svg deleted file mode 100644 index 76a5fa3..0000000 --- a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.svg +++ /dev/null @@ -1,175 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.ttf b/frontend/templates/default/static/css/fonts/base/icomoon-webfont.ttf deleted file mode 100644 index befb012..0000000 Binary files a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.ttf and /dev/null differ diff --git a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.woff b/frontend/templates/default/static/css/fonts/base/icomoon-webfont.woff deleted file mode 100644 index b6ec212..0000000 Binary files a/frontend/templates/default/static/css/fonts/base/icomoon-webfont.woff and /dev/null differ diff --git a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.eot b/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.eot deleted file mode 100644 index 3fc372d..0000000 Binary files a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.eot and /dev/null differ diff --git a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.svg b/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.svg deleted file mode 100644 index c340af3..0000000 --- a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.ttf b/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.ttf deleted file mode 100644 index b595e68..0000000 Binary files a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.ttf and /dev/null differ diff --git a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.woff b/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.woff deleted file mode 100644 index c711401..0000000 Binary files a/frontend/templates/default/static/css/fonts/social/icomoonsocial-webfont.woff and /dev/null differ diff --git a/frontend/templates/default/static/css/img/breadcrumbs-bg.gif b/frontend/templates/default/static/css/img/breadcrumbs-bg.gif deleted file mode 100644 index 669dd15..0000000 Binary files a/frontend/templates/default/static/css/img/breadcrumbs-bg.gif and /dev/null differ diff --git a/frontend/templates/default/static/css/img/chosen-sprite.png b/frontend/templates/default/static/css/img/chosen-sprite.png deleted file mode 100644 index 231fe90..0000000 Binary files a/frontend/templates/default/static/css/img/chosen-sprite.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/blank.gif b/frontend/templates/default/static/css/img/fancybox/blank.gif deleted file mode 100644 index 35d42e8..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/blank.gif and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_close.png b/frontend/templates/default/static/css/img/fancybox/fancy_close.png deleted file mode 100644 index 0703530..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_close.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_loading.png b/frontend/templates/default/static/css/img/fancybox/fancy_loading.png deleted file mode 100644 index 2503017..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_loading.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_nav_left.png b/frontend/templates/default/static/css/img/fancybox/fancy_nav_left.png deleted file mode 100644 index ebaa6a4..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_nav_left.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_nav_right.png b/frontend/templates/default/static/css/img/fancybox/fancy_nav_right.png deleted file mode 100644 index 873294e..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_nav_right.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_e.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_e.png deleted file mode 100644 index 2eda089..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_e.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_n.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_n.png deleted file mode 100644 index 69aa10e..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_n.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_ne.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_ne.png deleted file mode 100644 index 79f6980..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_ne.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_nw.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_nw.png deleted file mode 100644 index 7182cd9..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_nw.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_s.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_s.png deleted file mode 100644 index d8858bf..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_s.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_se.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_se.png deleted file mode 100644 index 541e3ff..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_se.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_sw.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_sw.png deleted file mode 100644 index b451689..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_sw.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_w.png b/frontend/templates/default/static/css/img/fancybox/fancy_shadow_w.png deleted file mode 100644 index 8a4e4a8..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_shadow_w.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_title_left.png b/frontend/templates/default/static/css/img/fancybox/fancy_title_left.png deleted file mode 100644 index 6049223..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_title_left.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_title_main.png b/frontend/templates/default/static/css/img/fancybox/fancy_title_main.png deleted file mode 100644 index 8044271..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_title_main.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_title_over.png b/frontend/templates/default/static/css/img/fancybox/fancy_title_over.png deleted file mode 100644 index d9f458f..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_title_over.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancy_title_right.png b/frontend/templates/default/static/css/img/fancybox/fancy_title_right.png deleted file mode 100644 index e36d9db..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancy_title_right.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancybox-x.png b/frontend/templates/default/static/css/img/fancybox/fancybox-x.png deleted file mode 100644 index c2130f8..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancybox-x.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancybox-y.png b/frontend/templates/default/static/css/img/fancybox/fancybox-y.png deleted file mode 100644 index 7ef399b..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancybox-y.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/fancybox.png b/frontend/templates/default/static/css/img/fancybox/fancybox.png deleted file mode 100644 index 65e14f6..0000000 Binary files a/frontend/templates/default/static/css/img/fancybox/fancybox.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/fancybox/jquery.easing-1.3.pack.js b/frontend/templates/default/static/css/img/fancybox/jquery.easing-1.3.pack.js deleted file mode 100644 index 9028179..0000000 --- a/frontend/templates/default/static/css/img/fancybox/jquery.easing-1.3.pack.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ - * - * Uses the built in easing capabilities added In jQuery 1.1 - * to offer multiple easing options - * - * TERMS OF USE - jQuery Easing - * - * Open source under the BSD License. - * - * Copyright © 2008 George McGinley Smith - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * -*/ - -// t: current time, b: begInnIng value, c: change In value, d: duration -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t')[0], { prop: 0 }), - - isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest, - - /* - * Private methods - */ - - _abort = function() { - loading.hide(); - - imgPreloader.onerror = imgPreloader.onload = null; - - if (ajaxLoader) { - ajaxLoader.abort(); - } - - tmp.empty(); - }, - - _error = function() { - if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) { - loading.hide(); - busy = false; - return; - } - - selectedOpts.titleShow = false; - - selectedOpts.width = 'auto'; - selectedOpts.height = 'auto'; - - tmp.html( '

The requested content cannot be loaded.
Please try again later.

' ); - - _process_inline(); - }, - - _start = function() { - var obj = selectedArray[ selectedIndex ], - href, - type, - title, - str, - emb, - ret; - - _abort(); - - selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox'))); - - ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts); - - if (ret === false) { - busy = false; - return; - } else if (typeof ret == 'object') { - selectedOpts = $.extend(selectedOpts, ret); - } - - title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || ''; - - if (obj.nodeName && !selectedOpts.orig) { - selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj); - } - - if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) { - title = selectedOpts.orig.attr('alt'); - } - - href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null; - - if ((/^(?:javascript)/i).test(href) || href == '#') { - href = null; - } - - if (selectedOpts.type) { - type = selectedOpts.type; - - if (!href) { - href = selectedOpts.content; - } - - } else if (selectedOpts.content) { - type = 'html'; - - } else if (href) { - if (href.match(imgRegExp)) { - type = 'image'; - - } else if (href.match(swfRegExp)) { - type = 'swf'; - - } else if ($(obj).hasClass("iframe")) { - type = 'iframe'; - - } else if (href.indexOf("#") === 0) { - type = 'inline'; - - } else { - type = 'ajax'; - } - } - - if (!type) { - _error(); - return; - } - - if (type == 'inline') { - obj = href.substr(href.indexOf("#")); - type = $(obj).length > 0 ? 'inline' : 'ajax'; - } - - selectedOpts.type = type; - selectedOpts.href = href; - selectedOpts.title = title; - - if (selectedOpts.autoDimensions) { - if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') { - selectedOpts.width = 'auto'; - selectedOpts.height = 'auto'; - } else { - selectedOpts.autoDimensions = false; - } - } - - if (selectedOpts.modal) { - selectedOpts.overlayShow = true; - selectedOpts.hideOnOverlayClick = false; - selectedOpts.hideOnContentClick = false; - selectedOpts.enableEscapeButton = false; - selectedOpts.showCloseButton = false; - } - - selectedOpts.padding = parseInt(selectedOpts.padding, 10); - selectedOpts.margin = parseInt(selectedOpts.margin, 10); - - tmp.css('padding', (selectedOpts.padding + selectedOpts.margin)); - - $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() { - $(this).replaceWith(content.children()); - }); - - switch (type) { - case 'html' : - tmp.html( selectedOpts.content ); - _process_inline(); - break; - - case 'inline' : - if ( $(obj).parent().is('#fancybox-content') === true) { - busy = false; - return; - } - - $('
') - .hide() - .insertBefore( $(obj) ) - .bind('fancybox-cleanup', function() { - $(this).replaceWith(content.children()); - }).bind('fancybox-cancel', function() { - $(this).replaceWith(tmp.children()); - }); - - $(obj).appendTo(tmp); - - _process_inline(); - break; - - case 'image': - busy = false; - - $.fancybox.showActivity(); - - imgPreloader = new Image(); - - imgPreloader.onerror = function() { - _error(); - }; - - imgPreloader.onload = function() { - busy = true; - - imgPreloader.onerror = imgPreloader.onload = null; - - _process_image(); - }; - - imgPreloader.src = href; - break; - - case 'swf': - selectedOpts.scrolling = 'no'; - - str = ''; - emb = ''; - - $.each(selectedOpts.swf, function(name, val) { - str += ''; - emb += ' ' + name + '="' + val + '"'; - }); - - str += ''; - - tmp.html(str); - - _process_inline(); - break; - - case 'ajax': - busy = false; - - $.fancybox.showActivity(); - - selectedOpts.ajax.win = selectedOpts.ajax.success; - - ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, { - url : href, - data : selectedOpts.ajax.data || {}, - error : function(XMLHttpRequest, textStatus, errorThrown) { - if ( XMLHttpRequest.status > 0 ) { - _error(); - } - }, - success : function(data, textStatus, XMLHttpRequest) { - var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader; - if (o.status == 200) { - if ( typeof selectedOpts.ajax.win == 'function' ) { - ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest); - - if (ret === false) { - loading.hide(); - return; - } else if (typeof ret == 'string' || typeof ret == 'object') { - data = ret; - } - } - - tmp.html( data ); - _process_inline(); - } - } - })); - - break; - - case 'iframe': - _show(); - break; - } - }, - - _process_inline = function() { - var - w = selectedOpts.width, - h = selectedOpts.height; - - if (w.toString().indexOf('%') > -1) { - w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px'; - - } else { - w = w == 'auto' ? 'auto' : w + 'px'; - } - - if (h.toString().indexOf('%') > -1) { - h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px'; - - } else { - h = h == 'auto' ? 'auto' : h + 'px'; - } - - tmp.wrapInner('
'); - - selectedOpts.width = tmp.width(); - selectedOpts.height = tmp.height(); - - _show(); - }, - - _process_image = function() { - selectedOpts.width = imgPreloader.width; - selectedOpts.height = imgPreloader.height; - - $("").attr({ - 'id' : 'fancybox-img', - 'src' : imgPreloader.src, - 'alt' : selectedOpts.title - }).appendTo( tmp ); - - _show(); - }, - - _show = function() { - var pos, equal; - - loading.hide(); - - if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { - $.event.trigger('fancybox-cancel'); - - busy = false; - return; - } - - busy = true; - - $(content.add( overlay )).unbind(); - - $(window).unbind("resize.fb scroll.fb"); - $(document).unbind('keydown.fb'); - - if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') { - wrap.css('height', wrap.height()); - } - - currentArray = selectedArray; - currentIndex = selectedIndex; - currentOpts = selectedOpts; - - if (currentOpts.overlayShow) { - overlay.css({ - 'background-color' : currentOpts.overlayColor, - 'opacity' : currentOpts.overlayOpacity, - 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto', - 'height' : $(document).height() - }); - - if (!overlay.is(':visible')) { - if (isIE6) { - $('select:not(#fancybox-tmp select)').filter(function() { - return this.style.visibility !== 'hidden'; - }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() { - this.style.visibility = 'inherit'; - }); - } - - overlay.show(); - } - } else { - overlay.hide(); - } - - final_pos = _get_zoom_to(); - - _process_title(); - - if (wrap.is(":visible")) { - $( close.add( nav_left ).add( nav_right ) ).hide(); - - pos = wrap.position(), - - start_pos = { - top : pos.top, - left : pos.left, - width : wrap.width(), - height : wrap.height() - }; - - equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height); - - content.fadeTo(currentOpts.changeFade, 0.3, function() { - var finish_resizing = function() { - content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish); - }; - - $.event.trigger('fancybox-change'); - - content - .empty() - .removeAttr('filter') - .css({ - 'border-width' : currentOpts.padding, - 'width' : final_pos.width - currentOpts.padding * 2, - 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 - }); - - if (equal) { - finish_resizing(); - - } else { - fx.prop = 0; - - $(fx).animate({prop: 1}, { - duration : currentOpts.changeSpeed, - easing : currentOpts.easingChange, - step : _draw, - complete : finish_resizing - }); - } - }); - - return; - } - - wrap.removeAttr("style"); - - content.css('border-width', currentOpts.padding); - - if (currentOpts.transitionIn == 'elastic') { - start_pos = _get_zoom_from(); - - content.html( tmp.contents() ); - - wrap.show(); - - if (currentOpts.opacity) { - final_pos.opacity = 0; - } - - fx.prop = 0; - - $(fx).animate({prop: 1}, { - duration : currentOpts.speedIn, - easing : currentOpts.easingIn, - step : _draw, - complete : _finish - }); - - return; - } - - if (currentOpts.titlePosition == 'inside' && titleHeight > 0) { - title.show(); - } - - content - .css({ - 'width' : final_pos.width - currentOpts.padding * 2, - 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2 - }) - .html( tmp.contents() ); - - wrap - .css(final_pos) - .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish ); - }, - - _format_title = function(title) { - if (title && title.length) { - if (currentOpts.titlePosition == 'float') { - return '
' + title + '
'; - } - - return '
' + title + '
'; - } - - return false; - }, - - _process_title = function() { - titleStr = currentOpts.title || ''; - titleHeight = 0; - - title - .empty() - .removeAttr('style') - .removeClass(); - - if (currentOpts.titleShow === false) { - title.hide(); - return; - } - - titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr); - - if (!titleStr || titleStr === '') { - title.hide(); - return; - } - - title - .addClass('fancybox-title-' + currentOpts.titlePosition) - .html( titleStr ) - .appendTo( 'body' ) - .show(); - - switch (currentOpts.titlePosition) { - case 'inside': - title - .css({ - 'width' : final_pos.width - (currentOpts.padding * 2), - 'marginLeft' : currentOpts.padding, - 'marginRight' : currentOpts.padding - }); - - titleHeight = title.outerHeight(true); - - title.appendTo( outer ); - - final_pos.height += titleHeight; - break; - - case 'over': - title - .css({ - 'marginLeft' : currentOpts.padding, - 'width' : final_pos.width - (currentOpts.padding * 2), - 'bottom' : currentOpts.padding - }) - .appendTo( outer ); - break; - - case 'float': - title - .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1) - .appendTo( wrap ); - break; - - default: - title - .css({ - 'width' : final_pos.width - (currentOpts.padding * 2), - 'paddingLeft' : currentOpts.padding, - 'paddingRight' : currentOpts.padding - }) - .appendTo( wrap ); - break; - } - - title.hide(); - }, - - _set_navigation = function() { - if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) { - $(document).bind('keydown.fb', function(e) { - if (e.keyCode == 27 && currentOpts.enableEscapeButton) { - e.preventDefault(); - $.fancybox.close(); - - } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') { - e.preventDefault(); - $.fancybox[ e.keyCode == 37 ? 'prev' : 'next'](); - } - }); - } - - if (!currentOpts.showNavArrows) { - nav_left.hide(); - nav_right.hide(); - return; - } - - if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) { - nav_left.show(); - } - - if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) { - nav_right.show(); - } - }, - - _finish = function () { - if (!$.support.opacity) { - content.get(0).style.removeAttribute('filter'); - wrap.get(0).style.removeAttribute('filter'); - } - - if (selectedOpts.autoDimensions) { - content.css('height', 'auto'); - } - - wrap.css('height', 'auto'); - - if (titleStr && titleStr.length) { - title.show(); - } - - if (currentOpts.showCloseButton) { - close.show(); - } - - _set_navigation(); - - if (currentOpts.hideOnContentClick) { - content.bind('click', $.fancybox.close); - } - - if (currentOpts.hideOnOverlayClick) { - overlay.bind('click', $.fancybox.close); - } - - $(window).bind("resize.fb", $.fancybox.resize); - - if (currentOpts.centerOnScroll) { - $(window).bind("scroll.fb", $.fancybox.center); - } - - if (currentOpts.type == 'iframe') { - $('').appendTo(content); - } - - wrap.show(); - - busy = false; - - $.fancybox.center(); - - currentOpts.onComplete(currentArray, currentIndex, currentOpts); - - _preload_images(); - }, - - _preload_images = function() { - var href, - objNext; - - if ((currentArray.length -1) > currentIndex) { - href = currentArray[ currentIndex + 1 ].href; - - if (typeof href !== 'undefined' && href.match(imgRegExp)) { - objNext = new Image(); - objNext.src = href; - } - } - - if (currentIndex > 0) { - href = currentArray[ currentIndex - 1 ].href; - - if (typeof href !== 'undefined' && href.match(imgRegExp)) { - objNext = new Image(); - objNext.src = href; - } - } - }, - - _draw = function(pos) { - var dim = { - width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), - height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), - - top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), - left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) - }; - - if (typeof final_pos.opacity !== 'undefined') { - dim.opacity = pos < 0.5 ? 0.5 : pos; - } - - wrap.css(dim); - - content.css({ - 'width' : dim.width - currentOpts.padding * 2, - 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 - }); - }, - - _get_viewport = function() { - return [ - $(window).width() - (currentOpts.margin * 2), - $(window).height() - (currentOpts.margin * 2), - $(document).scrollLeft() + currentOpts.margin, - $(document).scrollTop() + currentOpts.margin - ]; - }, - - _get_zoom_to = function () { - var view = _get_viewport(), - to = {}, - resize = currentOpts.autoScale, - double_padding = currentOpts.padding * 2, - ratio; - - if (currentOpts.width.toString().indexOf('%') > -1) { - to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); - } else { - to.width = currentOpts.width + double_padding; - } - - if (currentOpts.height.toString().indexOf('%') > -1) { - to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); - } else { - to.height = currentOpts.height + double_padding; - } - - if (resize && (to.width > view[0] || to.height > view[1])) { - if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { - ratio = (currentOpts.width ) / (currentOpts.height ); - - if ((to.width ) > view[0]) { - to.width = view[0]; - to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); - } - - if ((to.height) > view[1]) { - to.height = view[1]; - to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); - } - - } else { - to.width = Math.min(to.width, view[0]); - to.height = Math.min(to.height, view[1]); - } - } - - to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); - to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); - - return to; - }, - - _get_obj_pos = function(obj) { - var pos = obj.offset(); - - pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; - pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; - - pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; - pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; - - pos.width = obj.width(); - pos.height = obj.height(); - - return pos; - }, - - _get_zoom_from = function() { - var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, - from = {}, - pos, - view; - - if (orig && orig.length) { - pos = _get_obj_pos(orig); - - from = { - width : pos.width + (currentOpts.padding * 2), - height : pos.height + (currentOpts.padding * 2), - top : pos.top - currentOpts.padding - 20, - left : pos.left - currentOpts.padding - 20 - }; - - } else { - view = _get_viewport(); - - from = { - width : currentOpts.padding * 2, - height : currentOpts.padding * 2, - top : parseInt(view[3] + view[1] * 0.5, 10), - left : parseInt(view[2] + view[0] * 0.5, 10) - }; - } - - return from; - }, - - _animate_loading = function() { - if (!loading.is(':visible')){ - clearInterval(loadingTimer); - return; - } - - $('div', loading).css('top', (loadingFrame * -40) + 'px'); - - loadingFrame = (loadingFrame + 1) % 12; - }; - - /* - * Public methods - */ - - $.fn.fancybox = function(options) { - if (!$(this).length) { - return this; - } - - $(this) - .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) - .unbind('click.fb') - .bind('click.fb', function(e) { - e.preventDefault(); - - if (busy) { - return; - } - - busy = true; - - $(this).blur(); - - selectedArray = []; - selectedIndex = 0; - - var rel = $(this).attr('rel') || ''; - - if (!rel || rel == '' || rel === 'nofollow') { - selectedArray.push(this); - - } else { - selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); - selectedIndex = selectedArray.index( this ); - } - - _start(); - - return; - }); - - return this; - }; - - $.fancybox = function(obj) { - var opts; - - if (busy) { - return; - } - - busy = true; - opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; - - selectedArray = []; - selectedIndex = parseInt(opts.index, 10) || 0; - - if ($.isArray(obj)) { - for (var i = 0, j = obj.length; i < j; i++) { - if (typeof obj[i] == 'object') { - $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); - } else { - obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); - } - } - - selectedArray = jQuery.merge(selectedArray, obj); - - } else { - if (typeof obj == 'object') { - $(obj).data('fancybox', $.extend({}, opts, obj)); - } else { - obj = $({}).data('fancybox', $.extend({content : obj}, opts)); - } - - selectedArray.push(obj); - } - - if (selectedIndex > selectedArray.length || selectedIndex < 0) { - selectedIndex = 0; - } - - _start(); - }; - - $.fancybox.showActivity = function() { - clearInterval(loadingTimer); - - loading.show(); - loadingTimer = setInterval(_animate_loading, 66); - }; - - $.fancybox.hideActivity = function() { - loading.hide(); - }; - - $.fancybox.next = function() { - return $.fancybox.pos( currentIndex + 1); - }; - - $.fancybox.prev = function() { - return $.fancybox.pos( currentIndex - 1); - }; - - $.fancybox.pos = function(pos) { - if (busy) { - return; - } - - pos = parseInt(pos); - - selectedArray = currentArray; - - if (pos > -1 && pos < currentArray.length) { - selectedIndex = pos; - _start(); - - } else if (currentOpts.cyclic && currentArray.length > 1) { - selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; - _start(); - } - - return; - }; - - $.fancybox.cancel = function() { - if (busy) { - return; - } - - busy = true; - - $.event.trigger('fancybox-cancel'); - - _abort(); - - selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); - - busy = false; - }; - - // Note: within an iframe use - parent.$.fancybox.close(); - $.fancybox.close = function() { - if (busy || wrap.is(':hidden')) { - return; - } - - busy = true; - - if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { - busy = false; - return; - } - - _abort(); - - $(close.add( nav_left ).add( nav_right )).hide(); - - $(content.add( overlay )).unbind(); - - $(window).unbind("resize.fb scroll.fb"); - $(document).unbind('keydown.fb'); - - content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); - - if (currentOpts.titlePosition !== 'inside') { - title.empty(); - } - - wrap.stop(); - - function _cleanup() { - overlay.fadeOut('fast'); - - title.empty().hide(); - wrap.hide(); - - $.event.trigger('fancybox-cleanup'); - - content.empty(); - - currentOpts.onClosed(currentArray, currentIndex, currentOpts); - - currentArray = selectedOpts = []; - currentIndex = selectedIndex = 0; - currentOpts = selectedOpts = {}; - - busy = false; - } - - if (currentOpts.transitionOut == 'elastic') { - start_pos = _get_zoom_from(); - - var pos = wrap.position(); - - final_pos = { - top : pos.top , - left : pos.left, - width : wrap.width(), - height : wrap.height() - }; - - if (currentOpts.opacity) { - final_pos.opacity = 1; - } - - title.empty().hide(); - - fx.prop = 1; - - $(fx).animate({ prop: 0 }, { - duration : currentOpts.speedOut, - easing : currentOpts.easingOut, - step : _draw, - complete : _cleanup - }); - - } else { - wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); - } - }; - - $.fancybox.resize = function() { - if (overlay.is(':visible')) { - overlay.css('height', $(document).height()); - } - - $.fancybox.center(true); - }; - - $.fancybox.center = function() { - var view, align; - - if (busy) { - return; - } - - align = arguments[0] === true ? 1 : 0; - view = _get_viewport(); - - if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { - return; - } - - wrap - .stop() - .animate({ - 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), - 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) - }, typeof arguments[0] == 'number' ? arguments[0] : 200); - }; - - $.fancybox.init = function() { - if ($("#fancybox-wrap").length) { - return; - } - - $('body').append( - tmp = $('
'), - loading = $('
'), - overlay = $('
'), - wrap = $('
') - ); - - outer = $('
') - .append('
') - .appendTo( wrap ); - - outer.append( - content = $('
'), - close = $(''), - title = $('
'), - - nav_left = $(''), - nav_right = $('') - ); - - close.click($.fancybox.close); - loading.click($.fancybox.cancel); - - nav_left.click(function(e) { - e.preventDefault(); - $.fancybox.prev(); - }); - - nav_right.click(function(e) { - e.preventDefault(); - $.fancybox.next(); - }); - - if ($.fn.mousewheel) { - wrap.bind('mousewheel.fb', function(e, delta) { - if (busy) { - e.preventDefault(); - - } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { - e.preventDefault(); - $.fancybox[ delta > 0 ? 'prev' : 'next'](); - } - }); - } - - if (!$.support.opacity) { - wrap.addClass('fancybox-ie'); - } - - if (isIE6) { - loading.addClass('fancybox-ie6'); - wrap.addClass('fancybox-ie6'); - - $('').prependTo(outer); - } - }; - - $.fn.fancybox.defaults = { - padding : 10, - margin : 40, - opacity : false, - modal : false, - cyclic : false, - scrolling : 'auto', // 'auto', 'yes' or 'no' - - width : 560, - height : 340, - - autoScale : true, - autoDimensions : true, - centerOnScroll : false, - - ajax : {}, - swf : { wmode: 'transparent' }, - - hideOnOverlayClick : true, - hideOnContentClick : false, - - overlayShow : true, - overlayOpacity : 0.7, - overlayColor : '#777', - - titleShow : true, - titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' - titleFormat : null, - titleFromAlt : false, - - transitionIn : 'fade', // 'elastic', 'fade' or 'none' - transitionOut : 'fade', // 'elastic', 'fade' or 'none' - - speedIn : 300, - speedOut : 300, - - changeSpeed : 300, - changeFade : 'fast', - - easingIn : 'swing', - easingOut : 'swing', - - showCloseButton : true, - showNavArrows : true, - enableEscapeButton : true, - enableKeyboardNav : true, - - onStart : function(){}, - onCancel : function(){}, - onComplete : function(){}, - onCleanup : function(){}, - onClosed : function(){}, - onError : function(){} - }; - - $(document).ready(function() { - $.fancybox.init(); - }); - -})(jQuery); \ No newline at end of file diff --git a/frontend/templates/default/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js b/frontend/templates/default/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js deleted file mode 100644 index 1373ed0..0000000 --- a/frontend/templates/default/static/css/img/fancybox/jquery.fancybox-1.3.4.pack.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * FancyBox - jQuery Plugin - * Simple and fancy lightbox alternative - * - * Examples and documentation at: http://fancybox.net - * - * Copyright (c) 2008 - 2010 Janis Skarnelis - * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. - * - * Version: 1.3.4 (11/11/2010) - * Requires: jQuery v1.3+ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("
")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('

The requested content cannot be loaded.
Please try again later.

'); -F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| -c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= -false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('
').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", -function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='';P="";b.each(e.swf,function(x,H){C+='';P+=" "+x+'="'+H+'"'});C+='";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== -"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('
');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, -opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? -d.titlePosition=="float"?'
'+s+'
':'
'+s+"
":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); -y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== -i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); -f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== -37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); -s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(j); -f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); -j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== -"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), -10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; -b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= -0,C=a.length;ko.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ -1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= -true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; -b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- -d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('
'),t=b('
'),u=b('
'),f=b('
'));D=b('
').append('
').appendTo(f); -D.append(j=b('
'),E=b(''),n=b('
'),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); -b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}}; -b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", -easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); \ No newline at end of file diff --git a/frontend/templates/default/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js b/frontend/templates/default/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js deleted file mode 100644 index cb66588..0000000 --- a/frontend/templates/default/static/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) -* Licensed under the MIT License (LICENSE.txt). -* -* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. -* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. -* Thanks to: Seamus Leahy for adding deltaX and deltaY -* -* Version: 3.0.4 -* -* Requires: 1.2.2+ -*/ - -(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a= -f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); \ No newline at end of file diff --git a/frontend/templates/default/static/css/img/grid.png b/frontend/templates/default/static/css/img/grid.png deleted file mode 100644 index 6e98194..0000000 Binary files a/frontend/templates/default/static/css/img/grid.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/icon-arrow-right.png b/frontend/templates/default/static/css/img/icon-arrow-right.png deleted file mode 100644 index 0653788..0000000 Binary files a/frontend/templates/default/static/css/img/icon-arrow-right.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/icon-check.png b/frontend/templates/default/static/css/img/icon-check.png deleted file mode 100644 index a9925a0..0000000 Binary files a/frontend/templates/default/static/css/img/icon-check.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/link.png b/frontend/templates/default/static/css/img/rte/link.png deleted file mode 100755 index 25eacb7..0000000 Binary files a/frontend/templates/default/static/css/img/rte/link.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/link_break.png b/frontend/templates/default/static/css/img/rte/link_break.png deleted file mode 100755 index 5235753..0000000 Binary files a/frontend/templates/default/static/css/img/rte/link_break.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/picture_empty.png b/frontend/templates/default/static/css/img/rte/picture_empty.png deleted file mode 100755 index abd2b9b..0000000 Binary files a/frontend/templates/default/static/css/img/rte/picture_empty.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_align_center.png b/frontend/templates/default/static/css/img/rte/text_align_center.png deleted file mode 100755 index 57beb38..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_align_center.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_align_left.png b/frontend/templates/default/static/css/img/rte/text_align_left.png deleted file mode 100755 index 6c8fcc1..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_align_left.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_align_right.png b/frontend/templates/default/static/css/img/rte/text_align_right.png deleted file mode 100755 index a150257..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_align_right.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_bold.png b/frontend/templates/default/static/css/img/rte/text_bold.png deleted file mode 100755 index 889ae80..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_bold.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_italic.png b/frontend/templates/default/static/css/img/rte/text_italic.png deleted file mode 100755 index 8482ac8..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_italic.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_list_bullets.png b/frontend/templates/default/static/css/img/rte/text_list_bullets.png deleted file mode 100755 index 4a8672b..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_list_bullets.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_list_numbers.png b/frontend/templates/default/static/css/img/rte/text_list_numbers.png deleted file mode 100755 index 33b0b8d..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_list_numbers.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_strikethrough.png b/frontend/templates/default/static/css/img/rte/text_strikethrough.png deleted file mode 100755 index 612058a..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_strikethrough.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_subscript.png b/frontend/templates/default/static/css/img/rte/text_subscript.png deleted file mode 100755 index 1a2b010..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_subscript.png and /dev/null differ diff --git a/frontend/templates/default/static/css/img/rte/text_superscript.png b/frontend/templates/default/static/css/img/rte/text_superscript.png deleted file mode 100755 index 2fb2a7c..0000000 Binary files a/frontend/templates/default/static/css/img/rte/text_superscript.png and /dev/null differ diff --git a/frontend/templates/default/static/css/jquery.fancybox-1.3.4.css b/frontend/templates/default/static/css/jquery.fancybox-1.3.4.css deleted file mode 100644 index 1642e3c..0000000 --- a/frontend/templates/default/static/css/jquery.fancybox-1.3.4.css +++ /dev/null @@ -1,359 +0,0 @@ -/* - * FancyBox - jQuery Plugin - * Simple and fancy lightbox alternative - * - * Examples and documentation at: http://fancybox.net - * - * Copyright (c) 2008 - 2010 Janis Skarnelis - * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. - * - * Version: 1.3.4 (11/11/2010) - * Requires: jQuery v1.3+ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -#fancybox-loading { - position: fixed; - top: 50%; - left: 50%; - width: 40px; - height: 40px; - margin-top: -20px; - margin-left: -20px; - cursor: pointer; - overflow: hidden; - z-index: 1104; - display: none; -} - -#fancybox-loading div { - position: absolute; - top: 0; - left: 0; - width: 40px; - height: 480px; - background-image: url('img/fancybox/fancybox.png'); -} - -#fancybox-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - z-index: 1100; - display: none; -} - -#fancybox-tmp { - padding: 0; - margin: 0; - border: 0; - overflow: auto; - display: none; -} - -#fancybox-wrap { - position: absolute; - top: 0; - left: 0; - padding: 20px; - z-index: 1101; - outline: none; - display: none; -} - -#fancybox-outer { - position: relative; - width: 100%; - height: 100%; - background: #fff; -} - -#fancybox-content { - width: 0; - height: 0; - padding: 0; - outline: none; - position: relative; - overflow: hidden; - z-index: 1102; - border: 0px solid #fff; -} - -#fancybox-hide-sel-frame { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: transparent; - z-index: 1101; -} - -#fancybox-close { - position: absolute; - top: -15px; - right: -15px; - width: 30px; - height: 30px; - background: transparent url('img/fancybox/fancybox.png') -40px 0px; - cursor: pointer; - z-index: 1103; - display: none; -} - -#fancybox-error { - color: #444; - font: normal 12px/20px Arial; - padding: 14px; - margin: 0; -} - -#fancybox-img { - width: 100%; - height: 100%; - padding: 0; - margin: 0; - border: none; - outline: none; - line-height: 0; - vertical-align: top; -} - -#fancybox-frame { - width: 100%; - height: 100%; - border: none; - display: block; -} - -#fancybox-left, #fancybox-right { - position: absolute; - bottom: 0px; - height: 100%; - width: 35%; - cursor: pointer; - outline: none; - background: transparent url('img/fancybox/blank.gif'); - z-index: 1102; - display: none; -} - -#fancybox-left { - left: 0px; -} - -#fancybox-right { - right: 0px; -} - -#fancybox-left-ico, #fancybox-right-ico { - position: absolute; - top: 50%; - left: -9999px; - width: 30px; - height: 30px; - margin-top: -15px; - cursor: pointer; - z-index: 1102; - display: block; -} - -#fancybox-left-ico { - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -30px; -} - -#fancybox-right-ico { - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -60px; -} - -#fancybox-left:hover, #fancybox-right:hover { - visibility: visible; /* IE6 */ -} - -#fancybox-left:hover span { - left: 20px; -} - -#fancybox-right:hover span { - left: auto; - right: 20px; -} - -.fancybox-bg { - position: absolute; - padding: 0; - margin: 0; - border: 0; - width: 20px; - height: 20px; - z-index: 1001; -} - -#fancybox-bg-n { - top: -20px; - left: 0; - width: 100%; - background-image: url('img/fancybox/fancybox-x.png'); -} - -#fancybox-bg-ne { - top: -20px; - right: -20px; - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -162px; -} - -#fancybox-bg-e { - top: 0; - right: -20px; - height: 100%; - background-image: url('img/fancybox/fancybox-y.png'); - background-position: -20px 0px; -} - -#fancybox-bg-se { - bottom: -20px; - right: -20px; - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -182px; -} - -#fancybox-bg-s { - bottom: -20px; - left: 0; - width: 100%; - background-image: url('img/fancybox/fancybox-x.png'); - background-position: 0px -20px; -} - -#fancybox-bg-sw { - bottom: -20px; - left: -20px; - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -142px; -} - -#fancybox-bg-w { - top: 0; - left: -20px; - height: 100%; - background-image: url('img/fancybox/fancybox-y.png'); -} - -#fancybox-bg-nw { - top: -20px; - left: -20px; - background-image: url('img/fancybox/fancybox.png'); - background-position: -40px -122px; -} - -#fancybox-title { - font-family: Helvetica; - font-size: 12px; - z-index: 1102; -} - -.fancybox-title-inside { - padding-bottom: 10px; - text-align: center; - color: #333; - background: #fff; - position: relative; -} - -.fancybox-title-outside { - padding-top: 10px; - color: #fff; -} - -.fancybox-title-over { - position: absolute; - bottom: 0; - left: 0; - color: #FFF; - text-align: left; -} - -#fancybox-title-over { - padding: 10px; - background-image: url('img/fancybox/fancy_title_over.png'); - display: block; -} - -.fancybox-title-float { - position: absolute; - left: 0; - bottom: -20px; - height: 32px; -} - -#fancybox-title-float-wrap { - border: none; - border-collapse: collapse; - width: auto; -} - -#fancybox-title-float-wrap td { - border: none; - white-space: nowrap; -} - -#fancybox-title-float-left { - padding: 0 0 0 15px; - background: url('img/fancybox/fancybox.png') -40px -90px no-repeat; -} - -#fancybox-title-float-main { - color: #FFF; - line-height: 29px; - font-weight: bold; - padding: 0 0 3px 0; - background: url('img/fancybox/fancybox-x.png') 0px -40px; -} - -#fancybox-title-float-right { - padding: 0 0 0 15px; - background: url('img/fancybox/fancybox.png') -55px -90px no-repeat; -} - -/* IE6 */ - -.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_close.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_nav_left.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_nav_right.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } -.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_left.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_main.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_title_right.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { - height: expression(this.parentNode.clientHeight + "px"); -} - -#fancybox-loading.fancybox-ie6 { - position: absolute; margin-top: 0; - top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); -} - -#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_loading.png', sizingMethod='scale'); } - -/* IE6, IE7, IE8 */ - -.fancybox-ie .fancybox-bg { background: transparent !important; } - -.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_n.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_e.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_se.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_s.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_w.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file diff --git a/frontend/templates/default/static/css/kickstart-buttons.css b/frontend/templates/default/static/css/kickstart-buttons.css deleted file mode 100644 index 4823b63..0000000 --- a/frontend/templates/default/static/css/kickstart-buttons.css +++ /dev/null @@ -1,443 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart-buttons.css - - Super Easy Cross Browser CSS3 Gradients - http://www.colorzilla.com/gradient-editor/ -*/ - -/*--------------------------------- - BUTTONS ------------------------------------*/ -button, -a.btn, -a.btn:visited, -a.button, -a.button:visited, -input[type="submit"], -input[type="reset"], -input[type="button"]{ -position:relative; -top:0; -left:0; -vertical-align: middle; -margin:0; -padding:10px 15px; -line-height:100%; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -cursor: pointer; -width:auto; -overflow:visible; -font-weight:normal; -font-size:14px; /*Pixels for consistancy*/ -text-shadow:0 1px 0 #fff; -color:#666; -text-decoration:none; -vertical-align: middle; -box-sizing: border-box; -display:inline-block; -*display:inline;/*IE ONLY*/ -zoom:1; -border:1px solid #ccc; -background: rgb(252,252,252); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ -background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* IE10+ */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */ -background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ -} - -button:active, -a.btn:active, -a.btn:visited:active, -a.button:active, -a.button:visited:active, -input[type="submit"]:active, -input[type="reset"]:active, -input[type="button"]:active{box-shadow:inset 0px 3px 5px rgba(0,0,0,0.2),inset 0px -10px 20px rgba(0,0,0,0.07);} -button[disabled],.disabled:active{box-shadow:none;} - -button, -input[type="submit"], -input[type="reset"], -input[type="button"]{*padding:7px 15px;}/*IE 7 ONLY*/ - - a.btn,a.button{}/*overrides*/ - button.small, a.btn.small, a.button.small{font-size:0.8em;padding:5px 10px;} - button.medium, a.btn.medium, a.button.medium{}/*default*/ - button.large, a.btn.large, a.button.large{font-size:1.3em;padding:10px 20px;} - button.disabled, a.btn.disabled, a.button.disabled{color:#ccc;cursor:default;background:#efefef;} - button.disabled:hover, a.btn.disabled:hover, a.button.disabled:hover{border:1px solid #ccc;background:#efefef;} - - button:hover, - a.btn:hover, - a.button:hover, - input[type="submit"]:hover, - input[type="reset"]:hover, - input[type="button"]:hover{ - border:1px solid #bbb; - background: rgb(252,252,252); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */ - } - - button img, - a.btn img, - a.button img, - input[type="submit"] img, - input[type="reset"] img, - input[type="button"] img{ - display:inline; - margin:0; - vertical-align: middle; - margin:-10px 10px -5px -5px; - padding:0; - } - - .small img{margin:-3px 5px -3px -3px;} - .medium img{margin:-10px 10px -5px -5px;} - .large img{margin:-10px 10px -10px -10px;} - .icon-only{padding:7px 10px;} - .icon-only img{margin:0;display:block;padding:0;} - .icon-only .icon{margin:-5px -6px -8px -6px;} - - /* icons */ - button .icon, - a.btn .icon, - a.button .icon, - input[type="submit"] .icon, - input[type="reset"] .icon, - input[type="button"] .icon{ - vertical-align: middle; - margin:-5px 3px -7px -2px; - *margin:-5px 3px -10px 0px;/*IE 7 ONLY*/ - } - - button .icon.medium, - a.btn .icon.medium, - a.button .icon.medium, - input[type="submit"] .icon.medium, - input[type="reset"] .icon.medium, - input[type="button"] .icon.medium{ - margin-left:-5px; - *left:-5px; - *top:0px; - } - - button .icon.large, - a.btn .icon.large, - a.button .icon.large, - input[type="submit"] .icon.large, - input[type="reset"] .icon.large, - input[type="button"] .icon.large{ - margin-left:-10px; - *left:-10px; - *top:0px; - } - -/*--------------------------------- - BUTTON BAR ------------------------------------*/ -ul.button-bar{ -display:inline-block; -*display:inline; -margin:0; -padding:0; -font-size:0; -position:relative; -top:0; -left:0; -zoom:1; -border:0; -background:0; -} - - ul.button-bar li{ - display:inline-block; - *display:inline; - position:relative; - top:0; - left:0; - zoom:1; - margin:0 -1px 0 0; - padding:0; - line-height:100%; - font-size:0px; - border:1px solid #ccc; - background: rgb(252,252,252); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ - } - - ul.button-bar li a{ - margin:0; - display:inline-block; - *display:inline; - padding:7px 10px; - position:relative; - top:0; - left:0; - zoom:1; - font-weight:normal; - font-size:14px; /*Pixels for consistancy*/ - text-shadow:0 1px 0 #fff; - color:#666; - text-decoration:none; - vertical-align: middle; - line-height:100%; - border-left:1px solid #fff; - } - - ul.button-bar li.first, - ul.button-bar li.first a{ - -moz-border-radius-bottomleft: 5px; - -moz-border-radius-topleft: 5px; - -webkit-border-bottom-left-radius: 5px; - -webkit-border-top-left-radius: 5px; - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; - -moz-background-clip:content-box; - -webkit-background-clip: border; - background-clip: content-box; - } - - ul.button-bar li.last, - ul.button-bar li.last a{ - -moz-border-radius-bottomright: 5px; - -moz-border-radius-topright: 5px; - -webkit-border-bottom-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - -webkit-background-clip: - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - -moz-background-clip:content-box; - -webkit-background-clip: border; - background-clip: content-box; - } - - ul.button-bar li a .icon{ - position:relative; - top:-1px; - left:0; - margin:-5px 0; - } - - ul.button-bar li a:hover{ - background: rgb(252,252,252); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */ - } - - ul.button-bar li a:active{box-shadow:inset 0px 3px 5px rgba(0,0,0,0.2),inset 0px -10px 20px rgba(0,0,0,0.07);border-left:1px solid #ccc;} - -/*--------------------------------- - STYLES ------------------------------------*/ -.pill{border-radius:200em;} -.pop{box-shadow:0px 1px 5px rgba(0,0,0,0.2);} -.inset{box-shadow:inset 0px 1px 3px rgba(0,0,0,0.3);} -.square{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;} - -/*--------------------------------- - ORANGE ------------------------------------*/ -button.orange, -a.btn.orange, -a.button.orange, -input[type=submit].orange, -input[type=reset].orange, -input[type=button].orange{ -text-shadow:0 -1px 0 #FC730A; -color:#fff; -border:1px solid #FC730A; -background: rgb(255,168,76); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(255,168,76,1) 0%, rgba(255,123,13,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,168,76,1)), color-stop(100%,rgba(255,123,13,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* IE10+ */ -background: linear-gradient(top, rgba(255,168,76,1) 0%,rgba(255,123,13,1) 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa84c', endColorstr='#ff7b0d',GradientType=0 ); /* IE6-9 */ -} - - button.orange:hover, - a.btn.orange:hover, - a.button.orange:hover{ - text-shadow:0 1px 0 #FC730A; - border:1px solid #FC730A; - background: rgb(249,191,74); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(249,191,74,1) 0%, rgba(249,181,9,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(249,191,74,1)), color-stop(100%,rgba(249,181,9,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* IE10+ */ - background: linear-gradient(top, rgba(249,191,74,1) 0%,rgba(249,181,9,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f9bf4a', endColorstr='#f9b509',GradientType=0 ); /* IE6-9 */ - } - -/*--------------------------------- - BLUE ------------------------------------*/ -button.blue, -a.btn.blue, -a.button.blue, -input[type=submit].blue, -input[type=reset].blue, -input[type=button].blue{ -text-shadow:0 -1px 0 #1D6DC1; -color:#fff; -border:1px solid #1D6DC1; -background: rgb(122,188,255); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(122,188,255,1) 0%, rgba(96,171,248,1) 44%, rgba(64,150,238,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(122,188,255,1)), color-stop(44%,rgba(96,171,248,1)), color-stop(100%,rgba(64,150,238,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Opera11.10+ */ -background: -ms-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* IE10+ */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 ); /* IE6-9 */ -background: linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* W3C */ -} - - button.blue:hover, - a.btn.blue:hover, - a.button.blue:hover{ - text-shadow:0 1px 0 #1D6DC1; - border:1px solid #1D6DC1; - background: rgb(155,205,255); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(155,205,255,1) 0%, rgba(134,192,250,1) 44%, rgba(110,176,242,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(155,205,255,1)), color-stop(44%,rgba(134,192,250,1)), color-stop(100%,rgba(110,176,242,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* IE10+ */ - background: linear-gradient(top, rgba(155,205,255,1) 0%,rgba(134,192,250,1) 44%,rgba(110,176,242,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9bcdff', endColorstr='#6eb0f2',GradientType=0 ); /* IE6-9 */ - } - -/*--------------------------------- - PINK ------------------------------------*/ -button.pink, -a.btn.pink, -a.button.pink, -input[type=submit].pink, -input[type=reset].pink, -input[type=button].pink{ -text-shadow:0 -1px 0 #EF0251; -color:#fff; -border:1px solid #EF0251; -background: rgb(255,93,177); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(255,93,177,1) 0%, rgba(239,1,124,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,93,177,1)), color-stop(100%,rgba(239,1,124,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* IE10+ */ -background: linear-gradient(top, rgba(255,93,177,1) 0%,rgba(239,1,124,1) 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff5db1', endColorstr='#ef017c',GradientType=0 ); /* IE6-9 */ -} - - button.pink:hover, - a.btn.pink:hover, - a.button.pink:hover{ - text-shadow:0 1px 0 #EF0251; - border:1px solid #EF0251; - background: rgb(255,169,213); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(255,169,213,1) 0%, rgba(254,112,185,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,169,213,1)), color-stop(100%,rgba(254,112,185,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* IE10+ */ - background: linear-gradient(top, rgba(255,169,213,1) 0%,rgba(254,112,185,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa9d5', endColorstr='#fe70b9',GradientType=0 ); /* IE6-9 */ - } - -/*--------------------------------- - GREEN ------------------------------------*/ -button.green, -a.btn.green, -a.button.green, -input[type=submit].green, -input[type=reset].green, -input[type=button].green{ -text-shadow:0 -1px 0 #669E00; -color:#fff; -border:1px solid #669E00; -background: rgb(143,196,0); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(143,196,0,1) 0%, rgba(107,165,0,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(143,196,0,1)), color-stop(100%,rgba(107,165,0,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* IE10+ */ -background: linear-gradient(top, rgba(143,196,0,1) 0%,rgba(107,165,0,1) 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fc400', endColorstr='#6ba500',GradientType=0 ); /* IE6-9 */ -} - - button.green:hover, - a.btn.green:hover, - a.button.green:hover{ - text-shadow:0 1px 0 #669E00; - border:1px solid #669E00; - background: rgb(198,226,120); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(198,226,120,1) 0%, rgba(167,211,44,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(198,226,120,1)), color-stop(100%,rgba(167,211,44,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* IE10+ */ - background: linear-gradient(top, rgba(198,226,120,1) 0%,rgba(167,211,44,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c6e278', endColorstr='#a7d32c',GradientType=0 ); /* IE6-9 */ - } - -/*--------------------------------- - RED ------------------------------------*/ -button.red, -a.btn.red, -a.button.red, -input[type=submit].red, -input[type=reset].red, -input[type=button].red{ -text-shadow:0 -1px 0 #B21203; -color:#fff; -border:1px solid #B21203; -background: rgb(229,60,22); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(229,60,22,1) 0%, rgba(207,4,4,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,60,22,1)), color-stop(100%,rgba(207,4,4,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* IE10+ */ -background: linear-gradient(top, rgba(229,60,22,1) 0%,rgba(207,4,4,1) 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e53c16', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */ -} - - button.red:hover, - a.btn.red:hover, - a.button.red:hover{ - text-shadow:0 1px 0 #B21203; - border:1px solid #B21203; - background: rgb(238,106,76); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(238,106,76,1) 0%, rgba(251,33,33,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(238,106,76,1)), color-stop(100%,rgba(251,33,33,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* IE10+ */ - background: linear-gradient(top, rgba(238,106,76,1) 0%,rgba(251,33,33,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee6a4c', endColorstr='#fb2121',GradientType=0 ); /* IE6-9 */ - } \ No newline at end of file diff --git a/frontend/templates/default/static/css/kickstart-forms.css b/frontend/templates/default/static/css/kickstart-forms.css deleted file mode 100644 index 02a96d3..0000000 --- a/frontend/templates/default/static/css/kickstart-forms.css +++ /dev/null @@ -1,451 +0,0 @@ -/*--------------------------------- - FORMS ------------------------------------*/ -form{ -padding:0; -margin:0; -} - -fieldset{ -margin:30px 0 20px 0; -padding:5px 15px 15px 15px; -border:1px solid #ccc; -background:#f5f5f5; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -position: relative; -top:0; -left:0; -} - - legend{ - -moz-border-radius:5px; - -webkit-border-radius:5px; - border-radius:5px; - border:1px solid #ccc; - background:#f5f5f5; - padding:2px 10px; - margin:0 0 0 0; - display:block; - position: relative; - top:0; - left:0; - } - - /*IE ONLY - I know, this is a stop gap*/ - .msie fieldset{padding-top:25px;} - .msie legend{position:absolute;top:-0.7em;left:10px;} - -label{ -display:inline-block; -*display:inline; -vertical-align: middle; -margin:0; -padding:0; -position:relative; -top:0; -left:0; -zoom:1; --moz-box-sizing: border-box; --webkit-box-sizing: border-box; --ms-box-sizing: border-box; -box-sizing: border-box; -} - - label.inline{ - display:inline; - margin:0; - } - - label span{ - color:#999; - font-size:0.9em; - } - - label span.right{ - position:absolute; - bottom:0; - right:0; - text-align:right; - display:inline-block; - *display:inline; - } - - label.disabled{ - color:#ccc; - } - -input{ -display:inline-block; -*display:inline; -vertical-align: middle; -width:auto; -zoom:1; -margin:0; -border:1px solid #ccc; -font-size:1em; -padding:5px 0; -text-indent: 5px; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -background:#fff; --moz-box-shadow:inset 0px 0px 6px #ccc; --webkit-box-shadow:inset 0px 1px 6px #ccc; -box-shadow:inset 0px 1px 6px #ccc; --moz-box-sizing: border-box; --webkit-box-sizing: border-box; --ms-box-sizing: border-box; -box-sizing: border-box; -} - - input::-webkit-input-placeholder, - input:-moz-placeholder, - .placeholder{ - color:#bbb; - } - - input::-moz-focus-inner {border:0;} - - input[disabled="disabled"], input.disabled{ - color:#999; - background:#f5f5f5; - -moz-box-shadow:inset 0px 0px 2px #ddd; - -webkit-box-shadow:inset 0px 1px 2px #ddd; - box-shadow:inset 0px 1px 2px #ddd; - } - - /* FOCUS STATES */ - input[type="text"]:focus, - textarea:focus, - button:focus, - a.button:focus, - select:focus, - input[type="file"]:focus, - input[type="password"]:focus, - .rte-editor:focus, - textarea.rte:focus{ - -webkit-box-shadow: 0 0 7px #6DB9FF; - -moz-box-shadow : 0 0 7px #6DB9FF; - -o-box-shadow : 0 0 7px #6DB9FF; - box-shadow : 0 0 7px #6DB9FF; - border: 1px solid #50B1FE; - outline: none; - } - - /* TRANSITION */ - input[type="text"], - textarea, - button, - a.button, - a, - input[type="file"]{ - transition: box-shadow 0.5s, border 0.5s, background 0.5s; - -moz-transition: -moz-box-shadow 0.5s, border 0.5s, background 0.5s; - -webkit-transition: -webkit-box-shadow 0.5s, border 0.5s, background 0.5s; - -o-transition: -o-box-shadow 0.5s, border 0.5s, background 0.5s; - } - -input.checkbox, -input[type="checkbox"]{ -display:inline; -width:auto; -margin:0; -padding:0; -border:0; -background:none; -vertical-align:center; -*vertical-align: top; -} - -input.radio, -input[type="radio"]{ -display:inline; -width:auto; -margin:0; -padding:0; -border:0; -background:none; -vertical-align:center; -*vertical-align: top; -} - - input[type="radio"]:focus, - input[ type="checkbox"]:focus{ - -webkit-box-shadow: 0 0 5px #6DB9FF; - -moz-box-shadow : 0 0 5px #6DB9FF; - -o-box-shadow : 0 0 5px #6DB9FF; - box-shadow : 0 0 5px #6DB9FF; - outline-color: #6DB9FF; - } - -input.file, -input[type="file"]{ -font-size:0.8em; --moz-box-shadow:none; --webkit-box-shadow:none; -box-shadow:none; -} - -select{ -display:inline; -width:auto; -margin:0; -line-height:100%; -padding:3px; -vertical-align: middle; -} - -textarea{ -width:auto; -height:200px; -margin:0; -border:1px solid #ccc; -padding:5px; -vertical-align: middle; -font-family:inherit; -font-size:0.9em; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; --moz-box-shadow:inset 0px 0px 6px #ccc; --webkit-box-shadow:inset 0px 1px 6px #ccc; -box-shadow:inset 0px 1px 6px #ccc; --moz-box-sizing: border-box; --webkit-box-sizing: border-box; --ms-box-sizing: border-box; -box-sizing: border-box; -} - -/*--------------------------------- - RTE ------------------------------------*/ -.rte-wrap{ -width:100%; -position:relative; -top:0; -left:0; -margin:0 0 10px 0; -} - -.rte-toolbar{ -border:1px solid #ccc; -border-bottom:0; -background:#f5f5f5; -z-index:50; -position: relative; -top:0; -left:0; -} - - .rte-toolbar ul{ - margin:0; - padding:0; - display:inline; - float:left; - } - - .rte-toolbar li{ - list-style-type:none; - margin:0; - padding:0; - float:left; - display:block; - } - - .rte-toolbar li.html-toggle{ - position:absolute; - top:-16px; - right:-1px; - font-size:10px; - line-height:100%; - width:auto; - } - - .rte-toolbar li.html-toggle a{ - background:#efefef; - border:1px solid #ddd; - border-bottom:1px solid #ccc; - width:auto; - height:10px; - padding:2px; - } - - .rte-toolbar li a{ - display:block; - float:left; - padding:0; - /*border-right:1px solid #ddd; - border-left:1px solid #fff; - border-top:1px solid #fff;*/ - width:20px; - height:20px; - text-align:center; - text-decoration:none; - color:inherit; - color:#777; - text-shadow:0px 1px 0px #fff; - } - - a.rte-bold {background:url(img/rte/text_bold.png) no-repeat center center;} - a.rte-italic {background:url(img/rte/text_italic.png) no-repeat center center;} - a.rte-ul {background:url(img/rte/text_list_bullets.png) no-repeat center center;} - a.rte-ol {background:url(img/rte/text_list_numbers.png) no-repeat center center;} - a.rte-img {background:url(img/rte/picture_empty.png) no-repeat center center;} - a.rte-link {background:url(img/rte/link.png) no-repeat center center;} - a.rte-unlink {background:url(img/rte/link_break.png) no-repeat center center;} - a.rte-justifyleft {background:url(img/rte/text_align_left.png) no-repeat center center;} - a.rte-justifycenter {background:url(img/rte/text_align_center.png) no-repeat center center;} - a.rte-justifyright {background:url(img/rte/text_align_right.png) no-repeat center center;} - a.rte-sub {background:url(img/rte/text_subscript.png) no-repeat center center;} - a.rte-sup {background:url(img/rte/text_superscript.png) no-repeat center center;} - .rte-toolbar li a:hover{color:#333;background-color:#efefef;} - - /* show/hide tools */ - .rte-wrap .rte-toolbar li{display:none;} - .rte-wrap.editmode .rte-toolbar li{display:block;} - .rte-wrap .rte-toolbar li.html-toggle, - .rte-wrap.editmode .rte-toolbar li.html-toggle{display:block;} - - .rte-toolbar select.inline{ - float:left; - display:inline; - width:50px; - height:17px; - margin:1px 3px 0 1px; - bordeR:1px solid #ccc; - } - -textarea.rte, -.rte-editor{ -width:100%; -margin:0; -border:1px solid #ccc; -padding:5px; -overflow:auto; -vertical-align: middle; -font-family:inherit; -font-size:0.9em; --moz-border-radius-topleft:0px; --moz-border-radius-topright:0px; --webkit-border-top-left-radius:0px; --webkit-border-top-right-radius:0px; -border-top-left-radius:0px; -border-top-right-radius:0px; - --moz-border-radius-bottomleft:5px; --moz-border-radius-bottomright:5px; --webkit-border-bottom-left-radius: 5px; --webkit-border-bottom-right-radius: 5px; -border-bottom-left-radius: 5px; -border-bottom-right-radius: 5px; --moz-box-shadow:inset 0px 0px 6px #ccc; --webkit-box-shadow:inset 0px 1px 6px #ccc; -box-shadow:inset 0px 1px 6px #ccc; --moz-box-sizing: border-box; --webkit-box-sizing: border-box; --ms-box-sizing: border-box; -box-sizing: border-box; -z-index:40; -} - -textarea.rte{ -font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; -font-size:0.9em; -} - -.rte-editor ul li, -.rte-editor ol li{ -padding:0; -} - -/*--------------------------------- - COLUMN SIZES ------------------------------------*/ - -/* sizes */ -input.col_1, -input.col_2, -input.col_3, -input.col_4, -input.col_5, -input.col_6, -input.col_7, -input.col_8, -input.col_9, -input.col_10, -input.col_11, -input.col_12{float:none;display:inline-block;*display:inline;margin-bottom:0; -*margin-left: 0.5%;*margin-right: 0.5%;/* this is for IE 7 Only and is not a good fix - work needed here */ -} - -label.col_1, -label.col_2, -label.col_3, -label.col_4, -label.col_5, -label.col_6, -label.col_7, -label.col_8, -label.col_9, -label.col_10, -label.col_11, -label.col_12{float:none;display:inline-block;*display:inline;margin-bottom:0; -*margin-left: 0.5%;*margin-right: 0.5%;/* this is for IE 7 Only and is not a good fix - work needed here */ -} - -/*--------------------------------- - FORMS VERTICAL ------------------------------------*/ -form.vertical{ - -} - - form.vertical label{display:block;} - form.vertical input, - form.vertical select, - form.vertical textarea{width:100%;display:block;margin-bottom:10px;} - form.vertical .chzn-container{display:block;margin-bottom:10px;} - form.vertical .chzn-choices{display:block;margin-bottom:10px;} - - /* radios & checks */ - form.vertical input.checkbox, - form.vertical input[type="checkbox"], - form.vertical input.radio, - form.vertical input[type="radio"], - form.vertical label.inline{display:inline;width:auto;margin:0;} -/*--------------------------------- - FORM VALIDATION ------------------------------------*/ -label.error{color:red;} -input.error{border:1px solid red;} - -/*--------------------------------- - NOTICES ------------------------------------*/ -.notice{ -border:1px solid gold; -background:lightyellow; -padding:10px 20px 10px 10px; -margin:10px 0; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -color:#DEAE00; -line-height:120%; -vertical-align: center; -text-shadow:0px 1px rgba(255,255,255,0.5); -position:relative; -top:0; -left:0; -clear:both; -} - - .notice.warning{}/*default*/ - .notice.error{border:1px solid red;background:pink;color:red;} - .notice.success{border:1px solid green;background:lightgreen;color:green;} - .notice .icon{color:inherit;margin-right:10px;margin-bottom:-5px;*margin-top:-5px;} - .notice a.icon.close, - .notice a.icon.close:active, - .notice a.icon.close:visited{font-size:12px;position:absolute;top:5px;right:-5px;left:auto;color:inherit;} diff --git a/frontend/templates/default/static/css/kickstart-grid.css b/frontend/templates/default/static/css/kickstart-grid.css deleted file mode 100644 index dd4c340..0000000 --- a/frontend/templates/default/static/css/kickstart-grid.css +++ /dev/null @@ -1,85 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart-grids.css - - DO NOT EDIT THIS FILE unless you know what you are doing. -*/ -/*--------------------------------- - GRID/COLUMNS ------------------------------------ - tinyfluidgrid.com - & girlfriendnyc.com - with changes by 99Lime ------------------------------------*/ - /* - & Columns : 12 - & Gutter %: 20% - & MinWidth: 960px - & MaxWidth: 1080px - */ -.col_1 { width: 6.6666666666667%; } -.col_2 { width: 15%; } -.col_3 { width: 23.333333333333%; } -.col_4 { width: 31.666666666667%; } -.col_5 { width: 40%; } -.col_6 { width: 48.333333333333%; } -.col_7 { width: 56.666666666667%; } -.col_8 { width: 65%; } -.col_9 { width: 73.333333333333%; } -.col_10 { width: 81.666666666667%; } -.col_11 { width: 90%; } -.col_12 { width: 98.333333333333%; } - -.col_1, -.col_2, -.col_3, -.col_4, -.col_5, -.col_6, -.col_7, -.col_8, -.col_9, -.col_10, -.col_11, -.col_12 { -margin-left: 0.83333333333333%; -margin-right: 0.83333333333333%; -margin-top:8px; -margin-bottom:8px; -float: left; -display: block; -} - -.alpha{margin-left:0px;} -.omega{margin-right:0px;} - -.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0} -.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0} -* html .clearfix, *:first-child+html .clearfix{zoom:1} - -/* Viewable Grids - To view your grids, add the class .visible to any grid container. - This will add a background color so you can see the layout of your grids. -*/ -.col_1.visible, -.col_2.visible, -.col_3.visible, -.col_4.visible, -.col_5.visible, -.col_6.visible, -.col_7.visible, -.col_8.visible, -.col_9.visible, -.col_10.visible, -.col_11.visible, -.col_12.visible { -background:#efefef; -} - -/* Default .inner Padding - The inside of a column is automatically wrapped with div.inner by Javascript. - This allows for more flexible styling and layout without breaking your columns. -*/ -.column .inner{ - padding:10px; -} \ No newline at end of file diff --git a/frontend/templates/default/static/css/kickstart-icons.css b/frontend/templates/default/static/css/kickstart-icons.css deleted file mode 100644 index 8564c1c..0000000 --- a/frontend/templates/default/static/css/kickstart-icons.css +++ /dev/null @@ -1,67 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart-icons.css - - DO NOT EDIT THIS FILE unless you know what you are doing. - Edit/override icon styles in kickstart.css -*/ - -@font-face{ -font-family: 'IcoMoon'; -src: url('fonts/base/icomoon-webfont.eot'); -src: url('fonts/base/icomoon-webfont.eot?#iefix') format('embedded-opentype'), - url('fonts/base/icomoon-webfont.woff') format('woff'), - url('fonts/base/icomoon-webfont.ttf') format('truetype'), - url('fonts/base/icomoon-webfont.svg#IcoMoonBase') format('svg'); -} - -@font-face{ -font-family: 'IcoMoonSocial'; -src: url('fonts/social/icomoonsocial-webfont.eot'); -src: url('fonts/social/icomoonsocial-webfont.eot?#iefix') format('embedded-opentype'), - url('fonts/social/icomoonsocial-webfont.woff') format('woff'), - url('fonts/social/icomoonsocial-webfont.ttf') format('truetype'), - url('fonts/social/icomoonsocial-webfont.svg#IcoMoonSocial') format('svg'); -} - -.icon{ -height:0.8em; -width:0.8em; -display:inline-block; -font-size:21px; -color:inherit; -text-decoration:none; -vertical-align:middle; -text-align:center; -line-height:120%; -padding:0; -margin:0; -font-family: 'IcoMoon', arial, sans-serif; -position:relative; -top:-3px; -left:0; --webkit-font-smoothing: antialiased; -zoom:1; -display:none; -} - -.msie .icon{top:-1px;}/* IE ONLY - I know :P */ - -.icon span{position:relative;top:-49%;left:0.017em;color:inherit;display:inline-block;zoom:1;} -.icon.small{font-size:21px;} /* default */ -.icon.medium{font-size:31px;} -.icon.large{font-size:41px;} -.icon.x-large{font-size:61px;} -.icon.social{font-family: 'IcoMoonSocial', arial, sans-serif;} -.icon.social span{top:-23%;} - -/* colors (starting point) */ -.icon.gray{color:#999;} -.icon.darkgray{color:#666;} -.icon.black{color:#000;} -.icon.white{color:#fff;} -.icon.red{color:#CA2200;} -.icon.blue{color:#3EBDFF;} -.icon.green{color:#A7C210;} -.icon.pink{color:#E9236E;} - diff --git a/frontend/templates/default/static/css/kickstart-menus.css b/frontend/templates/default/static/css/kickstart-menus.css deleted file mode 100644 index 9d7a67a..0000000 --- a/frontend/templates/default/static/css/kickstart-menus.css +++ /dev/null @@ -1,122 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart-menus.css -*/ - -/*--------------------------------- - MENU LAYOUT - DO NOT EDIT This Section (unless you know what you are doing) ------------------------------------*/ -.menu{margin:0;padding:0;line-height:100%; -font-size:0; /* Kill white space gap between LI elements */ -position:relative;z-index:1000;} - - .menu:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0} - .menu li{margin:0;padding:0;list-style-type:none;display:inline-block;*display:inline;position:relative;zoom:1;line-height:inherit; - top:0;left:0;font-size:16px; /* fixed font-size to replace font-size:0 in parent .menu 1em/16px default */} - .menu li a{margin:0;padding:0;display:block;display:inline;display:inline-block;position:relative;zoom:1;line-height:100%;top:0;left:0;} - -/*--------------Sub Menus-------------------*/ - /*.menu li:hover > ul{display:block;}*/ - .menu ul{margin:0;padding:0;position: absolute;top:100%;left:0;display:none;min-width:150px;max-width:150%;*width:150px;} - .menu ul li{display:block;width:100%;} - .menu ul li a{display:block;} - .menu ul ul{top:0;left:100%;} - -/*--------------Dividers-------------------*/ - .menu ul li.divider{border-top:1px solid #ccc;} - .menu ul li.divider a{border-top:1px solid #fff;} - -/*--------------Arrows-------------------*/ - .menu li.has-menu a{padding-right:25px;} - .menu li.has-menu span.arrow{border-style:solid;border-width:5px; - display:block;position:absolute;top:50%;right:5px;font-size:0;line-height:0;height:0;width:0;} - .menu li li.has-menu span.arrow{margin-top:-4px;} - -/*--------------Vertical Menu Layout-------------------*/ -.menu.vertical{} - .menu.vertical li{display:block;} - .menu.vertical li a{display:block;} - .menu.vertical ul{top:0;left:100%;} - .menu.vertical li.has-menu span.arrow{margin-top:-4px;} - -/*--------------Vertical Right Menu Layout-------------------*/ -.menu.vertical.right{text-align:left;} - .menu.vertical.right ul{top:0;right:100%;left:auto;} - .menu.vertical.right li a{padding-left:25px;padding-right:20px;} - .menu.vertical.right li.has-menu span.arrow{right:auto;left:5px;margin-top:-4px;} - - -/*--------------------------------- - MENU STYLES - EDIT BELOW THIS LINE TO CUSTOMIZE ------------------------------------*/ -.menu{ -border:1px solid #ccc; -text-shadow:0px 1px 1px #fff; -background: #eee; /* Old browsers */ -background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(224,224,224,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(224,224,224,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* Opera11.10+ */ -background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* IE10+ */ -background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(224,224,224,1) 100%); /* W3C */ -z-index:600; -} - - .menu li{} - - .menu li a{ - padding:15px 20px; - text-decoration:none; - font-size:0.9em; - color: #777; - } - - .menu li.current>a, - .menu li.current>a:hover, - .menu li.current.hover>a{ - background: rgb(122,188,255); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(122,188,255,1) 0%, rgba(96,171,248,1) 44%, rgba(64,150,238,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(122,188,255,1)), color-stop(44%,rgba(96,171,248,1)), color-stop(100%,rgba(64,150,238,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, rgba(122,188,255,1) 0%,rgba(96,171,248,1) 44%,rgba(64,150,238,1) 100%); /* W3C */ - color:#fff; - text-shadow:0px -1px 0px rgba(0,0,0,0.2); - cursor: default; - } - - .menu li a:hover, - .menu li.hover>a{ - background:#f5f5f5; - } - - /* sub menus */ - .menu ul{ - background: #efefef; - border:1px solid #ccc; - } - - .menu ul li{} - .menu ul li a{} - - /* sub-sub menus */ - .menu ul ul{} - .menu ul ul li{} - .menu ul ul li a{} - - /* arrows */ - /* arrow down */ .menu li.has-menu span.arrow{border-color-top:#ccc;border-color:#ccc transparent transparent transparent;} - /* arrow left */ .menu li li.has-menu span.arrow, .menu.vertical li.has-menu span.arrow - {border-color-left:#ccc;border-color:transparent transparent transparent #ccc;} - /* arrow right */ .menu.vertical.right li.has-menu span.arrow{border-color-right:#ccc;border-color:transparent #ccc transparent transparent;} - - /* dividers */ .menu ul li.divider{border-top:1px solid #ccc;} - .menu ul li.divider a{border-top:1px solid #fff;} - - /* icons */ - .menu .icon{margin:-10px 7px -10px -5px;vertical-align: middle;} - .menu ul .icon{margin-left:-10px;} diff --git a/frontend/templates/default/static/css/kickstart.css b/frontend/templates/default/static/css/kickstart.css deleted file mode 100644 index 35da369..0000000 --- a/frontend/templates/default/static/css/kickstart.css +++ /dev/null @@ -1,608 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart.css - - Don't edit the file if you want HTML KickStart to be upgradeable. - Instead, copy any CSS selectors you want to modify to your style.css file. - - // Colors - blue: #4D99E0; -*/ -/*--------------------------------- - IMPORTS ------------------------------------*/ -@import url(kickstart-buttons.css); -@import url(kickstart-forms.css); -@import url(kickstart-menus.css); -@import url(kickstart-grid.css); -@import url(kickstart-icons.css); -@import url(jquery.fancybox-1.3.4.css); -@import url(prettify.css); -@import url(chosen.css); -@import url(tiptip.css); - -/*--------------------------------- - HTML ELEMENTS ------------------------------------*/ -a{color:#4D99E0;outline:0;} -a:active{color:inherit;} -a:visited{} -a:hover{} -a img{border:0;} -strong,b{color:#000;background:lightyellow;position:relative;top:0;left:0;padding:2px 5px;} -strike{} -em,i{} -.hide{display:none;} -.show{display:block;} - -/*--------------------------------- - UTILITY ------------------------------------*/ -.center{text-align:center;} -.left{text-align:left;} -.right{text-align:right;} - -/*--------------------------------- - HR ------------------------------------*/ -hr{clear:both;border-bottom:0;border-top:1px dotted #ccc;border-right:0;border-left:0;margin:30px 0;min-height: 0px;height:1px;} -hr.alt1{border-style: solid;} -hr.alt2{border-style: dashed;} - -/*--------------------------------- - HTML5 ELEMENTS (shim) ------------------------------------*/ -article,aside,details,figcaption,figure, -footer,header,hgroup,menu,nav,section { -display:block; -} - -/*--------------------------------- - HEADINGS ------------------------------------*/ -h1,h2,h3,h4,h5,h6{ -font-weight:bold; -line-height:140%; -} - -h1{ -font-size:3em; -margin:10px 0 10px 0; -} - -h2{ -font-size:2.5em; -margin:10px 0 10px 0; -} - -h3{ -font-size:2em; -margin:10px 0 10px 0; -line-height:130%; -} - -h4{ -font-size:1.5em; -margin:10px 0 10px 0; -} - -h5{ -font-size:1.2em; -margin:10px 0 10px 0; -} - -h6{ -font-size:1em; -margin:10px 0 5px 0; -} - -/*--------------------------------- - PARAGRAPHS ------------------------------------*/ -p{ -line-height:150%; -color:#666; -margin:10px 0; -} - -/*--------------------------------- - BLOCKQUOTES ------------------------------------*/ -blockquote{ -font-size:1.5em; -font-style: italic; -color:#888; -margin:30px 30px 30px 0; -padding:0 0 0 20px; -border-left:1px solid #ccc; -} - - blockquote span{font-size:0.7em;color:#000;display:block;} - blockquote.small{font-size:1.2em;} - -/*--------------------------------- - LISTS ------------------------------------*/ -ul, ol{ -padding:0; -margin:0 0 20px 25px; -} - - li{ - padding:5px 0; - margin:0; - } - -ul.checks{ -padding:0; -margin:0 0 20px 0; -} - - ul.checks li{ - list-style-type:none; - margin:0; - background:url(img/icon-check.png) no-repeat 5px 0.5em; - padding-left:30px; - } - -ul.alt{ -padding:0; -margin:0 0 20px 0; -} - - ul.alt li{ - list-style-type:none; - border-top:1px dotted #ccc; - border-bottom:1px dotted #ccc; - margin:0 0 -1px 0; - background:url(img/icon-arrow-right.png) no-repeat 5px 0.7em; - padding-left:20px; - } - -/*--------------------------------- - PRE & CODE ------------------------------------*/ -code{ -font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; -font-size:0.9em; -border:1px solid lightblue; -padding:3px; --moz-border-radius:3px; --webkit-border-radius:3px; -border-radius:3px; -color:#518BAB; -} - -pre{ -white-space: pre-wrap; /* css-3 */ -white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ -white-space: -pre-wrap; /* Opera 4-6 */ -white-space: -o-pre-wrap; /* Opera 7 */ -word-wrap: break-word; /* Internet Explorer 5.5+ */ -margin: 0px 0px 0px 0px; -padding:5px 5px 3px 5px; -background:#fff; --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -box-shadow:inset 0px 0px 7px rgba(0,0,0,0.2); -padding:10px; -margin:0 0 20px 0; -border:1px solid #ddd; -font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; -font-size:0.9em; -} - -/*--------------------------------- - TABLES ------------------------------------*/ -table{width:100%;margin:0 0 10px 0;text-align:left;border-collapse: collapse;} - thead, tbody{margin:0;padding:0;} - th, td{padding:7px 10px;font-size:0.9em;border-bottom:1px dotted #ddd;text-align:left;} - thead th{font-size:0.9em;padding:3px 10px;border-bottom:1px solid #ddd;} - tbody tr.last th, - tbody tr.last td{border-bottom:0;} - -/* striped */ -table.striped{} - table.striped tr.alt{background:#f5f5f5;} - table.striped thead th{background:#fff;} - table.striped tbody th{background:#f5f5f5;text-align:right;padding-right:15px;border-right:1px dotted #e5e5e5;} - table.striped tbody tr.alt th{background:#efefef;} - -/* tight */ -table.tight{} - table.tight th, .tight td{padding:2px 10px;} - -/* sortable */ -table.sortable{border:1px solid #ddd;} - table.sortable thead th{cursor: pointer;position:relative;top:0;left:0;border-right:1px solid #ddd;} - table.sortable thead th:hover{background:#efefef;} - table.sortable span.arrow{border-style:solid;border-width:5px; - display:block;position:absolute;top:50%;right:5px;font-size:0; - border-color:#ccc transparent transparent transparent; - line-height:0;height:0;width:0;margin-top:-2px;} - table.sortable span.arrow.up{border-color:transparent transparent #ccc transparent;margin-top:-7px;} - -/*--------------------------------- - TABS ------------------------------------*/ -ul.tabs{ -margin:10px 0 -1px 0; -padding:0; -width:100%; -border-bottom:1px solid #e5e5e5; -float:left; -} - - ul.tabs.left{text-align:left;} - ul.tabs.center{text-align:center;} - ul.tabs.right{text-align:right;} - - ul.tabs li{ - list-style-type:none; - margin:0 2px 0 0; - padding:0; - display:inline-block; - *display:inline;/*IE ONLY*/ - position:relative; - top:0; - left:0; - *top:1px;/*IE 7 ONLY*/ - zoom:1; - } - - ul.tabs li a{ - text-decoration:none; - color:#666; - display:inline-block; - padding:9px 15px; - position: relative; - top:0; - left:0; - line-height:100%; - background:#f5f5f5; - box-shadow: inset 0px -3px 3px rgba(0,0,0,0.03); - border:1px solid #e5e5e5; - border-bottom:0; - font-size:0.9em; - zoom:1; - } - - ul.tabs li a:hover{ - background:#fff; - } - - ul.tabs li.current a{ - position:relative; - top:1px; - left:0; - background:#fff; - box-shadow: none; - color:#222; - } - - .tab-content{ - border:1px solid #efefef; - border-left:1px solid #e5e5e5; - clear:both; - padding:20px; - margin:0 0 40px 0; - } - - /* w/icon */ - ul.tabs .icon{ - margin:-3px 7px -3px -5px; - position:relative; - top:-2px; - left:0; - } - -/*--------------------------------- - BREADCRUMBS ------------------------------------*/ -ul.breadcrumbs{ -margin:10px 0; -padding:0; -line-height:0%; -font-size:0; -} - - ul.breadcrumbs li{ - list-style-type:none; - margin:0; - padding:0; - display:inline-block; - *display:inline; /* IE ONLY*/ - position:relative; - zoom:1; - line-height:100%; - font-size:14px; /* 0.8em default to override font-size:0; on parent*/ - } - - ul.breadcrumbs li a{ - display:inline-block; - *display:inline; /* IE ONLY*/ - position:relative; - padding:5px 15px 5px 5px; - font-size:0.9em; - zoom:1; - margin:0; - background:url(img/icon-arrow-right.png) no-repeat right center; - } - - ul.breadcrumbs li.last a{ - color:#333; - cursor: default; - text-decoration:none; - background:none; - } - - ul.breadcrumbs li.last a:hover{ - text-decoration:none; - } - - /* Alternative Style */ - ul.breadcrumbs.alt1{ - border:1px solid transparent; - font-size:0; - } - - ul.breadcrumbs.alt1 li a{ - padding:10px 25px 10px 15px; - background:url(img/breadcrumbs-bg.gif) no-repeat right center; - text-decoration:none; - border-top:1px solid #efefef; - border-bottom:1px solid #efefef; - font-size:12px; - } - - ul.breadcrumbs.alt1 a:hover{ - text-decoration:underline; - } - - ul.breadcrumbs.alt1 li.first a{ - border-left:1px solid #efefef; - } - - ul.breadcrumbs.alt1 li.last a{ - background:none; - border-right:1px solid #efefef; - } - -/*--------------------------------- - IMAGES ------------------------------------*/ -/* - for img .style1, .style2, .style3 - view js/kickstart.js Image Style Helpers -*/ -img{ -margin:0; -padding:0; -display:inline-block; -position:relative; -zoom:1; -} - - img.align-left{float:left;margin:0 10px 5px 0;} - img.align-right{float:right;margin:0 0 5px 10px;} - img.full-width{clear:both;display:block;width:100%;height:auto;margin:0 0 10px 0;} - - span.img-wrap{ - display:inline-block; - position: relative; - top:0; - left:0; - zoom: 1; - } - - span.img-inner{ - display:block; - position:absolute; - top:0; - left:0; - width: 100%; - height:100%; - } - - span.img-wrap img{ - display:block; - padding:0; - margin:0; - } - - img.style1{/* DON'T Style This */} - - .img-wrap.style1{ - border:1px solid #ddd; - padding:3px; - background-color:#fff; - margin-left:-3px; - margin-top:-3px; - margin-bottom:-3px; - } - - img.style2{/* DON'T Style This */} - - .img-wrap.style2{ - -moz-border-radius:10px; - -webkit-border-radius:10px; - border-radius:10px; - overflow: hidden; - } - - img.style3{/* DON'T Style This */} - - .img-wrap.style3{ - margin-left:-3px; - margin-top:-3px; - margin-bottom:-3px; - border:3px solid #efefef; - -moz-border-radius:10px; - -webkit-border-radius:10px; - border-radius:10px; - overflow: hidden; - -moz-box-shadow: inset 0px 0px 10px rgba(0,0,0,0.5); - -webkit-box-shadow: inset 0px 0px 10px rgba(0,0,0,0.5); - box-shadow: inset 0px 0px 10px rgba(0,0,0,0.5); - } - - div.caption{ - background:#f5f5f5; - border:1px solid #ddd; - padding:3px; - } - - div.caption img{ - display:block; - padding:0; - margin:0; - } - - div.caption span{ - display:block; - margin-top:3px; - font-size:0.8em; - color:#666; - padding:0px 5px; - } - - .gallery{} - - .gallery a{ - display:inline-block; - position:relative; - border:1px solid #ddd; - background:#fff; - padding:3px; - margin:5px; - -moz-border-radius:5px; - -webkit-border-radius:5px; - border-radius:5px; - } - - .gallery a img{ - display: block; - position: relative; - margin:0; - padding:0; - } - -/*--------------------------------- - SLIDESHOW2 ------------------------------------*/ -.slideshow-wrap{ -clear:both; -margin:0; -padding:0; -position:relative; -top:0; -left:0; -overflow:hidden; -clear:both; -} - - .slideshow-inner{ - overflow:hidden; - clear:both; - position:relative; - top:0; - left:0; - border:1px solid #efefef; - } - - .slideshow{ - clear:both; - margin:0; - padding:0; - width:auto; - height:auto; - overflow:hidden; - } - - .slideshow li{ - list-style-type:none; - margin:0; - padding:0; - float:left; - display:block; - } - - .slideshow img{vertical-align: bottom;} - - .slideshow-buttons{ - text-align:right; - margin:3px 0 0 0; - padding:0; - } - - .slideshow-buttons li{display:inline;position:relative;top:0;left:0;line-height:100%;margin:0;padding:0;} - .slideshow-buttons li.current a{background:#ddd;} - - .slideshow-buttons a{ - display:inline; - position:relative; - top:0; - left:0; - padding:1px 3px; - margin:0 1px; - line-height:100%; - border:1px solid #efefef; - text-decoration:none; - font-size:0.8em; - } - -/*--------------------------------- - MEDIA ------------------------------------*/ -.video-placeholder, -.video-placeholder a{ -position:relative; -top:0; -left:0; -display:inline-block; -*display:inline; -zoom:1; -margin:0; -padding:0; -text-decoration:none; -} - .video-placeholder img{vertical-align: bottom;} - .video-placeholder .icon{ - position:absolute; - top:50%; - left:50%; - margin:-24px 0 0 -24px; - } - - .video-placeholder:hover .icon{ - text-shadow:0px 0px 10px rgba(255,255,255,0.8), 0px 2px 2px rgba(0,0,0,1); - cursor: pointer; - } - -iframe.map-placeholder{ -border:1px solid #ccc; -margin:0; -padding:0; -overflow: hidden; -box-sizing: border-box; -} - -.calendar{ -text-align:center; -text-shadow:0px 1px 0px #fff; -color:#666; -border:1px solid #ddd; -background:#f5f5f5; -} - .calendar h4#current-month{font-size:1em;margin:0;padding:2% 0;border-top:1px solid #fff;line-height:100%;font-weight:normal;} - .calendar table{margin:0;border-collapse: collapse;border:0;} - .calendar th, .calendar td{text-align:center;padding:0;font-weight: normal;line-height:100%;border:0;} - .calendar th{width:14.2857%;padding:2% 0;border-bottom:1px solid #ddd;} - .calendar td{background:#fff;padding:3% 0;} - .calendar th.weekday{color:#999;font-size:0.7em;text-transform: uppercase;} - .calendar td.other-month{color:#ccc;} - .calendar td.current-month{background:#fff;color:#777;} - - diff --git a/frontend/templates/default/static/css/prettify.css b/frontend/templates/default/static/css/prettify.css deleted file mode 100644 index c4941e9..0000000 --- a/frontend/templates/default/static/css/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/frontend/templates/default/static/css/tiptip.css b/frontend/templates/default/static/css/tiptip.css deleted file mode 100644 index fb82c19..0000000 --- a/frontend/templates/default/static/css/tiptip.css +++ /dev/null @@ -1,99 +0,0 @@ -/* - TipTip CSS - Version 1.2 - http://code.drewwilson.com/entry/tiptip-jquery-plugin -*/ - -#tiptip_holder { display: none; position: absolute; top: 0; left: 0; z-index: 99999; } -#tiptip_holder.tip_top { padding-bottom: 5px; } -#tiptip_holder.tip_bottom { padding-top: 5px; } -#tiptip_holder.tip_right { padding-left: 5px; } -#tiptip_holder.tip_left { padding-right: 5px; } - -#tiptip_content { -font-size: 11px; -color: #fff; -text-shadow: 0 0 2px #000; -padding: 4px 8px; -border: 1px solid rgba(255,255,255,0.25); -background:#212121; -background-color: rgba(25,25,25,0.92); -background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000)); -border-radius: 3px; --webkit-border-radius: 3px; --moz-border-radius: 3px; -box-shadow: 0 0 3px #555; --webkit-box-shadow: 0 0 3px #555; --moz-box-shadow: 0 0 3px #555; -*background:#212121; -} - -#tiptip_arrow, #tiptip_arrow_inner { -position: absolute; -border-color: transparent; -border-style: solid; -border-width: 6px; -height: 0; -width: 0; -} - -#tiptip_holder.tip_top #tiptip_arrow { -border-top-color: #fff; -border-top-color: rgba(255,255,255,0.35); -} - -#tiptip_holder.tip_bottom #tiptip_arrow { -border-bottom-color: #fff; -border-bottom-color: rgba(255,255,255,0.35); -} - -#tiptip_holder.tip_right #tiptip_arrow { -border-right-color: #fff; -border-right-color: rgba(255,255,255,0.35); -} - -#tiptip_holder.tip_left #tiptip_arrow { -border-left-color: #fff; -border-left-color: rgba(255,255,255,0.35); -} - -#tiptip_holder.tip_top #tiptip_arrow_inner { -margin-top: -7px; -margin-left: -6px; -border-top-color: rgb(25,25,25); -border-top-color: rgba(25,25,25,0.92); -} - -#tiptip_holder.tip_bottom #tiptip_arrow_inner { -margin-top: -5px; -margin-left: -6px; -border-bottom-color: rgb(25,25,25); -border-bottom-color: rgba(25,25,25,0.92); -} - -#tiptip_holder.tip_right #tiptip_arrow_inner { -margin-top: -6px; -margin-left: -5px; -border-right-color: rgb(25,25,25); -border-right-color: rgba(25,25,25,0.92); -} - -#tiptip_holder.tip_left #tiptip_arrow_inner { -margin-top: -6px; -margin-left: -7px; -border-left-color: rgb(25,25,25); -border-left-color: rgba(25,25,25,0.92); -} - -/* Webkit Hacks */ -@media screen and (-webkit-min-device-pixel-ratio:0) { - #tiptip_content { - padding: 4px 8px 5px 8px; - background-color: rgba(45,45,45,0.88); - } - #tiptip_holder.tip_bottom #tiptip_arrow_inner { - border-bottom-color: rgba(45,45,45,0.88); - } - #tiptip_holder.tip_top #tiptip_arrow_inner { - border-top-color: rgba(20,20,20,0.92); - } -} \ No newline at end of file diff --git a/frontend/templates/default/static/images/button/restart.png b/frontend/templates/default/static/images/button/restart.png deleted file mode 100644 index 03ffe2d..0000000 Binary files a/frontend/templates/default/static/images/button/restart.png and /dev/null differ diff --git a/frontend/templates/default/static/images/button/start.png b/frontend/templates/default/static/images/button/start.png deleted file mode 100644 index b631414..0000000 Binary files a/frontend/templates/default/static/images/button/start.png and /dev/null differ diff --git a/frontend/templates/default/static/images/button/stop.png b/frontend/templates/default/static/images/button/stop.png deleted file mode 100644 index 8ace279..0000000 Binary files a/frontend/templates/default/static/images/button/stop.png and /dev/null differ diff --git a/frontend/templates/default/static/images/error/error.png b/frontend/templates/default/static/images/error/error.png deleted file mode 100644 index 296415e..0000000 Binary files a/frontend/templates/default/static/images/error/error.png and /dev/null differ diff --git a/frontend/templates/default/static/images/error/info.png b/frontend/templates/default/static/images/error/info.png deleted file mode 100644 index 83de654..0000000 Binary files a/frontend/templates/default/static/images/error/info.png and /dev/null differ diff --git a/frontend/templates/default/static/images/error/success.png b/frontend/templates/default/static/images/error/success.png deleted file mode 100644 index 743ef89..0000000 Binary files a/frontend/templates/default/static/images/error/success.png and /dev/null differ diff --git a/frontend/templates/default/static/images/error/warning.png b/frontend/templates/default/static/images/error/warning.png deleted file mode 100644 index 1c6b8eb..0000000 Binary files a/frontend/templates/default/static/images/error/warning.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/alerts.png b/frontend/templates/default/static/images/menu/alerts.png deleted file mode 100644 index 1e8e454..0000000 Binary files a/frontend/templates/default/static/images/menu/alerts.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/api.png b/frontend/templates/default/static/images/menu/api.png deleted file mode 100644 index 61fcf18..0000000 Binary files a/frontend/templates/default/static/images/menu/api.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/backup.png b/frontend/templates/default/static/images/menu/backup.png deleted file mode 100644 index 67fd357..0000000 Binary files a/frontend/templates/default/static/images/menu/backup.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/console.png b/frontend/templates/default/static/images/menu/console.png deleted file mode 100644 index db1fb79..0000000 Binary files a/frontend/templates/default/static/images/menu/console.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/ip.png b/frontend/templates/default/static/images/menu/ip.png deleted file mode 100644 index 2fbdc5f..0000000 Binary files a/frontend/templates/default/static/images/menu/ip.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/key.png b/frontend/templates/default/static/images/menu/key.png deleted file mode 100644 index 99abe67..0000000 Binary files a/frontend/templates/default/static/images/menu/key.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/lock.png b/frontend/templates/default/static/images/menu/lock.png deleted file mode 100644 index 5781586..0000000 Binary files a/frontend/templates/default/static/images/menu/lock.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/overview.png b/frontend/templates/default/static/images/menu/overview.png deleted file mode 100644 index 293bf1d..0000000 Binary files a/frontend/templates/default/static/images/menu/overview.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/reinstall.png b/frontend/templates/default/static/images/menu/reinstall.png deleted file mode 100644 index 97335a6..0000000 Binary files a/frontend/templates/default/static/images/menu/reinstall.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/statistics.png b/frontend/templates/default/static/images/menu/statistics.png deleted file mode 100644 index fe13c4a..0000000 Binary files a/frontend/templates/default/static/images/menu/statistics.png and /dev/null differ diff --git a/frontend/templates/default/static/images/menu/user.png b/frontend/templates/default/static/images/menu/user.png deleted file mode 100644 index b5226e8..0000000 Binary files a/frontend/templates/default/static/images/menu/user.png and /dev/null differ diff --git a/frontend/templates/default/static/images/misc/loading.gif b/frontend/templates/default/static/images/misc/loading.gif deleted file mode 100644 index ef371f1..0000000 Binary files a/frontend/templates/default/static/images/misc/loading.gif and /dev/null differ diff --git a/frontend/templates/default/static/images/misc/logo.png b/frontend/templates/default/static/images/misc/logo.png deleted file mode 100644 index c309d8e..0000000 Binary files a/frontend/templates/default/static/images/misc/logo.png and /dev/null differ diff --git a/frontend/templates/default/static/images/misc/wrench.png b/frontend/templates/default/static/images/misc/wrench.png deleted file mode 100644 index 52d7d6d..0000000 Binary files a/frontend/templates/default/static/images/misc/wrench.png and /dev/null differ diff --git a/frontend/templates/default/static/images/status/offline.png b/frontend/templates/default/static/images/status/offline.png deleted file mode 100644 index 236cb95..0000000 Binary files a/frontend/templates/default/static/images/status/offline.png and /dev/null differ diff --git a/frontend/templates/default/static/images/status/online.png b/frontend/templates/default/static/images/status/online.png deleted file mode 100644 index 8ef8c04..0000000 Binary files a/frontend/templates/default/static/images/status/online.png and /dev/null differ diff --git a/frontend/templates/default/static/images/status/suspended.png b/frontend/templates/default/static/images/status/suspended.png deleted file mode 100644 index be97c14..0000000 Binary files a/frontend/templates/default/static/images/status/suspended.png and /dev/null differ diff --git a/frontend/templates/default/static/images/status/unknown.png b/frontend/templates/default/static/images/status/unknown.png deleted file mode 100644 index c4c2508..0000000 Binary files a/frontend/templates/default/static/images/status/unknown.png and /dev/null differ diff --git a/frontend/templates/default/static/js/cvm.js b/frontend/templates/default/static/js/cvm.js deleted file mode 100644 index d88304c..0000000 --- a/frontend/templates/default/static/js/cvm.js +++ /dev/null @@ -1,72 +0,0 @@ -var command_running = false; - -$(function(){ - $('.clickable').click(function(event) - { - if($(this).data('url')) - { - url = $(this).data('url'); - - if(event.which == 1) - { - if($(this).hasClass('external')) - { - window.open(url); - } - else - { - window.location = url; - } - - event.stopPropagation(); - return false; - } - else if(event.which == 2) - { - window.open(url); - event.stopPropagation(); - return false; - } - } - }); - - - $('.button-loader').click(function(){ - if(command_running === false) - { - $('.button-loader').addClass('disabled').click(function(event){ - event.preventDefault(); - event.stopPropagation(); - return false; - }); - - $(this).children('.button-icon').addClass('running')[0].src = "/templates/default/static/images/misc/loading.gif"; - command_running = true; - } - }); - - $('.enabler').change(function(){ - var group = $(this).data("enable-group"); - - if($(this).is(':checked')) - { - $('.disabled').each(function(index, item){ - if($(item).data("disabled-group") == group) - { - $(item).children('input').removeAttr('disabled'); - $(item).removeClass('disabled'); - } - }); - } - else - { - $('form .field').each(function(index, item){ - if($(item).data("disabled-group") == group) - { - $(item).children('input').attr('disabled', 'disabled'); - $(item).addClass('disabled'); - } - }); - } - }) -}); diff --git a/frontend/templates/default/static/js/kickstart.js b/frontend/templates/default/static/js/kickstart.js deleted file mode 100644 index 6da726d..0000000 --- a/frontend/templates/default/static/js/kickstart.js +++ /dev/null @@ -1,527 +0,0 @@ -/* - 99Lime.com HTML KickStart by Joshua Gatcke - kickstart.js -*/ - -jQuery(document).ready(function($){ - - /*--------------------------------- - MENU Dropdowns - -----------------------------------*/ - $('ul.menu').each(function(){ - // find menu items with children. - $(this).find('li').has('ul').addClass('has-menu') - .append(' '); - }); - - $('ul.menu li').hover(function(){ - $(this).find('ul:first').stop(true, true).fadeIn('fast'); - $(this).addClass('hover'); - }, - function(){ - $(this).find('ul').stop(true, true).fadeOut('slow'); - $(this).removeClass('hover'); - }); - - - /*--------------------------------- - ScrollTo/LocalScroll - -----------------------------------*/ - $.localScroll({ - filter: ':not(.tabs>li>a)', - lazy: true, - hash: true - }); - - /*--------------------------------- - Slideshow - -----------------------------------*/ - // setup - $('ul.slideshow').wrap('
') - .each(function(){ - var wrap = $(this).parents('.slideshow-wrap'); - var inner = $(this).parents('.slideshow-inner'); - - // set height and width - var swidth = $(this).attr('width'); - var sheight = $(this).attr('height'); - if(swidth != undefined && sheight != undefined){wrap.width(swidth); inner.height(sheight);} - $(this).width('999em').attr('width','').attr('height',''); - - $(this).find('li:first').addClass('current'); - $(this).delay(2000).animate({alpha:1}, function(){ - KSslideshow($(this), null); - }); - - // add navigation buttons - var items = $(this).find('li'); - wrap.append('
    '); - items.each(function(index){ - wrap.find('.slideshow-buttons') - .append('
  • '+(index+1)+'
  • '); - }); - - // stop play button - wrap.find('.slideshow-buttons') - .append('
  • Stop
  • '); - wrap.find('.slideshow-stop a').click(function(e){ - e.preventDefault(); - if(!wrap.hasClass('paused')) { next = wrap.find('.slideshow li.current');} - else{ next = null; } - var slideshow = $(this).parents('.slideshow-wrap').find('ul.slideshow'); - KSslideshow(slideshow, next); - }); - - // button events - $('.slideshow-buttons li:first').addClass('current'); - wrap.find('.slideshow-buttons li').not('.slideshow-stop').find('a').click(function(e){ - e.preventDefault(); - var slideshow = wrap.find('ul.slideshow'); - var link = $(e.currentTarget).attr('rel'); - var next = slideshow.find('li').eq(link); - KSslideshow(slideshow, next); - }); - }); - - // run slideshow - function KSslideshow(slideshow, next){ - var wrap = slideshow.parents('.slideshow-wrap'); - var inner = slideshow.parents('.slideshow-inner'); - var current = slideshow.find('li.current'); - var nav = slideshow.parents('.slideshow-wrap').find('.slideshow-buttons li'); - var sstop = nav.filter('.slideshow-stop'); - - // next slide - if(next == null) { - next = current.next(); - if(next.length < 1) { next = slideshow.find('li:first'); } - wrap.removeClass('paused'); - sstop.find('a').html('Stop'); - }else{ - wrap.addClass('paused'); - sstop.find('a').html('Play'); - } - - // scroll - var scrollEffect = inner.scrollTo(next, 1000); - current.removeClass('current'); - next.addClass('current'); - nav.removeClass('current').eq(next.index()).addClass('current'); - slideshow.delay(3000).animate({alpha:1}, function(){ - if(wrap.hasClass('paused') == false){ KSslideshow(slideshow, null); } - }); - } - - /*--------------------------------- - HTML5 Placeholder Support - -----------------------------------*/ - $('input[placeholder], textarea[placeholder]').placeholder(); - - /*--------------------------------- - SELECT MENUS - CHOSEN - -----------------------------------*/ - $('select.fancy').chosen(); - - /*--------------------------------- - MEDIA - -----------------------------------*/ - // video placeholder - $('a.video-placeholder').each(function(){ - $(this).append(''); - }); - - // calendar - $('.calendar').each(function(){ - if($(this).attr('data-month')) { cMonth = $(this).attr('data-month'); } - if($(this).attr('data-year')) { cYear = $(this).attr('data-year'); } - $(this).calendarWidget({month:cMonth, year: cYear}); - }); - - /*--------------------------------- - Rich Text Editor - -----------------------------------*/ - $('.rte').each(function(index){ - var newID = $(this).attr('id')+index; - $(this).hide(); - $(this).wrap('
    '); - - // toolbar - var wrap = $(this).parents('.rte-wrap'); - var rhtml = wrap.find('textarea.rte'); - var toolbar = '
    \ -
      \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • \ -
    • HTML
    • \ -
    '; - - // editor - var editor = '
    '; - wrap.prepend(toolbar+editor); - wrap.find('.rte-editor').html(rhtml.val()); - }); - - // buttons - $('.rte-wrap .rte-toolbar a').live('click',function(e){ - e.preventDefault(); - var rte = $(this).parents('.rte-wrap'); - var toolbar = rte.find('.rte-toolbar'); - var editor = rte.find('.rte-editor'); - var rhtml = rte.find('textarea.rte'); - var bool = false; - var value = $(this).attr('data-value'); - var command = $(this).attr('data-command'); - var rprompt = $(this).attr('data-prompt'); - - if(rprompt){ - value = prompt(rprompt); - } - - // html toggle - if($(this).parent().hasClass('html-toggle')) { - if(rhtml.is(':hidden')) { rhtml.val(editor.html()); rte.removeClass('editmode'); } - else{ editor.html(rhtml.val()); rte.addClass('editmode'); } - editor.toggle(); - rhtml.toggle(); - } - - // do the action - document.execCommand(command, bool, value); - }); - - // select - $('.rte-wrap .rte-toolbar select').live('change', function(e){ - var bool = false; - var value = $(this).val(); - - // do the action - document.execCommand('formatblock', bool, value); - }); - - /*--------------------------------- - Fancybox Lightbox - -----------------------------------*/ - $('.gallery').each(function(i){ - $(this).find('a').attr('rel', 'gallery'+i) - .fancybox({ - overlayOpacity: 0.2, - overlayColor: '#000' - }); - }); - - // lightbox links - $('a.lightbox').fancybox({ - overlayOpacity: 0.2, - overlayColor: '#000' - }); - - /*--------------------------------- - Tabs - -----------------------------------*/ - // tab setup - $('.tab-content').addClass('clearfix').not(':first').hide(); - $('ul.tabs').each(function(){ - var current = $(this).find('li.current'); - if(current.length < 1) { $(this).find('li:first').addClass('current'); } - current = $(this).find('li.current a').attr('href'); - $(current).show(); - }); - - // tab click - $('ul.tabs a[href^="#"]').live('click', function(e){ - e.preventDefault(); - var tabs = $(this).parents('ul.tabs').find('li'); - var tab_next = $(this).attr('href'); - var tab_current = tabs.filter('.current').find('a').attr('href'); - $(tab_current).hide(); - tabs.removeClass('current'); - $(this).parent().addClass('current'); - $(tab_next).show(); - return false; - }); - - /*--------------------------------- - Image Style Helpers - -----------------------------------*/ - $('img.style1, img.style2, img.style3').each(function(){ - $(this).wrap(''); - $(this).parent('span') - .attr('class', 'img-wrap '+$(this).attr('class')) - .css('background-image','url('+$(this).attr('src')+')') - .css('background-position','center center') - .css('background-repeat','no-repeat') - .css('height', $(this).height()) - .css('width', $(this).width()); - $(this).attr('class','').hide(); - }); - - /*--------------------------------- - Image Caption - -----------------------------------*/ - $('img.caption').each(function(){ - $(this).wrap('
    '); - $(this).parents('div.caption') - .attr('class', 'caption '+$(this).attr('class')) - .css('width', $(this).width()+'px'); - if($(this).attr('title')){ - $(this).parents('div.caption') - .append(''+$(this).attr('title')+''); - } - }); - - /*--------------------------------- - Notice - -----------------------------------*/ - $('.notice a.close').live('click', function(e){ - e.preventDefault(); - var notice = $(this).parents('.notice'); - $(this).hide(); - notice.fadeOut('slow'); - }); - - /*--------------------------------- - ToolTip - TipTip - -----------------------------------*/ - - // Standard tooltip - $('.tooltip, .tooltip-top, .tooltip-bottom, .tooltip-right, .tooltip-left').each(function(){ - // variables - var tpos = 'top'; - var content = $(this).attr('title'); - var dataContent = $(this).attr('data-content'); - var keepAlive = false; - var action = 'hover'; - - // position - if($(this).hasClass('tooltip-top')) { tpos = 'top'; } - if($(this).hasClass('tooltip-right')) { tpos = 'right'; } - if($(this).hasClass('tooltip-bottom')) { tpos = 'bottom'; } - if($(this).hasClass('tooltip-left')) { tpos = 'left'; } - - // content - $('.tooltip-content').removeClass('hide').wrap('
    '); - if(dataContent) { content = $(dataContent).html(); keepAlive = true; } - - // action (hover or click) defaults to hover - if($(this).attr('data-action') == 'click') { action = 'click'; } - - // tooltip - $(this).attr('title','') - .tipTip({defaultPosition: tpos, content: content, keepAlive: keepAlive, activation: action, delay: 1000}); - }); - - /*--------------------------------- - Table Sort - -----------------------------------*/ - // init - var aAsc = []; - $('table.sortable').each(function(){ - $(this).find('thead th').each(function(index){$(this).attr('rel', index);}); - $(this).find('th,td').each(function(){$(this).attr('value', $(this).text());}); - }); - - // table click - $('table.sortable thead th').live('click', function(e){ - // update arrow icon - $(this).parents('table.sortable').find('span.arrow').remove(); - $(this).append(''); - - // sort direction - var nr = $(this).attr('rel'); - aAsc[nr] = aAsc[nr]=='asc'?'desc':'asc'; - if(aAsc[nr] == 'desc'){ $(this).find('span.arrow').addClass('up'); } - - // sort rows - var rows = $(this).parents('table.sortable').find('tbody tr'); - rows.tsort('td:eq('+nr+')',{order:aAsc[nr],attr:'value'}); - - // fix row classes - rows.removeClass('alt first last'); - var table = $(this).parents('table.sortable'); - table.find('tr:even').addClass('alt'); - table.find('tr:first').addClass('first'); - table.find('tr:last').addClass('last'); - }); - - /*--------------------------------- - Icons - -----------------------------------*/ - $('.icon').each(function(){ - $(this).append('') - .css('display', 'inline-block'); - }); - - /*--------------------------------- - CSS Helpers - -----------------------------------*/ - if($.browser.msie){ $('body').addClass('msie'); } - $('input[type=checkbox]').addClass('checkbox'); - $('input[type=radio]').addClass('radio'); - $('input[type=file]').addClass('file'); - $('[disabled=disabled]').addClass('disabled'); - $('table').find('tr:even').addClass('alt'); - $('table').find('tr:first-child').addClass('first'); - $('table').find('tr:last-child').addClass('last'); - $('ul').find('li:first-child').addClass('first'); - $('ul').find('li:last-child').addClass('last'); - $('hr').before('
     
    '); - $('[class*=col_]').not('input, label').addClass('column').each( - function (i,o){ - var div = document.createElement('div'); div.className="inner"; - while (o.firstChild) div.appendChild(o.firstChild); - o.appendChild(div); - } - ); - $('pre').addClass('prettyprint');prettyPrint(); - -}); - -/** - * jQuery.LocalScroll - Animated scrolling navigation, using anchors. - * Copyright © 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 3/11/2009 - * @author Ariel Flesler - * @version 1.2.7 - **/ -(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$(' ').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); - -/** - * jQuery.ScrollTo - Easy element scrolling using jQuery. - * Copyright © 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 5/25/2009 - * @author Ariel Flesler - * @version 1.4.2 - * - * http://flesler.blogspot.com/2007/10/jqueryscrollto.html - */ -;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); - -/* -* Placeholder plugin for jQuery -* --- -* Copyright 2010, Daniel Stocks (http://webcloud.se) -* Released under the MIT, BSD, and GPL Licenses. -*/ - -(function(b){function d(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}d.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}}, -hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=b(a[0].outerHTML.replace(/type=(['"])?password\1/gi, -"type=$1text$1"));this.fakePassword=c.val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()});b(a[0].form).submit(function(){c.remove();a.show()})}}};var e=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return e?this:this.each(function(){var a=b(this),c=new d(a);c.show(!0);a.focus(function(){c.hide()});a.blur(function(){c.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");c.show(!0)}), -a.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery); - -/* - * FancyBox - jQuery Plugin - * Simple and fancy lightbox alternative - * - * Examples and documentation at: http://fancybox.net - * - * Copyright (c) 2008 - 2010 Janis Skarnelis - * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. - * - * Version: 1.3.4 (11/11/2010) - * Requires: jQuery v1.3+ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("
    ")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('

    The requested content cannot be loaded.
    Please try again later.

    '); -F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)|| -c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick= -false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('
    ').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel", -function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='';P="";b.each(e.swf,function(x,H){C+='';P+=" "+x+'="'+H+'"'});C+='";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win== -"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('
    ');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor, -opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length? -d.titlePosition=="float"?'
    '+s+'
    ':'
    '+s+"
    ":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding}); -y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height== -i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents()); -f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode== -37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto"); -s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('').appendTo(j); -f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c); -j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type== -"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"), -10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)}; -b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k= -0,C=a.length;ko.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+ -1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h= -true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1; -b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5- -d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('
    '),t=b('
    '),u=b('
    '),f=b('
    '));D=b('
    ').append('
    ').appendTo(f); -D.append(j=b('
    '),E=b(''),n=b('
    '),z=b(''),A=b(''));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()}); -b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('').prependTo(D)}}}; -b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing", -easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); - -// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed -// Uncompressed source: https://github.com/aFarkas/html5shiv -(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c"+a.html+"")},a.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(d){if(!a(this).hasClass("chzn-done"))return new b(this,c)}):this}}),b=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return f(e,b),e.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},e.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},e.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("
    ",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('
      '):b.html(''+this.default_text+'
        '),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},e.prototype.register_observers=function(){var a=this;return this.container.mousedown(function(b){return a.container_mousedown(b)}),this.container.mouseup(function(b){return a.container_mouseup(b)}),this.container.mouseenter(function(b){return a.mouse_enter(b)}),this.container.mouseleave(function(b){return a.mouse_leave(b)}),this.search_results.mouseup(function(b){return a.search_results_mouseup(b)}),this.search_results.mouseover(function(b){return a.search_results_mouseover(b)}),this.search_results.mouseout(function(b){return a.search_results_mouseout(b)}),this.form_field_jq.bind("liszt:updated",function(b){return a.results_update_field(b)}),this.search_field.blur(function(b){return a.input_blur(b)}),this.search_field.keyup(function(b){return a.keyup_checker(b)}),this.search_field.keydown(function(b){return a.keydown_checker(b)}),this.is_multiple?(this.search_choices.click(function(b){return a.choices_click(b)}),this.search_field.focus(function(b){return a.input_focus(b)})):this.container.click(function(a){return a.preventDefault()})},e.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},e.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)[0]===this.selected_item[0]||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},e.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},e.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},e.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){var a,b,c,e,f;this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.find("span").text(this.default_text),this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),a="",f=this.results_data;for(c=0,e=f.length;c'+a("
        ").text(b.label).html()+"")},e.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c'+b.html+''),d=a("#"+c).find("a").first(),d.click(function(a){return e.choice_destroy_link_click(a)})},e.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},e.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},e.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},e.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.result_activate=function(a){return a.addClass("active-result")},e.prototype.result_deactivate=function(a){return a.removeClass("active-result")},e.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('')},e.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;this.no_results_clear(),i=0,j=this.search_field.val()===this.default_text?"":a("
        ").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o"+c.html.substr(k+j.length),l=l.substr(0,k)+""+l.substr(k)):l=c.html,g.html(l),this.result_activate(g),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&h===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(g))}}return i<1&&j.length?this.no_results(j):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d'+this.results_none_found+' ""'),c.find("span").first().html(b),this.search_results.append(c)},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},e.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},e.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},e.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},e.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},e}(AbstractChosen),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this); - - /* - * TipTip - * Copyright 2010 Drew Wilson - * www.drewwilson.com - * code.drewwilson.com/entry/tiptip-jquery-plugin - * - * Version 1.3 - Updated: Mar. 23, 2010 - * - * This Plug-In will create a custom tooltip to replace the default - * browser tooltip. It is extremely lightweight and very smart in - * that it detects the edges of the browser window and will make sure - * the tooltip stays within the current window size. As a result the - * tooltip will adjust itself to be displayed above, below, to the left - * or to the right depending on what is necessary to stay within the - * browser window. It is completely customizable as well via CSS. - * - * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('
        ');var tiptip_content=$('
        ');var tiptip_arrow=$('
        ');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
        ')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery); - -/* TINY SORT */ -(function(e){var a=false,g=null,f=parseFloat,b=/(\d+\.?\d*)$/g;e.tinysort={id:"TinySort",version:"1.2.18",copyright:"Copyright (c) 2008-2012 Ron Valstar",uri:"http://tinysort.sjeiti.com/",licenced:{MIT:"http://www.opensource.org/licenses/mit-license.php",GPL:"http://www.gnu.org/licenses/gpl.html"},defaults:{order:"asc",attr:g,data:g,useVal:a,place:"start",returns:a,cases:a,forceStrings:a,sortFunction:g}};e.fn.extend({tinysort:function(m,h){if(m&&typeof(m)!="string"){h=m;m=g}var n=e.extend({},e.tinysort.defaults,h),s,B=this,x=e(this).length,C={},p=!(!m||m==""),q=!(n.attr===g||n.attr==""),w=n.data!==g,j=p&&m[0]==":",k=j?B.filter(m):B,r=n.sortFunction,v=n.order=="asc"?1:-1,l=[];if(!r){r=n.order=="rand"?function(){return Math.random()<0.5?1:-1}:function(F,E){var i=!n.cases?d(F.s):F.s,K=!n.cases?d(E.s):E.s;if(!n.forceStrings){var H=i.match(b),G=K.match(b);if(H&&G){var J=i.substr(0,i.length-H[0].length),I=K.substr(0,K.length-G[0].length);if(J==I){i=f(H[0]);K=f(G[0])}}}return v*(iK?1:0))}}B.each(function(G,H){var I=e(H),E=p?(j?k.filter(H):I.find(m)):I,J=w?E.data(n.data):(q?E.attr(n.attr):(n.useVal?E.val():E.text())),F=I.parent();if(!C[F]){C[F]={s:[],n:[]}}if(E.length>0){C[F].s.push({s:J,e:I,n:G})}else{C[F].n.push({e:I,n:G})}});for(s in C){C[s].s.sort(r)}for(s in C){var y=C[s],A=[],D=x,u=[0,0],z;switch(n.place){case"first":e.each(y.s,function(E,F){D=Math.min(D,F.n)});break;case"org":e.each(y.s,function(E,F){A.push(F.n)});break;case"end":D=y.n.length;break;default:D=0}for(z=0;z=D&&z'+"January,February,March,April,May,June,July,August,September,October,November,December".split(",")[month]+" "+ -year+"");a=a+('')+"";for(d=0;7>d;d++)a+='";a+="";f(month,year);b=new Date(year,month,1);c=b.getDay();e=f(month,year);b=new Date(year,month,1);c=b.getDay();e=0==month?11:month-1;e=f(e,11==e?year-1:year);c=0==c&&b?7:c;for(j=b=0;42>j;j++)j'+(e-c+j+1)+"":j>=c+f(month,year)?(b+=1,a+='"):a+='",6==j%7&&(a+="");this.html(a+"
        '+e[d]+"
        '+ -b+"'+(j-c+1)+"
        ");return this}})(jQuery); \ No newline at end of file diff --git a/frontend/templates/default/static/js/prettify.js b/frontend/templates/default/static/js/prettify.js deleted file mode 100644 index eef5ad7..0000000 --- a/frontend/templates/default/static/js/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - -
        - {%?contents} -
        -
        diff --git a/frontend/templates/pure/admin/node/add.tpl b/frontend/templates/pure/admin/node/add.tpl deleted file mode 100644 index b8da93c..0000000 --- a/frontend/templates/pure/admin/node/add.tpl +++ /dev/null @@ -1,50 +0,0 @@ -

        {%!title-admin-addnode}

        - -{%if isempty|errors == false} -
        -
        {%!error-form}
        -
        -
          - {%foreach error in errors} -
        • {%?error}
        • - {%/foreach} -
        -
        -
        -{%/if} - -
        -
        - - {%input type="text" group="addnode" name="name"} -
        - -
        - - {%input type="text" group="addnode" name="hostname"} -
        - -
        - - {%input type="text" group="addnode" name="location"} -
        - -
        - - {%input type="checkbox" group="addnode" name="customkey" data-enable-group="customkey" class="enabler"} -
        - -
        - - {%input type="file" group="addnode" name="publickey" disabled="disabled"} -
        - -
        - - {%input type="file" group="addnode" name="privatekey" disabled="disabled"} -
        - -
        - -
        -
        diff --git a/frontend/templates/pure/admin/node/list.tpl b/frontend/templates/pure/admin/node/list.tpl deleted file mode 100644 index 1203a6b..0000000 --- a/frontend/templates/pure/admin/node/list.tpl +++ /dev/null @@ -1,30 +0,0 @@ -

        {%!title-admin-nodelist}

        - - - - - - - - - - - - {%foreach node in nodes} - - - - - {%/foreach} - -
        {%!list-column-hostname}{%!list-column-location}
        - - {%?node[hostname]} - - - {%?node[location]} -
        diff --git a/frontend/templates/pure/admin/node/lookup.tpl b/frontend/templates/pure/admin/node/lookup.tpl deleted file mode 100644 index c3611b0..0000000 --- a/frontend/templates/pure/admin/node/lookup.tpl +++ /dev/null @@ -1,87 +0,0 @@ -

        {%!title-admin-nodeinfo}

        - - - -
        - - - - - - - - - - - - - -
        {%!list-column-nodeid}{%?id}
        {%!list-column-hostname}{%?hostname}
        {%!list-column-location}{%?location}
        -
        - -
        -

        {%!header-admin-node-vpses}

        - - - - - - - - - - - - - {%if isset|vpses == true} - {%foreach vps in vpses} - - - - - - - - - {%/foreach} - {%/if} - -
        {%!list-column-hostname}{%!list-column-platform}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
        - {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
        -
        diff --git a/frontend/templates/pure/admin/overview/index.tpl b/frontend/templates/pure/admin/overview/index.tpl deleted file mode 100644 index f83d783..0000000 --- a/frontend/templates/pure/admin/overview/index.tpl +++ /dev/null @@ -1,3 +0,0 @@ -

        {%!title-admin-overview}

        - -

        {%!admin-overview-message}

        diff --git a/frontend/templates/pure/admin/template/add.tpl b/frontend/templates/pure/admin/template/add.tpl deleted file mode 100644 index 3026f5b..0000000 --- a/frontend/templates/pure/admin/template/add.tpl +++ /dev/null @@ -1,36 +0,0 @@ -

        Add templates

        - -{%if isempty|templates == true} -

        - To add new templates, add the corresponding tar.gz files to /etc/cvm/templates on the master node, and reload this page. - New files will be automatically detected, and you will be able to add them as templates from this page. -

        - -

        - All templates will be automatically synchronized to slave nodes. -

        -{%else} -
        - {%foreach template in templates} -
        -
        -

        {%?template}

        - -
        - -
        - - {%input type="text" group="addtemplate" name="name[]"} -
        - -
        - - -
        -
        - {%/foreach} -
        - -
        -
        -{%/if} diff --git a/frontend/templates/pure/admin/template/list.tpl b/frontend/templates/pure/admin/template/list.tpl deleted file mode 100644 index 1982a56..0000000 --- a/frontend/templates/pure/admin/template/list.tpl +++ /dev/null @@ -1,56 +0,0 @@ -

        Template overview

        - - - - - - - - - - - - - - - {%foreach template in templates} - - - - - - - - {%/foreach} - -
        FilenameTemplate nameSupportedUp-to-dateAvailable
        - - {%?template[filename]} - - - - {%?template[name]} - - - {%if template[supported] == true} - - {%else} - - {%/if} - - {%if template[outdated] == true} - - {%else} - - {%/if} - - {%if template[available] == true} - - {%else} - - {%/if} -
        diff --git a/frontend/templates/pure/admin/vps/add.tpl b/frontend/templates/pure/admin/vps/add.tpl deleted file mode 100644 index 20845a1..0000000 --- a/frontend/templates/pure/admin/vps/add.tpl +++ /dev/null @@ -1,77 +0,0 @@ -

        {%!title-admin-addvps}

        - -{%if isempty|errors == false} -
        -
        {%!error-form}
        -
        -
          - {%foreach error in errors} -
        • {%?error}
        • - {%/foreach} -
        -
        -
        -{%/if} - -
        -
        - - {%select group="addvps" name="node"} - {%foreach node in nodes} - {%option value="(?node[id])" text="(?node[name]) ((?node[location]))"} - {%/foreach} - {%/select} -
        - -
        - - {%select group="addvps" name="template"} - {%foreach template in templates} - {%option value="(?template[id])" text="(?template[name])"} - {%/foreach} - {%/select} -
        - -
        - - {%select group="addvps" name="user"} - {%foreach user in users} - {%option value="(?user[id])" text="(?user[username]) (#(?user[id]))"} - {%/foreach} - {%/select} -
        - -
        - - {%input type="text" group="addvps" name="diskspace"} -
        - -
        - - {%input type="text" group="addvps" name="guaranteed"} -
        - -
        - - {%input type="text" group="addvps" name="burstable"} -
        - -
        - - {%input type="text" group="addvps" name="cpucount"} -
        - -
        - - {%input type="text" group="addvps" name="traffic"} -
        - -
        - - {%input type="text" group="addvps" name="hostname"} -
        - -
        - -
        -
        diff --git a/frontend/templates/pure/client/vps/list.tpl b/frontend/templates/pure/client/vps/list.tpl deleted file mode 100644 index 0a8f3b1..0000000 --- a/frontend/templates/pure/client/vps/list.tpl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - {%foreach vps in vpses} - - - - - - - - - - {%/foreach} - -
        {%!list-column-hostname}{%!list-column-platform}{%!list-column-node}{%!list-column-disk}{%!list-column-ram}{%!list-column-template}
        - {%if vps[status] == running} - {%!list-status-running} - {%elseif vps[status] == stopped} - {%!list-status-stopped} - {%elseif vps[status] == suspended} - {%!list-status-suspended} - {%else} - {%!list-status-unknown} - {%/if} - - - {%?vps[hostname]} - - - - {%if vps[virtualization-type] == 1} - OpenVZ - {%/if}{%if vps[virtualization-type] == 2} - Xen PV - {%/if}{%if vps[virtualization-type] == 3} - Xen HVM - {%/if}{%if vps[virtualization-type] == 4} - KVM - {%/if} - - - - {%?vps[node]} - ({%?vps[node-hostname]}) - - - {%?vps[diskspace]} - {%?vps[diskspace-unit]} - - {%?vps[guaranteed-ram]} - {%?vps[guaranteed-ram-unit]} - {%?vps[template]}
        diff --git a/frontend/templates/pure/shared/error/error.tpl b/frontend/templates/pure/shared/error/error.tpl deleted file mode 100644 index 2068c8f..0000000 --- a/frontend/templates/pure/shared/error/error.tpl +++ /dev/null @@ -1,4 +0,0 @@ -
        -
        {%?title}
        -
        {%?message}
        -
        diff --git a/frontend/templates/pure/shared/login.tpl b/frontend/templates/pure/shared/login.tpl deleted file mode 100644 index aa69f4c..0000000 --- a/frontend/templates/pure/shared/login.tpl +++ /dev/null @@ -1,19 +0,0 @@ -
        - {%?error} - -
        -
        -
        - - {%input type="text" group="login" name="username"} -
        -
        - - {%input type="password" group="login" name="password"} -
        -
        - -
        -
        -
        -
        diff --git a/frontend/templates/pure/shared/main.tpl b/frontend/templates/pure/shared/main.tpl deleted file mode 100644 index 2433ac0..0000000 --- a/frontend/templates/pure/shared/main.tpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - -
        -
        - -
        - {%if logged-in == true} - - {%/if} -
        - {%?main} -
        -
        - - diff --git a/frontend/templates/pure/static/css/cvm.css b/frontend/templates/pure/static/css/cvm.css deleted file mode 100644 index a947ee2..0000000 --- a/frontend/templates/pure/static/css/cvm.css +++ /dev/null @@ -1,82 +0,0 @@ -.wrapper { - width: 960px; - margin: 0px auto; } - .wrapper h1, .wrapper h2, .wrapper h3, .wrapper h4, .wrapper h5, .wrapper h6 { - margin-top: 4px; - margin-bottom: 7px; } - .wrapper .pure-g > div { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } - .wrapper .pure-g > div.padded { - padding: 8px 10px; } - .wrapper .pure-menu a { - color: #515151; } - .wrapper .pure-menu a i.fa { - margin-right: 9px; } - .wrapper .pure-menu .pure-menu-selected a { - color: black; } - .wrapper .pure-table th.vertical { - background: #e0e0e0; - color: black; - text-align: left; - vertical-align: bottom; - border-bottom: 1px solid #cbcbcb; } - .wrapper .pure-table i.fa.ok { - color: #208927; } - .wrapper .pure-table i.fa.not-ok { - color: #C22118; } - .wrapper .pure-table td.icon { - text-align: center; - vertical-align: middle; - font-size: 19px; } - .wrapper .pure-button.add { - #background-color: #7ECB9A; } - .wrapper .clickable:hover { - background-color: #F1F1F1; - cursor: pointer; } - .wrapper section { - margin-bottom: 16px; } - .wrapper .error { - padding: 8px 10px; - background-color: #FFD4D4; - border: 1px solid #ff8080; - border-radius: 6px; - margin-bottom: 12px; } - .wrapper .error .title { - font-size: 19px; - font-weight: bold; - margin-bottom: 5px; } - .wrapper .error .title i { - color: #B43636; - vertical-align: middle; } - .wrapper .error .message { - font-size: 15px; } - .wrapper .header .logo { - margin-bottom: 8px; } - .wrapper .pure-menu-horizontal { - background-color: #F1F1F1; - margin-bottom: 16px; } - .wrapper .pure-menu-horizontal a:hover { - background-color: #E6E6E6; } - .wrapper .contents #form_login { - background-color: #F1F1F1; - padding: 12px 16px; } - .wrapper .contents h1 { - font-size: 25px; - margin-top: 2px; } - .wrapper .contents .narrow-wrapper { - width: 420px; - margin: 0px auto; } - .wrapper .contents table.stretch { - width: 100%; } - .wrapper .contents .clickable a { - color: inherit; - text-decoration: inherit; } - .wrapper .contents .submenu { - font-size: 14px; - margin-bottom: 4px; } - .wrapper .contents .submenu i.fa { - margin-right: 0px; } - .wrapper .contents .submenu li a { - padding: 5px 10px; } diff --git a/frontend/templates/pure/static/css/font-awesome.css b/frontend/templates/pure/static/css/font-awesome.css deleted file mode 100644 index 449d6ac..0000000 --- a/frontend/templates/pure/static/css/font-awesome.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.0.3');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/frontend/templates/pure/static/fonts/FontAwesome.otf b/frontend/templates/pure/static/fonts/FontAwesome.otf deleted file mode 100644 index 8b0f54e..0000000 Binary files a/frontend/templates/pure/static/fonts/FontAwesome.otf and /dev/null differ diff --git a/frontend/templates/pure/static/fonts/fontawesome-webfont.eot b/frontend/templates/pure/static/fonts/fontawesome-webfont.eot deleted file mode 100755 index 7c79c6a..0000000 Binary files a/frontend/templates/pure/static/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/frontend/templates/pure/static/fonts/fontawesome-webfont.svg b/frontend/templates/pure/static/fonts/fontawesome-webfont.svg deleted file mode 100755 index 45fdf33..0000000 --- a/frontend/templates/pure/static/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/frontend/templates/pure/static/fonts/fontawesome-webfont.ttf b/frontend/templates/pure/static/fonts/fontawesome-webfont.ttf deleted file mode 100755 index e89738d..0000000 Binary files a/frontend/templates/pure/static/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/frontend/templates/pure/static/fonts/fontawesome-webfont.woff b/frontend/templates/pure/static/fonts/fontawesome-webfont.woff deleted file mode 100755 index 8c1748a..0000000 Binary files a/frontend/templates/pure/static/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/frontend/templates/pure/static/images/logo.png b/frontend/templates/pure/static/images/logo.png deleted file mode 100644 index c309d8e..0000000 Binary files a/frontend/templates/pure/static/images/logo.png and /dev/null differ diff --git a/graphics/icon_alert.svg b/graphics/icon_alert.svg deleted file mode 100644 index e462cca..0000000 --- a/graphics/icon_alert.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/graphics/icon_api.svg b/graphics/icon_api.svg deleted file mode 100644 index b78d9b3..0000000 --- a/graphics/icon_api.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/graphics/icon_backup.xcf b/graphics/icon_backup.xcf deleted file mode 100644 index 4f7c9fa..0000000 Binary files a/graphics/icon_backup.xcf and /dev/null differ diff --git a/graphics/icon_ip.xcf b/graphics/icon_ip.xcf deleted file mode 100644 index 11c9c24..0000000 Binary files a/graphics/icon_ip.xcf and /dev/null differ diff --git a/graphics/icon_key.svg b/graphics/icon_key.svg deleted file mode 100644 index ddf8247..0000000 --- a/graphics/icon_key.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/graphics/icon_lock.svg b/graphics/icon_lock.svg deleted file mode 100644 index 18f565e..0000000 --- a/graphics/icon_lock.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/graphics/icon_overview.xcf b/graphics/icon_overview.xcf deleted file mode 100644 index cd6883f..0000000 Binary files a/graphics/icon_overview.xcf and /dev/null differ diff --git a/graphics/icon_reinstall.xcf b/graphics/icon_reinstall.xcf deleted file mode 100644 index 508629e..0000000 Binary files a/graphics/icon_reinstall.xcf and /dev/null differ diff --git a/graphics/icon_statistics.xcf b/graphics/icon_statistics.xcf deleted file mode 100644 index 5e4c9bf..0000000 Binary files a/graphics/icon_statistics.xcf and /dev/null differ diff --git a/graphics/icon_webshell.xcf b/graphics/icon_webshell.xcf deleted file mode 100644 index 0d0a150..0000000 Binary files a/graphics/icon_webshell.xcf and /dev/null differ diff --git a/graphics/loading.xcf b/graphics/loading.xcf deleted file mode 100644 index c605a78..0000000 Binary files a/graphics/loading.xcf and /dev/null differ diff --git a/graphics/logo.xcf b/graphics/logo.xcf deleted file mode 100644 index d4099ab..0000000 Binary files a/graphics/logo.xcf and /dev/null differ diff --git a/graphics/questionmark.svg b/graphics/questionmark.svg deleted file mode 100644 index e3add52..0000000 --- a/graphics/questionmark.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - ? - - diff --git a/graphics/restart.svg b/graphics/restart.svg deleted file mode 100644 index 825f6c2..0000000 --- a/graphics/restart.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/graphics/shadow_quota_bars.txt b/graphics/shadow_quota_bars.txt deleted file mode 100644 index 97a4ef3..0000000 --- a/graphics/shadow_quota_bars.txt +++ /dev/null @@ -1 +0,0 @@ -[[],[{"type":"text","shadow_color":"000673","shadow_inset":false,"shadow_offset_x":0,"shadow_offset_y":0,"shadow_blur":3,"shadow_spread":0,"layer_name":"Layer 0"},{"type":"text","shadow_color":"000000","shadow_inset":false,"shadow_offset_x":0,"shadow_offset_y":0,"shadow_blur":1,"shadow_spread":0,"layer_name":"Layer 1"},{"type":"text","shadow_color":"000000","shadow_inset":false,"shadow_offset_x":0,"shadow_offset_y":0,"shadow_blur":3,"shadow_spread":0,"layer_name":"Layer 2"},{"type":"text","shadow_color":"000673","shadow_inset":false,"shadow_offset_x":0,"shadow_offset_y":0,"shadow_blur":2,"shadow_spread":0,"layer_name":"Layer 3"}]] diff --git a/graphics/start.svg b/graphics/start.svg deleted file mode 100644 index c9562f0..0000000 --- a/graphics/start.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/graphics/stop.svg b/graphics/stop.svg deleted file mode 100644 index ca361d7..0000000 --- a/graphics/stop.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/graphics/styles.txt b/graphics/styles.txt deleted file mode 100644 index 5c7f171..0000000 --- a/graphics/styles.txt +++ /dev/null @@ -1,21 +0,0 @@ -Background: #E4EAEA - -Box Background: #F1F1F1 -Box Border: #817F9D 2px - -Header Text: #343352 - -Sidebar Background: #DCDCDC -Sidebar Button Text: #343352 -Sidebar Button Hover: #CDCCDE - -Button: #31305E -Button Text: #FFFFFF -Button Hover: #15144E - -Toolbar Button: #5D5C79 -Toolbar Button Text: #FFFFFF -Toolbar Button Hover: #4E4D69 - -Table Header Background: #31305E -Table Header Text: #FFFFFF diff --git a/graphics/user.svg b/graphics/user.svg deleted file mode 100644 index f649262..0000000 --- a/graphics/user.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/graphics/wrench.svg b/graphics/wrench.svg deleted file mode 100644 index 82d8ebc..0000000 --- a/graphics/wrench.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/installer/build.sh b/installer/build.sh deleted file mode 100755 index bc81126..0000000 --- a/installer/build.sh +++ /dev/null @@ -1,28 +0,0 @@ -cd slave -echo "Copying needed files for slave SFX..." -cp ../../runhelper/runhelper . -cp ../../command_daemon/command_daemon . -cp ../../console/slave/dropper . -cp ../../logshell/logshell . -cp ../../logshell/cvmshell . -cp ../../logshell/logcmd . -cp ../common/setuplib.py . -echo "Creating slave SFX..." -tar -czf - * | python ../../tools/pysfx/pysfx.py -as "python install.py" - ../slave_sfx.py -echo "Removing copied files..." -rm runhelper -rm dropper -rm logshell -rm cvmshell -rm logcmd -rm setuplib.py -cd .. - -cd master -echo "Copying needed files for master SFX..." -echo "Creating master SFX..." -tar -czf - * | python ../../tools/pysfx/pysfx.py -as "python install.py" - ../master_sfx.py -echo "Removing copied files..." -cd .. - -echo "Done!" diff --git a/installer/common/setuplib.py b/installer/common/setuplib.py deleted file mode 100644 index 0122fc0..0000000 --- a/installer/common/setuplib.py +++ /dev/null @@ -1,129 +0,0 @@ -import stat, os, shutil, urllib, subprocess -from itertools import dropwhile - -def create_directory(path, ignore_failure=True, uid=-1, gid=-1, modes=""): - try: - os.makedirs(path) - except OSError, e: - if ignore_failure: - pass - else: - raise - - if uid != -1 or gid != -1: - os.chown(path, uid, gid) - - if modes != "": - set_modes(path, modes) - -def copy_file(source, destination, ignore_failure=True, uid=-1, gid=-1, modes=""): - if ignore_failure == False: - if os.path_exists(destination): - raise Exception("Destination path already exists.") - - try: - shutil.copy(source, destination) - except IOError, e: - if ignore_failure: - pass - else: - raise - - if uid != -1 or gid != -1: - os.chown(destination, uid, gid) - - if modes != "": - set_modes(destination, modes) - -def create_file(path, contents="", uid=-1, gid=-1, modes=""): - f = open(path, "w") - - if contents != "": - f.write(contents) - - f.close() - - if uid != -1 or gid != -1: - os.chown(path, uid, gid) - - if modes != "": - set_modes(path, modes) - -def set_modes(path, modes): - mode_map = { - "u": { - "r": stat.S_IRUSR, - "w": stat.S_IWUSR, - "x": stat.S_IXUSR - }, - "g": { - "r": stat.S_IRGRP, - "w": stat.S_IWGRP, - "x": stat.S_IXGRP - }, - "o": { - "r": stat.S_IROTH, - "w": stat.S_IWOTH, - "x": stat.S_IXOTH - } - - } - - chunks = modes.split(" ") - mode = 0 - - for chunk in chunks: - usertype, changes = chunk.split("+") - - if usertype in mode_map: - for change in list(changes): - if change in mode_map[usertype]: - mode = mode | mode_map[usertype][change] - else: - raise Exception("Unknown permission in modes specification.") - elif usertype == "a": - for change in list(changes): - for i in mode_map: - if change in mode_map[i]: - mode = mode | mode_map[i][change] - else: - raise Exception("Unknown user type in modes specification.") - - os.chmod(path, mode) - -def download_file(name, mirrors): - try: - file_mirrors = mirrors[name] - except KeyError, e: - raise Exception("No such file exists in the mirror list.") - - for url in file_mirrors: - try: - urllib.urlretrieve(url, name) - except: - continue - else: - return name - - raise Exception("No functional mirrors found for this file.") - -def install_rpm(path): - stfu = open("/dev/null", "wb") - - result = subprocess.call(["yum", "--nogpgcheck", "install", "-y", path], stdout=stfu, stderr=stfu) - - stfu.close() - - if result != 0: - raise Exception("Failed to install package.") - -def install_remote_rpm(name, mirrors): - download_file(name, mirrors) - install_rpm(name) - -def rindex(lst, item): - # http://stackoverflow.com/a/6892096/1332715 - try: - return dropwhile(lambda x: lst[x].strip() != item, reversed(xrange(len(lst)))).next() - except StopIteration: - raise ValueError, "rindex(lst, item): item not in list" diff --git a/installer/master/db_updates/1.sql b/installer/master/db_updates/1.sql deleted file mode 100644 index 44d2cb0..0000000 --- a/installer/master/db_updates/1.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE IF NOT EXISTS `settings` ( - `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `Key` varchar(120) NOT NULL, - `Value` text NOT NULL, - `LastChanged` timestamp NULL DEFAULT NULL, - PRIMARY KEY (`Id`), - UNIQUE KEY `Key` (`Key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/master/db_updates/2.sql b/installer/master/db_updates/2.sql deleted file mode 100644 index 0a8e0c4..0000000 --- a/installer/master/db_updates/2.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `containers` ADD `TerminationDate` TIMESTAMP NULL; diff --git a/installer/master/db_updates/3.sql b/installer/master/db_updates/3.sql deleted file mode 100644 index 537ff49..0000000 --- a/installer/master/db_updates/3.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `containers` ADD `Terminated` BOOLEAN NOT NULL; diff --git a/installer/master/dump.sql b/installer/master/dump.sql deleted file mode 100644 index 67b4d3a..0000000 --- a/installer/master/dump.sql +++ /dev/null @@ -1,91 +0,0 @@ -SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; - -CREATE TABLE IF NOT EXISTS `api_keys` ( - `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `KeyType` tinyint(4) NOT NULL, - `UserId` bigint(20) unsigned NOT NULL, - `PublicToken` varchar(32) NOT NULL, - `PrivateToken` varchar(43) NOT NULL, - `Salt` varchar(10) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `containers` ( - `Id` bigint(20) NOT NULL AUTO_INCREMENT, - `VirtualizationType` smallint(6) NOT NULL, - `InternalId` varchar(60) NOT NULL, - `NodeId` bigint(20) NOT NULL, - `Hostname` varchar(200) NOT NULL, - `DiskSpace` int(11) NOT NULL, - `GuaranteedRam` int(11) NOT NULL, - `BurstableRam` int(11) NOT NULL, - `TemplateId` bigint(20) NOT NULL, - `CpuCount` smallint(6) NOT NULL, - `RootPassword` varchar(50) NOT NULL, - `Status` tinyint(4) NOT NULL, - `IncomingTrafficUsed` bigint(20) NOT NULL, - `IncomingTrafficLast` bigint(20) NOT NULL, - `OutgoingTrafficUsed` bigint(20) NOT NULL, - `OutgoingTrafficLast` bigint(20) NOT NULL, - `OutgoingTrafficLimit` bigint(20) NOT NULL, - `IncomingTrafficLimit` bigint(20) NOT NULL, - `TotalTrafficLimit` bigint(20) NOT NULL, - `UserId` bigint(20) NOT NULL, - `TerminationDate` timestamp NULL DEFAULT NULL, - `Terminated` tinyint(1) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `ip_assignments` ( - `Id` bigint(20) NOT NULL AUTO_INCREMENT, - `ContainerId` bigint(20) NOT NULL, - `IpType` tinyint(4) NOT NULL, - `IpRange` varchar(46) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `nodes` ( - `Id` bigint(20) NOT NULL AUTO_INCREMENT, - `Name` varchar(100) NOT NULL, - `Hostname` varchar(200) NOT NULL, - `Port` mediumint(9) NOT NULL, - `User` varchar(80) NOT NULL, - `HasCustomKey` tinyint(1) NOT NULL, - `CustomPrivateKey` varchar(200) NOT NULL, - `CustomPublicKey` varchar(200) NOT NULL, - `PhysicalLocation` varchar(150) NOT NULL, - `TunnelPort` smallint(5) unsigned NOT NULL, - `TunnelKey` varchar(16) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `settings` ( - `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `Key` varchar(120) NOT NULL, - `Value` text NOT NULL, - `LastChanged` timestamp NULL DEFAULT NULL, - PRIMARY KEY (`Id`), - UNIQUE KEY `Key` (`Key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `templates` ( - `Id` int(11) NOT NULL AUTO_INCREMENT, - `Name` varchar(200) NOT NULL, - `Description` mediumtext NOT NULL, - `TemplateName` varchar(200) NOT NULL, - `Supported` tinyint(1) NOT NULL, - `Available` tinyint(1) NOT NULL, - `Outdated` tinyint(1) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `users` ( - `Id` bigint(20) NOT NULL AUTO_INCREMENT, - `Username` varchar(100) NOT NULL, - `EmailAddress` varchar(350) NOT NULL, - `Hash` varchar(200) NOT NULL, - `Salt` varchar(30) NOT NULL, - `AccessLevel` tinyint(4) NOT NULL, - PRIMARY KEY (`Id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/master/install.py b/installer/master/install.py deleted file mode 100644 index 76867a0..0000000 --- a/installer/master/install.py +++ /dev/null @@ -1 +0,0 @@ -print "Master installer placeholder." diff --git a/installer/slave/centos5.repo b/installer/slave/centos5.repo deleted file mode 100644 index ad9abe5..0000000 --- a/installer/slave/centos5.repo +++ /dev/null @@ -1,70 +0,0 @@ -[openvz-utils] -name=OpenVZ utilities -#baseurl=http://download.openvz.org/current/ -mirrorlist=http://download.openvz.org/mirrors-current -enabled=1 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -# In addition to openvz-utils repo, you have to enable one the the -# kernel repositories below. In the stock config, openvz-kernel-rhel6 -# is enabled; you might want to change this. - - -# Stable branches - -[openvz-kernel-rhel6] -name=OpenVZ RHEL6-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32 -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ -#exclude=vzkernel-firmware - -[openvz-kernel-rhel5] -name=OpenVZ RHEL5-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18 -enabled=1 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -[openvz-kernel-rhel4] -name=OpenVZ RHEL4-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel4-2.6.9/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel4-2.6.9 -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - - -# Testing branches - -[openvz-kernel-rhel6-testing] -name=OpenVZ RHEL6-based testing kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32-testing/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32-testing -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ -#exclude=vzkernel-firmware - -[openvz-kernel-rhel6-debuginfo] -name=OpenVZ RHEL6-based testing kernel debuginfo rpms -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32-testing/debuginfo -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32-debuginfo -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -[openvz-kernel-rhel5-testing] -name=OpenVZ RHEL5-based testing kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18-testing/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18-testing -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -# Development branches -# ....none at this point diff --git a/installer/slave/centos6.repo b/installer/slave/centos6.repo deleted file mode 100644 index d00a115..0000000 --- a/installer/slave/centos6.repo +++ /dev/null @@ -1,70 +0,0 @@ -[openvz-utils] -name=OpenVZ utilities -#baseurl=http://download.openvz.org/current/ -mirrorlist=http://download.openvz.org/mirrors-current -enabled=1 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -# In addition to openvz-utils repo, you have to enable one the the -# kernel repositories below. In the stock config, openvz-kernel-rhel6 -# is enabled; you might want to change this. - - -# Stable branches - -[openvz-kernel-rhel6] -name=OpenVZ RHEL6-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32 -enabled=1 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ -#exclude=vzkernel-firmware - -[openvz-kernel-rhel5] -name=OpenVZ RHEL5-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18 -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -[openvz-kernel-rhel4] -name=OpenVZ RHEL4-based kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel4-2.6.9/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel4-2.6.9 -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - - -# Testing branches - -[openvz-kernel-rhel6-testing] -name=OpenVZ RHEL6-based testing kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32-testing/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32-testing -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ -#exclude=vzkernel-firmware - -[openvz-kernel-rhel6-debuginfo] -name=OpenVZ RHEL6-based testing kernel debuginfo rpms -#baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32-testing/debuginfo -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32-debuginfo -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -[openvz-kernel-rhel5-testing] -name=OpenVZ RHEL5-based testing kernel -#baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18-testing/current/ -mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18-testing -enabled=0 -gpgcheck=1 -gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ - -# Development branches -# ....none at this point diff --git a/installer/slave/command_daemon b/installer/slave/command_daemon deleted file mode 100644 index 142e735..0000000 --- a/installer/slave/command_daemon +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python - -import sys, os -import subprocess -import json, urlparse -import SocketServer, SimpleHTTPServer -from optparse import OptionParser - -parser = OptionParser() -(options, cmdargs) = parser.parse_args() - -try: - f = open("session_key", "r") - session_key = f.read().strip() - f.close() -except IOError, e: - sys.stderr.write("You must specify a session key.\n") - exit(1) - -os.remove("session_key") - -class CommandHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): - def do_GET(self): - global session_key - - req = urlparse.urlparse(self.path) - get_params = urlparse.parse_qs(req.query) - path = req.path - - if path=='/': - try: - command = json.loads(get_params['command'][0]) - except KeyError, e: - self.send_404() - return - except IndexError, e: - self.send_404() - return - except ValueError, e: - self.send_404() - return - - try: - key = get_params['key'][0] - except KeyError, e: - self.send_403() - return - except IndexError, e: - self.send_403() - return - - if key != session_key: - self.send_403() - return - - try: - result = json.dumps(self.run_command(command)) - except Exception, e: - print e - self.send_404() - return - - self.send_response(200) - self.send_header('Content-type','text/json') - self.end_headers() - self.wfile.write(result) - else: - self.send_404() - return - - def send_404(self): - self.send_response(404) - self.send_header('Content-type','text/plain') - self.end_headers() - self.wfile.write("404 Not Found") - - def send_403(self): - self.send_response(403) - self.send_header('Content-type','text/plain') - self.end_headers() - self.wfile.write("403 Forbidden") - - def run_command(self, args): - pr = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - data = pr.communicate() - pr.wait() - - return { - 'stdout': data[0], - 'stderr': data[1], - 'returncode': pr.returncode - } - -if os.fork(): exit(0) -os.umask(0) -os.setsid() -if os.fork(): exit(0) - -sys.stdout.flush() -sys.stderr.flush() -si = file('/dev/null', 'r') -so = file('/dev/null', 'a+') -se = file('/dev/null', 'a+', 0) -os.dup2(si.fileno(), sys.stdin.fileno()) -os.dup2(so.fileno(), sys.stdout.fileno()) -os.dup2(se.fileno(), sys.stderr.fileno()) - -httpd = SocketServer.ThreadingTCPServer(("localhost", 3434), CommandHandler) -httpd.serve_forever() diff --git a/installer/slave/exporter.py b/installer/slave/exporter.py deleted file mode 100644 index 1ebf856..0000000 --- a/installer/slave/exporter.py +++ /dev/null @@ -1,101 +0,0 @@ -import os, subprocess, sys, re, json, setuplib, time - -BOLD_START = '\033[1m' -BOLD_END = '\033[0m' - -beancounter_keys = ["KMEMSIZE", "LOCKEDPAGES", "PRIVVMPAGES", "SHMPAGES", "NUMPROC", "PHYSPAGES", - "VMGUARPAGES", "OOMGUARPAGES", "NUMTCPSOCK", "NUMFLOCK", "NUMPTY", "NUMSIGINFO", - "TCPSNDBUF", "TCPRCVBUF", "OTHERSOCKBUF", "DGRAMRCVBUF", "NUMOTHERSOCK", - "DCACHESIZE", "NUMFILE", "AVNUMPROC", "NUMIPTENT", "DISKSPACE", "DISKINODES", - "QUOTATIME", "CPUUNITS"] - -def run(): - # Check if the OpenVZ kernel is active - r, w = os.pipe() - subprocess.call(["ps", "ax"], stdout=w) - found = False - - for process in os.read(r, 134217728).splitlines(): - if "vzmond" in process: - found = True - - if found == False: - sys.stderr.write("WARNING: OpenVZ kernel not detected as being active. Restart the\n") - sys.stderr.write(" system with the OpenVZ kernel enabled and manually run the exporter.\n") - return False - - # Start exporting - - containers = {} - - r, w = os.pipe() - subprocess.call(["vzlist", "-Ha", "-o", "ctid,status"], stdout=w) - - for line in os.read(r, 134217728).splitlines(): - ctid, status = line.split() - - iplist = [] - nameservers = [] - beancounters = {} - parameters = {} - - autorun = False - hostname = None - template = None - - for line in open("/etc/vz/conf/%s.conf" % ctid, "r"): - if line.startswith("#"): - continue - - if line.strip() == "": - continue - - key, value = line.split("=", 1) - - key = key.strip() - value = value.strip()[1:-1] - - if key in ["VE_ROOT", "VE_PRIVATE", "ORIGIN_SAMPLE"]: - # We don't really care about these, so we can ignore them. - continue - - elif key in beancounter_keys: - # This is a beancounter. - beancounters[key.lower()] = value - - elif key == "ONBOOT": - autorun = (value == "yes") - - elif key == "NAMESERVER": - nameservers += value.split() - - elif key == "IP_ADDRESS": - iplist += value.split() - - elif key == "HOSTNAME": - hostname = value - - elif key == "OSTEMPLATE": - template = value - - else: - parameters[key] = value - - containers[ctid] = { - 'ip_addresses': iplist, - 'beancounters': beancounters, - 'hostname': hostname, - 'autorun': autorun, - 'nameservers': nameservers, - 'parameters': parameters, - 'status': status, - 'template': template - } - - setuplib.create_directory("/etc/cvm/exported", True, 0, 0, "u+rwx") - - export_path = "/etc/cvm/exported/%s.openvz" % time.strftime("%Y%m%d_%H%M%S") - - setuplib.create_file(export_path, json.dumps({"openvz": containers}), 0, 0, "u+rwx") - - sys.stdout.write("\n" + BOLD_START + "Your exported data has been stored in %s." % export_path + BOLD_END + "\n") diff --git a/installer/slave/grub_deb7.cfg b/installer/slave/grub_deb7.cfg deleted file mode 100644 index e83b17e..0000000 --- a/installer/slave/grub_deb7.cfg +++ /dev/null @@ -1,202 +0,0 @@ -#! /bin/sh -set -e - -# grub-mkconfig helper script. -# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. -# -# Modified (C) 2014 Sven Slootweg -# Adapted for use in CVM, for prioritized OpenVZ-specific boot entries. -# -# GRUB 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 3 of the License, or -# (at your option) any later version. -# -# GRUB 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 GRUB. If not, see . - -prefix="/usr" -exec_prefix="${prefix}" -datarootdir="${prefix}/share" - -. "${datarootdir}/grub/grub-mkconfig_lib" - -export TEXTDOMAIN=grub -export TEXTDOMAINDIR="${datarootdir}/locale" - -CLASS="--class gnu-linux --class gnu --class os" - -if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then - OS="GNU/Linux (CVM)" -else - OS="${GRUB_DISTRIBUTOR} GNU/Linux (CVM)" - CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}" -fi - -# loop-AES arranges things so that /dev/loop/X can be our root device, but -# the initrds that Linux uses don't like that. -case ${GRUB_DEVICE} in - /dev/loop/*|/dev/loop[0-9]) - GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"` - # We can't cope with devices loop-mounted from files here. - case ${GRUB_DEVICE} in - /dev/*) ;; - *) exit 0 ;; - esac - ;; -esac - -if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ - || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ - || uses_abstraction "${GRUB_DEVICE}" lvm; then - LINUX_ROOT_DEVICE=${GRUB_DEVICE} -else - LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} -fi - -if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ] \ - || [ "x`stat -f --printf=%T /`" = xbtrfs ]; then - rootsubvol="`make_system_path_relative_to_its_root /`" - rootsubvol="${rootsubvol#/}" - if [ "x${rootsubvol}" != x ]; then - GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}" - fi -fi - -linux_entry () -{ - os="$1" - version="$2" - recovery="$3" - args="$4" - if ${recovery} ; then - title="$(gettext_quoted "%s, with Linux %s (recovery mode)")" - else - title="$(gettext_quoted "%s, with Linux %s")" - fi - printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}" - if ! ${recovery} ; then - save_default_entry | sed -e "s/^/\t/" - fi - - # Use ELILO's generic "efifb" when it's known to be available. - # FIXME: We need an interface to select vesafb in case efifb can't be used. - if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then - cat << EOF - load_video -EOF - else - if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then - cat << EOF - load_video -EOF - fi - cat << EOF - set gfxpayload=$GRUB_GFXPAYLOAD_LINUX -EOF - fi - - cat << EOF - insmod gzio -EOF - - if [ x$dirname = x/ ]; then - if [ -z "${prepare_root_cache}" ]; then - prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")" - fi - printf '%s\n' "${prepare_root_cache}" - else - if [ -z "${prepare_boot_cache}" ]; then - prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" - fi - printf '%s\n' "${prepare_boot_cache}" - fi - message="$(gettext_printf "Loading Linux %s ..." ${version})" - cat << EOF - echo '$message' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} -EOF - if test -n "${initrd}" ; then - message="$(gettext_printf "Loading initial ramdisk ...")" - cat << EOF - echo '$message' - initrd ${rel_dirname}/${initrd} -EOF - fi - cat << EOF -} -EOF -} - -case x`uname -m` in - xi?86 | xx86_64) - list=`for i in /boot/vmlinuz-*openvz* /vmlinuz-*openvz* /boot/kernel-*openvz* ; do - if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi - done` ;; - *) - list=`for i in /boot/vmlinuz-*openvz* /boot/vmlinux-*openvz* /vmlinuz-*openvz* /vmlinux-*openvz* /boot/kernel-*openvz* ; do - if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi - done` ;; -esac - -prepare_boot_cache= -prepare_root_cache= - -while [ "x$list" != "x" ] ; do - linux=`version_find_latest $list` - echo "Found linux image: $linux" >&2 - basename=`basename $linux` - dirname=`dirname $linux` - rel_dirname=`make_system_path_relative_to_its_root $dirname` - version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` - alt_version=`echo $version | sed -e "s,\.old$,,g"` - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - - initrd= - for i in "initrd.img-${version}" "initrd-${version}.img" \ - "initrd-${version}" "initramfs-${version}.img" \ - "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ - "initrd-${alt_version}" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}"; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break - fi - done - - config= - for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do - if test -e "${i}" ; then - config="${i}" - break - fi - done - - initramfs= - if test -n "${config}" ; then - initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"` - fi - - if test -n "${initrd}" ; then - echo "Found initrd image: ${dirname}/${initrd}" >&2 - elif test -z "${initramfs}" ; then - # "UUID=" magic is parsed by initrd or initramfs. Since there's - # no initrd or builtin initramfs, it can't work here. - linux_root_device_thisversion=${GRUB_DEVICE} - fi - - linux_entry "${OS}" "${version}" false \ - "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" - if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then - linux_entry "${OS}" "${version}" true \ - "single ${GRUB_CMDLINE_LINUX}" - fi - - list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` -done diff --git a/installer/slave/install.py b/installer/slave/install.py deleted file mode 100644 index 6e4f542..0000000 --- a/installer/slave/install.py +++ /dev/null @@ -1,512 +0,0 @@ -import sys, os, subprocess, stat, shutil, re, urllib, glob -import setuplib - -BOLD_START = '\033[1m' -BOLD_END = '\033[0m' - -stfu = open("/dev/null", "wb") - -mirrors = { - "perl-LockFile-Simple-0.207-1.el5.rf.noarch.rpm": - ["http://pkgs.repoforge.org/perl-LockFile-Simple/perl-LockFile-Simple-0.207-1.el5.rf.noarch.rpm", - "http://cvm.cryto.net/packages/perl-LockFile-Simple-0.207-1.el5.rf.noarch.rpm"], - "perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm": - ["http://pkgs.repoforge.org/perl-LockFile-Simple/perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm", - "http://cvm.cryto.net/packages/perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm"], - "cstream-2.7.4-3.el5.rf.x86_64.rpm": - ["http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el5.rf.x86_64.rpm", - "http://cvm.cryto.net/packages/cstream-2.7.4-3.el5.rf.x86_64.rpm"], - "cstream-2.7.4-3.el6.rf.x86_64.rpm": - ["http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el6.rf.x86_64.rpm", - "http://cvm.cryto.net/packages/cstream-2.7.4-3.el6.rf.x86_64.rpm"], - "cstream-2.7.4-3.el5.rf.i386.rpm": - ["http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el5.rf.i386.rpm", - "http://cvm.cryto.net/packages/cstream-2.7.4-3.el5.rf.i386.rpm"], - "cstream-2.7.4-3.el6.rf.i686.rpm": - ["http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el6.rf.i686.rpm", - "http://cvm.cryto.net/packages/cstream-2.7.4-3.el6.rf.i686.rpm"], - "vzdump-1.2-4.noarch.rpm": - ["http://download.openvz.org/contrib/utils/vzdump/vzdump-1.2-4.noarch.rpm", - "http://cvm.cryto.net/packages/vzdump-1.2-4.noarch.rpm"] -} - -# Determine distro -if os.path.exists("/etc/centos-release"): - distro = "centos" - - # Determine the version of CentOS - version_data = open("/etc/centos-release", "r").read() - ver = re.match("CentOS\s+(Linux\s+)?release\s+([0-9]+)", version_data) - - if ver is None: - sys.stderr.write("Could not determine your version of CentOS.\n") - exit(1) - - if ver.group(2) == "5": - centos_version = 5 - elif ver.group(2) == "6": - centos_version = 6 - else: - sys.stderr.write("Only CentOS 5 and 6 are supported by this installer.\n") - exit(1) -elif os.path.exists("/etc/debian_version"): - distro = "debian" - - with open("/etc/debian_version", "r") as f: - debian_version = int(f.read().split(".")[0]) -else: - sys.stderr.write("This installer only supports Debian and CentOS.\n") - exit(1) - -# Determine architecture -architecture = os.uname()[4] - -if architecture not in ["i386", "i686", "x86_64"]: - sys.stderr.write("This installer only works on i386/i686/x86_64 architectures. If you believe\n") - sys.stderr.write("this is in error, please file a bug report with the output of uname -m.\n") - exit(1) - -sys.stdout.write("#######################################\n") -sys.stdout.write("### CVM Slave Node Installer ###\n") -sys.stdout.write("#######################################\n") -sys.stdout.write("\n") -sys.stdout.write("Thanks for using CVM! I'll ask you a few questions regarding the\n") -sys.stdout.write("setup of your server - after that you can grab a cup of coffee and\n") -sys.stdout.write("I'll continue setting up your server for you.\n") - -# We will keep asking until we get valid answers. -pubkey = "" - -while pubkey == "": - sys.stdout.write("\n") - sys.stdout.write(BOLD_START + "Question 1: What is the public SSH key CVM should use (in OpenSSH format)?" + BOLD_END + "\n") - sys.stdout.write("Note that this should be the public key of the master node, *not* your personal public key!\n") - pubkey = raw_input() - - if not re.match("ssh-(rsa|dss) [a-zA-Z0-9/+]( .+)?", pubkey): - sys.stderr.write("\nERROR: No valid public key was specified. The public key has to be in OpenSSH format.\n") - pubkey = "" - -enable_dropper = "" - -while enable_dropper == "": - sys.stdout.write("\n") - sys.stdout.write(BOLD_START + "Question 2: Should I enable the shell dropper (recommended)?" + BOLD_END + " (Y/n)\n") - enable_dropper = raw_input() - - if enable_dropper.strip() in ["y", "Y", "yes", "YES", "Yes", ""]: - enable_dropper = "y" - elif enable_dropper.strip() in ["n", "N", "no", "NO", "No"]: - enable_dropper = "n" - else: - sys.stderr.write("\nERROR: Please enter 'y' or 'n'.\n") - enable_dropper = "" - -sys.stdout.write("\n" + BOLD_START + "Starting installation of CVM..." + BOLD_END + "\n") - -# Install dependencies -sys.stdout.write("Installing dependencies...\n") -packages = ["python-setuptools", "sudo"] - -if distro == "debian": - packages.append("bsdutils") - packages.append("cron") - subprocess.call(["apt-get", "update", "-y"], stdout=stfu, stderr=stfu) - result = subprocess.call(["apt-get", "install", "-y"] + packages, stdout=stfu, stderr=stfu) -elif distro == "centos": - packages.append("vixie-cron") - packages.append("crontabs") - result = subprocess.call(["yum", "install", "-y"] + packages, stdout=stfu, stderr=stfu) - -if result != 0: - sys.stderr.write("Dependency installation failed.\n") - exit(1) - -result = subprocess.call(["easy_install", "pip"], stdout=stfu, stderr=stfu) - -if result != 0: - sys.stderr.write("Failed to install pip.\n") - -# Check if /etc/passwd or /etc/group is already locked. -if os.path.exists("/etc/passwd.lock") or os.path.exists("/etc/group.lock"): - sys.stderr.write("Whoops, either /etc/passwd or /etc/group is locked, so I can't edit it.\n") - sys.stderr.write("Exit the process that is currently editing it, and try again.\n") - exit(1) - -# Lock /etc/passwd and /etc/group so we can safely add a user. -open("/etc/passwd.lock", "w").close() -sys.stdout.write("Lock on /etc/passwd created.\n") - -open("/etc/group.lock", "w").close() -sys.stdout.write("Lock on /etc/group created.\n") - -# Find highest non-reserved UID in the user list -passwd = open("/etc/passwd", "r+") -highest_uid = 1000 - -for line in passwd: - username, password, uid, gid, name, homedir, shell = line.split(":") - - if username == "cvm": - sys.stderr.write("The cvm user was already found. You probably already installed CVM.\n") - exit(1) - - if enable_dropper == "y": - if username == "vz": - sys.stderr.write("The vz user was already found. You probably already installed CVM.\n") - exit(1) - - if int(uid) < 32000 and int(uid) > highest_uid: - highest_uid = int(uid) - -cvm_uid = highest_uid + 1 -vz_uid = highest_uid + 2 - -# Find highest non-reserved GID in the group list - we will assume same restrictions as for UID -grp = open("/etc/group", "r+") -highest_gid = 1000 - -for line in grp: - groupname, password, gid, users = line.split(":") - - if groupname == "cvm": - sys.stderr.write("The cvm group was already found. You probably already installed CVM.\n") - exit(1) - - if enable_dropper == "y": - if groupname == "vz": - sys.stderr.write("The vz group was already found. You probably already installed CVM.\n") - exit(1) - - if int(gid) < 32000 and int(gid) > highest_gid: - highest_gid = int(gid) - -cvm_gid = highest_gid + 1 -vz_gid = highest_gid + 2 - -# Append new users and groups -passwd.seek(0, 2) -grp.seek(0, 2) - -setuplib.create_directory("/home/cvm", True, cvm_uid, cvm_gid, "u+rwx g+rx") -passwd.write("cvm::%d:%d:CVM Control User:/home/cvm:/home/cvm/cvmshell\n" % (cvm_uid, cvm_gid)) -sys.stdout.write("Created cvm user.\n") - -grp.write("cvm::%d:\n" % cvm_gid) -sys.stdout.write("Created cvm group.\n") - -setuplib.create_directory("/home/cvm/.ssh", True, cvm_uid, cvm_gid, "u+rwx") -authkeys = open("/home/cvm/.ssh/authorized_keys", "a") -authkeys.write("%s\n" % pubkey) -authkeys.close() -sys.stdout.write("Installed public key for cvm user.\n") - -if enable_dropper == "y": - setuplib.create_directory("/home/vz", True, vz_uid, vz_gid, "u+rwx g+rx o+x") - passwd.write("vz::%d:%d:CVM OpenVZ Shell Dropper:/home/vz:/home/vz/dropper\n" % (vz_uid, vz_gid)) - sys.stdout.write("Created vz user.\n") - - grp.write("vz::%d:\n" % vz_gid) - sys.stdout.write("Created vz group.\n") - - setuplib.create_directory("/home/vz/.ssh", True, vz_uid, vz_gid, "u+rwx") - authkeys = open("/home/vz/.ssh/authorized_keys", "a") - authkeys.write("%s\n" % pubkey) - authkeys.close() - sys.stdout.write("Installed public key for vz user.\n") - - setuplib.create_file("/home/vz/.hushlogin", "", vz_uid, vz_gid, "u+rwx") - sys.stdout.write("Hushed login for vz user.\n") - -# We're done with /etc/passwd and /etc/group -passwd.close() -grp.close() - -# Remove the locks on /etc/passwd and /etc/group -os.remove("/etc/passwd.lock") -sys.stdout.write("Lock on /etc/passwd removed.\n") - -os.remove("/etc/group.lock") -sys.stdout.write("Lock on /etc/group removed.\n") - -# Create the main CVM data directories -setuplib.create_directory("/etc/cvm", True, 0, cvm_gid, "u+rwx g+rwx o+rx") -setuplib.create_directory("/etc/cvm/log", True, 0, 0, "u+rwx") -setuplib.create_directory("/etc/cvm/command_daemon", True, cvm_uid, cvm_gid, "u+rwx") -sys.stdout.write("Created directories.\n") - -# Copy the runhelper -setuplib.copy_file("runhelper", "/home/cvm/runhelper", True, cvm_uid, cvm_gid, "u+rwx") -sys.stdout.write("Installed runhelper.\n") - -# Copy the command daemon -setuplib.copy_file("command_daemon", "/etc/cvm/command_daemon/command_daemon", True, cvm_uid, cvm_gid, "u+rwx") -sys.stdout.write("Installed command daemon.\n") - -if enable_dropper == "y": - # Copy the shell dropper - setuplib.copy_file("dropper", "/home/vz/dropper", True, vz_uid, vz_gid, "u+rwx") - sys.stdout.write("Installed OpenVZ shell dropper.\n") - -# Copy the logged shell -setuplib.copy_file("logshell", "/home/cvm/logshell", True, cvm_uid, cvm_gid, "u+rwx") -setuplib.copy_file("cvmshell", "/home/cvm/cvmshell", True, cvm_uid, cvm_gid, "u+rwx") -setuplib.copy_file("logcmd", "/home/cvm/logcmd", True, cvm_uid, cvm_gid, "u+rwx") -sys.stdout.write("Installed logged shell.\n") - -if os.path.exists("/etc/sudoers.lock"): - sys.stderr.write("The /etc/sudoers file is already locked.\n") - exit(1) - -# Create lock on /etc/sudoers -open("/etc/sudoers.lock", "w").close() -sys.stdout.write("Lock on /etc/sudoers created.\n") - -# Append new rules to /etc/sudoers -sudoers = open("/etc/sudoers", "a") -sudoers.write("cvm ALL = (root) NOPASSWD: /home/cvm/logshell, NOPASSWD: /usr/sbin/vzctl, NOPASSWD: /usr/sbin/vzlist, NOPASSWD: /home/cvm/logcmd\n") - -if enable_dropper == "y": - sudoers.write("vz ALL = (root) NOPASSWD: /usr/sbin/vzctl enter *\n") - -sudoers.close() - -sys.stdout.write("New /etc/sudoers rules appended.\n") - -# Remove lock on /etc/sudoers -os.remove("/etc/sudoers.lock") -sys.stdout.write("Lock on /etc/sudoers removed.\n") - -# Store the currently installed version of CVM -setuplib.create_file("/etc/cvm/version", "slave-0.1\n", cvm_uid, cvm_gid, "u+rwx g+rwx o+r") - -# Install OpenVZ - or, when it already exists, offer to export the current containers. -if os.path.exists("/etc/vz/vz.conf"): - sys.stdout.write("OpenVZ is already installed.\n") - - sys.stdout.write("I can export your current OpenVZ containers for you, so that you can import them into\n") - sys.stdout.write("your CVM panel. If you are already using another panel (such as HyperVM or SolusVM),\n") - sys.stdout.write("however, you should answer 'no' and use the exporter specific for that panel instead.\n") - sys.stdout.write(BOLD_START + "Do you wish to export existing OpenVZ containers?" + BOLD_END + " (Y/n)\n") - q = raw_input() - - if q.lower() in ["n", "no"]: - sys.stdout.write(BOLD_START + "CVM slave node installation successfully finished!" + BOLD_END + "\n") - else: - import exporter - - if exporter.run() == True: - sys.stdout.write(BOLD_START + "CVM slave node installation successfully finished!" + BOLD_END + "\n") - else: - sys.stdout.write(BOLD_START + "Something went wrong during exporting. Otherwise, the CVM slave node installation successfully finished!" + BOLD_END + "\n") -else: - sys.stdout.write("Installing OpenVZ...\n") - packages = ["vzctl", "vzquota"] - - if distro == "debian": - if architecture == "x86_64": - packages.append("linux-image-openvz-amd64") - elif architecture == "i386" or architecture == "i686": - packages.append("linux-image-openvz-686") # This might fail on deb7! - - if debian_version >= 7: - with open("/etc/apt/sources.list.d/openvz-rhel6.list", "w") as f: - f.write("deb http://download.openvz.org/debian wheezy main") - - subprocess.call('wget --output-document="-" http://ftp.openvz.org/debian/archive.key | apt-key add -', shell=True, stdout=stfu, stderr=stfu) - - packages.append("ploop") - - packages.append("vzdump") - subprocess.call(["apt-get", "update", "-y"], stdout=stfu, stderr=stfu) - result = subprocess.call(["apt-get", "install", "-y"] + packages, stdout=stfu, stderr=stfu) - sys.stdout.write("Installed OpenVZ kernel and tools.\n") - - os.symlink("/var/lib/vz", "/vz") - sys.stdout.write("Created symlink from /vz to /var/lib/vz for compatibility.\n") - - setuplib.copy_file("sysctl.conf", "/etc/sysctl.d/cvm_vz.conf", True, 0, 0, "u+rw a+r") - result = subprocess.call(["sysctl", "-p", "/etc/sysctl.d/cvm_vz.conf"], stdout=stfu, stderr=stfu) - - if result != 0: - # This gives an error about kernel.sysrq. Appears to have to do with this only being available - # in the OpenVZ kernel, which isn't loaded yet. We'll just ignore it for now and move on, then - # check at the next boot whether setting this key was successful. - # sys.stderr.write("Failed to load modified sysctl config. OpenVZ installation aborted.\n") - # exit(1) - sys.stderr.write("WARNING: Failed to load complete sysctl config. This may indicate an error\n") - sys.stderr.write(" during installation, but most likely it simply means that we need to boot\n") - sys.stderr.write(" into the OpenVZ kernel before we can load the new settings.\n") - pass - - sys.stdout.write("Configuration for sysctl updated.\n") - - if debian_version >= 7: - # Starting from Debian 7, the OpenVZ kernel is no longer set as the default boot option. This - # code will copy a GRUB configuration file template, with the appropriate kernel path, and - # insert it before the regular boot options. This way, the OpenVZ kernel will be default. - try: - kernel_name = [fname for fname in glob.glob("/boot/vmlinuz-*") if "openvz" in fname][0].split("/vmlinuz-")[-1] - except IndexError, e: - # No suitable kernel found! - sys.stderr.write("ERROR: Could not find an OpenVZ kernel image to add to the GRUB\n") - sys.stderr.write("configuration! Most likely, installation failed. Aborting...\n") - exit(1) - - setuplib.copy_file("grub_deb7.cfg", "/etc/grub.d/06_CVM_openvz", True, 0, 0, "u+rwx g+rx o+rx") - - setuplib.set_modes("/etc/grub.d/06_CVM_openvz", "u+rwx g+rx o+rx") - - result = subprocess.call(["update-grub"], stdout=stfu, stderr=stfu) - - if result != 0: - sys.stderr.write("WARNING: Failed to update GRUB configuration. Please ensure you have a\n") - sys.stderr.write(" valid GRUB configuration before rebooting, or you may brick your server.\n") - else: - sys.stdout.write("Configured GRUB to automatically boot into OpenVZ.\n") - - if os.path.exists("/etc/grub.d/06_OVHkernel"): - # OVH likes inserting a custom kernel before the standard installed kernels, and this - # breaks the default kernel booting, leading to the OpenVZ kernel never being booted. - # We'll rename this to lower its priority and ensure that the OpenVZ kernel comes first. - os.rename("/etc/grub.d/06_OVHkernel", "/etc/grub.d/11_OVHkernel") - result = subprocess.call(["update-grub"], stdout=stfu, stderr=stfu) - - if result != 0: - sys.stderr.write("WARNING: Failed to update GRUB configuration. Please ensure you have a\n") - sys.stderr.write(" valid GRUB configuration before rebooting, or you may brick your server.\n") - - sys.stdout.write("Successfully patched OVH's grub.cfg.\n") - elif distro == "centos": - if centos_version == 5: - lockfile_name = "perl-LockFile-Simple-0.207-1.el5.rf.noarch.rpm" - - if architecture == "x86_64": - cstream_name = "cstream-2.7.4-3.el5.rf.x86_64.rpm" - elif architecture == "i386" or architecture == "i686": - cstream_name = "cstream-2.7.4-3.el5.rf.i386.rpm" - - setuplib.copy_file("centos5.repo", "/etc/yum.repos.d/openvz.repo") - elif centos_version == 6: - lockfile_name = "perl-LockFile-Simple-0.207-1.el6.rf.noarch.rpm" - - if architecture == "x86_64": - cstream_name = "cstream-2.7.4-3.el6.rf.x86_64.rpm" - elif architecture == "i386" or architecture == "i686": - cstream_name = "cstream-2.7.4-3.el6.rf.i686.rpm" - - setuplib.copy_file("centos6.repo", "/etc/yum.repos.d/openvz.repo") - - result = subprocess.call(["rpm", "--import", "http://download.openvz.org/RPM-GPG-Key-OpenVZ"], stdout=stfu, stderr=stfu) - - if result != 0: - sys.stderr.write("Failed to import GPG key for the OpenVZ repository.\n") - exit(1) - - sys.stdout.write("Added OpenVZ repository.\n") - - packages.append("vzkernel") - result = subprocess.call(["yum", "install", "-y"] + packages, stdout=stfu, stderr=stfu) - - sys.stdout.write("Installed OpenVZ kernel and tools.\n") - - setuplib.install_remote_rpm(lockfile_name, mirrors) - setuplib.install_remote_rpm(cstream_name, mirrors) - setuplib.install_remote_rpm("vzdump-1.2-4.noarch.rpm", mirrors) - - # Set environment variable - os.environ["PERL5LIB"] = "/usr/share/perl5/" - - # Update .profile and .bash_profile for the root user - profile = open("/root/.profile", "a") - profile.write("export PERL5LIB=/usr/share/perl5/\n") - profile.close() - - profile = open("/root/.bash_profile", "a") - profile.write("export PERL5LIB=/usr/share/perl5/\n") - profile.close() - - # Update .profile and .bash_profile for the cvm user - profile = open("/home/cvm/.profile", "a") - profile.write("export PERL5LIB=/usr/share/perl5/\n") - profile.close() - - profile = open("/home/cvm/.bash_profile", "a") - profile.write("export PERL5LIB=/usr/share/perl5/\n") - profile.close() - - # Done installing vzdump - sys.stdout.write("Installed vzdump and dependencies.\n") - - # CentOS 6 apparently does not support /etc/sysctl.d anymore, so we'll just append to the - # main sysctl config file. - sysctl_template = open("sysctl.conf", "r") - sysctl = open("/etc/sysctl.conf", "a") - - for line in sysctl_template: - sysctl.write(line) - - sysctl_template.close() - sysctl.close() - - result = subprocess.call(["sysctl", "-p"], stdout=stfu, stderr=stfu) - - if result != 0: - # This gives an error about kernel.sysrq. Appears to have to do with this only being available - # in the OpenVZ kernel, which isn't loaded yet. We'll just ignore it for now and move on, then - # check at the next boot whether setting this key was successful. - # sys.stderr.write("Failed to load modified sysctl config. OpenVZ installation aborted.\n") - # exit(1) - sys.stderr.write("WARNING: Failed to load complete sysctl config. This may indicate an error\n") - sys.stderr.write(" during installation, but most likely it simply means that we need to boot\n") - sys.stderr.write(" into the OpenVZ kernel before we can load the new settings.\n") - pass - - sys.stdout.write("Configuration for sysctl updated.\n") - - setuplib.copy_file("selinux.cfg", "/etc/sysconfig/selinux") - sys.stdout.write("SELinux disabled.\n") - - vzconf = open("/etc/vz/vz.conf", "a") - vzconf.write("NEIGHBOUR_DEVS=all\n") - vzconf.close() - sys.stdout.write("Updated vz.conf.\n") - - # Install post-reboot scripts - os.makedirs("/root/cvm") - setuplib.copy_file("post_reboot.py", "/root/cvm/post_reboot.py", True, 0, 0, "u+rwx") - setuplib.copy_file("setuplib.py", "/root/cvm/setuplib.py", True, 0, 0, "u+rwx") - - # Place reboot-required marker - setuplib.create_file("/etc/cvm/need_reboot") - - # Append post-reboot script to initialization scripts. - # In the case of rc.local, we have to leave the `exit 0` at the end intact. - # Therefore we will insert the line before the last `exit 0`. If this line - # is not found, we will append it at the end (as apparently `exit 0` isn't - # required here). - rclocal = open("/etc/rc.local", "r") - lines = rclocal.readlines() - rclocal.close() - - try: - last = setuplib.rindex(lines, "exit 0") - except ValueError, e: - lines.append("rm -f /etc/cvm/need_reboot\n") - else: - lines.insert(last, "rm -f /etc/cvm/need_reboot\n") - - rclocal = open("/etc/rc.local", "w") - rclocal.write("".join(lines)) - rclocal.close() - - bashrc = open("/root/.bashrc", "a") - bashrc.write("\npython /root/cvm/post_reboot.py\n") - bashrc.close() - - # Done, yay! - sys.stdout.write("\n" + BOLD_START + "OpenVZ successfully installed." + BOLD_END + " Reboot the server and log in via SSH as root to\n") - sys.stdout.write("complete the installation.\n") - - -stfu.close() diff --git a/installer/slave/post_reboot.py b/installer/slave/post_reboot.py deleted file mode 100644 index c549a37..0000000 --- a/installer/slave/post_reboot.py +++ /dev/null @@ -1,94 +0,0 @@ -import os, sys, subprocess - -BOLD_START = '\033[1m' -BOLD_END = '\033[0m' - -# Determine distro -if os.path.exists("/etc/centos-release"): - distro = "centos" -elif os.path.exists("/etc/debian_version"): - distro = "debian" -else: - sys.stderr.write("This installer only supports Debian and CentOS.\n") - exit(1) - -if os.path.exists("/etc/cvm/need_reboot"): - sys.stderr.write(BOLD_START + "Please reboot the system to finish the installation of CVM." + BOLD_END + "\n") - exit(1) -else: - sys.stdout.write("Please wait while the CVM installation is being finished...\n") - - failed = False - - if distro == "debian": - # Check kernel version - kernel = os.uname()[2] - - if "openvz" not in kernel: - sys.stderr.write("WARNING: No reference to openvz found in kernel name.\n") - failed = True - - # Check vzmond process - r, w = os.pipe() - subprocess.call(["ps", "ax"], stdout=w) - found = False - - for process in os.read(r, 134217728).splitlines(): - if "vzmond" in process: - found = True - - if found == False: - sys.stderr.write("WARNING: No vzmond process found.\n") - failed = True - - - r, w = os.pipe() - subprocess.call(["ifconfig"], stdout=w) - found = False - - for line in os.read(r, 134217728).splitlines(): - if "venet0" in line: - found = True - - if found == False: - sys.stderr.write("WARNING: No venet0 network interface found.\n") - failed = True - - - if failed == True: - sys.stderr.write(BOLD_START + "One or more checks failed." + BOLD_END + " It is possible that OpenVZ was not\n") - sys.stderr.write(" successfully installed. A more likely possibility is that the wrong\n") - sys.stderr.write(" kernel was booted. Verify that your GRUB configuration is correct,\n") - sys.stderr.write(" and reboot the system.\n") - - # Remove post-reboot scripts - bashrc = open("/root/.bashrc", "r") - bashrc_lines = bashrc.readlines() - bashrc.close() - - bashrc = open("/root/.bashrc", "w") - - for line in bashrc_lines: - if line.strip() != "python /root/cvm/post_reboot.py": - bashrc.write(line) - - bashrc.close() - - rclocal = open("/etc/rc.local", "r") - rclocal_lines = rclocal.readlines() - rclocal.close() - - rclocal = open("/etc/rc.local", "w") - - for line in rclocal_lines: - if line.strip() != "rm -f /etc/cvm/need_reboot": - rclocal.write(line) - - rclocal.close() - - os.remove("/root/cvm/post_reboot.py") - os.remove("/root/cvm/setuplib.py") - - sys.stdout.write(BOLD_START + "CVM slave node installation successfully finished!" + BOLD_END + "\n") - - exit(0) diff --git a/installer/slave/selinux.cfg b/installer/slave/selinux.cfg deleted file mode 100644 index a8f59ba..0000000 --- a/installer/slave/selinux.cfg +++ /dev/null @@ -1,10 +0,0 @@ -# This file controls the state of SELinux on the system. -# SELINUX= can take one of these three values: -# enforcing - SELinux security policy is enforced. -# permissive - SELinux prints warnings instead of enforcing. -# disabled - No SELinux policy is loaded. -SELINUX=disabled -# SELINUXTYPE= can take one of these two values: -# targeted - Targeted processes are protected, -# mls - Multi Level Security protection. -SELINUXTYPE=targeted diff --git a/installer/slave/sysctl.conf b/installer/slave/sysctl.conf deleted file mode 100644 index ccff441..0000000 --- a/installer/slave/sysctl.conf +++ /dev/null @@ -1,9 +0,0 @@ -net.ipv4.conf.all.rp_filter=1 -net.ipv4.icmp_echo_ignore_broadcasts=1 -net.ipv4.conf.default.forwarding=1 -net.ipv4.conf.default.proxy_arp=0 -net.ipv4.ip_forward=1 -kernel.sysrq=1 -net.ipv4.conf.default.send_redirects=1 -net.ipv4.conf.all.send_redirects=0 -net.ipv4.conf.eth0.proxy_arp=1 diff --git a/logshell/cvmshell b/logshell/cvmshell deleted file mode 100644 index f34ce00..0000000 --- a/logshell/cvmshell +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -import sys, subprocess, time - -try: - if sys.argv[1] == "-c": - try: - command = sys.argv[2] - - if command == 'su -s "/bin/bash" cvm': - interactive = True - else: - interactive = False - except: - exit(1) - else: - interactive = True -except IndexError: - interactive = True - -if interactive == True: - returncode = subprocess.call(["sudo", "/home/cvm/logshell"]) - -else: - returncode = subprocess.call(["sudo", "/home/cvm/logcmd", command]) - -exit(returncode) diff --git a/logshell/logcmd b/logshell/logcmd deleted file mode 100755 index eac60f1..0000000 --- a/logshell/logcmd +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -import random, string, subprocess, os, sys -from datetime import time, date, datetime -from time import strftime - -try: - command = sys.argv[1] -except IndexError, e: - exit(1) - -rand = ''.join(random.choice(string.letters + string.digits) for i in xrange(8)) -rand = "%s_%s" % (strftime("%Y%m%d_%H%M%S"), rand) - -logfile = open("/etc/cvm/log/log.%s" % rand, "w") -logfile.write("# NON-INTERACTIVE COMMAND EXECUTION\n") -logfile.write("$ " + command + "\n") - -prc = subprocess.Popen(["su", "-s", "/bin/bash", "-c", command, "cvm"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - -while prc.poll() is None: - stdout = prc.stdout.read() - stderr = prc.stderr.read() - - if stdout.strip() != "": - sys.stdout.write(stdout) - logfile.write(stdout + "\n") - - if stderr.strip() != "": - sys.stderr.write(stderr) - logfile.write(stderr + "\n") - -stdout = prc.stdout.read() -stderr = prc.stderr.read() - -logfile.write(stdout + "\n" + stderr + "\n") -sys.stdout.write(stdout) -sys.stderr.write(stderr) - -logfile.close() -exit(prc.returncode) diff --git a/logshell/logshell b/logshell/logshell deleted file mode 100644 index a5eca93..0000000 --- a/logshell/logshell +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python - -# Depends on package: bsdutils - -import random, string, subprocess, os -from datetime import time, date, datetime -from time import strftime - -rand = ''.join(random.choice(string.letters + string.digits) for i in xrange(8)) - -rand = "%s_%s" % (strftime("%Y%m%d_%H%M%S"), rand) - -subprocess.call("script -qt -c 'su -s \"/bin/bash\" cvm' -a /etc/cvm/log/log.%s 2>/etc/cvm/log/log.%s.time" % (rand, rand), shell=True) - -if os.environ['SHELL'] != "/bin/bash": - os.remove("/etc/cvm/log/log.%s.time" % rand) - os.remove("/etc/cvm/log/log.%s" % rand) diff --git a/runhelper/runhelper b/runhelper/runhelper deleted file mode 100644 index 464c50a..0000000 --- a/runhelper/runhelper +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/python - -import json, subprocess -from optparse import OptionParser - -parser = OptionParser() -(options, args) = parser.parse_args() - -try: - command = args[0] -except IndexError, e: - exit(1) - -command = json.loads(command.decode('base64')) - -pr = subprocess.Popen(["sudo"] + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -data = pr.communicate() -pr.wait() - -obj = { - 'stdout': data[0], - 'stderr': data[1], - 'returncode': pr.returncode -} - -print json.dumps(obj) diff --git a/sass-watch.sh b/sass-watch.sh deleted file mode 100755 index b554782..0000000 --- a/sass-watch.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sass --watch scss/pure/:frontend/templates/pure/static/css/ > sasswatch.log 2> sasswatch.err & -echo $! > sasswatch.pid diff --git a/scss/pure/cvm.scss b/scss/pure/cvm.scss deleted file mode 100644 index ed97241..0000000 --- a/scss/pure/cvm.scss +++ /dev/null @@ -1,185 +0,0 @@ -.wrapper -{ - width: 960px; - margin: 0px auto; - - h1, h2, h3, h4, h5, h6 - { - margin-top: 4px; - margin-bottom: 7px; - } - - .pure-g > div { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - - &.padded - { - padding: 8px 10px; - } - } - - .pure-menu - { - a - { - color: #515151; - - i.fa - { - margin-right: 9px; - } - } - - .pure-menu-selected a - { - color: black; - } - } - - .pure-table - { - th.vertical - { - background: #e0e0e0; - color: black; - text-align: left; - vertical-align: bottom; - border-bottom: 1px solid #cbcbcb; - } - - i.fa - { - &.ok - { - color: #208927; - } - - &.not-ok - { - color: #C22118; - } - } - - td.icon - { - text-align: center; - vertical-align: middle; - font-size: 19px; - } - } - - .pure-button - { - &.add - { - #background-color: #7ECB9A; - } - } - - .clickable:hover - { - background-color: #F1F1F1; - cursor: pointer; - } - - section - { - margin-bottom: 16px; - } - - .error - { - padding: 8px 10px; - background-color: #FFD4D4; - border: 1px solid #FF8080; - border-radius: 6px; - margin-bottom: 12px; - - .title - { - font-size: 19px; - font-weight: bold; - margin-bottom: 5px; - - i - { - color: #B43636; - vertical-align: middle; - } - } - - .message - { - font-size: 15px; - } - } - - .header - { - .logo - { - margin-bottom: 8px; - } - } - - .pure-menu-horizontal - { - background-color: #F1F1F1; - margin-bottom: 16px; - - a:hover - { - background-color: #E6E6E6; - } - } - - .contents - { - #form_login - { - background-color: #F1F1F1; - padding: 12px 16px; - } - - h1 - { - font-size: 25px; - margin-top: 2px; - } - - .narrow-wrapper - { - width: 420px; - margin: 0px auto; - } - - table.stretch - { - width: 100%; - } - - .clickable a - { - color: inherit; - text-decoration: inherit; - } - - .submenu - { - font-size: 14px; - margin-bottom: 4px; - - i.fa - { - margin-right: 0px; - } - - li a - { - padding: 5px 10px; - } - } - } -} diff --git a/sshd/id_rsa.sshd b/sshd/id_rsa.sshd deleted file mode 100644 index 108adb0..0000000 --- a/sshd/id_rsa.sshd +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAzVGn22oP7Na8NYNuLlnqApMPzldYt3TQMGXvb3B1nBjU3Eha -VYKvl2HHQdH7tIAkk9WUXTO4d24Z+YKGdCgNgJIlF6iMswZBqBCHgyhWobeJxAzg -2tQbKyDyPoYpR5TDVOkAwDwL6auIlKgOPsmmde+zIovvUa0xEKEAD3sFykKAqXHW -i1CR/fyvfGiidSgfNoNApvJthP9PIs3w/b21vj8HmZ2hdo6WIF9mZK+snjiWiGqn -xBwhB9mjzfWnngxVLASDw1D9abSEVnX1pGrYSWescLjKp5QfN3xKv69EiDZUkQz0 -dVKOSq15bbhAdntQI2Nu3K7NbkJsT3pE33pPqQIDAQABAoIBAQCfTA4+5xBKAeTu -Y/V1Ut+DddQalJxJYgEwu7XEMW2eWYm1CxHDLGzNt9gf0ipGxfEbHedJVJp3Vt4i -PsnQj07ChSDwNR5Mu7rvCTwKX56vQ7ZIfHFsdopJsPsh1XdriRjv5QNnIm9fsW17 -YNQElPFoqTvDvuxD42qg6zkfyaQZYpBurOZBohHVocuIsf4BnZVk0Vv3leAt5DSQ -JdtNH/IAjKPuoA3KkBItLJn9xRNOqMobJ+yjL84UDk7tq9VXzIclede+6s3BlNVV -hutFMR7IAu0ZTxFeUO1TJBAibLi12kteHYhQWeAvVXjb6+SI11uql2vRleu0szCr -ntYgrXVxAoGBAPlC7K2gvtFqwSshpQMWBelWKXmhgqxVFkywEAcMtIsDFKx/kmDZ -jGirXeAjiq/Y9Dn6mQFeDXyL1PS3e1hwcdrIGqQOha4AebphVX+KCtBfDv8+lOnH -1W+lJHZXmnQ2Dw/nauWrRUY4UX88DFTNjhkxFPHSecY/L8JrCMxcoBKNAoGBANLe -ndNCD5j5PNSKOUZzVHY89JSvORGblzadueJA7i9tDwj793bA5YlRtW3QaXLyWOyq -+EMiO3xAtRr4wlIZoaH31/GyS1B5+idYNrSp7tShlMfHKB6IPXYw0ZpYBCnMyfQp -GjWBvMODAKv+Lsz1pBzz2hBOHyaY7FeznnzElniNAoGBAN7X3T7xKgeReHc2Eg9r -Pge490V9hpTJUTFoajvTOQnazD3Xo6cgd24QXtIHFHNX9ChtiSL20fnaDZ5m90g+ -5xsgsOig7xR76lgdstFeOYLGqWK6sWk8Ne4lZy7B7R0eQ2MFksUX1MwNh5bHuYKL -bxHIlqAHesUpMmqPRINn/9f1AoGAY8A/dKI5cqnkZr6EXZlNCSnIoVVKb9Pkckem -mSsSAYlbpWpcI+cYLh9i7fG7EE8oVbyC+G8HKL4LbhjjA6dwWIg/tOwcyJMLDPWj -207P1fIhyWeiyN62BGUPoi2kuolPt5qB9XHL88jS1onFZduFqNSKAVCTV9TbaJll -jawJajkCgYBUvb0DkrKNW3pmlp3ALXMc1I2+Etp5mf/ihdjqquvLLasXo7IHBWS2 -P0o2wOthj2B8OINlCMaVI1/C4RPFbLiTp5wyEmay60n/+GUA+bZLlUFl7yVsZWOl -i9nW021Q/VsE39kvcIX+HcCWWog5vCB4XMF4czsDMgTkRX+gxtIUjQ== ------END RSA PRIVATE KEY----- diff --git a/sshd/id_rsa.sshd.pub b/sshd/id_rsa.sshd.pub deleted file mode 100644 index c5e8a52..0000000 --- a/sshd/id_rsa.sshd.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNUafbag/s1rw1g24uWeoCkw/OV1i3dNAwZe9vcHWcGNTcSFpVgq+XYcdB0fu0gCST1ZRdM7h3bhn5goZ0KA2AkiUXqIyzBkGoEIeDKFaht4nEDODa1BsrIPI+hilHlMNU6QDAPAvpq4iUqA4+yaZ177Mii+9RrTEQoQAPewXKQoCpcdaLUJH9/K98aKJ1KB82g0Cm8m2E/08izfD9vbW+PweZnaF2jpYgX2Zkr6yeOJaIaqfEHCEH2aPN9aeeDFUsBIPDUP1ptIRWdfWkathJZ6xwuMqnlB83fEq/r0SINlSRDPR1Uo5KrXltuEB2e1AjY27crs1uQmxPekTfek+p occupy@edge13.mydomain.internal diff --git a/sshd/sshd.py b/sshd/sshd.py deleted file mode 100644 index 49fa7e4..0000000 --- a/sshd/sshd.py +++ /dev/null @@ -1,39 +0,0 @@ -from twisted.cred.portal import Portal -from twisted.conch.ssh.factory import SSHFactory -from twisted.internet import reactor -from twisted.conch.ssh.keys import Key -from twisted.conch.interfaces import IConchUser -from twisted.conch.avatar import ConchUser -from twisted.cred.checkers import AllowAnonymousAccess - -with open('id_rsa.sshd') as privateBlobFile: - privateBlob = privateBlobFile.read() - privateKey = Key.fromString(data=privateBlob) - -with open('id_rsa.sshd.pub') as publicBlobFile: - publicBlob = publicBlobFile.read() - publicKey = Key.fromString(data=publicBlob) - -class StandardRealm(object): - def requestAvatar(self, avatarId, mind, *interfaces): - return IConchUser, ConchUser(), nothing - -class CVMChecker: - implements(ICredentialsChecker) - credentialInterfaces = ICVMUser, - - def requestAvatarId(self, credentials): - return defer.succeed("hai") - -class ICVMUser(ICredentials): - pass - -factory = SSHFactory() -factory.privateKeys = {'ssh-rsa': privateKey} -factory.publicKeys = {'ssh-rsa': publicKey} -factory.portal = Portal(StandardRealm()) - -factory.portal.registerChecker(CVMChecker()) - -reactor.listenTCP(2022, factory) -reactor.run() diff --git a/tools/locale_convert.py b/tools/locale_convert.py deleted file mode 100644 index e79c8d1..0000000 --- a/tools/locale_convert.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -import sys, json, re - -f = open(sys.argv[1]) -output = {} - -for line in f: - if not line.startswith("#"): - data = re.search("(.+?[^\\\]);(.+)", line) - - if data is not None: - key = data.group(1).replace("\;", ";").strip() - val = data.group(2).replace("\;", ";").strip() - - output[key] = { - "message": val, - "description": "" - } - -print json.dumps(output) diff --git a/tools/pysfx/b64reader.py b/tools/pysfx/b64reader.py deleted file mode 100644 index 50e451d..0000000 --- a/tools/pysfx/b64reader.py +++ /dev/null @@ -1,48 +0,0 @@ -import base64, sys, math - -class Base64Reader(object): - def __init__(self, source): - self.source = source - self.buff = "" - self.done = False - - def read(self, size = -1): - if size < 0: - return base64.b64encode(self.source.read()) - else: - if self.done == False: - if len(self.buff) < size: - actual_size = int(math.ceil(size / 3) * 3) - data = self.source.read(actual_size) - - if data == "": - self.done = True - return self.buff - - # TODO: Investigate whether the possibility exists that we get the wrong amount - # of bytes from the source read. - self.buff += base64.b64encode(data) - - if len(self.buff) > size: - returndata = self.buff[:size] - self.buff = self.buff[size:] - else: - returndata = self.buff - self.buff = "" - - return returndata - else: - returndata = self.buff[:size] - self.buff = self.buff[size:] - return returndata - else: - return "" - - def flush(self): - pass - - def write(self, data): - pass - - def close(self): - self.source.close() diff --git a/tools/pysfx/gzipreader.py b/tools/pysfx/gzipreader.py deleted file mode 100644 index ce53fc0..0000000 --- a/tools/pysfx/gzipreader.py +++ /dev/null @@ -1,47 +0,0 @@ -import zlib, sys - -class GzipReader(object): - source = None - cobj = None - done = False - buff = "" - - def __init__(self, source): - self.source = source - self.cobj = zlib.compressobj() - - def read(self, size = -1): - if self.done == False: - if size < 0: - data = self.source.read() - return self.cobj.compress(data) + self.cobj.flush(zlib.Z_FINISH) - else: - # Keep reading and compressing until we have something to return. - while len(self.buff) < size: - data = self.source.read(size) - - if data == "": - # Process the last data left in the compressor buffer. - self.buff += self.cobj.flush(zlib.Z_FINISH) - - # Mark as done to prevent calling flush(zlib.Z_FINISH) twice. - self.done = True - - return self.buff - - self.buff += self.cobj.compress(data) - - returndata = self.buff[:size] - self.buff = self.buff[size:] - return returndata - else: - return "" - - def flush(self): - pass - - def write(self, data): - pass - - def close(self): - self.source.close() diff --git a/tools/pysfx/pysfx.py b/tools/pysfx/pysfx.py deleted file mode 100644 index 3d7635a..0000000 --- a/tools/pysfx/pysfx.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python - -import zlib, base64, sys, argparse, os -from gzipreader import GzipReader -from b64reader import Base64Reader - -parser = argparse.ArgumentParser(description="Creates an SFX from a specified archive or file.") -parser.add_argument("-a", help="Treat the input file as a tar.gz archive that needs to be extracted upon running the SFX.", action="store_true", dest="is_archive") -parser.add_argument("-s", help="Define a command to be run after extraction of the SFX. %%NAME will be replaced with the path of the extracted file or folder. " - "For archives, the working directory is set to the extraction directory.", action="store", dest="command") -parser.add_argument("input_file", metavar="INPUTFILE", type=str, nargs=1, help="The file to read from. Use a dash (-) to read from STDIN instead.") -parser.add_argument("output_file", metavar="OUTPUTFILE", type=str, nargs=1, help="The file to write to. Use a dash (-) to write to STDOUT instead.") -options = vars(parser.parse_args()) - -if options['input_file'][0] == "-": - infile = sys.stdin - extension = "dat" -else: - infile = open(options['input_file'][0], "rb") - extension = os.path.splitext(options['input_file'][0]) - -if options['output_file'][0] == "-": - outfile = sys.stdout -else: - outfile = open(options['output_file'][0], "wb") - -if options['is_archive'] == True: - is_archive = "True" - extension = "tar.gz" -else: - is_archive = "False" - -if options['command']: - run_after_extract = "True" - command = options['command'] -else: - run_after_extract = "False" - command = "" - -template = open("%s/unpack.template" % os.path.dirname(__file__), "r") - -variables = { - "run_after_extract": run_after_extract, - "targz": is_archive, - "extension": extension, - "command": command -} - -for curline in template: - if curline.startswith('"""EOFDATA'): - # Found the EOF data marker, insert packed data before - # moving on with the next line. - outfile.write(curline) - - data = b"" - reader = Base64Reader(GzipReader(infile)) - chunk_size = 128 - - while True: - chunk = reader.read(chunk_size) - - if chunk == "": - break - - outfile.write(chunk + "\n") - else: - if "{%" in curline: - for variable_key, variable_value in variables.iteritems(): - curline = curline.replace("{%%%s}" % variable_key, variable_value) - - outfile.write(curline) - -outfile.close() diff --git a/tools/pysfx/unpack.template b/tools/pysfx/unpack.template deleted file mode 100644 index f25de8f..0000000 --- a/tools/pysfx/unpack.template +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -import zlib, base64, sys, os, random, shlex, subprocess - -run_after_extract = {%run_after_extract} -targz = {%targz} -extension = "{%extension}" -command = "{%command}" - -try: - if sys.argv[1] != "-q": - quiet = True - else: - quiet = False -except IndexError: - quiet = False - -if quiet == False: - sys.stdout.write("PySFX 1.0 by Sven Slootweg http://cryto.net/pysfx\n") - sys.stdout.write("PySFX may be reused, modified, and redistributed freely without restriction under the WTFPL.\n\n") - -identifier = "pysfx-%s" % "".join(["abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[random.randint(0, 61)] for i in xrange(0, 16)]) -directory_destination = "/var/tmp/%s" % identifier -file_destination = "/var/tmp/%s.%s" % (identifier, extension) - -if targz == True: - name = "/var/tmp/%s" -else: - name = "/var/tmp/%s.%s" % (identifier, extension) - -reader = open(__file__, "rb") -reading_data = False - -writer = open(file_destination, "wb") - -dobj = zlib.decompressobj() - -total_bytes = 0 -original_bytes = 0 - -for line in reader: - if line.startswith('"""'): - reading_data = False - - if reading_data == True: - data = dobj.decompress(base64.b64decode(line.rstrip("\r\n"))) - writer.write(data) - total_bytes += (len(line) - 1) - original_bytes += len(data) - - if line.startswith('"""EOFDATA'): - reading_data = True - -writer.write(dobj.flush()) -writer.close() - -reader.close() - -if quiet == False: - sys.stdout.write("Processed %d bytes, of which %d bytes were written to %s.\n" % (total_bytes, original_bytes, file_destination)) - -if targz == True: - stfu = open(os.devnull, 'w') - - if quiet == False: - sys.stdout.write("Unpacking archive...\n") - - os.makedirs(directory_destination) - - result = subprocess.call(["tar", "-xzf", file_destination, "-C", directory_destination], stdout=stfu, stderr=stfu) - - if result != 0: - sys.stderr.write("Extraction of inner archive failed. The file may be corrupted.\n") - exit(1) - -if run_after_extract == True: - tokens = shlex.split(command) - result = subprocess.call(tokens, cwd=directory_destination) - - if result != 0: - sys.stderr.write("Autorun command failed. The file may be corrupted.\n") - exit(1) - -"""EOFDATA -"""