Merge lp:~vierbergenlars/remotecp-panel/openid into lp:~vierbergenlars/remotecp-panel/trunk

Proposed by Lars Vierbergen
Status: Merged
Approved by: Lars Vierbergen
Approved revision: 168
Merged at revision: 186
Proposed branch: lp:~vierbergenlars/remotecp-panel/openid
Merge into: lp:~vierbergenlars/remotecp-panel/trunk
Diff against target: 4885 lines (+4307/-2) (has conflicts)
14 files modified
css/panel.css (+4/-0)
frame.php (+214/-0)
inc/openid/op.php (+847/-0)
inc/openid/rp.php (+768/-0)
inc/sitemgmt/constants.php (+30/-0)
inc/users/users.php (+340/-0)
openid/create_account.php (+46/-0)
openid/link_account.php (+40/-0)
openid/login.php (+79/-0)
scripts/openid.js.php (+98/-0)
static/css/openid.css (+69/-0)
static/public_js/openid-jquery.js (+194/-0)
system_local/user_props.php (+131/-0)
t/default.pot (+1447/-2)
Text conflict in css/panel.css
Text conflict in frame.php
Text conflict in inc/sitemgmt/constants.php
Text conflict in inc/users/users.php
Contents conflict in system_local/login.php
Text conflict in system_local/user_props.php
Text conflict in t/default.pot
To merge this branch: bzr merge lp:~vierbergenlars/remotecp-panel/openid
Reviewer Review Type Date Requested Status
Lars Vierbergen Approve
Review via email: mp+65548@code.launchpad.net

Description of the change

This branch adds OpenID signin possiblity to RemoteCP Panel.
Users can link as much OpenIDs to their account as they want, accounts can be configured without password to allow only OpenID signins

To post a comment you must log in.
167. By Lars Vierbergen

Get the design right, use AJAX

168. By Lars Vierbergen

Add option to remove OpenID

