first commit
15
.htaccess
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Put your installation directory here:
|
||||||
|
# If your URL is www.example.com/, use /
|
||||||
|
# If your URL is www.example.com/site_folder/, use /site_folder/
|
||||||
|
|
||||||
|
RewriteBase /everseiko
|
||||||
|
|
||||||
|
# Do not enable rewriting for files or directories that exist
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
||||||
|
# For reuests that are not actual files or directories,
|
||||||
|
# Rewrite to index.php/URL
|
||||||
|
RewriteRule ^(.*)$ index.php/$1 [PT,L]
|
1
application/.htaccess
Normal file
@ -0,0 +1 @@
|
|||||||
|
Deny from all
|
1
application/cache/.htaccess
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
deny from all
|
10
application/cache/index.html
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
116
application/config/autoload.php
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| AUTO-LOADER
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file specifies which systems should be loaded by default.
|
||||||
|
|
|
||||||
|
| In order to keep the framework as light-weight as possible only the
|
||||||
|
| absolute minimal resources are loaded by default. For example,
|
||||||
|
| the database is not connected to automatically since no assumption
|
||||||
|
| is made regarding whether you intend to use it. This file lets
|
||||||
|
| you globally define which systems you would like loaded with every
|
||||||
|
| request.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Instructions
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These are the things you can load automatically:
|
||||||
|
|
|
||||||
|
| 1. Packages
|
||||||
|
| 2. Libraries
|
||||||
|
| 3. Helper files
|
||||||
|
| 4. Custom config files
|
||||||
|
| 5. Language files
|
||||||
|
| 6. Models
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Packges
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['packages'] = array();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Libraries
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| These are the classes located in the system/libraries folder
|
||||||
|
| or in your application/libraries folder.
|
||||||
|
|
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['libraries'] = array('database','session','auth');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Helper Files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['helper'] = array('url', 'file');
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['helper'] = array('url','form');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Config files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['config'] = array('config1', 'config2');
|
||||||
|
|
|
||||||
|
| NOTE: This item is intended for use ONLY if you have created custom
|
||||||
|
| config files. Otherwise, leave it blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['config'] = array();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Language files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['language'] = array('lang1', 'lang2');
|
||||||
|
|
|
||||||
|
| NOTE: Do not include the "_lang" part of your file. For example
|
||||||
|
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['language'] = array();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Models
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['model'] = array('model1', 'model2');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$autoload['model'] = array();
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file autoload.php */
|
||||||
|
/* Location: ./application/config/autoload.php */
|
362
application/config/config.php
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Site URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||||
|
| WITH a trailing slash:
|
||||||
|
|
|
||||||
|
| http://example.com/
|
||||||
|
|
|
||||||
|
| If this is not set then CodeIgniter will guess the protocol, domain and
|
||||||
|
| path to your installation.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['base_url'] = 'http://localhost:8080/everseiko';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Index File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Typically this will be your index.php file, unless you've renamed it to
|
||||||
|
| something else. If you are using mod_rewrite to remove the page set this
|
||||||
|
| variable so that it is blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['index_page'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URI PROTOCOL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item determines which server global should be used to retrieve the
|
||||||
|
| URI string. The default setting of 'AUTO' works for most servers.
|
||||||
|
| If your links do not seem to work, try one of the other delicious flavors:
|
||||||
|
|
|
||||||
|
| 'AUTO' Default - auto detects
|
||||||
|
| 'PATH_INFO' Uses the PATH_INFO
|
||||||
|
| 'QUERY_STRING' Uses the QUERY_STRING
|
||||||
|
| 'REQUEST_URI' Uses the REQUEST_URI
|
||||||
|
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['uri_protocol'] = 'AUTO';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URL suffix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||||
|
| For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| http://codeigniter.com/user_guide/general/urls.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
$config['url_suffix'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Language
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which set of language files should be used. Make sure
|
||||||
|
| there is an available translation if you intend to use something other
|
||||||
|
| than english.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['language'] = 'english';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Character Set
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which character set is used by default in various methods
|
||||||
|
| that require a character set to be provided.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['charset'] = 'UTF-8';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable System Hooks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you would like to use the 'hooks' feature you must enable it by
|
||||||
|
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['enable_hooks'] = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Extension Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item allows you to set the filename/classname prefix when extending
|
||||||
|
| native libraries. For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| http://codeigniter.com/user_guide/general/core_classes.html
|
||||||
|
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['subclass_prefix'] = 'MY_';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allowed URL Characters
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This lets you specify with a regular expression which characters are permitted
|
||||||
|
| within your URLs. When someone tries to submit a URL with disallowed
|
||||||
|
| characters they will get a warning message.
|
||||||
|
|
|
||||||
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||||
|
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||||
|
|
|
||||||
|
| Leave blank to allow all characters -- but only if you are insane.
|
||||||
|
|
|
||||||
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable Query Strings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||||
|
| example.com/who/what/where/
|
||||||
|
|
|
||||||
|
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||||
|
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||||
|
|
|
||||||
|
| You can optionally enable standard query string based URLs:
|
||||||
|
| example.com?who=me&what=something&where=here
|
||||||
|
|
|
||||||
|
| Options are: TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
| The other items let you set the query string 'words' that will
|
||||||
|
| invoke your controllers and its functions:
|
||||||
|
| example.com/index.php?c=controller&m=function
|
||||||
|
|
|
||||||
|
| Please note that some of the helpers won't work as expected when
|
||||||
|
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||||
|
| use segment based URLs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['allow_get_array'] = TRUE;
|
||||||
|
$config['enable_query_strings'] = FALSE;
|
||||||
|
$config['controller_trigger'] = 'c';
|
||||||
|
$config['function_trigger'] = 'm';
|
||||||
|
$config['directory_trigger'] = 'd'; // experimental not currently in use
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Threshold
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you have enabled error logging, you can set an error threshold to
|
||||||
|
| determine what gets logged. Threshold options are:
|
||||||
|
| You can enable error logging by setting a threshold over zero. The
|
||||||
|
| threshold determines what gets logged. Threshold options are:
|
||||||
|
|
|
||||||
|
| 0 = Disables logging, Error logging TURNED OFF
|
||||||
|
| 1 = Error Messages (including PHP errors)
|
||||||
|
| 2 = Debug Messages
|
||||||
|
| 3 = Informational Messages
|
||||||
|
| 4 = All Messages
|
||||||
|
|
|
||||||
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||||
|
| your log files will fill up very fast.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_threshold'] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/logs/ folder. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Date Format for Logs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Each item that is logged has an associated date. You can use PHP date
|
||||||
|
| codes to set your own date formatting
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| system/cache/ folder. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cache_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you use the Encryption class or the Session class you
|
||||||
|
| MUST set an encryption key. See the user guide for info.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['encryption_key'] = 'tugaskp';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'sess_cookie_name' = the name you want for the cookie
|
||||||
|
| 'sess_expiration' = the number of SECONDS you want the session to last.
|
||||||
|
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
|
||||||
|
| 'sess_expire_on_close' = Whether to cause the session to expire automatically
|
||||||
|
| when the browser window is closed
|
||||||
|
| 'sess_encrypt_cookie' = Whether to encrypt the cookie
|
||||||
|
| 'sess_use_database' = Whether to save the session data to a database
|
||||||
|
| 'sess_table_name' = The name of the session database table
|
||||||
|
| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
|
||||||
|
| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
|
||||||
|
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['sess_cookie_name'] = 'ci_session';
|
||||||
|
$config['sess_expiration'] = 7200;
|
||||||
|
$config['sess_expire_on_close'] = FALSE;
|
||||||
|
$config['sess_encrypt_cookie'] = FALSE;
|
||||||
|
$config['sess_use_database'] = FALSE;
|
||||||
|
$config['sess_table_name'] = 'ci_sessions';
|
||||||
|
$config['sess_match_ip'] = FALSE;
|
||||||
|
$config['sess_match_useragent'] = TRUE;
|
||||||
|
$config['sess_time_to_update'] = 300;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cookie Related Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
|
||||||
|
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||||
|
| 'cookie_path' = Typically will be a forward slash
|
||||||
|
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cookie_prefix'] = "";
|
||||||
|
$config['cookie_domain'] = "";
|
||||||
|
$config['cookie_path'] = "/";
|
||||||
|
$config['cookie_secure'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global XSS Filtering
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines whether the XSS filter is always active when GET, POST or
|
||||||
|
| COOKIE data is encountered
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['global_xss_filtering'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross Site Request Forgery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||||
|
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||||
|
| recommended CSRF protection be enabled.
|
||||||
|
|
|
||||||
|
| 'csrf_token_name' = The token name
|
||||||
|
| 'csrf_cookie_name' = The cookie name
|
||||||
|
| 'csrf_expire' = The number in seconds the token should expire.
|
||||||
|
*/
|
||||||
|
$config['csrf_protection'] = FALSE;
|
||||||
|
$config['csrf_token_name'] = 'csrf_test_name';
|
||||||
|
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||||
|
$config['csrf_expire'] = 7200;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Output Compression
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enables Gzip output compression for faster page loads. When enabled,
|
||||||
|
| the output class will test whether your server supports Gzip.
|
||||||
|
| Even if it does, however, not all browsers support compression
|
||||||
|
| so enable only if you are reasonably sure your visitors can handle it.
|
||||||
|
|
|
||||||
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||||
|
| means you are prematurely outputting something to your browser. It could
|
||||||
|
| even be a line of whitespace at the end of one of your scripts. For
|
||||||
|
| compression to work, nothing can be sent before the output buffer is called
|
||||||
|
| by the output class. Do not 'echo' any values with compression enabled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['compress_output'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Master Time Reference
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Options are 'local' or 'gmt'. This pref tells the system whether to use
|
||||||
|
| your server's local time as the master 'now' reference, or convert it to
|
||||||
|
| GMT. See the 'date helper' page of the user guide for information
|
||||||
|
| regarding date handling.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['time_reference'] = 'local';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Rewrite PHP Short Tags
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your PHP installation does not have short tag support enabled CI
|
||||||
|
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||||
|
| in your view files. Options are TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['rewrite_short_tags'] = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Reverse Proxy IPs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your server is behind a reverse proxy, you must whitelist the proxy IP
|
||||||
|
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
|
||||||
|
| header in order to properly identify the visitor's IP address.
|
||||||
|
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['proxy_ips'] = '';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file config.php */
|
||||||
|
/* Location: ./application/config/config.php */
|
41
application/config/constants.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File and Directory Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These prefs are used when checking and setting modes when working
|
||||||
|
| with the file system. The defaults are fine on servers with proper
|
||||||
|
| security, but you may wish (or even need) to change the values in
|
||||||
|
| certain environments (Apache running a separate process for each
|
||||||
|
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||||
|
| always be used to set the mode correctly.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
define('FILE_READ_MODE', 0644);
|
||||||
|
define('FILE_WRITE_MODE', 0666);
|
||||||
|
define('DIR_READ_MODE', 0755);
|
||||||
|
define('DIR_WRITE_MODE', 0777);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File Stream Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These modes are used when working with fopen()/popen()
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
define('FOPEN_READ', 'rb');
|
||||||
|
define('FOPEN_READ_WRITE', 'r+b');
|
||||||
|
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
||||||
|
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
||||||
|
define('FOPEN_WRITE_CREATE', 'ab');
|
||||||
|
define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
||||||
|
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
||||||
|
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file constants.php */
|
||||||
|
/* Location: ./application/config/constants.php */
|
74
application/config/database.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| DATABASE CONNECTIVITY SETTINGS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file will contain the settings needed to access your database.
|
||||||
|
|
|
||||||
|
| For complete instructions please consult the 'Database Connection'
|
||||||
|
| page of the User Guide.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| EXPLANATION OF VARIABLES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| ['hostname'] The hostname of your database server.
|
||||||
|
| ['username'] The username used to connect to the database
|
||||||
|
| ['password'] The password used to connect to the database
|
||||||
|
| ['database'] The name of the database you want to connect to
|
||||||
|
| ['dbdriver'] The database type. ie: mysql. Currently supported:
|
||||||
|
mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
|
||||||
|
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||||
|
| to the table name when using the Active Record class
|
||||||
|
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||||
|
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||||
|
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||||
|
| ['cachedir'] The path to the folder where cache files should be stored
|
||||||
|
| ['char_set'] The character set used in communicating with the database
|
||||||
|
| ['dbcollat'] The character collation used in communicating with the database
|
||||||
|
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
||||||
|
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
||||||
|
| (and in table creation queries made with DB Forge).
|
||||||
|
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
||||||
|
| can make your site vulnerable to SQL injection if you are using a
|
||||||
|
| multi-byte character set and are running versions lower than these.
|
||||||
|
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
||||||
|
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
||||||
|
| ['autoinit'] Whether or not to automatically initialize the database.
|
||||||
|
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
||||||
|
| - good for ensuring strict SQL while developing
|
||||||
|
|
|
||||||
|
| The $active_group variable lets you choose which connection group to
|
||||||
|
| make active. By default there is only one group (the 'default' group).
|
||||||
|
|
|
||||||
|
| The $active_record variables lets you determine whether or not to load
|
||||||
|
| the active record class
|
||||||
|
*/
|
||||||
|
|
||||||
|
$active_group = 'default';
|
||||||
|
$active_record = TRUE;
|
||||||
|
|
||||||
|
//local
|
||||||
|
$db['default']['hostname'] = 'localhost';
|
||||||
|
$db['default']['username'] = 'project';
|
||||||
|
$db['default']['password'] = '';
|
||||||
|
//external
|
||||||
|
//$db['default']['hostname'] = '10.10.10.21';
|
||||||
|
//$db['default']['username'] = 'admin';
|
||||||
|
//$db['default']['password'] = 'admin';
|
||||||
|
$db['default']['database'] = 'db_everseiko';
|
||||||
|
$db['default']['dbdriver'] = 'mysql';
|
||||||
|
$db['default']['dbprefix'] = '';
|
||||||
|
$db['default']['pconnect'] = TRUE;
|
||||||
|
$db['default']['db_debug'] = TRUE;
|
||||||
|
$db['default']['cache_on'] = FALSE;
|
||||||
|
$db['default']['cachedir'] = '';
|
||||||
|
$db['default']['char_set'] = 'utf8';
|
||||||
|
$db['default']['dbcollat'] = 'utf8_general_ci';
|
||||||
|
$db['default']['swap_pre'] = '';
|
||||||
|
$db['default']['autoinit'] = TRUE;
|
||||||
|
$db['default']['stricton'] = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file database.php */
|
||||||
|
/* Location: ./application/config/database.php */
|
15
application/config/doctypes.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
$_doctypes = array(
|
||||||
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||||
|
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||||
|
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||||
|
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||||
|
'html5' => '<!DOCTYPE html>',
|
||||||
|
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||||
|
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||||
|
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
|
||||||
|
);
|
||||||
|
|
||||||
|
/* End of file doctypes.php */
|
||||||
|
/* Location: ./application/config/doctypes.php */
|
64
application/config/foreign_chars.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Foreign Characters
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of foreign characters for transliteration
|
||||||
|
| conversion used by the Text helper
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$foreign_characters = array(
|
||||||
|
'/ä|æ|ǽ/' => 'ae',
|
||||||
|
'/ö|œ/' => 'oe',
|
||||||
|
'/ü/' => 'ue',
|
||||||
|
'/Ä/' => 'Ae',
|
||||||
|
'/Ü/' => 'Ue',
|
||||||
|
'/Ö/' => 'Oe',
|
||||||
|
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
|
||||||
|
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
|
||||||
|
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
||||||
|
'/ç|ć|ĉ|ċ|č/' => 'c',
|
||||||
|
'/Ð|Ď|Đ/' => 'D',
|
||||||
|
'/ð|ď|đ/' => 'd',
|
||||||
|
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
|
||||||
|
'/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
|
||||||
|
'/Ĝ|Ğ|Ġ|Ģ/' => 'G',
|
||||||
|
'/ĝ|ğ|ġ|ģ/' => 'g',
|
||||||
|
'/Ĥ|Ħ/' => 'H',
|
||||||
|
'/ĥ|ħ/' => 'h',
|
||||||
|
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
|
||||||
|
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
|
||||||
|
'/Ĵ/' => 'J',
|
||||||
|
'/ĵ/' => 'j',
|
||||||
|
'/Ķ/' => 'K',
|
||||||
|
'/ķ/' => 'k',
|
||||||
|
'/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
|
||||||
|
'/ĺ|ļ|ľ|ŀ|ł/' => 'l',
|
||||||
|
'/Ñ|Ń|Ņ|Ň/' => 'N',
|
||||||
|
'/ñ|ń|ņ|ň|ʼn/' => 'n',
|
||||||
|
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
|
||||||
|
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
|
||||||
|
'/Ŕ|Ŗ|Ř/' => 'R',
|
||||||
|
'/ŕ|ŗ|ř/' => 'r',
|
||||||
|
'/Ś|Ŝ|Ş|Š/' => 'S',
|
||||||
|
'/ś|ŝ|ş|š|ſ/' => 's',
|
||||||
|
'/Ţ|Ť|Ŧ/' => 'T',
|
||||||
|
'/ţ|ť|ŧ/' => 't',
|
||||||
|
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
|
||||||
|
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
|
||||||
|
'/Ý|Ÿ|Ŷ/' => 'Y',
|
||||||
|
'/ý|ÿ|ŷ/' => 'y',
|
||||||
|
'/Ŵ/' => 'W',
|
||||||
|
'/ŵ/' => 'w',
|
||||||
|
'/Ź|Ż|Ž/' => 'Z',
|
||||||
|
'/ź|ż|ž/' => 'z',
|
||||||
|
'/Æ|Ǽ/' => 'AE',
|
||||||
|
'/ß/'=> 'ss',
|
||||||
|
'/IJ/' => 'IJ',
|
||||||
|
'/ij/' => 'ij',
|
||||||
|
'/Œ/' => 'OE',
|
||||||
|
'/ƒ/' => 'f'
|
||||||
|
);
|
||||||
|
|
||||||
|
/* End of file foreign_chars.php */
|
||||||
|
/* Location: ./application/config/foreign_chars.php */
|
16
application/config/hooks.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Hooks
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you define "hooks" to extend CI without hacking the core
|
||||||
|
| files. Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| http://codeigniter.com/user_guide/general/hooks.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file hooks.php */
|
||||||
|
/* Location: ./application/config/hooks.php */
|
10
application/config/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
41
application/config/migration.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable Migrations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Migrations are disabled by default but should be enabled
|
||||||
|
| whenever you intend to do a schema migration.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_enabled'] = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations version
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is used to set migration version that the file system should be on.
|
||||||
|
| If you run $this->migration->latest() this is the version that schema will
|
||||||
|
| be upgraded / downgraded to.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_version'] = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Path to your migrations folder.
|
||||||
|
| Typically, it will be within your application path.
|
||||||
|
| Also, writing permission is required within the migrations path.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_path'] = APPPATH . 'migrations/';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file migration.php */
|
||||||
|
/* Location: ./application/config/migration.php */
|
106
application/config/mimes.php
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| MIME TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of mime types. It is used by the
|
||||||
|
| Upload class to help identify allowed file types.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$mimes = array( 'hqx' => 'application/mac-binhex40',
|
||||||
|
'cpt' => 'application/mac-compactpro',
|
||||||
|
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
|
||||||
|
'bin' => 'application/macbinary',
|
||||||
|
'dms' => 'application/octet-stream',
|
||||||
|
'lha' => 'application/octet-stream',
|
||||||
|
'lzh' => 'application/octet-stream',
|
||||||
|
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||||
|
'class' => 'application/octet-stream',
|
||||||
|
'psd' => 'application/x-photoshop',
|
||||||
|
'so' => 'application/octet-stream',
|
||||||
|
'sea' => 'application/octet-stream',
|
||||||
|
'dll' => 'application/octet-stream',
|
||||||
|
'oda' => 'application/oda',
|
||||||
|
'pdf' => array('application/pdf', 'application/x-download'),
|
||||||
|
'ai' => 'application/postscript',
|
||||||
|
'eps' => 'application/postscript',
|
||||||
|
'ps' => 'application/postscript',
|
||||||
|
'smi' => 'application/smil',
|
||||||
|
'smil' => 'application/smil',
|
||||||
|
'mif' => 'application/vnd.mif',
|
||||||
|
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
|
||||||
|
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
|
||||||
|
'wbxml' => 'application/wbxml',
|
||||||
|
'wmlc' => 'application/wmlc',
|
||||||
|
'dcr' => 'application/x-director',
|
||||||
|
'dir' => 'application/x-director',
|
||||||
|
'dxr' => 'application/x-director',
|
||||||
|
'dvi' => 'application/x-dvi',
|
||||||
|
'gtar' => 'application/x-gtar',
|
||||||
|
'gz' => 'application/x-gzip',
|
||||||
|
'php' => 'application/x-httpd-php',
|
||||||
|
'php4' => 'application/x-httpd-php',
|
||||||
|
'php3' => 'application/x-httpd-php',
|
||||||
|
'phtml' => 'application/x-httpd-php',
|
||||||
|
'phps' => 'application/x-httpd-php-source',
|
||||||
|
'js' => 'application/x-javascript',
|
||||||
|
'swf' => 'application/x-shockwave-flash',
|
||||||
|
'sit' => 'application/x-stuffit',
|
||||||
|
'tar' => 'application/x-tar',
|
||||||
|
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||||
|
'xhtml' => 'application/xhtml+xml',
|
||||||
|
'xht' => 'application/xhtml+xml',
|
||||||
|
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
|
||||||
|
'mid' => 'audio/midi',
|
||||||
|
'midi' => 'audio/midi',
|
||||||
|
'mpga' => 'audio/mpeg',
|
||||||
|
'mp2' => 'audio/mpeg',
|
||||||
|
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||||
|
'aif' => 'audio/x-aiff',
|
||||||
|
'aiff' => 'audio/x-aiff',
|
||||||
|
'aifc' => 'audio/x-aiff',
|
||||||
|
'ram' => 'audio/x-pn-realaudio',
|
||||||
|
'rm' => 'audio/x-pn-realaudio',
|
||||||
|
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||||
|
'ra' => 'audio/x-realaudio',
|
||||||
|
'rv' => 'video/vnd.rn-realvideo',
|
||||||
|
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
||||||
|
'bmp' => array('image/bmp', 'image/x-windows-bmp'),
|
||||||
|
'gif' => 'image/gif',
|
||||||
|
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'png' => array('image/png', 'image/x-png'),
|
||||||
|
'tiff' => 'image/tiff',
|
||||||
|
'tif' => 'image/tiff',
|
||||||
|
'css' => 'text/css',
|
||||||
|
'html' => 'text/html',
|
||||||
|
'htm' => 'text/html',
|
||||||
|
'shtml' => 'text/html',
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'text' => 'text/plain',
|
||||||
|
'log' => array('text/plain', 'text/x-log'),
|
||||||
|
'rtx' => 'text/richtext',
|
||||||
|
'rtf' => 'text/rtf',
|
||||||
|
'xml' => 'text/xml',
|
||||||
|
'xsl' => 'text/xml',
|
||||||
|
'mpeg' => 'video/mpeg',
|
||||||
|
'mpg' => 'video/mpeg',
|
||||||
|
'mpe' => 'video/mpeg',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
'mov' => 'video/quicktime',
|
||||||
|
'avi' => 'video/x-msvideo',
|
||||||
|
'movie' => 'video/x-sgi-movie',
|
||||||
|
'doc' => 'application/msword',
|
||||||
|
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
|
||||||
|
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
|
||||||
|
'word' => array('application/msword', 'application/octet-stream'),
|
||||||
|
'xl' => 'application/excel',
|
||||||
|
'eml' => 'message/rfc822',
|
||||||
|
'json' => array('application/json', 'text/json')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file mimes.php */
|
||||||
|
/* Location: ./application/config/mimes.php */
|
17
application/config/profiler.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Profiler Sections
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you determine whether or not various sections of Profiler
|
||||||
|
| data are displayed when the Profiler is enabled.
|
||||||
|
| Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| http://codeigniter.com/user_guide/general/profiling.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file profiler.php */
|
||||||
|
/* Location: ./application/config/profiler.php */
|
46
application/config/routes.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| URI ROUTING
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you re-map URI requests to specific controller functions.
|
||||||
|
|
|
||||||
|
| Typically there is a one-to-one relationship between a URL string
|
||||||
|
| and its corresponding controller class/method. The segments in a
|
||||||
|
| URL normally follow this pattern:
|
||||||
|
|
|
||||||
|
| example.com/class/method/id/
|
||||||
|
|
|
||||||
|
| In some instances, however, you may want to remap this relationship
|
||||||
|
| so that a different class/function is called than the one
|
||||||
|
| corresponding to the URL.
|
||||||
|
|
|
||||||
|
| Please see the user guide for complete details:
|
||||||
|
|
|
||||||
|
| http://codeigniter.com/user_guide/general/routing.html
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| RESERVED ROUTES
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| There area two reserved routes:
|
||||||
|
|
|
||||||
|
| $route['default_controller'] = 'welcome';
|
||||||
|
|
|
||||||
|
| This route indicates which controller class should be loaded if the
|
||||||
|
| URI contains no data. In the above example, the "welcome" class
|
||||||
|
| would be loaded.
|
||||||
|
|
|
||||||
|
| $route['404_override'] = 'errors/page_missing';
|
||||||
|
|
|
||||||
|
| This route will tell the Router what URI segments to use if those provided
|
||||||
|
| in the URL cannot be matched to a valid route.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$route['default_controller'] = "user";
|
||||||
|
$route['404_override'] = '';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file routes.php */
|
||||||
|
/* Location: ./application/config/routes.php */
|
66
application/config/smileys.php
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| SMILEYS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of smileys for use with the emoticon helper.
|
||||||
|
| Individual images can be used to replace multiple simileys. For example:
|
||||||
|
| :-) and :) use the same image replacement.
|
||||||
|
|
|
||||||
|
| Please see user guide for more info:
|
||||||
|
| http://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$smileys = array(
|
||||||
|
|
||||||
|
// smiley image name width height alt
|
||||||
|
|
||||||
|
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||||
|
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||||
|
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||||
|
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||||
|
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||||
|
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||||
|
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||||
|
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||||
|
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||||
|
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||||
|
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||||
|
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||||
|
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
||||||
|
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||||
|
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||||
|
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||||
|
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||||
|
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||||
|
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||||
|
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||||
|
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||||
|
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||||
|
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||||
|
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||||
|
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||||
|
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||||
|
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||||
|
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||||
|
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||||
|
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||||
|
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||||
|
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||||
|
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||||
|
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||||
|
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||||
|
':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'),
|
||||||
|
':question:' => array('question.gif', '19', '19', 'question') // no comma after last item
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
/* End of file smileys.php */
|
||||||
|
/* Location: ./application/config/smileys.php */
|
178
application/config/user_agents.php
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| USER AGENT TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains four arrays of user agent data. It is used by the
|
||||||
|
| User Agent Class to help identify browser, platform, robot, and
|
||||||
|
| mobile device data. The array keys are used to identify the device
|
||||||
|
| and the array values are used to set the actual name of the item.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$platforms = array (
|
||||||
|
'windows nt 6.0' => 'Windows Longhorn',
|
||||||
|
'windows nt 5.2' => 'Windows 2003',
|
||||||
|
'windows nt 5.0' => 'Windows 2000',
|
||||||
|
'windows nt 5.1' => 'Windows XP',
|
||||||
|
'windows nt 4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt 4.0' => 'Windows NT',
|
||||||
|
'winnt' => 'Windows NT',
|
||||||
|
'windows 98' => 'Windows 98',
|
||||||
|
'win98' => 'Windows 98',
|
||||||
|
'windows 95' => 'Windows 95',
|
||||||
|
'win95' => 'Windows 95',
|
||||||
|
'windows' => 'Unknown Windows OS',
|
||||||
|
'os x' => 'Mac OS X',
|
||||||
|
'ppc mac' => 'Power PC Mac',
|
||||||
|
'freebsd' => 'FreeBSD',
|
||||||
|
'ppc' => 'Macintosh',
|
||||||
|
'linux' => 'Linux',
|
||||||
|
'debian' => 'Debian',
|
||||||
|
'sunos' => 'Sun Solaris',
|
||||||
|
'beos' => 'BeOS',
|
||||||
|
'apachebench' => 'ApacheBench',
|
||||||
|
'aix' => 'AIX',
|
||||||
|
'irix' => 'Irix',
|
||||||
|
'osf' => 'DEC OSF',
|
||||||
|
'hp-ux' => 'HP-UX',
|
||||||
|
'netbsd' => 'NetBSD',
|
||||||
|
'bsdi' => 'BSDi',
|
||||||
|
'openbsd' => 'OpenBSD',
|
||||||
|
'gnu' => 'GNU/Linux',
|
||||||
|
'unix' => 'Unknown Unix OS'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// The order of this array should NOT be changed. Many browsers return
|
||||||
|
// multiple browser types so we want to identify the sub-type first.
|
||||||
|
$browsers = array(
|
||||||
|
'Flock' => 'Flock',
|
||||||
|
'Chrome' => 'Chrome',
|
||||||
|
'Opera' => 'Opera',
|
||||||
|
'MSIE' => 'Internet Explorer',
|
||||||
|
'Internet Explorer' => 'Internet Explorer',
|
||||||
|
'Shiira' => 'Shiira',
|
||||||
|
'Firefox' => 'Firefox',
|
||||||
|
'Chimera' => 'Chimera',
|
||||||
|
'Phoenix' => 'Phoenix',
|
||||||
|
'Firebird' => 'Firebird',
|
||||||
|
'Camino' => 'Camino',
|
||||||
|
'Netscape' => 'Netscape',
|
||||||
|
'OmniWeb' => 'OmniWeb',
|
||||||
|
'Safari' => 'Safari',
|
||||||
|
'Mozilla' => 'Mozilla',
|
||||||
|
'Konqueror' => 'Konqueror',
|
||||||
|
'icab' => 'iCab',
|
||||||
|
'Lynx' => 'Lynx',
|
||||||
|
'Links' => 'Links',
|
||||||
|
'hotjava' => 'HotJava',
|
||||||
|
'amaya' => 'Amaya',
|
||||||
|
'IBrowse' => 'IBrowse'
|
||||||
|
);
|
||||||
|
|
||||||
|
$mobiles = array(
|
||||||
|
// legacy array, old values commented out
|
||||||
|
'mobileexplorer' => 'Mobile Explorer',
|
||||||
|
// 'openwave' => 'Open Wave',
|
||||||
|
// 'opera mini' => 'Opera Mini',
|
||||||
|
// 'operamini' => 'Opera Mini',
|
||||||
|
// 'elaine' => 'Palm',
|
||||||
|
'palmsource' => 'Palm',
|
||||||
|
// 'digital paths' => 'Palm',
|
||||||
|
// 'avantgo' => 'Avantgo',
|
||||||
|
// 'xiino' => 'Xiino',
|
||||||
|
'palmscape' => 'Palmscape',
|
||||||
|
// 'nokia' => 'Nokia',
|
||||||
|
// 'ericsson' => 'Ericsson',
|
||||||
|
// 'blackberry' => 'BlackBerry',
|
||||||
|
// 'motorola' => 'Motorola'
|
||||||
|
|
||||||
|
// Phones and Manufacturers
|
||||||
|
'motorola' => "Motorola",
|
||||||
|
'nokia' => "Nokia",
|
||||||
|
'palm' => "Palm",
|
||||||
|
'iphone' => "Apple iPhone",
|
||||||
|
'ipad' => "iPad",
|
||||||
|
'ipod' => "Apple iPod Touch",
|
||||||
|
'sony' => "Sony Ericsson",
|
||||||
|
'ericsson' => "Sony Ericsson",
|
||||||
|
'blackberry' => "BlackBerry",
|
||||||
|
'cocoon' => "O2 Cocoon",
|
||||||
|
'blazer' => "Treo",
|
||||||
|
'lg' => "LG",
|
||||||
|
'amoi' => "Amoi",
|
||||||
|
'xda' => "XDA",
|
||||||
|
'mda' => "MDA",
|
||||||
|
'vario' => "Vario",
|
||||||
|
'htc' => "HTC",
|
||||||
|
'samsung' => "Samsung",
|
||||||
|
'sharp' => "Sharp",
|
||||||
|
'sie-' => "Siemens",
|
||||||
|
'alcatel' => "Alcatel",
|
||||||
|
'benq' => "BenQ",
|
||||||
|
'ipaq' => "HP iPaq",
|
||||||
|
'mot-' => "Motorola",
|
||||||
|
'playstation portable' => "PlayStation Portable",
|
||||||
|
'hiptop' => "Danger Hiptop",
|
||||||
|
'nec-' => "NEC",
|
||||||
|
'panasonic' => "Panasonic",
|
||||||
|
'philips' => "Philips",
|
||||||
|
'sagem' => "Sagem",
|
||||||
|
'sanyo' => "Sanyo",
|
||||||
|
'spv' => "SPV",
|
||||||
|
'zte' => "ZTE",
|
||||||
|
'sendo' => "Sendo",
|
||||||
|
|
||||||
|
// Operating Systems
|
||||||
|
'symbian' => "Symbian",
|
||||||
|
'SymbianOS' => "SymbianOS",
|
||||||
|
'elaine' => "Palm",
|
||||||
|
'palm' => "Palm",
|
||||||
|
'series60' => "Symbian S60",
|
||||||
|
'windows ce' => "Windows CE",
|
||||||
|
|
||||||
|
// Browsers
|
||||||
|
'obigo' => "Obigo",
|
||||||
|
'netfront' => "Netfront Browser",
|
||||||
|
'openwave' => "Openwave Browser",
|
||||||
|
'mobilexplorer' => "Mobile Explorer",
|
||||||
|
'operamini' => "Opera Mini",
|
||||||
|
'opera mini' => "Opera Mini",
|
||||||
|
|
||||||
|
// Other
|
||||||
|
'digital paths' => "Digital Paths",
|
||||||
|
'avantgo' => "AvantGo",
|
||||||
|
'xiino' => "Xiino",
|
||||||
|
'novarra' => "Novarra Transcoder",
|
||||||
|
'vodafone' => "Vodafone",
|
||||||
|
'docomo' => "NTT DoCoMo",
|
||||||
|
'o2' => "O2",
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
'mobile' => "Generic Mobile",
|
||||||
|
'wireless' => "Generic Mobile",
|
||||||
|
'j2me' => "Generic Mobile",
|
||||||
|
'midp' => "Generic Mobile",
|
||||||
|
'cldc' => "Generic Mobile",
|
||||||
|
'up.link' => "Generic Mobile",
|
||||||
|
'up.browser' => "Generic Mobile",
|
||||||
|
'smartphone' => "Generic Mobile",
|
||||||
|
'cellphone' => "Generic Mobile"
|
||||||
|
);
|
||||||
|
|
||||||
|
// There are hundreds of bots but these are the most common.
|
||||||
|
$robots = array(
|
||||||
|
'googlebot' => 'Googlebot',
|
||||||
|
'msnbot' => 'MSNBot',
|
||||||
|
'slurp' => 'Inktomi Slurp',
|
||||||
|
'yahoo' => 'Yahoo',
|
||||||
|
'askjeeves' => 'AskJeeves',
|
||||||
|
'fastcrawler' => 'FastCrawler',
|
||||||
|
'infoseek' => 'InfoSeek Robot 1.0',
|
||||||
|
'lycos' => 'Lycos'
|
||||||
|
);
|
||||||
|
|
||||||
|
/* End of file user_agents.php */
|
||||||
|
/* Location: ./application/config/user_agents.php */
|
106
application/controllers/contoh hasil.txt
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
//print_r($data)
|
||||||
|
Array (
|
||||||
|
[province] => Jawa Barat
|
||||||
|
[city] => Bandung
|
||||||
|
[method] => Disuruh
|
||||||
|
[staffofscene] => GM
|
||||||
|
[customername] => Tarjo
|
||||||
|
[ind/comp] => Individual
|
||||||
|
[head_address] => PGA
|
||||||
|
[head_phone] => 123
|
||||||
|
[branch_address] => Sukapura
|
||||||
|
[branch_phone] => 456
|
||||||
|
[cp_name] => Azhar
|
||||||
|
[cp_phone] => 789
|
||||||
|
[nature_bisnis] => Transportation,Minning,Expedition/Courier,Angkot
|
||||||
|
[loads] => Materials,Passenger,Soil,Orang
|
||||||
|
[destinations] => Dayeuh Kolot
|
||||||
|
[road_condition_good] => 60
|
||||||
|
[road_condition_toll] => 10
|
||||||
|
[road_condition_bad] => 70
|
||||||
|
[road_condition_other] => 20
|
||||||
|
[tire_brands] => Goodyear,Dunlop,Maxxis,Swallow
|
||||||
|
[tire_purchases] => Retreads
|
||||||
|
[tire_types] => Radial
|
||||||
|
[mileage_method] => Estimates
|
||||||
|
[mileage_front] => 300
|
||||||
|
[mileage_rear] => 100
|
||||||
|
[mileage_detail] => Mati
|
||||||
|
[purchase_method] => Estimates
|
||||||
|
[psi_front] => 230
|
||||||
|
[condition_front] =>
|
||||||
|
[psi_rear] => 330
|
||||||
|
[otr] => Mampus
|
||||||
|
[problem] => Gak bisa jalan
|
||||||
|
)
|
||||||
|
//post()
|
||||||
|
Array (
|
||||||
|
[cdProvince] => Jawa Barat
|
||||||
|
[cdKota] => Bandung
|
||||||
|
[rbCd] => Disuruh
|
||||||
|
[cdSos] => GM
|
||||||
|
[cdCusName] => Tarjo
|
||||||
|
[rbCd2] => Individual
|
||||||
|
[cdOffice] => PGA
|
||||||
|
[cdTelp] => 123
|
||||||
|
[cdBranch] => Sukapura
|
||||||
|
[cdTelp2] => 456
|
||||||
|
[cdcpname] => Azhar
|
||||||
|
[cdcpphone] => 789
|
||||||
|
[cdCb_1] => Transportation
|
||||||
|
[cdCb_3] => Minning
|
||||||
|
[cdCb_4] => Expedition/Courier
|
||||||
|
[cdCb_5] => Angkot
|
||||||
|
[vdTr4] =>
|
||||||
|
[vdTr6] =>
|
||||||
|
[vdTr10] =>
|
||||||
|
[vdLt6] =>
|
||||||
|
[vdLt8] =>
|
||||||
|
[vdLt10] =>
|
||||||
|
[vdLt12] =>
|
||||||
|
[vdLt14] =>
|
||||||
|
[vdLt18] =>
|
||||||
|
[vdLtot] =>
|
||||||
|
[vdQtrType] =>
|
||||||
|
[vdQtrQty] =>
|
||||||
|
[vdQtrTyre] =>
|
||||||
|
[vdQtrType2] =>
|
||||||
|
[vdQtrQty2] =>
|
||||||
|
[vdQtrTyre2] =>
|
||||||
|
[vdCb_1] => Materials
|
||||||
|
[vdCb_2] => Passenger
|
||||||
|
[vdCb_4] => Soil
|
||||||
|
[vdCb_6] => Orang
|
||||||
|
[vdTr4wt] =>
|
||||||
|
[vdTr6wt] =>
|
||||||
|
[vdTr10wt] =>
|
||||||
|
[vdLt6wt] =>
|
||||||
|
[vdLt8wt] =>
|
||||||
|
[vdLt10wt] =>
|
||||||
|
[vdLt12wt] =>
|
||||||
|
[vdLt14wt] =>
|
||||||
|
[vdLt18wt] =>
|
||||||
|
[vdLtotwt] =>
|
||||||
|
[vdDest] => Dayeuh Kolot
|
||||||
|
[vdgoro] => 60
|
||||||
|
[vdtoro] => 10
|
||||||
|
[vdbaro] => 70
|
||||||
|
[vdothers] => 20
|
||||||
|
[tpCb_2] => Goodyear
|
||||||
|
[tpCb_5] => Dunlop
|
||||||
|
[tpCb_11] => Maxxis
|
||||||
|
[tpCb_14] => Swallow
|
||||||
|
[tpCb2_2] => Retreads
|
||||||
|
[tpCb3_4] => Radial
|
||||||
|
[trRb] => Estimates
|
||||||
|
[trmfront] => 300
|
||||||
|
[trmrear] => 100
|
||||||
|
[trmdetails] => Mati
|
||||||
|
[trfpsi] => 230
|
||||||
|
[cb31] => Estimates
|
||||||
|
[trrpsi] => 330
|
||||||
|
[cb3] => Actual
|
||||||
|
[trotr] => Mampus
|
||||||
|
[trproblem] => Gak bisa jalan
|
||||||
|
[send] => Submit
|
||||||
|
)
|
558
application/controllers/form.php
Normal file
@ -0,0 +1,558 @@
|
|||||||
|
<?php
|
||||||
|
class Form extends CI_Controller{
|
||||||
|
|
||||||
|
function __Construct()
|
||||||
|
{
|
||||||
|
parent ::__construct();
|
||||||
|
$this->load->model('M_form');
|
||||||
|
}
|
||||||
|
|
||||||
|
function index()
|
||||||
|
{
|
||||||
|
if($this->auth->CI->session->userdata('is_log_in')){
|
||||||
|
$this->load->view('vForm2');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->load->view('vlogin');
|
||||||
|
}
|
||||||
|
$array_items = array('status' => '', 'tipe' => '', 'message' => '');
|
||||||
|
$this->session->unset_userdata($array_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
//view form untuk admin
|
||||||
|
function view_form($action,$id)
|
||||||
|
{
|
||||||
|
$data['action']=$action;
|
||||||
|
//$data['form']=$this->M_form->getVisit($id);
|
||||||
|
$data['id']= $id;
|
||||||
|
$this->load->view('vReview', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//get
|
||||||
|
function getDataAjax($id)
|
||||||
|
{
|
||||||
|
//$id = 7;
|
||||||
|
$data['customer'] = $this->M_form->getCust($id);
|
||||||
|
$data['visit'] = $this->M_form->getVisit($id);
|
||||||
|
$data['vehicle'] = $this->M_form->getVehicle($id);
|
||||||
|
$data['purchase'] = $this->M_form->getPurchase($id);
|
||||||
|
$data['recommendation'] = $this->M_form->getRecommendation($id);
|
||||||
|
$data['pictures'] = $this->M_form->getPictures($id);
|
||||||
|
|
||||||
|
echo JSON_ENCODE($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//load customer name
|
||||||
|
function searchcustomer($clu)
|
||||||
|
{
|
||||||
|
$data = $this->M_form->searchcustomer($clu);
|
||||||
|
echo JSON_ENCODE($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//update status isApprove form
|
||||||
|
function isApprove($id)
|
||||||
|
{
|
||||||
|
$cds = array (
|
||||||
|
'1' => $this->input->POST('modalcb1'),
|
||||||
|
'2' => $this->input->POST('modalcb2'),
|
||||||
|
'3' => $this->input->POST('modalcb3')
|
||||||
|
);
|
||||||
|
$cds = array_filter($cds, 'strlen');
|
||||||
|
$cds = implode(',' ,$cds);
|
||||||
|
$data = array (
|
||||||
|
'id_customer' => $this->input->POST('ID'),
|
||||||
|
'tier' => $this->input->POST('tier'),
|
||||||
|
'customer_data_status' => $cds,
|
||||||
|
'isApprove' => 1
|
||||||
|
);
|
||||||
|
$this->M_form->isApprove($data, $id);
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Form is approved'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user','refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
//updateform
|
||||||
|
function updateform($id)
|
||||||
|
{
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Form Updated'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user','refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
//submit form
|
||||||
|
function form_submit()
|
||||||
|
{
|
||||||
|
//customer
|
||||||
|
$datacustomer = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_user' => '',
|
||||||
|
'nama' => $this->input->POST('cdCusName'),
|
||||||
|
'tipe' => $this->input->POST('rbCd2')
|
||||||
|
);
|
||||||
|
|
||||||
|
//visit
|
||||||
|
$nature_bisnis = array (
|
||||||
|
'1' => $this->input->POST('cdCb_1'),
|
||||||
|
'2' => $this->input->POST('cdCb_2'),
|
||||||
|
'3' => $this->input->POST('cdCb_3'),
|
||||||
|
'4' => $this->input->POST('cdCb_4'),
|
||||||
|
'5' => $this->input->POST('cdCb_5'),
|
||||||
|
'6' => $this->input->POST('cdCb_6'),
|
||||||
|
'7' => $this->input->POST('cdCb_7')
|
||||||
|
);
|
||||||
|
$nature_bisnis = array_filter($nature_bisnis, 'strlen');
|
||||||
|
$nature_bisnis = implode(',' ,$nature_bisnis);
|
||||||
|
|
||||||
|
$type_of_loads ="";
|
||||||
|
$type_of_loads = array (
|
||||||
|
'1' => $this->input->POST('vdCb_1'),
|
||||||
|
'2' => $this->input->POST('vdCb_2'),
|
||||||
|
'3' => $this->input->POST('vdCb_3'),
|
||||||
|
'4' => $this->input->POST('vdCb_4'),
|
||||||
|
'5' => $this->input->POST('vdCb_5'),
|
||||||
|
'6' => $this->input->POST('vdCb_6')
|
||||||
|
);
|
||||||
|
$type_of_loads = array_filter($type_of_loads, 'strlen');
|
||||||
|
$type_of_loads = implode(',' ,$type_of_loads);
|
||||||
|
|
||||||
|
$tyre_brands = array (
|
||||||
|
'1' => $this->input->POST('tpCb_1'),
|
||||||
|
'2' => $this->input->POST('tpCb_2'),
|
||||||
|
'3' => $this->input->POST('tpCb_3'),
|
||||||
|
'4' => $this->input->POST('tpCb_4'),
|
||||||
|
'5' => $this->input->POST('tpCb_5'),
|
||||||
|
'6' => $this->input->POST('tpCb_6'),
|
||||||
|
'7' => $this->input->POST('tpCb_7'),
|
||||||
|
'8' => $this->input->POST('tpCb_8'),
|
||||||
|
'9' => $this->input->POST('tpCb_9'),
|
||||||
|
'10' => $this->input->POST('tpCb_10'),
|
||||||
|
'11' => $this->input->POST('tpCb_11'),
|
||||||
|
'12' => $this->input->POST('tpCb_12'),
|
||||||
|
'13' => $this->input->POST('tpCb_13'),
|
||||||
|
'14' => $this->input->POST('tpCb_14'),
|
||||||
|
'15' => $this->input->POST('tpCb_15')
|
||||||
|
);
|
||||||
|
$tyre_brands = array_filter($tyre_brands, 'strlen');
|
||||||
|
$tyre_brands = implode(',' ,$tyre_brands);
|
||||||
|
|
||||||
|
$tyre_purchase = array (
|
||||||
|
'1' => $this->input->POST('tpCb2_1'),
|
||||||
|
'2' => $this->input->POST('tpCb2_2')
|
||||||
|
);
|
||||||
|
$tyre_purchase = array_filter($tyre_purchase, 'strlen');
|
||||||
|
$tyre_purchase = implode(',' ,$tyre_purchase);
|
||||||
|
|
||||||
|
$tire_types = array (
|
||||||
|
'1' => $this->input->POST('tpCb3_1'),
|
||||||
|
'2' => $this->input->POST('tpCb3_2'),
|
||||||
|
'3' => $this->input->POST('tpCb3_3'),
|
||||||
|
'4' => $this->input->POST('tpCb3_4')
|
||||||
|
);
|
||||||
|
$tire_types = array_filter($tire_types, 'strlen');
|
||||||
|
$tire_types = implode(',' ,$tire_types);
|
||||||
|
|
||||||
|
$cond_front = array (
|
||||||
|
'1' => $this->input->POST('cb31'),
|
||||||
|
'2' => $this->input->POST('cb32')
|
||||||
|
);
|
||||||
|
$cond_front = array_filter($cond_front, 'strlen');
|
||||||
|
$cond_front = implode(',' ,$cond_front);
|
||||||
|
|
||||||
|
$cond_rear = array (
|
||||||
|
'1' => $this->input->POST('cb41'),
|
||||||
|
'2' => $this->input->POST('cb42')
|
||||||
|
);
|
||||||
|
$cond_rear = array_filter($cond_rear, 'strlen');
|
||||||
|
$cond_rear = implode(',' ,$cond_rear);
|
||||||
|
|
||||||
|
if ($this->input->POST('rbCd')=="Other")$method = $this->input->POST('rbCdO');
|
||||||
|
else $method = $this->input->POST('rbCd');
|
||||||
|
|
||||||
|
$datavisit = array (
|
||||||
|
'id' => '',
|
||||||
|
'longitude' => '',
|
||||||
|
'latitude' => '',
|
||||||
|
'province' => $this->input->POST('cdProvince'),
|
||||||
|
'kota' => $this->input->POST('cdKota'),
|
||||||
|
'date_visit' => date('Y-m-d H:j:s'),
|
||||||
|
'id_staff' => '',
|
||||||
|
'id_customer' => '',
|
||||||
|
'visit_status' => $method,
|
||||||
|
'head_address' => $this->input->POST('cdOffice'),
|
||||||
|
'head_phone' => $this->input->POST('cdTelp'),
|
||||||
|
'branch_address' => $this->input->POST('cdBranch'),
|
||||||
|
'branch_phone' => $this->input->POST('cdTelp2'),
|
||||||
|
'cp_name' => $this->input->POST('cdcpname'),
|
||||||
|
'cp_phone' => $this->input->POST('cdcpphone'),
|
||||||
|
'nature_bisnis' => $nature_bisnis,
|
||||||
|
'loads' => $type_of_loads,
|
||||||
|
'destination' => $this->input->POST('vdDest'),
|
||||||
|
'road_condition_good' => $this->input->POST('vdgoro'),
|
||||||
|
'road_condition_toll' => $this->input->POST('vdtoro'),
|
||||||
|
'road_condition_bad' => $this->input->POST('vdbaro'),
|
||||||
|
'road_condition_other' => $this->input->POST('vdothers'),
|
||||||
|
'tire_brands' => $tyre_brands,
|
||||||
|
'tire_purchases' => $tyre_purchase,
|
||||||
|
'tire_types' => $tire_types,
|
||||||
|
'tire_other' => '',
|
||||||
|
'mileage_method' => $this->input->POST('trRb'),
|
||||||
|
'mileage_front' => $this->input->POST('trmfront'),
|
||||||
|
'mileage_rear' => $this->input->POST('trmrear'),
|
||||||
|
'mileage_detail' => $this->input->POST('trmdetails'),
|
||||||
|
'purchase_method' => $this->input->POST('trRb2'),
|
||||||
|
'purchase_number' => $this->input->POST(''),
|
||||||
|
'psi_front' => $this->input->POST('trfpsi'),
|
||||||
|
'condition_front' => $cond_rear,
|
||||||
|
'psi_rear' => $this->input->POST('trrpsi'),
|
||||||
|
'condition_rear' => $cond_front,
|
||||||
|
'otr' => $this->input->POST('trotr'),
|
||||||
|
'problem' => $this->input->POST('trproblem'),
|
||||||
|
'notes' => '',
|
||||||
|
'pictures' => '',
|
||||||
|
'sender' => $this->input->POST('cdSos'),
|
||||||
|
'customer' => $this->input->POST('cdCusName'),
|
||||||
|
'tier' => '',
|
||||||
|
'customer_data_status' => '',
|
||||||
|
'qty' => '',
|
||||||
|
'category' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
//customer vehicle
|
||||||
|
$datavehicle = '';
|
||||||
|
$i = 0;
|
||||||
|
if ($this->input->POST('vdTr4')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Light',
|
||||||
|
'qty' => $this->input->POST('vdTr4'),
|
||||||
|
'total_tire' => '4',
|
||||||
|
'load_weight' => $this->input->POST('vdTr4wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdTr6')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Light',
|
||||||
|
'qty' => $this->input->POST('vdTr6'),
|
||||||
|
'total_tire' => '6',
|
||||||
|
'load_weight' => $this->input->POST('vdTr6wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdTr10')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Light',
|
||||||
|
'qty' => $this->input->POST('vdTr10'),
|
||||||
|
'total_tire' => '10',
|
||||||
|
'load_weight' => $this->input->POST('vdTr10wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt6')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt6'),
|
||||||
|
'total_tire' => '6',
|
||||||
|
'load_weight' => $this->input->POST('vdLt6wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt8')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt8'),
|
||||||
|
'total_tire' => '8',
|
||||||
|
'load_weight' => $this->input->POST('vdLt8wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt10')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt10'),
|
||||||
|
'total_tire' => '10',
|
||||||
|
'load_weight' => $this->input->POST('vdLt10wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt12')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt12'),
|
||||||
|
'total_tire' => '12',
|
||||||
|
'load_weight' => $this->input->POST('vdLt12wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt14')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt14'),
|
||||||
|
'total_tire' => '14',
|
||||||
|
'load_weight' => $this->input->POST('vdLt14wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLt18')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLt18'),
|
||||||
|
'total_tire' => '18',
|
||||||
|
'load_weight' => $this->input->POST('vdLt18wt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if ($this->input->POST('vdLtot')!='')
|
||||||
|
{
|
||||||
|
$datavehicle[$i] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'category' => 'Truck',
|
||||||
|
'type' => 'Normal',
|
||||||
|
'qty' => $this->input->POST('vdLtot'),
|
||||||
|
'total_tire' => '-1',
|
||||||
|
'load_weight' => $this->input->POST('vdLtotwt')
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
'otr1Type' => $this->input->POST('vdQtrType'),
|
||||||
|
'otr1Qty' => $this->input->POST('vdQtrQty'),
|
||||||
|
'otr1Tyre' => $this->input->POST('vdQtrTyre')
|
||||||
|
*/
|
||||||
|
|
||||||
|
//purchase
|
||||||
|
$countpurchase = 0;
|
||||||
|
$purchase = array (
|
||||||
|
'MRFp' => $this->input->POST('pattern'),
|
||||||
|
'MRFs' => $this->input->POST('size'),
|
||||||
|
'MRFq' => $this->input->POST('qty'),
|
||||||
|
'OTHb' => $this->input->POST('obrand'),
|
||||||
|
'OTHp' => $this->input->POST('opattern'),
|
||||||
|
'OTHs' => $this->input->POST('osize'),
|
||||||
|
'OTHq' => $this->input->POST('oqty')
|
||||||
|
);
|
||||||
|
//$mrfc = $this->input->POST('MRFcount');
|
||||||
|
$count = count($purchase['MRFp']);
|
||||||
|
for ($k = 0 ; $k < $count ; $k++)
|
||||||
|
{
|
||||||
|
$datapurchase[$countpurchase] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'brand' => 'MRF',
|
||||||
|
'pattern' => $purchase['MRFp'][$k],
|
||||||
|
'size' => $purchase['MRFs'][$k],
|
||||||
|
'qty' => $purchase['MRFq'][$k]
|
||||||
|
);
|
||||||
|
$countpurchase++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$count2 = count($purchase['OTHp']);
|
||||||
|
$v = 0;
|
||||||
|
for ($n = 0 ; $n < $count2 ; $n++)
|
||||||
|
{
|
||||||
|
$datapurchase[$countpurchase] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'brand' => $purchase['OTHb'][$v],
|
||||||
|
'pattern' => $purchase['OTHp'][$n],
|
||||||
|
'size' => $purchase['OTHs'][$n],
|
||||||
|
'qty' => $purchase['OTHq'][$n]
|
||||||
|
);
|
||||||
|
$countpurchase++;
|
||||||
|
$v++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//recommendation
|
||||||
|
|
||||||
|
$countrcm = 0;
|
||||||
|
$recommend = array (
|
||||||
|
'pattern' => $this->input->POST('rpattern'),
|
||||||
|
'size' => $this->input->POST('rsize'),
|
||||||
|
'remark' => $this->input->POST('rremark')
|
||||||
|
);
|
||||||
|
$count3 = count($recommend['pattern']);;
|
||||||
|
for ($n = 0 ; $n < $count3 ; $n++)
|
||||||
|
{
|
||||||
|
$datarecommended[$countrcm] = array (
|
||||||
|
'id' => '',
|
||||||
|
'id_visit' => '',
|
||||||
|
'pattern' => $recommend['pattern'][$n],
|
||||||
|
'size' => $recommend['size'][$n],
|
||||||
|
'remark' => $recommend['remark'][$n],
|
||||||
|
);
|
||||||
|
$countrcm++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'customer' => $datacustomer,
|
||||||
|
'visit' => $datavisit,
|
||||||
|
'vehicle' => $datavehicle,
|
||||||
|
'purchase' => $datapurchase,
|
||||||
|
'recommendation' => $datarecommended
|
||||||
|
);
|
||||||
|
//$this->submit_form($data);
|
||||||
|
echo JSON_ENCODE($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//insert
|
||||||
|
function submit_form($data)
|
||||||
|
{
|
||||||
|
//customer
|
||||||
|
$idc = 4;
|
||||||
|
$idc = $this->M_form->insertcustomer($data['customer']);
|
||||||
|
|
||||||
|
//visit
|
||||||
|
$data['visit']['id_customer'] = $idc;
|
||||||
|
$idv = 3;
|
||||||
|
$idv = $this->M_form->insertvisit($data['visit']);
|
||||||
|
|
||||||
|
|
||||||
|
//vehicle
|
||||||
|
for ($i=0;$i<count($data['vehicle']);$i++)
|
||||||
|
{
|
||||||
|
$data['vehicle'][$i]['id_visit'] = $idv;
|
||||||
|
}
|
||||||
|
for ($j = 0 ; $j < $i ; $j++)
|
||||||
|
{
|
||||||
|
$this->M_form->insertvehicle($data['vehicle'][$j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//purchase
|
||||||
|
for ($i=0;$i<count($data['purchase']);$i++)
|
||||||
|
{
|
||||||
|
$data['purchase'][$i]['id_visit'] = $idv;
|
||||||
|
}
|
||||||
|
for ($j = 0 ; $j < count($data['purchase']) ; $j++)
|
||||||
|
{
|
||||||
|
$this->M_form->insertpurchase($data['purchase'][$j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//recommendation
|
||||||
|
for ($i=0;$i<count($data['recommendation']);$i++)
|
||||||
|
{
|
||||||
|
$data['recommendation'][$i]['id_visit'] = $idv;
|
||||||
|
}
|
||||||
|
for ($j = 0 ; $j < count($data['recommendation']) ; $j++)
|
||||||
|
{
|
||||||
|
$this->M_form->insertrecommended($data['recommendation'][$j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Form is Submitted'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user','refresh');
|
||||||
|
//echo JSON_ENCODE($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function addSellout()
|
||||||
|
{
|
||||||
|
$data = array (
|
||||||
|
'id_customer' => $this->input->POST('ID'),
|
||||||
|
'customer' => $this->input->POST('customer'),
|
||||||
|
'bulan' => $this->input->POST('bulan'),
|
||||||
|
'tahun' => $this->input->POST('tahun'),
|
||||||
|
'qty' => $this->input->POST('qty')
|
||||||
|
);
|
||||||
|
$this->M_form->newSellout($data);
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Selling out added'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user','refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
function addVolume()
|
||||||
|
{
|
||||||
|
$data = array (
|
||||||
|
'id' => '',
|
||||||
|
'dealer' => $this->input->POST('dealer'),
|
||||||
|
'area' => $this->input->POST('area'),
|
||||||
|
'region' => $this->input->POST('region'),
|
||||||
|
'province' => $this->input->POST('province'),
|
||||||
|
'date' => $this->input->POST('date'),
|
||||||
|
'target' => $this->input->POST('target'),
|
||||||
|
'previous_stock'=> $this->input->POST('prevstock'),
|
||||||
|
'actual' => $this->input->POST('actual'),
|
||||||
|
'sellout' => $this->input->POST('sellout'),
|
||||||
|
'order' => $this->input->POST('order'),
|
||||||
|
'pattern' => $this->input->POST('pattern')
|
||||||
|
);
|
||||||
|
$data['current_stock'] = $data['previous_stock']+$data['actual']-$data['sellout'];
|
||||||
|
$pattern = $this->input->POST('pattern');
|
||||||
|
if(($pattern== ("7.50-16 M77")) or ($pattern==("7.50-16 SLUG")) or ($pattern==("7.50-16 SM95")))
|
||||||
|
{
|
||||||
|
$data['category'] = 'Light Truck';
|
||||||
|
}
|
||||||
|
else $data['category'] = 'Truck';
|
||||||
|
$data['service_level'] = $data['actual'] / $data['order'];
|
||||||
|
|
||||||
|
//echo JSON_ENCODE($data);
|
||||||
|
$this->M_form->newVolume($data);
|
||||||
|
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Volume added'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user','refresh');
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadwilayah()
|
||||||
|
{
|
||||||
|
$data = $this->M_form->getwilayah();
|
||||||
|
echo JSON_ENCODE($data);
|
||||||
|
}
|
||||||
|
}
|
10
application/controllers/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
149
application/controllers/user.php
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
class User extends CI_Controller{
|
||||||
|
|
||||||
|
function __Construct()
|
||||||
|
{
|
||||||
|
parent ::__construct();
|
||||||
|
$this->load->model('M_form');
|
||||||
|
}
|
||||||
|
|
||||||
|
function index()
|
||||||
|
{
|
||||||
|
if($this->auth->CI->session->userdata('is_log_in'))
|
||||||
|
{
|
||||||
|
if($this->auth->CI->session->userdata('role')=='Admin')
|
||||||
|
{
|
||||||
|
$this->load->view('vAdmin');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect('form');
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//load halaman login
|
||||||
|
$this->load->view('vLogin');
|
||||||
|
}
|
||||||
|
$array_items = array('status' => '', 'tipe' => '', 'message' => '');
|
||||||
|
$this->session->unset_userdata($array_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadform()
|
||||||
|
{
|
||||||
|
if ($this->cekLogin())
|
||||||
|
{
|
||||||
|
$data['form_saved'] = $this->M_form->getFormSaved();
|
||||||
|
$data['form_pending'] = $this->M_form->getFormPending();
|
||||||
|
$this->load->view('vAdminForm',$data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//$this->load->view('vLogin');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadstaff()
|
||||||
|
{
|
||||||
|
$data['user'] = $this->M_form->getUser();
|
||||||
|
$this->load->view('vAdminStaff',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadsellingout()
|
||||||
|
{
|
||||||
|
$data['sellout'] = $this->M_form->getSellout();
|
||||||
|
$this->load->view('vAdminSellingout',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadvolume()
|
||||||
|
{
|
||||||
|
$data['volume'] = $this->M_form->getVolume();
|
||||||
|
$this->load->view('vAdminVolume',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function login_auth()
|
||||||
|
{
|
||||||
|
$username = $this->input->post('username');
|
||||||
|
$password = $this->input->post('password');
|
||||||
|
$success = $this->auth->do_login($username,$password);
|
||||||
|
if($success)
|
||||||
|
{
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-info',
|
||||||
|
'message' => '<strong>Welcome back </strong>'.$this->auth->CI->session->userdata('nama')
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//wrong log in
|
||||||
|
$data['login_info'] = "Maaf, username dan password salah!";
|
||||||
|
$this->load->view('vLogin',$data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout()
|
||||||
|
{
|
||||||
|
//$this->auth->CI->session->unset_userdata();
|
||||||
|
$this->auth->CI->session->sess_destroy();
|
||||||
|
redirect('user');
|
||||||
|
}
|
||||||
|
|
||||||
|
function insert_user()
|
||||||
|
{
|
||||||
|
$datauser = array (
|
||||||
|
'nama' => $this->input->post('nama'),
|
||||||
|
'username' => $this->input->post('username'),
|
||||||
|
'password' => md5($this->input->post('password')),
|
||||||
|
'role' => $this->input->post('role')
|
||||||
|
);
|
||||||
|
$cek = $this->M_form->newuser($datauser);
|
||||||
|
if ($cek)
|
||||||
|
{
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-success',
|
||||||
|
'message' => '<strong>Well Done</strong> | Sales baru berhasil diinput'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$notif = array(
|
||||||
|
'status' => '1',
|
||||||
|
'tipe' => 'alert-error',
|
||||||
|
'message' => '<strong>Well Done</strong> | Sales baru berhasil diinput'
|
||||||
|
);
|
||||||
|
$this->session->set_userdata($notif);
|
||||||
|
redirect('user');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_user($id)
|
||||||
|
{
|
||||||
|
$id = $this->M_form->delete_user($id);
|
||||||
|
|
||||||
|
redirect('user');
|
||||||
|
}
|
||||||
|
|
||||||
|
function cekLogin()
|
||||||
|
{
|
||||||
|
if($this->auth->CI->session->userdata('is_log_in'))
|
||||||
|
{
|
||||||
|
if($this->auth->CI->session->userdata('role')=='Admin')
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirect('Form');
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//load halaman login
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
application/core/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
62
application/errors/error_404.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>404 Page Not Found</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection{ background-color: #E13300; color: white; }
|
||||||
|
::moz-selection{ background-color: #E13300; color: white; }
|
||||||
|
::webkit-selection{ background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
62
application/errors/error_db.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Database Error</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection{ background-color: #E13300; color: white; }
|
||||||
|
::moz-selection{ background-color: #E13300; color: white; }
|
||||||
|
::webkit-selection{ background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
62
application/errors/error_general.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Error</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection{ background-color: #E13300; color: white; }
|
||||||
|
::moz-selection{ background-color: #E13300; color: white; }
|
||||||
|
::webkit-selection{ background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/errors/error_php.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||||
|
|
||||||
|
<h4>A PHP Error was encountered</h4>
|
||||||
|
|
||||||
|
<p>Severity: <?php echo $severity; ?></p>
|
||||||
|
<p>Message: <?php echo $message; ?></p>
|
||||||
|
<p>Filename: <?php echo $filepath; ?></p>
|
||||||
|
<p>Line Number: <?php echo $line; ?></p>
|
||||||
|
|
||||||
|
</div>
|
10
application/errors/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/helpers/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/hooks/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/language/english/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
62
application/libraries/auth.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auth library
|
||||||
|
*
|
||||||
|
* @author Anggy Trisnawan
|
||||||
|
*/
|
||||||
|
class Auth{
|
||||||
|
var $CI = NULL;
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
// get CI's object
|
||||||
|
$this->CI =& get_instance();
|
||||||
|
}
|
||||||
|
// untuk validasi login
|
||||||
|
function do_login($username,$password)
|
||||||
|
{
|
||||||
|
// cek di database, ada ga?
|
||||||
|
$this->CI->db->from('user');
|
||||||
|
$this->CI->db->where('username',$username);
|
||||||
|
$this->CI->db->where('password=("'.md5($password).'")','',false);
|
||||||
|
$result = $this->CI->db->get();
|
||||||
|
if($result->num_rows() == 0)
|
||||||
|
{
|
||||||
|
// username dan password tsb tidak ada
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ada, maka ambil informasi dari database
|
||||||
|
$userdata = $result->row();
|
||||||
|
if($userdata->role == "admin") $rule = 'Admin';
|
||||||
|
else $rule = 'Sales';
|
||||||
|
$session_data = array(
|
||||||
|
'username' => $userdata->username,
|
||||||
|
'nama' => $userdata->nama,
|
||||||
|
'role' => $rule,
|
||||||
|
'is_log_in' => TRUE
|
||||||
|
);
|
||||||
|
// buat session
|
||||||
|
$this->CI->session->set_userdata($session_data);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// untuk mengecek apakah user sudah login/belum
|
||||||
|
function is_logged_in()
|
||||||
|
{
|
||||||
|
if($this->CI->session->userdata('user_id') == '')
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// untuk validasi di setiap halaman yang mengharuskan authentikasi
|
||||||
|
function restrict()
|
||||||
|
{
|
||||||
|
if($this->is_logged_in() == false)
|
||||||
|
{
|
||||||
|
redirect('home/login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
application/libraries/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/logs/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
211
application/models/M_form.php
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<?php
|
||||||
|
class M_form extends CI_Model{
|
||||||
|
|
||||||
|
function insertcustomer($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('customer',$data);
|
||||||
|
return $this->db->insert_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertvisit($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('visit',$data);
|
||||||
|
return $this->db->insert_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertvehicle($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('customer_vehicle',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertrecommended($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('recommendation',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertpurchase($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('purchase',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFormSaved()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `visit` WHERE `isApprove` = '1' ORDER BY id DESC");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFormPending()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `visit` WHERE `isApprove` = '0' ORDER BY id DESC");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVisit($id)
|
||||||
|
{
|
||||||
|
$q="SELECT * FROM visit WHERE id='$id'";
|
||||||
|
$query=$this->db->query($q);
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCust($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT * FROM customer WHERE id = (SELECT id_customer FROM visit WHERE id='$id')";
|
||||||
|
$query=$this->db->query($sql);
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVehicle($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT * FROM customer_vehicle WHERE id_visit='$id'";
|
||||||
|
//$query=$this->db->query($q);
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
while ($array = mysql_fetch_assoc($sql)) {
|
||||||
|
$rs[] = $array;
|
||||||
|
}
|
||||||
|
if (empty($rs))
|
||||||
|
{
|
||||||
|
$rs = '';
|
||||||
|
}
|
||||||
|
return $rs;
|
||||||
|
//return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPurchase($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT * FROM purchase WHERE id_visit='$id'";
|
||||||
|
//$query=$this->db->query($q);
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
while ($array = mysql_fetch_assoc($sql)) {
|
||||||
|
$rs[] = $array;
|
||||||
|
}
|
||||||
|
if (empty($rs))
|
||||||
|
{
|
||||||
|
$rs = '';
|
||||||
|
}
|
||||||
|
return $rs;
|
||||||
|
//return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRecommendation($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT * FROM recommendation WHERE id_visit='$id'";
|
||||||
|
//$query=$this->db->query($q);
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
while ($array = mysql_fetch_assoc($sql)) {
|
||||||
|
$rs[] = $array;
|
||||||
|
}
|
||||||
|
if (empty($rs))
|
||||||
|
{
|
||||||
|
$rs = '';
|
||||||
|
}
|
||||||
|
return $rs;
|
||||||
|
//return $query->row();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPictures($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT * FROM pictures WHERE id_visit='$id'";
|
||||||
|
//$query=$this->db->query($q);
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
while ($array = mysql_fetch_assoc($sql)) {
|
||||||
|
$rs[] = $array;
|
||||||
|
}
|
||||||
|
if (empty($rs))
|
||||||
|
{
|
||||||
|
$rs = '';
|
||||||
|
}
|
||||||
|
return $rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isApprove($data, $id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$idc = $this->getCustomer($id);
|
||||||
|
$this->updateCustomer($idc['id_customer'],$data['id_customer']);
|
||||||
|
$this->db->where('id', $id);
|
||||||
|
$this->db->update('visit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCustomer($id)
|
||||||
|
{
|
||||||
|
$sql="SELECT id_customer FROM visit WHERE id='$id'";
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
//echo $sql;
|
||||||
|
$rs = mysql_fetch_assoc($sql);
|
||||||
|
return $rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateCustomer($idc,$id)
|
||||||
|
{
|
||||||
|
$data = array (
|
||||||
|
'id_customer' => $id
|
||||||
|
);
|
||||||
|
$this->db->where('id', $idc);
|
||||||
|
$this->db->update('customer', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchcustomer($clue)
|
||||||
|
{
|
||||||
|
$sql="SELECT id,nama FROM customer WHERE nama like '%$clue%'";
|
||||||
|
//$query=$this->db->query($q);
|
||||||
|
$sql = mysql_query($sql);
|
||||||
|
while ($array = mysql_fetch_assoc($sql)) {
|
||||||
|
$rs[] = $array;
|
||||||
|
}
|
||||||
|
if (empty($rs))
|
||||||
|
{
|
||||||
|
$rs = '';
|
||||||
|
}
|
||||||
|
return $rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function newUser($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('user',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUser()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `user`");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_user($id)
|
||||||
|
{
|
||||||
|
$query=$this->db->query("DELETE FROM user WHERE username='$id'");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSellout()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `sellingout`");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function newSellout($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('sellingout',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVolume()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `volume`");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function newVolume($data)
|
||||||
|
{
|
||||||
|
$this->db->insert('volume',$data);
|
||||||
|
return $this->db->affected_rows();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWilayah()
|
||||||
|
{
|
||||||
|
$query=$this->db->query("SELECT * FROM `wilayah`");
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
}
|
10
application/models/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/third_party/index.html
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
185
application/views/admin/bAdmin.php
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Admin Page</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<!--table sorter-->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/tablesorter/demo_table.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {padding-top: 40px;padding-bottom: 40px;}
|
||||||
|
.well-white {
|
||||||
|
min-height: 20px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
ul#sidebar{border: outset 1px;margin-top:15px;border-radius:5px;padding:10px;list-style:none;}
|
||||||
|
#sidebar li a{display:block;color:#777;outline:none;font-weight:bold;text-decoration:none;line-height:30px;padding:0px 20px;}
|
||||||
|
#sidebar li a:hover,#sidebar li.selected a{background:#C0C0C0;color:#fff;}
|
||||||
|
#sidebar li a:hover{background:#CDFFFF;color:#000;}
|
||||||
|
#steps{height:auto;overflow:hidden;border-left:outset 1px;padding:15px;}
|
||||||
|
.formside{display:block;}
|
||||||
|
.staffside, statsside{display:none;}
|
||||||
|
.stafflist{border:inset 1px rgba(0, 0, 0, 0.05);border-radius:5px;padding:30px;background-color:#F0F0F0 ;}
|
||||||
|
.modal-body input{padding: 11px 0px 11px 11px;height : 36px;}
|
||||||
|
</style>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.js"></script>
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/rf/razorflow.jquery.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
var loading = "<div id='loadingcontent'><img src='<?php echo base_url(); ?>asset/img/loading7.gif' alt='loading' style='float:right;margin:100px 500px;'/></div>"
|
||||||
|
$(document).ready(function() {
|
||||||
|
//$('#formpending').dataTable();
|
||||||
|
//$('#formsaved').dataTable();
|
||||||
|
//$('#stafflist').dataTable();
|
||||||
|
setTimeout(function(){
|
||||||
|
$("div.alert").fadeOut("slow", function () {
|
||||||
|
$("div.alert").remove();
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
formfunc();
|
||||||
|
});
|
||||||
|
|
||||||
|
//load list salespage
|
||||||
|
function stafffunc(){
|
||||||
|
$('#loading2').css("display","block");
|
||||||
|
$('#content').html(loading);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#staff').addClass("selected");
|
||||||
|
$.ajax({
|
||||||
|
url: 'user/loadstaff',
|
||||||
|
success: function()
|
||||||
|
{
|
||||||
|
$("#content").load("user/loadstaff");
|
||||||
|
$('#content').fadeIn(9000);
|
||||||
|
$('#loading2').css("display","none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//load list form page
|
||||||
|
function formfunc(){
|
||||||
|
$('#loading1').css("display","block");
|
||||||
|
$('#content').html(loading);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#form').addClass("selected");
|
||||||
|
$.ajax({
|
||||||
|
url: 'user/loadform',
|
||||||
|
success: function()
|
||||||
|
{
|
||||||
|
$("#content").load("user/loadform");
|
||||||
|
$('#content').fadeIn(3000);
|
||||||
|
$('#loading1').css("display","none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function selloutfunc(){
|
||||||
|
$('#loading3').css("display","block");
|
||||||
|
$('#content').html(loading);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#sellingout').addClass("selected");
|
||||||
|
$.ajax({
|
||||||
|
url: 'user/loadsellingout',
|
||||||
|
success: function()
|
||||||
|
{
|
||||||
|
$("#content").load("user/loadsellingout");
|
||||||
|
$('#content').fadeIn(3000);
|
||||||
|
$('#loading3').css("display","none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#"><i class="icon-wrench icon-white"></i> Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;">
|
||||||
|
<i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav">
|
||||||
|
<!--
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
-->
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container fluid-->
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3">
|
||||||
|
<ul id="sidebar">
|
||||||
|
<li id="form"><a href="#" onclick="formfunc()"><i class="icon-list-alt"></i> Form <img id="loading1" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a></li>
|
||||||
|
<li id="staff"><a href="#" onclick="stafffunc()"><i class="icon-user"></i> Sales <img id="loading2" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a></li>
|
||||||
|
<li id="sellingout"><a href="#" onclick="selloutfunc()"><i class="icon-share-alt"></i> Selling Out <img id="loading3" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a></li>
|
||||||
|
<!--
|
||||||
|
<li id="stats"><a href="#" onclick="statsfunc()"><i class="icon-signal"></i> Stats <img id="loading" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a><li>
|
||||||
|
-->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!--Content-->
|
||||||
|
<div class="span9" id="steps">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($this->session->userdata('status')=='1' )
|
||||||
|
{
|
||||||
|
$tipe = $this->session->userdata('tipe');
|
||||||
|
echo "
|
||||||
|
<div id='note' class='alert ".$tipe."'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert'>×</button>
|
||||||
|
".$this->session->userdata('message')."
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="content" style="diplay:none;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span10-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-tab.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-modal.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
823
application/views/bForm.php
Normal file
@ -0,0 +1,823 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Form Customer</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
|
||||||
|
<!-- Le styles -->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 60px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
.sidebar-nav {
|
||||||
|
padding: 9px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.filebutton {
|
||||||
|
width:80px;
|
||||||
|
height:20px;
|
||||||
|
overflow:hidden;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn input {
|
||||||
|
opacity: 0;
|
||||||
|
filter: alpha(opacity = 0);
|
||||||
|
-ms-filter: "alpha(opacity=0)";
|
||||||
|
cursor: pointer;
|
||||||
|
_cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
/* Enable use of floated navbar text */
|
||||||
|
.navbar-text.pull-right {
|
||||||
|
float: none;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../assets/js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body data-spy="scroll" data-target=".sidebar">
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top" >
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#">Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;"><i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!--
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3 sidebar">
|
||||||
|
<div class="well affix span3">
|
||||||
|
<ul class="nav nav-list">
|
||||||
|
<li class="active"><a href="#1">Contact Details</a></li>
|
||||||
|
<li class=""><a href="#2">Vehicles Details</a></li>
|
||||||
|
<li class=""><a href="#3">Types</a></li>
|
||||||
|
<li class=""><a href="#4">Tyre Usages</a></li>
|
||||||
|
<li class=""><a href="#5">Recommendation</a></li>
|
||||||
|
<li class=""><a href="#6">Upload Picture</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.well -->
|
||||||
|
</div><!--/span3-->
|
||||||
|
<!--section-->
|
||||||
|
<div class="span7 offset1 well">
|
||||||
|
<!--
|
||||||
|
<div class="hero-unit">
|
||||||
|
<h1>Hello, world!</h1>
|
||||||
|
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
|
||||||
|
<p><a href="#" class="btn btn-primary btn-large">Learn more »</a></p>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<form id="fileupload" class="form-horizontal" action="http://10.10.10.14/everseiko/index.php/visit/addvisit/format/json" method="post" name="fo1">
|
||||||
|
<section id="1">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Contact Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<!--form1-->
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>General Location</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30%">
|
||||||
|
<input type="text" placeholder="Province" name="cdProvince">
|
||||||
|
</td>
|
||||||
|
<td width="30%">
|
||||||
|
<input type="text" placeholder="Kota" name="cdKota">
|
||||||
|
</td>
|
||||||
|
<td width="30%"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Company Details</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="By Appoinment">By Appoinment
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="Cold Call/go show">Cold Call/go show
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value=""><input type="text" placeholder="Other" name="rbCd">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="70px">
|
||||||
|
<td>
|
||||||
|
<input type="text" placeholder="Staff of Scene" name="cdSos">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" placeholder="Customer Name" name="cdCusName">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Company">Company
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Individual">Individual
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<button type="button" class="btn">Search</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<hr>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Address / Phone no</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<input type="text" placeholder="Head Office" name="cdOffice">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdTelp" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<input type="text" id="" placeholder="Branch/Garrage" name="cdBranch">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdTelp2" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Contact Person</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="text" placeholder="Name" name="cp_name">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdcpphone" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Nature Business</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_1" value="Transportation">Transportation
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_2" value="Bus">Bus
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_3" value="Minning">Minning
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_4" value="Expedition/Courier">Expedition/Courier
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_5" value="">
|
||||||
|
<input type="text" placeholder="Other"name="cdCb_5">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="2">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Vehicles Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><strong>Number of vehicles owned</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Light Truck</td>
|
||||||
|
<td width="100px">QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td>
|
||||||
|
<td>QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtot" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">QTR</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre" maxlength="3" onkeypress="return isNumberKey(event)"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType2"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty2" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre2" maxlength="3" onkeypress="return isNumberKey(event)"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<table>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3"><strong>Load and Speed Details</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Type of Load</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_1" value="Materials">Materials</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_2" value="Passenger">Passenger</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_3" value="Goods">Goods</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_4" value="Soil">Soil</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_5" value="General Cargo">General Cargo</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_6" value="">
|
||||||
|
<input type="text" style="width:100px" placeholder="Other" name="vdCb_6"></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Average Weight of Loads</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Truck</td>
|
||||||
|
<td width="100px">Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Light Tr</td><td>Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtotwt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="2">Points of Origin Destination <input type="text" name="vdDest"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="2">Driving Condition</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Good Roads" name="vdgoro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Toll Roads" name="vdtoro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Bad Roads" name="vdbaro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Others" name="vdothers">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="3">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Types</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Tyre Brands and Type</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_1" value="MRF">MRF</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_2" value="Goodyear">Goodyear</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_3" value="Bridgestone">Bridgestone</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_4" value="GT">GT</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_5" value="Dunlop">Dunlop</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_6" value="Chinese">Chinese</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_7" value="Kumho">Kumho</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_8" value="Hankook">Hankook</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_9" value="Coat">Coat</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_10" value="Thai">Thai</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_11" value="Maxxis">Maxxis</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_12" value="Chengsin">Chengsin</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_13" value="Epco">Epco</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_14" value="Swallow">Swallow</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_15" value="Chao Yang">Chao Yang</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type of Purchase</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_1" value="New Tyres">New Tyres</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_2" value="Retreads">Retreads</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_1" value="Rib">Rib</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_2" value="Lug">Lug</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_3" value="Bias">Bias</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_4" value="Radial">Radial</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="4">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Tyre Usages</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Milleage</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Estimates">Estimates</label>
|
||||||
|
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Front" name="trmfront">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Rear" name="trmrear">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<label>Details</label>
|
||||||
|
<textarea rows="3" name="trmdetails"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>New Tyre Purchase per Month</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Estimates">Estimates</label>
|
||||||
|
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
</div>
|
||||||
|
</div><hr>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Front Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trfpsi"><br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb3" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>Rear Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trrpsi"><br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb3" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="OTR" name='trotr'><br></br>
|
||||||
|
<textarea class="span9" rows="5" placeholder="Problem faced with current type" name="trproblem"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="5">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Recommendation</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<input type="text" value="" name="id_user">
|
||||||
|
<input type="text" value="" name="id_customer">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="6">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Upload Picture</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<label class="filebutton btn btn-success" id="input_field">
|
||||||
|
<i class="icon-plus icon-white"></i> Add Files
|
||||||
|
<input type="file" multiple="true" id="files" onkeydown="return false;" onchange="upload_img()" name="uploadFile"/>
|
||||||
|
</label>
|
||||||
|
<br></br>
|
||||||
|
<div id="images" style="background-color:#C0C0C0;border:ridge"></div>
|
||||||
|
<br></br>
|
||||||
|
<button class="btn btn-warning" type="button" onclick="clearFileInputField('input_field')" style="display:none" id="clear">
|
||||||
|
Clear
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?php echo base_url(); ?>"><button type="button" class="btn" name="save">Discard</button></a>
|
||||||
|
<button type="submit" value="Submit" class="btn btn-primary" name="send" >Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<!--
|
||||||
|
<footer>
|
||||||
|
<p>© Company 2013</p>
|
||||||
|
</footer>
|
||||||
|
-->
|
||||||
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/jquery.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-button.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-typeahead.js"></script>
|
||||||
|
<script>
|
||||||
|
function isNumberKey(evt){
|
||||||
|
var charCode = (evt.which) ? evt.which : event.keyCode
|
||||||
|
if (charCode > 31 && (charCode < 48 || charCode > 57)){
|
||||||
|
alert('Number Only');
|
||||||
|
return false;}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*
|
||||||
|
function upload_img(input) {
|
||||||
|
if (input.files && input.files[0]) {
|
||||||
|
var reader = new FileReader();
|
||||||
|
|
||||||
|
reader.onload = function (e) {
|
||||||
|
$('#img_id').attr('src', e.target.result);
|
||||||
|
$('#img_id').css("display","block");
|
||||||
|
$('#myfile').css("display","none");
|
||||||
|
$('.filebutton').css("border","none");
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(input.files[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
var reader = new FileReader(),
|
||||||
|
i=0,
|
||||||
|
numFiles = 0,
|
||||||
|
imageFiles;
|
||||||
|
|
||||||
|
// use the FileReader to read image i
|
||||||
|
function readFile() {
|
||||||
|
reader.readAsDataURL(imageFiles[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
// define function to be run when the File
|
||||||
|
// reader has finished reading the file
|
||||||
|
reader.onload = function(e) {
|
||||||
|
// make an image and append it to the div
|
||||||
|
var image = $('<img>').attr({'src': e.target.result,'width':'150px'});
|
||||||
|
var a = "<br>";
|
||||||
|
var filename = $('input[type=file]').val();
|
||||||
|
$(image).css({
|
||||||
|
'margin-right':'20px',
|
||||||
|
'border' : 'single'
|
||||||
|
});
|
||||||
|
$(image).appendTo('#images');
|
||||||
|
//$(a).appendTo('#images');
|
||||||
|
$(filename).appendTo('#images');
|
||||||
|
|
||||||
|
// if there are more files run the file reader again
|
||||||
|
if (i < numFiles) {
|
||||||
|
i++;
|
||||||
|
readFile();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
function upload_img() {
|
||||||
|
imageFiles = document.getElementById('files').files
|
||||||
|
// get the number of files
|
||||||
|
numFiles = imageFiles.length;
|
||||||
|
readFile();
|
||||||
|
$('#clear').show();
|
||||||
|
$('#input_field').hide();
|
||||||
|
};
|
||||||
|
function clearFileInputField(tagId) {
|
||||||
|
document.getElementById(tagId).innerHTML =
|
||||||
|
document.getElementById(tagId).innerHTML;
|
||||||
|
$('#images').html('');
|
||||||
|
$('#clear').hide();
|
||||||
|
$('#input_field').show();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
336
application/views/bHalamanAdmin.php
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Admin Page</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<!--table sorter-->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/tablesorter/demo_table.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {padding-top: 40px;padding-bottom: 40px;}
|
||||||
|
.well-white {
|
||||||
|
min-height: 20px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
ul#sidebar{border: outset 1px;margin-top:15px;border-radius:5px;padding:10px;list-style:none;}
|
||||||
|
#sidebar li a{display:block;color:#777;outline:none;font-weight:bold;text-decoration:none;line-height:30px;padding:0px 20px;}
|
||||||
|
#sidebar li a:hover,#sidebar li.selected a{background:#C0C0C0;color:#fff;}
|
||||||
|
#sidebar li a:hover{background:#CDFFFF;color:#000;}
|
||||||
|
#steps{height:auto;overflow:hidden;border-left:outset 1px;padding:15px;}
|
||||||
|
.formside{display:block;}
|
||||||
|
.staffside, statsside{display:none;}
|
||||||
|
.stafflist{border:inset 1px rgba(0, 0, 0, 0.05);border-radius:5px;padding:30px;background-color:#F0F0F0 ;}
|
||||||
|
.modal-body input{padding: 11px 0px 11px 11px;height : 36px;}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.js"></script>
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/rf/razorflow.jquery.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#formpending').dataTable();
|
||||||
|
$('#formsaved').dataTable();
|
||||||
|
$('#stafflist').dataTable();
|
||||||
|
/*
|
||||||
|
setTimeout(function(){
|
||||||
|
$("div.alert").fadeOut("slow", function () {
|
||||||
|
$("div.alert").remove();
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
*/
|
||||||
|
});
|
||||||
|
function stafffunc(){
|
||||||
|
$(".formside").hide();
|
||||||
|
$(".statsside").hide();
|
||||||
|
$(".staffside").fadeIn(800);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#staff').addClass("selected");
|
||||||
|
$('*').css('text-shadow','none');
|
||||||
|
$('*').css('box-shadow','none');
|
||||||
|
}
|
||||||
|
function formfunc(){
|
||||||
|
$(".staffside").hide();
|
||||||
|
$(".statsside").hide();
|
||||||
|
$(".formside").fadeIn(800);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#form').addClass("selected");
|
||||||
|
$('*').css('text-shadow','none');
|
||||||
|
$('*').css('box-shadow','none');
|
||||||
|
}
|
||||||
|
function statsfunc(){
|
||||||
|
$('#loading').css("display","block");
|
||||||
|
$.ajax({
|
||||||
|
url: '<?php echo base_url(); ?>form/test/7',
|
||||||
|
success: function(msg)
|
||||||
|
{
|
||||||
|
$(".staffside").hide();
|
||||||
|
$(".formside").hide();
|
||||||
|
$(".statsside").fadeIn(800);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$('#stats').addClass("selected");
|
||||||
|
//$("#dashboardTarget").load("user/test");
|
||||||
|
$("#dashboardTarget").delay(90000).html(msg);
|
||||||
|
$('#loading').delay(90000).css("display","none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#"><i class="icon-wrench icon-white"></i> Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;">
|
||||||
|
<i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav">
|
||||||
|
<!--
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
-->
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container fluid-->
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span2">
|
||||||
|
<ul id="sidebar">
|
||||||
|
<li class="selected" id="form"><a href="#" onclick="formfunc()"><i class="icon-list-alt"></i> Form</a></li>
|
||||||
|
<li id="staff"><a href="#" onclick="stafffunc()"><i class="icon-user"></i> Sales</a></li>
|
||||||
|
<li id="stats"><a href="#" onclick="statsfunc()"><i class="icon-signal"></i> Stats <img id="loading" src="<?php echo base_url(); ?>asset/img/ajax_loading.gif" alt="loading" width="20px;" style="float:right;margin-top:12px;display:none;"/></a><li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!--Content-->
|
||||||
|
<div class="span10" id="steps">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<?php
|
||||||
|
if ($this->session->userdata('status')=='1' )
|
||||||
|
{
|
||||||
|
$tipe = $this->session->userdata('tipe');
|
||||||
|
echo "
|
||||||
|
<div class='alert ".$tipe."'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert'>×</button>
|
||||||
|
".$this->session->userdata('message')."
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="formside">
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-list-alt"></i> List Form</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul id="myTab" class="nav nav-tabs">
|
||||||
|
<li class="active"><a href="#pending" data-toggle="tab"><i class="icon-time"></i> Pending</a></li>
|
||||||
|
<li><a href="#save" data-toggle="tab"><i class="icon-ok"></i> Saved</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="myTabContent" class="tab-content well">
|
||||||
|
<div class="tab-pane fade in active" id="pending">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="formpending">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
||||||
|
<th><i class="icon-envelope"></i> Sender</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Area</th>
|
||||||
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>2013-05-27 16:25:39</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td>Omdo</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info disabled">View</button></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($form_pending as $pform){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $pform->date; ?></td>
|
||||||
|
<td><?php echo $pform->sender; ?></td>
|
||||||
|
<td><?php echo $pform->area; ?></td>
|
||||||
|
<td><?php echo $pform->customer; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/view/<?php echo $pform->id; ?>'">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="save">
|
||||||
|
<a class="btn pull-right" href="<?php echo base_url(); ?>form"><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="formsaved">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
||||||
|
<th><i class="icon-envelope"></i> Sender</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Area</th>
|
||||||
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>1</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td>Omdo</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info disabled">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($form_saved as $pform){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $pform->date; ?></td>
|
||||||
|
<td><?php echo $pform->sender; ?></td>
|
||||||
|
<td><?php echo $pform->area; ?></td>
|
||||||
|
<td><?php echo $pform->customer; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/edit/<?php echo $pform->id; ?>'">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="staffside">
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-user"></i> List Sales</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well-white stafflist">
|
||||||
|
<a data-toggle="modal" href="#myModal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||||
|
<h3 id="myModalLabel">Add New User</h3>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>user/insert_user" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="control-label">Nama</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Nama" name="nama">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Username</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Username" name="username">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="password" placeholder="Password" name="password">
|
||||||
|
</div><br />
|
||||||
|
<!--
|
||||||
|
<label class="control-label">Confirm Password</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="password" placeholder="Re-Type Password">
|
||||||
|
</div><br>
|
||||||
|
-->
|
||||||
|
<label class="control-label">Role</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Role" name="role">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="stafflist">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-user"></i> Name</th>
|
||||||
|
<th><i class="icon-info-sign"></i> Username</th>
|
||||||
|
<th><i class="icon-tags"></i> Role</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info disabled">Action</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($user as $puser){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $puser->nama; ?></td>
|
||||||
|
<td><?php echo $puser->username; ?></td>
|
||||||
|
<td><?php echo $puser->role; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info" onclick="parent.location=''">Action</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div><!--/staffside-->
|
||||||
|
<div class="statsside">
|
||||||
|
<div id="dashboardTarget"></div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span10-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-tab.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-modal.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
828
application/views/bReview.php
Normal file
@ -0,0 +1,828 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Form Customer</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
|
||||||
|
<!-- Le styles -->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 60px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
.sidebar-nav {
|
||||||
|
padding: 9px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
/* Enable use of floated navbar text */
|
||||||
|
.navbar-text.pull-right {
|
||||||
|
float: none;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$nature_bisnis = explode(',',$form->nature_bisnis);
|
||||||
|
$onature = end($nature_bisnis); // move the internal pointer to the end of the array
|
||||||
|
//$onature = key($nature_bisnis);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/jquery.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/js/form_view.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
$(":input").prop("disabled", true);
|
||||||
|
$(".btn").prop("disabled", false);
|
||||||
|
x="<?php echo $action; ?>";
|
||||||
|
if ( x === 'view'){
|
||||||
|
$("#pending").show();
|
||||||
|
$("#fo1").attr("action", "<?php echo base_url(); ?>form/isApprove/<?php echo $form->id; ?>");
|
||||||
|
}
|
||||||
|
if ( x === 'edit')$("#saved").show();
|
||||||
|
|
||||||
|
//method
|
||||||
|
$('input:radio[name=rbCd][value="<?php echo $form->method; ?>"]').prop('checked', true);
|
||||||
|
|
||||||
|
var id = "<?php echo $form->id; ?>";
|
||||||
|
|
||||||
|
var nb = "<?php echo $form->nature_bisnis; ?>";
|
||||||
|
var ld = "<?php echo $form->loads; ?>";
|
||||||
|
var pu = "<?php echo $form->tire_purchases; ?>";
|
||||||
|
var ty = "<?php echo $form->tire_types; ?>";
|
||||||
|
var br = "<?php echo $form->tire_brands; ?>";
|
||||||
|
var fm = "<?php echo $form->nature_bisnis; ?>";
|
||||||
|
var rm = "<?php echo $form->nature_bisnis; ?>";
|
||||||
|
loadform(nb,ld,br);
|
||||||
|
load(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../assets/js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body data-spy="scroll" data-target=".sidebar">
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top" >
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#">Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;"><i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3 sidebar">
|
||||||
|
<div class="well affix span3">
|
||||||
|
<ul class="nav nav-list">
|
||||||
|
<li class="active"><a href="#1">Contact Details</a></li>
|
||||||
|
<li class=""><a href="#2">Vehicles Details</a></li>
|
||||||
|
<li class=""><a href="#3">Types</a></li>
|
||||||
|
<li class=""><a href="#4">Tyre Usages</a></li>
|
||||||
|
<li class=""><a href="#5">Recommendation</a></li>
|
||||||
|
<li class=""><a href="#6">Picture</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.well -->
|
||||||
|
</div><!--/span3-->
|
||||||
|
<!--section-->
|
||||||
|
<div class="span7 offset1 well">
|
||||||
|
<!--
|
||||||
|
<div class="hero-unit">
|
||||||
|
<h1>Hello, world!</h1>
|
||||||
|
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
|
||||||
|
<p><a href="#" class="btn btn-primary btn-large">Learn more »</a></p>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<form class="form-horizontal" id="fo1" action="<?php echo base_url(); ?>form/form_submit" method="post" enctype="multipart/form-data">
|
||||||
|
<section id="1">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Contact Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<!--form1-->
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>General Location</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30%">
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Province</h6></label>
|
||||||
|
<input type="text" name="cdProvince">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td width="30%">
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Kota</h6></label>
|
||||||
|
<input type="text" name="cdKota">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td width="30%"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Company Details</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="By Appoinment">By Appoinment
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="Cold Call/go show">Cold Call/go show
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value=""><input type="text" placeholder="Other" name="rbCd">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="70px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Staff of Scene</h6></label>
|
||||||
|
<input type="text" name="cdSos" value="<?php echo $form->sender; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Customer Name</h6></label>
|
||||||
|
<input type="text" name="cdCusName" value="<?php echo $form->customer; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Company">Company
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Individual">Individual
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<button type="button" class="btn">Search</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<hr>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Address / Phone no</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Head Office</h6></label>
|
||||||
|
<input type="text" name="cdOffice" value="<?php echo $form->head_address; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" id="" name="cdTelp" onkeypress="return isNumberKey(event)" value="<?php echo $form->head_phone; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Branch/Garage</h6></label>
|
||||||
|
<input type="text" name="cdBranch" value="<?php echo $form->branch_address; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" name="cdTelp2" onkeypress="return isNumberKey(event)" value="<?php echo $form->branch_phone; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Contact Person</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Name</h6></label>
|
||||||
|
<input type="text" name="cdcpname" value="<?php echo $form->cp_name; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" id="" name="cdcpphone" onkeypress="return isNumberKey(event)" value="<?php echo $form->cp_phone; ?>">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Nature Business</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_1" value="Transportation">Transportation
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_2" value="Bus">Bus
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_3" value="Minning">Minning
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_4" value="Expedition/Courier">Expedition/Courier
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_5" value="">
|
||||||
|
<input type="text" placeholder="Other"name="cdCb_5" value="<?php echo $onature; ?>">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="2">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Vehicles Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><strong>Number of vehicles owned</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Light Truck</td>
|
||||||
|
<td width="100px">QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td>
|
||||||
|
<td>QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtot" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">QTR</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre" maxlength="3" onkeypress="return isNumberKey(event)"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType2"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty2" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre2" maxlength="3" onkeypress="return isNumberKey(event)"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<table>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3"><strong>Load and Speed Details</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Type of Load</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_1" value="Materials">Materials</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_2" value="Passenger">Passenger</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_3" value="Goods">Goods</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_4" value="Soil">Soil</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_5" value="General Cargo">General Cargo</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_6" value="">
|
||||||
|
<input type="text" style="width:100px" placeholder="Other" name="vdCb_6"></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Average Weight of Loads</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Truck</td>
|
||||||
|
<td width="100px">Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Light Tr</td><td>Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtotwt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="2">Points of Origin Destination <input type="text" name="vdDest" value="<?php echo $form->destination; ?>"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="2">Driving Condition</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Good Roads</h6></label>
|
||||||
|
<input id="appendedInput" type="text" placeholder="Good Roads" name="vdgoro" value="<?php echo $form->road_condition_good; ?>">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Tool Roads</h6></label>
|
||||||
|
<input id="appendedInput" type="text" placeholder="Toll Roads" name="vdtoro" value="<?php echo $form->road_condition_toll; ?>">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Bad Roads</h6></label>
|
||||||
|
<input id="appendedInput" type="text" placeholder="Bad Roads" name="vdbaro" value="<?php echo $form->road_condition_bad; ?>">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Others</h6></label>
|
||||||
|
<input id="appendedInput" type="text" placeholder="Others" name="vdothers" value="<?php echo $form->road_condition_other; ?>">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="3">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Types</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Tyre Brands and Type</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_1" value="MRF">MRF</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_2" value="Goodyear">Goodyear</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_3" value="Bridgestone">Bridgestone</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_4" value="GT">GT</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_5" value="Dunlop">Dunlop</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_6" value="Chinese">Chinese</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_7" value="Kumho">Kumho</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_8" value="Hankook">Hankook</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_9" value="Coat">Coat</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_10" value="Thai">Thai</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_11" value="Maxxis">Maxxis</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_12" value="Chengsin">Chengsin</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_13" value="Epco">Epco</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_14" value="Swallow">Swallow</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_15" value="Chao Yang">Chao Yang</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type of Purchase</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_1" value="New Tyres">New Tyres</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_2" value="Retreads">Retreads</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_1" value="Rib">Rib</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_2" value="Lug">Lug</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_3" value="Bias">Bias</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_4" value="Radial">Radial</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="4">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Tyre Usages</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Milleage</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Estimates">Estimates</label>
|
||||||
|
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Front" name="trmfront" value="<?php echo $form->mileage_front; ?>">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Rear" name="trmrear" value="<?php echo $form->mileage_rear; ?>">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<label>Details</label>
|
||||||
|
<textarea rows="3" name="trmdetails"><?php echo $form->mileage_detail; ?></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>New Tyre Purchase per Month</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Estimates">Estimates</label>
|
||||||
|
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
</div>
|
||||||
|
</div><hr>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Front Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trfpsi" value="<?php echo $form->psi_front; ?>">
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb3" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>Rear Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trrpsi" value="<?php echo $form->psi_rear; ?>">
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb3" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="OTR" name='trotr' value="<?php echo $form->otr; ?>">
|
||||||
|
<br></br>
|
||||||
|
<textarea class="span9" rows="5" placeholder="Problem faced with current type" name="trproblem">
|
||||||
|
<?php echo $form->problem; ?>
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="5">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Recommendation</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="6">
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Picture</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<input type="file" name="upload">
|
||||||
|
</section>
|
||||||
|
<div class="row-fluid" id="edit" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn"><a href="<?php echo base_url(); ?>">Discard</a></button>
|
||||||
|
<button type="submit" value="Submit" class="btn btn-primary">Save</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid" id="pending" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn" onclick="parent.location='<?php echo base_url(); ?>'">Reject</button>
|
||||||
|
<button type="submit" value="Submit" class="btn btn-primary">Approve</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row-fluid" id="saved" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn btn-warning" name="edit" onclick="edited()">
|
||||||
|
<i class="icon-edit icon-white"></i> Edit</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!--<a style="margin-top:300px;"><i class="icon-chevron-left"></i> Back</a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<!--
|
||||||
|
<footer>
|
||||||
|
<p>© Company 2013</p>
|
||||||
|
</footer>
|
||||||
|
-->
|
||||||
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-button.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-typeahead.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
10
application/views/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
163
application/views/vAdmin.php
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Admin Page</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<!--table sorter-->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/tablesorter/demo_table.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {padding-top: 40px;padding-bottom: 40px;}
|
||||||
|
.well-white {
|
||||||
|
min-height: 20px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
background-color: #fff;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
ul#sidebar{border: outset 1px;margin-top:15px;border-radius:5px;padding:10px;list-style:none;}
|
||||||
|
#sidebar li a{display:block;color:#777;outline:none;font-weight:bold;text-decoration:none;line-height:30px;padding:0px 20px;}
|
||||||
|
#sidebar li a:hover,#sidebar li.selected a{background:#C0C0C0;color:#fff;}
|
||||||
|
#sidebar li a:hover{background:#CDFFFF;color:#000;}
|
||||||
|
#steps{height:auto;overflow:hidden;border-left:outset 1px;padding:15px;}
|
||||||
|
.formside{display:block;}
|
||||||
|
.staffside, statsside{display:none;}
|
||||||
|
.stafflist{border:inset 1px rgba(0, 0, 0, 0.05);border-radius:5px;padding:30px;background-color:#F0F0F0 ;}
|
||||||
|
.modal-body input{padding: 11px 0px 11px 11px;height : 36px;}
|
||||||
|
input::-webkit-outer-spin-button,
|
||||||
|
input::-webkit-inner-spin-button {
|
||||||
|
/* display: none; <- Crashes Chrome on hover */
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.js"></script>
|
||||||
|
<script type="text/javascript" language="javascript" src="<?php echo base_url(); ?>asset/tablesorter/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
var loading = "<div id='loadingcontent'><img src='<?php echo base_url(); ?>asset/img/loading7.gif' alt='loading' style='float:right;margin:100px 500px;'/></div>";
|
||||||
|
var imgloading = "<img src='<?php echo base_url(); ?>asset/img/ajax_loading.gif' alt='loading' id='imgloading' width='20px;' style='float:right;margin-top:12px;display:block;' />";
|
||||||
|
$(document).ready(function() {
|
||||||
|
setTimeout(function(){
|
||||||
|
$("div.alert").fadeOut("slow", function () {
|
||||||
|
$("div.alert").remove();
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
$('#content').html(loading);
|
||||||
|
$("#content").load("user/loadform");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#sidebar li a").live('click', function(event) {
|
||||||
|
$('#imgloading').remove();
|
||||||
|
$(imgloading).appendTo($(this));
|
||||||
|
$('#content').html(loading);
|
||||||
|
$(".selected", event.delegateTarget).removeClass("selected");
|
||||||
|
$(this).parent().addClass("selected");
|
||||||
|
event.preventDefault();
|
||||||
|
var href = $(this).attr('href');
|
||||||
|
var base_url = 'http://localhost/everseiko/'
|
||||||
|
$.ajax({
|
||||||
|
url: base_url+href,
|
||||||
|
success: function()
|
||||||
|
{
|
||||||
|
$("#content").load(href);
|
||||||
|
$('#content').fadeIn(3000);
|
||||||
|
$('#imgloading').remove();
|
||||||
|
},
|
||||||
|
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||||
|
{
|
||||||
|
//alert("Status: " + textStatus);
|
||||||
|
alert("Error: " + errorThrown);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#"><i class="icon-wrench icon-white"></i> Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;">
|
||||||
|
<i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav">
|
||||||
|
<!--
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
-->
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container fluid-->
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3">
|
||||||
|
<ul id="sidebar">
|
||||||
|
<li id="form" class="selected" ><a href="user/loadform" ><i class="icon-list-alt"></i> Form </a></li>
|
||||||
|
<li id="staff"><a href="user/loadstaff" ><i class="icon-user"></i> Sales </a></li>
|
||||||
|
<li id="sellingout"><a href="user/loadsellingout" ><i class="icon-share-alt"></i> Selling Out </a></li>
|
||||||
|
<li id="volume"><a href="user/loadvolume"><i class=""></i> Volume </a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!--Content-->
|
||||||
|
<div class="span9" id="steps">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($this->session->userdata('status')=='1' )
|
||||||
|
{
|
||||||
|
$tipe = $this->session->userdata('tipe');
|
||||||
|
echo "
|
||||||
|
<div id='note' class='alert ".$tipe."'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert'>×</button>
|
||||||
|
".$this->session->userdata('message')."
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="content" style="diplay:none;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span10-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-tab.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-modal.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
94
application/views/vAdminForm.php
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#testing').dataTable();
|
||||||
|
$('#testing2').dataTable();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-list-alt"></i> List Form</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul id="tt" class="nav nav-tabs">
|
||||||
|
<li class="active"><a href="#a" data-toggle="tab"><i class="icon-time"></i> Pending</a></li>
|
||||||
|
<li><a href="#b" data-toggle="tab"><i class="icon-ok"></i> Saved</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="ttContent" class="tab-content well">
|
||||||
|
<div class="tab-pane fade in active" id="a">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="testing">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
||||||
|
<th><i class="icon-envelope"></i> Sender</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Area</th>
|
||||||
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>2013-05-27 16:25:39</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td>Suprapto</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info disabled">View</button></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($form_pending as $pform){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $pform->date_visit; ?></td>
|
||||||
|
<td><?php echo $pform->sender; ?></td>
|
||||||
|
<td><?php echo $pform->province; ?></td>
|
||||||
|
<td><?php echo $pform->customer; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/view/<?php echo $pform->id; ?>'">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="b">
|
||||||
|
<a class="btn pull-right" href="<?php echo base_url(); ?>form"><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="testing2">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-calendar"></i> Date/Time</th>
|
||||||
|
<th><i class="icon-envelope"></i> Sender</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Area</th>
|
||||||
|
<th><i class="icon-briefcase"></i> Customer/Client</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>2013-07-25 15:28:56</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td>Sumartoyo</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info disabled">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($form_saved as $pform){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $pform->date_visit; ?></td>
|
||||||
|
<td><?php echo $pform->sender; ?></td>
|
||||||
|
<td><?php echo $pform->province; ?></td>
|
||||||
|
<td><?php echo $pform->customer; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-info" onclick="parent.location='<?php echo base_url(); ?>form/view_form/edit/<?php echo $pform->id; ?>'">View</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
178
application/views/vAdminSellingout.php
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#sellingouttab').dataTable();
|
||||||
|
/*
|
||||||
|
$('#cust').keyup(function(){
|
||||||
|
if ($(this).val() != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: 'form/searchcustomer/'+$(this).val(),
|
||||||
|
success: function(msg)
|
||||||
|
{
|
||||||
|
var data;
|
||||||
|
var sg = '[';
|
||||||
|
data = jQuery.parseJSON(msg);
|
||||||
|
for (var i = 0; i < data.length; i++)
|
||||||
|
{
|
||||||
|
sg = sg+'"'+data[i]['nama']+'", ';
|
||||||
|
};
|
||||||
|
sg=sg+']';
|
||||||
|
$('#suggestion').css('display','block');
|
||||||
|
if (msg != '""')
|
||||||
|
{
|
||||||
|
var data;
|
||||||
|
var sg = '';
|
||||||
|
data = jQuery.parseJSON(msg);
|
||||||
|
for (var i = 0; i < data.length; i++)
|
||||||
|
{
|
||||||
|
sg = sg+data[i]['nama']+", ";
|
||||||
|
};
|
||||||
|
$('#suggestion').html('Suggestion : '+ sg);
|
||||||
|
if (data.length==1)
|
||||||
|
{
|
||||||
|
//$('#cust').val(data[0]['nama'])
|
||||||
|
//alert('found');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#suggestion').html("Nothing Found");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{$('#suggestion').css('display','none');}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
$('#cust').keyup(function(){
|
||||||
|
$('#customer option').remove();
|
||||||
|
if ($(this).val() != '')
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
url: 'form/searchcustomer/'+$(this).val(),
|
||||||
|
success: function(msg)
|
||||||
|
{
|
||||||
|
if (msg != '""')
|
||||||
|
{
|
||||||
|
var data;
|
||||||
|
data = jQuery.parseJSON(msg);
|
||||||
|
for (var i = 0; i < data.length; i++)
|
||||||
|
{
|
||||||
|
var op = "<option>"+data[i]['nama']+"</option>"
|
||||||
|
$(op).appendTo('#customer');
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var op = "<option>Nothing Found</option>"
|
||||||
|
$(op).appendTo('#customer');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-share-alt"></i> Selling Out</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well-white stafflist">
|
||||||
|
<a data-toggle="modal" href="#myModal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="sellingouttab">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-user"></i> Customer</th>
|
||||||
|
<th><i class="icon-calendar"></i> Date</th>
|
||||||
|
<th><i class=""></i> Quantity</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>everseiko</td>
|
||||||
|
<td>January 2013</td>
|
||||||
|
<td>5</td>
|
||||||
|
<td align="center">
|
||||||
|
<!--<button class="btn btn-small btn-primary disabled">Edit</button>-->
|
||||||
|
<button class="btn btn-small btn-danger disabled">Delete</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
foreach($sellout as $so){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $so->customer; ?></td>
|
||||||
|
<td><?php echo $so->bulan." ".$so->tahun; ?></td>
|
||||||
|
<td><?php echo $so->qty; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<!--<button class="btn btn-small btn-primary">Edit</button>-->
|
||||||
|
<button class="btn btn-small btn-danger" onclick="deleteUser('<?php //echo $puser->username; ?>')">Delete</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--modal-->
|
||||||
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||||
|
<h3 id="myModalLabel">Add Selling Out</h3>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>form/addSellout" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="control-label">ID Customer</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="ID Customer" name="ID" id="idc">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Customer</label>
|
||||||
|
<div class="controls">
|
||||||
|
<!--
|
||||||
|
<input type="text" placeholder="Customer Name" id="cust" name="customer">
|
||||||
|
<div id="suggestion" style="display:none;margin-top:5px;"></div>
|
||||||
|
-->
|
||||||
|
<input list="customer" name="customer" id="cust" style="border-radius:4px;border: 1px solid #cccccc;">
|
||||||
|
<datalist id="customer"></datalist>
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Period</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="bulan" style="width:120px;overflow:scroll">
|
||||||
|
<option>---Month---</option>
|
||||||
|
<option>January</option>
|
||||||
|
<option>February</option>
|
||||||
|
<option>March</option>
|
||||||
|
<option>April</option>
|
||||||
|
<option>Mei</option>
|
||||||
|
<option>June</option>
|
||||||
|
<option>July</option>
|
||||||
|
<option>August</option>
|
||||||
|
<option>September</option>
|
||||||
|
<option>October</option>
|
||||||
|
<option>November</option>
|
||||||
|
<option>December</option>
|
||||||
|
</select>
|
||||||
|
<input type="number" name="tahun" style="width:80px;font-size:15px;padding:5px;" value="2012">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Quantity</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" placeholder="Quantity" name="qty" style="font-size:15px;padding:5px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
94
application/views/vAdminStaff.php
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#stafflist').dataTable();
|
||||||
|
});
|
||||||
|
function deleteUser(id)
|
||||||
|
{
|
||||||
|
var url="<?php echo base_url();?>";
|
||||||
|
var r=confirm("Do you want to delete this?");
|
||||||
|
if (r==true)
|
||||||
|
{
|
||||||
|
window.location = url+"user/delete_user/"+id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-user"></i> List Sales</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well-white stafflist">
|
||||||
|
<a data-toggle="modal" href="#myModal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="table display" id="stafflist">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-user"></i> Name</th>
|
||||||
|
<th><i class="icon-info-sign"></i> Username</th>
|
||||||
|
<th><i class="icon-tags"></i> Role</th>
|
||||||
|
<th><i class="icon-wrench"></i> Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Mark</td>
|
||||||
|
<td>Jawa Tengah</td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-danger disabled">Delete</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($user as $puser){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $puser->nama; ?></td>
|
||||||
|
<td><?php echo $puser->username; ?></td>
|
||||||
|
<td><?php echo $puser->role; ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<button class="btn btn-small btn-danger" onclick="deleteUser('<?php echo $puser->username; ?>')">Delete</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--modal-->
|
||||||
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||||
|
<h3 id="myModalLabel">Add New User</h3>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>user/insert_user" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="control-label">Nama :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Nama" name="nama">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Username :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Username" name="username">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Password :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="password" placeholder="Password" name="password">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Role :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="Role" name="role">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
226
application/views/vAdminVolume.php
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
<script>
|
||||||
|
var data;
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#volumelist').dataTable( {
|
||||||
|
"sScrollX": "1000px",
|
||||||
|
"sScrollXInner": "1800px",
|
||||||
|
"bScrollCollapse": true
|
||||||
|
} );
|
||||||
|
$('#modal').click(function()
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
url: 'form/loadwilayah/',
|
||||||
|
success: function(msg)
|
||||||
|
{
|
||||||
|
data = jQuery.parseJSON(msg);
|
||||||
|
var region;
|
||||||
|
for (var i=0;i<data.length;i++)
|
||||||
|
{
|
||||||
|
if (i==0)
|
||||||
|
{
|
||||||
|
region=data[i]['region'];
|
||||||
|
var op = "<option>"+data[i]['region']+"</option>"
|
||||||
|
$(op).appendTo('#region');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(data[i]['region']!=region)
|
||||||
|
{
|
||||||
|
var op = "<option>"+data[i]['region']+"</option>"
|
||||||
|
$(op).appendTo('#region');
|
||||||
|
region=data[i]['region'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
function showprovince(val)
|
||||||
|
{
|
||||||
|
$('#prov option:not(:first-child)').remove();
|
||||||
|
for (var i=0;i<data.length;i++)
|
||||||
|
{
|
||||||
|
if (data[i]['region']==val)
|
||||||
|
{
|
||||||
|
var op = "<option>"+data[i]['province']+"</option>"
|
||||||
|
$(op).appendTo('#prov');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showarea(val)
|
||||||
|
{
|
||||||
|
$('#area option:not(:first-child)').remove();
|
||||||
|
for (var i=0;i<data.length;i++)
|
||||||
|
{
|
||||||
|
if (data[i]['province']==val)
|
||||||
|
{
|
||||||
|
var op = "<option>"+data[i]['kota']+"</option>"
|
||||||
|
$(op).appendTo('#area');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="well-white">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<a class="brand"><i class="icon-user"></i> List Volume</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well-white stafflist">
|
||||||
|
<a data-toggle="modal" href="#myModal" id="modal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
||||||
|
<br /><br />
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0" class="display" id="volumelist">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><i class="icon-user"></i> Dealaer</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Region</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Province</th>
|
||||||
|
<th><i class="icon-map-marker"></i> Area</th>
|
||||||
|
<th><i class="icon-calendar"></i> Month</th>
|
||||||
|
<th><i class="icon-tasks"></i> Target</th>
|
||||||
|
<th><i class="icon-share-alt"></i> Sellout</th>
|
||||||
|
<th><i class="icon-shopping-cart"></i> Order</th>
|
||||||
|
<th><i class=""></i> Previous Stock</th>
|
||||||
|
<th><i class=""></i> Actual</th>
|
||||||
|
<th><i class=""></i> Current Stock</th>
|
||||||
|
<th><i class=""></i> Category</th>
|
||||||
|
<th><i class=""></i> Pattern</th>
|
||||||
|
<th><i class=""></i> Service Level</th>
|
||||||
|
<!--<th><i class="icon-wrench"></i> Action</th>-->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>everseiko</td>
|
||||||
|
<td>Jawa</td>
|
||||||
|
<td>Jawa Barat</td>
|
||||||
|
<td>Bandung</td>
|
||||||
|
<td>April</td>
|
||||||
|
<td>4</td>
|
||||||
|
<td>6</td>
|
||||||
|
<td>2</td>
|
||||||
|
<td>7</td>
|
||||||
|
<td>7</td>
|
||||||
|
<td>5</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<!--<td align="center">
|
||||||
|
<button class="btn btn-small btn-danger disabled">Delete</button>
|
||||||
|
</td>-->
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($volume as $vlm){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $vlm->dealer; ?></td>
|
||||||
|
<td><?php echo $vlm->region; ?></td>
|
||||||
|
<td><?php echo $vlm->province; ?></td>
|
||||||
|
<td><?php echo $vlm->area; ?></td>
|
||||||
|
<td><?php echo $vlm->date; ?></td>
|
||||||
|
<td><?php echo $vlm->target; ?></td>
|
||||||
|
<td><?php echo $vlm->sellout; ?></td>
|
||||||
|
<td><?php echo $vlm->order; ?></td>
|
||||||
|
<td><?php echo $vlm->previous_stock; ?></td>
|
||||||
|
<td><?php echo $vlm->actual; ?></td>
|
||||||
|
<td><?php echo $vlm->current_stock; ?></td>
|
||||||
|
<td><?php echo $vlm->category; ?></td>
|
||||||
|
<td><?php echo $vlm->pattern; ?></td>
|
||||||
|
<td><?php echo $vlm->service_level; ?></td>
|
||||||
|
<!--<td align="center">
|
||||||
|
<button class="btn btn-small btn-danger" onclick="">Delete</button>
|
||||||
|
</td>-->
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--modal-->
|
||||||
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||||
|
<h3 id="myModalLabel">Add New Volume</h3>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>form/addVolume" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="control-label">Dealer :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="dealer">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Region :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="region" id="region" onchange="showprovince(this.value)">
|
||||||
|
<option>--select region</option>
|
||||||
|
</select>
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Province :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="province" id="prov" onchange="showarea(this.value)">
|
||||||
|
<option>--select province</option>
|
||||||
|
</select>
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Area :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="area" id="area">
|
||||||
|
<option>--select area</option>
|
||||||
|
</select>
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Date :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="date" name="date">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Target :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" name="target" style="font-size:15px;padding:5px;" value="0">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Previous Stock :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" name="prevstock" style="font-size:15px;padding:5px;" value="0">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Actual :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" name="actual" style="font-size:15px;padding:5px;" value="0">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Sellout :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" name="sellout" style="font-size:15px;padding:5px;" value="0">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Order :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="number" name="order" style="font-size:15px;padding:5px;" value="0">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Pattern :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="pattern" id="pattern" style="overflow:auto">
|
||||||
|
<option>7.50-16 M77</option>
|
||||||
|
<option>7.50-16 SLUG</option>
|
||||||
|
<option>7.50-16 SM95</option>
|
||||||
|
<option>7.50-16 SML</option>
|
||||||
|
<option>9.00-20 M77</option>
|
||||||
|
<option>9.00-20 SML</option>
|
||||||
|
<option>10.00-20 M77</option>
|
||||||
|
<option>10.00-20 SLUG</option>
|
||||||
|
<option>10.00-20 SLUG 50+</option>
|
||||||
|
<option>10.00-20 SLUG 50+R</option>
|
||||||
|
<option>11.00-20 M77</option>
|
||||||
|
<option>11.00-20 MMR</option>
|
||||||
|
<option>11.00-20 SLUG</option>
|
||||||
|
<option>11.00-20 SLUG 50+</option>
|
||||||
|
<option>11.00-20 SLUG 50+R</option>
|
||||||
|
<option>11.00-20 SM95</option>
|
||||||
|
</select>
|
||||||
|
</div><br />
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
924
application/views/vForm2.php
Normal file
@ -0,0 +1,924 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Form Customer</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
|
||||||
|
<!-- Le styles -->
|
||||||
|
|
||||||
|
<link href="<?php echo base_url(); ?>asset/sliderform/style.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 60px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
h1{
|
||||||
|
color:#ccc;
|
||||||
|
font-size:36px;
|
||||||
|
text-shadow:1px 1px 1px #fff;
|
||||||
|
padding:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.filebutton {
|
||||||
|
width:80px;
|
||||||
|
height:20px;
|
||||||
|
overflow:hidden;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn input {
|
||||||
|
opacity: 0;
|
||||||
|
filter: alpha(opacity = 0);
|
||||||
|
-ms-filter: "alpha(opacity=0)";
|
||||||
|
cursor: pointer;
|
||||||
|
_cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
/* Enable use of floated navbar text */
|
||||||
|
.navbar-text.pull-right {
|
||||||
|
float: none;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../assets/js/html5shiv.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top" >
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="#">Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;"><i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3 test">
|
||||||
|
<div id="navigation" style="display:none;">
|
||||||
|
<ul>
|
||||||
|
<li class="selected">
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Contact Details</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Vehicles Details</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Types</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Tyre Usages</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Recommendation</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Upload Picture</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#"><i class="icon-chevron-right"></i> Confirm</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--form content-->
|
||||||
|
<div class="span7">
|
||||||
|
<?php //notiffication
|
||||||
|
if ($this->session->userdata('status')=='1' )
|
||||||
|
{
|
||||||
|
$tipe = $this->session->userdata('tipe');
|
||||||
|
echo "
|
||||||
|
<div id='note' class='alert ".$tipe."'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert'>×</button>
|
||||||
|
".$this->session->userdata('message')."
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div id="content">
|
||||||
|
<div id= "wrapper">
|
||||||
|
<div id="steps">
|
||||||
|
<form id="formElem" class="form-horizontal" action="<?php echo base_url(); ?>form/form_submit" method="post" name="fo1">
|
||||||
|
<!--Contact details-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Contact Details</strong></legend>
|
||||||
|
|
||||||
|
<h5>General Location</h5>
|
||||||
|
<input type="text" placeholder="Province" name="cdProvince">
|
||||||
|
<input type="text" placeholder="Kota" name="cdKota">
|
||||||
|
|
||||||
|
<h5>Company Details</h5>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="appoinment">By Appoinment
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="show">Cold Call/go show
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="Other"><input type="text" placeholder="Other" name="rbCdO">
|
||||||
|
</label>
|
||||||
|
<br></br>
|
||||||
|
<input type="text" placeholder="Staff of Scene" name="cdSos" value="<?php echo $this->auth->CI->session->userdata('nama'); ?>">
|
||||||
|
<input type="text" id="search" placeholder="Customer Name" style="width:300px" name="cdCusName">
|
||||||
|
<div id="quick-search" style="width:300px; display:none; border:1px solid #efefef;"></div>
|
||||||
|
<br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Company">Company
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Individual">Individual
|
||||||
|
</label>
|
||||||
|
<br></br>
|
||||||
|
<button type="button" class="btn btn-small">Search</button>
|
||||||
|
|
||||||
|
<h5>Address / Phone no</h5>
|
||||||
|
<input type="text" placeholder="Head Office" name="cdOffice">
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdTelp" onkeypress="return isNumberKey(event)">
|
||||||
|
<br></br>
|
||||||
|
<input type="text" id="" placeholder="Branch/Garrage" name="cdBranch">
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdTelp2" onkeypress="return isNumberKey(event)">
|
||||||
|
<br></br>
|
||||||
|
<h5>Contact Person</h5>
|
||||||
|
<input type="text" placeholder="Name" name="cdcpname">
|
||||||
|
<input type="text" id="" placeholder="Phone" name="cdcpphone" onkeypress="return isNumberKey(event)">
|
||||||
|
<br></br>
|
||||||
|
<h5>Nature Business</h5>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_1" value="Bus">Bus
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_2" value="Minning">Minning
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_3" value="Expedition">Expedition
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_4" value="Loging">Loging
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_5" value="Cement">Cement
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_6" value="Bulk">Bulk
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_7" value="Container">Container
|
||||||
|
</label>
|
||||||
|
</fieldset>
|
||||||
|
<!--vehicles details-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<div id="slider1">
|
||||||
|
<legend><strong>Vehicles Details</strong></legend>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><strong>Number of vehicles owned</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Light Truck</td>
|
||||||
|
<td width="100px">QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td>
|
||||||
|
<td>QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtot" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">QTR</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3"><strong>Load and Speed Details</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Type of Load</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_1" value="Materials">Materials</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_2" value="Passenger">Passenger</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_3" value="Goods">Goods</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_4" value="Soil">Soil</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_5" value="General Cargo">General Cargo</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_6" value="">
|
||||||
|
<input type="text" style="width:100px" placeholder="Other" name="vdCb_6">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Average Weight of Loads</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Light Truck</td>
|
||||||
|
<td width="100px">Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td><td>Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtotwt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="2">Points of Origin Destination <input type="text" name="vdDest"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="2">Driving Condition</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Good Roads" name="vdgoro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Toll Roads" name="vdtoro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Bad Roads" name="vdbaro">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<input id="appendedInput" type="text" placeholder="Others" name="vdothers">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--type-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Types</strong></legend>
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3">
|
||||||
|
<strong>Tyre Brands and Type</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_1" value="MRF">MRF</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_2" value="Goodyear">Goodyear</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_3" value="Bridgestone">Bridgestone</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_4" value="GT">GT</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_5" value="Dunlop">Dunlop</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_6" value="Chinese">Chinese</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_7" value="Kumho">Kumho</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_8" value="Hankook">Hankook</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_9" value="Ceat">Ceat</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_10" value="Thai">Thai</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_11" value="Maxxis">Maxxis</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_12" value="Chengsin">Chengsin</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_13" value="Epco">Epco</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_14" value="Swallow">Swallow</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_15" value="ChaoYang">ChaoYang</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type of Purchase</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_1" value="New Tyres">New Tyres</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_2" value="Retreads">Retreads</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_1" value="Rib">Rib</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_2" value="Lug">Lug</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_3" value="Bias">Bias</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_4" value="Radial">Radial</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<!--tyre usages-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Tyre Usages</strong></legend>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid" style="overflow:auto;height:300px;">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Milleage</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Estimates">Estimates</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Front" name="trmfront">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="Rear" name="trmrear">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
<label>Details</label>
|
||||||
|
<textarea rows="3" name="trmdetails"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="span7 offset1">
|
||||||
|
<strong>New Tyre Purchase per Month</strong><br></br>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Estimates">Estimates</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="trRb2" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
<label>
|
||||||
|
<strong>
|
||||||
|
Brand      
|
||||||
|
Pattern      
|
||||||
|
Size      
|
||||||
|
Qty
|
||||||
|
</strong>
|
||||||
|
</label>
|
||||||
|
<label>MRF   </label>
|
||||||
|
<div class="span10 MRF" style="margin-top:-25px;">
|
||||||
|
<div class="span10 inline" style="float:right;margin-bottom:3px;">
|
||||||
|
<input style="width:50px;" id="MRF1" type="text" name="pattern[]">
|
||||||
|
<input style="width:30px;" id="MRF2" type="text" name="size[]">
|
||||||
|
<input style="width:30px;" id="MRF3" type="text" name="qty[]">
|
||||||
|
<button type="button" onclick="addPurchaseMRF()">+</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="MRFcount" id="countMRF">
|
||||||
|
</br>
|
||||||
|
<div class="Othertype">
|
||||||
|
<div class="span11 inline" style="margin-bottom:3px;">
|
||||||
|
<input style="width:50px;margin-right:0;" id="other0" type="text" name="obrand[]">
|
||||||
|
<input style="width:50px;" id="other1" type="text" name="opattern[]">
|
||||||
|
<input style="width:30px;" id="other2" type="text" name="osize[]">
|
||||||
|
<input style="width:30px;" id="other3" type="text" name="oqty[]">
|
||||||
|
<button type="button" onclick="addPurchaseOther()">+</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="Othercount" id="countOther">
|
||||||
|
<br></br>
|
||||||
|
</div>
|
||||||
|
</div><hr>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Front Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trfpsi"><br></br>
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="New Tyre">New Tyre</label>  
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb32" value="Retreads">Retreads</label>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>Rear Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="appendedInput" type="text" placeholder="psi" name="trrpsi"><br></br>
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb41" value="New Tyre">New Tyre</label>  
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb42" value="Retreads">Retreads</label>
|
||||||
|
</div>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<input class="span9" id="appendedInput" placeholder="OTR" name='trotr'><br></br>
|
||||||
|
<textarea class="span9" rows="5" placeholder="Problem faced with current type" name="trproblem"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--Recommendation-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Recommendation</strong></legend>
|
||||||
|
<div class="container-fluid rec">
|
||||||
|
<div class="row-fluid recommendation">
|
||||||
|
<select class="span3" id="rpat" style="margin-bottom:3px">
|
||||||
|
<option>M77</option>
|
||||||
|
<option>MMR</option>
|
||||||
|
<option>SLUG</option>
|
||||||
|
<option>SLUG 50+</option>
|
||||||
|
<option>SLUG 50+R</option>
|
||||||
|
<option>SM95</option>
|
||||||
|
<option>SML</option>
|
||||||
|
</select>
|
||||||
|
<select class="span3" id="rsz">
|
||||||
|
<option>7.50-16</option>
|
||||||
|
<option>9.00-20</option>
|
||||||
|
<option>10.00-20</option>
|
||||||
|
<option>11.00-20</option>
|
||||||
|
</select>
|
||||||
|
<select class="span3" id="rmrk">
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" class="btn" onclick="addRec()">Add</button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="rcmcount" id="countRcm">
|
||||||
|
<br>
|
||||||
|
<label>Other</label>
|
||||||
|
<div class="row-fluid rOther">
|
||||||
|
<input class="span3" id="rpat" type="text" name="rpattern[]" placeholder="Pattern">
|
||||||
|
<input class="span3" id="rsz" type="text" name="rsize[]" placeholder="Size">
|
||||||
|
<input class="span3" id="rmrk" type="text" name="rremark[]" placeholder="Remark">
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid rOther">
|
||||||
|
<input class="span3" id="rpat" type="text" name="rpattern[]" placeholder="Pattern">
|
||||||
|
<input class="span3" id="rsz" type="text" name="rsize[]" placeholder="Size">
|
||||||
|
<input class="span3" id="rmrk" type="text" name="rremark[]" placeholder="Remark">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--Upload Picture-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Upload Picture</strong></legend>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<label class="filebutton btn btn-success" id="input_field">
|
||||||
|
<i class="icon-plus icon-white"></i> Add Files
|
||||||
|
<input type="file" multiple="true" id="files" onkeydown="return false;" onchange="upload_img()" name="uploadFile"/>
|
||||||
|
</label>
|
||||||
|
<br></br>
|
||||||
|
<div id="images" style="background-color:#C0C0C0;border:none">
|
||||||
|
</div>
|
||||||
|
<br></br>
|
||||||
|
<button class="btn btn-warning" type="button" onclick="clearFileInputField('input_field')" style="display:none" id="clear">Clear
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<!--confirm-->
|
||||||
|
<fieldset class="step">
|
||||||
|
<legend><strong>Confirm</strong></legend>
|
||||||
|
<div class="" style="width:100%;height:100%;margin-top:200px;" align="center">
|
||||||
|
<a href="<?php echo base_url(); ?>"><button type="button" class="btn btn-large" name="save">Discard</button></a><br></br>
|
||||||
|
<button type="submit" value="Submit" class="btn btn-primary btn-large" name="send" >Save</button>
|
||||||
|
<br></br>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<div class="pull-right" style="margin-top:10px;">
|
||||||
|
<button class="btn btn-small" id="nextb">Previous</button>
|
||||||
|
<button class="btn btn-small" id="prevb">Next</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</div><!--/span7-->
|
||||||
|
</div><!--/row-->
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>© Everseiko 2013</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/jquery.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-typeahead.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/sliderform/sliding.form.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/slimscroll/jquery-ui.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/slimscroll/jquery.slimscroll.min.js"></script>
|
||||||
|
<script>
|
||||||
|
function isNumberKey(evt)
|
||||||
|
{
|
||||||
|
var charCode = (evt.which) ? evt.which : event.keyCode
|
||||||
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
||||||
|
{
|
||||||
|
alert('Number Only');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
$('#slider1').slimScroll({height: '800px'});
|
||||||
|
setTimeout(function(){
|
||||||
|
$("div.alert").fadeOut("slow", function () {
|
||||||
|
$("div.alert").remove();
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
$("input#search").keyup(function()
|
||||||
|
{
|
||||||
|
if(this.value.length<3)
|
||||||
|
{
|
||||||
|
$("div#quick-search").slideUp(200,function()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "quicksearch.php?search="+this.value,
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data)
|
||||||
|
{
|
||||||
|
// no results, best hide the quicksearch DIV...
|
||||||
|
if(data.length<1)
|
||||||
|
{
|
||||||
|
$("div#quick-search").slideUp(200);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
// we've got results, so show them...
|
||||||
|
var strOutputHTML = '<ul>';
|
||||||
|
for(intCounter = 0; intCounter < data.length; intCounter++)
|
||||||
|
{
|
||||||
|
strOutputHTML += '<li><a href="' + data[intCounter].href + '">'
|
||||||
|
+ data[intCounter].title + '</a></li>';
|
||||||
|
}
|
||||||
|
strOutputHTML += '</ul>';
|
||||||
|
$("div#quick-search").html(strOutputHTML);
|
||||||
|
$("div#quick-search").slideDown(200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
var reader = new FileReader(),
|
||||||
|
i=0,
|
||||||
|
numFiles = 0,
|
||||||
|
imageFiles;
|
||||||
|
|
||||||
|
// use the FileReader to read image i
|
||||||
|
function readFile()
|
||||||
|
{
|
||||||
|
reader.readAsDataURL(imageFiles[i])
|
||||||
|
}
|
||||||
|
// define function to be run when the File
|
||||||
|
// reader has finished reading the file
|
||||||
|
reader.onload = function(e)
|
||||||
|
{
|
||||||
|
// make an image and append it to the div
|
||||||
|
var image = $('<img>').attr({'src': e.target.result,'width':'150px'});
|
||||||
|
var a = "<br>";
|
||||||
|
var filename = $('input[type=file]').val();
|
||||||
|
$(image).css({
|
||||||
|
'margin-right':'20px',
|
||||||
|
'border' : 'single'
|
||||||
|
});
|
||||||
|
$(image).appendTo('#images');
|
||||||
|
//$(a).appendTo('#images');
|
||||||
|
$(filename).appendTo('#images');
|
||||||
|
|
||||||
|
// if there are more files run the file reader again
|
||||||
|
if (i < numFiles) {
|
||||||
|
i++;
|
||||||
|
readFile();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
function upload_img()
|
||||||
|
{
|
||||||
|
imageFiles = document.getElementById('files').files
|
||||||
|
// get the number of files
|
||||||
|
numFiles = imageFiles.length;
|
||||||
|
readFile();
|
||||||
|
$('#clear').show();
|
||||||
|
$('#input_field').hide();
|
||||||
|
};
|
||||||
|
function clearFileInputField(tagId)
|
||||||
|
{
|
||||||
|
document.getElementById(tagId).innerHTML =
|
||||||
|
document.getElementById(tagId).innerHTML;
|
||||||
|
$('#images').html('');
|
||||||
|
$('#clear').hide();
|
||||||
|
$('#input_field').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var mrf = 1;
|
||||||
|
function addPurchaseMRF()
|
||||||
|
{
|
||||||
|
var a = "<div class='span10 inline' style='float:right;margin-bottom:3px;'>"
|
||||||
|
+"<input type='text' name='pattern[]' value='"+$('#MRF1').val()+"' style='margin-right:15px;width:50px;'>"
|
||||||
|
+"<input style='width:30px;margin-right:14px;' type='text' name='size[]' value='"+$('#MRF2').val()+"'>"
|
||||||
|
+"<input style='width:30px;' type='text' name='qty[]' value='"+$('#MRF3').val()+"'>"
|
||||||
|
+"<button type='button' onclick='deletee(this)' style='margin-left:8px;'>-</button>";
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('.MRF');
|
||||||
|
$('#MRF1').val('');
|
||||||
|
$('#MRF2').val('');
|
||||||
|
$('#MRF3').val('');
|
||||||
|
$('#countMRF').val(mrf);
|
||||||
|
mrf++;
|
||||||
|
}
|
||||||
|
|
||||||
|
var oth = 1;
|
||||||
|
function addPurchaseOther()
|
||||||
|
{
|
||||||
|
var a = "<div class='span11 inline' style='margin-bottom:3px;margin-left:0'>"
|
||||||
|
+"<input style='width:50px;margin-right:3px;' type='text' name='obrand[]' value='"+$('#other0').val()+"'>"
|
||||||
|
+"<input style='width:50px;margin-right:15px;;' type='text' name='opattern[]' value='"+$('#other1').val()+"'>"
|
||||||
|
+"<input style='width:30px;margin-right:14px;' type='text' name='osize[]' value='"+$('#other2').val()+"'>"
|
||||||
|
+"<input style='width:30px;' type='text' name='oqty[]' value='"+$('#other3').val()+"'>"
|
||||||
|
+"<button type='button' onclick='deletee(this)' style='margin-left:8px;'>-</button>";
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('.Othertype');
|
||||||
|
$('#other0').val('');
|
||||||
|
$('#other1').val('');
|
||||||
|
$('#other2').val('');
|
||||||
|
$('#other3').val('');
|
||||||
|
$('#countOther').val(oth);
|
||||||
|
oth++;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rcm = 1;
|
||||||
|
function addRec()
|
||||||
|
{
|
||||||
|
var a = "<div id='rcmd' style='margin-bottom:3px'>"
|
||||||
|
+"<input class='span3' style='margin-right:4px;' type='text' name='rpattern[]' value='"+$('#rpat').val()+"'>"
|
||||||
|
+"<input class='span3' style='margin-right:4px;' type='text' name='rsize[]' value='"+$('#rsz').val()+"'>"
|
||||||
|
+"<input class='span3' type='text' name='rremark[]' value='"+$('#rmrk').val()+"'>"
|
||||||
|
+"<button type='button' class='removebutton' onclick='deletee(this)'>Del</button><br>"
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('.recommendation');
|
||||||
|
$('#rpat').val('');
|
||||||
|
$('#rsz').val('');
|
||||||
|
$('#rmrk').val('');
|
||||||
|
$('#countrcm').val(oth);
|
||||||
|
rcm++
|
||||||
|
}
|
||||||
|
|
||||||
|
//$(".removebutton").click(function()
|
||||||
|
function deletee(a)
|
||||||
|
{
|
||||||
|
$(a).parent().remove();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
81
application/views/vLogin.php
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>Login</title>
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>asset/css/login.css" />
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 40px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-signin {
|
||||||
|
max-width: 300px;
|
||||||
|
padding: 19px 29px 29px;
|
||||||
|
margin: 0 auto 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||||
|
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||||
|
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||||
|
}
|
||||||
|
.form-signin .form-signin-heading,
|
||||||
|
.form-signin .checkbox {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.form-signin input[type="text"],
|
||||||
|
.form-signin input[type="password"] {
|
||||||
|
font-size: 16px;
|
||||||
|
height: auto;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
padding: 7px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container" style="margin-top:100px;">
|
||||||
|
|
||||||
|
<form class="form-signin" action="<?php echo base_url(); ?>user/login_auth" method="post">
|
||||||
|
|
||||||
|
<!--<form class="form-signin" action="http://192.168.129.51:8080/everseiko/index.php/login/auth/format/json" method="post">-->
|
||||||
|
<!--<form class="form-signin" action="http://10.10.10.7/everseiko/index.php/login/auth/format/json" method="post">-->
|
||||||
|
<?php if(isset($login_info)) {
|
||||||
|
echo'<div class="alert alert-error">';
|
||||||
|
echo $login_info ;
|
||||||
|
echo'</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<h5><i class="icon-flag"></i> Login</h5>
|
||||||
|
<input type="text" class="input-block-level" placeholder="Username" name="username" required>
|
||||||
|
<input type="password" class="input-block-level" placeholder="Password" name="password" required>
|
||||||
|
<!--<input type="text" class="input-block-level" placeholder="Kota" name="kota" required>-->
|
||||||
|
<button class="btn btn-primary" type="submit">Sign in</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/jquery.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
setTimeout(function(){
|
||||||
|
$("div.alert").fadeOut("slow", function () {
|
||||||
|
$("div.alert").remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
920
application/views/vReview.php
Normal file
@ -0,0 +1,920 @@
|
|||||||
|
<?php header('Access-Control-Allow-Origin: *'); ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Form Customer</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
|
||||||
|
<!-- Le styles -->
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>asset/css/style.css" rel="stylesheet">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 60px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
.sidebar-nav {
|
||||||
|
padding: 9px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 980px) {
|
||||||
|
/* Enable use of floated navbar text */
|
||||||
|
.navbar-text.pull-right {
|
||||||
|
float: none;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/jquery.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/js/form_view.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
$(":input").prop("disabled", true);
|
||||||
|
$(".btn").prop("disabled", false);
|
||||||
|
$("#myModal :input").prop("disabled", false);
|
||||||
|
x="<?php echo $action; ?>";
|
||||||
|
if ( x === 'view'){
|
||||||
|
$("#pending").show();
|
||||||
|
//$("#fo1").attr("action", "<?php echo base_url(); ?>form/isApprove/<?php echo $id; ?>");
|
||||||
|
}
|
||||||
|
if ( x === 'edit')$("#saved").show();
|
||||||
|
|
||||||
|
//method
|
||||||
|
var id = "<?php echo $id; ?>";
|
||||||
|
var base_url = "<?php echo base_url(); ?>";
|
||||||
|
//test();
|
||||||
|
load(id,base_url);
|
||||||
|
}
|
||||||
|
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<link href="<?php echo base_url(); ?>asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body data-spy="scroll" data-target=".sidebar">
|
||||||
|
<!--Navigation bar-->
|
||||||
|
<div class="navbar navbar-inverse navbar-fixed-top" >
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="brand" href="<?php echo base_url(); ?>user">Everseiko</a>
|
||||||
|
<div class="nav-collapse collapse">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li id="fat-menu" class="dropdown">
|
||||||
|
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown" style="background-color:#fff;"><i class="icon-user"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('nama'); ?><b class="caret"></b></a>
|
||||||
|
<ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>">
|
||||||
|
<i class="icon-tags"></i>
|
||||||
|
<?php echo $this->auth->CI->session->userdata('role'); ?></a></li>
|
||||||
|
<li role="presentation" class="divider"></li>
|
||||||
|
<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo base_url(); ?>user/logout"><i class="icon-off"></i> Logout</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.nav-collapse -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Container-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<!--sidebar-->
|
||||||
|
<div class="span3 sidebar">
|
||||||
|
<div class="well affix span3">
|
||||||
|
<ul class="nav nav-list">
|
||||||
|
<li class="active"><a href="#1">Contact Details</a></li>
|
||||||
|
<li class=""><a href="#2">Vehicles Details</a></li>
|
||||||
|
<li class=""><a href="#3">Types</a></li>
|
||||||
|
<li class=""><a href="#4">Tyre Usages</a></li>
|
||||||
|
<li class=""><a href="#5">Recommendation</a></li>
|
||||||
|
<li class=""><a href="#6">Picture</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--/.well -->
|
||||||
|
</div><!--/span3-->
|
||||||
|
<!--section-->
|
||||||
|
<div class="span7 offset1 well">
|
||||||
|
<!--
|
||||||
|
<div class="hero-unit">
|
||||||
|
<h1>Hello, world!</h1>
|
||||||
|
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
|
||||||
|
<p><a href="#" class="btn btn-primary btn-large">Learn more »</a></p>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>form/updateform/<?php echo $id; ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<section id="1"><!--contact details-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Contact Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>General Location</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30%">
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Province</h6></label>
|
||||||
|
<input type="text" name="cdProvince" id="province">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td width="30%">
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Kota</h6></label>
|
||||||
|
<input type="text" name="cdKota" id="kota">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td width="30%"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Company Details</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="appoinment">By Appoinment
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value="show">Go show
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd" value=""><input type="text" placeholder="Other" name="rbCd">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="70px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Staff of Scene</h6></label>
|
||||||
|
<input type="text" name="cdSos" id="sos">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Customer Name</h6></label>
|
||||||
|
<input type="text" name="cdCusName" id="cust_name">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Company">Company
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="rbCd2" value="Individual">Individual
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">
|
||||||
|
<hr>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"><strong>Address / Phone no</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Head Office</h6></label>
|
||||||
|
<input type="text" name="cdOffice" id="head_address">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" name="cdTelp" onkeypress="return isNumberKey(event)" id="head_phone">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Branch/Garage</h6></label>
|
||||||
|
<input type="text" name="cdBranch" id="branch_address">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" name="cdTelp2" onkeypress="return isNumberKey(event)" id="branch_phone">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Contact Person</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Name</h6></label>
|
||||||
|
<input type="text" name="cdcpname" id="cp_name">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left;margin-right:20px;">
|
||||||
|
<label for="name"><h6>Phone</h6></label>
|
||||||
|
<input type="text" name="cdcpphone" onkeypress="return isNumberKey(event)" id="cp_phone">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Nature Business</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_1" value="Expedition">Expedition
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_2" value="Bus">Bus
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_3" value="Minning">Minning
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_4" value="Loging">Loging
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_5" value="Cement">Cement
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_6" value="Bulk">Bulk
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="20px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="cdCb_4" value="Container">Container
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="2"><!--vehicles details-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Vehicles Details</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table><!--Number vehicle owned-->
|
||||||
|
<tr><td colspan="2"><strong>Number of vehicles owned</strong></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table><!--Light Truck-->
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Lt Truck</td>
|
||||||
|
<td width="100px">QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table><!--Truck-->
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td>
|
||||||
|
<td>QTY</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtot" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2">OTR</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="span10" id="appendedInput" type="text" placeholder="type" name="vdQtrType"></td>
|
||||||
|
<td>
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Qty" name="vdQtrQty" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
<input class="span5" id="appendedInput" type="text" placeholder="Total tyre" name="vdQtrTyre" maxlength="3" onkeypress="return isNumberKey(event)"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<table><!--Load and Speed Details-->
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3"><strong>Load and Speed Details</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Type of Load</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_1" value="Materials">Materials</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_2" value="Passenger">Passenger</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_3" value="Goods">Goods</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td>
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_4" value="Soil">Soil</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox"><input type="checkbox" name="vdCb_5" value="General Cargo">General Cargo</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="vdCb_6" value="other">
|
||||||
|
<input type="text" style="width:100px" placeholder="Other" name="vdCb_6">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="3">Average Weight of Loads</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" width="50%">
|
||||||
|
<table><!--Light Truck-->
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="100px">Lt Truck</td>
|
||||||
|
<td width="100px">Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>4 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr4wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdTr10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td width="50%">
|
||||||
|
<table><!--Truck-->
|
||||||
|
<tr height="50px">
|
||||||
|
<td width="70x">Truck</td><td>Wt</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>6 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt6wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>8 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt8wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>10 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt10wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>12 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt12wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>14 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt14wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>18 wheels</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLt18wt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr height="50px">
|
||||||
|
<td>Other</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" style="width:30px" name="vdLtotwt" maxlength="3" onkeypress="return isNumberKey(event)">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="2">Points of Origin Destination <input type="text" name="vdDest" id="destination"></td>
|
||||||
|
</tr>
|
||||||
|
<tr height="30px">
|
||||||
|
<td colspan="2">Driving Condition</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Good Roads</h6></label>
|
||||||
|
<input id="road_condition_good" type="text" placeholder="Good Roads" name="vdgoro" onkeypress="return isNumberKey(event)">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Tool Roads</h6></label>
|
||||||
|
<input id="road_condition_toll" type="text" placeholder="Toll Roads" name="vdtoro" onkeypress="return isNumberKey(event)">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Bad Roads</h6></label>
|
||||||
|
<input id="road_condition_bad" type="text" placeholder="Bad Roads" name="vdbaro" onkeypress="return isNumberKey(event)">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
<div class="input-append">
|
||||||
|
<label><h6>Others</h6></label>
|
||||||
|
<input id="road_condition_other" type="text" placeholder="Others" name="vdothers">
|
||||||
|
<span class="add-on">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="3"><!--types-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Types</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<table>
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Tyre Brands and Type</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_1" value="MRF">MRF</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_2" value="Goodyear">Goodyear</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_3" value="Bridgestone">Bridgestone</label>
|
||||||
|
</td>
|
||||||
|
<td width="150px">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_4" value="GT">GT</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_5" value="Dunlop">Dunlop</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_6" value="Chinese">Chinese</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_7" value="Kumho">Kumho</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_8" value="Hankook">Hankook</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_9" value="Ceat">Ceat</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_10" value="Thai">Thai</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_11" value="Maxxis">Maxxis</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_12" value="Chengsin">Chengsin</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_13" value="Epco">Epco</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_14" value="Swallow">Swallow</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb_15" value="ChaoYang">ChaoYang</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type of Purchase</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_1" value="New Tyres">New Tyres</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb2_2" value="Retreads">Retreads</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr height="50px">
|
||||||
|
<td colspan="3"><strong>Type</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_1" value="Rib">Rib</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_2" value="Lug">Lug</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_3" value="Bias">Bias</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_4" value="Radial">Radial</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="tpCb3_5" value="Rib">Mix</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="4"><!--tyre-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Tyre Usages</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Milleage</strong><br></br>
|
||||||
|
<label class="radio inline"><input type="radio" name="trRb" value="Estimates">Estimates</label>
|
||||||
|
<label class="radio inline"><input type="radio" name="trRb" value="Actual">Actual</label>
|
||||||
|
<br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="mileage_front" type="text" placeholder="Front" name="trmfront" onkeypress="return isNumberKey(event)">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div>
|
||||||
|
<br></br>
|
||||||
|
<div class="input-append">
|
||||||
|
<input class="span9" id="mileage_rear" type="text" placeholder="Rear" name="trmrear" onkeypress="return isNumberKey(event)">
|
||||||
|
<span class="add-on">Km</span>
|
||||||
|
</div><br></br>
|
||||||
|
|
||||||
|
<label>Details</label>
|
||||||
|
<textarea id="mileage_detail" rows="3" name="trmdetails"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="span7 offset1">
|
||||||
|
<strong>New Tyre Purchase per Month</strong><br></br>
|
||||||
|
<label class="radio inline"><input type="radio" name="trRb2" value="Estimates">Estimates</label>
|
||||||
|
<label class="radio inline"><input type="radio" name="trRb2" value="Actual">Actual</label>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Brand</td>
|
||||||
|
<td>
|
||||||
|
<label class="span3">Pattern</label><label class="span3">Size</label><label class="span3">Qty</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><!--MRF-->
|
||||||
|
<td width="70px" valign="top">MRF</td>
|
||||||
|
<td>
|
||||||
|
<div id="MRFtype">
|
||||||
|
<!--
|
||||||
|
<div class="MRF0">
|
||||||
|
<input class="span3" id="MRF00" type="text" name="pattern[]" placeholder="pattern">
|
||||||
|
<input class="span3" id="MRF01" type="text" name="size[]" placeholder="size">
|
||||||
|
<input class="span3" id="MRF02" type="text" name="qty[]" placeholder="qty">
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td valign="bottom">
|
||||||
|
<button class="btn" type="button" onclick="addPurchaseMRF()" style="margin-left:-40px;display:none;">Add</button>
|
||||||
|
<input type="hidden" name="MRFcount" id="countMRF">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top">Other</td>
|
||||||
|
<td>
|
||||||
|
<div id="Othertype">
|
||||||
|
<!--
|
||||||
|
<div class="other0">
|
||||||
|
<input class="span3" id="other00" type="text" name="opattern[]" placeholder="pattern">
|
||||||
|
<input class="span3" id="other01" type="text" name="osize[]" placeholder="size">
|
||||||
|
<input class="span3" id="other02" type="text" name="oqty[]" placeholder="qty">
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td valign="bottom">
|
||||||
|
<button class="btn" type="button" onclick="addPurchaseOther()" style="margin-left:-40px;display:none;">Add</button>
|
||||||
|
<input type="hidden" name="Othercount" id="countOther">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br></br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
<strong>Front Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="psi_front" type="text" placeholder="psi" name="trfpsi">
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb31" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb32" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
<div class="span4 offset1">
|
||||||
|
<strong>Rear Tyre</strong><br></br>
|
||||||
|
<input class="span9" id="psi_rear" type="text" placeholder="psi" name="trrpsi">
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb41" value="Estimates">New Tyre</label>  
|
||||||
|
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<input type="checkbox" name="cb42" value="Actual">Retreads</label>
|
||||||
|
</div>
|
||||||
|
</div><br></br>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<input class="span9" id="otr" type="text" placeholder="OTR" name='trotr' >
|
||||||
|
<br></br>
|
||||||
|
<textarea class="span9" rows="5" placeholder="Problem faced with current type" name="trproblem" id="problem">
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="5"><!--recommendation-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Recommendation</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<h5>
|
||||||
|
Pattern                          
|
||||||
|
    Size                
|
||||||
|
                  Remark
|
||||||
|
</h5>
|
||||||
|
<div id="recommendation">
|
||||||
|
<div id="space" style="margin-bottom:500px;">No Recommendation Available</div>
|
||||||
|
</div>
|
||||||
|
<br></br><br></br><br></br><br></br><br>
|
||||||
|
</section>
|
||||||
|
<br></br>
|
||||||
|
<section id="6"><!--picture-->
|
||||||
|
<fieldset>
|
||||||
|
<legend><strong>Picture</strong></legend>
|
||||||
|
</fieldset>
|
||||||
|
<div id="gambar"><label id="nopic" style="display:none">No Picture</label></div>
|
||||||
|
<input type="file" name="upload" style="display:none;">
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="row-fluid" id="edit" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn"><a href="<?php echo base_url(); ?>">Discard</a></button>
|
||||||
|
<button type="submit" value="Submit" class="btn btn-primary">Save</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid" id="pending" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn" onclick="parent.location='<?php echo base_url(); ?>'">Reject</button>
|
||||||
|
<button type="button" class="btn btn-primary" data-toggle="modal" href="#myModal">Approve</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row-fluid" id="saved" style="display:none;">
|
||||||
|
<div class="span7 offset4 navbar navbar-fixed-bottom">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<ul class="nav pull-right">
|
||||||
|
<li>
|
||||||
|
<button type="button" class="btn btn-warning" name="edit" onclick="edited()">
|
||||||
|
<i class="icon-edit icon-white"></i> Edit</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!--<a style="margin-top:300px;"><i class="icon-chevron-left"></i> Back</a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
|
||||||
|
<!--modal-->
|
||||||
|
|
||||||
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||||
|
<h3 id="myModalLabel">Data</h3>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="<?php echo base_url(); ?>form/isApprove/<?php echo $id; ?>" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="control-label">ID</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="ID" name="ID">
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Tier</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="tier">
|
||||||
|
<option>Tier 1</option>
|
||||||
|
<option>Tier 2</option>
|
||||||
|
<option>Tier 3</option>
|
||||||
|
<option>Tier 4</option>
|
||||||
|
<option>Tier 5</option>
|
||||||
|
</select>
|
||||||
|
</div><br />
|
||||||
|
<label class="control-label">Customer<br /> Data Status<br /></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="modalcb1" value="Dealer">Dealer
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="modalcb2" value="Everseiko">Everseiko
|
||||||
|
</label>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="modalcb3" value="Callsheet">Callsheet
|
||||||
|
</label>
|
||||||
|
</div><br />
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Approve</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<!--
|
||||||
|
<footer>
|
||||||
|
<p>© Company 2013</p>
|
||||||
|
</footer>
|
||||||
|
-->
|
||||||
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
|
<!--javascript-->
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-alert.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-dropdown.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-scrollspy.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-button.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-collapse.js"></script>
|
||||||
|
<script src="<?php echo base_url(); ?>asset/bootstrap/js/bootstrap-modal.js"></script>
|
||||||
|
<script>
|
||||||
|
var mrf = 1;
|
||||||
|
function addPurchaseMRF()
|
||||||
|
{
|
||||||
|
var a = "<div> <input class='span3' type='text' name='pattern[]' placeholder='pattern'><input class='span3' type='text' name='size[]' placeholder='size'> <input class='span3' type='text' name='qty[]' placeholder='qty'> </div>"
|
||||||
|
$(a).appendTo('#MRFtype');
|
||||||
|
$("#MRFtype div:last-child").addClass("MRF"+mrf);
|
||||||
|
$('#MRFtype div:last-child input:first-child').attr('id', 'MRF'+mrf+'1');
|
||||||
|
$('#MRFtype div:last-child input:first-child').next().attr('id', 'MRF'+mrf+'2');
|
||||||
|
$('#MRFtype div:last-child input:first-child').next().next().attr('id', 'MRF'+mrf+'3');
|
||||||
|
$('#countMRF').val(mrf);
|
||||||
|
mrf++;
|
||||||
|
}
|
||||||
|
var oth = 1;
|
||||||
|
function addPurchaseOther()
|
||||||
|
{
|
||||||
|
var a = "<div> <input class='span3' type='text' name='opattern[]' placeholder='pattern'><input class='span3' type='text' name='osize[]' placeholder='size'> <input class='span3' type='text' name='oqty[]' placeholder='qty'> </div>"
|
||||||
|
$(a).appendTo('#Othertype');
|
||||||
|
$("#Othertype div:last-child").addClass("other"+oth);
|
||||||
|
$('#Othertype div:last-child input:first-child').attr('id', 'other'+oth+'1');
|
||||||
|
$('#Othertype div:last-child input:first-child').next().attr('id', 'other'+oth+'2');
|
||||||
|
$('#Othertype div:last-child input:first-child').next().next().attr('id', 'other'+oth+'3');
|
||||||
|
$('#countOther').val(oth);
|
||||||
|
oth++;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
1109
asset/bootstrap/css/bootstrap-responsive.css
vendored
Normal file
9
asset/bootstrap/css/bootstrap-responsive.min.css
vendored
Normal file
6194
asset/bootstrap/css/bootstrap.css
vendored
Normal file
9
asset/bootstrap/css/bootstrap.min.css
vendored
Normal file
1067
asset/bootstrap/css/docs.css
Normal file
BIN
asset/bootstrap/img/glyphicons-halflings-white.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
asset/bootstrap/img/glyphicons-halflings.png
Normal file
After Width: | Height: | Size: 12 KiB |
106
asset/bootstrap/js/README.md
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
## 2.0 BOOTSTRAP JS PHILOSOPHY
|
||||||
|
These are the high-level design rules which guide the development of Bootstrap's plugin apis.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### DATA-ATTRIBUTE API
|
||||||
|
|
||||||
|
We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
|
||||||
|
|
||||||
|
We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
|
||||||
|
|
||||||
|
$('body').off('.data-api')
|
||||||
|
|
||||||
|
To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
|
||||||
|
|
||||||
|
$('body').off('.alert.data-api')
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### PROGRAMMATIC API
|
||||||
|
|
||||||
|
We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
|
||||||
|
|
||||||
|
All public APIs should be single, chainable methods, and return the collection acted upon.
|
||||||
|
|
||||||
|
$(".btn.danger").button("toggle").addClass("fat")
|
||||||
|
|
||||||
|
All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
|
||||||
|
|
||||||
|
$("#myModal").modal() // initialized with defaults
|
||||||
|
$("#myModal").modal({ keyboard: false }) // initialized with now keyboard
|
||||||
|
$("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### OPTIONS
|
||||||
|
|
||||||
|
Options should be sparse and add universal value. We should pick the right defaults.
|
||||||
|
|
||||||
|
All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
|
||||||
|
|
||||||
|
$.fn.modal.defaults = { … }
|
||||||
|
|
||||||
|
An options definition should take the following form:
|
||||||
|
|
||||||
|
*noun*: *adjective* - describes or modifies a quality of an instance
|
||||||
|
|
||||||
|
examples:
|
||||||
|
|
||||||
|
backdrop: true
|
||||||
|
keyboard: false
|
||||||
|
placement: 'top'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### EVENTS
|
||||||
|
|
||||||
|
All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
|
||||||
|
|
||||||
|
show | shown
|
||||||
|
hide | hidden
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### CONSTRUCTORS
|
||||||
|
|
||||||
|
Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
|
||||||
|
|
||||||
|
|
||||||
|
$.fn.popover.Constructor
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### DATA ACCESSOR
|
||||||
|
|
||||||
|
Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
|
||||||
|
|
||||||
|
$('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### DATA ATTRIBUTES
|
||||||
|
|
||||||
|
Data attributes should take the following form:
|
||||||
|
|
||||||
|
- data-{{verb}}={{plugin}} - defines main interaction
|
||||||
|
- data-target || href^=# - defined on "control" element (if element controls an element other than self)
|
||||||
|
- data-{{noun}} - defines class instance options
|
||||||
|
|
||||||
|
examples:
|
||||||
|
|
||||||
|
// control other targets
|
||||||
|
data-toggle="modal" data-target="#foo"
|
||||||
|
data-toggle="collapse" data-target="#foo" data-parent="#bar"
|
||||||
|
|
||||||
|
// defined on element they control
|
||||||
|
data-spy="scroll"
|
||||||
|
|
||||||
|
data-dismiss="modal"
|
||||||
|
data-dismiss="alert"
|
||||||
|
|
||||||
|
data-toggle="dropdown"
|
||||||
|
|
||||||
|
data-toggle="button"
|
||||||
|
data-toggle="buttons-checkbox"
|
||||||
|
data-toggle="buttons-radio"
|
156
asset/bootstrap/js/application.js
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||||
|
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||||
|
// ++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
|
||||||
|
var $window = $(window)
|
||||||
|
|
||||||
|
// Disable certain links in docs
|
||||||
|
$('section [href^=#]').click(function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
})
|
||||||
|
|
||||||
|
// side bar
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.bs-docs-sidenav').affix({
|
||||||
|
offset: {
|
||||||
|
top: function () { return $window.width() <= 980 ? 290 : 210 }
|
||||||
|
, bottom: 270
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
|
||||||
|
// make code pretty
|
||||||
|
window.prettyPrint && prettyPrint()
|
||||||
|
|
||||||
|
// add-ons
|
||||||
|
$('.add-on :checkbox').on('click', function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, method = $this.attr('checked') ? 'addClass' : 'removeClass'
|
||||||
|
$(this).parents('.add-on')[method]('active')
|
||||||
|
})
|
||||||
|
|
||||||
|
// add tipsies to grid for scaffolding
|
||||||
|
if ($('#gridSystem').length) {
|
||||||
|
$('#gridSystem').tooltip({
|
||||||
|
selector: '.show-grid > [class*="span"]'
|
||||||
|
, title: function () { return $(this).width() + 'px' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// tooltip demo
|
||||||
|
$('.tooltip-demo').tooltip({
|
||||||
|
selector: "a[data-toggle=tooltip]"
|
||||||
|
})
|
||||||
|
|
||||||
|
$('.tooltip-test').tooltip()
|
||||||
|
$('.popover-test').popover()
|
||||||
|
|
||||||
|
// popover demo
|
||||||
|
$("a[data-toggle=popover]")
|
||||||
|
.popover()
|
||||||
|
.click(function(e) {
|
||||||
|
e.preventDefault()
|
||||||
|
})
|
||||||
|
|
||||||
|
// button state demo
|
||||||
|
$('#fat-btn')
|
||||||
|
.click(function () {
|
||||||
|
var btn = $(this)
|
||||||
|
btn.button('loading')
|
||||||
|
setTimeout(function () {
|
||||||
|
btn.button('reset')
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
|
|
||||||
|
// carousel demo
|
||||||
|
$('#myCarousel').carousel()
|
||||||
|
|
||||||
|
// javascript build logic
|
||||||
|
var inputsComponent = $("#components.download input")
|
||||||
|
, inputsPlugin = $("#plugins.download input")
|
||||||
|
, inputsVariables = $("#variables.download input")
|
||||||
|
|
||||||
|
// toggle all plugin checkboxes
|
||||||
|
$('#components.download .toggle-all').on('click', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
inputsComponent.attr('checked', !inputsComponent.is(':checked'))
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#plugins.download .toggle-all').on('click', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#variables.download .toggle-all').on('click', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
inputsVariables.val('')
|
||||||
|
})
|
||||||
|
|
||||||
|
// request built javascript
|
||||||
|
$('.download-btn .btn').on('click', function () {
|
||||||
|
|
||||||
|
var css = $("#components.download input:checked")
|
||||||
|
.map(function () { return this.value })
|
||||||
|
.toArray()
|
||||||
|
, js = $("#plugins.download input:checked")
|
||||||
|
.map(function () { return this.value })
|
||||||
|
.toArray()
|
||||||
|
, vars = {}
|
||||||
|
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
|
||||||
|
|
||||||
|
$("#variables.download input")
|
||||||
|
.each(function () {
|
||||||
|
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST'
|
||||||
|
, url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
|
||||||
|
, dataType: 'jsonpi'
|
||||||
|
, params: {
|
||||||
|
js: js
|
||||||
|
, css: css
|
||||||
|
, vars: vars
|
||||||
|
, img: img
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
|
||||||
|
$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
|
||||||
|
var url = opts.url;
|
||||||
|
|
||||||
|
return {
|
||||||
|
send: function(_, completeCallback) {
|
||||||
|
var name = 'jQuery_iframe_' + jQuery.now()
|
||||||
|
, iframe, form
|
||||||
|
|
||||||
|
iframe = $('<iframe>')
|
||||||
|
.attr('name', name)
|
||||||
|
.appendTo('head')
|
||||||
|
|
||||||
|
form = $('<form>')
|
||||||
|
.attr('method', opts.type) // GET or POST
|
||||||
|
.attr('action', url)
|
||||||
|
.attr('target', name)
|
||||||
|
|
||||||
|
$.each(opts.params, function(k, v) {
|
||||||
|
|
||||||
|
$('<input>')
|
||||||
|
.attr('type', 'hidden')
|
||||||
|
.attr('name', k)
|
||||||
|
.attr('value', typeof v == 'string' ? v : JSON.stringify(v))
|
||||||
|
.appendTo(form)
|
||||||
|
})
|
||||||
|
|
||||||
|
form.appendTo('body').submit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery)
|
117
asset/bootstrap/js/bootstrap-affix.js
vendored
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/* ==========================================================
|
||||||
|
* bootstrap-affix.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
||||||
|
* ==========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX CLASS DEFINITION
|
||||||
|
* ====================== */
|
||||||
|
|
||||||
|
var Affix = function (element, options) {
|
||||||
|
this.options = $.extend({}, $.fn.affix.defaults, options)
|
||||||
|
this.$window = $(window)
|
||||||
|
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
||||||
|
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
|
||||||
|
this.$element = $(element)
|
||||||
|
this.checkPosition()
|
||||||
|
}
|
||||||
|
|
||||||
|
Affix.prototype.checkPosition = function () {
|
||||||
|
if (!this.$element.is(':visible')) return
|
||||||
|
|
||||||
|
var scrollHeight = $(document).height()
|
||||||
|
, scrollTop = this.$window.scrollTop()
|
||||||
|
, position = this.$element.offset()
|
||||||
|
, offset = this.options.offset
|
||||||
|
, offsetBottom = offset.bottom
|
||||||
|
, offsetTop = offset.top
|
||||||
|
, reset = 'affix affix-top affix-bottom'
|
||||||
|
, affix
|
||||||
|
|
||||||
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
||||||
|
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
||||||
|
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
||||||
|
|
||||||
|
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
|
||||||
|
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
|
||||||
|
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
|
||||||
|
'top' : false
|
||||||
|
|
||||||
|
if (this.affixed === affix) return
|
||||||
|
|
||||||
|
this.affixed = affix
|
||||||
|
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
||||||
|
|
||||||
|
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX PLUGIN DEFINITION
|
||||||
|
* ======================= */
|
||||||
|
|
||||||
|
var old = $.fn.affix
|
||||||
|
|
||||||
|
$.fn.affix = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('affix')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('affix', (data = new Affix(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.affix.Constructor = Affix
|
||||||
|
|
||||||
|
$.fn.affix.defaults = {
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX NO CONFLICT
|
||||||
|
* ================= */
|
||||||
|
|
||||||
|
$.fn.affix.noConflict = function () {
|
||||||
|
$.fn.affix = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* AFFIX DATA-API
|
||||||
|
* ============== */
|
||||||
|
|
||||||
|
$(window).on('load', function () {
|
||||||
|
$('[data-spy="affix"]').each(function () {
|
||||||
|
var $spy = $(this)
|
||||||
|
, data = $spy.data()
|
||||||
|
|
||||||
|
data.offset = data.offset || {}
|
||||||
|
|
||||||
|
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
||||||
|
data.offsetTop && (data.offset.top = data.offsetTop)
|
||||||
|
|
||||||
|
$spy.affix(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}(window.jQuery);
|
99
asset/bootstrap/js/bootstrap-alert.js
vendored
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/* ==========================================================
|
||||||
|
* bootstrap-alert.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||||
|
* ==========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* ALERT CLASS DEFINITION
|
||||||
|
* ====================== */
|
||||||
|
|
||||||
|
var dismiss = '[data-dismiss="alert"]'
|
||||||
|
, Alert = function (el) {
|
||||||
|
$(el).on('click', dismiss, this.close)
|
||||||
|
}
|
||||||
|
|
||||||
|
Alert.prototype.close = function (e) {
|
||||||
|
var $this = $(this)
|
||||||
|
, selector = $this.attr('data-target')
|
||||||
|
, $parent
|
||||||
|
|
||||||
|
if (!selector) {
|
||||||
|
selector = $this.attr('href')
|
||||||
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent = $(selector)
|
||||||
|
|
||||||
|
e && e.preventDefault()
|
||||||
|
|
||||||
|
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
||||||
|
|
||||||
|
$parent.trigger(e = $.Event('close'))
|
||||||
|
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
$parent.removeClass('in')
|
||||||
|
|
||||||
|
function removeElement() {
|
||||||
|
$parent
|
||||||
|
.trigger('closed')
|
||||||
|
.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
$.support.transition && $parent.hasClass('fade') ?
|
||||||
|
$parent.on($.support.transition.end, removeElement) :
|
||||||
|
removeElement()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ALERT PLUGIN DEFINITION
|
||||||
|
* ======================= */
|
||||||
|
|
||||||
|
var old = $.fn.alert
|
||||||
|
|
||||||
|
$.fn.alert = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('alert')
|
||||||
|
if (!data) $this.data('alert', (data = new Alert(this)))
|
||||||
|
if (typeof option == 'string') data[option].call($this)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.alert.Constructor = Alert
|
||||||
|
|
||||||
|
|
||||||
|
/* ALERT NO CONFLICT
|
||||||
|
* ================= */
|
||||||
|
|
||||||
|
$.fn.alert.noConflict = function () {
|
||||||
|
$.fn.alert = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ALERT DATA-API
|
||||||
|
* ============== */
|
||||||
|
|
||||||
|
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||||
|
|
||||||
|
}(window.jQuery);
|
105
asset/bootstrap/js/bootstrap-button.js
vendored
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* bootstrap-button.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||||
|
* ============================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ============================================================ */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* BUTTON PUBLIC CLASS DEFINITION
|
||||||
|
* ============================== */
|
||||||
|
|
||||||
|
var Button = function (element, options) {
|
||||||
|
this.$element = $(element)
|
||||||
|
this.options = $.extend({}, $.fn.button.defaults, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button.prototype.setState = function (state) {
|
||||||
|
var d = 'disabled'
|
||||||
|
, $el = this.$element
|
||||||
|
, data = $el.data()
|
||||||
|
, val = $el.is('input') ? 'val' : 'html'
|
||||||
|
|
||||||
|
state = state + 'Text'
|
||||||
|
data.resetText || $el.data('resetText', $el[val]())
|
||||||
|
|
||||||
|
$el[val](data[state] || this.options[state])
|
||||||
|
|
||||||
|
// push to event loop to allow forms to submit
|
||||||
|
setTimeout(function () {
|
||||||
|
state == 'loadingText' ?
|
||||||
|
$el.addClass(d).attr(d, d) :
|
||||||
|
$el.removeClass(d).removeAttr(d)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button.prototype.toggle = function () {
|
||||||
|
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
||||||
|
|
||||||
|
$parent && $parent
|
||||||
|
.find('.active')
|
||||||
|
.removeClass('active')
|
||||||
|
|
||||||
|
this.$element.toggleClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* BUTTON PLUGIN DEFINITION
|
||||||
|
* ======================== */
|
||||||
|
|
||||||
|
var old = $.fn.button
|
||||||
|
|
||||||
|
$.fn.button = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('button')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('button', (data = new Button(this, options)))
|
||||||
|
if (option == 'toggle') data.toggle()
|
||||||
|
else if (option) data.setState(option)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.button.defaults = {
|
||||||
|
loadingText: 'loading...'
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.button.Constructor = Button
|
||||||
|
|
||||||
|
|
||||||
|
/* BUTTON NO CONFLICT
|
||||||
|
* ================== */
|
||||||
|
|
||||||
|
$.fn.button.noConflict = function () {
|
||||||
|
$.fn.button = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* BUTTON DATA-API
|
||||||
|
* =============== */
|
||||||
|
|
||||||
|
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
|
||||||
|
var $btn = $(e.target)
|
||||||
|
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||||
|
$btn.button('toggle')
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
207
asset/bootstrap/js/bootstrap-carousel.js
vendored
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
/* ==========================================================
|
||||||
|
* bootstrap-carousel.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||||
|
* ==========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* CAROUSEL CLASS DEFINITION
|
||||||
|
* ========================= */
|
||||||
|
|
||||||
|
var Carousel = function (element, options) {
|
||||||
|
this.$element = $(element)
|
||||||
|
this.$indicators = this.$element.find('.carousel-indicators')
|
||||||
|
this.options = options
|
||||||
|
this.options.pause == 'hover' && this.$element
|
||||||
|
.on('mouseenter', $.proxy(this.pause, this))
|
||||||
|
.on('mouseleave', $.proxy(this.cycle, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
Carousel.prototype = {
|
||||||
|
|
||||||
|
cycle: function (e) {
|
||||||
|
if (!e) this.paused = false
|
||||||
|
if (this.interval) clearInterval(this.interval);
|
||||||
|
this.options.interval
|
||||||
|
&& !this.paused
|
||||||
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, getActiveIndex: function () {
|
||||||
|
this.$active = this.$element.find('.item.active')
|
||||||
|
this.$items = this.$active.parent().children()
|
||||||
|
return this.$items.index(this.$active)
|
||||||
|
}
|
||||||
|
|
||||||
|
, to: function (pos) {
|
||||||
|
var activeIndex = this.getActiveIndex()
|
||||||
|
, that = this
|
||||||
|
|
||||||
|
if (pos > (this.$items.length - 1) || pos < 0) return
|
||||||
|
|
||||||
|
if (this.sliding) {
|
||||||
|
return this.$element.one('slid', function () {
|
||||||
|
that.to(pos)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeIndex == pos) {
|
||||||
|
return this.pause().cycle()
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
||||||
|
}
|
||||||
|
|
||||||
|
, pause: function (e) {
|
||||||
|
if (!e) this.paused = true
|
||||||
|
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
||||||
|
this.$element.trigger($.support.transition.end)
|
||||||
|
this.cycle(true)
|
||||||
|
}
|
||||||
|
clearInterval(this.interval)
|
||||||
|
this.interval = null
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, next: function () {
|
||||||
|
if (this.sliding) return
|
||||||
|
return this.slide('next')
|
||||||
|
}
|
||||||
|
|
||||||
|
, prev: function () {
|
||||||
|
if (this.sliding) return
|
||||||
|
return this.slide('prev')
|
||||||
|
}
|
||||||
|
|
||||||
|
, slide: function (type, next) {
|
||||||
|
var $active = this.$element.find('.item.active')
|
||||||
|
, $next = next || $active[type]()
|
||||||
|
, isCycling = this.interval
|
||||||
|
, direction = type == 'next' ? 'left' : 'right'
|
||||||
|
, fallback = type == 'next' ? 'first' : 'last'
|
||||||
|
, that = this
|
||||||
|
, e
|
||||||
|
|
||||||
|
this.sliding = true
|
||||||
|
|
||||||
|
isCycling && this.pause()
|
||||||
|
|
||||||
|
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
||||||
|
|
||||||
|
e = $.Event('slide', {
|
||||||
|
relatedTarget: $next[0]
|
||||||
|
, direction: direction
|
||||||
|
})
|
||||||
|
|
||||||
|
if ($next.hasClass('active')) return
|
||||||
|
|
||||||
|
if (this.$indicators.length) {
|
||||||
|
this.$indicators.find('.active').removeClass('active')
|
||||||
|
this.$element.one('slid', function () {
|
||||||
|
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
||||||
|
$nextIndicator && $nextIndicator.addClass('active')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||||
|
this.$element.trigger(e)
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
$next.addClass(type)
|
||||||
|
$next[0].offsetWidth // force reflow
|
||||||
|
$active.addClass(direction)
|
||||||
|
$next.addClass(direction)
|
||||||
|
this.$element.one($.support.transition.end, function () {
|
||||||
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
||||||
|
$active.removeClass(['active', direction].join(' '))
|
||||||
|
that.sliding = false
|
||||||
|
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$element.trigger(e)
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
$active.removeClass('active')
|
||||||
|
$next.addClass('active')
|
||||||
|
this.sliding = false
|
||||||
|
this.$element.trigger('slid')
|
||||||
|
}
|
||||||
|
|
||||||
|
isCycling && this.cycle()
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* CAROUSEL PLUGIN DEFINITION
|
||||||
|
* ========================== */
|
||||||
|
|
||||||
|
var old = $.fn.carousel
|
||||||
|
|
||||||
|
$.fn.carousel = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('carousel')
|
||||||
|
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
||||||
|
, action = typeof option == 'string' ? option : options.slide
|
||||||
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
||||||
|
if (typeof option == 'number') data.to(option)
|
||||||
|
else if (action) data[action]()
|
||||||
|
else if (options.interval) data.pause().cycle()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.carousel.defaults = {
|
||||||
|
interval: 5000
|
||||||
|
, pause: 'hover'
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.carousel.Constructor = Carousel
|
||||||
|
|
||||||
|
|
||||||
|
/* CAROUSEL NO CONFLICT
|
||||||
|
* ==================== */
|
||||||
|
|
||||||
|
$.fn.carousel.noConflict = function () {
|
||||||
|
$.fn.carousel = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CAROUSEL DATA-API
|
||||||
|
* ================= */
|
||||||
|
|
||||||
|
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
||||||
|
var $this = $(this), href
|
||||||
|
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||||
|
, options = $.extend({}, $target.data(), $this.data())
|
||||||
|
, slideIndex
|
||||||
|
|
||||||
|
$target.carousel(options)
|
||||||
|
|
||||||
|
if (slideIndex = $this.attr('data-slide-to')) {
|
||||||
|
$target.data('carousel').pause().to(slideIndex).cycle()
|
||||||
|
}
|
||||||
|
|
||||||
|
e.preventDefault()
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
167
asset/bootstrap/js/bootstrap-collapse.js
vendored
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
/* =============================================================
|
||||||
|
* bootstrap-collapse.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||||
|
* =============================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ============================================================ */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* COLLAPSE PUBLIC CLASS DEFINITION
|
||||||
|
* ================================ */
|
||||||
|
|
||||||
|
var Collapse = function (element, options) {
|
||||||
|
this.$element = $(element)
|
||||||
|
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
||||||
|
|
||||||
|
if (this.options.parent) {
|
||||||
|
this.$parent = $(this.options.parent)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.options.toggle && this.toggle()
|
||||||
|
}
|
||||||
|
|
||||||
|
Collapse.prototype = {
|
||||||
|
|
||||||
|
constructor: Collapse
|
||||||
|
|
||||||
|
, dimension: function () {
|
||||||
|
var hasWidth = this.$element.hasClass('width')
|
||||||
|
return hasWidth ? 'width' : 'height'
|
||||||
|
}
|
||||||
|
|
||||||
|
, show: function () {
|
||||||
|
var dimension
|
||||||
|
, scroll
|
||||||
|
, actives
|
||||||
|
, hasData
|
||||||
|
|
||||||
|
if (this.transitioning || this.$element.hasClass('in')) return
|
||||||
|
|
||||||
|
dimension = this.dimension()
|
||||||
|
scroll = $.camelCase(['scroll', dimension].join('-'))
|
||||||
|
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
||||||
|
|
||||||
|
if (actives && actives.length) {
|
||||||
|
hasData = actives.data('collapse')
|
||||||
|
if (hasData && hasData.transitioning) return
|
||||||
|
actives.collapse('hide')
|
||||||
|
hasData || actives.data('collapse', null)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$element[dimension](0)
|
||||||
|
this.transition('addClass', $.Event('show'), 'shown')
|
||||||
|
$.support.transition && this.$element[dimension](this.$element[0][scroll])
|
||||||
|
}
|
||||||
|
|
||||||
|
, hide: function () {
|
||||||
|
var dimension
|
||||||
|
if (this.transitioning || !this.$element.hasClass('in')) return
|
||||||
|
dimension = this.dimension()
|
||||||
|
this.reset(this.$element[dimension]())
|
||||||
|
this.transition('removeClass', $.Event('hide'), 'hidden')
|
||||||
|
this.$element[dimension](0)
|
||||||
|
}
|
||||||
|
|
||||||
|
, reset: function (size) {
|
||||||
|
var dimension = this.dimension()
|
||||||
|
|
||||||
|
this.$element
|
||||||
|
.removeClass('collapse')
|
||||||
|
[dimension](size || 'auto')
|
||||||
|
[0].offsetWidth
|
||||||
|
|
||||||
|
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, transition: function (method, startEvent, completeEvent) {
|
||||||
|
var that = this
|
||||||
|
, complete = function () {
|
||||||
|
if (startEvent.type == 'show') that.reset()
|
||||||
|
that.transitioning = 0
|
||||||
|
that.$element.trigger(completeEvent)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$element.trigger(startEvent)
|
||||||
|
|
||||||
|
if (startEvent.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
this.transitioning = 1
|
||||||
|
|
||||||
|
this.$element[method]('in')
|
||||||
|
|
||||||
|
$.support.transition && this.$element.hasClass('collapse') ?
|
||||||
|
this.$element.one($.support.transition.end, complete) :
|
||||||
|
complete()
|
||||||
|
}
|
||||||
|
|
||||||
|
, toggle: function () {
|
||||||
|
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COLLAPSE PLUGIN DEFINITION
|
||||||
|
* ========================== */
|
||||||
|
|
||||||
|
var old = $.fn.collapse
|
||||||
|
|
||||||
|
$.fn.collapse = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('collapse')
|
||||||
|
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
|
||||||
|
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.collapse.defaults = {
|
||||||
|
toggle: true
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.collapse.Constructor = Collapse
|
||||||
|
|
||||||
|
|
||||||
|
/* COLLAPSE NO CONFLICT
|
||||||
|
* ==================== */
|
||||||
|
|
||||||
|
$.fn.collapse.noConflict = function () {
|
||||||
|
$.fn.collapse = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COLLAPSE DATA-API
|
||||||
|
* ================= */
|
||||||
|
|
||||||
|
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||||
|
var $this = $(this), href
|
||||||
|
, target = $this.attr('data-target')
|
||||||
|
|| e.preventDefault()
|
||||||
|
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||||
|
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
||||||
|
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||||
|
$(target).collapse(option)
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
169
asset/bootstrap/js/bootstrap-dropdown.js
vendored
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
/* ============================================================
|
||||||
|
* bootstrap-dropdown.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||||||
|
* ============================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ============================================================ */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* DROPDOWN CLASS DEFINITION
|
||||||
|
* ========================= */
|
||||||
|
|
||||||
|
var toggle = '[data-toggle=dropdown]'
|
||||||
|
, Dropdown = function (element) {
|
||||||
|
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
||||||
|
$('html').on('click.dropdown.data-api', function () {
|
||||||
|
$el.parent().removeClass('open')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
Dropdown.prototype = {
|
||||||
|
|
||||||
|
constructor: Dropdown
|
||||||
|
|
||||||
|
, toggle: function (e) {
|
||||||
|
var $this = $(this)
|
||||||
|
, $parent
|
||||||
|
, isActive
|
||||||
|
|
||||||
|
if ($this.is('.disabled, :disabled')) return
|
||||||
|
|
||||||
|
$parent = getParent($this)
|
||||||
|
|
||||||
|
isActive = $parent.hasClass('open')
|
||||||
|
|
||||||
|
clearMenus()
|
||||||
|
|
||||||
|
if (!isActive) {
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
// if mobile we we use a backdrop because click events don't delegate
|
||||||
|
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
|
||||||
|
}
|
||||||
|
$parent.toggleClass('open')
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.focus()
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
, keydown: function (e) {
|
||||||
|
var $this
|
||||||
|
, $items
|
||||||
|
, $active
|
||||||
|
, $parent
|
||||||
|
, isActive
|
||||||
|
, index
|
||||||
|
|
||||||
|
if (!/(38|40|27)/.test(e.keyCode)) return
|
||||||
|
|
||||||
|
$this = $(this)
|
||||||
|
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
|
||||||
|
if ($this.is('.disabled, :disabled')) return
|
||||||
|
|
||||||
|
$parent = getParent($this)
|
||||||
|
|
||||||
|
isActive = $parent.hasClass('open')
|
||||||
|
|
||||||
|
if (!isActive || (isActive && e.keyCode == 27)) {
|
||||||
|
if (e.which == 27) $parent.find(toggle).focus()
|
||||||
|
return $this.click()
|
||||||
|
}
|
||||||
|
|
||||||
|
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
||||||
|
|
||||||
|
if (!$items.length) return
|
||||||
|
|
||||||
|
index = $items.index($items.filter(':focus'))
|
||||||
|
|
||||||
|
if (e.keyCode == 38 && index > 0) index-- // up
|
||||||
|
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
||||||
|
if (!~index) index = 0
|
||||||
|
|
||||||
|
$items
|
||||||
|
.eq(index)
|
||||||
|
.focus()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearMenus() {
|
||||||
|
$('.dropdown-backdrop').remove()
|
||||||
|
$(toggle).each(function () {
|
||||||
|
getParent($(this)).removeClass('open')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getParent($this) {
|
||||||
|
var selector = $this.attr('data-target')
|
||||||
|
, $parent
|
||||||
|
|
||||||
|
if (!selector) {
|
||||||
|
selector = $this.attr('href')
|
||||||
|
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent = selector && $(selector)
|
||||||
|
|
||||||
|
if (!$parent || !$parent.length) $parent = $this.parent()
|
||||||
|
|
||||||
|
return $parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* DROPDOWN PLUGIN DEFINITION
|
||||||
|
* ========================== */
|
||||||
|
|
||||||
|
var old = $.fn.dropdown
|
||||||
|
|
||||||
|
$.fn.dropdown = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('dropdown')
|
||||||
|
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
||||||
|
if (typeof option == 'string') data[option].call($this)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.dropdown.Constructor = Dropdown
|
||||||
|
|
||||||
|
|
||||||
|
/* DROPDOWN NO CONFLICT
|
||||||
|
* ==================== */
|
||||||
|
|
||||||
|
$.fn.dropdown.noConflict = function () {
|
||||||
|
$.fn.dropdown = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||||
|
* =================================== */
|
||||||
|
|
||||||
|
$(document)
|
||||||
|
.on('click.dropdown.data-api', clearMenus)
|
||||||
|
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
|
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||||
|
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||||
|
|
||||||
|
}(window.jQuery);
|
247
asset/bootstrap/js/bootstrap-modal.js
vendored
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
/* =========================================================
|
||||||
|
* bootstrap-modal.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||||
|
* =========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================= */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* MODAL CLASS DEFINITION
|
||||||
|
* ====================== */
|
||||||
|
|
||||||
|
var Modal = function (element, options) {
|
||||||
|
this.options = options
|
||||||
|
this.$element = $(element)
|
||||||
|
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
||||||
|
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
||||||
|
}
|
||||||
|
|
||||||
|
Modal.prototype = {
|
||||||
|
|
||||||
|
constructor: Modal
|
||||||
|
|
||||||
|
, toggle: function () {
|
||||||
|
return this[!this.isShown ? 'show' : 'hide']()
|
||||||
|
}
|
||||||
|
|
||||||
|
, show: function () {
|
||||||
|
var that = this
|
||||||
|
, e = $.Event('show')
|
||||||
|
|
||||||
|
this.$element.trigger(e)
|
||||||
|
|
||||||
|
if (this.isShown || e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
this.isShown = true
|
||||||
|
|
||||||
|
this.escape()
|
||||||
|
|
||||||
|
this.backdrop(function () {
|
||||||
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||||
|
|
||||||
|
if (!that.$element.parent().length) {
|
||||||
|
that.$element.appendTo(document.body) //don't move modals dom position
|
||||||
|
}
|
||||||
|
|
||||||
|
that.$element.show()
|
||||||
|
|
||||||
|
if (transition) {
|
||||||
|
that.$element[0].offsetWidth // force reflow
|
||||||
|
}
|
||||||
|
|
||||||
|
that.$element
|
||||||
|
.addClass('in')
|
||||||
|
.attr('aria-hidden', false)
|
||||||
|
|
||||||
|
that.enforceFocus()
|
||||||
|
|
||||||
|
transition ?
|
||||||
|
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||||
|
that.$element.focus().trigger('shown')
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, hide: function (e) {
|
||||||
|
e && e.preventDefault()
|
||||||
|
|
||||||
|
var that = this
|
||||||
|
|
||||||
|
e = $.Event('hide')
|
||||||
|
|
||||||
|
this.$element.trigger(e)
|
||||||
|
|
||||||
|
if (!this.isShown || e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
this.isShown = false
|
||||||
|
|
||||||
|
this.escape()
|
||||||
|
|
||||||
|
$(document).off('focusin.modal')
|
||||||
|
|
||||||
|
this.$element
|
||||||
|
.removeClass('in')
|
||||||
|
.attr('aria-hidden', true)
|
||||||
|
|
||||||
|
$.support.transition && this.$element.hasClass('fade') ?
|
||||||
|
this.hideWithTransition() :
|
||||||
|
this.hideModal()
|
||||||
|
}
|
||||||
|
|
||||||
|
, enforceFocus: function () {
|
||||||
|
var that = this
|
||||||
|
$(document).on('focusin.modal', function (e) {
|
||||||
|
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
||||||
|
that.$element.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, escape: function () {
|
||||||
|
var that = this
|
||||||
|
if (this.isShown && this.options.keyboard) {
|
||||||
|
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
||||||
|
e.which == 27 && that.hide()
|
||||||
|
})
|
||||||
|
} else if (!this.isShown) {
|
||||||
|
this.$element.off('keyup.dismiss.modal')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
, hideWithTransition: function () {
|
||||||
|
var that = this
|
||||||
|
, timeout = setTimeout(function () {
|
||||||
|
that.$element.off($.support.transition.end)
|
||||||
|
that.hideModal()
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
this.$element.one($.support.transition.end, function () {
|
||||||
|
clearTimeout(timeout)
|
||||||
|
that.hideModal()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, hideModal: function () {
|
||||||
|
var that = this
|
||||||
|
this.$element.hide()
|
||||||
|
this.backdrop(function () {
|
||||||
|
that.removeBackdrop()
|
||||||
|
that.$element.trigger('hidden')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, removeBackdrop: function () {
|
||||||
|
this.$backdrop && this.$backdrop.remove()
|
||||||
|
this.$backdrop = null
|
||||||
|
}
|
||||||
|
|
||||||
|
, backdrop: function (callback) {
|
||||||
|
var that = this
|
||||||
|
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
||||||
|
|
||||||
|
if (this.isShown && this.options.backdrop) {
|
||||||
|
var doAnimate = $.support.transition && animate
|
||||||
|
|
||||||
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||||
|
.appendTo(document.body)
|
||||||
|
|
||||||
|
this.$backdrop.click(
|
||||||
|
this.options.backdrop == 'static' ?
|
||||||
|
$.proxy(this.$element[0].focus, this.$element[0])
|
||||||
|
: $.proxy(this.hide, this)
|
||||||
|
)
|
||||||
|
|
||||||
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||||
|
|
||||||
|
this.$backdrop.addClass('in')
|
||||||
|
|
||||||
|
if (!callback) return
|
||||||
|
|
||||||
|
doAnimate ?
|
||||||
|
this.$backdrop.one($.support.transition.end, callback) :
|
||||||
|
callback()
|
||||||
|
|
||||||
|
} else if (!this.isShown && this.$backdrop) {
|
||||||
|
this.$backdrop.removeClass('in')
|
||||||
|
|
||||||
|
$.support.transition && this.$element.hasClass('fade')?
|
||||||
|
this.$backdrop.one($.support.transition.end, callback) :
|
||||||
|
callback()
|
||||||
|
|
||||||
|
} else if (callback) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* MODAL PLUGIN DEFINITION
|
||||||
|
* ======================= */
|
||||||
|
|
||||||
|
var old = $.fn.modal
|
||||||
|
|
||||||
|
$.fn.modal = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('modal')
|
||||||
|
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
|
||||||
|
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
else if (options.show) data.show()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.modal.defaults = {
|
||||||
|
backdrop: true
|
||||||
|
, keyboard: true
|
||||||
|
, show: true
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.modal.Constructor = Modal
|
||||||
|
|
||||||
|
|
||||||
|
/* MODAL NO CONFLICT
|
||||||
|
* ================= */
|
||||||
|
|
||||||
|
$.fn.modal.noConflict = function () {
|
||||||
|
$.fn.modal = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* MODAL DATA-API
|
||||||
|
* ============== */
|
||||||
|
|
||||||
|
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
|
||||||
|
var $this = $(this)
|
||||||
|
, href = $this.attr('href')
|
||||||
|
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||||
|
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
||||||
|
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
$target
|
||||||
|
.modal(option)
|
||||||
|
.one('hide', function () {
|
||||||
|
$this.focus()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
114
asset/bootstrap/js/bootstrap-popover.js
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
/* ===========================================================
|
||||||
|
* bootstrap-popover.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||||
|
* ===========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* =========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* POPOVER PUBLIC CLASS DEFINITION
|
||||||
|
* =============================== */
|
||||||
|
|
||||||
|
var Popover = function (element, options) {
|
||||||
|
this.init('popover', element, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
||||||
|
========================================== */
|
||||||
|
|
||||||
|
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
|
||||||
|
|
||||||
|
constructor: Popover
|
||||||
|
|
||||||
|
, setContent: function () {
|
||||||
|
var $tip = this.tip()
|
||||||
|
, title = this.getTitle()
|
||||||
|
, content = this.getContent()
|
||||||
|
|
||||||
|
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
||||||
|
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
||||||
|
|
||||||
|
$tip.removeClass('fade top bottom left right in')
|
||||||
|
}
|
||||||
|
|
||||||
|
, hasContent: function () {
|
||||||
|
return this.getTitle() || this.getContent()
|
||||||
|
}
|
||||||
|
|
||||||
|
, getContent: function () {
|
||||||
|
var content
|
||||||
|
, $e = this.$element
|
||||||
|
, o = this.options
|
||||||
|
|
||||||
|
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
||||||
|
|| $e.attr('data-content')
|
||||||
|
|
||||||
|
return content
|
||||||
|
}
|
||||||
|
|
||||||
|
, tip: function () {
|
||||||
|
if (!this.$tip) {
|
||||||
|
this.$tip = $(this.options.template)
|
||||||
|
}
|
||||||
|
return this.$tip
|
||||||
|
}
|
||||||
|
|
||||||
|
, destroy: function () {
|
||||||
|
this.hide().$element.off('.' + this.type).removeData(this.type)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
/* POPOVER PLUGIN DEFINITION
|
||||||
|
* ======================= */
|
||||||
|
|
||||||
|
var old = $.fn.popover
|
||||||
|
|
||||||
|
$.fn.popover = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('popover')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('popover', (data = new Popover(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.popover.Constructor = Popover
|
||||||
|
|
||||||
|
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
||||||
|
placement: 'right'
|
||||||
|
, trigger: 'click'
|
||||||
|
, content: ''
|
||||||
|
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
/* POPOVER NO CONFLICT
|
||||||
|
* =================== */
|
||||||
|
|
||||||
|
$.fn.popover.noConflict = function () {
|
||||||
|
$.fn.popover = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
}(window.jQuery);
|
162
asset/bootstrap/js/bootstrap-scrollspy.js
vendored
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
/* =============================================================
|
||||||
|
* bootstrap-scrollspy.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||||
|
* =============================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ============================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* SCROLLSPY CLASS DEFINITION
|
||||||
|
* ========================== */
|
||||||
|
|
||||||
|
function ScrollSpy(element, options) {
|
||||||
|
var process = $.proxy(this.process, this)
|
||||||
|
, $element = $(element).is('body') ? $(window) : $(element)
|
||||||
|
, href
|
||||||
|
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
||||||
|
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
|
||||||
|
this.selector = (this.options.target
|
||||||
|
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||||
|
|| '') + ' .nav li > a'
|
||||||
|
this.$body = $('body')
|
||||||
|
this.refresh()
|
||||||
|
this.process()
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollSpy.prototype = {
|
||||||
|
|
||||||
|
constructor: ScrollSpy
|
||||||
|
|
||||||
|
, refresh: function () {
|
||||||
|
var self = this
|
||||||
|
, $targets
|
||||||
|
|
||||||
|
this.offsets = $([])
|
||||||
|
this.targets = $([])
|
||||||
|
|
||||||
|
$targets = this.$body
|
||||||
|
.find(this.selector)
|
||||||
|
.map(function () {
|
||||||
|
var $el = $(this)
|
||||||
|
, href = $el.data('target') || $el.attr('href')
|
||||||
|
, $href = /^#\w/.test(href) && $(href)
|
||||||
|
return ( $href
|
||||||
|
&& $href.length
|
||||||
|
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
|
||||||
|
})
|
||||||
|
.sort(function (a, b) { return a[0] - b[0] })
|
||||||
|
.each(function () {
|
||||||
|
self.offsets.push(this[0])
|
||||||
|
self.targets.push(this[1])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, process: function () {
|
||||||
|
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
||||||
|
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
|
||||||
|
, maxScroll = scrollHeight - this.$scrollElement.height()
|
||||||
|
, offsets = this.offsets
|
||||||
|
, targets = this.targets
|
||||||
|
, activeTarget = this.activeTarget
|
||||||
|
, i
|
||||||
|
|
||||||
|
if (scrollTop >= maxScroll) {
|
||||||
|
return activeTarget != (i = targets.last()[0])
|
||||||
|
&& this.activate ( i )
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = offsets.length; i--;) {
|
||||||
|
activeTarget != targets[i]
|
||||||
|
&& scrollTop >= offsets[i]
|
||||||
|
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
||||||
|
&& this.activate( targets[i] )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
, activate: function (target) {
|
||||||
|
var active
|
||||||
|
, selector
|
||||||
|
|
||||||
|
this.activeTarget = target
|
||||||
|
|
||||||
|
$(this.selector)
|
||||||
|
.parent('.active')
|
||||||
|
.removeClass('active')
|
||||||
|
|
||||||
|
selector = this.selector
|
||||||
|
+ '[data-target="' + target + '"],'
|
||||||
|
+ this.selector + '[href="' + target + '"]'
|
||||||
|
|
||||||
|
active = $(selector)
|
||||||
|
.parent('li')
|
||||||
|
.addClass('active')
|
||||||
|
|
||||||
|
if (active.parent('.dropdown-menu').length) {
|
||||||
|
active = active.closest('li.dropdown').addClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
active.trigger('activate')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* SCROLLSPY PLUGIN DEFINITION
|
||||||
|
* =========================== */
|
||||||
|
|
||||||
|
var old = $.fn.scrollspy
|
||||||
|
|
||||||
|
$.fn.scrollspy = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('scrollspy')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.scrollspy.Constructor = ScrollSpy
|
||||||
|
|
||||||
|
$.fn.scrollspy.defaults = {
|
||||||
|
offset: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* SCROLLSPY NO CONFLICT
|
||||||
|
* ===================== */
|
||||||
|
|
||||||
|
$.fn.scrollspy.noConflict = function () {
|
||||||
|
$.fn.scrollspy = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* SCROLLSPY DATA-API
|
||||||
|
* ================== */
|
||||||
|
|
||||||
|
$(window).on('load', function () {
|
||||||
|
$('[data-spy="scroll"]').each(function () {
|
||||||
|
var $spy = $(this)
|
||||||
|
$spy.scrollspy($spy.data())
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
144
asset/bootstrap/js/bootstrap-tab.js
vendored
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
/* ========================================================
|
||||||
|
* bootstrap-tab.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||||
|
* ========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ======================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* TAB CLASS DEFINITION
|
||||||
|
* ==================== */
|
||||||
|
|
||||||
|
var Tab = function (element) {
|
||||||
|
this.element = $(element)
|
||||||
|
}
|
||||||
|
|
||||||
|
Tab.prototype = {
|
||||||
|
|
||||||
|
constructor: Tab
|
||||||
|
|
||||||
|
, show: function () {
|
||||||
|
var $this = this.element
|
||||||
|
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
||||||
|
, selector = $this.attr('data-target')
|
||||||
|
, previous
|
||||||
|
, $target
|
||||||
|
, e
|
||||||
|
|
||||||
|
if (!selector) {
|
||||||
|
selector = $this.attr('href')
|
||||||
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $this.parent('li').hasClass('active') ) return
|
||||||
|
|
||||||
|
previous = $ul.find('.active:last a')[0]
|
||||||
|
|
||||||
|
e = $.Event('show', {
|
||||||
|
relatedTarget: previous
|
||||||
|
})
|
||||||
|
|
||||||
|
$this.trigger(e)
|
||||||
|
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
$target = $(selector)
|
||||||
|
|
||||||
|
this.activate($this.parent('li'), $ul)
|
||||||
|
this.activate($target, $target.parent(), function () {
|
||||||
|
$this.trigger({
|
||||||
|
type: 'shown'
|
||||||
|
, relatedTarget: previous
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, activate: function ( element, container, callback) {
|
||||||
|
var $active = container.find('> .active')
|
||||||
|
, transition = callback
|
||||||
|
&& $.support.transition
|
||||||
|
&& $active.hasClass('fade')
|
||||||
|
|
||||||
|
function next() {
|
||||||
|
$active
|
||||||
|
.removeClass('active')
|
||||||
|
.find('> .dropdown-menu > .active')
|
||||||
|
.removeClass('active')
|
||||||
|
|
||||||
|
element.addClass('active')
|
||||||
|
|
||||||
|
if (transition) {
|
||||||
|
element[0].offsetWidth // reflow for transition
|
||||||
|
element.addClass('in')
|
||||||
|
} else {
|
||||||
|
element.removeClass('fade')
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( element.parent('.dropdown-menu') ) {
|
||||||
|
element.closest('li.dropdown').addClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
callback && callback()
|
||||||
|
}
|
||||||
|
|
||||||
|
transition ?
|
||||||
|
$active.one($.support.transition.end, next) :
|
||||||
|
next()
|
||||||
|
|
||||||
|
$active.removeClass('in')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TAB PLUGIN DEFINITION
|
||||||
|
* ===================== */
|
||||||
|
|
||||||
|
var old = $.fn.tab
|
||||||
|
|
||||||
|
$.fn.tab = function ( option ) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('tab')
|
||||||
|
if (!data) $this.data('tab', (data = new Tab(this)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.tab.Constructor = Tab
|
||||||
|
|
||||||
|
|
||||||
|
/* TAB NO CONFLICT
|
||||||
|
* =============== */
|
||||||
|
|
||||||
|
$.fn.tab.noConflict = function () {
|
||||||
|
$.fn.tab = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TAB DATA-API
|
||||||
|
* ============ */
|
||||||
|
|
||||||
|
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
|
$(this).tab('show')
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
361
asset/bootstrap/js/bootstrap-tooltip.js
vendored
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/* ===========================================================
|
||||||
|
* bootstrap-tooltip.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||||
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||||
|
* ===========================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP PUBLIC CLASS DEFINITION
|
||||||
|
* =============================== */
|
||||||
|
|
||||||
|
var Tooltip = function (element, options) {
|
||||||
|
this.init('tooltip', element, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
Tooltip.prototype = {
|
||||||
|
|
||||||
|
constructor: Tooltip
|
||||||
|
|
||||||
|
, init: function (type, element, options) {
|
||||||
|
var eventIn
|
||||||
|
, eventOut
|
||||||
|
, triggers
|
||||||
|
, trigger
|
||||||
|
, i
|
||||||
|
|
||||||
|
this.type = type
|
||||||
|
this.$element = $(element)
|
||||||
|
this.options = this.getOptions(options)
|
||||||
|
this.enabled = true
|
||||||
|
|
||||||
|
triggers = this.options.trigger.split(' ')
|
||||||
|
|
||||||
|
for (i = triggers.length; i--;) {
|
||||||
|
trigger = triggers[i]
|
||||||
|
if (trigger == 'click') {
|
||||||
|
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
||||||
|
} else if (trigger != 'manual') {
|
||||||
|
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
||||||
|
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
||||||
|
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
||||||
|
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.options.selector ?
|
||||||
|
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
||||||
|
this.fixTitle()
|
||||||
|
}
|
||||||
|
|
||||||
|
, getOptions: function (options) {
|
||||||
|
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
|
||||||
|
|
||||||
|
if (options.delay && typeof options.delay == 'number') {
|
||||||
|
options.delay = {
|
||||||
|
show: options.delay
|
||||||
|
, hide: options.delay
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return options
|
||||||
|
}
|
||||||
|
|
||||||
|
, enter: function (e) {
|
||||||
|
var defaults = $.fn[this.type].defaults
|
||||||
|
, options = {}
|
||||||
|
, self
|
||||||
|
|
||||||
|
this._options && $.each(this._options, function (key, value) {
|
||||||
|
if (defaults[key] != value) options[key] = value
|
||||||
|
}, this)
|
||||||
|
|
||||||
|
self = $(e.currentTarget)[this.type](options).data(this.type)
|
||||||
|
|
||||||
|
if (!self.options.delay || !self.options.delay.show) return self.show()
|
||||||
|
|
||||||
|
clearTimeout(this.timeout)
|
||||||
|
self.hoverState = 'in'
|
||||||
|
this.timeout = setTimeout(function() {
|
||||||
|
if (self.hoverState == 'in') self.show()
|
||||||
|
}, self.options.delay.show)
|
||||||
|
}
|
||||||
|
|
||||||
|
, leave: function (e) {
|
||||||
|
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
||||||
|
|
||||||
|
if (this.timeout) clearTimeout(this.timeout)
|
||||||
|
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
||||||
|
|
||||||
|
self.hoverState = 'out'
|
||||||
|
this.timeout = setTimeout(function() {
|
||||||
|
if (self.hoverState == 'out') self.hide()
|
||||||
|
}, self.options.delay.hide)
|
||||||
|
}
|
||||||
|
|
||||||
|
, show: function () {
|
||||||
|
var $tip
|
||||||
|
, pos
|
||||||
|
, actualWidth
|
||||||
|
, actualHeight
|
||||||
|
, placement
|
||||||
|
, tp
|
||||||
|
, e = $.Event('show')
|
||||||
|
|
||||||
|
if (this.hasContent() && this.enabled) {
|
||||||
|
this.$element.trigger(e)
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
$tip = this.tip()
|
||||||
|
this.setContent()
|
||||||
|
|
||||||
|
if (this.options.animation) {
|
||||||
|
$tip.addClass('fade')
|
||||||
|
}
|
||||||
|
|
||||||
|
placement = typeof this.options.placement == 'function' ?
|
||||||
|
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
||||||
|
this.options.placement
|
||||||
|
|
||||||
|
$tip
|
||||||
|
.detach()
|
||||||
|
.css({ top: 0, left: 0, display: 'block' })
|
||||||
|
|
||||||
|
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||||
|
|
||||||
|
pos = this.getPosition()
|
||||||
|
|
||||||
|
actualWidth = $tip[0].offsetWidth
|
||||||
|
actualHeight = $tip[0].offsetHeight
|
||||||
|
|
||||||
|
switch (placement) {
|
||||||
|
case 'bottom':
|
||||||
|
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||||
|
break
|
||||||
|
case 'top':
|
||||||
|
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
|
||||||
|
break
|
||||||
|
case 'left':
|
||||||
|
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
|
||||||
|
break
|
||||||
|
case 'right':
|
||||||
|
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
this.applyPlacement(tp, placement)
|
||||||
|
this.$element.trigger('shown')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
, applyPlacement: function(offset, placement){
|
||||||
|
var $tip = this.tip()
|
||||||
|
, width = $tip[0].offsetWidth
|
||||||
|
, height = $tip[0].offsetHeight
|
||||||
|
, actualWidth
|
||||||
|
, actualHeight
|
||||||
|
, delta
|
||||||
|
, replace
|
||||||
|
|
||||||
|
$tip
|
||||||
|
.offset(offset)
|
||||||
|
.addClass(placement)
|
||||||
|
.addClass('in')
|
||||||
|
|
||||||
|
actualWidth = $tip[0].offsetWidth
|
||||||
|
actualHeight = $tip[0].offsetHeight
|
||||||
|
|
||||||
|
if (placement == 'top' && actualHeight != height) {
|
||||||
|
offset.top = offset.top + height - actualHeight
|
||||||
|
replace = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (placement == 'bottom' || placement == 'top') {
|
||||||
|
delta = 0
|
||||||
|
|
||||||
|
if (offset.left < 0){
|
||||||
|
delta = offset.left * -2
|
||||||
|
offset.left = 0
|
||||||
|
$tip.offset(offset)
|
||||||
|
actualWidth = $tip[0].offsetWidth
|
||||||
|
actualHeight = $tip[0].offsetHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
|
||||||
|
} else {
|
||||||
|
this.replaceArrow(actualHeight - height, actualHeight, 'top')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (replace) $tip.offset(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
, replaceArrow: function(delta, dimension, position){
|
||||||
|
this
|
||||||
|
.arrow()
|
||||||
|
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
|
||||||
|
}
|
||||||
|
|
||||||
|
, setContent: function () {
|
||||||
|
var $tip = this.tip()
|
||||||
|
, title = this.getTitle()
|
||||||
|
|
||||||
|
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
||||||
|
$tip.removeClass('fade in top bottom left right')
|
||||||
|
}
|
||||||
|
|
||||||
|
, hide: function () {
|
||||||
|
var that = this
|
||||||
|
, $tip = this.tip()
|
||||||
|
, e = $.Event('hide')
|
||||||
|
|
||||||
|
this.$element.trigger(e)
|
||||||
|
if (e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
$tip.removeClass('in')
|
||||||
|
|
||||||
|
function removeWithAnimation() {
|
||||||
|
var timeout = setTimeout(function () {
|
||||||
|
$tip.off($.support.transition.end).detach()
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
$tip.one($.support.transition.end, function () {
|
||||||
|
clearTimeout(timeout)
|
||||||
|
$tip.detach()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.support.transition && this.$tip.hasClass('fade') ?
|
||||||
|
removeWithAnimation() :
|
||||||
|
$tip.detach()
|
||||||
|
|
||||||
|
this.$element.trigger('hidden')
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, fixTitle: function () {
|
||||||
|
var $e = this.$element
|
||||||
|
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
||||||
|
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
, hasContent: function () {
|
||||||
|
return this.getTitle()
|
||||||
|
}
|
||||||
|
|
||||||
|
, getPosition: function () {
|
||||||
|
var el = this.$element[0]
|
||||||
|
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
||||||
|
width: el.offsetWidth
|
||||||
|
, height: el.offsetHeight
|
||||||
|
}, this.$element.offset())
|
||||||
|
}
|
||||||
|
|
||||||
|
, getTitle: function () {
|
||||||
|
var title
|
||||||
|
, $e = this.$element
|
||||||
|
, o = this.options
|
||||||
|
|
||||||
|
title = $e.attr('data-original-title')
|
||||||
|
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
||||||
|
|
||||||
|
return title
|
||||||
|
}
|
||||||
|
|
||||||
|
, tip: function () {
|
||||||
|
return this.$tip = this.$tip || $(this.options.template)
|
||||||
|
}
|
||||||
|
|
||||||
|
, arrow: function(){
|
||||||
|
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
|
||||||
|
}
|
||||||
|
|
||||||
|
, validate: function () {
|
||||||
|
if (!this.$element[0].parentNode) {
|
||||||
|
this.hide()
|
||||||
|
this.$element = null
|
||||||
|
this.options = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
, enable: function () {
|
||||||
|
this.enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
, disable: function () {
|
||||||
|
this.enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
, toggleEnabled: function () {
|
||||||
|
this.enabled = !this.enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
, toggle: function (e) {
|
||||||
|
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
|
||||||
|
self.tip().hasClass('in') ? self.hide() : self.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
, destroy: function () {
|
||||||
|
this.hide().$element.off('.' + this.type).removeData(this.type)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP PLUGIN DEFINITION
|
||||||
|
* ========================= */
|
||||||
|
|
||||||
|
var old = $.fn.tooltip
|
||||||
|
|
||||||
|
$.fn.tooltip = function ( option ) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('tooltip')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.tooltip.Constructor = Tooltip
|
||||||
|
|
||||||
|
$.fn.tooltip.defaults = {
|
||||||
|
animation: true
|
||||||
|
, placement: 'top'
|
||||||
|
, selector: false
|
||||||
|
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
||||||
|
, trigger: 'hover focus'
|
||||||
|
, title: ''
|
||||||
|
, delay: 0
|
||||||
|
, html: false
|
||||||
|
, container: false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP NO CONFLICT
|
||||||
|
* =================== */
|
||||||
|
|
||||||
|
$.fn.tooltip.noConflict = function () {
|
||||||
|
$.fn.tooltip = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
}(window.jQuery);
|
60
asset/bootstrap/js/bootstrap-transition.js
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/* ===================================================
|
||||||
|
* bootstrap-transition.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||||||
|
* ===================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ========================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
!function ($) {
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
||||||
|
* ======================================================= */
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
|
||||||
|
$.support.transition = (function () {
|
||||||
|
|
||||||
|
var transitionEnd = (function () {
|
||||||
|
|
||||||
|
var el = document.createElement('bootstrap')
|
||||||
|
, transEndEventNames = {
|
||||||
|
'WebkitTransition' : 'webkitTransitionEnd'
|
||||||
|
, 'MozTransition' : 'transitionend'
|
||||||
|
, 'OTransition' : 'oTransitionEnd otransitionend'
|
||||||
|
, 'transition' : 'transitionend'
|
||||||
|
}
|
||||||
|
, name
|
||||||
|
|
||||||
|
for (name in transEndEventNames){
|
||||||
|
if (el.style[name] !== undefined) {
|
||||||
|
return transEndEventNames[name]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}())
|
||||||
|
|
||||||
|
return transitionEnd && {
|
||||||
|
end: transitionEnd
|
||||||
|
}
|
||||||
|
|
||||||
|
})()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
335
asset/bootstrap/js/bootstrap-typeahead.js
vendored
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
/* =============================================================
|
||||||
|
* bootstrap-typeahead.js v2.3.2
|
||||||
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||||
|
* =============================================================
|
||||||
|
* Copyright 2012 Twitter, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ============================================================ */
|
||||||
|
|
||||||
|
|
||||||
|
!function($){
|
||||||
|
|
||||||
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
|
|
||||||
|
/* TYPEAHEAD PUBLIC CLASS DEFINITION
|
||||||
|
* ================================= */
|
||||||
|
|
||||||
|
var Typeahead = function (element, options) {
|
||||||
|
this.$element = $(element)
|
||||||
|
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
||||||
|
this.matcher = this.options.matcher || this.matcher
|
||||||
|
this.sorter = this.options.sorter || this.sorter
|
||||||
|
this.highlighter = this.options.highlighter || this.highlighter
|
||||||
|
this.updater = this.options.updater || this.updater
|
||||||
|
this.source = this.options.source
|
||||||
|
this.$menu = $(this.options.menu)
|
||||||
|
this.shown = false
|
||||||
|
this.listen()
|
||||||
|
}
|
||||||
|
|
||||||
|
Typeahead.prototype = {
|
||||||
|
|
||||||
|
constructor: Typeahead
|
||||||
|
|
||||||
|
, select: function () {
|
||||||
|
var val = this.$menu.find('.active').attr('data-value')
|
||||||
|
this.$element
|
||||||
|
.val(this.updater(val))
|
||||||
|
.change()
|
||||||
|
return this.hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
, updater: function (item) {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
|
||||||
|
, show: function () {
|
||||||
|
var pos = $.extend({}, this.$element.position(), {
|
||||||
|
height: this.$element[0].offsetHeight
|
||||||
|
})
|
||||||
|
|
||||||
|
this.$menu
|
||||||
|
.insertAfter(this.$element)
|
||||||
|
.css({
|
||||||
|
top: pos.top + pos.height
|
||||||
|
, left: pos.left
|
||||||
|
})
|
||||||
|
.show()
|
||||||
|
|
||||||
|
this.shown = true
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, hide: function () {
|
||||||
|
this.$menu.hide()
|
||||||
|
this.shown = false
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, lookup: function (event) {
|
||||||
|
var items
|
||||||
|
|
||||||
|
this.query = this.$element.val()
|
||||||
|
|
||||||
|
if (!this.query || this.query.length < this.options.minLength) {
|
||||||
|
return this.shown ? this.hide() : this
|
||||||
|
}
|
||||||
|
|
||||||
|
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
|
||||||
|
|
||||||
|
return items ? this.process(items) : this
|
||||||
|
}
|
||||||
|
|
||||||
|
, process: function (items) {
|
||||||
|
var that = this
|
||||||
|
|
||||||
|
items = $.grep(items, function (item) {
|
||||||
|
return that.matcher(item)
|
||||||
|
})
|
||||||
|
|
||||||
|
items = this.sorter(items)
|
||||||
|
|
||||||
|
if (!items.length) {
|
||||||
|
return this.shown ? this.hide() : this
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.render(items.slice(0, this.options.items)).show()
|
||||||
|
}
|
||||||
|
|
||||||
|
, matcher: function (item) {
|
||||||
|
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
||||||
|
}
|
||||||
|
|
||||||
|
, sorter: function (items) {
|
||||||
|
var beginswith = []
|
||||||
|
, caseSensitive = []
|
||||||
|
, caseInsensitive = []
|
||||||
|
, item
|
||||||
|
|
||||||
|
while (item = items.shift()) {
|
||||||
|
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
|
||||||
|
else if (~item.indexOf(this.query)) caseSensitive.push(item)
|
||||||
|
else caseInsensitive.push(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
return beginswith.concat(caseSensitive, caseInsensitive)
|
||||||
|
}
|
||||||
|
|
||||||
|
, highlighter: function (item) {
|
||||||
|
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
||||||
|
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
||||||
|
return '<strong>' + match + '</strong>'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
, render: function (items) {
|
||||||
|
var that = this
|
||||||
|
|
||||||
|
items = $(items).map(function (i, item) {
|
||||||
|
i = $(that.options.item).attr('data-value', item)
|
||||||
|
i.find('a').html(that.highlighter(item))
|
||||||
|
return i[0]
|
||||||
|
})
|
||||||
|
|
||||||
|
items.first().addClass('active')
|
||||||
|
this.$menu.html(items)
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
, next: function (event) {
|
||||||
|
var active = this.$menu.find('.active').removeClass('active')
|
||||||
|
, next = active.next()
|
||||||
|
|
||||||
|
if (!next.length) {
|
||||||
|
next = $(this.$menu.find('li')[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
next.addClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
, prev: function (event) {
|
||||||
|
var active = this.$menu.find('.active').removeClass('active')
|
||||||
|
, prev = active.prev()
|
||||||
|
|
||||||
|
if (!prev.length) {
|
||||||
|
prev = this.$menu.find('li').last()
|
||||||
|
}
|
||||||
|
|
||||||
|
prev.addClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
, listen: function () {
|
||||||
|
this.$element
|
||||||
|
.on('focus', $.proxy(this.focus, this))
|
||||||
|
.on('blur', $.proxy(this.blur, this))
|
||||||
|
.on('keypress', $.proxy(this.keypress, this))
|
||||||
|
.on('keyup', $.proxy(this.keyup, this))
|
||||||
|
|
||||||
|
if (this.eventSupported('keydown')) {
|
||||||
|
this.$element.on('keydown', $.proxy(this.keydown, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$menu
|
||||||
|
.on('click', $.proxy(this.click, this))
|
||||||
|
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
||||||
|
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
, eventSupported: function(eventName) {
|
||||||
|
var isSupported = eventName in this.$element
|
||||||
|
if (!isSupported) {
|
||||||
|
this.$element.setAttribute(eventName, 'return;')
|
||||||
|
isSupported = typeof this.$element[eventName] === 'function'
|
||||||
|
}
|
||||||
|
return isSupported
|
||||||
|
}
|
||||||
|
|
||||||
|
, move: function (e) {
|
||||||
|
if (!this.shown) return
|
||||||
|
|
||||||
|
switch(e.keyCode) {
|
||||||
|
case 9: // tab
|
||||||
|
case 13: // enter
|
||||||
|
case 27: // escape
|
||||||
|
e.preventDefault()
|
||||||
|
break
|
||||||
|
|
||||||
|
case 38: // up arrow
|
||||||
|
e.preventDefault()
|
||||||
|
this.prev()
|
||||||
|
break
|
||||||
|
|
||||||
|
case 40: // down arrow
|
||||||
|
e.preventDefault()
|
||||||
|
this.next()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
}
|
||||||
|
|
||||||
|
, keydown: function (e) {
|
||||||
|
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||||
|
this.move(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
, keypress: function (e) {
|
||||||
|
if (this.suppressKeyPressRepeat) return
|
||||||
|
this.move(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
, keyup: function (e) {
|
||||||
|
switch(e.keyCode) {
|
||||||
|
case 40: // down arrow
|
||||||
|
case 38: // up arrow
|
||||||
|
case 16: // shift
|
||||||
|
case 17: // ctrl
|
||||||
|
case 18: // alt
|
||||||
|
break
|
||||||
|
|
||||||
|
case 9: // tab
|
||||||
|
case 13: // enter
|
||||||
|
if (!this.shown) return
|
||||||
|
this.select()
|
||||||
|
break
|
||||||
|
|
||||||
|
case 27: // escape
|
||||||
|
if (!this.shown) return
|
||||||
|
this.hide()
|
||||||
|
break
|
||||||
|
|
||||||
|
default:
|
||||||
|
this.lookup()
|
||||||
|
}
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
|
}
|
||||||
|
|
||||||
|
, focus: function (e) {
|
||||||
|
this.focused = true
|
||||||
|
}
|
||||||
|
|
||||||
|
, blur: function (e) {
|
||||||
|
this.focused = false
|
||||||
|
if (!this.mousedover && this.shown) this.hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
, click: function (e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
|
this.select()
|
||||||
|
this.$element.focus()
|
||||||
|
}
|
||||||
|
|
||||||
|
, mouseenter: function (e) {
|
||||||
|
this.mousedover = true
|
||||||
|
this.$menu.find('.active').removeClass('active')
|
||||||
|
$(e.currentTarget).addClass('active')
|
||||||
|
}
|
||||||
|
|
||||||
|
, mouseleave: function (e) {
|
||||||
|
this.mousedover = false
|
||||||
|
if (!this.focused && this.shown) this.hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TYPEAHEAD PLUGIN DEFINITION
|
||||||
|
* =========================== */
|
||||||
|
|
||||||
|
var old = $.fn.typeahead
|
||||||
|
|
||||||
|
$.fn.typeahead = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
, data = $this.data('typeahead')
|
||||||
|
, options = typeof option == 'object' && option
|
||||||
|
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
|
||||||
|
if (typeof option == 'string') data[option]()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.typeahead.defaults = {
|
||||||
|
source: []
|
||||||
|
, items: 8
|
||||||
|
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
||||||
|
, item: '<li><a href="#"></a></li>'
|
||||||
|
, minLength: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.typeahead.Constructor = Typeahead
|
||||||
|
|
||||||
|
|
||||||
|
/* TYPEAHEAD NO CONFLICT
|
||||||
|
* =================== */
|
||||||
|
|
||||||
|
$.fn.typeahead.noConflict = function () {
|
||||||
|
$.fn.typeahead = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TYPEAHEAD DATA-API
|
||||||
|
* ================== */
|
||||||
|
|
||||||
|
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||||
|
var $this = $(this)
|
||||||
|
if ($this.data('typeahead')) return
|
||||||
|
$this.typeahead($this.data())
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
2280
asset/bootstrap/js/bootstrap.js
vendored
Normal file
6
asset/bootstrap/js/bootstrap.min.js
vendored
Normal file
30
asset/bootstrap/js/google-code-prettify/prettify.css
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
.com { color: #93a1a1; }
|
||||||
|
.lit { color: #195f91; }
|
||||||
|
.pun, .opn, .clo { color: #93a1a1; }
|
||||||
|
.fun { color: #dc322f; }
|
||||||
|
.str, .atv { color: #D14; }
|
||||||
|
.kwd, .prettyprint .tag { color: #1e347b; }
|
||||||
|
.typ, .atn, .dec, .var { color: teal; }
|
||||||
|
.pln { color: #48484c; }
|
||||||
|
|
||||||
|
.prettyprint {
|
||||||
|
padding: 8px;
|
||||||
|
background-color: #f7f7f9;
|
||||||
|
border: 1px solid #e1e1e8;
|
||||||
|
}
|
||||||
|
.prettyprint.linenums {
|
||||||
|
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||||
|
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||||
|
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Specify class=linenums on a pre to get line numbering */
|
||||||
|
ol.linenums {
|
||||||
|
margin: 0 0 0 33px; /* IE indents via margin-left */
|
||||||
|
}
|
||||||
|
ol.linenums li {
|
||||||
|
padding-left: 12px;
|
||||||
|
color: #bebec5;
|
||||||
|
line-height: 20px;
|
||||||
|
text-shadow: 0 1px 0 #fff;
|
||||||
|
}
|
28
asset/bootstrap/js/google-code-prettify/prettify.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(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;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||||
|
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[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<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||||
|
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=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<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||||
|
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||||
|
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||||
|
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=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<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=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<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||||
|
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=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*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||||
|
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||||
|
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=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",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\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<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=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<h.length?setTimeout(m,
|
||||||
|
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||||
|
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
401
asset/bootstrap/js/holder/holder.js
Normal file
@ -0,0 +1,401 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Holder - 1.9 - client side image placeholders
|
||||||
|
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
|
||||||
|
|
||||||
|
Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Commercial use requires attribution.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
var Holder = Holder || {};
|
||||||
|
(function (app, win) {
|
||||||
|
|
||||||
|
var preempted = false,
|
||||||
|
fallback = false,
|
||||||
|
canvas = document.createElement('canvas');
|
||||||
|
|
||||||
|
//getElementsByClassName polyfill
|
||||||
|
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
|
||||||
|
|
||||||
|
//getComputedStyle polyfill
|
||||||
|
window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
|
||||||
|
|
||||||
|
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
|
||||||
|
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}};
|
||||||
|
|
||||||
|
//https://gist.github.com/991057 by Jed Schmidt with modifications
|
||||||
|
function selector(a){
|
||||||
|
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
|
||||||
|
var ret=[]; b!=null&&(b.length?ret=b:b.length==0?ret=b:ret=[b]); return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
//shallow object property extend
|
||||||
|
function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
|
||||||
|
|
||||||
|
//hasOwnProperty polyfill
|
||||||
|
if (!Object.prototype.hasOwnProperty)
|
||||||
|
Object.prototype.hasOwnProperty = function(prop) {
|
||||||
|
var proto = this.__proto__ || this.constructor.prototype;
|
||||||
|
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function text_size(width, height, template) {
|
||||||
|
var dimension_arr = [height, width].sort();
|
||||||
|
var maxFactor = Math.round(dimension_arr[1] / 16),
|
||||||
|
minFactor = Math.round(dimension_arr[0] / 16);
|
||||||
|
var text_height = Math.max(template.size, maxFactor);
|
||||||
|
return {
|
||||||
|
height: text_height
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function draw(ctx, dimensions, template, ratio) {
|
||||||
|
var ts = text_size(dimensions.width, dimensions.height, template);
|
||||||
|
var text_height = ts.height;
|
||||||
|
var width = dimensions.width * ratio, height = dimensions.height * ratio;
|
||||||
|
var font = template.font ? template.font : "sans-serif";
|
||||||
|
canvas.width = width;
|
||||||
|
canvas.height = height;
|
||||||
|
ctx.textAlign = "center";
|
||||||
|
ctx.textBaseline = "middle";
|
||||||
|
ctx.fillStyle = template.background;
|
||||||
|
ctx.fillRect(0, 0, width, height);
|
||||||
|
ctx.fillStyle = template.foreground;
|
||||||
|
ctx.font = "bold " + text_height + "px "+font;
|
||||||
|
var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
|
||||||
|
if (ctx.measureText(text).width / width > 1) {
|
||||||
|
text_height = template.size / (ctx.measureText(text).width / width);
|
||||||
|
}
|
||||||
|
//Resetting font size if necessary
|
||||||
|
ctx.font = "bold " + (text_height * ratio) + "px "+font;
|
||||||
|
ctx.fillText(text, (width / 2), (height / 2), width);
|
||||||
|
return canvas.toDataURL("image/png");
|
||||||
|
}
|
||||||
|
|
||||||
|
function render(mode, el, holder, src) {
|
||||||
|
var dimensions = holder.dimensions,
|
||||||
|
theme = holder.theme,
|
||||||
|
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
|
||||||
|
var dimensions_caption = dimensions.width + "x" + dimensions.height;
|
||||||
|
theme = (text ? extend(theme, { text: text }) : theme);
|
||||||
|
theme = (holder.font ? extend(theme, {font: holder.font}) : theme);
|
||||||
|
|
||||||
|
var ratio = 1;
|
||||||
|
if(window.devicePixelRatio && window.devicePixelRatio > 1){
|
||||||
|
ratio = window.devicePixelRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mode == "image") {
|
||||||
|
el.setAttribute("data-src", src);
|
||||||
|
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
|
||||||
|
|
||||||
|
if(fallback || !holder.auto){
|
||||||
|
el.style.width = dimensions.width + "px";
|
||||||
|
el.style.height = dimensions.height + "px";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fallback) {
|
||||||
|
el.style.backgroundColor = theme.background;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!fallback) {
|
||||||
|
el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")";
|
||||||
|
el.style.backgroundSize = dimensions.width+"px "+dimensions.height+"px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function fluid(el, holder, src) {
|
||||||
|
var dimensions = holder.dimensions,
|
||||||
|
theme = holder.theme,
|
||||||
|
text = holder.text;
|
||||||
|
var dimensions_caption = dimensions.width + "x" + dimensions.height;
|
||||||
|
theme = (text ? extend(theme, {
|
||||||
|
text: text
|
||||||
|
}) : theme);
|
||||||
|
|
||||||
|
var fluid = document.createElement("div");
|
||||||
|
|
||||||
|
fluid.style.backgroundColor = theme.background;
|
||||||
|
fluid.style.color = theme.foreground;
|
||||||
|
fluid.className = el.className + " holderjs-fluid";
|
||||||
|
fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%")>0?"":"px");
|
||||||
|
fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px");
|
||||||
|
fluid.id = el.id;
|
||||||
|
|
||||||
|
el.style.width=0;
|
||||||
|
el.style.height=0;
|
||||||
|
|
||||||
|
if (theme.text) {
|
||||||
|
fluid.appendChild(document.createTextNode(theme.text))
|
||||||
|
} else {
|
||||||
|
fluid.appendChild(document.createTextNode(dimensions_caption))
|
||||||
|
fluid_images.push(fluid);
|
||||||
|
setTimeout(fluid_update, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
el.parentNode.insertBefore(fluid, el.nextSibling)
|
||||||
|
|
||||||
|
if(window.jQuery){
|
||||||
|
jQuery(function($){
|
||||||
|
$(el).on("load", function(){
|
||||||
|
el.style.width = fluid.style.width;
|
||||||
|
el.style.height = fluid.style.height;
|
||||||
|
$(el).show();
|
||||||
|
$(fluid).remove();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fluid_update() {
|
||||||
|
for (i in fluid_images) {
|
||||||
|
if(!fluid_images.hasOwnProperty(i)) continue;
|
||||||
|
var el = fluid_images[i],
|
||||||
|
label = el.firstChild;
|
||||||
|
|
||||||
|
el.style.lineHeight = el.offsetHeight+"px";
|
||||||
|
label.data = el.offsetWidth + "x" + el.offsetHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parse_flags(flags, options) {
|
||||||
|
|
||||||
|
var ret = {
|
||||||
|
theme: settings.themes.gray
|
||||||
|
}, render = false;
|
||||||
|
|
||||||
|
for (sl = flags.length, j = 0; j < sl; j++) {
|
||||||
|
var flag = flags[j];
|
||||||
|
if (app.flags.dimensions.match(flag)) {
|
||||||
|
render = true;
|
||||||
|
ret.dimensions = app.flags.dimensions.output(flag);
|
||||||
|
} else if (app.flags.fluid.match(flag)) {
|
||||||
|
render = true;
|
||||||
|
ret.dimensions = app.flags.fluid.output(flag);
|
||||||
|
ret.fluid = true;
|
||||||
|
} else if (app.flags.colors.match(flag)) {
|
||||||
|
ret.theme = app.flags.colors.output(flag);
|
||||||
|
} else if (options.themes[flag]) {
|
||||||
|
//If a theme is specified, it will override custom colors
|
||||||
|
ret.theme = options.themes[flag];
|
||||||
|
} else if (app.flags.text.match(flag)) {
|
||||||
|
ret.text = app.flags.text.output(flag);
|
||||||
|
} else if(app.flags.font.match(flag)){
|
||||||
|
ret.font = app.flags.font.output(flag);
|
||||||
|
}
|
||||||
|
else if(app.flags.auto.match(flag)){
|
||||||
|
ret.auto = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return render ? ret : false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!canvas.getContext) {
|
||||||
|
fallback = true;
|
||||||
|
} else {
|
||||||
|
if (canvas.toDataURL("image/png")
|
||||||
|
.indexOf("data:image/png") < 0) {
|
||||||
|
//Android doesn't support data URI
|
||||||
|
fallback = true;
|
||||||
|
} else {
|
||||||
|
var ctx = canvas.getContext("2d");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var fluid_images = [];
|
||||||
|
|
||||||
|
var settings = {
|
||||||
|
domain: "holder.js",
|
||||||
|
images: "img",
|
||||||
|
bgnodes: ".holderjs",
|
||||||
|
themes: {
|
||||||
|
"gray": {
|
||||||
|
background: "#eee",
|
||||||
|
foreground: "#aaa",
|
||||||
|
size: 12
|
||||||
|
},
|
||||||
|
"social": {
|
||||||
|
background: "#3a5a97",
|
||||||
|
foreground: "#fff",
|
||||||
|
size: 12
|
||||||
|
},
|
||||||
|
"industrial": {
|
||||||
|
background: "#434A52",
|
||||||
|
foreground: "#C2F200",
|
||||||
|
size: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
app.flags = {
|
||||||
|
dimensions: {
|
||||||
|
regex: /^(\d+)x(\d+)$/,
|
||||||
|
output: function (val) {
|
||||||
|
var exec = this.regex.exec(val);
|
||||||
|
return {
|
||||||
|
width: +exec[1],
|
||||||
|
height: +exec[2]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fluid: {
|
||||||
|
regex: /^([0-9%]+)x([0-9%]+)$/,
|
||||||
|
output: function (val) {
|
||||||
|
var exec = this.regex.exec(val);
|
||||||
|
return {
|
||||||
|
width: exec[1],
|
||||||
|
height: exec[2]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
|
||||||
|
output: function (val) {
|
||||||
|
var exec = this.regex.exec(val);
|
||||||
|
return {
|
||||||
|
size: settings.themes.gray.size,
|
||||||
|
foreground: "#" + exec[2],
|
||||||
|
background: "#" + exec[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
regex: /text\:(.*)/,
|
||||||
|
output: function (val) {
|
||||||
|
return this.regex.exec(val)[1];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
font: {
|
||||||
|
regex: /font\:(.*)/,
|
||||||
|
output: function(val){
|
||||||
|
return this.regex.exec(val)[1];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
auto: {
|
||||||
|
regex: /^auto$/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var flag in app.flags) {
|
||||||
|
if(!app.flags.hasOwnProperty(flag)) continue;
|
||||||
|
app.flags[flag].match = function (val) {
|
||||||
|
return val.match(this.regex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
app.add_theme = function (name, theme) {
|
||||||
|
name != null && theme != null && (settings.themes[name] = theme);
|
||||||
|
return app;
|
||||||
|
};
|
||||||
|
|
||||||
|
app.add_image = function (src, el) {
|
||||||
|
var node = selector(el);
|
||||||
|
if (node.length) {
|
||||||
|
for (var i = 0, l = node.length; i < l; i++) {
|
||||||
|
var img = document.createElement("img")
|
||||||
|
img.setAttribute("data-src", src);
|
||||||
|
node[i].appendChild(img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return app;
|
||||||
|
};
|
||||||
|
|
||||||
|
app.run = function (o) {
|
||||||
|
var options = extend(settings, o), images = [];
|
||||||
|
|
||||||
|
if(options.images instanceof window.NodeList){
|
||||||
|
imageNodes = options.images;
|
||||||
|
}
|
||||||
|
else if(options.images instanceof window.Node){
|
||||||
|
imageNodes = [options.images];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
imageNodes = selector(options.images);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(options.elements instanceof window.NodeList){
|
||||||
|
bgnodes = options.bgnodes;
|
||||||
|
}
|
||||||
|
else if(options.bgnodes instanceof window.Node){
|
||||||
|
bgnodes = [options.bgnodes];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
bgnodes = selector(options.bgnodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
preempted = true;
|
||||||
|
|
||||||
|
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
|
||||||
|
|
||||||
|
var holdercss = document.getElementById("holderjs-style");
|
||||||
|
|
||||||
|
if(!holdercss){
|
||||||
|
holdercss = document.createElement("style");
|
||||||
|
holdercss.setAttribute("id", "holderjs-style");
|
||||||
|
holdercss.type = "text/css";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(holdercss);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(holdercss.styleSheet){
|
||||||
|
holdercss.styleSheet += options.stylesheet;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
holdercss.textContent+= options.stylesheet;
|
||||||
|
}
|
||||||
|
|
||||||
|
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
|
||||||
|
|
||||||
|
for (var l = bgnodes.length, i = 0; i < l; i++) {
|
||||||
|
var src = window.getComputedStyle(bgnodes[i], null)
|
||||||
|
.getPropertyValue("background-image");
|
||||||
|
var flags = src.match(cssregex);
|
||||||
|
if (flags) {
|
||||||
|
var holder = parse_flags(flags[1].split("/"), options);
|
||||||
|
if (holder) {
|
||||||
|
render("background", bgnodes[i], holder, src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var l = images.length, i = 0; i < l; i++) {
|
||||||
|
var src = images[i].getAttribute("src") || images[i].getAttribute("data-src");
|
||||||
|
if (src != null && src.indexOf(options.domain) >= 0) {
|
||||||
|
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
|
||||||
|
.split("/"), options);
|
||||||
|
if (holder) {
|
||||||
|
if (holder.fluid) {
|
||||||
|
fluid(images[i], holder, src);
|
||||||
|
} else {
|
||||||
|
render("image", images[i], holder, src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return app;
|
||||||
|
};
|
||||||
|
|
||||||
|
contentLoaded(win, function () {
|
||||||
|
if (window.addEventListener) {
|
||||||
|
window.addEventListener("resize", fluid_update, false);
|
||||||
|
window.addEventListener("orientationchange", fluid_update, false);
|
||||||
|
} else {
|
||||||
|
window.attachEvent("onresize", fluid_update)
|
||||||
|
}
|
||||||
|
preempted || app.run();
|
||||||
|
});
|
||||||
|
|
||||||
|
if ( typeof define === "function" && define.amd ) {
|
||||||
|
define( "Holder", [], function () { return app; } );
|
||||||
|
}
|
||||||
|
|
||||||
|
})(Holder, window);
|
8
asset/bootstrap/js/html5shiv.js
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||||
|
*/
|
||||||
|
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||||
|
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||||
|
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||||
|
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||||
|
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
5
asset/bootstrap/js/jquery.js
vendored
Normal file
48
asset/css/style.css
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#note {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 6001;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-box-shadow: 0 0 5px black;
|
||||||
|
-moz-box-shadow: 0 0 5px black;
|
||||||
|
box-shadow: 0 0 5px black;
|
||||||
|
}
|
||||||
|
.cssanimations.csstransforms #note {
|
||||||
|
-webkit-transform: translateY(-50px);
|
||||||
|
-webkit-animation: slideDown 2.5s 1.0s 1 ease forwards;
|
||||||
|
-moz-transform: translateY(-50px);
|
||||||
|
-moz-animation: slideDown 2.5s 1.0s 1 ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
#close {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 9px;
|
||||||
|
text-indent: -9999px;
|
||||||
|
background: url(images/close.png);
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.cssanimations.csstransforms #close {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes slideDown {
|
||||||
|
0%, 100% { -webkit-transform: translateY(-50px); }
|
||||||
|
10%, 90% { -webkit-transform: translateY(0px); }
|
||||||
|
}
|
||||||
|
@-moz-keyframes slideDown {
|
||||||
|
0%, 100% { -moz-transform: translateY(-50px); }
|
||||||
|
10%, 90% { -moz-transform: translateY(0px); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.affix {
|
||||||
|
position: static;
|
||||||
|
width: auto;
|
||||||
|
top: 0;
|
||||||
|
}
|
BIN
asset/img/ajax_loading.gif
Normal file
After Width: | Height: | Size: 404 B |
BIN
asset/img/ajax_loading3.gif
Normal file
After Width: | Height: | Size: 723 B |
BIN
asset/img/file_add.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
asset/img/loading7.gif
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
asset/img/loading81.gif
Normal file
After Width: | Height: | Size: 18 KiB |
311
asset/js/form_view.js
Normal file
@ -0,0 +1,311 @@
|
|||||||
|
function load(id, base_url)
|
||||||
|
{
|
||||||
|
var dataJson;
|
||||||
|
$.ajax({
|
||||||
|
url: base_url+'form/getDataAjax/'+id,
|
||||||
|
success: function(msg)
|
||||||
|
{
|
||||||
|
//alert("masuk");
|
||||||
|
dataJson=msg;
|
||||||
|
dataJson = jQuery.parseJSON(msg);
|
||||||
|
var data = dataJson['visit'];
|
||||||
|
var vehicle = dataJson['vehicle'];
|
||||||
|
var purchase = dataJson['purchase'];
|
||||||
|
var rcm = dataJson['recommendation'];
|
||||||
|
var pic = dataJson['pictures'];
|
||||||
|
loadinput(data);
|
||||||
|
loadcheckbox(data);
|
||||||
|
loadradio(data);
|
||||||
|
loadvehicle(vehicle);
|
||||||
|
loadpurchase(purchase);
|
||||||
|
loadrecommendation(rcm);
|
||||||
|
loadpictures(pic);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadinput(data)
|
||||||
|
{
|
||||||
|
//general location
|
||||||
|
$('#province').val(data.province);
|
||||||
|
$('#kota').val(data.kota);
|
||||||
|
//company details
|
||||||
|
$('#sos').val(data.sender);
|
||||||
|
$('#cust_name').val(data.customer);
|
||||||
|
//addr n phone
|
||||||
|
$('#head_address').val(data.head_address);
|
||||||
|
$('#head_phone').val(data.head_phone);
|
||||||
|
$('#branch_address').val(data.branch_address);
|
||||||
|
$('#branch_phone').val(data.branch_phone);
|
||||||
|
//contact person
|
||||||
|
$('#cp_name').val(data.cp_name);
|
||||||
|
$('#cp_phone').val(data.cp_phone);
|
||||||
|
//destination
|
||||||
|
$('#destination').val(data.destination);
|
||||||
|
|
||||||
|
$('#road_condition_good').val(data.road_condition_good);
|
||||||
|
$('#road_condition_toll').val(data.road_condition_toll);
|
||||||
|
$('#road_condition_bad').val(data.road_condition_bad);
|
||||||
|
$('#road_condition_other').val(data.road_condition_other);
|
||||||
|
|
||||||
|
$('#mileage_front').val(data.mileage_front);
|
||||||
|
$('#mileage_rear').val(data.mileage_rear);
|
||||||
|
|
||||||
|
$('#psi_front').val(data.psi_front);
|
||||||
|
$('#psi_rear').val(data.psi_rear);
|
||||||
|
$('#otr').val(data.otr);
|
||||||
|
|
||||||
|
$("textarea#mileage_detail").val(data.mileage_detail);
|
||||||
|
$('textarea#problem').val(data.problem);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadcheckbox(data)
|
||||||
|
{
|
||||||
|
//nature bisnis
|
||||||
|
var nb = data.nature_bisnis;
|
||||||
|
var arr_nb = nb.split(',');
|
||||||
|
var list_nb = "Expedition, Bus, Minning, Loging, Cement, Bulk, Container";
|
||||||
|
for (var i = 0; i < arr_nb.length; i++) {
|
||||||
|
var teks = arr_nb[i];
|
||||||
|
var patt = new RegExp(arr_nb[i]);
|
||||||
|
//alert(teks);
|
||||||
|
if (patt.test(list_nb))
|
||||||
|
{
|
||||||
|
$("input[value='"+teks+"']").prop("checked", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//loads
|
||||||
|
var ld = data.loads;
|
||||||
|
var arr_ld = ld.split(',');
|
||||||
|
var list_ld = "Materials, Passenger, Goods, Soil, General Cargo";
|
||||||
|
for (var i = 0; i < arr_ld.length; i++) {
|
||||||
|
var teks = arr_ld[i];
|
||||||
|
var patt = new RegExp(teks);
|
||||||
|
if (patt.test(list_ld))
|
||||||
|
{
|
||||||
|
$("input[value='"+teks+"']").prop("checked", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("input[name=vdCb_6]").val(teks);
|
||||||
|
$("input[name=vdCb_6]").prop("checked", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//tyre brands
|
||||||
|
var br = data.tire_brands;
|
||||||
|
var arr_br = br.split(',');
|
||||||
|
var list_ld = "MRF, Goodyear, Bridgestone, GT, Dunlop, Chinese, Kumho, Hankook, Ceat, Thai, Maxxis, Chengsin, Epco, Swallow, ChaoYang";
|
||||||
|
for (var i = 0; i < arr_br.length; i++) {
|
||||||
|
var teks = arr_br[i];
|
||||||
|
var patt = new RegExp(arr_br[i]);
|
||||||
|
if (patt.test(list_ld))
|
||||||
|
{
|
||||||
|
$("input[value='"+teks+"']").prop("checked", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//type purchase
|
||||||
|
var tp = data.tire_purchases;
|
||||||
|
var tp1 = new RegExp('New Tyre');
|
||||||
|
var tp2 = new RegExp('Retreads');
|
||||||
|
if (tp1.test(tp))$("input[name='tpCb2_1']").prop("checked", true);
|
||||||
|
if (tp2.test(tp))$("input[name='tpCb2_2']").prop("checked", true);
|
||||||
|
|
||||||
|
//type
|
||||||
|
var ti = data.tire_types;
|
||||||
|
var ti1 = new RegExp('Rib');
|
||||||
|
var ti2 = new RegExp('Lug');
|
||||||
|
var ti3 = new RegExp('Bias');
|
||||||
|
var ti4 = new RegExp('Radial');
|
||||||
|
var ti5 = new RegExp('Mix');
|
||||||
|
if (ti1.test(ti))$("input[name='tpCb3_1']").prop("checked", true);
|
||||||
|
if (ti2.test(ti))$("input[name='tpCb3_2']").prop("checked", true);
|
||||||
|
if (ti3.test(ti))$("input[name='tpCb3_3']").prop("checked", true);
|
||||||
|
if (ti4.test(ti))$("input[name='tpCb3_4']").prop("checked", true);
|
||||||
|
if (ti5.test(ti))$("input[name='tpCb3_5']").prop("checked", true);
|
||||||
|
|
||||||
|
//front method
|
||||||
|
var fm = data.condition_front;
|
||||||
|
var fm1 = new RegExp('New Tyre');
|
||||||
|
var fm2 = new RegExp('Retreads');
|
||||||
|
if (fm1.test(fm))$("input[name='cb31']").prop("checked", true);
|
||||||
|
if (fm2.test(fm))$("input[name='cb32']").prop("checked", true);
|
||||||
|
|
||||||
|
//rear method
|
||||||
|
var rm = data.condition_rear;
|
||||||
|
var rm1 = new RegExp('New Tyre');
|
||||||
|
var rm2 = new RegExp('Retreads');
|
||||||
|
if (rm1.test(rm))$("input[name='cb41']").prop("checked", true);
|
||||||
|
if (rm2.test(rm))$("input[name='cb42']").prop("checked", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadradio(data)
|
||||||
|
{
|
||||||
|
$("input:radio[name=rbCd][value='"+data.visit_status+"']").prop('checked', true);
|
||||||
|
//$("input:radio[name=rbCd2][value='"+data.method+"']").prop('checked', true);
|
||||||
|
$("input:radio[name=trRb][value='"+data.mileage_method+"']").prop('checked', true);
|
||||||
|
$("input:radio[name=trRb2][value='"+data.purchase_method+"']").prop('checked', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadvehicle(vehicle)
|
||||||
|
{
|
||||||
|
var a = vehicle.length;
|
||||||
|
//var b = vehicle[3];
|
||||||
|
//alert(JSON.stringify(b));
|
||||||
|
for (var i = 0; i < a; i++) {
|
||||||
|
if (vehicle[i]['category'].toLowerCase()=='truck')
|
||||||
|
{
|
||||||
|
if (vehicle[i]['type'].toLowerCase()=='light')
|
||||||
|
{
|
||||||
|
if (vehicle[i]['total_tire']=='4')
|
||||||
|
{
|
||||||
|
$("input[name=vdTr4]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdTr4wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='6')
|
||||||
|
{
|
||||||
|
$("input[name=vdTr6]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdTr6wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='10')
|
||||||
|
{
|
||||||
|
$("input[name=vdTr10]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdTr10wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (vehicle[i]['type'].toLowerCase()=='normal')
|
||||||
|
{
|
||||||
|
if (vehicle[i]['total_tire']=='6')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt6]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt6wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='8')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt8]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt8wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='10')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt10]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt10wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='12')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt12]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt12wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='14')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt14]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt14wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='18')
|
||||||
|
{
|
||||||
|
$("input[name=vdLt18]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLt18wt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
if (vehicle[i]['total_tire']=='-1')
|
||||||
|
{
|
||||||
|
$("input[name=vdLtot]").val(vehicle[i]['qty']);
|
||||||
|
$("input[name=vdLtotwt]").val(vehicle[i]['load_weight']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadpurchase(purchase)
|
||||||
|
{
|
||||||
|
//alert(purchase.length);
|
||||||
|
for (var i=0;i<purchase.length;i++)
|
||||||
|
{
|
||||||
|
if(purchase[i]['brand']=='MRF')
|
||||||
|
{
|
||||||
|
var a = "<div class='MRF"+i+"'>"
|
||||||
|
+"<input class='span3' type='text' name='pattern[]' value='"+purchase[i]['pattern']+"' disabled>"
|
||||||
|
+"<input class='span3' type='text' name='size[]' value='"+purchase[i]['size']+"' disabled>"
|
||||||
|
+"<input class='span3' type='text' name='qty[]' value='"+purchase[i]['qty']+"' disabled>"
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('#MRFtype');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var a = "<div class='Other"+i+"'>"
|
||||||
|
+"<input class='span3' type='text' name='pattern[]' value='"+purchase[i]['pattern']+"' disabled>"
|
||||||
|
+"<input class='span3' type='text' name='size[]' value='"+purchase[i]['size']+"' disabled>"
|
||||||
|
+"<input class='span3' type='text' name='qty[]' value='"+purchase[i]['qty']+"' disabled>"
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('#Othertype');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
var a = "<div class='MRF0'>"
|
||||||
|
+"<input class='span3' id='MRF00' type='text' name='pattern[]' placeholder='pattern'>"
|
||||||
|
+"<input class='span3' id='MRF01' type='text' name='size[]' placeholder='size'>"
|
||||||
|
+"<input class='span3' id='MRF02' type='text' name='qty[]' placeholder='qty'>"
|
||||||
|
+"</div>";
|
||||||
|
$(a).appendTo('#MRFtype');
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadrecommendation(rcm)
|
||||||
|
{
|
||||||
|
if(rcm=='')
|
||||||
|
{
|
||||||
|
$('#space').css('display','block');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#space').css('display','none');
|
||||||
|
for (var i=0;i<rcm.length;i++)
|
||||||
|
{
|
||||||
|
var a = "<div style='margin-bottom:10px;'>"
|
||||||
|
+"<input class='span3' style='margin-right:10px;' type='text' name='pattern[]' value='"+rcm[i]['pattern']+"' disabled>"
|
||||||
|
+"<input class='span3' style='margin-right:10px;' type='text' name='size[]' value='"+rcm[i]['size']+"' disabled>"
|
||||||
|
+"<input class='span3' style='margin-right:10px;' type='text' name='qty[]' value='"+rcm[i]['remark']+"' disabled>"
|
||||||
|
+"</div>";
|
||||||
|
$(a).prependTo('#recommendation');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadpictures(pic)
|
||||||
|
{
|
||||||
|
if (pic=='')
|
||||||
|
{
|
||||||
|
$('#nopic').css('display','block');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#nopic').css('display','none');
|
||||||
|
for (var i=0;i<pic.length;i++)
|
||||||
|
{
|
||||||
|
var a = "<img src='"+pic[i]+"' style='border:inset 1px;'>";
|
||||||
|
$(a).prependTo('#gambar');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//fungsi untuk enable edit form
|
||||||
|
function edited()
|
||||||
|
{
|
||||||
|
$("#pending").hide();
|
||||||
|
$("#saved").hide();
|
||||||
|
$("#edit").show();
|
||||||
|
$(":input").prop("disabled", false);
|
||||||
|
//$("form").attr('action','<?php echo base_url(); ?>form/updateform/<?php echo $form->id; ?>');
|
||||||
|
}
|
||||||
|
|
||||||
|
//fungsi cek inputan user
|
||||||
|
function isNumberKey(evt)
|
||||||
|
{
|
||||||
|
var charCode = (evt.which) ? evt.which : event.keyCode
|
||||||
|
if (charCode > 31 && (charCode < 48 || charCode > 57))
|
||||||
|
{
|
||||||
|
alert('Number Only');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
7
asset/js/jquery.maskedinput.min.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
Masked Input plugin for jQuery
|
||||||
|
Copyright (c) 2007-2013 Josh Bush (digitalbush.com)
|
||||||
|
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||||
|
Version: 1.3.1
|
||||||
|
*/
|
||||||
|
(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++<a.length;)if(n=a.charAt(pos-1),s[t].test(n)){R[t]=n,i=t;break}if(pos>a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery);
|
50
asset/sliderform/jquery.slideto.v1.1.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* jQuery SlideTo Plugin (version 1.0)
|
||||||
|
*
|
||||||
|
* @copyright Jesse Price <jesseprice.com>
|
||||||
|
* @description Animate slide scroll to effects to specific elements in the document
|
||||||
|
*
|
||||||
|
* @license Licensed under the MIT license:
|
||||||
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Create closure
|
||||||
|
(function($) {
|
||||||
|
$.fn.slideto = function(options) {
|
||||||
|
var opts = $.extend({}, $.fn.slideto.defaults, options);
|
||||||
|
var elem = (this.length > 0) ? this : 'a';
|
||||||
|
// Element instance specific actions
|
||||||
|
$(elem).each(function() {
|
||||||
|
var e = $(this);
|
||||||
|
var o = $.meta ? $.extend({}, opts, e.data()) : opts;
|
||||||
|
var url = $(e).attr("href");
|
||||||
|
var anchor = '';
|
||||||
|
if(url && url.indexOf("#") != -1 && url.indexOf("#") == 0) {
|
||||||
|
var pieces = url.split("#",2);
|
||||||
|
anchor = $("a[name='"+pieces[1]+"']");
|
||||||
|
$(this).attr('href', 'javascript:void(0);');
|
||||||
|
} else
|
||||||
|
anchor = $(o.target);
|
||||||
|
|
||||||
|
$(e).bind('click', function(){
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: anchor.offset().top,
|
||||||
|
scrollLeft: anchor.offset().left
|
||||||
|
}, o.speed);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Allow jQuery chaining
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin Options
|
||||||
|
* ---------------------------------------------------------------------
|
||||||
|
* Overwrite the default options? Go for it!
|
||||||
|
*/
|
||||||
|
$.fn.slideto.defaults = {
|
||||||
|
target : false, // Where to scroll? If it's false, we use the "scroll attribute"
|
||||||
|
speed : 1500 // slow, medium, fast, numeric microseconds
|
||||||
|
}
|
||||||
|
})(jQuery);
|
154
asset/sliderform/sliding.form.js
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
$(function() {
|
||||||
|
/*
|
||||||
|
number of fieldsets
|
||||||
|
*/
|
||||||
|
var fieldsetCount = $('#formElem').children().length;
|
||||||
|
|
||||||
|
/*
|
||||||
|
current position of fieldset / navigation link
|
||||||
|
*/
|
||||||
|
var current = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
sum and save the widths of each one of the fieldsets
|
||||||
|
set the final sum as the total width of the steps element
|
||||||
|
*/
|
||||||
|
var stepsWidth = 0;
|
||||||
|
var widths = new Array();
|
||||||
|
$('#steps .step').each(function(i){
|
||||||
|
var $step = $(this);
|
||||||
|
widths[i] = stepsWidth;
|
||||||
|
stepsWidth += $step.width();
|
||||||
|
});
|
||||||
|
$('#steps').width(stepsWidth);
|
||||||
|
|
||||||
|
/*
|
||||||
|
to avoid problems in IE, focus the first input of the form
|
||||||
|
*/
|
||||||
|
$('#formElem').children(':first').find(':input:first').focus();
|
||||||
|
|
||||||
|
/*
|
||||||
|
show the navigation bar
|
||||||
|
*/
|
||||||
|
$('#navigation').show();
|
||||||
|
|
||||||
|
/*
|
||||||
|
when clicking on a navigation link
|
||||||
|
the form slides to the corresponding fieldset
|
||||||
|
*/
|
||||||
|
$('#navigation a').bind('click',function(e){
|
||||||
|
var $this = $(this);
|
||||||
|
var prev = current;
|
||||||
|
$this.closest('ul').find('li').removeClass('selected');
|
||||||
|
$this.parent().addClass('selected');
|
||||||
|
/*
|
||||||
|
we store the position of the link
|
||||||
|
in the current variable
|
||||||
|
*/
|
||||||
|
current = $this.parent().index() + 1;
|
||||||
|
/*
|
||||||
|
animate / slide to the next or to the corresponding
|
||||||
|
fieldset. The order of the links in the navigation
|
||||||
|
is the order of the fieldsets.
|
||||||
|
Also, after sliding, we trigger the focus on the first
|
||||||
|
input element of the new fieldset
|
||||||
|
If we clicked on the last link (confirmation), then we validate
|
||||||
|
all the fieldsets, otherwise we validate the previous one
|
||||||
|
before the form slided
|
||||||
|
*/
|
||||||
|
$('#steps').stop().animate({
|
||||||
|
marginLeft: '-' + widths[current-1] + 'px'
|
||||||
|
},500,function(){
|
||||||
|
if(current == fieldsetCount)
|
||||||
|
validateSteps();
|
||||||
|
else
|
||||||
|
validateStep(prev);
|
||||||
|
$('#formElem').children(':nth-child('+ parseInt(current) +')').find(':input:first').focus();
|
||||||
|
});
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
clicking on the tab (on the last input of each fieldset), makes the form
|
||||||
|
slide to the next step
|
||||||
|
*/
|
||||||
|
$('#formElem > fieldset').each(function(){
|
||||||
|
var $fieldset = $(this);
|
||||||
|
$fieldset.children(':last').find(':input').keydown(function(e){
|
||||||
|
if (e.which == 9){
|
||||||
|
$('#navigation li:nth-child(' + (parseInt(current)+1) + ') a').click();
|
||||||
|
/* force the blur for validation */
|
||||||
|
$(this).blur();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var $fieldset = $(this);
|
||||||
|
$fieldset.children(':last').find('#nextb').keydown(function(e){
|
||||||
|
if (e.which == 9){
|
||||||
|
$('#navigation li:nth-child(' + (parseInt(current)+1) + ') a').click();
|
||||||
|
/* force the blur for validation */
|
||||||
|
$(this).blur();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
validates errors on all the fieldsets
|
||||||
|
records if the Form has errors in $('#formElem').data()
|
||||||
|
*/
|
||||||
|
function validateSteps(){
|
||||||
|
var FormErrors = false;
|
||||||
|
for(var i = 1; i < fieldsetCount; ++i){
|
||||||
|
var error = validateStep(i);
|
||||||
|
if(error == -1)
|
||||||
|
FormErrors = true;
|
||||||
|
}
|
||||||
|
$('#formElem').data('errors',FormErrors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
validates one fieldset
|
||||||
|
and returns -1 if errors found, or 1 if not
|
||||||
|
*/
|
||||||
|
function validateStep(step){
|
||||||
|
if(step == fieldsetCount) return;
|
||||||
|
|
||||||
|
var error = 1;
|
||||||
|
var hasError = false;
|
||||||
|
$('#formElem').children(':nth-child('+ parseInt(step) +')').find(':input:not(button)').each(function(){
|
||||||
|
var $this = $(this);
|
||||||
|
var valueLength = jQuery.trim($this.val()).length;
|
||||||
|
|
||||||
|
if(valueLength == ''){
|
||||||
|
hasError = true;
|
||||||
|
$this.css('background-color','#FFEDEF');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this.css('background-color','#FFFFFF');
|
||||||
|
});
|
||||||
|
var $link = $('#navigation li:nth-child(' + parseInt(step) + ') a');
|
||||||
|
$link.parent().find('.error,.checked').remove();
|
||||||
|
|
||||||
|
var valclass = 'checked';
|
||||||
|
if(hasError){
|
||||||
|
error = -1;
|
||||||
|
valclass = 'error';
|
||||||
|
}
|
||||||
|
$('<span class="'+valclass+'"></span>').insertAfter($link);
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if there are errors don't allow the user to submit
|
||||||
|
*/
|
||||||
|
$('#registerButton').bind('click',function(){
|
||||||
|
if($('#formElem').data('errors')){
|
||||||
|
alert('Please correct the errors in the Form');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
152
asset/sliderform/style.css
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
|
||||||
|
body{
|
||||||
|
font-size:10px;
|
||||||
|
background: #fff;
|
||||||
|
font-family:"Century Gothic", Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper{
|
||||||
|
-moz-box-shadow:0px 0px 3px #aaa;
|
||||||
|
-webkit-box-shadow:0px 0px 3px #aaa;
|
||||||
|
box-shadow:0px 0px 3px #aaa;
|
||||||
|
-moz-border-radius:10px;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
border-radius:10px;
|
||||||
|
border:2px solid #fff;
|
||||||
|
background-color:#f9f9f9;
|
||||||
|
width:700px;
|
||||||
|
overflow:hidden;
|
||||||
|
padding:20px;
|
||||||
|
padding-left:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step{
|
||||||
|
float:left;
|
||||||
|
width:720px;
|
||||||
|
height:800px;
|
||||||
|
max-height:auto;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#steps form fieldset{
|
||||||
|
border:none;
|
||||||
|
padding-bottom:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#steps{
|
||||||
|
width:720px;
|
||||||
|
height:auto;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#steps form legend{
|
||||||
|
text-align:left;
|
||||||
|
background-color:#f0f0f0;
|
||||||
|
color:#666;
|
||||||
|
font-size:24px;
|
||||||
|
text-shadow:1px 1px 1px #fff;
|
||||||
|
font-weight:bold;
|
||||||
|
float:left;
|
||||||
|
width:700px;
|
||||||
|
padding:5px 0px 5px 10px;
|
||||||
|
margin:10px 0px;
|
||||||
|
border-bottom:1px solid #fff;
|
||||||
|
border-top:1px solid #d9d9d9;
|
||||||
|
}
|
||||||
|
#steps form p{
|
||||||
|
float:left;
|
||||||
|
clear:both;
|
||||||
|
margin:5px 0px;
|
||||||
|
background-color:#f4f4f4;
|
||||||
|
border:1px solid #fff;
|
||||||
|
padding:10px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-moz-box-shadow:0px 0px 3px #aaa;
|
||||||
|
-webkit-box-shadow:0px 0px 3px #aaa;
|
||||||
|
box-shadow:0px 0px 3px #aaa;
|
||||||
|
}
|
||||||
|
#steps form p label{
|
||||||
|
float:left;
|
||||||
|
line-height:26px;
|
||||||
|
color:#666;
|
||||||
|
text-shadow:1px 1px 1px #fff;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
form input{
|
||||||
|
margin-right:10px;
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
||||||
|
#steps form input:not([type=radio]),
|
||||||
|
#steps form textarea,
|
||||||
|
#steps form select{
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
outline: none;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
#steps form input:focus{
|
||||||
|
-moz-box-shadow:0px 0px 3px #aaa;
|
||||||
|
-webkit-box-shadow:0px 0px 3px #aaa;
|
||||||
|
box-shadow:0px 0px 3px #aaa;
|
||||||
|
background-color:#FFFEEF;
|
||||||
|
}
|
||||||
|
#steps form p.submit{
|
||||||
|
background:none;
|
||||||
|
border:none;
|
||||||
|
-moz-box-shadow:none;
|
||||||
|
-webkit-box-shadow:none;
|
||||||
|
box-shadow:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* navigation*/
|
||||||
|
|
||||||
|
#navigation ul{
|
||||||
|
list-style:none;
|
||||||
|
position:fixed;
|
||||||
|
width:280px;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
border-radius:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigation ul li{
|
||||||
|
/*border-top:1px solid #ccc;*/
|
||||||
|
border-bottom:1px solid #ccc;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
#navigation ul li a{
|
||||||
|
display:block;
|
||||||
|
/*background-color:#444;*/
|
||||||
|
width:85%;
|
||||||
|
color:#777;
|
||||||
|
outline:none;
|
||||||
|
font-weight:bold;
|
||||||
|
text-decoration:none;
|
||||||
|
line-height:45px;
|
||||||
|
padding:0px 20px;
|
||||||
|
border-right:1px solid #fff;
|
||||||
|
border-left:1px solid #fff;
|
||||||
|
}
|
||||||
|
#navigation ul li a:hover,
|
||||||
|
#navigation ul li.selected a{
|
||||||
|
background:#66CCCC;
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
#navigation ul li a:hover{
|
||||||
|
background:#CDFFFF;
|
||||||
|
color:#000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.test #navigation ul{
|
||||||
|
position: static;
|
||||||
|
width: auto;
|
||||||
|
top: 0;
|
||||||
|
padding:0;
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
11363
asset/slimscroll/jquery-ui.js
vendored
Normal file
15
asset/slimscroll/jquery.slimscroll.min.js
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||||
|
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||||
|
*
|
||||||
|
* Version: 1.1.1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function(f){jQuery.fn.extend({slimScroll:function(l){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200},l);this.each(function(){function r(d){if(n){d=d||window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/
|
||||||
|
120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget).closest("."+a.wrapperClass).is(b.parent())&&g(c,!0);d.preventDefault&&!p&&d.preventDefault();p||(d.returnValue=!1)}}function g(d,f,h){var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));j=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());e=j*(b[0].scrollHeight-b.outerHeight());h&&(e=d,d=e/b[0].scrollHeight*
|
||||||
|
b.outerHeight(),d=Math.min(Math.max(d,0),g),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);s();m()}function A(){window.addEventListener?(this.addEventListener("DOMMouseScroll",r,!1),this.addEventListener("mousewheel",r,!1)):document.attachEvent("onmousewheel",r)}function t(){q=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),B);c.css({height:q+"px"});var a=q==b.outerHeight()?"none":"block";c.css({display:a})}function s(){t();clearTimeout(w);j==~~j&&(p=a.allowPageScroll,
|
||||||
|
x!=j&&b.trigger("slimscroll",0==~~j?"top":"bottom"));x=j;q>=b.outerHeight()?p=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function m(){a.alwaysVisible||(w=setTimeout(function(){if((!a.disableFadeOut||!n)&&!u&&!v)c.fadeOut("slow"),h.fadeOut("slow")},1E3))}var n,u,v,w,y,q,j,x,B=30,p=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var k=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass);t();if(f.isPlainObject(l)){if("scrollTo"in l)k=
|
||||||
|
parseInt(a.scrollTo);else if("scrollBy"in l)k+=parseInt(a.scrollBy);else if("destroy"in l){c.remove();h.remove();b.unwrap();return}g(k,!1,!0)}}else{a.height="auto"==a.height?b.parent().innerHeight():a.height;k=f("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&
|
||||||
|
a.railVisible?"block":"none","border-radius":a.size,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.size,BorderRadius:a.size,MozBorderRadius:a.size,WebkitBorderRadius:a.size,zIndex:99}),z="right"==a.position?{right:a.distance}:{left:a.distance};h.css(z);c.css(z);b.wrap(k);b.parent().append(c);b.parent().append(h);
|
||||||
|
a.railDraggable&&c.draggable({axis:"y",containment:"parent",start:function(){v=!0},stop:function(){v=!1;m()},drag:function(){g(0,f(this).position().top,!1)}});h.hover(function(){s()},function(){m()});c.hover(function(){u=!0},function(){u=!1});b.hover(function(){n=!0;s();m()},function(){n=!1;m()});b.bind("touchstart",function(a){a.originalEvent.touches.length&&(y=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){b.originalEvent.preventDefault();b.originalEvent.touches.length&&g((y-
|
||||||
|
b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0)});"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),g(0,!0)):"top"!==a.start&&(g(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());A();t()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
|
577
asset/tablesorter/demo_table.css
Normal file
@ -0,0 +1,577 @@
|
|||||||
|
/*
|
||||||
|
* File: demo_table.css
|
||||||
|
* CVS: $Id$
|
||||||
|
* Description: CSS descriptions for DataTables demo pages
|
||||||
|
* Author: Allan Jardine
|
||||||
|
* Created: Tue May 12 06:47:22 BST 2009
|
||||||
|
* Modified: $Date$ by $Author$
|
||||||
|
* Language: CSS
|
||||||
|
* Project: DataTables
|
||||||
|
*
|
||||||
|
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* ***************************************************************************
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* The styles given here are suitable for the demos that are used with the standard DataTables
|
||||||
|
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
||||||
|
* meet the layout requirements of your site.
|
||||||
|
*
|
||||||
|
* Common issues:
|
||||||
|
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
||||||
|
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
||||||
|
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
||||||
|
* modify that selector.
|
||||||
|
* Note that the path used for Images is relative. All images are by default located in
|
||||||
|
* ../images/ - relative to this CSS file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* DataTables features
|
||||||
|
*/
|
||||||
|
|
||||||
|
.dataTables_wrapper {
|
||||||
|
position: relative;
|
||||||
|
clear: both;
|
||||||
|
zoom: 1; /* Feeling sorry for IE */
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_processing {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 250px;
|
||||||
|
height: 30px;
|
||||||
|
margin-left: -125px;
|
||||||
|
margin-top: -15px;
|
||||||
|
padding: 14px 0 2px 0;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_length {
|
||||||
|
width: 40%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_filter {
|
||||||
|
width: 50%;
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_info {
|
||||||
|
width: 60%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_paginate {
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pagination nested */
|
||||||
|
.paginate_disabled_previous, .paginate_enabled_previous,
|
||||||
|
.paginate_disabled_next, .paginate_enabled_next {
|
||||||
|
height: 19px;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
*cursor: hand;
|
||||||
|
color: #111 !important;
|
||||||
|
}
|
||||||
|
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
|
||||||
|
.paginate_disabled_next:hover, .paginate_enabled_next:hover {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
.paginate_disabled_previous:active, .paginate_enabled_previous:active,
|
||||||
|
.paginate_disabled_next:active, .paginate_enabled_next:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginate_disabled_previous,
|
||||||
|
.paginate_disabled_next {
|
||||||
|
color: #666 !important;
|
||||||
|
}
|
||||||
|
.paginate_disabled_previous, .paginate_enabled_previous {
|
||||||
|
padding-left: 23px;
|
||||||
|
}
|
||||||
|
.paginate_disabled_next, .paginate_enabled_next {
|
||||||
|
padding-right: 23px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginate_disabled_previous {
|
||||||
|
background: url('images/back_disabled.png') no-repeat top left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginate_enabled_previous {
|
||||||
|
background: url('images/back_enabled.png') no-repeat top left;
|
||||||
|
}
|
||||||
|
.paginate_enabled_previous:hover {
|
||||||
|
background: url('images/back_enabled_hover.png') no-repeat top left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginate_disabled_next {
|
||||||
|
background: url('images/forward_disabled.png') no-repeat top right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paginate_enabled_next {
|
||||||
|
background: url('images/forward_enabled.png') no-repeat top right;
|
||||||
|
}
|
||||||
|
.paginate_enabled_next:hover {
|
||||||
|
background: url('images/forward_enabled_hover.png') no-repeat top right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* DataTables display
|
||||||
|
*/
|
||||||
|
table.display {
|
||||||
|
margin: 0 auto;
|
||||||
|
clear: both;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
/* Note Firefox 3.5 and before have a bug with border-collapse
|
||||||
|
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
|
||||||
|
* border-spacing: 0; is one possible option. Conditional-css.com is
|
||||||
|
* useful for this kind of thing
|
||||||
|
*
|
||||||
|
* Further note IE 6/7 has problems when calculating widths with border width.
|
||||||
|
* It subtracts one px relative to the other browsers from the first column, and
|
||||||
|
* adds one to the end...
|
||||||
|
*
|
||||||
|
* If you want that effect I'd suggest setting a border-top/left on th/td's and
|
||||||
|
* then filling in the gaps with other borders.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display thead th {
|
||||||
|
padding: 3px 18px 3px 10px;
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
* cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tfoot th {
|
||||||
|
padding: 3px 18px 3px 10px;
|
||||||
|
border-top: 1px solid black;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.heading2 td {
|
||||||
|
border-bottom: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display td {
|
||||||
|
padding: 3px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display td.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* DataTables sorting
|
||||||
|
*/
|
||||||
|
|
||||||
|
.sorting_asc {
|
||||||
|
background: url('images/sort_asc.png') no-repeat center right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sorting_desc {
|
||||||
|
background: url('images/sort_desc.png') no-repeat center right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sorting {
|
||||||
|
background: url('images/sort_both.png') no-repeat center right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sorting_asc_disabled {
|
||||||
|
background: url('images/sort_asc_disabled.png') no-repeat center right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sorting_desc_disabled {
|
||||||
|
background: url('images/sort_desc_disabled.png') no-repeat center right;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display thead th:active,
|
||||||
|
table.display thead td:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* DataTables row classes
|
||||||
|
*/
|
||||||
|
table.display tr.odd.gradeA {
|
||||||
|
background-color: #ddffdd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.even.gradeA {
|
||||||
|
background-color: #eeffee;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.odd.gradeC {
|
||||||
|
background-color: #ddddff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.even.gradeC {
|
||||||
|
background-color: #eeeeff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.odd.gradeX {
|
||||||
|
background-color: #ffdddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.even.gradeX {
|
||||||
|
background-color: #ffeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.odd.gradeU {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.even.gradeU {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tr.odd {
|
||||||
|
background-color: #E2E4FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* Misc
|
||||||
|
*/
|
||||||
|
.dataTables_scroll {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody {
|
||||||
|
*margin-top: -1px;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top, .bottom {
|
||||||
|
padding: 15px;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top .dataTables_info {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_empty {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
tfoot input {
|
||||||
|
margin: 0.5em 0;
|
||||||
|
width: 100%;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
tfoot input.search_init {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.group {
|
||||||
|
background-color: #d1cfd0;
|
||||||
|
border-bottom: 2px solid #A19B9E;
|
||||||
|
border-top: 2px solid #A19B9E;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.details {
|
||||||
|
background-color: #d1cfd0;
|
||||||
|
border: 2px solid #A19B9E;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.example_alt_pagination div.dataTables_info {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers {
|
||||||
|
width: 400px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a:active {
|
||||||
|
outline: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a.paginate_button,
|
||||||
|
.paging_full_numbers a.paginate_active {
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
margin: 0 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
*cursor: hand;
|
||||||
|
color: #333 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a.paginate_button {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a.paginate_button:hover {
|
||||||
|
background-color: #ccc;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paging_full_numbers a.paginate_active {
|
||||||
|
background-color: #99B3FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.even.row_selected td {
|
||||||
|
background-color: #B0BED9;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.odd.row_selected td {
|
||||||
|
background-color: #9FAFD1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sorting classes for columns
|
||||||
|
*/
|
||||||
|
/* For the standard odd/even */
|
||||||
|
tr.odd td.sorting_1 {
|
||||||
|
background-color: #D3D6FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd td.sorting_2 {
|
||||||
|
background-color: #DADCFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd td.sorting_3 {
|
||||||
|
background-color: #E0E2FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even td.sorting_1 {
|
||||||
|
background-color: #EAEBFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even td.sorting_2 {
|
||||||
|
background-color: #F2F3FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even td.sorting_3 {
|
||||||
|
background-color: #F9F9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* For the Conditional-CSS grading rows */
|
||||||
|
/*
|
||||||
|
Colour calculations (based off the main row colours)
|
||||||
|
Level 1:
|
||||||
|
dd > c4
|
||||||
|
ee > d5
|
||||||
|
Level 2:
|
||||||
|
dd > d1
|
||||||
|
ee > e2
|
||||||
|
*/
|
||||||
|
tr.odd.gradeA td.sorting_1 {
|
||||||
|
background-color: #c4ffc4;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeA td.sorting_2 {
|
||||||
|
background-color: #d1ffd1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeA td.sorting_3 {
|
||||||
|
background-color: #d1ffd1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeA td.sorting_1 {
|
||||||
|
background-color: #d5ffd5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeA td.sorting_2 {
|
||||||
|
background-color: #e2ffe2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeA td.sorting_3 {
|
||||||
|
background-color: #e2ffe2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeC td.sorting_1 {
|
||||||
|
background-color: #c4c4ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeC td.sorting_2 {
|
||||||
|
background-color: #d1d1ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeC td.sorting_3 {
|
||||||
|
background-color: #d1d1ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeC td.sorting_1 {
|
||||||
|
background-color: #d5d5ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeC td.sorting_2 {
|
||||||
|
background-color: #e2e2ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeC td.sorting_3 {
|
||||||
|
background-color: #e2e2ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeX td.sorting_1 {
|
||||||
|
background-color: #ffc4c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeX td.sorting_2 {
|
||||||
|
background-color: #ffd1d1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeX td.sorting_3 {
|
||||||
|
background-color: #ffd1d1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeX td.sorting_1 {
|
||||||
|
background-color: #ffd5d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeX td.sorting_2 {
|
||||||
|
background-color: #ffe2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeX td.sorting_3 {
|
||||||
|
background-color: #ffe2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeU td.sorting_1 {
|
||||||
|
background-color: #c4c4c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeU td.sorting_2 {
|
||||||
|
background-color: #d1d1d1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.odd.gradeU td.sorting_3 {
|
||||||
|
background-color: #d1d1d1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeU td.sorting_1 {
|
||||||
|
background-color: #d5d5d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeU td.sorting_2 {
|
||||||
|
background-color: #e2e2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even.gradeU td.sorting_3 {
|
||||||
|
background-color: #e2e2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Row highlighting example
|
||||||
|
*/
|
||||||
|
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||||
|
background-color: #ECFFB3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
||||||
|
background-color: #E6FF99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.even:hover {
|
||||||
|
background-color: #ECFFB3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.even:hover td.sorting_1 {
|
||||||
|
background-color: #DDFF75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.even:hover td.sorting_2 {
|
||||||
|
background-color: #E7FF9E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.even:hover td.sorting_3 {
|
||||||
|
background-color: #E2FF89;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.odd:hover {
|
||||||
|
background-color: #E6FF99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.odd:hover td.sorting_1 {
|
||||||
|
background-color: #D6FF5C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.odd:hover td.sorting_2 {
|
||||||
|
background-color: #E0FF84;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ex_highlight_row #example tr.odd:hover td.sorting_3 {
|
||||||
|
background-color: #DBFF70;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KeyTable
|
||||||
|
*/
|
||||||
|
table.KeyTable td {
|
||||||
|
border: 3px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.KeyTable td.focus {
|
||||||
|
border: 3px solid #3366FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.gradeA {
|
||||||
|
background-color: #eeffee;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.gradeC {
|
||||||
|
background-color: #ddddff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.gradeX {
|
||||||
|
background-color: #ffdddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.display tr.gradeU {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.box {
|
||||||
|
height: 100px;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: auto;
|
||||||
|
border: 1px solid #8080FF;
|
||||||
|
background-color: #E5E5FF;
|
||||||
|
}
|
BIN
asset/tablesorter/images/Sorting icons.psd
Normal file
BIN
asset/tablesorter/images/back_disabled.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
asset/tablesorter/images/back_enabled.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
asset/tablesorter/images/back_enabled_hover.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
asset/tablesorter/images/favicon.ico
Normal file
After Width: | Height: | Size: 894 B |