first commit

This commit is contained in:
alazhar
2020-01-02 23:02:57 +07:00
commit 4599c79723
263 changed files with 84293 additions and 0 deletions

1
application/.htaccess Normal file
View File

@ -0,0 +1 @@
Deny from all

1
application/cache/.htaccess vendored Normal file
View File

@ -0,0 +1 @@
deny from all

10
application/cache/index.html vendored Normal file
View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View 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 */

View 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
)

View 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);
}
}

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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;
}
}
}

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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>

View 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>

View 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>

View 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>

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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
View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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');
}
}
}

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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();
}
}

View 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
View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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'>&times;</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
View 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 &raquo;</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>&nbsp&nbsp
<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>&nbsp&nbsp
<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>&copy; 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>

View 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'>&times;</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>

View 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 &raquo;</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>&nbsp&nbsp
<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>&nbsp&nbsp
<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>&copy; 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>

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View 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'>&times;</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>

View 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>

View 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>

View 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>

View 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>

View 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'>&times;</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 &nbsp &nbsp &nbsp
Pattern &nbsp &nbsp &nbsp
Size &nbsp &nbsp &nbsp
Qty
</strong>
</label>
<label>MRF &nbsp </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>&nbsp&nbsp
<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>&nbsp&nbsp
<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>&copy; 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>

View 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>

View 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 &raquo;</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>&nbsp&nbsp
<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>&nbsp&nbsp
<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 &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
&nbsp &nbsp Size &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 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>&copy; 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>