diff --git a/.gitignore b/.gitignore index 493397e..d5c394e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,11 @@ .project .settings/ .htaccess -*.xcf application/config/config.php application/config/database.php application/logs/* +application/cache/* +assets/cache/* uploads/* +*.xcf *.mo diff --git a/application/config/assets.php b/application/config/assets.php new file mode 100644 index 0000000..69fdba8 --- /dev/null +++ b/application/config/assets.php @@ -0,0 +1,27 @@ +'; $config['error_suffix'] = '

'; $config['created_field'] = 'created'; $config['updated_field'] = 'updated'; -$config['local_time'] = FALSE; -$config['unix_timestamp'] = FALSE; -$config['auto_transaction'] = FALSE; -$config['auto_populate_has_many'] = FALSE; -$config['auto_populate_has_one'] = FALSE; +$config['local_time'] = false; +$config['unix_timestamp'] = false; +$config['auto_transaction'] = false; +$config['auto_populate_has_many'] = false; +$config['auto_populate_has_one'] = false; /* End of file datamapper.php */ -/* Location: ./application/config/datamapper.php */ \ No newline at end of file +/* Location: ./application/config/datamapper.php */ diff --git a/application/config/doctypes.php b/application/config/doctypes.php index f7e1d19..ea937a4 100755 --- a/application/config/doctypes.php +++ b/application/config/doctypes.php @@ -1,15 +1,15 @@ - '', - 'xhtml1-strict' => '', - 'xhtml1-trans' => '', - 'xhtml1-frame' => '', - 'html5' => '', - 'html4-strict' => '', - 'html4-trans' => '', - 'html4-frame' => '' - ); + 'xhtml11' => '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => '' +); /* End of file doctypes.php */ -/* Location: ./application/config/doctypes.php */ \ No newline at end of file +/* Location: ./application/config/doctypes.php */ diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php index 14b0d73..ea36f9b 100755 --- a/application/config/foreign_chars.php +++ b/application/config/foreign_chars.php @@ -1,4 +1,4 @@ - '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' + '/ä|æ|ǽ/' => '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 */ \ No newline at end of file +/* Location: ./application/config/foreign_chars.php */ diff --git a/application/config/form_validation.php b/application/config/form_validation.php index fc41db1..5cb8bfd 100644 --- a/application/config/form_validation.php +++ b/application/config/form_validation.php @@ -1,4 +1,4 @@ - 'username', - 'label' => _('Username'), - 'rules' => 'required|trim', - ), - array( - 'field' => 'password', - 'label' => _('Password'), - 'rules' => 'required|trim', - ), - array( - 'field' => 'remember', - 'label' => _('Remember me on this computer'), - 'rules' => 'integer', - ), + array( + 'field' => 'username', + 'label' => _('Username'), + 'rules' => 'required|trim', + ), + array( + 'field' => 'password', + 'label' => _('Password'), + 'rules' => 'required|trim', + ), + array( + 'field' => 'remember', + 'label' => _('Remember me on this computer'), + 'rules' => 'integer', + ), ); /** @@ -29,49 +29,49 @@ $config['auth/login'] = array( * @var array */ $config['auth/forgot_password'] = array( - array( - 'field' => 'email', - 'label' => _('Email address'), - 'rules' => 'required|valid_email|trim', - ), + array( + 'field' => 'email', + 'label' => _('Email address'), + 'rules' => 'required|valid_email|trim', + ), ); /** -* Rules for the settings page. -* -* @var array -*/ + * Rules for the settings page. + * + * @var array + */ $config['auth/settings'] = array( - array( - 'field' => 'firstname', - 'label' => _('First name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'lastname', - 'label' => _('Last name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'email', - 'label' => _('Email address'), - 'rules' => 'required|valid_email|trim', - ), - array( - 'field' => 'institution', - 'label' => _('Institution'), - 'rules' => 'max_length[100]|trim', - ), - array( - 'field' => 'phone', - 'label' => _('Phone number'), - 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', - ), - array( - 'field' => 'new_password', - 'label' => _('New password'), - 'rules' => 'min_length[6]|matches[new_password_confirm]', - ), + array( + 'field' => 'firstname', + 'label' => _('First name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'lastname', + 'label' => _('Last name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'email', + 'label' => _('Email address'), + 'rules' => 'required|valid_email|trim', + ), + array( + 'field' => 'institution', + 'label' => _('Institution'), + 'rules' => 'max_length[100]|trim', + ), + array( + 'field' => 'phone', + 'label' => _('Phone number'), + 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', + ), + array( + 'field' => 'new_password', + 'label' => _('New password'), + 'rules' => 'min_length[6]|matches[new_password_confirm]', + ), ); /** @@ -80,46 +80,46 @@ $config['auth/settings'] = array( * @var array */ $config['users/create'] = array( - array( - 'field' => 'username', - 'label' => _('Username'), - 'rules' => 'required|min_length[4]|max_length[20]|unique[users.username]|trim', - ), - array( - 'field' => 'email', - 'label' => _('Email address'), - 'rules' => 'required|valid_email|trim', - ), - array( - 'field' => 'password', - 'label' => _('Password'), - 'rules' => 'required|min_length[6]|matches[password_confirm]', - ), - array( - 'field' => 'password_confirm', - 'label' => _('Confirm password'), - 'rules' => 'required', - ), - array( - 'field' => 'firstname', - 'label' => _('First name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'lastname', - 'label' => _('Last name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'institution', - 'label' => _('Institution'), - 'rules' => 'max_length[100]|trim', - ), - array( - 'field' => 'phone', - 'label' => _('Phone number'), - 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', - ), + array( + 'field' => 'username', + 'label' => _('Username'), + 'rules' => 'required|min_length[4]|max_length[20]|unique[users.username]|trim', + ), + array( + 'field' => 'email', + 'label' => _('Email address'), + 'rules' => 'required|valid_email|trim', + ), + array( + 'field' => 'password', + 'label' => _('Password'), + 'rules' => 'required|min_length[6]|matches[password_confirm]', + ), + array( + 'field' => 'password_confirm', + 'label' => _('Confirm password'), + 'rules' => 'required', + ), + array( + 'field' => 'firstname', + 'label' => _('First name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'lastname', + 'label' => _('Last name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'institution', + 'label' => _('Institution'), + 'rules' => 'max_length[100]|trim', + ), + array( + 'field' => 'phone', + 'label' => _('Phone number'), + 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', + ), ); /** @@ -128,31 +128,31 @@ $config['users/create'] = array( * @var array */ $config['users/edit'] = array( - array( - 'field' => 'firstname', - 'label' => _('First name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'lastname', - 'label' => _('Last name'), - 'rules' => 'required|max_length[50]|trim', - ), - array( - 'field' => 'email', - 'label' => _('Email address'), - 'rules' => 'required|valid_email|trim', - ), - array( - 'field' => 'institution', - 'label' => _('Institution'), - 'rules' => 'max_length[100]|trim', - ), - array( - 'field' => 'phone', - 'label' => _('Phone number'), - 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', - ), + array( + 'field' => 'firstname', + 'label' => _('First name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'lastname', + 'label' => _('Last name'), + 'rules' => 'required|max_length[50]|trim', + ), + array( + 'field' => 'email', + 'label' => _('Email address'), + 'rules' => 'required|valid_email|trim', + ), + array( + 'field' => 'institution', + 'label' => _('Institution'), + 'rules' => 'max_length[100]|trim', + ), + array( + 'field' => 'phone', + 'label' => _('Phone number'), + 'rules' => 'regex_match[/^\+\d{2,4}\s\d{2,4}\s\d{3,10}+$/i]|trim', + ), ); /** @@ -161,16 +161,16 @@ $config['users/edit'] = array( * @var array */ $config['programs/edit'] = array( - array( - 'field' => 'name', - 'label' => _('Name of the program'), - 'rules' => 'required|max_length[100]|trim', - ), - array( - 'field' => 'config_template', - 'label' => _('Config template'), - 'rules' => 'required', - ), + array( + 'field' => 'name', + 'label' => _('Name of the program'), + 'rules' => 'required|max_length[100]|trim', + ), + array( + 'field' => 'config_template', + 'label' => _('Config template'), + 'rules' => 'required', + ), ); /** @@ -179,31 +179,31 @@ $config['programs/edit'] = array( * @var array */ $config['parameters/create'] = array( - array( - 'field' => 'name', - 'label' => _('Name'), - 'rules' => 'required|max_length[255]|trim', - ), - array( - 'field' => 'readable', - 'label' => _('Human-readable name'), - 'rules' => 'required|max_length[100]|trim', - ), - array( - 'field' => 'unit', - 'label' => _('Name'), - 'rules' => 'max_length[20]|trim', - ), - array( - 'field' => 'default_value', - 'label' => _('Default value'), - 'rules' => 'max_length[255]|trim', - ), - array( - 'field' => 'type', - 'label' => _('Type'), - 'rules' => 'required|max_length[20]|trim', - ), + array( + 'field' => 'name', + 'label' => _('Name'), + 'rules' => 'required|max_length[255]|trim', + ), + array( + 'field' => 'readable', + 'label' => _('Human-readable name'), + 'rules' => 'required|max_length[100]|trim', + ), + array( + 'field' => 'unit', + 'label' => _('Name'), + 'rules' => 'max_length[20]|trim', + ), + array( + 'field' => 'default_value', + 'label' => _('Default value'), + 'rules' => 'max_length[255]|trim', + ), + array( + 'field' => 'type', + 'label' => _('Type'), + 'rules' => 'required|max_length[20]|trim', + ), ); /** @@ -212,26 +212,26 @@ $config['parameters/create'] = array( * @var array */ $config['projects/create'] = array( - array( - 'field' => 'name', - 'label' => _('Project name'), - 'rules' => 'required|min_length[3]|max_length[100]|trim', - ), - array( - 'field' => 'description', - 'label' => _('Description'), - 'rules' => 'required|trim', - ), - array( - 'field' => 'defaultmodel', - 'label' => _('3D model'), - 'rules' => 'file_allowed_type[obj]', - ), - array( - 'field' => 'defaultconfig', - 'label' => _('Default configuration'), - 'rules' => 'file_allowed_type[calc]', - ), + array( + 'field' => 'name', + 'label' => _('Project name'), + 'rules' => 'required|min_length[3]|max_length[100]|trim', + ), + array( + 'field' => 'description', + 'label' => _('Description'), + 'rules' => 'required|trim', + ), + array( + 'field' => 'defaultmodel', + 'label' => _('3D model'), + 'rules' => 'file_allowed_type[obj]', + ), + array( + 'field' => 'defaultconfig', + 'label' => _('Default configuration'), + 'rules' => 'file_allowed_type[calc]', + ), ); /** @@ -240,23 +240,22 @@ $config['projects/create'] = array( * @var array */ $config['trials/create'] = array( - array( - 'field' => 'name', - 'label' => _('Trial name'), - 'rules' => 'required|min_length[3]|max_length[60]|trim', - ), - array( - 'field' => 'description', - 'label' => _('Description'), - 'rules' => 'required|trim', - ), - array( - 'field' => 'program_id', - 'label' => _('Program'), - 'rules' => 'required|alpha_numeric|trim', - ), + array( + 'field' => 'name', + 'label' => _('Trial name'), + 'rules' => 'required|min_length[3]|max_length[60]|trim', + ), + array( + 'field' => 'description', + 'label' => _('Description'), + 'rules' => 'required|trim', + ), + array( + 'field' => 'program_id', + 'label' => _('Program'), + 'rules' => 'required|alpha_numeric|trim', + ), ); /* End of file form_validation.php */ /* Location: ./application/config/form_validation.php */ - diff --git a/application/config/hooks.php b/application/config/hooks.php index ed89e55..d8d81ab 100755 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -1,4 +1,4 @@ - '', - 'function' => 'check_login', - 'filename' => 'global.php', - 'filepath' => 'hooks' + 'class' => '', + 'function' => 'check_login', + 'filename' => 'global.php', + 'filepath' => 'hooks' ); /* End of file hooks.php */ diff --git a/application/config/language.php b/application/config/language.php index 321da2c..14d4113 100644 --- a/application/config/language.php +++ b/application/config/language.php @@ -16,8 +16,8 @@ | */ $config['supported_languages'] = array( - 'en'=> array('name' => 'English', 'locale' => 'en_US'), - 'de'=> array('name' => 'Deutsch', 'locale' => 'de_DE') + 'en' => array('name' => 'English', 'locale' => 'en_US'), + 'de' => array('name' => 'Deutsch', 'locale' => 'de_DE'), ); /* @@ -30,3 +30,6 @@ $config['supported_languages'] = array( | */ $config['default_language'] = 'en'; + +/* End of file autoload.php */ +/* Location: ./application/config/language.php */ diff --git a/application/config/mimes.php b/application/config/mimes.php index ebaca41..f855008 100755 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -1,4 +1,4 @@ - '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', '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' => 'audio/x-wav', - 'bmp' => 'image/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' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'word' => array('application/msword', 'application/octet-stream'), - 'xl' => 'application/excel', - 'eml' => 'message/rfc822', - 'json' => array('application/json', 'text/json'), - 'obj' => 'text/plain', - ); +$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', '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' => 'audio/x-wav', + 'bmp' => 'image/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' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'word' => array('application/msword', 'application/octet-stream'), + 'xl' => 'application/excel', + 'eml' => 'message/rfc822', + 'json' => array('application/json', 'text/json'), + 'obj' => 'text/plain', +); /* End of file mimes.php */ diff --git a/application/config/profiler.php b/application/config/profiler.php index f8a5b1a..ead7895 100755 --- a/application/config/profiler.php +++ b/application/config/profiler.php @@ -1,4 +1,4 @@ - 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 + ':-)' => 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'), - ); +); /* End of file smileys.php */ -/* Location: ./application/config/smileys.php */ \ No newline at end of file +/* Location: ./application/config/smileys.php */ diff --git a/application/config/user_agents.php b/application/config/user_agents.php index e2d3c3a..cd1f904 100755 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -1,4 +1,4 @@ - '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' - ); - + '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' - ); + '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' + // 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", + // 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", + // 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", + // 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", + // 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" - ); + // 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' - ); + '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 */ \ No newline at end of file +/* Location: ./application/config/user_agents.php */ diff --git a/application/controllers/about.php b/application/controllers/about.php new file mode 100644 index 0000000..0e7f09c --- /dev/null +++ b/application/controllers/about.php @@ -0,0 +1,44 @@ + + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Static about page + * + * @author Karsten Heiken + */ +class About extends CI_Controller { + + /** + * Constructor. + */ + public function __construct() { + parent::__construct(); + } + + public function index() { + $this->load->view('about'); + } +} + +/* End of file about.php */ +/* Location: ./application/controllers/about.php */ diff --git a/application/controllers/license.php b/application/controllers/license.php new file mode 100644 index 0000000..a0166ed --- /dev/null +++ b/application/controllers/license.php @@ -0,0 +1,44 @@ + + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Static license page + * + * @author Karsten Heiken + */ +class License extends CI_Controller { + + /** + * Constructor. + */ + public function __construct() { + parent::__construct(); + } + + public function index() { + $this->load->view('license'); + } +} + +/* End of file license.php */ +/* Location: ./application/controllers/license.php */ diff --git a/application/core/MY_Config.php b/application/core/MY_Config.php new file mode 100644 index 0000000..7d0ebfb --- /dev/null +++ b/application/core/MY_Config.php @@ -0,0 +1,51 @@ + + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * Extends CI's config class. + * + * @author Eike Foken + */ +class MY_Config extends CI_Config { + + /** + * Calls the parent constructor. + */ + public function __construct() { + parent::__construct(); + log_message('debug', "Config Class Extension Initialized"); + } + + /** + * Handles relative URLs. + * + * @see CI_Config::site_url() + */ + public function site_url($uri = '', $relative = true) { + $url = parent::site_url($uri); + return $relative ? parse_url($url, PHP_URL_PATH) : $url; + } +} + +/* End of file MY_Config.php */ +/* Location: ./application/core/MY_Config.php */ diff --git a/application/helpers/MY_language_helper.php b/application/helpers/MY_language_helper.php index c7d53d5..a775522 100644 --- a/application/helpers/MY_language_helper.php +++ b/application/helpers/MY_language_helper.php @@ -14,28 +14,18 @@ * @return string */ if (!function_exists('lang_select')) { - function lang_select($img_folder = '', $index_page = false) { + function lang_select($img_folder = '') { $CI =& get_instance(); $link = 'config->item('language') == 'en_US') { - $link .= ' href="' . $CI->config->site_url('de') . '">'; - - if ($index_page === true) { - $link .= ''; - } else { - $link .= ''; - } + $link .= ' href="?lang=de">'; + $link .= ''; $link .= ' English'; } else if ($CI->config->item('language') == 'de_DE') { - $link .= ' href="' . $CI->config->site_url('en') . '" >'; - - if ($index_page === true) { - $link .= ''; - } else { - $link .= ''; - } + $link .= ' href="?lang=en">'; + $link .= ''; $link .= ' Deutsch'; } diff --git a/application/helpers/asset_helper.php b/application/helpers/asset_helper.php new file mode 100644 index 0000000..bbdb360 --- /dev/null +++ b/application/helpers/asset_helper.php @@ -0,0 +1,72 @@ + + */ + +/** + * Helps generating links to asset files of any sort. + * + * Note: The type should be the name of the folder the asset is stored in. + * + * @param string $type + * @param string $filename + * @return string + */ +function asset_url($type, $filename) { + $CI = &get_instance(); + $CI->load->library('assets'); + + return $CI->assets->url($type, $filename); +} + +/** + * Helps generating HTML for assets of any sort. + * + * @param string $type + * @param string $filename + * @param mixed $attributes + * @return string + */ +function asset($type, $filename, $attributes = '') { + $CI = &get_instance(); + $CI->load->library('assets'); + + return $CI->assets->load($type, $filename, $attributes); +} + +/** + * Inserts CSS assets. + * + * @param string $filename + * @param mixed $attributes + * @return string + */ +function css_asset($filename, $attributes = '') { + return asset('css', $filename, $attributes); +} + +/** + * Inserts image assets. + * + * @param string $filename + * @param mixed $attributes + * @return string + */ +function image_asset($filename, $attributes = '') { + return asset('image', $filename, $attributes); +} + +/** + * Inserts javascript assets. + * + * @param string $filename + * @return string + */ +function js_asset($filename) { + return asset('js', $filename); +} + +/* End of file asset_helper.php */ +/* Location: ./application/helpers/asset_helper.php */ diff --git a/application/libraries/Assets.php b/application/libraries/Assets.php new file mode 100644 index 0000000..c32f343 --- /dev/null +++ b/application/libraries/Assets.php @@ -0,0 +1,146 @@ + + */ +class Assets { + + private $assetsFolder; + private $cacheFolder; + + private $css = array(); + private $javascript = array(); + + private $CI; + + /** + * Constructor. + */ + public function __construct($config = array()) { + log_message('debug', "Asset Class Initialized"); + + // set the super object to a local variable + $this->CI =& get_instance(); + + // set the asset path + $this->assetsPath = ($config['assets_folder'] != '') ? $config['assets_folder'] : 'assets'; + + if (!is_dir($this->assetsPath)) { + log_message('error', "Asset folder does not exist"); + } + + // set the cache path + $this->cachePath = ($config['cache_folder'] != '') ? $config['cache_folder'] : 'assets/cache'; + + if (!is_dir($this->cachePath) || !is_really_writable($this->cachePath)) { + $this->cacheEnable = false; + } + } + + /** + * Loads an asset. + * + * @param string $type + * @param string $filename + * @param mixed $attributes + */ + public function load($type, $filename, $attributes = '') { + // validate type parameter + $type = strtolower($type); + if (!in_array($type, array('image', 'images', 'icon', 'icons', 'css', 'js'))) { + log_message('error', "Invalid asset type '" . $type . "' used."); + } + if (in_array($type, array('image', 'icon'))) { + $type .= 's'; + } + + // build the path strings + $filepath = $this->assetsPath . $type . '/' . $filename; + + if (!file_exists($filepath)) { + log_message('error', "Unable to load requested asset: $filename"); + return ''; + } + + switch ($type) { + case 'images': + case 'icons': + if (!isset($attributes['alt'])) { + $attributes['alt'] = ''; + } + + $output = 'parseAttributes($attributes) . ' />'; + break; + case 'css': + $output = 'parseAttributes($attributes) . " />\n"; + break; + case 'js': +// $this->javascript[] = array('filepath' => $filepath, 'attributes' => $attributes); + +// $code = file_get_contents(FCPATH . $this->assetsFolder . $type . '/' . $filename); + +// if ($this->CI->config->item('enable_jsmin') == true) { +// $this->CI->load->library('jsmin'); +// $code = $this->CI->jsmin->minify($code); +// } + +// $httpHeaders = '<' . '?php header("Content-type: text/javascript; charset: UTF-8");?' . '>'; + +// if ($this->CI->config->item('compress_output') == true) { +// $httpHeaders .= ''; +// } +// $code = $httpHeaders . "\n" . $code; +// file_put_contents(FCPATH . $this->cacheFolder . $type . '_' . md5($code) . EXT, $code); + $output = ''; + $output .= "\n"; + break; + default: + $output = ''; + } + + return $output; + } + + /** + * Generates an URL of the given asset. + * + * @param string $type + * @param string $filename + * @return string + */ + public function url($type, $filename) { + $type = strtolower($type); + if (!in_array($type, array('image', 'images', 'icon', 'icons', 'css', 'js'))) { + log_message('error', "'" . $type . "' is not a valid asset type"); + return; + } + if (in_array($type, array('image', 'icon'))) { + $type .= 's'; + } + + return $this->CI->config->slash_item('base_url') . $this->assetsPath . $type . '/' . $filename; + } + + /** + * Parses out the attributes. + * + * @param mixed $attributes + * @return string + */ + private function parseAttributes($attributes) { + if (is_string($attributes)) { + return ($attributes != '') ? ' '.$attributes : ''; + } + + $output = ''; + foreach ($attributes as $key => $value) { + $output .= ' ' . $key . '="' . $value . '"'; + } + + return $output; + } +} + +/* End of file Assets.php */ +/* Location: ./application/libraries/Assets.php */ diff --git a/application/libraries/Jsmin.php b/application/libraries/Jsmin.php new file mode 100644 index 0000000..c8dd9e6 --- /dev/null +++ b/application/libraries/Jsmin.php @@ -0,0 +1,277 @@ + + * @copyright 2002 Douglas Crockford (jsmin.c) + * @copyright 2008 Ryan Grove (PHP port) + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version 1.1.1 (2008-03-02) + * @link http://code.google.com/p/jsmin-php/ + */ +class Jsmin { + + const ORD_LF = 10; + const ORD_SPACE = 32; + + protected $a = ''; + protected $b = ''; + protected $input = ''; + protected $inputIndex = 0; + protected $inputLength = 0; + protected $lookAhead = null; + protected $output = ''; + + /** + * Constructor. + */ + public function __construct() { + log_message('debug', "Jsmin Class Initialized"); + } + + /** + * Minifies javascript code. + * + * @param string $input + * @return string The minified code + */ + public function minify($input) { + $this->input = str_replace("\r\n", "\n", $input); + $this->inputLength = strlen($this->input); + return $this->min(); + } + + private function action($d) { + switch ($d) { + case 1: + $this->output .= $this->a; + case 2: + $this->a = $this->b; + + if ($this->a === "'" || $this->a === '"') { + for (;;) { + $this->output .= $this->a; + $this->a = $this->get(); + + if ($this->a === $this->b) { + break; + } + + if (ord($this->a) <= self::ORD_LF) { + log_message('error', "Unterminated string literal"); + return; + } + + if ($this->a === '\\') { + $this->output .= $this->a; + $this->a = $this->get(); + } + } + } + case 3: + $this->b = $this->next(); + + if ($this->b === '/' && ($this->a === '(' || $this->a === ',' || $this->a === '=' || $this->a === ':' || $this->a === '[' || $this->a === '!' || $this->a === '&' || $this->a === '|' || $this->a === '?')) { + $this->output .= $this->a . $this->b; + + for (;;) { + $this->a = $this->get(); + + if ($this->a === '/') { + break; + } else if ($this->a === '\\') { + $this->output .= $this->a; + $this->a = $this->get(); + } else if (ord($this->a) <= self::ORD_LF) { + log_message('error', "Unterminated regular expression literal"); + return; + } + + $this->output .= $this->a; + } + + $this->b = $this->next(); + } + } + } + + private function get() { + $c = $this->lookAhead; + $this->lookAhead = null; + + if ($c === null) { + if ($this->inputIndex < $this->inputLength) { + $c = $this->input[$this->inputIndex]; + $this->inputIndex += 1; + } else { + $c = null; + } + } + + if ($c === "\r") { + return "\n"; + } + + if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) { + return $c; + } + + return ' '; + } + + private function isAlphaNum($c) { + return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1; + } + + private function min() { + $this->a = "\n"; + $this->action(3); + + while ($this->a !== null) { + switch ($this->a) { + case ' ': + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } else { + $this->action(2); + } + break; + case "\n": + switch ($this->b) { + case '{': + case '[': + case '(': + case '+': + case '-': + $this->action(1); + break; + case ' ': + $this->action(3); + break; + default: + if ($this->isAlphaNum($this->b)) { + $this->action(1); + } else { + $this->action(2); + } + } + break; + default: + switch ($this->b) { + case ' ': + if ($this->isAlphaNum($this->a)) { + $this->action(1); + break; + } + + $this->action(3); + break; + case "\n": + switch ($this->a) { + case '}': + case ']': + case ')': + case '+': + case '-': + case '"': + case "'": + $this->action(1); + break; + default: + if ($this->isAlphaNum($this->a)) { + $this->action(1); + } else { + $this->action(3); + } + } + break; + default: + $this->action(1); + break; + } + } + } + + return $this->output; + } + + private function next() { + $c = $this->get(); + + if ($c === '/') { + switch ($this->peek()) { + case '/': + for (;;) { + $c = $this->get(); + + if (ord($c) <= self::ORD_LF) { + return $c; + } + } + case '*': + $this->get(); + + for (;;) { + switch ($this->get()) { + case '*': + if ($this->peek() === '/') { + $this->get(); + return ' '; + } + break; + + case null: + throw new JSMinException('Unterminated comment.'); + } + } + default: + return $c; + } + } + + return $c; + } + + private function peek() { + $this->lookAhead = $this->get(); + return $this->lookAhead; + } +} + +/* End of file Jsmin.php */ +/* Location: ./application/libraries/Jsmin.php */ diff --git a/application/libraries/Lang_detect.php b/application/libraries/Lang_detect.php index ecd1740..b1c6843 100644 --- a/application/libraries/Lang_detect.php +++ b/application/libraries/Lang_detect.php @@ -39,12 +39,10 @@ class Lang_detect { * @return string Language directory name, e.g. 'english' */ public function detectLanguage() { - for ($i = $this->CI->uri->total_segments(); $i > 0; $i--) { - $segment = $this->CI->uri->segment($i); - if (strlen($segment) == 2 && array_key_exists($segment, $this->supportedLanguages)) { - $lang = $segment; - $this->CI->session->set_userdata('language', $lang); - } + $segment = $this->CI->input->get('lang'); + if (strlen($segment) == 2 && array_key_exists($segment, $this->supportedLanguages)) { + $lang = $segment; + $this->CI->session->set_userdata('language', $lang); } if ($this->CI->session->userdata('language')) { diff --git a/application/views/about.php b/application/views/about.php new file mode 100644 index 0000000..3c0839d --- /dev/null +++ b/application/views/about.php @@ -0,0 +1,27 @@ +load->view('header'); ?> + +
+ +
+

+
+ +
+

+

+

+
+
+

+

+

Programming

+
    +
  • Karsten Heiken, 2011
  • +
  • Eike Foken, 2011
  • +
+

+
+ +
+ +load->view('footer'); ?> diff --git a/application/views/auth/login.php b/application/views/auth/login.php index 6cf1ebb..0c492cc 100644 --- a/application/views/auth/login.php +++ b/application/views/auth/login.php @@ -6,12 +6,12 @@ ScattPort | <?=_('Login');?> - - + + - - - + + + diff --git a/application/views/footer.php b/application/views/footer.php index 0687b6c..0e93f81 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -2,7 +2,7 @@ access->isAdmin()): ?> - - + - | | | @@ -11,11 +11,19 @@ - © 2011 Karsten Heiken. + + + | + + + + 36));?> + 36));?> + 36));?> + - diff --git a/application/views/header.php b/application/views/header.php index 96a59c6..ce2f577 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -7,26 +7,28 @@ ScattPort - - - + + + + + + + + + + - - - - - - +
@@ -52,58 +54,65 @@
-

+

-

+

- - + +
-

+

    -
  • 22.07.2011

  • -
  • 22.07.2011

  • -
  • 22.07.2011

  • +
  • 22.07.2011

  • +
  • 22.07.2011

  • +
  • 22.07.2011

diff --git a/application/views/license.php b/application/views/license.php new file mode 100644 index 0000000..ee2daa3 --- /dev/null +++ b/application/views/license.php @@ -0,0 +1,40 @@ +load->view('header'); ?> + +
+ +
+

+
+ +
+

This application is licensed under the MIT License for Open Source Software

+

Copyright (c) 2011 Karsten Heiken, Eike Foken

+ +

+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the Software
+ is furnished to do so, subject to the following conditions: +

+ +

+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software. +

+ +

+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE. +

+
+
+ +load->view('footer'); ?> diff --git a/assets/cache/index.html b/assets/cache/index.html new file mode 100755 index 0000000..c942a79 --- /dev/null +++ b/assets/cache/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 35a7965..a78e6f6 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -170,7 +170,7 @@ div.error { margin: 0; padding: 0 15px; border-top: 1px solid #e8e8e8; - background: url(../images/navigation-off.gif) repeat-x; + background: url(../images/navigation-on.gif) repeat-x; line-height: 24px; height: 100%; display: block; @@ -178,18 +178,22 @@ div.error { } .navigation ul li a { - color: #666; + background: url(../images/icons/chevron-small-expand.png) -2px center no-repeat; + padding-left: 16px; + margin-left: -7px; + color: #fff; height: 100%; width: 100%; display: block; } .navigation ul li.active { - background: url(../images/navigation-on.gif) repeat-x; + background: url(../images/navigation-off.gif) repeat-x; } .navigation ul li.active a { - color: #fff; + background: url(../images/icons/chevron-small.png) -2px center no-repeat; + color: #666; } .navigation ul li ul { @@ -205,6 +209,9 @@ div.error { } .navigation ul li ul li a { + background: none; + padding: 0; + margin: 0; color: #0088cc; } @@ -310,7 +317,8 @@ div.error { background: #fff; border: 1px solid #e8e8e8; padding: 15px; - height: 12px; + height: 35px; + line-height: 36px; clear: both; } @@ -320,6 +328,7 @@ div.error { #footer .right { float: right; + margin-left: 6px; } /* Buttons */ @@ -520,7 +529,7 @@ ul.tabs li { margin-bottom: -1px; /* Pull the list item down 1px */ overflow: hidden; position: relative; - background: #e0e0e0 url('../images/navigation-off.gif'); + background: #e0e0e0 url('../images/tabs-back.gif'); } ul.tabs li a { diff --git a/assets/images/dfg.gif b/assets/images/dfg.gif new file mode 100644 index 0000000..bfc0abd Binary files /dev/null and b/assets/images/dfg.gif differ diff --git a/assets/images/iwt.gif b/assets/images/iwt.gif new file mode 100644 index 0000000..4093a9b Binary files /dev/null and b/assets/images/iwt.gif differ diff --git a/assets/images/tabs-back.gif b/assets/images/tabs-back.gif new file mode 100644 index 0000000..2aeb618 Binary files /dev/null and b/assets/images/tabs-back.gif differ diff --git a/assets/images/uni.png b/assets/images/uni.png new file mode 100644 index 0000000..d367730 Binary files /dev/null and b/assets/images/uni.png differ diff --git a/assets/js/scattport.js b/assets/js/scattport.js index 113aef8..b7ab30b 100644 --- a/assets/js/scattport.js +++ b/assets/js/scattport.js @@ -22,6 +22,81 @@ function deleteConfirm(url) { } } +/** + * Sets a cookie. + * + * @param name + * @param value + * @param days + */ +function setCookie(name, value, days) { + var today = new Date(); + var expire = new Date(); + + if (days == null || days == 0) { + days = 1; + } + expire.setTime(today.getTime() + 3600000 * 24 * days); + document.cookie = name + "=" + escape(value) + ";path=/;expires=" + expire.toGMTString(); +} + +/** + * Gets a cookie. + * + * @param name + * @returns + */ +function getCookie(name) { + var cookie = ' ' + document.cookie; + var index = cookie.indexOf(" " + name + "="); + + if (index == -1) { + index = cookie.indexOf(";" + name + "="); + } + if (index == -1 || name == '') { + return ''; + } + + var index2 = cookie.indexOf(";", index + 1); + + if (index2 == -1) { + index2 = cookie.length; + } + return unescape(cookie.substring(index + name.length + 2, index2)); +} + +/** + * + * @param cookieName + * @returns + */ +var CookieList = function(cookieName) { + var cookie = getCookie(cookieName); + // load the items or a new array if null + var items = cookie ? cookie.split(/,/) : new Array(); + + return { + "add": function(val) { + // add to the items + items.push(val); + // save the items to a cookie + setCookie(cookieName, items.join(',')); + }, "remove": function(val) { + // remove the value from items + items.splice(items.indexOf(val), 1); + // save the items to a cookie + setCookie(cookieName, items.join(',')); + }, "clear": function() { + items = null; + // clear the cookie + setCookie(cookieName, null, null); + }, "items": function() { + // get all the items + return items; + } + }; +}; + /** * Saves the changes done by in-place edit. * @@ -207,4 +282,27 @@ $(document).ready(function() { window.location = url; } }); + + /* + * Toggleable navigation + */ + var toggleList = new CookieList("toggled"); + var toggled = toggleList.items(); + + for (var i = 0; i < toggled.length; i++) { + $('#' + toggled[i]).toggleClass('active').find('ul').hide(); + } + + $('.togglable').find('a').not('ul li ul li a').click(function() { + var id = $(this).parent().attr('id'); + + // toggle + $(this).parent().toggleClass('active').find('ul').toggle(); + + if ($(this).next().css('display') == 'none') { + toggleList.add(id); + } else { + toggleList.remove(id); + } + }); });