Revision history for this message
Lars Vierbergen (vierbergenlars) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'css/panel.css'
2--- css/panel.css 2011-08-23 08:08:41 +0000
3+++ css/panel.css 2011-09-05 19:10:37 +0000
4@@ -1,4 +1,8 @@
5 #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
6+<<<<<<< TREE
7 #tabs div a, #tabs div .link {cursor: pointer; text-decoration: underline; color: blue;}
8+=======
9+#tabs div a, .link {cursor: pointer; text-decoration: underline; color: blue;}
10+>>>>>>> MERGE-SOURCE
11 .ui-progressbar-value { background-image: url(<?php echo URL_JQUERY; ?>/images/pbar-ani.gif); }
12 .ui-sortable { list-style: none; padding: 1 em;}
13\ No newline at end of file
14
15=== modified file 'frame.php'
16--- frame.php 2011-09-02 16:38:47 +0000
17+++ frame.php 2011-09-05 19:10:37 +0000
18@@ -1,3 +1,4 @@
19+<<<<<<< TREE
20 <?php //@./frame.php ?><?php
21 define('NO_UURL',true);
22 require('inc/controllers.php');
23@@ -215,4 +216,217 @@
24
25 </script>
26 </body>
27+=======
28+<?php //@./frame.php ?><?php
29+define('NO_UURL',true);
30+require('inc/controllers.php');
31+?>
32+<!DOCTYPE>
33+<html>
34+<head>
35+<title>RemoteCP</title>
36+<link type="text/css" href="<?php echo URL_JQUERY; ?>/css/jquery-ui.css" rel="stylesheet">
37+<link type="text/css" href="<?php echo DOMAIN; ?>/style.css" rel="stylesheet">
38+<script src='<?php echo DOMAIN; ?>/scripts.js'></script>
39+<script type="application/javascript">
40+var URL_SCRIPTS="<?php echo URL_SCRIPTS; ?>"; //PHP Constant URL_SCRIPTS
41+var loaded_scripts=new Array('NULL');
42+var UURL="<?php echo $_SESSION['uurl']; ?>"; //Your unique URL
43+</script>
44+<script type='application/javascript'>
45+var recalcFrames_offset=100; //This is the size of the top panel.
46+var frames = {
47+ resize_frames: function(new_height) {
48+ frms=document.getElementsByTagName('iframe');
49+ for(i=0;i<frms.length;i++) {
50+ frm=frms[i];
51+ frm.style.height=new_height;
52+ }
53+ },
54+ getFrameTitle: function(id) {
55+ if(frd=document.getElementById(id).contentDocument) {
56+ return frd.title;
57+ }
58+ return document.getElementById(id).contentWindow.document.title;
59+ },
60+ makeSelector: function() {
61+ html='';
62+ frms=document.getElementsByTagName('iframe');
63+ activefrmid=this.activeFrame().id;
64+ for(i=0;i<frms.length;i++) {
65+ frm=frms[i];
66+ fid=frm.id;
67+ title=this.getFrameTitle(fid).substr('RemoteCP - '.length);
68+ if(fid==activefrmid) active='checked';
69+ else active=''
70+ html+='<input type=\'radio\' name=\'frame-select-but\' id=\'frame-select-but_'+fid+'\' value=\''+fid+'\' '+active+' onclick=\'frames.change(this.value)\'><label for=\'frame-select-but_'+fid+'\'>'+title+'<\/label>';
71+ }
72+ document.getElementById('frame-selector').innerHTML=html;
73+ $('#frame-selector').buttonset();
74+ },
75+ addFrame: function(link) {
76+ $("#loading").show();
77+ frm=document.createElement('iframe');
78+ frm.setAttribute('src',link+'?uurl='+UURL);
79+ fid=Math.round(Math.random()*10E16);
80+ frm.setAttribute('id',fid);
81+ document.getElementById('frames').appendChild(frm);
82+ this.change(fid);
83+ frm.focus();
84+ recalcFrames();
85+ setTimeout('frames.makeSelector();$("#loading").hide()',2000);
86+ },
87+ change: function(id) {
88+ this.hideFrames();
89+ $('iframe#'+id).show();
90+ resetTitle();
91+ },
92+ hideFrames: function() {
93+ $('iframe').hide();
94+ },
95+ activeFrame: function() {
96+ frms=document.getElementsByTagName('iframe');
97+ for(i=0;i<frms.length;i++) {
98+ frm=frms[i];
99+ if(frm.style.display!='none')
100+ return frm;
101+ }
102+ },
103+ removeFrame: function(frm) {
104+ $('#frame-select-but_'+frm.id).remove();
105+ this.change($('iframe')[0].id);
106+ $(frm).remove();
107+ this.makeSelector();
108+ }
109+
110+};
111+function recalcFrames () {
112+ // From http://www.webdeveloper.com/forum/showthread.php?t=161412
113+ var scnWid,scnHei;
114+ if (self.innerHeight) // all except Explorer
115+ {
116+ scnHei = self.innerHeight;
117+ }
118+ else if (document.documentElement && document.documentElement.clientHeight)
119+ // Explorer 6 Strict Mode
120+ {
121+ scnHei = document.documentElement.clientHeight;
122+ }
123+ else if (document.body) // other Explorers
124+ {
125+ scnHei = document.body.clientHeight;
126+ }
127+ // End from http://www.webdeveloper.com/forum/showthread.php?t=161412
128+ frames.resize_frames(scnHei-recalcFrames_offset);
129+}
130+window.onresize=recalcFrames;
131+function initFrames() {
132+ frms=document.getElementsByTagName('iframe');
133+ for(i=0;i<frms.length;i++) {
134+ frm=frms[i];
135+ frm.id=Math.round(Math.random()*10E16);
136+
137+ }
138+}
139+function refreshFrames() {
140+ frms=document.getElementsByTagName('iframe');
141+ for(i=0;i<frms.length;i++) {
142+ frm=frms[i];
143+ frm.src=frm.src;
144+
145+ }
146+}
147+function resetTitle() {
148+ document.title='RemoteCP - '+frames.getFrameTitle(frames.activeFrame().id).substr('RemoteCP - '.length);
149+}
150+setInterval('resetTitle()',800);
151+</script>
152+<script type='text/javascript'>
153+$(function(){
154+ // GUI classes
155+ $('.gui-dlg').dialog({
156+ autoOpen: false,
157+ width: 600,
158+ show: 'puff',
159+ hide: 'fold'
160+ });
161+
162+ $('.gui-dlg-alert').dialog({
163+ resizable: false,
164+ draggable: false,
165+ buttons: {
166+ "<?php echo $t->_('Ok'); ?>": function() {
167+ $(this).dialog("close");
168+ }
169+ }
170+ });
171+ $('.gui-dlg-fs').dialog({ modal: true});
172+ $('.gui-dlg-noresize').dialog({ resizable: false});
173+
174+ $('.gui-button').button();
175+ // GUI specifieke opties
176+ $('#button_log-off').button({
177+ icons: {
178+ primary: 'ui-icon-key'
179+ }
180+ });
181+ $('#button_register').button({
182+ icons: {
183+ primary: 'ui-icon-person'
184+ }
185+ });
186+ $('#dlg_log-in').dialog({
187+ buttons: {
188+ "<?php echo $t->_('Log in'); ?>": function() {
189+ simplerequest.post('panel.php?control=login&uurl='+UURL,'user='+document.login.user.value+'&pass='+document.login.pass.value,'<?php echo $t->_('Logged in'); ?>','<?php echo $t->_('Login failed'); ?>',function () {
190+ refreshFrames();
191+ $('#dlg_log-in').dialog('close');
192+ });
193+ },
194+ "<?php echo $t->_('Login with OpenID'); ?>": function() {
195+ dlg=top.$('<div class=\'gui-gen-dialog\' id=\'dlg_openid\'></div>').load('openid/login.php',function() {
196+ dlg.dialog({width:'auto',close:function() {$(this).parent().remove();}}).dialog('moveToTop');
197+ });
198+
199+ //window.open('openid/login.php').opener=self;
200+ }
201+ },
202+ close: function() {
203+ document.login.reset();
204+ }
205+ }
206+ );
207+
208+ <?php if(!session::$logged_in) { echo "$('#dlg_log-in').dialog('open');" ;}?>
209+ });
210+</script>
211+</head>
212+<body onload='initFrames(); recalcFrames()' onresize='recalcFrames()'>
213+<ul id='messages'></ul>
214+<div id='login-container'>
215+ <span class="gui-button" id="button_log-off" onclick="$.ajax({async:false,url:'panel.php?control=logoff&uurl='+UURL});refreshFrames(); $('#dlg_log-in').dialog('open'); return false;"><?php echo $t->_('Log off'); ?></span>
216+ <span class="gui-button" id="button_register" onclick="$('#dlg_register').empty().append(sjax.get('panel.php?control=register&uurl='+UURL)).dialog('open');return false;"><?php echo $t->_('Register'); ?></span>
217+ <div id='versions'>
218+ <div id='v-remotecp'>remotecp-panel trunk <span style='color:red'>Unstable</span></div>
219+ <div id='v-mysqlfs'>mysqlfs V2.1</div>
220+ <div id='v-httpmysql'>httpmysql V1.4</div>
221+ </div>
222+ <div id='frame-selector'></div>
223+ <img id='loading' alt="Loading..." src="<?php echo URL_IMG; ?>/load/small.gif">
224+ <div id="dlg_log-in" title="<?php echo $t->_('Log in'); ?>" class="gui-dlg gui-dlg-fs gui-dlg-noresize">
225+ <form name="login">
226+ <?php echo $t->_('Username'); ?>: <input type="text" name="user" id="login-user"><br>
227+ <?php echo $t->_('Password'); ?>: <input type="password" name="pass" id="login-pass">
228+ </form>
229+ </div>
230+ <div id="dlg_register" title="<?php echo $t->_('Register'); ?>" class="gui-dlg gui-dlg-fs gui-dlg-noresize">
231+ </div>
232+</div>
233+<div id='frames'>
234+</div>
235+<script type='application/javascript'>
236+frames.addFrame('panel.php');
237+</script>
238+</body>
239+>>>>>>> MERGE-SOURCE
240 </html>
241\ No newline at end of file
242
243=== added directory 'inc/openid'
244=== added file 'inc/openid/op.php'
245--- inc/openid/op.php 1970-01-01 00:00:00 +0000
246+++ inc/openid/op.php 2011-09-05 19:10:37 +0000
247@@ -0,0 +1,847 @@
248+<?php
249+/**
250+ * Using this class, you can easily set up an OpenID Provider.
251+ * It's independent of LightOpenID class.
252+ * It requires either GMP or BCMath for session encryption,
253+ * but will work without them (although either via SSL, or in stateless mode only).
254+ * Also, it requires PHP >= 5.1.2
255+ *
256+ * This is an alpha version, using it in production code is not recommended,
257+ * until you are *sure* that it works and is secure.
258+ *
259+ * Please send me messages about your testing results
260+ * (even if successful, so I know that it has been tested).
261+ * Also, if you think there's a way to make it easier to use, tell me -- it's an alpha for a reason.
262+ * Same thing applies to bugs in code, suggestions,
263+ * and everything else you'd like to say about the library.
264+ *
265+ * There's no usage documentation here, see the examples.
266+ *
267+ * @author Mewp
268+ * @copyright Copyright (c) 2010, Mewp
269+ * @license http://www.opensource.org/licenses/mit-license.php MIT
270+ * @version master_2011-06-12
271+ * @package login
272+ * @subpackage openid
273+ */
274+abstract class LightOpenIDProvider
275+{
276+ # URL-s to XRDS and server location.
277+ public $xrdsLocation, $serverLocation;
278+
279+ # Should we operate in server, or signon mode?
280+ public $select_id = false;
281+
282+ # Lifetime of an association.
283+ protected $assoc_lifetime = 600;
284+
285+ # Variables below are either set automatically, or are constant.
286+ # -----
287+ # Can we support DH?
288+ protected $dh = true;
289+ protected $ns = 'http://specs.openid.net/auth/2.0';
290+ protected $data, $assoc;
291+
292+ # Default DH parameters as defined in the specification.
293+ protected $default_modulus;
294+ protected $default_gen = 'Ag==';
295+
296+ # AX <-> SREG transform
297+ protected $ax_to_sreg = array(
298+ 'namePerson/friendly' => 'nickname',
299+ 'contact/email' => 'email',
300+ 'namePerson' => 'fullname',
301+ 'birthDate' => 'dob',
302+ 'person/gender' => 'gender',
303+ 'contact/postalCode/home' => 'postcode',
304+ 'contact/country/home' => 'country',
305+ 'pref/language' => 'language',
306+ 'pref/timezone' => 'timezone',
307+ );
308+
309+ # Math
310+ private $add, $mul, $pow, $mod, $div, $powmod;
311+ # -----
312+
313+ # ------------------------------------------------------------------------ #
314+ # Functions you probably want to implement when extending the class.
315+
316+ /**
317+ * Checks whether an user is authenticated.
318+ * The function should determine what fields it wants to send to the RP,
319+ * and put them in the $attributes array.
320+ * @param Array $attributes
321+ * @param String $realm Realm used for authentication.
322+ * @return String OP-local identifier of an authenticated user, or an empty value.
323+ */
324+ abstract function checkid($realm, &$attributes);
325+
326+ /**
327+ * Displays an user interface for inputting user's login and password.
328+ * Attributes are always AX field namespaces, with stripped host part.
329+ * For example, the $attributes array may be:
330+ * array( 'required' => array('namePerson/friendly', 'contact/email'),
331+ * 'optional' => array('pref/timezone', 'pref/language')
332+ * @param String $identity Discovered identity string. May be used to extract login, unless using $this->select_id
333+ * @param String $realm Realm used for authentication.
334+ * @param String Association handle. must be sent as openid.assoc_handle in $_GET or $_POST in subsequent requests.
335+ * @param Array User attributes requested by the RP.
336+ */
337+ abstract function setup($identity, $realm, $assoc_handle, $attributes);
338+
339+ /**
340+ * Stores an association.
341+ * If you want to use php sessions in your provider code, you have to replace it.
342+ * @param String $handle Association handle -- should be used as a key.
343+ * @param Array $assoc Association data.
344+ */
345+ protected function setAssoc($handle, $assoc)
346+ {
347+ $oldSession = session_id();
348+ session_commit();
349+ session_id($assoc['handle']);
350+ session_start();
351+ $_SESSION['assoc'] = $assoc;
352+ session_commit();
353+ if($oldSession) {
354+ session_id($oldSession);
355+ session_start();
356+ }
357+ }
358+
359+ /**
360+ * Retreives association data.
361+ * If you want to use php sessions in your provider code, you have to replace it.
362+ * @param String $handle Association handle.
363+ * @return Array Association data.
364+ */
365+ protected function getAssoc($handle)
366+ {
367+ $oldSession = session_id();
368+ session_commit();
369+ session_id($handle);
370+ session_start();
371+ if(empty($_SESSION['assoc'])) {
372+ return null;
373+ }
374+ return $_SESSION['assoc'];
375+ session_commit();
376+ if($oldSession) {
377+ session_id($oldSession);
378+ session_start();
379+ }
380+ }
381+
382+ /**
383+ * Deletes an association.
384+ * If you want to use php sessions in your provider code, you have to replace it.
385+ * @param String $handle Association handle.
386+ */
387+ protected function delAssoc($handle)
388+ {
389+ $oldSession = session_id();
390+ session_commit();
391+ session_id($handle);
392+ session_start();
393+ session_destroy();
394+ if($oldSession) {
395+ session_id($oldSession);
396+ session_start();
397+ }
398+ }
399+
400+ # ------------------------------------------------------------------------ #
401+ # Functions that you might want to implement.
402+
403+ /**
404+ * Redirects the user to an url.
405+ * @param String $location The url that the user will be redirected to.
406+ */
407+ protected function redirect($location)
408+ {
409+ header('Location: ' . $location);
410+ die();
411+ }
412+
413+ /**
414+ * Generates a new association handle.
415+ * @return string
416+ */
417+ protected function assoc_handle()
418+ {
419+ return sha1(microtime());
420+ }
421+
422+ /**
423+ * Generates a random shared secret.
424+ * @return string
425+ */
426+ protected function shared_secret($hash)
427+ {
428+ $length = 20;
429+ if($hash == 'sha256') {
430+ $length = 256;
431+ }
432+
433+ $secret = '';
434+ for($i = 0; $i < $length; $i++) {
435+ $secret .= mt_rand(0,255);
436+ }
437+
438+ return $secret;
439+ }
440+
441+ /**
442+ * Generates a private key.
443+ * @param int $length Length of the key.
444+ */
445+ protected function keygen($length)
446+ {
447+ $key = '';
448+ for($i = 1; $i < $length; $i++) {
449+ $key .= mt_rand(0,9);
450+ }
451+ $key .= mt_rand(1,9);
452+
453+ return $key;
454+ }
455+
456+ # ------------------------------------------------------------------------ #
457+ # Functions that you probably shouldn't touch.
458+
459+ function __construct()
460+ {
461+ $this->default_modulus =
462+ 'ANz5OguIOXLsDhmYmsWizjEOHTdxfo2Vcbt2I3MYZuYe91ouJ4mLBX+YkcLiemOcPy'
463+ . 'm2CBRYHNOyyjmG0mg3BVd9RcLn5S3IHHoXGHblzqdLFEi/368Ygo79JRnxTkXjgmY0'
464+ . 'rxlJ5bU1zIKaSDuKdiI+XUkKJX8Fvf8W8vsixYOr';
465+
466+ $location = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
467+ . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
468+ $location = preg_replace('/\?.*/','',$location);
469+ $this->serverLocation = $location;
470+ $location .= (strpos($location, '?') ? '&' : '?') . 'xrds';
471+ $this->xrdsLocation = $location;
472+
473+ $this->data = $_GET + $_POST;
474+
475+ # We choose GMP if avaiable, and bcmath otherwise
476+ if(function_exists('gmp_add')) {
477+ $this->add = 'gmp_add';
478+ $this->mul = 'gmp_mul';
479+ $this->pow = 'gmp_pow';
480+ $this->mod = 'gmp_mod';
481+ $this->div = 'gmp_div';
482+ $this->powmod = 'gmp_powm';
483+ } elseif(function_exists('bcadd')) {
484+ $this->add = 'bcadd';
485+ $this->mul = 'bcmul';
486+ $this->pow = 'bcpow';
487+ $this->mod = 'bcmod';
488+ $this->div = 'bcdiv';
489+ $this->powmod = 'bcpowmod';
490+ } else {
491+ # If neither are avaiable, we can't use DH
492+ $this->dh = false;
493+ }
494+
495+ # However, we do require the hash functions.
496+ # They should be built-in anyway.
497+ if(!function_exists('hash_algos')) {
498+ $this->dh = false;
499+ }
500+ }
501+
502+ /**
503+ * Displays an XRDS document, or redirects to it.
504+ * By default, it detects whether it should display or redirect automatically.
505+ * @param bool|null $force When true, always display the document, when false always redirect.
506+ */
507+ function xrds($force=null)
508+ {
509+ if($force) {
510+ echo $this->xrdsContent();
511+ die();
512+ } elseif($force === false) {
513+ header('X-XRDS-Location: '. $this->xrdsLocation);
514+ return;
515+ }
516+
517+ if (isset($_GET['xrds'])
518+ || (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xrds+xml') !== false)
519+ ) {
520+ header('Content-Type: application/xrds+xml');
521+ echo $this->xrdsContent();
522+ die();
523+ }
524+
525+ header('X-XRDS-Location: ' . $this->xrdsLocation);
526+ }
527+
528+ /**
529+ * Returns the content of the XRDS document
530+ * @return String The XRDS document.
531+ */
532+ protected function xrdsContent()
533+ {
534+ $lines = array(
535+ '<?xml version="1.0" encoding="UTF-8"?>',
536+ '<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">',
537+ '<XRD>',
538+ ' <Service>',
539+ ' <Type>' . $this->ns . '/' . ($this->select_id ? 'server' : 'signon') .'</Type>',
540+ ' <URI>' . $this->serverLocation . '</URI>',
541+ ' </Service>',
542+ '</XRD>',
543+ '</xrds:XRDS>'
544+ );
545+ return implode("\n", $lines);
546+ }
547+
548+ /**
549+ * Does everything that a provider has to -- in one function.
550+ */
551+ function server()
552+ {
553+ if(isset($this->data['openid_assoc_handle'])) {
554+ $this->assoc = $this->getAssoc($this->data['openid_assoc_handle']);
555+ if(isset($this->assoc['data'])) {
556+ # We have additional data stored for setup.
557+ $this->data += $this->assoc['data'];
558+ unset($this->assoc['data']);
559+ }
560+ }
561+
562+ if (isset($this->data['openid_ns'])
563+ && $this->data['openid_ns'] == $this->ns
564+ ) {
565+ if(!isset($this->data['openid_mode'])) $this->errorResponse();
566+
567+ switch($this->data['openid_mode'])
568+ {
569+ case 'checkid_immediate':
570+ case 'checkid_setup':
571+ $this->checkRealm();
572+ # We support AX xor SREG.
573+ $attributes = $this->ax();
574+ if(!$attributes) {
575+ $attributes = $this->sreg();
576+ }
577+
578+ # Even if some user is authenticated, we need to know if it's
579+ # the same one that want's to authenticate.
580+ # Of course, if we use select_id, we accept any user.
581+ if (($identity = $this->checkid($this->data['openid_realm'], $attrValues))
582+ && ($this->select_id || $identity == $this->data['openid_identity'])
583+ ) {
584+ $this->positiveResponse($identity, $attrValues);
585+ } elseif($this->data['openid_mode'] == 'checkid_immediate') {
586+ $this->redirect($this->response(array('openid.mode' => 'setup_needed')));
587+ } else {
588+ if(!$this->assoc) {
589+ $this->generateAssociation();
590+ $this->assoc['private'] = true;
591+ }
592+ $this->assoc['data'] = $this->data;
593+ $this->setAssoc($this->assoc['handle'], $this->assoc);
594+ $this->setup($this->data['openid_identity'],
595+ $this->data['openid_realm'],
596+ $this->assoc['handle'],
597+ $attributes);
598+ }
599+ break;
600+ case 'associate':
601+ $this->associate();
602+ break;
603+ case 'check_authentication':
604+ $this->checkRealm();
605+ if($this->verify()) {
606+ echo "ns:$this->ns\nis_valid:true";
607+ if(strpos($this->data['openid_signed'],'invalidate_handle') !== false) {
608+ echo "\ninvalidate_handle:" . $this->data['openid_invalidate_handle'];
609+ }
610+ } else {
611+ echo "ns:$this->ns\nis_valid:false";
612+ }
613+ die();
614+ break;
615+ default:
616+ $this->errorResponse();
617+ }
618+ } else {
619+ $this->xrds();
620+ }
621+ }
622+
623+ protected function checkRealm()
624+ {
625+ if (!isset($this->data['openid_return_to'], $this->data['openid_realm'])) {
626+ $this->errorResponse();
627+ }
628+
629+ $realm = str_replace('\*', '[^/]', preg_quote($this->data['openid_realm']));
630+ if(!preg_match("#^$realm#", $this->data['openid_return_to'])) {
631+ $this->errorResponse();
632+ }
633+ }
634+
635+ protected function ax()
636+ {
637+ # Namespace prefix that the fields must have.
638+ $ns = 'http://axschema.org/';
639+
640+ # First, we must find out what alias is used for AX.
641+ # Let's check the most likely one
642+ $alias = null;
643+ if (isset($this->data['openid_ns_ax'])
644+ && $this->data['openid_ns_ax'] == 'http://openid.net/srv/ax/1.0'
645+ ) {
646+ $alias = 'ax';
647+ } else {
648+ foreach($this->data as $name => $value) {
649+ if ($value == 'http://openid.net/srv/ax/1.0'
650+ && preg_match('/openid_ns_(.+)/', $name, $m)
651+ ) {
652+ $alias = $m[1];
653+ break;
654+ }
655+ }
656+ }
657+
658+ if(!$alias) {
659+ return null;
660+ }
661+
662+ $fields = array();
663+ # Now, we must search again, this time for field aliases
664+ foreach($this->data as $name => $value) {
665+ if (strpos($name, 'openid_' . $alias . '_type') === false
666+ || strpos($value, $ns) === false) {
667+ continue;
668+ }
669+
670+ $name = substr($name, strlen('openid_' . $alias . '_type_'));
671+ $value = substr($value, strlen($ns));
672+
673+ $fields[$name] = $value;
674+ }
675+
676+ # Then, we find out what fields are required and optional
677+ $required = array();
678+ $if_available = array();
679+ foreach(array('required','if_available') as $type) {
680+ if(empty($this->data["openid_{$alias}_{$type}"])) {
681+ continue;
682+ }
683+ $attributes = explode(',', $this->data["openid_{$alias}_{$type}"]);
684+ foreach($attributes as $attr) {
685+ if(empty($fields[$attr])) {
686+ # There is an undefined field here, so we ignore it.
687+ continue;
688+ }
689+
690+ ${$type}[] = $fields[$attr];
691+ }
692+ }
693+
694+ $this->data['ax'] = true;
695+ return array('required' => $required, 'optional' => $if_available);
696+ }
697+
698+ protected function sreg()
699+ {
700+ $sreg_to_ax = array_flip($this->ax_to_sreg);
701+
702+ $attributes = array('required' => array(), 'optional' => array());
703+
704+ if (empty($this->data['openid_sreg_required'])
705+ && empty($this->data['openid_sreg_optional'])
706+ ) {
707+ return $attributes;
708+ }
709+
710+ foreach(array('required', 'optional') as $type) {
711+ foreach(explode(',',$this->data['openid_sreg_' . $type]) as $attr) {
712+ if(empty($sreg_to_ax[$attr])) {
713+ # Undefined attribute in SREG request.
714+ # Shouldn't happen, but we check anyway.
715+ continue;
716+ }
717+
718+ $attributes[$type][] = $sreg_to_ax[$attr];
719+ }
720+ }
721+
722+ return $attributes;
723+ }
724+
725+ /**
726+ * Aids an RP in assertion verification.
727+ * @return bool Information whether the verification suceeded.
728+ */
729+ protected function verify()
730+ {
731+ # Firstly, we need to make sure that there's an association.
732+ # Otherwise the verification will fail,
733+ # because we've signed assoc_handle in the assertion
734+ if(empty($this->assoc)) {
735+ return false;
736+ }
737+
738+ # Next, we check that it's a private association,
739+ # i.e. one made without RP input.
740+ # Otherwise, the RP shouldn't ask us to verify.
741+ if(empty($this->assoc['private'])) {
742+ return false;
743+ }
744+
745+ # Now we have to check if the nonce is correct, to prevent replay attacks.
746+ if($this->data['openid_response_nonce'] != $this->assoc['nonce']) {
747+ return false;
748+ }
749+
750+ # Getting the signed fields for signature.
751+ $sig = array();
752+ $signed = explode(',', $this->data['openid_signed']);
753+ foreach($signed as $field) {
754+ $name = strtr($field, '.', '_');
755+ if(!isset($this->data['openid_' . $name])) {
756+ return false;
757+ }
758+
759+ $sig[$field] = $this->data['openid_' . $name];
760+ }
761+
762+ # Computing the signature and checking if it matches.
763+ $sig = $this->keyValueForm($sig);
764+ if ($this->data['openid_sig'] !=
765+ base64_encode(hash_hmac($this->assoc['hash'], $sig, $this->assoc['mac'], true))
766+ ) {
767+ return false;
768+ }
769+
770+ # Clearing the nonce, so that it won't be used again.
771+ $this->assoc['nonce'] = null;
772+
773+ if(empty($this->assoc['private'])) {
774+ # Commiting changes to the association.
775+ $this->setAssoc($this->assoc['handle'], $this->assoc);
776+ } else {
777+ # Private associations shouldn't be used again, se we can as well delete them.
778+ $this->delAssoc($this->assoc['handle']);
779+ }
780+
781+ # Nothing has failed, so the verification was a success.
782+ return true;
783+ }
784+
785+ /**
786+ * Performs association with an RP.
787+ */
788+ protected function associate()
789+ {
790+ # Rejecting no-encryption without TLS.
791+ if(empty($_SERVER['HTTPS']) && $this->data['openid_session_type'] == 'no-encryption') {
792+ $this->directErrorResponse();
793+ }
794+
795+ # Checking whether we support DH at all.
796+ if (!$this->dh && substr($this->data['openid_session_type'], 0, 2) == 'DH') {
797+ $this->redirect($this->response(array(
798+ 'openid.error' => 'DH not supported',
799+ 'openid.error_code' => 'unsupported-type',
800+ 'openid.session_type' => 'no-encryption'
801+ )));
802+ }
803+
804+ # Creating the association
805+ $this->assoc = array();
806+ $this->assoc['hash'] = $this->data['openid_assoc_type'] == 'HMAC-SHA256' ? 'sha256' : 'sha1';
807+ $this->assoc['handle'] = $this->assoc_handle();
808+
809+ # Getting the shared secret
810+ if($this->data['openid_session_type'] == 'no-encryption') {
811+ $this->assoc['mac'] = base64_encode($this->shared_secret($this->assoc['hash']));
812+ } else {
813+ $this->dh();
814+ }
815+
816+ # Preparing the direct response...
817+ $response = array(
818+ 'ns' => $this->ns,
819+ 'assoc_handle' => $this->assoc['handle'],
820+ 'assoc_type' => $this->data['openid_assoc_type'],
821+ 'session_type' => $this->data['openid_session_type'],
822+ 'expires_in' => $this->assoc_lifetime
823+ );
824+
825+ if(isset($this->assoc['dh_server_public'])) {
826+ $response['dh_server_public'] = $this->assoc['dh_server_public'];
827+ $response['enc_mac_key'] = $this->assoc['mac'];
828+ } else {
829+ $response['mac_key'] = $this->assoc['mac'];
830+ }
831+
832+ # ...and sending it.
833+ echo $this->keyValueForm($response);
834+ die();
835+ }
836+
837+ /**
838+ * Creates a private association.
839+ */
840+ protected function generateAssociation()
841+ {
842+ $this->assoc = array();
843+ # We use sha1 by default.
844+ $this->assoc['hash'] = 'sha1';
845+ $this->assoc['mac'] = $this->shared_secret('sha1');
846+ $this->assoc['handle'] = $this->assoc_handle();
847+ }
848+
849+ /**
850+ * Encrypts the MAC key using DH key exchange.
851+ */
852+ protected function dh()
853+ {
854+ if(empty($this->data['openid_dh_modulus'])) {
855+ $this->data['openid_dh_modulus'] = $this->default_modulus;
856+ }
857+
858+ if(empty($this->data['openid_dh_gen'])) {
859+ $this->data['openid_dh_gen'] = $this->default_gen;
860+ }
861+
862+ if(empty($this->data['openid_dh_consumer_public'])) {
863+ $this->directErrorResponse();
864+ }
865+
866+ $modulus = $this->b64dec($this->data['openid_dh_modulus']);
867+ $gen = $this->b64dec($this->data['openid_dh_gen']);
868+ $consumerKey = $this->b64dec($this->data['openid_dh_consumer_public']);
869+
870+ $privateKey = $this->keygen(strlen($modulus));
871+ $publicKey = $this->powmod($gen, $privateKey, $modulus);
872+ $ss = $this->powmod($consumerKey, $privateKey, $modulus);
873+
874+ $mac = $this->x_or(hash($this->assoc['hash'], $ss, true), $this->shared_secret($this->assoc['hash']));
875+ $this->assoc['dh_server_public'] = $this->decb64($publicKey);
876+ $this->assoc['mac'] = base64_encode($mac);
877+ }
878+
879+ /**
880+ * XORs two strings.
881+ * @param String $a
882+ * @param String $b
883+ * @return String $a ^ $b
884+ */
885+ protected function x_or($a, $b)
886+ {
887+ $length = strlen($a);
888+ for($i = 0; $i < $length; $i++) {
889+ $a[$i] = $a[$i] ^ $b[$i];
890+ }
891+
892+ return $a;
893+ }
894+
895+ /**
896+ * Prepares an indirect response url.
897+ * @param array $params Parameters to be sent.
898+ */
899+ protected function response($params)
900+ {
901+ $params += array('openid.ns' => $this->ns);
902+ return $this->data['openid_return_to']
903+ . (strpos($this->data['openid_return_to'],'?') ? '&' : '?')
904+ . http_build_query($params, '', '&');
905+ }
906+
907+ /**
908+ * Outputs a direct error.
909+ */
910+ protected function errorResponse()
911+ {
912+ if(!empty($this->data['openid_return_to'])) {
913+ $response = array(
914+ 'openid.mode' => 'error',
915+ 'openid.error' => 'Invalid request'
916+ );
917+ $this->redirect($this->response($response));
918+ } else {
919+ header('HTTP/1.1 400 Bad Request');
920+ $response = array(
921+ 'ns' => $this->ns,
922+ 'error' => 'Invalid request'
923+ );
924+ echo $this->keyValueForm($response);
925+ }
926+ die();
927+ }
928+
929+ /**
930+ * Sends an positive assertion.
931+ * @param String $identity the OP-Local Identifier that is being authenticated.
932+ * @param Array $attributes User attributes to be sent.
933+ */
934+ protected function positiveResponse($identity, $attributes)
935+ {
936+ # We generate a private association if there is none established.
937+ if(!$this->assoc) {
938+ $this->generateAssociation();
939+ $this->assoc['private'] = true;
940+ }
941+
942+ # We set openid.identity (and openid.claimed_id if necessary) to our $identity
943+ if($this->data['openid_identity'] == $this->data['openid_claimed_id']) {
944+ $this->data['openid_claimed_id'] = $identity;
945+ }
946+ $this->data['openid_identity'] = $identity;
947+
948+ # Preparing fields to be signed
949+ $params = array(
950+ 'op_endpoint' => $this->serverLocation,
951+ 'claimed_id' => $this->data['openid_claimed_id'],
952+ 'identity' => $this->data['openid_identity'],
953+ 'return_to' => $this->data['openid_return_to'],
954+ 'realm' => $this->data['openid_realm'],
955+ 'response_nonce' => gmdate("Y-m-d\TH:i:s\Z"),
956+ 'assoc_handle' => $this->assoc['handle'],
957+ );
958+
959+ $params += $this->responseAttributes($attributes);
960+
961+ # Has the RP used an invalid association handle?
962+ if (isset($this->data['openid_assoc_handle'])
963+ && $this->data['openid_assoc_handle'] != $this->assoc['handle']
964+ ) {
965+ $params['invalidate_handle'] = $this->data['openid_assoc_handle'];
966+ }
967+
968+ # Signing the $params
969+ $sig = hash_hmac($this->assoc['hash'], $this->keyValueForm($params), $this->assoc['mac'], true);
970+ $req = array(
971+ 'openid.mode' => 'id_res',
972+ 'openid.signed' => implode(',', array_keys($params)),
973+ 'openid.sig' => base64_encode($sig),
974+ );
975+
976+ # Saving the nonce and commiting the association.
977+ $this->assoc['nonce'] = $params['response_nonce'];
978+ $this->setAssoc($this->assoc['handle'], $this->assoc);
979+
980+ # Preparing and sending the response itself
981+ foreach($params as $name => $value) {
982+ $req['openid.' . $name] = $value;
983+ }
984+
985+ $this->redirect($this->response($req));
986+ }
987+
988+ /**
989+ * Prepares an array of attributes to send
990+ */
991+ protected function responseAttributes($attributes)
992+ {
993+ if(!$attributes) return array();
994+
995+ $ns = 'http://axschema.org/';
996+
997+ $response = array();
998+ if(isset($this->data['ax'])) {
999+ $response['ns.ax'] = 'http://openid.net/srv/ax/1.0';
1000+ foreach($attributes as $name => $value) {
1001+ $alias = strtr($name, '/', '_');
1002+ $response['ax.type.' . $alias] = $ns . $name;
1003+ $response['ax.value.' . $alias] = $value;
1004+ }
1005+ return $response;
1006+ }
1007+
1008+ foreach($attributes as $name => $value) {
1009+ if(!isset($this->ax_to_sreg[$name])) {
1010+ continue;
1011+ }
1012+
1013+ $response['sreg.' . $this->ax_to_sreg[$name]] = $value;
1014+ }
1015+ return $response;
1016+ }
1017+
1018+ /**
1019+ * Encodes fields in key-value form.
1020+ * @param Array $params Fields to be encoded.
1021+ * @return String $params in key-value form.
1022+ */
1023+ protected function keyValueForm($params)
1024+ {
1025+ $str = '';
1026+ foreach($params as $name => $value) {
1027+ $str .= "$name:$value\n";
1028+ }
1029+
1030+ return $str;
1031+ }
1032+
1033+ /**
1034+ * Responds with an information that the user has canceled authentication.
1035+ */
1036+ protected function cancel()
1037+ {
1038+ $this->redirect($this->response(array('openid.mode' => 'cancel')));
1039+ }
1040+
1041+ /**
1042+ * Converts base64 encoded number to it's decimal representation.
1043+ * @param String $str base64 encoded number.
1044+ * @return String Decimal representation of that number.
1045+ */
1046+ protected function b64dec($str)
1047+ {
1048+ $bytes = unpack('C*', base64_decode($str));
1049+ $n = 0;
1050+ foreach($bytes as $byte) {
1051+ $n = $this->add($this->mul($n, 256), $byte);
1052+ }
1053+
1054+ return $n;
1055+ }
1056+
1057+ /**
1058+ * Complements b64dec.
1059+ */
1060+ protected function decb64($num)
1061+ {
1062+ $bytes = array();
1063+ while($num) {
1064+ array_unshift($bytes, $this->mod($num, 256));
1065+ $num = $this->div($num, 256);
1066+ }
1067+
1068+ if($bytes && $bytes[0] > 127) {
1069+ array_unshift($bytes,0);
1070+ }
1071+
1072+ array_unshift($bytes, 'C*');
1073+
1074+ return base64_encode(call_user_func_array('pack', $bytes));
1075+ }
1076+
1077+ function __call($name, $args)
1078+ {
1079+ switch($name) {
1080+ case 'add':
1081+ case 'mul':
1082+ case 'pow':
1083+ case 'mod':
1084+ case 'div':
1085+ case 'powmod':
1086+ if(function_exists('gmp_strval')) {
1087+ return gmp_strval(call_user_func_array($this->$name, $args));
1088+ }
1089+ return call_user_func_array($this->$name, $args);
1090+ default:
1091+ throw new BadMethodCallException();
1092+ }
1093+ }
1094+}
1095
1096=== added file 'inc/openid/rp.php'
1097--- inc/openid/rp.php 1970-01-01 00:00:00 +0000
1098+++ inc/openid/rp.php 2011-09-05 19:10:37 +0000
1099@@ -0,0 +1,768 @@
1100+<?php
1101+/**
1102+ * This class provides a simple interface for OpenID (1.1 and 2.0) authentication.
1103+ * Supports Yadis discovery.
1104+ * The authentication process is stateless/dumb.
1105+ *
1106+ * Usage:
1107+ * Sign-on with OpenID is a two step process:
1108+ * Step one is authentication with the provider:
1109+ * <code>
1110+ * $openid = new LightOpenID;
1111+ * $openid->identity = 'ID supplied by user';
1112+ * header('Location: ' . $openid->authUrl());
1113+ * </code>
1114+ * The provider then sends various parameters via GET, one of them is openid_mode.
1115+ * Step two is verification:
1116+ * <code>
1117+ * if ($this->data['openid_mode']) {
1118+ * $openid = new LightOpenID;
1119+ * echo $openid->validate() ? 'Logged in.' : 'Failed';
1120+ * }
1121+ * </code>
1122+ *
1123+ * Optionally, you can set $returnUrl and $realm (or $trustRoot, which is an alias).
1124+ * The default values for those are:
1125+ * $openid->realm = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
1126+ * $openid->returnUrl = $openid->realm . $_SERVER['REQUEST_URI'];
1127+ * If you don't know their meaning, refer to any openid tutorial, or specification. Or just guess.
1128+ *
1129+ * AX and SREG extensions are supported.
1130+ * To use them, specify $openid->required and/or $openid->optional before calling $openid->authUrl().
1131+ * These are arrays, with values being AX schema paths (the 'path' part of the URL).
1132+ * For example:
1133+ * $openid->required = array('namePerson/friendly', 'contact/email');
1134+ * $openid->optional = array('namePerson/first');
1135+ * If the server supports only SREG or OpenID 1.1, these are automaticaly
1136+ * mapped to SREG names, so that user doesn't have to know anything about the server.
1137+ *
1138+ * To get the values, use $openid->getAttributes().
1139+ *
1140+ *
1141+ * The library requires PHP >= 5.1.2 with curl or http/https stream wrappers enabled.
1142+ * @author Mewp
1143+ * @copyright Copyright (c) 2010, Mewp
1144+ * @license http://www.opensource.org/licenses/mit-license.php MIT
1145+ * @version master_2011-06-12
1146+ * @package login
1147+ * @subpackage openid
1148+ */
1149+class LightOpenID
1150+{
1151+ public $returnUrl
1152+ , $required = array()
1153+ , $optional = array()
1154+ , $verify_peer = null
1155+ , $capath = null
1156+ , $cainfo = null
1157+ , $data;
1158+ private $identity, $claimed_id;
1159+ protected $server, $version, $trustRoot, $aliases, $identifier_select = false
1160+ , $ax = false, $sreg = false, $setup_url = null;
1161+ static protected $ax_to_sreg = array(
1162+ 'namePerson/friendly' => 'nickname',
1163+ 'contact/email' => 'email',
1164+ 'namePerson' => 'fullname',
1165+ 'birthDate' => 'dob',
1166+ 'person/gender' => 'gender',
1167+ 'contact/postalCode/home' => 'postcode',
1168+ 'contact/country/home' => 'country',
1169+ 'pref/language' => 'language',
1170+ 'pref/timezone' => 'timezone',
1171+ );
1172+
1173+ function __construct()
1174+ {
1175+ $this->trustRoot = 'http://' . $_SERVER['HTTP_HOST'];
1176+ if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
1177+ || (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
1178+ && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
1179+ ) {
1180+ $this->trustRoot = 'https://' . $_SERVER['HTTP_HOST'];
1181+ }
1182+ $uri = rtrim(preg_replace('#((?<=\?)|&)openid\.[^&]+#', '', $_SERVER['REQUEST_URI']), '?');
1183+ $this->returnUrl = $this->trustRoot . $uri;
1184+
1185+ $this->data = $_POST + $_GET; # OPs may send data as POST or GET.
1186+
1187+ if(!function_exists('curl_init') && !in_array('https', stream_get_wrappers())) {
1188+ throw new ErrorException('You must have either https wrappers or curl enabled.');
1189+ }
1190+ }
1191+
1192+ function __set($name, $value)
1193+ {
1194+ switch ($name) {
1195+ case 'identity':
1196+ if (strlen($value = trim((String) $value))) {
1197+ if (preg_match('#^xri:/*#i', $value, $m)) {
1198+ $value = substr($value, strlen($m[0]));
1199+ } elseif (!preg_match('/^(?:[=@+\$!\(]|https?:)/i', $value)) {
1200+ $value = "http://$value";
1201+ }
1202+ if (preg_match('#^https?://[^/]+$#i', $value, $m)) {
1203+ $value .= '/';
1204+ }
1205+ }
1206+ $this->$name = $this->claimed_id = $value;
1207+ break;
1208+ case 'trustRoot':
1209+ case 'realm':
1210+ $this->trustRoot = trim($value);
1211+ }
1212+ }
1213+
1214+ function __get($name)
1215+ {
1216+ switch ($name) {
1217+ case 'identity':
1218+ # We return claimed_id instead of identity,
1219+ # because the developer should see the claimed identifier,
1220+ # i.e. what he set as identity, not the op-local identifier (which is what we verify)
1221+ return $this->claimed_id;
1222+ case 'trustRoot':
1223+ case 'realm':
1224+ return $this->trustRoot;
1225+ case 'mode':
1226+ return empty($this->data['openid_mode']) ? null : $this->data['openid_mode'];
1227+ }
1228+ }
1229+
1230+ /**
1231+ * Checks if the server specified in the url exists.
1232+ *
1233+ * @param $url url to check
1234+ * @return true, if the server exists; false otherwise
1235+ */
1236+ function hostExists($url)
1237+ {
1238+ if (strpos($url, '/') === false) {
1239+ $server = $url;
1240+ } else {
1241+ $server = @parse_url($url, PHP_URL_HOST);
1242+ }
1243+
1244+ if (!$server) {
1245+ return false;
1246+ }
1247+
1248+ return !!gethostbynamel($server);
1249+ }
1250+
1251+ protected function request_curl($url, $method='GET', $params=array())
1252+ {
1253+ $params = http_build_query($params, '', '&');
1254+ $curl = curl_init($url . ($method == 'GET' && $params ? '?' . $params : ''));
1255+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
1256+ curl_setopt($curl, CURLOPT_HEADER, false);
1257+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
1258+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
1259+ curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/xrds+xml, */*'));
1260+
1261+ if($this->verify_peer !== null) {
1262+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verify_peer);
1263+ if($this->capath) {
1264+ curl_setopt($curl, CURLOPT_CAPATH, $this->capath);
1265+ }
1266+
1267+ if($this->cainfo) {
1268+ curl_setopt($curl, CURLOPT_CAINFO, $this->cainfo);
1269+ }
1270+ }
1271+
1272+ if ($method == 'POST') {
1273+ curl_setopt($curl, CURLOPT_POST, true);
1274+ curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
1275+ } elseif ($method == 'HEAD') {
1276+ curl_setopt($curl, CURLOPT_HEADER, true);
1277+ curl_setopt($curl, CURLOPT_NOBODY, true);
1278+ } else {
1279+ curl_setopt($curl, CURLOPT_HTTPGET, true);
1280+ }
1281+ $response = curl_exec($curl);
1282+
1283+ if($method == 'HEAD') {
1284+ $headers = array();
1285+ foreach(explode("\n", $response) as $header) {
1286+ $pos = strpos($header,':');
1287+ $name = strtolower(trim(substr($header, 0, $pos)));
1288+ $headers[$name] = trim(substr($header, $pos+1));
1289+ }
1290+
1291+ # Updating claimed_id in case of redirections.
1292+ $effective_url = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);
1293+ if($effective_url != $url) {
1294+ $this->identity = $this->claimed_id = $effective_url;
1295+ }
1296+
1297+ return $headers;
1298+ }
1299+
1300+ if (curl_errno($curl)) {
1301+ throw new ErrorException(curl_error($curl), curl_errno($curl));
1302+ }
1303+
1304+ return $response;
1305+ }
1306+
1307+ protected function request_streams($url, $method='GET', $params=array())
1308+ {
1309+ if(!$this->hostExists($url)) {
1310+ throw new ErrorException("Could not connect to $url.", 404);
1311+ }
1312+
1313+ $params = http_build_query($params, '', '&');
1314+ switch($method) {
1315+ case 'GET':
1316+ $opts = array(
1317+ 'http' => array(
1318+ 'method' => 'GET',
1319+ 'header' => 'Accept: application/xrds+xml, */*',
1320+ 'ignore_errors' => true,
1321+ )
1322+ );
1323+ $url = $url . ($params ? '?' . $params : '');
1324+ break;
1325+ case 'POST':
1326+ $opts = array(
1327+ 'http' => array(
1328+ 'method' => 'POST',
1329+ 'header' => 'Content-type: application/x-www-form-urlencoded',
1330+ 'content' => $params,
1331+ 'ignore_errors' => true,
1332+ )
1333+ );
1334+ break;
1335+ case 'HEAD':
1336+ # We want to send a HEAD request,
1337+ # but since get_headers doesn't accept $context parameter,
1338+ # we have to change the defaults.
1339+ $default = stream_context_get_options(stream_context_get_default());
1340+ stream_context_get_default(
1341+ array('http' => array(
1342+ 'method' => 'HEAD',
1343+ 'header' => 'Accept: application/xrds+xml, */*',
1344+ 'ignore_errors' => true,
1345+ ))
1346+ );
1347+
1348+ $url = $url . ($params ? '?' . $params : '');
1349+ $headers_tmp = get_headers ($url);
1350+ if(!$headers_tmp) {
1351+ return array();
1352+ }
1353+
1354+ # Parsing headers.
1355+ $headers = array();
1356+ foreach($headers_tmp as $header) {
1357+ $pos = strpos($header,':');
1358+ $name = strtolower(trim(substr($header, 0, $pos)));
1359+ $headers[$name] = trim(substr($header, $pos+1));
1360+
1361+ # Following possible redirections. The point is just to have
1362+ # claimed_id change with them, because get_headers() will
1363+ # follow redirections automatically.
1364+ # We ignore redirections with relative paths.
1365+ # If any known provider uses them, file a bug report.
1366+ if($name == 'location') {
1367+ if(strpos($headers[$name], 'http') === 0) {
1368+ $this->identity = $this->claimed_id = $headers[$name];
1369+ } elseif($headers[$name][0] == '/') {
1370+ $parsed_url = parse_url($this->claimed_id);
1371+ $this->identity =
1372+ $this->claimed_id = $parsed_url['scheme'] . '://'
1373+ . $parsed_url['host']
1374+ . $headers[$name];
1375+ }
1376+ }
1377+ }
1378+
1379+ # And restore them.
1380+ stream_context_get_default($default);
1381+ return $headers;
1382+ }
1383+
1384+ if($this->verify_peer) {
1385+ $opts += array('ssl' => array(
1386+ 'verify_peer' => true,
1387+ 'capath' => $this->capath,
1388+ 'cafile' => $this->cainfo,
1389+ ));
1390+ }
1391+
1392+ $context = stream_context_create ($opts);
1393+
1394+ return file_get_contents($url, false, $context);
1395+ }
1396+
1397+ protected function request($url, $method='GET', $params=array())
1398+ {
1399+ if (function_exists('curl_init')
1400+ && (!in_array('https', stream_get_wrappers()) || !ini_get('safe_mode') && !ini_get('open_basedir'))
1401+ ) {
1402+ return $this->request_curl($url, $method, $params);
1403+ }
1404+ return $this->request_streams($url, $method, $params);
1405+ }
1406+
1407+ protected function build_url($url, $parts)
1408+ {
1409+ if (isset($url['query'], $parts['query'])) {
1410+ $parts['query'] = $url['query'] . '&' . $parts['query'];
1411+ }
1412+
1413+ $url = $parts + $url;
1414+ $url = $url['scheme'] . '://'
1415+ . (empty($url['username'])?''
1416+ :(empty($url['password'])? "{$url['username']}@"
1417+ :"{$url['username']}:{$url['password']}@"))
1418+ . $url['host']
1419+ . (empty($url['port'])?'':":{$url['port']}")
1420+ . (empty($url['path'])?'':$url['path'])
1421+ . (empty($url['query'])?'':"?{$url['query']}")
1422+ . (empty($url['fragment'])?'':"#{$url['fragment']}");
1423+ return $url;
1424+ }
1425+
1426+ /**
1427+ * Helper function used to scan for <meta>/<link> tags and extract information
1428+ * from them
1429+ */
1430+ protected function htmlTag($content, $tag, $attrName, $attrValue, $valueName)
1431+ {
1432+ preg_match_all("#<{$tag}[^>]*$attrName=['\"].*?$attrValue.*?['\"][^>]*$valueName=['\"](.+?)['\"][^>]*/?>#i", $content, $matches1);
1433+ preg_match_all("#<{$tag}[^>]*$valueName=['\"](.+?)['\"][^>]*$attrName=['\"].*?$attrValue.*?['\"][^>]*/?>#i", $content, $matches2);
1434+
1435+ $result = array_merge($matches1[1], $matches2[1]);
1436+ return empty($result)?false:$result[0];
1437+ }
1438+
1439+ /**
1440+ * Performs Yadis and HTML discovery. Normally not used.
1441+ * @param $url Identity URL.
1442+ * @return String OP Endpoint (i.e. OpenID provider address).
1443+ * @throws ErrorException
1444+ */
1445+ function discover($url)
1446+ {
1447+ if (!$url) throw new ErrorException('No identity supplied.');
1448+ # Use xri.net proxy to resolve i-name identities
1449+ if (!preg_match('#^https?:#', $url)) {
1450+ $url = "https://xri.net/$url";
1451+ }
1452+
1453+ # We save the original url in case of Yadis discovery failure.
1454+ # It can happen when we'll be lead to an XRDS document
1455+ # which does not have any OpenID2 services.
1456+ $originalUrl = $url;
1457+
1458+ # A flag to disable yadis discovery in case of failure in headers.
1459+ $yadis = true;
1460+
1461+ # We'll jump a maximum of 5 times, to avoid endless redirections.
1462+ for ($i = 0; $i < 5; $i ++) {
1463+ if ($yadis) {
1464+ $headers = $this->request($url, 'HEAD');
1465+
1466+ $next = false;
1467+ if (isset($headers['x-xrds-location'])) {
1468+ $url = $this->build_url(parse_url($url), parse_url(trim($headers['x-xrds-location'])));
1469+ $next = true;
1470+ }
1471+
1472+ if (isset($headers['content-type'])
1473+ && (strpos($headers['content-type'], 'application/xrds+xml') !== false
1474+ || strpos($headers['content-type'], 'text/xml') !== false)
1475+ ) {
1476+ # Apparently, some providers return XRDS documents as text/html.
1477+ # While it is against the spec, allowing this here shouldn't break
1478+ # compatibility with anything.
1479+ # ---
1480+ # Found an XRDS document, now let's find the server, and optionally delegate.
1481+ $content = $this->request($url, 'GET');
1482+
1483+ preg_match_all('#<Service.*?>(.*?)</Service>#s', $content, $m);
1484+ foreach($m[1] as $content) {
1485+ $content = ' ' . $content; # The space is added, so that strpos doesn't return 0.
1486+
1487+ # OpenID 2
1488+ $ns = preg_quote('http://specs.openid.net/auth/2.0/');
1489+ if(preg_match('#<Type>\s*'.$ns.'(server|signon)\s*</Type>#s', $content, $type)) {
1490+ if ($type[1] == 'server') $this->identifier_select = true;
1491+
1492+ preg_match('#<URI.*?>(.*)</URI>#', $content, $server);
1493+ preg_match('#<(Local|Canonical)ID>(.*)</\1ID>#', $content, $delegate);
1494+ if (empty($server)) {
1495+ return false;
1496+ }
1497+ # Does the server advertise support for either AX or SREG?
1498+ $this->ax = (bool) strpos($content, '<Type>http://openid.net/srv/ax/1.0</Type>');
1499+ $this->sreg = strpos($content, '<Type>http://openid.net/sreg/1.0</Type>')
1500+ || strpos($content, '<Type>http://openid.net/extensions/sreg/1.1</Type>');
1501+
1502+ $server = $server[1];
1503+ if (isset($delegate[2])) $this->identity = trim($delegate[2]);
1504+ $this->version = 2;
1505+
1506+ $this->server = $server;
1507+ return $server;
1508+ }
1509+
1510+ # OpenID 1.1
1511+ $ns = preg_quote('http://openid.net/signon/1.1');
1512+ if (preg_match('#<Type>\s*'.$ns.'\s*</Type>#s', $content)) {
1513+
1514+ preg_match('#<URI.*?>(.*)</URI>#', $content, $server);
1515+ preg_match('#<.*?Delegate>(.*)</.*?Delegate>#', $content, $delegate);
1516+ if (empty($server)) {
1517+ return false;
1518+ }
1519+ # AX can be used only with OpenID 2.0, so checking only SREG
1520+ $this->sreg = strpos($content, '<Type>http://openid.net/sreg/1.0</Type>')
1521+ || strpos($content, '<Type>http://openid.net/extensions/sreg/1.1</Type>');
1522+
1523+ $server = $server[1];
1524+ if (isset($delegate[1])) $this->identity = $delegate[1];
1525+ $this->version = 1;
1526+
1527+ $this->server = $server;
1528+ return $server;
1529+ }
1530+ }
1531+
1532+ $next = true;
1533+ $yadis = false;
1534+ $url = $originalUrl;
1535+ $content = null;
1536+ break;
1537+ }
1538+ if ($next) continue;
1539+
1540+ # There are no relevant information in headers, so we search the body.
1541+ $content = $this->request($url, 'GET');
1542+ $location = $this->htmlTag($content, 'meta', 'http-equiv', 'X-XRDS-Location', 'content');
1543+ if ($location) {
1544+ $url = $this->build_url(parse_url($url), parse_url($location));
1545+ continue;
1546+ }
1547+ }
1548+
1549+ if (!$content) $content = $this->request($url, 'GET');
1550+
1551+ # At this point, the YADIS Discovery has failed, so we'll switch
1552+ # to openid2 HTML discovery, then fallback to openid 1.1 discovery.
1553+ $server = $this->htmlTag($content, 'link', 'rel', 'openid2.provider', 'href');
1554+ $delegate = $this->htmlTag($content, 'link', 'rel', 'openid2.local_id', 'href');
1555+ $this->version = 2;
1556+
1557+ if (!$server) {
1558+ # The same with openid 1.1
1559+ $server = $this->htmlTag($content, 'link', 'rel', 'openid.server', 'href');
1560+ $delegate = $this->htmlTag($content, 'link', 'rel', 'openid.delegate', 'href');
1561+ $this->version = 1;
1562+ }
1563+
1564+ if ($server) {
1565+ # We found an OpenID2 OP Endpoint
1566+ if ($delegate) {
1567+ # We have also found an OP-Local ID.
1568+ $this->identity = $delegate;
1569+ }
1570+ $this->server = $server;
1571+ return $server;
1572+ }
1573+
1574+ throw new ErrorException("No OpenID Server found at $url", 404);
1575+ }
1576+ throw new ErrorException('Endless redirection!', 500);
1577+ }
1578+
1579+ protected function sregParams()
1580+ {
1581+ $params = array();
1582+ # We always use SREG 1.1, even if the server is advertising only support for 1.0.
1583+ # That's because it's fully backwards compatibile with 1.0, and some providers
1584+ # advertise 1.0 even if they accept only 1.1. One such provider is myopenid.com
1585+ $params['openid.ns.sreg'] = 'http://openid.net/extensions/sreg/1.1';
1586+ if ($this->required) {
1587+ $params['openid.sreg.required'] = array();
1588+ foreach ($this->required as $required) {
1589+ if (!isset(self::$ax_to_sreg[$required])) continue;
1590+ $params['openid.sreg.required'][] = self::$ax_to_sreg[$required];
1591+ }
1592+ $params['openid.sreg.required'] = implode(',', $params['openid.sreg.required']);
1593+ }
1594+
1595+ if ($this->optional) {
1596+ $params['openid.sreg.optional'] = array();
1597+ foreach ($this->optional as $optional) {
1598+ if (!isset(self::$ax_to_sreg[$optional])) continue;
1599+ $params['openid.sreg.optional'][] = self::$ax_to_sreg[$optional];
1600+ }
1601+ $params['openid.sreg.optional'] = implode(',', $params['openid.sreg.optional']);
1602+ }
1603+ return $params;
1604+ }
1605+
1606+ protected function axParams()
1607+ {
1608+ $params = array();
1609+ if ($this->required || $this->optional) {
1610+ $params['openid.ns.ax'] = 'http://openid.net/srv/ax/1.0';
1611+ $params['openid.ax.mode'] = 'fetch_request';
1612+ $this->aliases = array();
1613+ $counts = array();
1614+ $required = array();
1615+ $optional = array();
1616+ foreach (array('required','optional') as $type) {
1617+ foreach ($this->$type as $alias => $field) {
1618+ if (is_int($alias)) $alias = strtr($field, '/', '_');
1619+ $this->aliases[$alias] = 'http://axschema.org/' . $field;
1620+ if (empty($counts[$alias])) $counts[$alias] = 0;
1621+ $counts[$alias] += 1;
1622+ ${$type}[] = $alias;
1623+ }
1624+ }
1625+ foreach ($this->aliases as $alias => $ns) {
1626+ $params['openid.ax.type.' . $alias] = $ns;
1627+ }
1628+ foreach ($counts as $alias => $count) {
1629+ if ($count == 1) continue;
1630+ $params['openid.ax.count.' . $alias] = $count;
1631+ }
1632+
1633+ # Don't send empty ax.requied and ax.if_available.
1634+ # Google and possibly other providers refuse to support ax when one of these is empty.
1635+ if($required) {
1636+ $params['openid.ax.required'] = implode(',', $required);
1637+ }
1638+ if($optional) {
1639+ $params['openid.ax.if_available'] = implode(',', $optional);
1640+ }
1641+ }
1642+ return $params;
1643+ }
1644+
1645+ protected function authUrl_v1($immediate)
1646+ {
1647+ $returnUrl = $this->returnUrl;
1648+ # If we have an openid.delegate that is different from our claimed id,
1649+ # we need to somehow preserve the claimed id between requests.
1650+ # The simplest way is to just send it along with the return_to url.
1651+ if($this->identity != $this->claimed_id) {
1652+ $returnUrl .= (strpos($returnUrl, '?') ? '&' : '?') . 'openid.claimed_id=' . $this->claimed_id;
1653+ }
1654+
1655+ $params = array(
1656+ 'openid.return_to' => $returnUrl,
1657+ 'openid.mode' => $immediate ? 'checkid_immediate' : 'checkid_setup',
1658+ 'openid.identity' => $this->identity,
1659+ 'openid.trust_root' => $this->trustRoot,
1660+ ) + $this->sregParams();
1661+
1662+ return $this->build_url(parse_url($this->server)
1663+ , array('query' => http_build_query($params, '', '&')));
1664+ }
1665+
1666+ protected function authUrl_v2($immediate)
1667+ {
1668+ $params = array(
1669+ 'openid.ns' => 'http://specs.openid.net/auth/2.0',
1670+ 'openid.mode' => $immediate ? 'checkid_immediate' : 'checkid_setup',
1671+ 'openid.return_to' => $this->returnUrl,
1672+ 'openid.realm' => $this->trustRoot,
1673+ );
1674+ if ($this->ax) {
1675+ $params += $this->axParams();
1676+ }
1677+ if ($this->sreg) {
1678+ $params += $this->sregParams();
1679+ }
1680+ if (!$this->ax && !$this->sreg) {
1681+ # If OP doesn't advertise either SREG, nor AX, let's send them both
1682+ # in worst case we don't get anything in return.
1683+ $params += $this->axParams() + $this->sregParams();
1684+ }
1685+
1686+ if ($this->identifier_select) {
1687+ $params['openid.identity'] = $params['openid.claimed_id']
1688+ = 'http://specs.openid.net/auth/2.0/identifier_select';
1689+ } else {
1690+ $params['openid.identity'] = $this->identity;
1691+ $params['openid.claimed_id'] = $this->claimed_id;
1692+ }
1693+
1694+ return $this->build_url(parse_url($this->server)
1695+ , array('query' => http_build_query($params, '', '&')));
1696+ }
1697+
1698+ /**
1699+ * Returns authentication url. Usually, you want to redirect your user to it.
1700+ * @return String The authentication url.
1701+ * @param String $select_identifier Whether to request OP to select identity for an user in OpenID 2. Does not affect OpenID 1.
1702+ * @throws ErrorException
1703+ */
1704+ function authUrl($immediate = false)
1705+ {
1706+ if ($this->setup_url && !$immediate) return $this->setup_url;
1707+ if (!$this->server) $this->discover($this->identity);
1708+
1709+ if ($this->version == 2) {
1710+ return $this->authUrl_v2($immediate);
1711+ }
1712+ return $this->authUrl_v1($immediate);
1713+ }
1714+
1715+ /**
1716+ * Performs OpenID verification with the OP.
1717+ * @return Bool Whether the verification was successful.
1718+ * @throws ErrorException
1719+ */
1720+ function validate()
1721+ {
1722+ # If the request was using immediate mode, a failure may be reported
1723+ # by presenting user_setup_url (for 1.1) or reporting
1724+ # mode 'setup_needed' (for 2.0). Also catching all modes other than
1725+ # id_res, in order to avoid throwing errors.
1726+ if(isset($this->data['openid_user_setup_url'])) {
1727+ $this->setup_url = $this->data['openid_user_setup_url'];
1728+ return false;
1729+ }
1730+ if($this->mode != 'id_res') {
1731+ return false;
1732+ }
1733+
1734+ $this->claimed_id = isset($this->data['openid_claimed_id'])?$this->data['openid_claimed_id']:$this->data['openid_identity'];
1735+ $params = array(
1736+ 'openid.assoc_handle' => $this->data['openid_assoc_handle'],
1737+ 'openid.signed' => $this->data['openid_signed'],
1738+ 'openid.sig' => $this->data['openid_sig'],
1739+ );
1740+
1741+ if (isset($this->data['openid_ns'])) {
1742+ # We're dealing with an OpenID 2.0 server, so let's set an ns
1743+ # Even though we should know location of the endpoint,
1744+ # we still need to verify it by discovery, so $server is not set here
1745+ $params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
1746+ } elseif (isset($this->data['openid_claimed_id'])
1747+ && $this->data['openid_claimed_id'] != $this->data['openid_identity']
1748+ ) {
1749+ # If it's an OpenID 1 provider, and we've got claimed_id,
1750+ # we have to append it to the returnUrl, like authUrl_v1 does.
1751+ $this->returnUrl .= (strpos($this->returnUrl, '?') ? '&' : '?')
1752+ . 'openid.claimed_id=' . $this->claimed_id;
1753+ }
1754+
1755+ if ($this->data['openid_return_to'] != $this->returnUrl) {
1756+ # The return_to url must match the url of current request.
1757+ # I'm assuing that noone will set the returnUrl to something that doesn't make sense.
1758+ return false;
1759+ }
1760+
1761+ $server = $this->discover($this->claimed_id);
1762+
1763+ foreach (explode(',', $this->data['openid_signed']) as $item) {
1764+ # Checking whether magic_quotes_gpc is turned on, because
1765+ # the function may fail if it is. For example, when fetching
1766+ # AX namePerson, it might containg an apostrophe, which will be escaped.
1767+ # In such case, validation would fail, since we'd send different data than OP
1768+ # wants to verify. stripslashes() should solve that problem, but we can't
1769+ # use it when magic_quotes is off.
1770+ $value = $this->data['openid_' . str_replace('.','_',$item)];
1771+ $params['openid.' . $item] = get_magic_quotes_gpc() ? stripslashes($value) : $value;
1772+
1773+ }
1774+
1775+ $params['openid.mode'] = 'check_authentication';
1776+
1777+ $response = $this->request($server, 'POST', $params);
1778+
1779+ return preg_match('/is_valid\s*:\s*true/i', $response);
1780+ }
1781+
1782+ protected function getAxAttributes()
1783+ {
1784+ $alias = null;
1785+ if (isset($this->data['openid_ns_ax'])
1786+ && $this->data['openid_ns_ax'] != 'http://openid.net/srv/ax/1.0'
1787+ ) { # It's the most likely case, so we'll check it before
1788+ $alias = 'ax';
1789+ } else {
1790+ # 'ax' prefix is either undefined, or points to another extension,
1791+ # so we search for another prefix
1792+ foreach ($this->data as $key => $val) {
1793+ if (substr($key, 0, strlen('openid_ns_')) == 'openid_ns_'
1794+ && $val == 'http://openid.net/srv/ax/1.0'
1795+ ) {
1796+ $alias = substr($key, strlen('openid_ns_'));
1797+ break;
1798+ }
1799+ }
1800+ }
1801+ if (!$alias) {
1802+ # An alias for AX schema has not been found,
1803+ # so there is no AX data in the OP's response
1804+ return array();
1805+ }
1806+
1807+ $attributes = array();
1808+ foreach (explode(',', $this->data['openid_signed']) as $key) {
1809+ $keyMatch = $alias . '.value.';
1810+ if (substr($key, 0, strlen($keyMatch)) != $keyMatch) {
1811+ continue;
1812+ }
1813+ $key = substr($key, strlen($keyMatch));
1814+ if (!isset($this->data['openid_' . $alias . '_type_' . $key])) {
1815+ # OP is breaking the spec by returning a field without
1816+ # associated ns. This shouldn't happen, but it's better
1817+ # to check, than cause an E_NOTICE.
1818+ continue;
1819+ }
1820+ $value = $this->data['openid_' . $alias . '_value_' . $key];
1821+ $key = substr($this->data['openid_' . $alias . '_type_' . $key],
1822+ strlen('http://axschema.org/'));
1823+
1824+ $attributes[$key] = $value;
1825+ }
1826+ return $attributes;
1827+ }
1828+
1829+ protected function getSregAttributes()
1830+ {
1831+ $attributes = array();
1832+ $sreg_to_ax = array_flip(self::$ax_to_sreg);
1833+ foreach (explode(',', $this->data['openid_signed']) as $key) {
1834+ $keyMatch = 'sreg.';
1835+ if (substr($key, 0, strlen($keyMatch)) != $keyMatch) {
1836+ continue;
1837+ }
1838+ $key = substr($key, strlen($keyMatch));
1839+ if (!isset($sreg_to_ax[$key])) {
1840+ # The field name isn't part of the SREG spec, so we ignore it.
1841+ continue;
1842+ }
1843+ $attributes[$sreg_to_ax[$key]] = $this->data['openid_sreg_' . $key];
1844+ }
1845+ return $attributes;
1846+ }
1847+
1848+ /**
1849+ * Gets AX/SREG attributes provided by OP. should be used only after successful validaton.
1850+ * Note that it does not guarantee that any of the required/optional parameters will be present,
1851+ * or that there will be no other attributes besides those specified.
1852+ * In other words. OP may provide whatever information it wants to.
1853+ * * SREG names will be mapped to AX names.
1854+ * * @return Array Array of attributes with keys being the AX schema names, e.g. 'contact/email'
1855+ * @see http://www.axschema.org/types/
1856+ */
1857+ function getAttributes()
1858+ {
1859+ if (isset($this->data['openid_ns'])
1860+ && $this->data['openid_ns'] == 'http://specs.openid.net/auth/2.0'
1861+ ) { # OpenID 2.0
1862+ # We search for both AX and SREG attributes, with AX taking precedence.
1863+ return $this->getAxAttributes() + $this->getSregAttributes();
1864+ }
1865+ return $this->getSregAttributes();
1866+ }
1867+}
1868
1869=== modified file 'inc/sitemgmt/constants.php'
1870--- inc/sitemgmt/constants.php 2011-09-02 16:38:47 +0000
1871+++ inc/sitemgmt/constants.php 2011-09-05 19:10:37 +0000
1872@@ -1,3 +1,4 @@
1873+<<<<<<< TREE
1874 <?php //@./inc/sitemgmt/constants.php ?>
1875 <?php
1876 /**
1877@@ -30,3 +31,32 @@
1878
1879 $local_connection=new MySQLi(DB_SERVER,DB_USER,DB_PASS,DB_NAME);
1880 ?>
1881+=======
1882+<?php //@./inc/sitemgmt/constants.php ?>
1883+<?php
1884+/**
1885+ * Resource Constants - these constants take care of
1886+ * the location of the images and CSS-sheets.
1887+ * If these locations are incorrect, there won't
1888+ * be any lay-out, images, site title or correct RSS.
1889+ */
1890+define("DOMAIN","http://account.loop.remotecp.co.cc/");
1891+define("URL_STATIC",DOMAIN."/static/");
1892+define("URL_IMG", URL_STATIC."/images/icons/"); //Images location
1893+define("URL_TINYMCE", DOMAIN."/tinymce/jscripts/"); //Tinymce's javascript library location
1894+define("URL_JQUERY", DOMAIN."/jquery/"); //Jquery's javascript library location
1895+define("URL_SCRIPTS",DOMAIN."/scripts");
1896+/**
1897+ * Database Constants - these constants are required
1898+ * in order for there to be a successful connection
1899+ * to the MySQL database. Make sure the information is
1900+ * correct.
1901+ */
1902+define("DB_SERVER", "localhost");
1903+define("DB_USER", "root");
1904+define("DB_PASS", "");
1905+define("DB_NAME", "remotecp-panel_openid");
1906+
1907+$local_connection=new MySQLi(DB_SERVER,DB_USER,DB_PASS,DB_NAME);
1908+?>
1909+>>>>>>> MERGE-SOURCE
1910
1911=== modified file 'inc/users/users.php'
1912--- inc/users/users.php 2011-06-28 16:13:01 +0000
1913+++ inc/users/users.php 2011-09-05 19:10:37 +0000
1914@@ -1,3 +1,4 @@
1915+<<<<<<< TREE
1916 <?php
1917 /**
1918 * User login and tracking class
1919@@ -248,4 +249,343 @@
1920 self::$dbconn->query("INSERT INTO serv_log VALUES (NULL,$type, NULL, '".self::$guid."', '$_SERVER[REMOTE_ADDR]', '$_SERVER[REQUEST_URI]', '$msg', 0)");
1921 }
1922 }
1923+=======
1924+<?php
1925+/**
1926+ * User login and tracking class
1927+ * @package login
1928+ */
1929+class session {
1930+ static $username=NULL;
1931+ static $guid=NULL;
1932+ static $userlevel=0;
1933+ static $logged_in=false;
1934+ static $userinfo=array();
1935+ static private $userid=NULL;
1936+ static private $dbconn=NULL;
1937+ /**
1938+ * Authentication type
1939+ * @var string|NULL
1940+ */
1941+ static private $authtype=NULL;
1942+ /**
1943+ * Time till user is considered inactive
1944+ * @var int
1945+ */
1946+ static private $inactivetime=600; //10 minute inactivity timeout
1947+ /**
1948+ * Constructor for the session class
1949+ */
1950+ static function init() {
1951+ global $local_connection;
1952+ self::$dbconn=$local_connection;
1953+ if(!isset($_SESSION['auth_type'])) {
1954+ $_SESSION['auth_type']=NULL;
1955+ }
1956+ self::$authtype=$_SESSION['auth_type'];
1957+ if(self::$authtype=='openid') {
1958+ if(!self::resolveOpenId(sha1($_SESSION['openid']['identity']))) { //Sorry, we could not resolve the OpenID
1959+ return false;
1960+ }
1961+ }
1962+ self::$logged_in=self::checkauth();
1963+ if(isset($_SESSION['openid_link_id'])) { //Late linking an OpenID to an account after login
1964+ self::bindOpenID(self::$guid, $_SESSION['openid_link_id']);
1965+ unset($_SESSION['openid_link_id']);
1966+ }
1967+ return true;
1968+ }
1969+ /**
1970+ * Checks if the user is logged in
1971+ * @return bool true if logged in, false if not.
1972+ */
1973+ static private function checkauth() {
1974+ if(isset($_SESSION['userguid'],$_SESSION['userid'])) {
1975+ if(!self::confirmUserId($_SESSION['userguid'],$_SESSION['userid'])) { //Invalid user
1976+ unset($_SESSION['userguid'],$_SESSION['userid']);
1977+ return false;
1978+ }
1979+ // The user is logged in
1980+ self::$guid=$_SESSION['userguid'];
1981+ self::$userinfo=self::getUserInfo(self::$guid);
1982+ self::$username=self::$userinfo['username'];
1983+ self::$userid=self::$userinfo['userid'];
1984+ self::$userlevel = self::$userinfo['userlevel'];
1985+ self::updateTimestamp(self::$guid);
1986+ return true;
1987+ }
1988+ return false;
1989+ }
1990+ /**
1991+ * Verifies the userid of the user.
1992+ * @param string $guid The GUID of the user you want to check
1993+ * @param string $userid The userid you want to verify
1994+ * @return bool true is the userid matches the guid, false if not.
1995+ */
1996+ static private function confirmUserId($guid,$userid) {
1997+ $q=self::$dbconn->query('SELECT * FROM `users` WHERE `GUID`=\''.$guid.'\'');
1998+ if($q->num_rows!=1) return false; //No such user
1999+ $res=$q->fetch_assoc();
2000+ if($userid!=$res['userid']) return false; //The userid doesn't match the guid
2001+ if($res['timestamp'] < (time()-self::$inactivetime)) return false;
2002+ return true;
2003+ }
2004+ /**
2005+ * Gets userinfo by guid
2006+ * @param string $guid The user's GUID you want to look up
2007+ * @return array|NULL Array containing user information (names from table fields)
2008+ */
2009+ static function getUserInfo($guid) {
2010+ $q=self::$dbconn->query('SELECT * FROM `users` WHERE `GUID`=\''.$guid.'\'');
2011+ if($q->num_rows!=1) return NULL;
2012+ return $q->fetch_assoc();
2013+ }
2014+ /**
2015+ * Logs a user in.
2016+ * @param string $username The user's username
2017+ * @param string $password The password the user entered
2018+ * @return bool Returns true if login was successful, false if an error occured
2019+ */
2020+ static function login($username,$password) {
2021+ if(strlen($username = trim($username)) == 0) //No username given
2022+ return false;
2023+ if(!preg_match('%^([0-9a-z])*$%', $username)) //Username not alphanumeric
2024+ return false;
2025+ if(strlen($password)==0) //No password given
2026+ return false;
2027+ $password=md5($password); //Hash before any other functions! This is to prevent password leakage due to errors in debug mode.
2028+ if(!self::userExists($username,1)) //User does not exist
2029+ return false;
2030+ $guid=self::$dbconn->query('SELECT `GUID` FROM `users` WHERE `username`=\''.$username.'\'')->fetch_object()->GUID;
2031+ return self::confirmUserPass($guid,$password);
2032+ }
2033+ /**
2034+ * Checks whether a user exists or not
2035+ * @param string $guid The user's GUID or username
2036+ * @param int $by 0 to check by GUID, 1 to check by username
2037+ * @return bool Returns true if the user exists, false if not.
2038+ */
2039+ static function userExists($guid,$by=0) {
2040+ if($by==0)
2041+ $q=self::$dbconn->query('SELECT * FROM `users` WHERE `GUID`=\''.$guid.'\'');
2042+ elseif($by==1)
2043+ $q=self::$dbconn->query('SELECT * FROM `users` WHERE `username`=\''.$guid.'\'');
2044+ else {
2045+ trigger_error('Unexpected value of argument 2',E_USER_WARNING); //We do not support your value.
2046+ return;
2047+ }
2048+ return ($q->num_rows==1);
2049+ }
2050+ /**
2051+ * Checks the user's password
2052+ * @param string $guid The user's GUID
2053+ * @param string $phash The hashed password
2054+ * @return bool Returns true if the password is correct, false if not.
2055+ */
2056+ static private function confirmUserPass($guid,$phash) {
2057+ $q=self::$dbconn->query('SELECT * FROM `users` WHERE `GUID`=\''.$guid.'\'');
2058+ if($q->num_rows!=1) return false; //No such user
2059+ if($phash==$q->fetch_object()->password){ //The password matches the guid
2060+ self::updateTimestamp($guid);
2061+ $_SESSION['userguid']=$guid;
2062+ $_SESSION['userid']=self::generateId($guid);
2063+ $_SESSION['auth_type']='internal';
2064+ self::$logged_in=self::checkauth();
2065+ return true;
2066+ }
2067+ return false;
2068+ }
2069+ /**
2070+ * Logs the current user out
2071+ */
2072+ static function logout() {
2073+ $q=self::$dbconn->query('UPDATE `users` SET `userid`=NULL WHERE `GUID`=\''.self::$guid.'\'');
2074+ unset($_SESSION['userguid'],$_SESSION['userid']);
2075+ self::$username=NULL;
2076+ self::$guid=NULL;
2077+ self::$userlevel=0;
2078+ self::$logged_in=false;
2079+ self::$userinfo=array();
2080+ self::$userid=NULL;
2081+ }
2082+ /**
2083+ * Registers a new user
2084+ * @param string $username The username the registrant wants
2085+ * @param string $password The password the registrant wants to use
2086+ * @param string $email The registrant's email-address
2087+ * @return bool true on success, false on failure.
2088+ * @uses JSError::add()
2089+ * @uses JSError::count()
2090+ */
2091+ static function register($username,$password,$email) {
2092+ global $t;
2093+ // Check fields entered
2094+ if(strlen($username = trim($username)) == 0) //Username
2095+ JSError::add($t->_('Please enter a username'));
2096+ if(strlen($password)==0&&$password!==NULL) //Password
2097+ JSError::add($t->_('Please enter a password'));
2098+ if(strlen($email)==0) //Email
2099+ JSError::add($t->_('Please enter an e-mail address'));
2100+ if(JSError::count()!=0) //Some fields not entered
2101+ return false;
2102+ //Check username
2103+ if(strlen($username) < 5) //Length
2104+ JSError::add($t->_('Username too short (at least 5 letters)'));
2105+ if(strlen($username) > 30) //Length
2106+ JSError::add($t->_('Username too long (not more than 30 letters)'));
2107+ if(!preg_match('/^[0-9a-z]+$/',$username)) //Alphanumeric
2108+ JSError::add($t->_('Username must be alphanumeric'));
2109+ if(self::userExists($username,1)) //Not registered
2110+ JSError::add($t->_('User already exists'));
2111+
2112+ //Check password
2113+ if(strlen($password) < 4&&$password!==NULL) //Length
2114+ JSError::add($t->_('Password too short (at least 4 characters)'));
2115+
2116+ //Check email
2117+ if(!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/",$email)) //Structure
2118+ JSError::add($t->_('Please enter a valid e-mail address'));
2119+ if(JSError::count()!=0)
2120+ return false;
2121+ return ($password===NULL?self::addUser($username, NULL, $email):self::addUser($username,md5($password),$email));
2122+ }
2123+ /**
2124+ * Add a new user to the database
2125+ * @param string $username The username to register
2126+ * @param string $phash The hashed password to register
2127+ * @param string $email The email address to link to the username
2128+ * @return bool true on success, false on failure
2129+ */
2130+ static private function addUser($username,$phash,$email) {
2131+ if($phash===NULL) $p='NULL';
2132+ else $p='\''.$phash.'\'';
2133+ return (bool) self::$dbconn->query('INSERT INTO `users` VALUES (UUID(),\''.$username.'\','.$p.',NULL,1,\''.$email.'\',UNIX_TIMESTAMP(),0,\'a:1:{i:0;s:2:"en";}\')');
2134+ }
2135+ /**
2136+ * Update the timestamp of the user
2137+ * @param string $guid The guid of the user to update the timestamp
2138+ */
2139+ static private function updateTimestamp($guid) {
2140+ self::$dbconn->query('UPDATE `users` SET `timestamp`=UNIX_TIMESTAMP() WHERE `GUID`=\''.$guid.'\''); //Update the last active timestamp
2141+ }
2142+ /**
2143+ * Generate a new userid
2144+ * @param string $guid The guid of the user to generate a new userid for
2145+ * @return string|bool The generated id or false on failure
2146+ */
2147+ static private function generateId($guid) {
2148+ $genid=md5(uniqid(mt_rand(),true));
2149+ if(!self::updateUserField($guid, 'userid', $genid)) return false;
2150+ return $genid;
2151+ }
2152+ /**
2153+ * Checks wether the user is an administrator
2154+ * @return bool true if the user is an admin, false if not
2155+ */
2156+ static function isAdmin() {
2157+ return (self::$userlevel==9);
2158+ }
2159+ /**
2160+ * Update a field in the user database
2161+ * @param string $guid The GUID of the user information you want to update
2162+ * @param string $field The fieldname you want to update
2163+ * @param string $content The new content for the record
2164+ * @return bool true on success, false on failure
2165+ */
2166+ static function updateUserField($guid,$field,$content) {
2167+ if(!self::userExists($guid)) return false;
2168+ return self::$dbconn->query("UPDATE `users` SET `$field` = '$content' WHERE `GUID` = '$guid'");
2169+ }
2170+ /**
2171+ * Changes the password of the user
2172+ * @param string $oldpass The current password
2173+ * @param string $newpass The new password
2174+ * @return bool true on success, false on failure or wrong password
2175+ */
2176+ static function editPass($oldpass,$newpass) {
2177+ if(self::confirmUserPass(self::$guid,md5($oldpass)))
2178+ return self::updateUserField(self::$guid,'password',md5($newpass));
2179+ return false;
2180+ }
2181+ /**
2182+ * Gets the user's username from the GUID
2183+ * @param string $guid The GUID of the user you want to look up
2184+ * @return string the username
2185+ */
2186+ static function getUser($guid) {
2187+ if(!self::userExists($guid)) return 'Unknown user';
2188+ return self::$dbconn->query('SELECT `username` FROM `users` WHERE `GUID`=\''.$guid.'\'')->fetch_object()->username;
2189+ }
2190+ /**
2191+ * Gets the user's GUID from the username
2192+ * @param string $username The username of the user you want to look up
2193+ * @return string the GUID
2194+ */
2195+ static function getGUID($username) {
2196+ if(!self::userExists($username,1)) return 0;
2197+ return self::$dbconn->query('SELECT `GUID` FROM `users` WHERE `username`=\''.$username.'\'')->fetch_object()->GUID;
2198+ }
2199+ /**
2200+ * Resolves an openid hash to a normal user account
2201+ * @param string $openidhash sha1 hash of claimed identity
2202+ * @return bool
2203+ */
2204+ private static function resolveOpenId($openidhash) {
2205+ $userguidq=self::$dbconn->query('SELECT * FROM `users_openid` WHERE `hash`=\''.$openidhash.'\'');
2206+ //$userguidq=self::$dbconn->query('SELECT * FROM `users_openid` WHERE `identity` = \'2c9fa0b355bac114e83c7935e36adb48d1484645\'');
2207+ if($userguidq->num_rows==0) { //No OpenId linked
2208+ return false;
2209+ }
2210+ $userguid=$userguidq->fetch_object()->link;
2211+ if(!self::userExists($userguid)) return false;
2212+ self::updateTimestamp($userguid);
2213+ $_SESSION['userguid']=self::$guid=$userguid;
2214+ $_SESSION['userid']=self::$userid=self::generateId($userguid);
2215+ $_SESSION['auth_type']=self::$authtype='internal';
2216+ self::$logged_in=self::checkauth();
2217+ }
2218+ /**
2219+ * Links an OpenID identity to a normal user
2220+ * @param string $guid The GUID of the normal user
2221+ * @param string $openid The claimed identity
2222+ * @return bool
2223+ */
2224+ static function bindOpenID($guid,$openid) {
2225+ if(!self::userExists($guid)) return false;
2226+ if(self::isBoundOpenId(sha1($openid))) return false;
2227+ return self::$dbconn->query('INSERT INTO `users_openid` VALUES ( \''.sha1($openid).'\',\''.$guid.'\',\''.self::$dbconn->escape_string($openid).'\')');
2228+ }
2229+ /**
2230+ * Unlinks an OpenID identity from a normal user
2231+ * @param string $openidhash sha1 hash of the claimed identity
2232+ * @return bool
2233+ */
2234+ static function unbindOpenId($openidhash) {
2235+ return self::$dbconn->query('DELETE FROM `users_openid` WHERE `hash`=\''.$openidhash.'\'');
2236+ }
2237+ /**
2238+ * Checks wether an openid is bound
2239+ * @param string $openidhash sha1 hash of the claimed identity
2240+ * @return bool
2241+ */
2242+ static function isBoundOpenId($openidhash) {
2243+ return (self::$dbconn->query('SELECT * FROM `users_openid` WHERE `hash`=\''.$openidhash.'\'')->num_rows==1);
2244+ }
2245+ /**
2246+ * Gets the openid nam
2247+ * @param unknown_type $openidhash
2248+ */
2249+ static function getOpenIdName($openidhash) {
2250+ return self::$dbconn->query('SELECT * FROM `users_openid` WHERE `hash`=\''.$openidhash.'\'')->fetch_object()->identity;
2251+ }
2252+ /**
2253+ * Log user actions
2254+ * @param int $type The type of action to log (200 for success, 401 for authentication failure,...)
2255+ * @param string $msg The message to log
2256+ */
2257+ static function log($type,$msg) {
2258+ self::$dbconn->query("INSERT INTO serv_log VALUES (NULL,$type, NULL, '".self::$guid."', '$_SERVER[REMOTE_ADDR]', '$_SERVER[REQUEST_URI]', '$msg', 0)");
2259+ }
2260+}
2261+>>>>>>> MERGE-SOURCE
2262 session::init();
2263\ No newline at end of file
2264
2265=== added directory 'openid'
2266=== added file 'openid/create_account.php'
2267--- openid/create_account.php 1970-01-01 00:00:00 +0000
2268+++ openid/create_account.php 2011-09-05 19:10:37 +0000
2269@@ -0,0 +1,46 @@
2270+<?php
2271+define('NO_UURL',true);
2272+define('__DEBUG__',true);
2273+$identity='';
2274+$attributes=array();
2275+chdir(__DIR__.'/..'); // Our root is at the parent directory!
2276+require 'inc/controllers.php';
2277+if($_SESSION['auth_type']!='openid') {
2278+ JSError::add('You need an OpenID to link to your account.');
2279+}
2280+if(session::isBoundOpenId(sha1($_SESSION['openid']['identity']))) {
2281+ JSError::add('This OpenID is already bound.');
2282+}
2283+if(JSError::count()>0) {
2284+ echo JSError::show();
2285+ exit;
2286+}
2287+if(!isset($_POST['user'])) {
2288+ echo '<form method="POST" onsubmit="simplerequest.post(\'/openid/create_account.php?\',$(this).serialize(),\'Account registered and bound with OpenID\',\'Error registering account\',refreshFrames);return false;">';
2289+ echo '<label>'.$t->_('Username').':<input type="text" name="user" maxlength="30"></label><br>';
2290+ if(!isset($_SESSION['openid']['attributes']['contact/email'])) {
2291+ $email='';
2292+ }
2293+ else {
2294+ $email=$_SESSION['openid']['attributes']['contact/email'];
2295+ }
2296+ echo '<label>'.$t->_('E-mail address').':<input type="text" name="email" maxlength="50" value="'.$email.'"></label><br>';
2297+ echo '<input type="submit" value="'.$t->_('Register').'" class="button">';
2298+ echo '</form>';
2299+}
2300+else {
2301+ if(!session::register($_POST['user'], NULL, $_POST['email'])) {
2302+ echo JSError::show();
2303+ }
2304+ else {
2305+ $guid=session::getGUID($_POST['user']);
2306+ if(session::bindOpenID($guid, $_SESSION['openid']['identity'])) {
2307+ echo 'true';
2308+ }
2309+ else {
2310+ JSError::add('User registered but error while binding OpenID');
2311+ echo JSError::show();
2312+ }
2313+ }
2314+
2315+}
2316\ No newline at end of file
2317
2318=== added file 'openid/link_account.php'
2319--- openid/link_account.php 1970-01-01 00:00:00 +0000
2320+++ openid/link_account.php 2011-09-05 19:10:37 +0000
2321@@ -0,0 +1,40 @@
2322+<?php
2323+define('NO_UURL',true);
2324+define('__DEBUG__',true);
2325+$identity='';
2326+$attributes=array();
2327+chdir(__DIR__.'/..'); // Our root is at the parent directory!
2328+require 'inc/controllers.php';
2329+if($_SESSION['auth_type']!='openid') {
2330+ JSError::add('You need an OpenID to link to your account.');
2331+}
2332+if(session::isBoundOpenId(sha1($_SESSION['openid']['identity']))) {
2333+ JSError::add('This OpenID is already bound.');
2334+}
2335+if(JSError::count()>0) {
2336+ echo JSError::show();
2337+ exit;
2338+}
2339+$_SESSION['openid_link_id']=$_SESSION['openid']['identity'];
2340+if(!isset($_POST['user'])) {
2341+ echo 'Now just log in to your account, this OpenID will be bound.';
2342+/* echo '<form action="" method="POST">';
2343+ echo '<label>'.$t->_('Username').': <input type="text" name="user"></label><br>';
2344+ echo '<label>'.$t->_('Password').': <input type="password" name="pass"><br>';
2345+ echo '<input type="submit">';
2346+ echo '</form>';
2347+}
2348+/*else {
2349+ if(session::login($_POST['user'], $_POST['pass'])) {
2350+ session::$guid=session::getGUID($_POST['user']);
2351+ if(session::bindOpenID(session::$guid, sha1($_SESSION['openid']['identity']))) {
2352+ echo "OpenID bound to your account";
2353+ }
2354+ else {
2355+ echo "Error binding OpenID";
2356+ }
2357+ }
2358+ else {
2359+ echo "Login failure";
2360+ }*/
2361+}
2362
2363=== added file 'openid/login.php'
2364--- openid/login.php 1970-01-01 00:00:00 +0000
2365+++ openid/login.php 2011-09-05 19:10:37 +0000
2366@@ -0,0 +1,79 @@
2367+<?php
2368+define('NO_UURL',true);
2369+define('__DEBUG__',true);
2370+$identity='';
2371+$attributes=array();
2372+chdir(__DIR__.'/..'); // Our root is at the parent directory!
2373+require 'inc/controllers.php';
2374+require 'inc/openid/rp.php';
2375+try {
2376+ $openid = new LightOpenID;
2377+ if(!$openid->mode) {
2378+ if(isset($_POST['openid_identifier'])) {
2379+ $openid->identity = $_POST['openid_identifier'];
2380+ $openid->optional=array('pref/language','contact/email','namePerson/friendly');
2381+ header('Location: ' . $openid->authUrl());
2382+ exit;
2383+
2384+ }
2385+?>
2386+<!DOCTYPE html>
2387+<html>
2388+<head>
2389+ <title><?php echo $t->_('OpenID Login'); ?></title>
2390+ <!-- Simple OpenID Selector -->
2391+ <link type="text/css" rel="stylesheet" href="<?php echo URL_STATIC ?>/css/openid.css" />
2392+ <script type="text/javascript" src="<?php echo DOMAIN; ?>/scripts.js"></script>
2393+ <script type="text/javascript" src="<?php echo URL_STATIC; ?>/public_js/openid-jquery.js"></script>
2394+ <script type="text/javascript" src="<?php echo URL_SCRIPTS; ?>/openid.js"></script>
2395+ <script type="text/javascript">
2396+ $(document).ready(function() {
2397+ openid.init('openid_identifier');
2398+ });
2399+ </script>
2400+ <!-- /Simple OpenID Selector -->
2401+ <style type="text/css">
2402+ /* Basic page formatting */
2403+ body {
2404+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
2405+ }
2406+ </style>
2407+</head>
2408+
2409+<body>
2410+ <form action="/openid/login.php" target="_blank" method="post" id="openid_form">
2411+ <input type="hidden" name="action" value="verify" />
2412+ <div id="openid_choice">
2413+ <p>Please click your account provider:</p>
2414+ <div id="openid_btns"></div>
2415+ </div>
2416+ <div id="openid_input_area">
2417+ <input id="openid_identifier" name="openid_identifier" type="text" value="http://" />
2418+ <input id="openid_submit" type="submit" value="Sign-In"/>
2419+ </div>
2420+ </form>
2421+</body>
2422+</html>
2423+<?php
2424+ } elseif($openid->mode == 'cancel') {
2425+ echo '<script>window.opener.notice.error("OpenID login cancelled","If you didn\'t cancel authentication, contact your provider");self.close()</script>';
2426+ } else {
2427+ $v=$openid->validate();
2428+ $identity=$openid->identity;
2429+ $attributes=$openid->getAttributes();
2430+ if(!session::isBoundOpenId(sha1($identity))) {
2431+ echo '<script>$=window.opener.$;$("#dlg_openid").html("This OpenID is not yet bound to any account.<br><a onclick=\'$(\"#dlg_openid\").load(\"openid/create_account.php\")\' class=\'link\'>Create an account</a> or <a onclick=\'$(\"#dlg_openid\").load(\"openid/link_account.php\")\' class=\'link\'>link</a> this OpenID to your account.").dialog(\'moveToTop\');self.close()</script>';
2432+ }
2433+ else {
2434+ echo '<script>$=window.opener.$;window.opener.refreshFrames();$("#dlg_login").dialog("close");$("#dlg_openid").dialog("destroy");window.opener.notice.message("OpenID auto login successful","'.$_SESSION['openid']['identity'].'"); window.opener.$("#dlg_log-in").dialog("close"); self.close();</script>';
2435+ }
2436+ $_SESSION['auth_type']='openid';
2437+ $_SESSION['openid']['identity']=$identity;
2438+ $_SESSION['openid']['attributes']=$attributes;
2439+ session::init();
2440+
2441+ }
2442+} catch(ErrorException $e) {
2443+ echo $e->getMessage();
2444+}
2445+
2446
2447=== added file 'scripts/openid.js.php'
2448--- scripts/openid.js.php 1970-01-01 00:00:00 +0000
2449+++ scripts/openid.js.php 2011-09-05 19:10:37 +0000
2450@@ -0,0 +1,98 @@
2451+/*
2452+ Simple OpenID Plugin
2453+ http://code.google.com/p/openid-selector/
2454+
2455+ This code is licensed under the New BSD License.
2456+ Edited 2011-06-16 https://launchpad.net/remotecp-panel (Added PHP translations)
2457+*/
2458+
2459+var providers_large = {
2460+ google : {
2461+ name : 'Google',
2462+ url : 'https://www.google.com/accounts/o8/id'
2463+ },
2464+ yahoo : {
2465+ name : 'Yahoo',
2466+ url : 'http://me.yahoo.com/'
2467+ },
2468+ aol : {
2469+ name : 'AOL',
2470+ label : '<?php echo $t->_('Enter your AOL screenname.'); ?>',
2471+ url : 'http://openid.aol.com/{username}'
2472+ },
2473+ myopenid : {
2474+ name : 'MyOpenID',
2475+ label : '<?php echo $t->_('Enter your MyOpenID username.'); ?>',
2476+ url : 'http://{username}.myopenid.com/'
2477+ },
2478+ openid : {
2479+ name : 'OpenID',
2480+ label : '<?php echo $t->_('Enter your OpenID.'); ?>',
2481+ url : null
2482+ }
2483+};
2484+
2485+var providers_small = {
2486+ livejournal : {
2487+ name : 'LiveJournal',
2488+ label : '<?php echo $t->_('Enter your Livejournal username.'); ?>',
2489+ url : 'http://{username}.livejournal.com/'
2490+ },
2491+ /* flickr: {
2492+ name: 'Flickr',
2493+ label: '<?php echo $t->_('Enter your Flickr username.'); ?>',
2494+ url: 'http://flickr.com/{username}/'
2495+ }, */
2496+ /* technorati: {
2497+ name: 'Technorati',
2498+ label: '<?php echo $t->_('Enter your Technorati username.'); ?>',
2499+ url: 'http://technorati.com/people/technorati/{username}/'
2500+ }, */
2501+ wordpress : {
2502+ name : 'Wordpress',
2503+ label : '<?php echo $t->_('Enter your Wordpress.com username.'); ?>',
2504+ url : 'http://{username}.wordpress.com/'
2505+ },
2506+ blogger : {
2507+ name : 'Blogger',
2508+ label : '<?php echo $t->_('Your Blogger account'); ?>',
2509+ url : 'http://{username}.blogspot.com/'
2510+ },
2511+ verisign : {
2512+ name : 'Verisign',
2513+ label : '<?php echo $t->_('Your Verisign username'); ?>',
2514+ url : 'http://{username}.pip.verisignlabs.com/'
2515+ },
2516+ /* vidoop: {
2517+ name: 'Vidoop',
2518+ label: '<?php echo $t->_('Your Vidoop username'); ?>',
2519+ url: 'http://{username}.myvidoop.com/'
2520+ }, */
2521+
2522+ claimid : {
2523+ name : 'ClaimID',
2524+ label : '<?php echo $t->_('Your ClaimID username'); ?>',
2525+ url : 'http://claimid.com/{username}'
2526+ },
2527+ clickpass : {
2528+ name : 'ClickPass',
2529+ label : '<?php echo $t->_('Enter your ClickPass username'); ?>',
2530+ url : 'http://clickpass.com/public/{username}'
2531+ },
2532+ google_profile : {
2533+ name : 'Google Profile',
2534+ label : '<?php echo $t->_('Enter your Google Profile username'); ?>',
2535+ url : 'http://www.google.com/profiles/{username}'
2536+ },
2537+ launchpad: {
2538+ name: 'Launchpad',
2539+ label: '<?php echo $t->_('Your Launchpad username'); ?>',
2540+ url: 'https://launchpad.net/~{username}'
2541+ }
2542+};
2543+
2544+openid.locale = 'en';
2545+openid.sprite = 'en'; // reused in german& japan localization
2546+openid.signin_text = '<?php echo $t->_('Sign-In'); ?>';
2547+openid.image_title = '<?php echo sprintf($t->_('Log in with %s'),'{provider}'); ?>';
2548+openid.img_path = '<?php echo DOMAIN; ?>/static/images/openid/';
2549
2550=== added directory 'static/css'
2551=== added file 'static/css/openid.css'
2552--- static/css/openid.css 1970-01-01 00:00:00 +0000
2553+++ static/css/openid.css 2011-09-05 19:10:37 +0000
2554@@ -0,0 +1,69 @@
2555+/*
2556+ Simple OpenID Plugin
2557+ http://code.google.com/p/openid-selector/
2558+
2559+ This code is licensed under the New BSD License.
2560+*/
2561+
2562+#openid_form {
2563+ width: 580px;
2564+}
2565+
2566+#openid_form legend {
2567+ font-weight: bold;
2568+}
2569+
2570+#openid_choice {
2571+ display: none;
2572+}
2573+
2574+#openid_input_area {
2575+ clear: both;
2576+ padding: 10px;
2577+}
2578+
2579+#openid_btns, #openid_btns br {
2580+ clear: both;
2581+}
2582+
2583+#openid_highlight {
2584+ padding: 3px;
2585+ background-color: #FFFCC9;
2586+ float: left;
2587+}
2588+
2589+.openid_large_btn {
2590+ width: 100px;
2591+ height: 60px;
2592+/* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */
2593+ _width: 102px;
2594+ _height: 62px;
2595+
2596+ border: 1px solid #DDD;
2597+ margin: 3px;
2598+ float: left;
2599+}
2600+
2601+.openid_small_btn {
2602+ width: 24px;
2603+ height: 24px;
2604+/* fix for IE 6 only: http://en.wikipedia.org/wiki/CSS_filter#Underscore_hack */
2605+ _width: 26px;
2606+ _height: 26px;
2607+
2608+ border: 1px solid #DDD;
2609+ margin: 3px;
2610+ float: left;
2611+}
2612+
2613+a.openid_large_btn:focus {
2614+ outline: none;
2615+}
2616+
2617+a.openid_large_btn:focus {
2618+ -moz-outline-style: none;
2619+}
2620+
2621+.openid_selected {
2622+ border: 4px solid #DDD;
2623+}
2624\ No newline at end of file
2625
2626=== added directory 'static/images/openid'
2627=== added file 'static/images/openid/openid-inputicon.gif'
2628Binary files static/images/openid/openid-inputicon.gif 1970-01-01 00:00:00 +0000 and static/images/openid/openid-inputicon.gif 2011-09-05 19:10:37 +0000 differ
2629=== added file 'static/images/openid/openid-providers-en.png'
2630Binary files static/images/openid/openid-providers-en.png 1970-01-01 00:00:00 +0000 and static/images/openid/openid-providers-en.png 2011-09-05 19:10:37 +0000 differ
2631=== added file 'static/public_js/openid-jquery.js'
2632--- static/public_js/openid-jquery.js 1970-01-01 00:00:00 +0000
2633+++ static/public_js/openid-jquery.js 2011-09-05 19:10:37 +0000
2634@@ -0,0 +1,194 @@
2635+/*
2636+ Simple OpenID Plugin
2637+ http://code.google.com/p/openid-selector/
2638+
2639+ This code is licensed under the New BSD License.
2640+
2641+ Modified: 2011-06-16 https://launchpad.net/remotecp-panel/ (removed demo code)
2642+*/
2643+
2644+var providers;
2645+var openid;
2646+(function ($) {
2647+openid = {
2648+ version : '1.3', // version constant
2649+ cookie_expires : 6 * 30, // 6 months.
2650+ cookie_name : 'openid_provider',
2651+ cookie_path : '/',
2652+
2653+ img_path : '',
2654+ locale : null, // is set in openid-<locale>.js
2655+ sprite : null, // usually equals to locale, is set in
2656+ // openid-<locale>.js
2657+ signin_text : null, // text on submit button on the form
2658+ all_small : false, // output large providers w/ small icons
2659+ no_sprite : false, // don't use sprite image
2660+ image_title : '{provider}', // for image title
2661+
2662+ input_id : null,
2663+ provider_url : null,
2664+ provider_id : null,
2665+
2666+ /**
2667+ * Class constructor
2668+ *
2669+ * @return {Void}
2670+ */
2671+ init : function(input_id) {
2672+ providers = $.extend({}, providers_large, providers_small);
2673+ var openid_btns = $('#openid_btns');
2674+ this.input_id = input_id;
2675+ $('#openid_choice').show();
2676+ $('#openid_input_area').empty();
2677+ var i = 0;
2678+ // add box for each provider
2679+ for (id in providers_large) {
2680+ box = this.getBoxHTML(id, providers_large[id], (this.all_small ? 'small' : 'large'), i++);
2681+ openid_btns.append(box);
2682+ }
2683+ if (providers_small) {
2684+ openid_btns.append('<br/>');
2685+ for (id in providers_small) {
2686+ box = this.getBoxHTML(id, providers_small[id], 'small', i++);
2687+ openid_btns.append(box);
2688+ }
2689+ }
2690+ $('#openid_form').submit(this.submit);
2691+ var box_id = this.readCookie();
2692+ if (box_id) {
2693+ this.signin(box_id, true);
2694+ }
2695+ },
2696+
2697+ /**
2698+ * @return {String}
2699+ */
2700+ getBoxHTML : function(box_id, provider, box_size, index) {
2701+ if (this.no_sprite) {
2702+ var image_ext = box_size == 'small' ? '.ico.gif' : '.gif';
2703+ return '<a title="' + this.image_title.replace('{provider}', provider["name"]) + '" href="javascript:openid.signin(\'' + box_id + '\');"'
2704+ + ' style="background: #FFF url(' + this.img_path + '../images.' + box_size + '/' + box_id + image_ext + ') no-repeat center center" '
2705+ + 'class="' + box_id + ' openid_' + box_size + '_btn"></a>';
2706+ }
2707+ var x = box_size == 'small' ? -index * 24 : -index * 100;
2708+ var y = box_size == 'small' ? -60 : 0;
2709+ return '<a title="' + this.image_title.replace('{provider}', provider["name"]) + '" href="javascript:openid.signin(\'' + box_id + '\');"'
2710+ + ' style="background: #FFF url(' + this.img_path + 'openid-providers-' + this.sprite + '.png); background-position: ' + x + 'px ' + y + 'px" '
2711+ + 'class="' + box_id + ' openid_' + box_size + '_btn"></a>';
2712+ },
2713+
2714+ /**
2715+ * Provider image click
2716+ *
2717+ * @return {Void}
2718+ */
2719+ signin : function(box_id, onload) {
2720+ var provider = providers[box_id];
2721+ if (!provider) {
2722+ return;
2723+ }
2724+ this.highlight(box_id);
2725+ this.setCookie(box_id);
2726+ this.provider_id = box_id;
2727+ this.provider_url = provider['url'];
2728+ // prompt user for input?
2729+ if (provider['label']) {
2730+ this.useInputBox(provider);
2731+ } else {
2732+ $('#openid_input_area').empty();
2733+ if (!onload) {
2734+ $('#openid_form').submit();
2735+ }
2736+ }
2737+ },
2738+
2739+ /**
2740+ * Sign-in button click
2741+ *
2742+ * @return {Boolean}
2743+ */
2744+ submit : function() {
2745+ var url = openid.provider_url;
2746+ if (url) {
2747+ url = url.replace('{username}', $('#openid_username').val());
2748+ openid.setOpenIdUrl(url);
2749+ }
2750+ if (url.indexOf("javascript:") == 0) {
2751+ url = url.substr("javascript:".length);
2752+ eval(url);
2753+ return false;
2754+ }
2755+ return true;
2756+ },
2757+
2758+ /**
2759+ * @return {Void}
2760+ */
2761+ setOpenIdUrl : function(url) {
2762+ var hidden = document.getElementById(this.input_id);
2763+ if (hidden != null) {
2764+ hidden.value = url;
2765+ } else {
2766+ $('#openid_form').append('<input type="hidden" id="' + this.input_id + '" name="' + this.input_id + '" value="' + url + '"/>');
2767+ }
2768+ },
2769+
2770+ /**
2771+ * @return {Void}
2772+ */
2773+ highlight : function(box_id) {
2774+ // remove previous highlight.
2775+ var highlight = $('#openid_highlight');
2776+ if (highlight) {
2777+ highlight.replaceWith($('#openid_highlight a')[0]);
2778+ }
2779+ // add new highlight.
2780+ $('.' + box_id).wrap('<div id="openid_highlight"></div>');
2781+ },
2782+
2783+ setCookie : function(value) {
2784+ var date = new Date();
2785+ date.setTime(date.getTime() + (this.cookie_expires * 24 * 60 * 60 * 1000));
2786+ var expires = "; expires=" + date.toGMTString();
2787+ document.cookie = this.cookie_name + "=" + value + expires + "; path=" + this.cookie_path;
2788+ },
2789+
2790+ readCookie : function() {
2791+ var nameEQ = this.cookie_name + "=";
2792+ var ca = document.cookie.split(';');
2793+ for ( var i = 0; i < ca.length; i++) {
2794+ var c = ca[i];
2795+ while (c.charAt(0) == ' ')
2796+ c = c.substring(1, c.length);
2797+ if (c.indexOf(nameEQ) == 0)
2798+ return c.substring(nameEQ.length, c.length);
2799+ }
2800+ return null;
2801+ },
2802+
2803+ /**
2804+ * @return {Void}
2805+ */
2806+ useInputBox : function(provider) {
2807+ var input_area = $('#openid_input_area');
2808+ var html = '';
2809+ var id = 'openid_username';
2810+ var value = '';
2811+ var label = provider['label'];
2812+ var style = '';
2813+ if (label) {
2814+ html = '<p>' + label + '</p>';
2815+ }
2816+ if (provider['name'] == 'OpenID') {
2817+ id = this.input_id;
2818+ value = 'http://';
2819+ style = 'background: #FFF url(' + this.img_path + 'openid-inputicon.gif) no-repeat scroll 0 50%; padding-left:18px;';
2820+ }
2821+ html += '<input id="' + id + '" type="text" style="' + style + '" name="' + id + '" value="' + value + '" />'
2822+ + '<input id="openid_submit" type="submit" value="' + this.signin_text + '"/>';
2823+ input_area.empty();
2824+ input_area.append(html);
2825+ $('#' + id).focus();
2826+ }
2827+};
2828+})(jQuery);
2829
2830=== renamed file 'system_local/login.php' => 'system_local/login.php.THIS'
2831=== modified file 'system_local/user_props.php'
2832--- system_local/user_props.php 2011-09-02 16:38:47 +0000
2833+++ system_local/user_props.php 2011-09-05 19:10:37 +0000
2834@@ -1,3 +1,4 @@
2835+<<<<<<< TREE
2836 <?php //@./system_local/user_props.php ?>
2837 <!-- HEADERS >
2838 <AJAX_SCRIPTLOC>account_scripts.js</AJAX_SCRIPTLOC>
2839@@ -107,4 +108,134 @@
2840 }
2841 echo JSError::show();
2842 }
2843+=======
2844+<?php //@./system_local/user_props.php ?>
2845+<!-- HEADERS >
2846+<AJAX_SCRIPTLOC>account_scripts.js</AJAX_SCRIPTLOC>
2847+<AJAX_SCRIPTEVAL>setTimeout('$("#user_edit_language").sortable().removeClass("ui-state-disabled");',1)</AJAX_SCRIPTEVAL>
2848+< HEADERS --><?php
2849+ /**
2850+ * user_props.php - Jquery UI control panel (?control=userinfo)||(?control=useredit)
2851+ * REQUIRE in cpanel
2852+ *
2853+ * COPYRIGHT: Jpmaster77's login script
2854+ * URL: http://evolt.org/PHP-Login-System-with-Admin-Features
2855+ * CHANGED BY lnhost.co.cc
2856+ * ALL CHANGES COPYRIGHT 2010 lnhost.co.cc
2857+ */
2858+
2859+if($_GET['control']=="userinfo") {
2860+ $req_user = trim($_GET['user']);
2861+ if(!$req_user || strlen($req_user) == 0 ||
2862+ !session::userExists($req_user)){
2863+ echo sprintf($t->_('The user you requested, %s, does not exist.'),$req_user);
2864+ }
2865+ /* Logged in user viewing own account */
2866+ if(session::$guid==$req_user) {$own_account=true;} else{$own_account=false; session::log('200','Request account info (Requested user:'.$req_user.')');}
2867+ /* Display requested user information */
2868+ $req_user_info = session::getUserInfo($req_user);
2869+ ?><p><b><?php echo $t->_('Username'); ?>:</b>
2870+ <?php echo $req_user_info['username']; ?><br><?php
2871+ /* Email */
2872+ if($own_account) {
2873+ ?> <b> <?php echo $t->_('E-mail address'); ?>:</b> <?php echo $req_user_info["email"]; ?><br><?php
2874+ }
2875+
2876+ /**
2877+ * Note: when you add your own fields to the users table
2878+ * to hold more information, like homepage, location, etc.
2879+ * they can be easily accessed by the user info array.
2880+ *
2881+ * session::$userinfo["location"]; (for logged in users)
2882+ *
2883+ * ..and for this page,
2884+ *
2885+ * $req_user_info["location"]; (for any user)
2886+ */
2887+ /* If logged in user viewing own account, give link to edit */
2888+ if($own_account){
2889+ echo "<br><a onclick=\"openLoc('','?control=useredit','account');\">".$t->_('Edit account')."</a>";
2890+ }
2891+}
2892+else if($_GET['control']=="useredit") {
2893+ require('inc/languageCodes.php');
2894+ if(!isset($_POST['currpass'])&&!isset($_POST['email'])&&!isset($_GET['function'])) {
2895+ if(session::$userinfo['password']!==NULL) { //User has a password?>
2896+ <fieldset><form name="pass_edit" method='POST' onsubmit="if(this.newpass.value!=this.newpass2.value){$(this).prepend(message.error('<?php echo $t->_('Repeated password does not match'); ?>')); return false;} success=sjax.post('?control=useredit','currpass='+this.currpass.value+'&newpass='+this.newpass.value); this.reset(); if(success=='true'){$(this).prepend(message.info('<?php echo $t->_('Password saved'); ?>'));} else if(success=='false') {$(this).prepend(message.error('<?php echo $t->_('Password could not be saved'); ?>'));} else {$(this).prepend(success);} return false;">
2897+ <?php echo $t->_('Current password') ?>:<input type="password" name="currpass" maxlength="30">
2898+ <br>
2899+ <?php echo $t->_('New password'); ?>:<input type="password" name="newpass" maxlength="30" onkeyup="account.testPassword(this)"> <span style="background-image: url(<?php echo URL_STATIC; ?>/images/pwstrength/bg_strength_gradient.jpg);background-repeat: repeat-y;width: 100px;text-align: center;border: 1px solid black;display:inline-block">0%</span> <span><?php echo $t->_('Too Short'); ?></span><br>
2900+ <?php echo $t->_('Repeat new password') ?>:<input type="password" name="newpass2" maxlength="30"><br>
2901+ <input value="<?php echo $t->_('Change password') ?>" type="submit">
2902+ </form></fieldset>
2903+ <br>
2904+ <?php } ?>
2905+ <form method='POST' onsubmit="success=sjax.post('?control=useredit','email='+this.email.value+'&language='+$(this).find('ul').sortable('toArray').join(',')); success=success.split('|');if(success[0]=='true') {$(message.info('<?php echo $t->_('Settings changed'); ?>')).prependTo(this);}else if(success[0]=='false') {success[0]='<?php echo $t->_('Settings not changed<br>Errors'); ?>:';success.join('<br>');$(this).prepend(message.error(success));}else {success.join('|');$(this).prepend(success);} return false;">
2906+ <fieldset>
2907+ <legend><?php echo $t->_('General information'); ?></legend>
2908+ <?php echo $t->_('E-mail address'); ?>:<input type="text" name="email" maxlength="50" value="<?php echo session::$userinfo['email'];?>">
2909+ <br>
2910+ <?php
2911+ echo $t->_('Language').':';
2912+ $languages=unserialize(session::$userinfo['lang']);
2913+ ?>
2914+ <ul id='user_edit_language' class='ui-state-disabled'>
2915+ <?php foreach($languages as $language) { ?>
2916+ <li class='ui-state-default' id='user_edit_language_<?php echo $language; ?>'><?php echo $language.': '.$languageCodes[$language]; ?></li>
2917+ <?php } ?>
2918+ </ul>
2919+ <label><?php echo $t->_('Add language'); ?><select onclick='this.blur()' onchange='$(this).prev().append("<li class=\"ui-state-default\" id=\"user_edit_language_"+this.value+"\">"+this.options[this.selectedIndex].innerHTML+"</li>").sortable("refresh")'>
2920+ <option disabled><?php echo $t->_('Select additional language'); ?></option>
2921+ <?php foreach($languageCodes as $code=>$name) {
2922+ echo '<option value="'.$code.'">'.$code.': '.$name.'</option>';
2923+ } ?>
2924+ </select></label><br>
2925+ <input type="submit" value="<?php echo $t->_('Submit settings') ?>">
2926+ </fieldset>
2927+ <fieldset>
2928+ <legend><?php echo $t->_('Bound OpenIDs'); ?></legend>
2929+ <?php $oidq=$local_connection->query('SELECT * FROM `users_openid` WHERE `link`=\''.session::$guid.'\'');
2930+ while($oid=$oidq->fetch_assoc()) {
2931+ echo $oid['identity'].' <img src="'.URL_IMG.'/Silk/delete.png" alt="'.$t->_('Delete').'" title="'.$t->_('Delete this OpenID from your account').'" onclick="simplerequest.post(\'?control=useredit&function=delopenid\',\'oidhash='.$oid['hash'].'\',\''.$t->_('OpenID unlinked').'\',\''.$t->_('Error unlinking OpenID').'\',refreshCurrentTab)" class="link"><br>';
2932+ }
2933+ ?>
2934+ </fieldset>
2935+ </form>
2936+
2937+ </p>
2938+<?php
2939+ }
2940+ elseif(isset($_POST['currpass'])) {
2941+ $retval = session::editPass($_POST['currpass'], $_POST['newpass']);
2942+
2943+ /* Account edit successful */
2944+ if($retval){
2945+ echo "true";
2946+ }
2947+ /* Error found with form */
2948+ else{
2949+ echo "false";
2950+ }
2951+ }
2952+ elseif(isset($_POST['email'])) {
2953+ if(!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/",$_POST['email']))
2954+ JSError::add($t->_('Please enter a valid e-mail address'));
2955+ if(JSError::count()==0) {
2956+ if(!session::updateUserField(session::$guid,'email',$_POST['email']))
2957+ JSError::add($t->_('Error updating e-mail address'));
2958+ $langs=explode(',',$_POST['language']);
2959+ foreach($langs as &$lang) {
2960+ $lang=substr($lang,-2);
2961+ }
2962+ if(!session::updateUserField(session::$guid,'lang',serialize($langs)))
2963+ JSError::add($t->_('Error updating your languages'));
2964+ }
2965+ echo JSError::show();
2966+ }
2967+ elseif($_GET['function']=='delopenid') {
2968+ if(!session::isBoundOpenId($_POST['oidhash'])) JSError::add($t->_('This OpenID is not bound'));
2969+ if(!session::unbindOpenId($_POST['oidhash'])) JSError::add($t->_('Error unbinding the OpenID'));
2970+ echo JSError::show();
2971+ }
2972+>>>>>>> MERGE-SOURCE
2973 } ?>
2974\ No newline at end of file
2975
2976=== modified file 't/default.pot'
2977--- t/default.pot 2011-09-02 16:38:47 +0000
2978+++ t/default.pot 2011-09-05 19:10:37 +0000
2979@@ -2,8 +2,13 @@
2980 msgstr ""
2981 "Project-Id-Version: RemoteCP 2.0\n"
2982 "Report-Msgid-Bugs-To: \n"
2983+<<<<<<< TREE
2984 "POT-Creation-Date: 2011-08-25 11:42+0100\n"
2985 "PO-Revision-Date: 2011-08-25 11:42+0100\n"
2986+=======
2987+"POT-Creation-Date: 2011-06-15 21:29+0100\n"
2988+"PO-Revision-Date: 2011-06-15 21:30+0100\n"
2989+>>>>>>> MERGE-SOURCE
2990 "Last-Translator: Lars Vierbergen\n"
2991 "Language-Team: \n"
2992 "MIME-Version: 1.0\n"
2993@@ -13,6 +18,7 @@
2994 "X-Poedit-Basepath: ..\n"
2995 "X-Poedit-SearchPath-0: .\n"
2996
2997+<<<<<<< TREE
2998 #: panel.php:14
2999 msgid "Main"
3000 msgstr ""
3001@@ -30,9 +36,13 @@
3002 #: panel.php:60
3003 #: remote_panel.php:65
3004 #: frame.php:173
3005+=======
3006+#: frame.php:168
3007+>>>>>>> MERGE-SOURCE
3008 msgid "Login failed. Try again"
3009 msgstr ""
3010
3011+<<<<<<< TREE
3012 #: panel.php:80
3013 #: remote_panel.php:85
3014 msgid "Desktop"
3015@@ -41,9 +51,13 @@
3016 #: panel.php:93
3017 #: remote_panel.php:98
3018 #: frame.php:194
3019+=======
3020+#: frame.php:189
3021+>>>>>>> MERGE-SOURCE
3022 msgid "Log off"
3023 msgstr ""
3024
3025+<<<<<<< TREE
3026 #: panel.php:95
3027 #: panel.php:111
3028 #: remote_panel.php:100
3029@@ -51,15 +65,26 @@
3030 #: frame.php:195
3031 #: frame.php:207
3032 #: system_local/register.php:8
3033+=======
3034+#: frame.php:190
3035+#: frame.php:204
3036+>>>>>>> MERGE-SOURCE
3037 msgid "Register"
3038 msgstr ""
3039
3040+<<<<<<< TREE
3041 #: panel.php:100
3042 #: remote_panel.php:105
3043 #, php-format
3044 msgid "RemoteCP is running in compatiblity mode.<br>%1$s and %2$s have full support, maybe you should switch?"
3045+=======
3046+#: frame.php:198
3047+#: login.php:65
3048+msgid "Log in"
3049+>>>>>>> MERGE-SOURCE
3050 msgstr ""
3051
3052+<<<<<<< TREE
3053 #: panel.php:105
3054 #: login.php:82
3055 #: remote_panel.php:110
3056@@ -76,24 +101,79 @@
3057 #: remote_panel.php:112
3058 #: frame.php:204
3059 #: system_local/register.php:7
3060+=======
3061+#: frame.php:200
3062+#: login.php:62
3063+msgid "Username"
3064+msgstr ""
3065+
3066+#: frame.php:201
3067+#: login.php:63
3068+>>>>>>> MERGE-SOURCE
3069 msgid "Password"
3070 msgstr ""
3071
3072+<<<<<<< TREE
3073 #: panel.php:121
3074 #: remote_panel.php:126
3075+=======
3076+#: login.php:8
3077+msgid "We could not log you in"
3078+msgstr ""
3079+
3080+#: login.php:25
3081+#, php-format
3082+msgid "Do you want to log in to %s?"
3083+msgstr ""
3084+
3085+#: login.php:28
3086+msgid "By"
3087+msgstr ""
3088+
3089+#: login.php:32
3090+msgid "Log in to this site"
3091+msgstr ""
3092+
3093+#: login.php:33
3094+msgid "I don't want to go there"
3095+msgstr ""
3096+
3097+#: login_openid.php:28
3098+msgid "OpenID Login"
3099+msgstr ""
3100+
3101+#: panel.php:94
3102+#: remote_panel.php:106
3103+msgid "Desktop"
3104+msgstr ""
3105+
3106+#: panel.php:109
3107+#: remote_panel.php:121
3108+>>>>>>> MERGE-SOURCE
3109 msgid "An error occured in your browser's JavaScript interpreter.</p><p>Probably the page doesn't work anymore."
3110 msgstr ""
3111
3112+<<<<<<< TREE
3113 #: panel.php:135
3114 #: remote_panel.php:140
3115+=======
3116+#: panel.php:123
3117+#: remote_panel.php:135
3118+>>>>>>> MERGE-SOURCE
3119 msgid "<strong>Authentication expired</strong> You were too long inactive. Your session has expired."
3120 msgstr ""
3121
3122+<<<<<<< TREE
3123 #: panel.php:135
3124 #: remote_panel.php:140
3125+=======
3126+#: panel.php:123
3127+#: remote_panel.php:135
3128+>>>>>>> MERGE-SOURCE
3129 msgid "Relogin"
3130 msgstr ""
3131
3132+<<<<<<< TREE
3133 #: login.php:8
3134 #: login.php:44
3135 msgid "You can close this window now"
3136@@ -567,25 +647,77 @@
3137 msgstr ""
3138
3139 #: build/upgrade/inc/users.php:160
3140+=======
3141+#: remote_panel.php:148
3142+msgid "<strong>Access denied</strong> You are not allowed to access this database."
3143+msgstr ""
3144+
3145+#: inc/groups/groups.php:32
3146+msgid "User does not exist"
3147+msgstr ""
3148+
3149+#: inc/groups/groups.php:36
3150+msgid "Group does not exist"
3151+msgstr ""
3152+
3153+#: inc/groups/groups.php:40
3154+msgid "You cannot add someone to a group you don't belong to"
3155+msgstr ""
3156+
3157+#: inc/groups/groups.php:44
3158+msgid "You are not an administrator of that group"
3159+msgstr ""
3160+
3161+#: inc/users/users.php:166
3162+msgid "Please enter a username"
3163+msgstr ""
3164+
3165+#: inc/users/users.php:168
3166+msgid "Please enter a password"
3167+msgstr ""
3168+
3169+#: inc/users/users.php:170
3170+msgid "Please enter an e-mail address"
3171+msgstr ""
3172+
3173+#: inc/users/users.php:175
3174+>>>>>>> MERGE-SOURCE
3175 msgid "Username too short (at least 5 letters)"
3176 msgstr ""
3177
3178+<<<<<<< TREE
3179 #: build/upgrade/inc/users.php:162
3180+=======
3181+#: inc/users/users.php:177
3182+>>>>>>> MERGE-SOURCE
3183 msgid "Username too long (not more than 30 letters)"
3184 msgstr ""
3185
3186+<<<<<<< TREE
3187 #: build/upgrade/inc/users.php:164
3188+=======
3189+#: inc/users/users.php:179
3190+>>>>>>> MERGE-SOURCE
3191 msgid "Username must be alphanumeric"
3192 msgstr ""
3193
3194+<<<<<<< TREE
3195 #: build/upgrade/inc/users.php:166
3196+=======
3197+#: inc/users/users.php:181
3198+>>>>>>> MERGE-SOURCE
3199 msgid "User already exists"
3200 msgstr ""
3201
3202+<<<<<<< TREE
3203 #: build/upgrade/inc/users.php:170
3204+=======
3205+#: inc/users/users.php:185
3206+>>>>>>> MERGE-SOURCE
3207 msgid "Password too short (at least 4 characters)"
3208 msgstr ""
3209
3210+<<<<<<< TREE
3211 #: scripts/groups_scripts.js.php:7
3212 msgid "You are unsubscribed from the group"
3213 msgstr ""
3214@@ -652,6 +784,12 @@
3215 msgid "Error adding user to group"
3216 msgstr ""
3217
3218+=======
3219+#: inc/users/users.php:189
3220+msgid "Please enter a valid e-mail address"
3221+msgstr ""
3222+
3223+>>>>>>> MERGE-SOURCE
3224 #: scripts/account_scripts.js.php:192
3225 msgid "Very Weak"
3226 msgstr ""
3227@@ -672,14 +810,56 @@
3228 msgid "Very Strong"
3229 msgstr ""
3230
3231+<<<<<<< TREE
3232 #: scripts/create_site_scripts.js.php:12
3233+=======
3234+#: scripts/admin_scripts.js.php:6
3235+msgid "Level saved"
3236+msgstr ""
3237+
3238+#: scripts/admin_scripts.js.php:6
3239+msgid "Error saving level"
3240+msgstr ""
3241+
3242+#: scripts/admin_scripts.js.php:35
3243+msgid "User deleted"
3244+msgstr ""
3245+
3246+#: scripts/admin_scripts.js.php:35
3247+msgid "Error deleting user"
3248+msgstr ""
3249+
3250+#: scripts/admin_scripts.js.php:38
3251+#: system_local/admin-admin.php:35
3252+msgid "User banned"
3253+msgstr ""
3254+
3255+#: scripts/admin_scripts.js.php:38
3256+msgid "Error banning user"
3257+msgstr ""
3258+
3259+#: scripts/admin_scripts.js.php:41
3260+msgid "User unbanned"
3261+msgstr ""
3262+
3263+#: scripts/admin_scripts.js.php:41
3264+msgid "Error unbanning user"
3265+msgstr ""
3266+
3267+#: scripts/create_site_scripts.js.php:10
3268+>>>>>>> MERGE-SOURCE
3269 msgid "Site created"
3270 msgstr ""
3271
3272+<<<<<<< TREE
3273 #: scripts/create_site_scripts.js.php:12
3274+=======
3275+#: scripts/create_site_scripts.js.php:10
3276+>>>>>>> MERGE-SOURCE
3277 msgid "Error creating site"
3278 msgstr ""
3279
3280+<<<<<<< TREE
3281 #: scripts/mail_scripts.js.php:10
3282 msgid "Reply"
3283 msgstr ""
3284@@ -749,61 +929,121 @@
3285 msgstr ""
3286
3287 #: scripts/db_scripts.js.php:26
3288+=======
3289+#: scripts/db_scripts.js.php:25
3290+>>>>>>> MERGE-SOURCE
3291 msgid "New database registered"
3292 msgstr ""
3293
3294+<<<<<<< TREE
3295 #: scripts/db_scripts.js.php:26
3296+=======
3297+#: scripts/db_scripts.js.php:25
3298+>>>>>>> MERGE-SOURCE
3299 msgid "Error registering database"
3300 msgstr ""
3301
3302+<<<<<<< TREE
3303 #: scripts/db_scripts.js.php:74
3304+=======
3305+#: scripts/db_scripts.js.php:73
3306+msgid "Settings changed"
3307+msgstr ""
3308+
3309+#: scripts/db_scripts.js.php:73
3310+>>>>>>> MERGE-SOURCE
3311 msgid "Error changing settings"
3312 msgstr ""
3313
3314+<<<<<<< TREE
3315 #: scripts/db_scripts.js.php:81
3316+=======
3317+#: scripts/db_scripts.js.php:80
3318+>>>>>>> MERGE-SOURCE
3319 msgid "Userlevel saved"
3320 msgstr ""
3321
3322+<<<<<<< TREE
3323 #: scripts/db_scripts.js.php:81
3324+=======
3325+#: scripts/db_scripts.js.php:80
3326+>>>>>>> MERGE-SOURCE
3327 msgid "Error saving userlevel"
3328 msgstr ""
3329
3330+<<<<<<< TREE
3331 #: scripts/db_scripts.js.php:93
3332+=======
3333+#: scripts/db_scripts.js.php:92
3334+>>>>>>> MERGE-SOURCE
3335 msgid "Site editor"
3336 msgstr ""
3337
3338+<<<<<<< TREE
3339 #: scripts/db_scripts.js.php:94
3340+=======
3341+#: scripts/db_scripts.js.php:93
3342+>>>>>>> MERGE-SOURCE
3343 msgid "Site creator"
3344 msgstr ""
3345
3346+<<<<<<< TREE
3347 #: scripts/db_scripts.js.php:95
3348+=======
3349+#: scripts/db_scripts.js.php:94
3350+>>>>>>> MERGE-SOURCE
3351 msgid "Database admin"
3352 msgstr ""
3353
3354+<<<<<<< TREE
3355 #: scripts/db_scripts.js.php:103
3356+=======
3357+#: scripts/db_scripts.js.php:102
3358+>>>>>>> MERGE-SOURCE
3359 msgid "User added"
3360 msgstr ""
3361
3362+<<<<<<< TREE
3363 #: scripts/db_scripts.js.php:103
3364+=======
3365+#: scripts/db_scripts.js.php:102
3366+>>>>>>> MERGE-SOURCE
3367 msgid "Error adding user"
3368 msgstr ""
3369
3370+<<<<<<< TREE
3371 #: scripts/db_scripts.js.php:106
3372+=======
3373+#: scripts/db_scripts.js.php:105
3374+>>>>>>> MERGE-SOURCE
3375 msgid "User removed"
3376 msgstr ""
3377
3378+<<<<<<< TREE
3379 #: scripts/db_scripts.js.php:106
3380+=======
3381+#: scripts/db_scripts.js.php:105
3382+>>>>>>> MERGE-SOURCE
3383 msgid "Error removing user"
3384 msgstr ""
3385
3386+<<<<<<< TREE
3387 #: scripts/db_scripts.js.php:110
3388+=======
3389+#: scripts/db_scripts.js.php:109
3390+>>>>>>> MERGE-SOURCE
3391 msgid "Database removed"
3392 msgstr ""
3393
3394+<<<<<<< TREE
3395 #: scripts/db_scripts.js.php:110
3396+=======
3397+#: scripts/db_scripts.js.php:109
3398+>>>>>>> MERGE-SOURCE
3399 msgid "Error removing database"
3400 msgstr ""
3401
3402+<<<<<<< TREE
3403 #: inc/groups/groups.php:40
3404 msgid "User does not exist"
3405 msgstr ""
3406@@ -1142,9 +1382,759 @@
3407
3408 #: system_remote/plugins/default.php:146
3409 #: system_remote/plugins/default.php:161
3410+=======
3411+#: scripts/groups_scripts.js.php:7
3412+msgid "You are unsubscribed from the group"
3413+msgstr ""
3414+
3415+#: scripts/groups_scripts.js.php:7
3416+msgid "Error unsubscribing from group"
3417+msgstr ""
3418+
3419+#: scripts/groups_scripts.js.php:10
3420+msgid "Group deleted"
3421+msgstr ""
3422+
3423+#: scripts/groups_scripts.js.php:10
3424+msgid "Error deleting group"
3425+msgstr ""
3426+
3427+#: scripts/groups_scripts.js.php:14
3428+#: scripts/groups_scripts.js.php:35
3429+msgid "Submit changes"
3430+msgstr ""
3431+
3432+#: scripts/groups_scripts.js.php:14
3433+#: scripts/groups_scripts.js.php:35
3434+msgid "Submit"
3435+msgstr ""
3436+
3437+#: scripts/groups_scripts.js.php:20
3438+msgid "Group created"
3439+msgstr ""
3440+
3441+#: scripts/groups_scripts.js.php:20
3442+msgid "Error creating group"
3443+msgstr ""
3444+
3445+#: scripts/groups_scripts.js.php:25
3446+msgid "User deleted from group"
3447+msgstr ""
3448+
3449+#: scripts/groups_scripts.js.php:25
3450+msgid "Error deleting user from group"
3451+msgstr ""
3452+
3453+#: scripts/groups_scripts.js.php:28
3454+msgid "The user now is an administrator"
3455+msgstr ""
3456+
3457+#: scripts/groups_scripts.js.php:28
3458+msgid "Error making user administrator"
3459+msgstr ""
3460+
3461+#: scripts/groups_scripts.js.php:31
3462+msgid "The administrator now is a normal user"
3463+msgstr ""
3464+
3465+#: scripts/groups_scripts.js.php:31
3466+msgid "Error removing administrative rights"
3467+msgstr ""
3468+
3469+#: scripts/groups_scripts.js.php:42
3470+msgid "User added to group"
3471+msgstr ""
3472+
3473+#: scripts/groups_scripts.js.php:42
3474+msgid "Error adding user to group"
3475+msgstr ""
3476+
3477+#: scripts/openid.js.php:19
3478+msgid "Enter your AOL screenname."
3479+msgstr ""
3480+
3481+#: scripts/openid.js.php:24
3482+msgid "Enter your MyOpenID username."
3483+msgstr ""
3484+
3485+#: scripts/openid.js.php:29
3486+msgid "Enter your OpenID."
3487+msgstr ""
3488+
3489+#: scripts/openid.js.php:37
3490+msgid "Enter your Livejournal username."
3491+msgstr ""
3492+
3493+#: scripts/openid.js.php:42
3494+msgid "Enter your Flickr username."
3495+msgstr ""
3496+
3497+#: scripts/openid.js.php:47
3498+msgid "Enter your Technorati username."
3499+msgstr ""
3500+
3501+#: scripts/openid.js.php:52
3502+msgid "Enter your Wordpress.com username."
3503+msgstr ""
3504+
3505+#: scripts/openid.js.php:57
3506+msgid "Your Blogger account"
3507+msgstr ""
3508+
3509+#: scripts/openid.js.php:62
3510+msgid "Your Verisign username"
3511+msgstr ""
3512+
3513+#: scripts/openid.js.php:67
3514+msgid "Your Vidoop username"
3515+msgstr ""
3516+
3517+#: scripts/openid.js.php:73
3518+msgid "Your ClaimID username"
3519+msgstr ""
3520+
3521+#: scripts/openid.js.php:78
3522+msgid "Enter your ClickPass username"
3523+msgstr ""
3524+
3525+#: scripts/openid.js.php:83
3526+msgid "Enter your Google Profile username"
3527+msgstr ""
3528+
3529+#: scripts/openid.js.php:88
3530+msgid "Your Launchpad username"
3531+msgstr ""
3532+
3533+#: scripts/openid.js.php:96
3534+msgid "Sign-In"
3535+msgstr ""
3536+
3537+#: scripts/openid.js.php:97
3538+#, php-format
3539+msgid "Log in with %s"
3540+msgstr ""
3541+
3542+#: system_local/admin-admin.php:9
3543+msgid "Register new user"
3544+msgstr ""
3545+
3546+#: system_local/admin-admin.php:12
3547+msgid "Users"
3548+msgstr ""
3549+
3550+#: system_local/admin-admin.php:22
3551+msgid "No content"
3552+msgstr ""
3553+
3554+#: system_local/admin-admin.php:26
3555+msgid "Lv."
3556+msgstr ""
3557+
3558+#: system_local/admin-admin.php:26
3559+msgid "E-mail address"
3560+msgstr ""
3561+
3562+#: system_local/admin-admin.php:26
3563+msgid "Actions"
3564+msgstr ""
3565+
3566+#: system_local/admin-admin.php:35
3567+msgid "Banned"
3568+msgstr ""
3569+
3570+#: system_local/admin-admin.php:40
3571+msgid "Delete"
3572+msgstr ""
3573+
3574+#: system_local/admin-admin.php:40
3575+msgid "Delete user"
3576+msgstr ""
3577+
3578+#: system_local/admin-admin.php:41
3579+msgid "Unban"
3580+msgstr ""
3581+
3582+#: system_local/admin-admin.php:41
3583+msgid "Allow the user back on the system"
3584+msgstr ""
3585+
3586+#: system_local/admin-admin.php:42
3587+msgid "Ban"
3588+msgstr ""
3589+
3590+#: system_local/admin-admin.php:42
3591+msgid "Block the user from the system"
3592+msgstr ""
3593+
3594+#: system_local/database.php:12
3595+msgid "Help"
3596+msgstr ""
3597+
3598+#: system_local/database.php:22
3599+#: system_local/database.php:77
3600+msgid "Connection"
3601+msgstr ""
3602+
3603+#: system_local/database.php:23
3604+msgid "Normal"
3605+msgstr ""
3606+
3607+#: system_local/database.php:23
3608+#: system_local/database.php:32
3609+msgid "HTTPMySQL"
3610+msgstr ""
3611+
3612+#: system_local/database.php:25
3613+msgid "MySQL"
3614+msgstr ""
3615+
3616+#: system_local/database.php:26
3617+#: system_local/database.php:82
3618+msgid "MySQL host"
3619+msgstr ""
3620+
3621+#: system_local/database.php:27
3622+msgid "MySQL username"
3623+msgstr ""
3624+
3625+#: system_local/database.php:28
3626+msgid "MySQL password"
3627+msgstr ""
3628+
3629+#: system_local/database.php:29
3630+msgid "MySQL database"
3631+msgstr ""
3632+
3633+#: system_local/database.php:33
3634+#: system_local/database.php:86
3635+msgid "Domain"
3636+msgstr ""
3637+
3638+#: system_local/database.php:34
3639+#: system_local/database.php:91
3640+msgid "Path to query.php"
3641+msgstr ""
3642+
3643+#: system_local/database.php:40
3644+msgid "RemoteCP API"
3645+msgstr ""
3646+
3647+#: system_local/database.php:41
3648+#: system_local/database.php:104
3649+msgid "IP-address"
3650+msgstr ""
3651+
3652+#: system_local/database.php:43
3653+#: system_local/desktop.php:18
3654+msgid "Add database"
3655+msgstr ""
3656+
3657+#: system_local/database.php:50
3658+msgid "MySQL connection error"
3659+msgstr ""
3660+
3661+#: system_local/database.php:55
3662+msgid "HTTPMySQL connection error"
3663+msgstr ""
3664+
3665+#: system_local/database.php:58
3666+msgid "Invalid IP-address"
3667+msgstr ""
3668+
3669+#: system_local/database.php:78
3670+msgid "<p>How should RemoteCP connect to your database?</p><p>Normal mode is preferred, but you have to be able to allow remote hosts to connect to your MySQL server. (Probably named 'Remote MySQL' or 'Remote database access' )</p><p>When it is not possible to choose sites who are allowed to connect to your database, you have to choose 'HTTPMySQL'. However, this is a bit slower and requires more processing power on your server.</p>"
3671+msgstr ""
3672+
3673+#: system_local/database.php:83
3674+#, php-format
3675+msgid "<p>The machine that runs the MySQL server</p><p>If this is 'localhost' or '127.0.0.1' according to your documentation, you should enter your domainname %s here."
3676+msgstr ""
3677+
3678+#: system_local/database.php:87
3679+msgid "<p>Your domain is what you type to visit your website</p><p>It is placed behind http:// and before the first slash. (E.g.: <tt>http://<u>remotecp.co.cc</u>/1-Home/</tt>, <tt>remotecp.co.cc</tt> is the domain).</p>"
3680+msgstr ""
3681+
3682+#: system_local/database.php:92
3683+#, php-format
3684+msgid "<p>The path to the file query.php on your server.</p><p>The path is the part after the domain %s. For your convenience, whe have already appended '/query.php'. So, you must also omit that from the path.</p>"
3685+msgstr ""
3686+
3687+#: system_local/database.php:96
3688+msgid "<p>What username is required to access 'query.php'?</p><p>You should secure query.php with an username and password combination to avoid unallowed changes to your websites. What username did you use for that purpose?</p>"
3689+msgstr ""
3690+
3691+#: system_local/database.php:100
3692+msgid "<p>What password is required to access 'query.php'?</p><p>You should secure query.php with an username and password combination to avoid unallowed changes to your websites. What password did you use for that purpose?</p>"
3693+msgstr ""
3694+
3695+#: system_local/database.php:105
3696+#, php-format
3697+msgid "<p>What is the IP-address belonging to your server?</p><p>An IP address is a unique identifier of 4 times a number from 0 to 255, separated by a point. (E.g.:<tt><u>69.175.113.125</u></tt>)</p><p>To find the IP address of your server open a Command Prompt window (Folder Accessories) and type <tt>ping &lt;domain %s &gt; </tt>. The first rule is roughly <tt> Pinging remotecp.co.cc [<u>199.27.134.101</u>] with 32 bytes of data: </tt>. The underlined part is the IP address of your server. </p>"
3698+msgstr ""
3699+
3700+#: system_local/desktop.php:7
3701+msgid "Account"
3702+msgstr ""
3703+
3704+#: system_local/desktop.php:8
3705+msgid "Logs"
3706+msgstr ""
3707+
3708+#: system_local/desktop.php:8
3709+msgid "Logbooks"
3710+msgstr ""
3711+
3712+#: system_local/desktop.php:9
3713+msgid "Messages"
3714+msgstr ""
3715+
3716+#: system_local/desktop.php:10
3717+msgid "Administration"
3718+msgstr ""
3719+
3720+#: system_local/logs.php:16
3721+#, php-format
3722+msgid "Search for: %s"
3723+msgstr ""
3724+
3725+#: system_local/logs.php:17
3726+msgid "Reset search"
3727+msgstr ""
3728+
3729+#: system_local/logs.php:19
3730+msgid "Code"
3731+msgstr ""
3732+
3733+#: system_local/logs.php:19
3734+#: system_local/mail.php:458
3735+#: system_local/mail.php:520
3736+#: system_local/mail.php:608
3737+#: system_local/mail.php:668
3738+#: system_local/mail.php:742
3739+msgid "Date"
3740+msgstr ""
3741+
3742+#: system_local/logs.php:19
3743+#: system_remote/database.php:48
3744+#: system_remote/groups.php:98
3745+#: system_remote/plugins/default.php:161
3746+msgid "User"
3747+msgstr ""
3748+
3749+#: system_local/logs.php:19
3750+msgid "IP"
3751+msgstr ""
3752+
3753+#: system_local/logs.php:19
3754+msgid "URL"
3755+msgstr ""
3756+
3757+#: system_local/logs.php:19
3758+#: system_local/mail.php:828
3759+msgid "Message"
3760+msgstr ""
3761+
3762+#: system_local/logs.php:19
3763+#: system_local/logs.php:21
3764+msgid "Flag"
3765+msgstr ""
3766+
3767+#: system_local/logs.php:21
3768+msgid "Unflag"
3769+msgstr ""
3770+
3771+#: system_local/logs.php:22
3772+msgid "Previous"
3773+msgstr ""
3774+
3775+#: system_local/logs.php:22
3776+msgid "Current time"
3777+msgstr ""
3778+
3779+#: system_local/logs.php:22
3780+msgid "Next"
3781+msgstr ""
3782+
3783+#: system_local/mail.php:342
3784+msgid "Message sent."
3785+msgstr ""
3786+
3787+#: system_local/mail.php:349
3788+msgid "Message couldn't be sent. Maybe the receiver doesn't exist."
3789+msgstr ""
3790+
3791+#: system_local/mail.php:428
3792+msgid "Unread"
3793+msgstr ""
3794+
3795+#: system_local/mail.php:430
3796+#: system_local/mail.php:831
3797+msgid "Send"
3798+msgstr ""
3799+
3800+#: system_local/mail.php:432
3801+msgid "Archive"
3802+msgstr ""
3803+
3804+#: system_local/mail.php:434
3805+msgid "Deleted"
3806+msgstr ""
3807+
3808+#: system_local/mail.php:436
3809+msgid "New message"
3810+msgstr ""
3811+
3812+#: system_local/mail.php:454
3813+#: system_local/mail.php:604
3814+#: system_local/mail.php:664
3815+msgid "Sender"
3816+msgstr ""
3817+
3818+#: system_local/mail.php:456
3819+#: system_local/mail.php:516
3820+#: system_local/mail.php:606
3821+#: system_local/mail.php:666
3822+#: system_remote/plugins/default.php:161
3823+msgid "Title"
3824+msgstr ""
3825+
3826+#: system_local/mail.php:492
3827+msgid "No new messages"
3828+msgstr ""
3829+
3830+#: system_local/mail.php:514
3831+msgid "Receiver"
3832+msgstr ""
3833+
3834+#: system_local/mail.php:518
3835+msgid "Status"
3836+msgstr ""
3837+
3838+#: system_local/mail.php:550
3839+msgid "Deleted without reading"
3840+msgstr ""
3841+
3842+#: system_local/mail.php:556
3843+msgid "Read"
3844+msgstr ""
3845+
3846+#: system_local/mail.php:562
3847+msgid "Not yet read"
3848+msgstr ""
3849+
3850+#: system_local/mail.php:582
3851+msgid "No send messages"
3852+msgstr ""
3853+
3854+#: system_local/mail.php:642
3855+msgid "No read messages"
3856+msgstr ""
3857+
3858+#: system_local/mail.php:702
3859+msgid "Recycle bin is empty"
3860+msgstr ""
3861+
3862+#: system_local/mail.php:732
3863+msgid "From"
3864+msgstr ""
3865+
3866+#: system_local/mail.php:752
3867+#: system_local/mail.php:824
3868+msgid "Subject"
3869+msgstr ""
3870+
3871+#: system_local/mail.php:773
3872+msgid "Answer"
3873+msgstr ""
3874+
3875+#: system_local/mail.php:781
3876+msgid "Message deleted"
3877+msgstr ""
3878+
3879+#: system_local/mail.php:781
3880+msgid "Error while deleting message"
3881+msgstr ""
3882+
3883+#: system_local/mail.php:820
3884+msgid "To"
3885+msgstr ""
3886+
3887+#: system_local/mail.php:829
3888+#, php-format
3889+msgid "On %1$s, %2$s wrote:"
3890+msgstr ""
3891+
3892+#: system_local/register.php:6
3893+msgid "User registered"
3894+msgstr ""
3895+
3896+#: system_local/register.php:6
3897+msgid "User not registered.<br>Errors"
3898+msgstr ""
3899+
3900+#: system_local/user_props.php:20
3901+#, php-format
3902+msgid "The user you requested, %s, does not exist."
3903+msgstr ""
3904+
3905+#: system_local/user_props.php:46
3906+msgid "Edit account"
3907+msgstr ""
3908+
3909+#: system_local/user_props.php:52
3910+msgid "Repeated password does not match"
3911+msgstr ""
3912+
3913+#: system_local/user_props.php:52
3914+msgid "Password saved"
3915+msgstr ""
3916+
3917+#: system_local/user_props.php:52
3918+msgid "Password could not be saved"
3919+msgstr ""
3920+
3921+#: system_local/user_props.php:53
3922+msgid "Current password"
3923+msgstr ""
3924+
3925+#: system_local/user_props.php:55
3926+msgid "New password"
3927+msgstr ""
3928+
3929+#: system_local/user_props.php:55
3930+msgid "Too Short"
3931+msgstr ""
3932+
3933+#: system_local/user_props.php:56
3934+msgid "Repeat new password"
3935+msgstr ""
3936+
3937+#: system_local/user_props.php:57
3938+msgid "Change password"
3939+msgstr ""
3940+
3941+#: system_local/user_props.php:60
3942+msgid "Settings not changed<br>Errors"
3943+msgstr ""
3944+
3945+#: system_local/user_props.php:64
3946+msgid "Language"
3947+msgstr ""
3948+
3949+#: system_local/user_props.php:72
3950+msgid "Add language"
3951+msgstr ""
3952+
3953+#: system_local/user_props.php:73
3954+msgid "Select additional language"
3955+msgstr ""
3956+
3957+#: system_local/user_props.php:78
3958+msgid "Submit settings"
3959+msgstr ""
3960+
3961+#: system_local/user_props.php:101
3962+msgid "Error updating e-mail address"
3963+msgstr ""
3964+
3965+#: system_local/user_props.php:107
3966+msgid "Error updating your languages"
3967+msgstr ""
3968+
3969+#: system_remote/create_site.php:79
3970+msgid "General"
3971+msgstr ""
3972+
3973+#: system_remote/create_site.php:92
3974+#: system_remote/plugins/default.php:98
3975+msgid "Style"
3976+msgstr ""
3977+
3978+#: system_remote/create_site.php:106
3979+msgid "Content"
3980+msgstr ""
3981+
3982+#: system_remote/create_site.php:107
3983+#: system_remote/plugins/default.php:95
3984+msgid "Site title"
3985+msgstr ""
3986+
3987+#: system_remote/create_site.php:108
3988+#: system_remote/plugins/default.php:96
3989+msgid "Site tagline"
3990+msgstr ""
3991+
3992+#: system_remote/create_site.php:109
3993+#: system_remote/plugins/default.php:107
3994+msgid "Author"
3995+msgstr ""
3996+
3997+#: system_remote/database.php:21
3998+#: system_remote/plugins/default.php:168
3999+msgid "Settings"
4000+msgstr ""
4001+
4002+#: system_remote/database.php:41
4003+msgid "Display title"
4004+msgstr ""
4005+
4006+#: system_remote/database.php:42
4007+#: system_remote/plugins/default.php:109
4008+msgid "Update settings"
4009+msgstr ""
4010+
4011+#: system_remote/database.php:50
4012+#: system_remote/plugins/default.php:163
4013+msgid "Revoke user privileges"
4014+msgstr ""
4015+
4016+#: system_remote/database.php:52
4017+#: system_remote/plugins/default.php:165
4018+msgid "Add user"
4019+msgstr ""
4020+
4021+#: system_remote/database.php:52
4022+#: system_remote/plugins/default.php:165
4023+msgid "Add"
4024+msgstr ""
4025+
4026+#: system_remote/database.php:52
4027+#: system_remote/plugins/default.php:165
4028+msgid "Add new user"
4029+msgstr ""
4030+
4031+#: system_remote/database.php:56
4032+msgid "Delete database"
4033+msgstr ""
4034+
4035+#: system_remote/database.php:57
4036+msgid "Delete database from the system"
4037+msgstr ""
4038+
4039+#: system_remote/desktop.php:7
4040+msgid "Groups"
4041+msgstr ""
4042+
4043+#: system_remote/desktop.php:11
4044+msgid "New site"
4045+msgstr ""
4046+
4047+#: system_remote/get_remote_groups.php:33
4048+msgid "Group"
4049+msgstr ""
4050+
4051+#: system_remote/groups.php:8
4052+msgid "You are the last administrator in the group"
4053+msgstr ""
4054+
4055+#: system_remote/groups.php:9
4056+msgid "Delete this group to unsubscribe"
4057+msgstr ""
4058+
4059+#: system_remote/groups.php:19
4060+#: system_remote/groups.php:33
4061+#: system_remote/groups.php:44
4062+#: system_remote/groups.php:55
4063+msgid "You are not a group administrator"
4064+msgstr ""
4065+
4066+#: system_remote/groups.php:35
4067+msgid "You cannot delete yourself, use unsubscribe"
4068+msgstr ""
4069+
4070+#: system_remote/groups.php:57
4071+msgid "You cannot change your own status"
4072+msgstr ""
4073+
4074+#: system_remote/groups.php:66
4075+msgid "This group name already exists"
4076+msgstr ""
4077+
4078+#: system_remote/groups.php:79
4079+msgid "Group name"
4080+msgstr ""
4081+
4082+#: system_remote/groups.php:81
4083+msgid "Unsubscribe from group"
4084+msgstr ""
4085+
4086+#: system_remote/groups.php:81
4087+msgid "Delete yourself from the group"
4088+msgstr ""
4089+
4090+#: system_remote/groups.php:83
4091+msgid "Delete group"
4092+msgstr ""
4093+
4094+#: system_remote/groups.php:83
4095+msgid "Delete the group and all permissions"
4096+msgstr ""
4097+
4098+#: system_remote/groups.php:84
4099+msgid "Edit group"
4100+msgstr ""
4101+
4102+#: system_remote/groups.php:84
4103+msgid "Edit group and members"
4104+msgstr ""
4105+
4106+#: system_remote/groups.php:96
4107+msgid "Remove this user from the group"
4108+msgstr ""
4109+
4110+#: system_remote/groups.php:98
4111+msgid "Make user normal user"
4112+msgstr ""
4113+
4114+#: system_remote/groups.php:101
4115+msgid "Admin"
4116+msgstr ""
4117+
4118+#: system_remote/groups.php:101
4119+msgid "Make user group administrator"
4120+msgstr ""
4121+
4122+#: system_remote/groups.php:104
4123+msgid "Add user to the group"
4124+msgstr ""
4125+
4126+#: system_remote/groups.php:108
4127+msgid "Create a new group"
4128+msgstr ""
4129+
4130+#: system_remote/plugins/default.php:8
4131+#: system_remote/plugins/default.php:16
4132+msgid "Addon is not available"
4133+msgstr ""
4134+
4135+#: system_remote/plugins/default.php:11
4136+#: system_remote/plugins/default.php:19
4137+msgid "Installation error"
4138+msgstr ""
4139+
4140+#: system_remote/plugins/default.php:25
4141+msgid "Addon is not installed"
4142+msgstr ""
4143+
4144+#: system_remote/plugins/default.php:97
4145+msgid "Site footer"
4146+msgstr ""
4147+
4148+#: system_remote/plugins/default.php:108
4149+msgid "Administrator group"
4150+msgstr ""
4151+
4152+#: system_remote/plugins/default.php:108
4153+msgid "Remove administrative group"
4154+msgstr ""
4155+
4156+#: system_remote/plugins/default.php:138
4157+#: system_remote/plugins/default.php:153
4158+>>>>>>> MERGE-SOURCE
4159 msgid "Addon not available"
4160 msgstr ""
4161
4162+<<<<<<< TREE
4163 #: system_remote/plugins/default.php:148
4164 #: system_remote/plugins/col1/default.php:21
4165 #: system_remote/plugins/col3/default.php:21
4166@@ -1157,57 +2147,121 @@
4167 msgstr ""
4168
4169 #: system_remote/plugins/default.php:153
4170+=======
4171+#: system_remote/plugins/default.php:140
4172+msgid "Edit"
4173+msgstr ""
4174+
4175+#: system_remote/plugins/default.php:140
4176+msgid "Change authorized group"
4177+msgstr ""
4178+
4179+#: system_remote/plugins/default.php:145
4180+>>>>>>> MERGE-SOURCE
4181 msgid "You are not allowed to change anything to this site"
4182 msgstr ""
4183
4184+<<<<<<< TREE
4185 #: system_remote/plugins/default.php:163
4186+=======
4187+#: system_remote/plugins/default.php:150
4188+msgid "Name"
4189+msgstr ""
4190+
4191+#: system_remote/plugins/default.php:155
4192+>>>>>>> MERGE-SOURCE
4193 msgid "Addon available"
4194 msgstr ""
4195
4196+<<<<<<< TREE
4197 #: system_remote/plugins/default.php:163
4198+=======
4199+#: system_remote/plugins/default.php:155
4200+>>>>>>> MERGE-SOURCE
4201 msgid "On"
4202 msgstr ""
4203
4204+<<<<<<< TREE
4205 #: system_remote/plugins/default.php:163
4206+=======
4207+#: system_remote/plugins/default.php:155
4208+>>>>>>> MERGE-SOURCE
4209 msgid "Turn addon on"
4210 msgstr ""
4211
4212+<<<<<<< TREE
4213 #: system_remote/plugins/default.php:163
4214+=======
4215+#: system_remote/plugins/default.php:155
4216+>>>>>>> MERGE-SOURCE
4217 msgid "Off"
4218 msgstr ""
4219
4220+<<<<<<< TREE
4221 #: system_remote/plugins/default.php:163
4222+=======
4223+#: system_remote/plugins/default.php:155
4224+>>>>>>> MERGE-SOURCE
4225 msgid "Turn addon off"
4226 msgstr ""
4227
4228+<<<<<<< TREE
4229 #: system_remote/plugins/default.php:163
4230+=======
4231+#: system_remote/plugins/default.php:155
4232+>>>>>>> MERGE-SOURCE
4233 msgid "Add to column 1"
4234 msgstr ""
4235
4236+<<<<<<< TREE
4237 #: system_remote/plugins/default.php:163
4238+=======
4239+#: system_remote/plugins/default.php:155
4240+>>>>>>> MERGE-SOURCE
4241 msgid "Add to column 3"
4242 msgstr ""
4243
4244+<<<<<<< TREE
4245 #: system_remote/plugins/default.php:163
4246+=======
4247+#: system_remote/plugins/default.php:155
4248+>>>>>>> MERGE-SOURCE
4249 msgid "Add to CMS"
4250 msgstr ""
4251
4252+<<<<<<< TREE
4253 #: system_remote/plugins/default.php:176
4254+=======
4255+#: system_remote/plugins/default.php:168
4256+>>>>>>> MERGE-SOURCE
4257 msgid "Edit site settings"
4258 msgstr ""
4259
4260+<<<<<<< TREE
4261 #: system_remote/plugins/default.php:176
4262+=======
4263+#: system_remote/plugins/default.php:168
4264+>>>>>>> MERGE-SOURCE
4265 msgid "Edit the base settings of the site"
4266 msgstr ""
4267
4268+<<<<<<< TREE
4269 #: system_remote/plugins/default.php:177
4270+=======
4271+#: system_remote/plugins/default.php:169
4272+>>>>>>> MERGE-SOURCE
4273 msgid "Delete site"
4274 msgstr ""
4275
4276+<<<<<<< TREE
4277 #: system_remote/plugins/default.php:177
4278+=======
4279+#: system_remote/plugins/default.php:169
4280+>>>>>>> MERGE-SOURCE
4281 msgid "Delete all site content and the site itself"
4282 msgstr ""
4283
4284+<<<<<<< TREE
4285 #: system_remote/plugins/col1/scripts.php:22
4286 #: system_remote/plugins/col3/scripts.php:22
4287 #: system_remote/plugins/cms/scripts.php:115
4288@@ -1296,34 +2350,173 @@
4289 #: system_remote/plugins/col3/default.php:21
4290 #: system_remote/plugins/cms/default.php:20
4291 #: system_remote/plugins/cms/default.php:24
4292+=======
4293+#: system_remote/plugins/scripts.php:5
4294+msgid "Addon installed"
4295+msgstr ""
4296+
4297+#: system_remote/plugins/scripts.php:5
4298+msgid "Error installing addon"
4299+msgstr ""
4300+
4301+#: system_remote/plugins/scripts.php:8
4302+msgid "Addon uninstalled"
4303+msgstr ""
4304+
4305+#: system_remote/plugins/scripts.php:8
4306+msgid "Error uninstalling addon"
4307+msgstr ""
4308+
4309+#: system_remote/plugins/scripts.php:11
4310+msgid "Addon added to column"
4311+msgstr ""
4312+
4313+#: system_remote/plugins/scripts.php:11
4314+msgid "Error adding addon to column"
4315+msgstr ""
4316+
4317+#: system_remote/plugins/scripts.php:46
4318+#: system_remote/plugins/cms/scripts.php:7
4319+#: system_remote/plugins/cms/scripts.php:98
4320+#: system_remote/plugins/col1/scripts.php:6
4321+#: system_remote/plugins/col3/scripts.php:6
4322+msgid "Title saved"
4323+msgstr ""
4324+
4325+#: system_remote/plugins/scripts.php:46
4326+#: system_remote/plugins/cms/scripts.php:7
4327+#: system_remote/plugins/cms/scripts.php:98
4328+#: system_remote/plugins/col1/scripts.php:6
4329+#: system_remote/plugins/col3/scripts.php:6
4330+msgid "Error saving title"
4331+msgstr ""
4332+
4333+#: system_remote/plugins/scripts.php:66
4334+msgid "Site deleted"
4335+msgstr ""
4336+
4337+#: system_remote/plugins/scripts.php:66
4338+msgid "Error deleting site"
4339+msgstr ""
4340+
4341+#: system_remote/plugins/scripts.php:77
4342+msgid "Site settings edited"
4343+msgstr ""
4344+
4345+#: system_remote/plugins/scripts.php:77
4346+msgid "Error editing site settings"
4347+msgstr ""
4348+
4349+#: system_remote/plugins/scripts.php:90
4350+msgid "Authorized group updated"
4351+msgstr ""
4352+
4353+#: system_remote/plugins/scripts.php:90
4354+msgid "Error updating authorized group"
4355+msgstr ""
4356+
4357+#: system_remote/plugins/cms/default.php:18
4358+msgid "Link path"
4359+msgstr ""
4360+
4361+#: system_remote/plugins/cms/default.php:18
4362+msgid "Link"
4363+msgstr ""
4364+
4365+#: system_remote/plugins/cms/default.php:20
4366+msgid "Delete page"
4367+msgstr ""
4368+
4369+#: system_remote/plugins/cms/default.php:20
4370+#: system_remote/plugins/cms/default.php:24
4371+#: system_remote/plugins/col1/default.php:20
4372+#: system_remote/plugins/col3/default.php:20
4373+>>>>>>> MERGE-SOURCE
4374 msgid "Down"
4375 msgstr ""
4376
4377+<<<<<<< TREE
4378 #: system_remote/plugins/col1/default.php:21
4379 #: system_remote/plugins/col3/default.php:21
4380 #: system_remote/plugins/cms/default.php:24
4381 msgid "Move section down"
4382+=======
4383+#: system_remote/plugins/cms/default.php:20
4384+msgid "Move the page down"
4385+>>>>>>> MERGE-SOURCE
4386 msgstr ""
4387
4388+<<<<<<< TREE
4389 #: system_remote/plugins/col1/default.php:21
4390 #: system_remote/plugins/col3/default.php:21
4391 #: system_remote/plugins/cms/default.php:20
4392 #: system_remote/plugins/cms/default.php:24
4393+=======
4394+#: system_remote/plugins/cms/default.php:20
4395+#: system_remote/plugins/cms/default.php:24
4396+#: system_remote/plugins/col1/default.php:20
4397+#: system_remote/plugins/col3/default.php:20
4398+>>>>>>> MERGE-SOURCE
4399 msgid "Up"
4400 msgstr ""
4401
4402+<<<<<<< TREE
4403 #: system_remote/plugins/col1/default.php:21
4404 #: system_remote/plugins/col3/default.php:21
4405 #: system_remote/plugins/cms/default.php:24
4406+=======
4407+#: system_remote/plugins/cms/default.php:20
4408+msgid "Move the page up"
4409+msgstr ""
4410+
4411+#: system_remote/plugins/cms/default.php:20
4412+msgid "Visible"
4413+msgstr ""
4414+
4415+#: system_remote/plugins/cms/default.php:20
4416+msgid "Invisible"
4417+msgstr ""
4418+
4419+#: system_remote/plugins/cms/default.php:20
4420+msgid "Make page invisible"
4421+msgstr ""
4422+
4423+#: system_remote/plugins/cms/default.php:20
4424+msgid "Make page visible"
4425+msgstr ""
4426+
4427+#: system_remote/plugins/cms/default.php:24
4428+#: system_remote/plugins/col1/default.php:20
4429+#: system_remote/plugins/col3/default.php:20
4430+msgid "Delete section"
4431+msgstr ""
4432+
4433+#: system_remote/plugins/cms/default.php:24
4434+#: system_remote/plugins/col1/default.php:20
4435+#: system_remote/plugins/col3/default.php:20
4436+msgid "Move section down"
4437+msgstr ""
4438+
4439+#: system_remote/plugins/cms/default.php:24
4440+#: system_remote/plugins/col1/default.php:20
4441+#: system_remote/plugins/col3/default.php:20
4442+>>>>>>> MERGE-SOURCE
4443 msgid "Move section up"
4444 msgstr ""
4445
4446+<<<<<<< TREE
4447 #: system_remote/plugins/col1/default.php:21
4448 #: system_remote/plugins/col3/default.php:21
4449 #: system_remote/plugins/cms/default.php:24
4450+=======
4451+#: system_remote/plugins/cms/default.php:24
4452+#: system_remote/plugins/col1/default.php:20
4453+#: system_remote/plugins/col3/default.php:20
4454+>>>>>>> MERGE-SOURCE
4455 msgid "Edit section content"
4456 msgstr ""
4457
4458+<<<<<<< TREE
4459 #: system_remote/plugins/col1/default.php:23
4460 #: system_remote/plugins/col3/default.php:23
4461 msgid "Add section"
4462@@ -1332,30 +2525,92 @@
4463 #: system_remote/plugins/col1/default.php:25
4464 #: system_remote/plugins/col3/default.php:25
4465 #: system_remote/plugins/cms/default.php:47
4466+=======
4467+#: system_remote/plugins/cms/default.php:24
4468+#: system_remote/plugins/cms/scripts.php:148
4469+msgid "Other page"
4470+msgstr ""
4471+
4472+#: system_remote/plugins/cms/default.php:24
4473+#: system_remote/plugins/cms/scripts.php:148
4474+msgid "Move this section to another page"
4475+msgstr ""
4476+
4477+#: system_remote/plugins/cms/default.php:26
4478+#: system_remote/plugins/cms/default.php:39
4479+msgid "Add a section to this page"
4480+msgstr ""
4481+
4482+#: system_remote/plugins/cms/default.php:28
4483+#: system_remote/plugins/cms/default.php:44
4484+msgid "Add page"
4485+msgstr ""
4486+
4487+#: system_remote/plugins/cms/default.php:29
4488+#: system_remote/plugins/cms/default.php:45
4489+msgid "Add link"
4490+msgstr ""
4491+
4492+#: system_remote/plugins/cms/default.php:47
4493+#: system_remote/plugins/col1/default.php:24
4494+#: system_remote/plugins/col3/default.php:24
4495+>>>>>>> MERGE-SOURCE
4496 msgid "Sort"
4497 msgstr ""
4498
4499+<<<<<<< TREE
4500 #: system_remote/plugins/col1/default.php:25
4501 #: system_remote/plugins/col3/default.php:25
4502 #: system_remote/plugins/cms/default.php:47
4503+=======
4504+#: system_remote/plugins/cms/default.php:47
4505+#: system_remote/plugins/col1/default.php:24
4506+#: system_remote/plugins/col3/default.php:24
4507+>>>>>>> MERGE-SOURCE
4508 msgid "Save this order"
4509 msgstr ""
4510
4511+<<<<<<< TREE
4512 #: system_remote/plugins/col1/default.php:54
4513 #: system_remote/plugins/col3/default.php:55
4514 #: system_remote/plugins/cms/default.php:108
4515+=======
4516+#: system_remote/plugins/cms/default.php:104
4517+msgid "New page"
4518+msgstr ""
4519+
4520+#: system_remote/plugins/cms/default.php:108
4521+#: system_remote/plugins/col1/default.php:53
4522+#: system_remote/plugins/col3/default.php:54
4523+>>>>>>> MERGE-SOURCE
4524 msgid "New section"
4525 msgstr ""
4526
4527+<<<<<<< TREE
4528 #: system_remote/plugins/col1/default.php:64
4529 #: system_remote/plugins/col3/default.php:65
4530 #: system_remote/plugins/cms/default.php:154
4531+=======
4532+#: system_remote/plugins/cms/default.php:112
4533+msgid "New link"
4534+msgstr ""
4535+
4536+#: system_remote/plugins/cms/default.php:154
4537+#: system_remote/plugins/col1/default.php:63
4538+#: system_remote/plugins/col3/default.php:64
4539+>>>>>>> MERGE-SOURCE
4540 msgid "Saved"
4541 msgstr ""
4542
4543+<<<<<<< TREE
4544 #: system_remote/plugins/col1/default.php:65
4545 #: system_remote/plugins/col3/default.php:66
4546 #: system_remote/plugins/cms/default.php:155
4547+=======
4548+#: system_remote/plugins/cms/default.php:155
4549+#: system_remote/plugins/col1/default.php:64
4550+#: system_remote/plugins/col3/default.php:65
4551+>>>>>>> MERGE-SOURCE
4552 msgid "Error while saving"
4553 msgstr ""
4554
4555@@ -1418,7 +2673,23 @@
4556 msgid "Error saving accessrights"
4557 msgstr ""
4558
4559-#: system_remote/plugins/cms/scripts.php:87
4560+<<<<<<< TREE
4561+#: system_remote/plugins/cms/scripts.php:87
4562+=======
4563+#: system_remote/plugins/cms/scripts.php:76
4564+#: system_remote/plugins/col1/scripts.php:111
4565+#: system_remote/plugins/col3/scripts.php:61
4566+msgid "Everyone"
4567+msgstr ""
4568+
4569+#: system_remote/plugins/cms/scripts.php:80
4570+#: system_remote/plugins/col1/scripts.php:115
4571+#: system_remote/plugins/col3/scripts.php:65
4572+msgid "Hidden"
4573+msgstr ""
4574+
4575+#: system_remote/plugins/cms/scripts.php:87
4576+>>>>>>> MERGE-SOURCE
4577 msgid "Page made visible"
4578 msgstr ""
4579
4580@@ -1438,10 +2709,61 @@
4581 msgid "Delete section?"
4582 msgstr ""
4583
4584-#: system_remote/plugins/cms/scripts.php:134
4585+<<<<<<< TREE
4586+#: system_remote/plugins/cms/scripts.php:134
4587+=======
4588+#: system_remote/plugins/cms/scripts.php:115
4589+#: system_remote/plugins/col1/scripts.php:22
4590+#: system_remote/plugins/col3/scripts.php:22
4591+msgid "Section deleted"
4592+msgstr ""
4593+
4594+#: system_remote/plugins/cms/scripts.php:115
4595+#: system_remote/plugins/col1/scripts.php:22
4596+#: system_remote/plugins/col3/scripts.php:22
4597+msgid "Error deleting section"
4598+msgstr ""
4599+
4600+#: system_remote/plugins/cms/scripts.php:120
4601+#: system_remote/plugins/col1/scripts.php:28
4602+#: system_remote/plugins/col3/scripts.php:26
4603+msgid "Section moved up"
4604+msgstr ""
4605+
4606+#: system_remote/plugins/cms/scripts.php:120
4607+#: system_remote/plugins/cms/scripts.php:123
4608+#: system_remote/plugins/cms/scripts.php:134
4609+#: system_remote/plugins/col1/scripts.php:32
4610+#: system_remote/plugins/col1/scripts.php:45
4611+#: system_remote/plugins/col3/scripts.php:26
4612+#: system_remote/plugins/col3/scripts.php:29
4613+msgid "Error moving section"
4614+msgstr ""
4615+
4616+#: system_remote/plugins/cms/scripts.php:123
4617+#: system_remote/plugins/col1/scripts.php:41
4618+#: system_remote/plugins/col3/scripts.php:29
4619+msgid "Section moved down"
4620+msgstr ""
4621+
4622+#: system_remote/plugins/cms/scripts.php:127
4623+#: system_remote/plugins/col1/scripts.php:55
4624+#: system_remote/plugins/col3/scripts.php:33
4625+msgid "New section created"
4626+msgstr ""
4627+
4628+#: system_remote/plugins/cms/scripts.php:127
4629+#: system_remote/plugins/col1/scripts.php:59
4630+#: system_remote/plugins/col3/scripts.php:33
4631+msgid "Error creating section"
4632+msgstr ""
4633+
4634+#: system_remote/plugins/cms/scripts.php:134
4635+>>>>>>> MERGE-SOURCE
4636 msgid "Section moved"
4637 msgstr ""
4638
4639+<<<<<<< TREE
4640 #: system_remote/plugins/cms/scripts.php:148
4641 #: system_remote/plugins/cms/default.php:24
4642 msgid "Other page"
4643@@ -1453,6 +2775,9 @@
4644 msgstr ""
4645
4646 #: system_remote/plugins/cms/scripts.php:165
4647+=======
4648+#: system_remote/plugins/cms/scripts.php:165
4649+>>>>>>> MERGE-SOURCE
4650 msgid "Pages reordered"
4651 msgstr ""
4652
4653@@ -1460,6 +2785,7 @@
4654 msgid "Error reordering pages"
4655 msgstr ""
4656
4657+<<<<<<< TREE
4658 #: system_remote/plugins/cms/default.php:18
4659 msgid "Link path"
4660 msgstr ""
4661@@ -1544,6 +2870,34 @@
4662 msgstr ""
4663
4664 #: system_remote/plugins/filemanager/default.php:41
4665+=======
4666+#: system_remote/plugins/col1/default.php:22
4667+#: system_remote/plugins/col3/default.php:22
4668+msgid "Add section"
4669+msgstr ""
4670+
4671+#: system_remote/plugins/col1/scripts.php:73
4672+#: system_remote/plugins/col3/scripts.php:41
4673+msgid "Sections reordered"
4674+msgstr ""
4675+
4676+#: system_remote/plugins/col1/scripts.php:77
4677+#: system_remote/plugins/col3/scripts.php:41
4678+msgid "Error reordering sections"
4679+msgstr ""
4680+
4681+#: system_remote/plugins/col1/scripts.php:91
4682+#: system_remote/plugins/col3/scripts.php:49
4683+msgid "Access rights saved"
4684+msgstr ""
4685+
4686+#: system_remote/plugins/col1/scripts.php:95
4687+#: system_remote/plugins/col3/scripts.php:49
4688+msgid "Error saving access rights"
4689+msgstr ""
4690+
4691+#: system_remote/plugins/filemanager/default.php:41
4692+>>>>>>> MERGE-SOURCE
4693 msgid "Directory deleted"
4694 msgstr ""
4695
4696@@ -1595,11 +2949,15 @@
4697 msgid "Error chmodding file"
4698 msgstr ""
4699
4700+<<<<<<< TREE
4701 #: system_remote/plugins/filemanager/default.php:135
4702 msgid "Read"
4703 msgstr ""
4704
4705 #: system_remote/plugins/filemanager/default.php:135
4706+=======
4707+#: system_remote/plugins/filemanager/default.php:135
4708+>>>>>>> MERGE-SOURCE
4709 msgid "Write"
4710 msgstr ""
4711
4712@@ -1607,8 +2965,13 @@
4713 msgid "Execute"
4714 msgstr ""
4715
4716+<<<<<<< TREE
4717 #: system_remote/plugins/filemanager/default.php:140
4718 #: system_remote/plugins/filemanager/default.php:332
4719+=======
4720+#: system_remote/plugins/filemanager/default.php:140
4721+#: system_remote/plugins/filemanager/default.php:331
4722+>>>>>>> MERGE-SOURCE
4723 msgid "Owner"
4724 msgstr ""
4725
4726@@ -1616,8 +2979,13 @@
4727 msgid "World"
4728 msgstr ""
4729
4730+<<<<<<< TREE
4731 #: system_remote/plugins/filemanager/default.php:167
4732 #: system_remote/plugins/filemanager/default.php:335
4733+=======
4734+#: system_remote/plugins/filemanager/default.php:167
4735+#: system_remote/plugins/filemanager/default.php:334
4736+>>>>>>> MERGE-SOURCE
4737 msgid "Chmod"
4738 msgstr ""
4739
4740@@ -1625,8 +2993,13 @@
4741 msgid "Error chowning file"
4742 msgstr ""
4743
4744+<<<<<<< TREE
4745 #: system_remote/plugins/filemanager/default.php:190
4746 #: system_remote/plugins/filemanager/default.php:335
4747+=======
4748+#: system_remote/plugins/filemanager/default.php:190
4749+#: system_remote/plugins/filemanager/default.php:334
4750+>>>>>>> MERGE-SOURCE
4751 msgid "Chown"
4752 msgstr ""
4753
4754@@ -1634,13 +3007,23 @@
4755 msgid "Error chgrping file"
4756 msgstr ""
4757
4758+<<<<<<< TREE
4759 #: system_remote/plugins/filemanager/default.php:212
4760 #: system_remote/plugins/filemanager/default.php:335
4761+=======
4762+#: system_remote/plugins/filemanager/default.php:212
4763+#: system_remote/plugins/filemanager/default.php:334
4764+>>>>>>> MERGE-SOURCE
4765 msgid "Chgrp"
4766 msgstr ""
4767
4768+<<<<<<< TREE
4769 #: system_remote/plugins/filemanager/default.php:222
4770 #: system_remote/plugins/filemanager/default.php:331
4771+=======
4772+#: system_remote/plugins/filemanager/default.php:222
4773+#: system_remote/plugins/filemanager/default.php:330
4774+>>>>>>> MERGE-SOURCE
4775 msgid "Upload"
4776 msgstr ""
4777
4778@@ -1660,8 +3043,13 @@
4779 msgid "Error renaming file"
4780 msgstr ""
4781
4782+<<<<<<< TREE
4783 #: system_remote/plugins/filemanager/default.php:260
4784 #: system_remote/plugins/filemanager/default.php:335
4785+=======
4786+#: system_remote/plugins/filemanager/default.php:260
4787+#: system_remote/plugins/filemanager/default.php:334
4788+>>>>>>> MERGE-SOURCE
4789 msgid "Rename"
4790 msgstr ""
4791
4792@@ -1669,36 +3057,93 @@
4793 msgid "Error copying file"
4794 msgstr ""
4795
4796+<<<<<<< TREE
4797 #: system_remote/plugins/filemanager/default.php:281
4798 #: system_remote/plugins/filemanager/default.php:335
4799+=======
4800+#: system_remote/plugins/filemanager/default.php:281
4801+#: system_remote/plugins/filemanager/default.php:334
4802+>>>>>>> MERGE-SOURCE
4803 msgid "Copy"
4804 msgstr ""
4805
4806+<<<<<<< TREE
4807 #: system_remote/plugins/filemanager/default.php:320
4808+=======
4809+#: system_remote/plugins/filemanager/default.php:319
4810+>>>>>>> MERGE-SOURCE
4811 msgid "Index of"
4812 msgstr ""
4813
4814+<<<<<<< TREE
4815 #: system_remote/plugins/filemanager/default.php:325
4816+=======
4817+#: system_remote/plugins/filemanager/default.php:324
4818+>>>>>>> MERGE-SOURCE
4819 msgid "Folder"
4820 msgstr ""
4821
4822+<<<<<<< TREE
4823 #: system_remote/plugins/filemanager/default.php:326
4824+=======
4825+#: system_remote/plugins/filemanager/default.php:325
4826+>>>>>>> MERGE-SOURCE
4827 msgid "File"
4828 msgstr ""
4829
4830+<<<<<<< TREE
4831 #: system_remote/plugins/filemanager/default.php:329
4832+=======
4833+#: system_remote/plugins/filemanager/default.php:328
4834+>>>>>>> MERGE-SOURCE
4835 msgid "Create"
4836 msgstr ""
4837
4838+<<<<<<< TREE
4839 #: system_remote/plugins/filemanager/default.php:332
4840+=======
4841+#: system_remote/plugins/filemanager/default.php:331
4842+>>>>>>> MERGE-SOURCE
4843 msgid "Rights"
4844 msgstr ""
4845
4846+<<<<<<< TREE
4847 #: system_remote/plugins/filemanager/default.php:332
4848+=======
4849+#: system_remote/plugins/filemanager/default.php:331
4850+>>>>>>> MERGE-SOURCE
4851 msgid "Last edited"
4852 msgstr ""
4853
4854+<<<<<<< TREE
4855 #: system_remote/plugins/filemanager/default.php:332
4856+=======
4857+#: system_remote/plugins/filemanager/default.php:331
4858+>>>>>>> MERGE-SOURCE
4859 msgid "Size"
4860 msgstr ""
4861
4862+#: system_remote/plugins/filemanager/scripts.php:24
4863+msgid "File saved"
4864+msgstr ""
4865+
4866+#: system_remote/plugins/filemanager/scripts.php:55
4867+msgid "File moved"
4868+msgstr ""
4869+
4870+#: system_remote/plugins/filemanager/scripts.php:71
4871+msgid "File copied"
4872+msgstr ""
4873+
4874+#: system_remote/plugins/filemanager/scripts.php:87
4875+msgid "Changed file group"
4876+msgstr ""
4877+
4878+#: system_remote/plugins/filemanager/scripts.php:104
4879+msgid "Changed file owner"
4880+msgstr ""
4881+
4882+#: system_remote/plugins/filemanager/scripts.php:121
4883+msgid "Changed file permissions"
4884+msgstr ""
4885+

Subscribers

People subscribed via source and target branches

to all changes: