language updates
This commit is contained in:
parent
8f008c7792
commit
b8f9ec1860
8 changed files with 126 additions and 25 deletions
|
@ -53,10 +53,17 @@
|
|||
|
||||
if($_SERVER['HTTP_HOST'] == "secure.cacert.org" && $_SESSION['profile']['id'] > 0)
|
||||
{
|
||||
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
||||
$res = mysql_query($query);
|
||||
$row = mysql_fetch_assoc($res);
|
||||
$_SESSION['profile']['points'] = $row['total'];
|
||||
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
||||
$res = mysql_query($query);
|
||||
$row = mysql_fetch_assoc($res);
|
||||
$_SESSION['profile']['points'] = $row['total'];
|
||||
|
||||
if($_SESSION['profile']['language'] == "")
|
||||
{
|
||||
$query = "update `users` set `language`='".$_SESSION['_config']['language']."'
|
||||
where `id`='".$_SESSION['profile']['id']."'";
|
||||
mysql_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
if($id == "logout")
|
||||
|
@ -1695,6 +1702,27 @@
|
|||
$_POST['radius'] = $row['radius'];
|
||||
}
|
||||
|
||||
if($oldid == 41)
|
||||
{
|
||||
$lang = mysql_escape_string($_POST['lang']);
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
{
|
||||
if($key == $lang)
|
||||
{
|
||||
mysql_query("update `users` set `language`='$lang' where `id`='".$_SESSION['profile']['id']."'");
|
||||
showheader(_("My CAcert.org Account!"));
|
||||
echo _("Your language setting has been updated.");
|
||||
showfooter();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
showheader(_("My CAcert.org Account!"));
|
||||
echo _("You tried to use an invalid language.");
|
||||
showfooter();
|
||||
exit;
|
||||
}
|
||||
|
||||
if(intval($cert) > 0)
|
||||
$_SESSION['_config']['cert'] = intval($cert);
|
||||
if(intval($orgid) > 0)
|
||||
|
|
|
@ -120,7 +120,7 @@ function hideall() {
|
|||
</div>
|
||||
<div class="relatedLinks">
|
||||
<h3 onclick="explode('mydetails')">+ <?=_("My Details")?></h3>
|
||||
<ul class="menu" id="mydetails"><li><a href="account.php?id=13"><?=_("Edit")?></a></li><li><a href="account.php?id=14"><?=_("Change Password")?></a></li><li><a href="wot.php?id=8"><?=_("My Listing")?></a></li><li><a href="wot.php?id=7<?=$locrest?>"><?=_("My Location")?></a></li><li><a href="account.php?id=36"><?=_("My Alert Settings")?></a></li></ul>
|
||||
<ul class="menu" id="mydetails"><li><a href="account.php?id=13"><?=_("Edit")?></a></li><li><a href="account.php?id=14"><?=_("Change Password")?></a></li><li><a href="account.php?id=41"><?=_("Default Language")?></a></li><li><a href="wot.php?id=8"><?=_("My Listing")?></a></li><li><a href="wot.php?id=7<?=$locrest?>"><?=_("My Location")?></a></li><li><a href="account.php?id=36"><?=_("My Alert Settings")?></a></li></ul>
|
||||
</div>
|
||||
<div class="relatedLinks">
|
||||
<h3 onclick="explode('emailacc')">+ <?=_("Email Accounts")?></h3>
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
if($lang != "")
|
||||
$_SESSION['_config']['language'] = $lang;
|
||||
|
||||
$_SESSION['_config']['translations'] = array("da_DK" => "Dansk", "de_DE" => "Deutsch", "en_AU" => "English",
|
||||
"es_ES" => "Español", "fr_FR" => "Français", "hu_HU" => "Magyar",
|
||||
"nl_NL" => "Nederlands", "pt_PT" => "Português");
|
||||
|
||||
if($_SESSION['_config']['language'] == "")
|
||||
{
|
||||
$bits = explode(",", strtolower(str_replace(" ", "", $_SERVER[HTTP_ACCEPT_LANGUAGE])));
|
||||
|
@ -75,17 +79,18 @@
|
|||
}
|
||||
|
||||
if(strlen($_SESSION['_config']['language']) != 5)
|
||||
switch(substr($_SESSION['_config']['language'], 0, 2))
|
||||
{
|
||||
$lang = $_SESSION['_config']['language'];
|
||||
$_SESSION['_config']['language'] = "en_AU";
|
||||
foreach($_SESSION['_config']['translations'] as $key => $val)
|
||||
{
|
||||
case 'da': $_SESSION['_config']['language'] = "da_DK"; break;
|
||||
case 'de': $_SESSION['_config']['language'] = "de_DE"; break;
|
||||
case 'es': $_SESSION['_config']['language'] = "es_ES"; break;
|
||||
case 'fr': $_SESSION['_config']['language'] = "fr_FR"; break;
|
||||
case 'nl': $_SESSION['_config']['language'] = "nl_NL"; break;
|
||||
case 'pt': $_SESSION['_config']['language'] = "pt_PT"; break;
|
||||
case 'hu': $_SESSION['_config']['language'] = "hu_HU"; break;
|
||||
default: $_SESSION['_config']['language'] = "en_AU";
|
||||
if(substr($lang, 0, 2) == substr($key, 0, 2))
|
||||
{
|
||||
$_SESSION['_config']['language'] = $val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
putenv("LANG=".$_SESSION['_config']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['_config']['language']);
|
||||
|
|
|
@ -70,14 +70,9 @@ google_color_border = "FFFFFF";
|
|||
</div>
|
||||
<div class="relatedLinks">
|
||||
<h3><?=_("Translations")?></h3>
|
||||
<a href="index.php?id=<?=$id?>&lang=da_DK">Dansk</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=de_DE">Deutsch</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=en_EN">English</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=es_ES">Español</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=fr_FR">French</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=hu_HU">Magyar</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=nl_NL">Nederlands</a>
|
||||
<a href="index.php?id=<?=$id?>&lang=pt_PT">Português</a>
|
||||
<? foreach($_SESSION['_config']['translations'] as $key => $val) { ?>
|
||||
<a href="index.php?id=<?=$id?>&lang=<?=$key?>"><?=$val?></a>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
|
|
@ -165,6 +165,12 @@
|
|||
if(mysql_num_rows($res) > 0)
|
||||
{
|
||||
$_SESSION['profile'] = mysql_fetch_assoc($res);
|
||||
if($_SESSION['profile']['language'] == "")
|
||||
{
|
||||
$query = "update `users` set `language`='".$_SESSION['_config']['language']."'
|
||||
where `id`='".$_SESSION['profile']['id']."'";
|
||||
mysql_query($query);
|
||||
}
|
||||
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
||||
$res = mysql_query($query);
|
||||
$row = mysql_fetch_assoc($res);
|
||||
|
|
52
www/onestat.js
Normal file
52
www/onestat.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* calls OneStat image/link
|
||||
*
|
||||
* @package org.cacert.framework
|
||||
* @author OneStat.com
|
||||
* @copyright Copyright (C) 2002, {@link http://www.onestat.com/ OneStat.com }
|
||||
* @version $Id: onestat.js,v 1.3 2004/10/16 14:45:32 root Exp $
|
||||
*/
|
||||
|
||||
// Modification of this code is not allowed and will permanently disable your account!
|
||||
// Account ID: 164863
|
||||
// Site URL : http://www.cacert.org
|
||||
// Copyright (C) 2002 OneStat.com All Rights Reserved
|
||||
function OneStat_Tag()
|
||||
{
|
||||
var CONTENTSECTION= "";
|
||||
var CUSTOMDATA= "";
|
||||
var osp_URL= document.URL;
|
||||
var osp_Title= document.title;
|
||||
|
||||
function A(B, C)
|
||||
{
|
||||
W+="&"+B+"="+escape(C);
|
||||
}
|
||||
|
||||
var t = new Date();
|
||||
|
||||
var W="http"+(document.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/asp/stat.asp?tagver=1&sid=164863";
|
||||
|
||||
A( "tz", t.getTimezoneOffset());
|
||||
A( "ch", t.getHours());
|
||||
A( "ti", typeof(osp_Title)== "string" ? osp_Title : document.title);
|
||||
A( "url", typeof(osp_URL)== "string" ? osp_URL : document.URL);
|
||||
A( "rf", parent==self ? window.document.referrer : top.document.referrer);
|
||||
A( "js", "Yes");
|
||||
A( "ul", navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
|
||||
if(typeof(screen)=="object")
|
||||
{
|
||||
A( "sr", screen.width+"x"+screen.height);
|
||||
A( "cd", screen.colorDepth);
|
||||
A( "jo", navigator.javaEnabled()?"Yes":"No");
|
||||
}
|
||||
A( "section", typeof(CONTENTSECTION)== "string" ? CONTENTSECTION : "");
|
||||
A( "custom", typeof(CUSTOMDATA)== "string" ? CUSTOMDATA : "");
|
||||
if( W.length>2048 && navigator.userAgent.indexOf('MSIE')>=0)
|
||||
W= W.substring( 0, 2043)+"&tu=1";
|
||||
|
||||
document.write('<a href="http://www.onestat.com/asp/login.asp?sid=164863" target="_blank"><img id="ONESTAT_TAG" border="0" src="'+W+'" alt="This Site Tracked by OneStat.com"></a>');
|
||||
|
||||
}
|
||||
|
||||
OneStat_Tag();
|
|
@ -21,7 +21,7 @@
|
|||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Untitled Document</title>
|
||||
<title>CAcert Source License</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
|
@ -53,10 +53,10 @@ Source Code License Terms</p>
|
|||
<li>give (meaning sell, loan, distribute, or transfer) the source code files to anyone else (unless you are downloading the source code files in the course of performing duties for your employer, in which case you can share the source code files with fellow employees as long as you don't make additional copies and otherwise comply with these license terms ' if this seems overly restrictive, remember that other people who want to have access to these source code files can also come to the CAcert web site to download them, but for important legal reasons we need to require that each copy of the source code be obtained directly from CAcert); </li>
|
||||
<li>use versions of CAcert software created for any purpose or reason other than verifying that there are no unknown vulnerabilities or the like or otherwise making your own assessment of the integrity of the source code and the security features of the CAcert software; or </li>
|
||||
</ol>
|
||||
<p>If you have any questions about what is or is not permitted under these license terms or if you would like to obtain the right to use CAcert source code in ways that are not allowed under these license terms, you should contact CAcert at <a href="mailto:source@pgp.com">bugs@cacert.org </a>. </p>
|
||||
<p>If you have any questions about what is or is not permitted under these license terms or if you would like to obtain the right to use CAcert source code in ways that are not allowed under these license terms, you should contact CAcert at <a href="mailto:bugs@cacert.org">bugs@cacert.org </a>. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Reporting Bugs and the Like. If you discover any 'bug' or problem in the source code in these files, or anything you think is a 'bug' or problem in the source code or a deficiency or weakness in the security features of the CAcert software, you should report the bug, problem, deficiency, or weakness (including any suggested code fixes you have prepared or any other information you have that could help CAcert reproduce, verify, and correct it) to CAcert at <a href="mailto:source@pgp.com">bugs@cacert.org </a>. </p>
|
||||
<p>Reporting Bugs and the Like. If you discover any 'bug' or problem in the source code in these files, or anything you think is a 'bug' or problem in the source code or a deficiency or weakness in the security features of the CAcert software, you should report the bug, problem, deficiency, or weakness (including any suggested code fixes you have prepared or any other information you have that could help CAcert reproduce, verify, and correct it) to CAcert at <a href="mailto:bugs@cacert.org">bugs@cacert.org </a>. </p>
|
||||
<p>CAcert will endeavor to send an email acknowledgment (signed by CAcert) within five business days for those reports that describe a serious security bug, problem, deficiency, or weakness in the CAcert software. If you do not receive such an email acknowledgment to a report you submitted (and you think you should have), please re-submit the report to CAcert as soon as possible. </p>
|
||||
<p>You agree that you will not post any information about any bug, problem, deficiency, or weakness in the CAcert software on any web site or electronic bulletin board, or otherwise disclose or provide any such information to anyone else, unless you have first reported it to CAcert and until at least 30 days after CAcert sends its email acknowledgment to you. </p>
|
||||
<p>CAcert takes reported bugs and security weaknesses in its software very seriously and strives to offer its customers the most secure and reliable software products available (given the functionality, features, and price of the software). However, CAcert cannot promise that it will respond to, analyze, attempt to correct, or correct each and every bug or security weakness that is reported to CAcert, and hence CAcert will have no obligation to you under these license terms to respond to, analyze, attempt to correct, or correct any bug, problem, deficiency, or weakness you report to CAcert. If CAcert does correct a bug, problem, deficiency, or weakness in a CAcert software program you report to CAcert under these license terms, the correction will be made available to CAcert's customers in a subsequent patch, update, or general release of the affected CAcert software. </p>
|
||||
|
|
15
www/wot.php
15
www/wot.php
|
@ -51,6 +51,21 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
if($_SERVER['HTTP_HOST'] == "secure.cacert.org" && $_SESSION['profile']['id'] > 0)
|
||||
{
|
||||
$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
|
||||
$res = mysql_query($query);
|
||||
$row = mysql_fetch_assoc($res);
|
||||
$_SESSION['profile']['points'] = $row['total'];
|
||||
|
||||
if($_SESSION['profile']['language'] == "")
|
||||
{
|
||||
$query = "update `users` set `language`='".$_SESSION['_config']['language']."'
|
||||
where `id`='".$_SESSION['profile']['id']."'";
|
||||
mysql_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
if($id == "logout")
|
||||
{
|
||||
$_SESSION['profile']['loggedin'] = 0;
|
||||
|
|
Loading…
Reference in a new issue