diff --git a/LangCodes.php b/LangCodes.php new file mode 100644 index 0000000..8a2542f --- /dev/null +++ b/LangCodes.php @@ -0,0 +1,28 @@ +'fr_FR', + 'en_US'=>'en_US'//, + //'zh_CN'=>'zh_CN', + //'zh_TW'=>'zh_TW', + //'de_DE'=>'de_DE' + ); + return array_key_exists($code, $all_lang) ? $all_lang[$code] : "en_US"; + } + public function getNameLang($code_lang){ + $name_lang=array( + 'fr_FR'=>'Français', + 'en_US'=>'English'//, + //'zh_CN'=>'中文 (中国)', + //'zh_TW'=>'中文 (台灣)', + //'de_DE'=>'Deutsch' + ); + return array_key_exists($code_lang, $name_lang) ? $name_lang[$code_lang] : "English"; + } +} +?> \ No newline at end of file diff --git a/images/angelfishlogo.gif b/images/angelfishlogo.gif deleted file mode 100644 index a941e71..0000000 Binary files a/images/angelfishlogo.gif and /dev/null differ diff --git a/images/angelfishlogo_over.gif b/images/angelfishlogo_over.gif deleted file mode 100644 index cb6d429..0000000 Binary files a/images/angelfishlogo_over.gif and /dev/null differ diff --git a/images/authpage.gif b/images/authpage.gif new file mode 100644 index 0000000..4bb475b Binary files /dev/null and b/images/authpage.gif differ diff --git a/images/back-header.jpg b/images/back-header.jpg new file mode 100644 index 0000000..3ba8ebd Binary files /dev/null and b/images/back-header.jpg differ diff --git a/images/background.jpg b/images/background.jpg index db4e4ae..bbb3dba 100644 Binary files a/images/background.jpg and b/images/background.jpg differ diff --git a/images/background.png b/images/background.png new file mode 100644 index 0000000..a2527f0 Binary files /dev/null and b/images/background.png differ diff --git a/images/bg-gray-texture.jpg b/images/bg-gray-texture.jpg new file mode 100644 index 0000000..ef0afea Binary files /dev/null and b/images/bg-gray-texture.jpg differ diff --git a/images/butterflyfishlogo.gif b/images/butterflyfishlogo.gif deleted file mode 100644 index edd207f..0000000 Binary files a/images/butterflyfishlogo.gif and /dev/null differ diff --git a/images/butterflyfishlogo_over.gif b/images/butterflyfishlogo_over.gif deleted file mode 100644 index f2ff6c7..0000000 Binary files a/images/butterflyfishlogo_over.gif and /dev/null differ diff --git a/images/clownfishlogo.gif b/images/clownfishlogo.gif deleted file mode 100644 index 5d0da78..0000000 Binary files a/images/clownfishlogo.gif and /dev/null differ diff --git a/images/clownfishlogo_over.gif b/images/clownfishlogo_over.gif deleted file mode 100644 index 2579acd..0000000 Binary files a/images/clownfishlogo_over.gif and /dev/null differ diff --git a/images/favicon.ico b/images/favicon.ico index a689e78..609cd4a 100644 Binary files a/images/favicon.ico and b/images/favicon.ico differ diff --git a/images/icon-licensing-hover.png b/images/icon-licensing-hover.png new file mode 100644 index 0000000..6ca09ff Binary files /dev/null and b/images/icon-licensing-hover.png differ diff --git a/images/icon-licensing-off.png b/images/icon-licensing-off.png new file mode 100644 index 0000000..638e350 Binary files /dev/null and b/images/icon-licensing-off.png differ diff --git a/images/icon-licensing.png b/images/icon-licensing.png new file mode 100644 index 0000000..281c74f Binary files /dev/null and b/images/icon-licensing.png differ diff --git a/images/icon-management-hover.png b/images/icon-management-hover.png new file mode 100644 index 0000000..2714cd1 Binary files /dev/null and b/images/icon-management-hover.png differ diff --git a/images/icon-management-off.png b/images/icon-management-off.png new file mode 100644 index 0000000..7479e8d Binary files /dev/null and b/images/icon-management-off.png differ diff --git a/images/icon-management.png b/images/icon-management.png new file mode 100644 index 0000000..70c862f Binary files /dev/null and b/images/icon-management.png differ diff --git a/images/icon-organizations-hover.png b/images/icon-organizations-hover.png new file mode 100644 index 0000000..d1552fc Binary files /dev/null and b/images/icon-organizations-hover.png differ diff --git a/images/icon-organizations-off.png b/images/icon-organizations-off.png new file mode 100644 index 0000000..910407c Binary files /dev/null and b/images/icon-organizations-off.png differ diff --git a/images/icon-organizations.png b/images/icon-organizations.png new file mode 100644 index 0000000..b18a925 Binary files /dev/null and b/images/icon-organizations.png differ diff --git a/images/icon-resources-hover.png b/images/icon-resources-hover.png new file mode 100644 index 0000000..6eb659e Binary files /dev/null and b/images/icon-resources-hover.png differ diff --git a/images/icon-resources-off.png b/images/icon-resources-off.png new file mode 100644 index 0000000..3630f48 Binary files /dev/null and b/images/icon-resources-off.png differ diff --git a/images/icon-resources.png b/images/icon-resources.png new file mode 100644 index 0000000..d9aabd4 Binary files /dev/null and b/images/icon-resources.png differ diff --git a/images/icon-usage-hover.png b/images/icon-usage-hover.png new file mode 100644 index 0000000..f058a5c Binary files /dev/null and b/images/icon-usage-hover.png differ diff --git a/images/icon-usage-off.png b/images/icon-usage-off.png new file mode 100644 index 0000000..5da9e11 Binary files /dev/null and b/images/icon-usage-off.png differ diff --git a/images/icon-usage.png b/images/icon-usage.png new file mode 100644 index 0000000..e26d966 Binary files /dev/null and b/images/icon-usage.png differ diff --git a/images/licensing-title-hover.png b/images/licensing-title-hover.png new file mode 100644 index 0000000..ada03ac Binary files /dev/null and b/images/licensing-title-hover.png differ diff --git a/images/licensing-title-off.png b/images/licensing-title-off.png new file mode 100644 index 0000000..d5072fb Binary files /dev/null and b/images/licensing-title-off.png differ diff --git a/images/licensing-title.png b/images/licensing-title.png new file mode 100644 index 0000000..014a291 Binary files /dev/null and b/images/licensing-title.png differ diff --git a/images/licensing.gif b/images/licensing.gif index 4166d75..074df22 100644 Binary files a/images/licensing.gif and b/images/licensing.gif differ diff --git a/images/licensing_off.gif b/images/licensing_off.gif index 0594bfb..2f73e08 100644 Binary files a/images/licensing_off.gif and b/images/licensing_off.gif differ diff --git a/images/licensing_over.gif b/images/licensing_over.gif index 3312d5e..2f73e08 100644 Binary files a/images/licensing_over.gif and b/images/licensing_over.gif differ diff --git a/images/login.gif b/images/login.gif new file mode 100644 index 0000000..7f55239 Binary files /dev/null and b/images/login.gif differ diff --git a/images/logo-coral.jpg b/images/logo-coral.jpg new file mode 100644 index 0000000..26dc1dd Binary files /dev/null and b/images/logo-coral.jpg differ diff --git a/images/logo-powered-by.jpg b/images/logo-powered-by.jpg new file mode 100644 index 0000000..2efbb90 Binary files /dev/null and b/images/logo-powered-by.jpg differ diff --git a/images/organizations-title-hover.png b/images/organizations-title-hover.png new file mode 100644 index 0000000..5cdaba6 Binary files /dev/null and b/images/organizations-title-hover.png differ diff --git a/images/organizations-title-off.png b/images/organizations-title-off.png new file mode 100644 index 0000000..1f26ae6 Binary files /dev/null and b/images/organizations-title-off.png differ diff --git a/images/organizations-title.png b/images/organizations-title.png new file mode 100644 index 0000000..59778e5 Binary files /dev/null and b/images/organizations-title.png differ diff --git a/images/organizations.gif b/images/organizations.gif index 655d850..521935f 100644 Binary files a/images/organizations.gif and b/images/organizations.gif differ diff --git a/images/organizations_off.gif b/images/organizations_off.gif index 56bce9a..80468e9 100644 Binary files a/images/organizations_off.gif and b/images/organizations_off.gif differ diff --git a/images/organizations_over.gif b/images/organizations_over.gif index e082e00..80468e9 100644 Binary files a/images/organizations_over.gif and b/images/organizations_over.gif differ diff --git a/images/resources-title-hover.png b/images/resources-title-hover.png new file mode 100644 index 0000000..ebecb95 Binary files /dev/null and b/images/resources-title-hover.png differ diff --git a/images/resources-title-off.png b/images/resources-title-off.png new file mode 100644 index 0000000..f06d008 Binary files /dev/null and b/images/resources-title-off.png differ diff --git a/images/resources-title.png b/images/resources-title.png new file mode 100644 index 0000000..215c68e Binary files /dev/null and b/images/resources-title.png differ diff --git a/images/resources.gif b/images/resources.gif index 5035986..d75908f 100644 Binary files a/images/resources.gif and b/images/resources.gif differ diff --git a/images/resources_off.gif b/images/resources_off.gif index 3c00685..f9eb0d9 100644 Binary files a/images/resources_off.gif and b/images/resources_off.gif differ diff --git a/images/resources_over.gif b/images/resources_over.gif index bb3a5fc..f9eb0d9 100644 Binary files a/images/resources_over.gif and b/images/resources_over.gif differ diff --git a/images/seahorselogo.gif b/images/seahorselogo.gif deleted file mode 100644 index 79bd7bc..0000000 Binary files a/images/seahorselogo.gif and /dev/null differ diff --git a/images/seahorselogo.jpg b/images/seahorselogo.jpg deleted file mode 100644 index 5d09573..0000000 Binary files a/images/seahorselogo.jpg and /dev/null differ diff --git a/images/seahorselogo_over.gif b/images/seahorselogo_over.gif deleted file mode 100644 index 1a8506f..0000000 Binary files a/images/seahorselogo_over.gif and /dev/null differ diff --git a/images/title-main-small.png b/images/title-main-small.png new file mode 100644 index 0000000..c680a70 Binary files /dev/null and b/images/title-main-small.png differ diff --git a/images/title-main.png b/images/title-main.png new file mode 100644 index 0000000..ca2cf23 Binary files /dev/null and b/images/title-main.png differ diff --git a/images/turtlelogo.gif b/images/turtlelogo.gif deleted file mode 100644 index 1e5a8c1..0000000 Binary files a/images/turtlelogo.gif and /dev/null differ diff --git a/images/turtlelogo_over.gif b/images/turtlelogo_over.gif deleted file mode 100644 index 8a0ffcd..0000000 Binary files a/images/turtlelogo_over.gif and /dev/null differ diff --git a/images/usage-title-hover.png b/images/usage-title-hover.png new file mode 100644 index 0000000..e667792 Binary files /dev/null and b/images/usage-title-hover.png differ diff --git a/images/usage-title-off.png b/images/usage-title-off.png new file mode 100644 index 0000000..094c8b2 Binary files /dev/null and b/images/usage-title-off.png differ diff --git a/images/usage-title.png b/images/usage-title.png new file mode 100644 index 0000000..79dd6ef Binary files /dev/null and b/images/usage-title.png differ diff --git a/images/usagestatistics.gif b/images/usagestatistics.gif index 9e0e5cd..a5af12d 100644 Binary files a/images/usagestatistics.gif and b/images/usagestatistics.gif differ diff --git a/images/usagestatistics_off.gif b/images/usagestatistics_off.gif index 511eb6c..ab45658 100644 Binary files a/images/usagestatistics_off.gif and b/images/usagestatistics_off.gif differ diff --git a/images/usagestatistics_over.gif b/images/usagestatistics_over.gif index b68e824..ab45658 100644 Binary files a/images/usagestatistics_over.gif and b/images/usagestatistics_over.gif differ diff --git a/index.php b/index.php index 1d77605..b2f7ce0 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,33 @@ getLanguage($codeL); + if($http_lang == "") + $http_lang = "en_US"; + } + putenv("LC_ALL=$http_lang"); + setlocale(LC_ALL, $http_lang.".utf8"); + bindtextdomain("messages", dirname(__FILE__) . "/locale"); + textdomain("messages"); ?> @@ -15,68 +35,174 @@ -CORAL - Centralized Online Resources Acquisitions and Licensing +eRM - eResource Management + + +getLanguage($str); + if($default_l==null || empty($default_l)){$default_l=$str;} + if(isset($_COOKIE["lang"])){ + if($_COOKIE["lang"]==$http_lang && $_COOKIE["lang"] != "en_US"){ + echo ""; + } + }else if($default_l==$http_lang && $default_l != "en_US"){ + echo ""; + } +?> + -
- - - - -
-
- - - - -
-
-
- - - + +
+ +
+
+
+

+ +
+
+
+ +
+ +
-
+ + + + - +
+ + +
- + - + +
-
+ + + + - +
+ + +
- + - +
-
+ + + + - +
+ + +
- + - +
-
+ + + + + +
+ + +
+ + + +
+ + + + + -
+
+ + +
- -
- -
-
-
-
-
- -
+ + + + +
+ + + \ No newline at end of file diff --git a/indexstyle.css b/indexstyle.css index 847b023..faef8f7 100644 --- a/indexstyle.css +++ b/indexstyle.css @@ -11,12 +11,23 @@ body { font-family: "arial"; font-size: 10pt; font-weight: heavy; - background: #FFFFFF; + /*--- + background: #FFFFFF; + ---*/ margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; vertical-align:top; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ - + background: #E7E8E8 url(images/bg-gray-texture.jpg) repeat top left; + -webkit-font-smoothing: antialiased; +} + +/*-----*/ + +#wrapper { + margin: 0 auto -2em; + background-image: url("images/back-header.jpg"); + background-repeat: repeat-x; } .wrapper { @@ -61,7 +72,16 @@ fieldset {border:0;} div.coralbutton{margin:7px;} -table.background {background-image:url('images/background.jpg');background-repeat:no-repeat;width:900px;height:601px;margin-top:3px;} +/*-----*/ + +table.background { + background-image:url('images/background.png'); + background-repeat:no-repeat; + margin-top:3px; + width: 636px; + margin: 0 auto; + margin-top: 0px; +} table.background tr{vertical-align:top;} table.background td{text-align:center;} @@ -446,4 +466,89 @@ input.dp-applied { } .adminAddInput{margin-top:5px;} -.licenseAddInput{margin-top:5px;margin-bottom;5px;} \ No newline at end of file +.licenseAddInput{margin-top:5px;margin-bottom;5px;} + +/*--- Custom CSS for Main Page ---*/ + +#wrapper-main { + background: #1B77AA; + margin: 0 auto; + padding-top: 30px; + padding-bottom: 20px; +} + +.icons { + background: #fff; + padding: 30px 0; + display: flex; + justify-content: center; +} + +.icons img { + padding: 25px; +} + +#title-main img#title-small { + display: none; +} + +.main-page-icons { + margin: 0 30px; + width: 160px; +} + +.main-page-icons a { + display: block; + text-decoration: none; +} + +.main-page-icons span { + font-family: "Open Sans", arial; + text-decoration: none; + font-size: 21px; + color: #777; + font-weight: 100; +} + +.main-page-icons:hover { + cursor: pointer; +} + +.main-page-icons span { + display: block; +} + +.main-page-icons-off:hover { + cursor: initial; +} + +/*--- Control Powered By Logo on Main Menu Page ---*/ + +#powered-by { + margin-top: 30px; +} + +/*--- Language Menu for Main Page ---*/ + +p.fontText { + display: inline-block; + color: #fff; + font-weight: 600; +} + +div#main-page-title { + font-size: 28px; + color: #fff; + font-family: "Open Sans"; +} + +#powered-by-text img { + vertical-align: middle; + margin-left: 8px; +} + +div#powered-by-text { + color: #687FA1; + margin-top: 20px; + font-size: 14px; +} \ No newline at end of file diff --git a/js/plugins/Gettext.js b/js/plugins/Gettext.js new file mode 100644 index 0000000..8a905e6 --- /dev/null +++ b/js/plugins/Gettext.js @@ -0,0 +1,1265 @@ +/* +Pure Javascript implementation of Uniforum message translation. +Copyright (C) 2008 Joshua I. Miller , all rights reserved + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public License as published +by the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. + +=head1 NAME + +Javascript Gettext - Javascript implemenation of GNU Gettext API. + +=head1 SYNOPSIS + + // ////////////////////////////////////////////////////////// + // Optimum caching way + + + + var gt = new Gettext({ "domain" : "myDomain" }); + // rest is the same + + + // ////////////////////////////////////////////////////////// + // The reson the shortcuts aren't exported by default is because they'd be + // glued to the single domain you created. So, if you're adding i18n support + // to some js library, you should use it as so: + + if (typeof(MyNamespace) == 'undefined') MyNamespace = {}; + MyNamespace.MyClass = function () { + var gtParms = { "domain" : 'MyNamespace_MyClass' }; + this.gt = new Gettext(gtParams); + return this; + }; + MyNamespace.MyClass.prototype._ = function (msgid) { + return this.gt.gettext(msgid); + }; + MyNamespace.MyClass.prototype.something = function () { + var myString = this._("this will get translated"); + }; + + // ////////////////////////////////////////////////////////// + // Adding the shortcuts to a global scope is easier. If that's + // ok in your app, this is certainly easier. + var myGettext = new Gettext({ 'domain' : 'myDomain' }); + function _ (msgid) { + return myGettext.gettext(msgid); + } + alert( _("text") ); + + // ////////////////////////////////////////////////////////// + // Data structure of the json data + // NOTE: if you're loading via the + + // in domain.json + json_locale_data = { + "mydomain" : { + // po header fields + "" : { + "plural-forms" : "...", + "lang" : "en", + }, + // all the msgid strings and translations + "msgid" : [ "msgid_plural", "translation", "plural_translation" ], + }, + }; + // please see the included bin/po2json script for the details on this format + +This method also allows you to use unsupported file formats, so long as you can parse them into the above format. + +=item 2. Use AJAX to load language file. + +Use XMLHttpRequest (actually, SJAX - syncronous) to load an external resource. + +Supported external formats are: + +=over + +=item * Javascript Object Notation (.json) + +(see bin/po2json) + + type=application/json + +=item * Uniforum Portable Object (.po) + +(see GNU Gettext's xgettext) + + type=application/x-po + +=item * Machine Object (compiled .po) (.mo) + +NOTE: .mo format isn't actually supported just yet, but support is planned. + +(see GNU Gettext's msgfmt) + + type=application/x-mo + +=back + +=back + +=head1 METHODS + +The following methods are implemented: + + new Gettext(args) + textdomain (domain) + gettext (msgid) + dgettext (domainname, msgid) + dcgettext (domainname, msgid, LC_MESSAGES) + ngettext (msgid, msgid_plural, count) + dngettext (domainname, msgid, msgid_plural, count) + dcngettext (domainname, msgid, msgid_plural, count, LC_MESSAGES) + pgettext (msgctxt, msgid) + dpgettext (domainname, msgctxt, msgid) + dcpgettext (domainname, msgctxt, msgid, LC_MESSAGES) + npgettext (msgctxt, msgid, msgid_plural, count) + dnpgettext (domainname, msgctxt, msgid, msgid_plural, count) + dcnpgettext (domainname, msgctxt, msgid, msgid_plural, count, LC_MESSAGES) + strargs (string, args_array) + + +=head2 new Gettext (args) + +Several methods of loading locale data are included. You may specify a plugin or alternative method of loading data by passing the data in as the "locale_data" option. For example: + + var get_locale_data = function () { + // plugin does whatever to populate locale_data + return locale_data; + }; + var gt = new Gettext( 'domain' : 'messages', + 'locale_data' : get_locale_data() ); + +The above can also be used if locale data is specified in a statically included