-
803i18n/de.po
-
5index.php
-
7jajax.php
-
5loader.php
-
48system/Controller/ControllerMain.php
-
4system/Datas/Attachment.php
-
43system/Datas/Caps.php
-
25system/Datas/ConfVar.php
-
4system/Datas/Post.php
-
15system/Datas/Presence.php
-
6system/Event.php
-
163system/Jabber.php
-
2system/RPC.php
-
2system/Tpl/TplPageBuilder.php
-
35system/User.php
-
46system/Utils.php
-
60system/Widget/WidgetBase.php
-
2system/Widget/WidgetCommon.php
-
56system/Widget/WidgetWrapper.php
-
23system/Widget/widgets/Account/Account.php
-
179system/Widget/widgets/AccountAdd/AccountAdd.php
-
30system/Widget/widgets/Chat/Chat.php
-
2system/Widget/widgets/Chat/chat.css
-
25system/Widget/widgets/ContactCard/ContactCard.php
-
58system/Widget/widgets/ContactSummary/ContactSummary.php
-
20system/Widget/widgets/ContactSummary/contactsummary.css
-
BINsystem/Widget/widgets/ContactSummary/img/address.png
-
BINsystem/Widget/widgets/ContactSummary/img/birth.png
-
BINsystem/Widget/widgets/ContactSummary/img/hearth.png
-
BINsystem/Widget/widgets/ContactSummary/img/mobile.png
-
BINsystem/Widget/widgets/ContactSummary/img/place.png
-
54system/Widget/widgets/Feed/Feed.php
-
9system/Widget/widgets/Feed/feed.css
-
4system/Widget/widgets/Log/Log.php
-
80system/Widget/widgets/Login/Login.php
-
BINsystem/Widget/widgets/Login/img/logo.png
-
77system/Widget/widgets/Login/login.css
-
7system/Widget/widgets/Logout/Logout.php
-
8system/Widget/widgets/Logout/logout.css
-
2system/Widget/widgets/Notifs/notifs.css
-
12system/Widget/widgets/Profile/Profile.php
-
13system/Widget/widgets/Profile/profile.css
-
4system/Widget/widgets/Roster/Roster.php
-
7system/Widget/widgets/Roster/roster.css
-
9system/Widget/widgets/Vcard/Vcard.php
-
3system/Widget/widgets/Vcard/vcard.css
-
49system/Widget/widgets/Wall/Wall.php
-
2system/js/movim.js
-
37themes/movim/account.tpl
-
7themes/movim/account_add.tpl
-
7themes/movim/account_create.tpl
-
6themes/movim/config.tpl
-
11themes/movim/css/posts.css
-
108themes/movim/css/style2.css
-
12themes/movim/friend.tpl
-
6themes/movim/help.tpl
-
6themes/movim/img/default.svg
-
5themes/movim/main.tpl
-
8themes/movim/profile.tpl
@ -0,0 +1,43 @@ |
|||
<?php |
|||
|
|||
class Caps extends DatajarBase { |
|||
protected $node; |
|||
protected $category; |
|||
protected $type; |
|||
protected $name; |
|||
protected $features; |
|||
|
|||
protected function type_init() { |
|||
$this->node = DatajarType::varchar(256); |
|||
$this->category = DatajarType::varchar(128); |
|||
$this->type = DatajarType::varchar(128); |
|||
$this->name = DatajarType::varchar(128); |
|||
$this->features = DatajarType::text(); |
|||
} |
|||
|
|||
public function setCaps($query) { |
|||
$this->node->setval($query['@attributes']['node']); |
|||
$this->category->setval($query['identity']['@attributes']['category']); |
|||
$this->type->setval($query['identity']['@attributes']['type']); |
|||
$this->name->setval($query['identity']['@attributes']['name']); |
|||
$this->features->setval(serialize($query['feature'])); |
|||
} |
|||
|
|||
public function getData($data) { |
|||
return $this->$data->getval(); |
|||
} |
|||
} |
|||
|
|||
class CapsHandler { |
|||
private $instance; |
|||
|
|||
public function __construct() { |
|||
$this->instance = new Caps(); |
|||
} |
|||
|
|||
public function get($node) { |
|||
global $sdb; |
|||
$sdb->load($this->instance, array('node' => $node)); |
|||
return $this->instance; |
|||
} |
|||
} |
|||
@ -0,0 +1,179 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file Account.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The account adding widget. |
|||
* |
|||
* @author Timothée Jaussoin <edhelas@gmail.com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 25 November 2011 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class AccountAdd extends WidgetBase { |
|||
function __construct() { |
|||
parent::__construct(true); |
|||
} |
|||
|
|||
function ajaxSubmit($data) { |
|||
foreach($data as $value) { |
|||
if($value == NULL || $value == '') { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=datamissing")); |
|||
RPC::commit(); |
|||
exit; |
|||
} |
|||
} |
|||
|
|||
foreach($data as $value) { |
|||
if(!filter_var($data['jid'], FILTER_VALIDATE_EMAIL)) { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=jiderror")); |
|||
RPC::commit(); |
|||
exit; |
|||
} elseif($data['password'] != $data['passwordconf']) { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=passworddiff")); |
|||
RPC::commit(); |
|||
exit; |
|||
} elseif(eregi('[^a-zA-Z0-9_]', $data['nick'])) { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=nameerr")); |
|||
RPC::commit(); |
|||
exit; |
|||
} |
|||
} |
|||
|
|||
unset($data['passwordconf']); |
|||
|
|||
$u = new UserConf(); |
|||
if($u->getConf($data['jid']) == false) { |
|||
$host = end(explode('@', $data['jid'])); |
|||
$dns = dns_get_record('_xmpp-client._tcp.'.$host); |
|||
|
|||
if(isset($dns[0]['target']) && $dns[0]['target'] != null) |
|||
$domain = $dns[0]['target']; |
|||
else { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=dnsdomain")); |
|||
RPC::commit(); |
|||
exit; |
|||
} |
|||
$confvar = Conf::getServerConf(); |
|||
|
|||
global $sdb; |
|||
$conf = new ConfVar(); |
|||
|
|||
$conf |
|||
->set('login', $data['jid']) |
|||
->set('pass', sha1($data['password'])) |
|||
->set('host', $host) |
|||
->set('domain', $domain) |
|||
->set('port', $confvar['port']) |
|||
->set('boshHost', $confvar['defBoshHost']) |
|||
->set('boshSuffix', $confvar['defBoshSuffix']) |
|||
->set('boshPort', $confvar['defBoshPort']) |
|||
->set('language', $confvar['defLang']) |
|||
->set('first', false); |
|||
|
|||
$sdb->save($conf); |
|||
|
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=mainPage&err=acccreated")); |
|||
RPC::commit(); |
|||
exit; |
|||
} else { |
|||
RPC::call('movim_reload', RPC::cdata(BASE_URI."index.php?q=accountAdd&err=userconflict")); |
|||
RPC::commit(); |
|||
exit; |
|||
} |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
switch ($_GET['err']) { |
|||
case 'datamissing': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('Some data are missing !').' |
|||
</div> '; |
|||
break; |
|||
case 'jiderror': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('Wrong ID').' |
|||
</div> '; |
|||
break; |
|||
case 'passworddiff': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('You entered different passwords').' |
|||
</div> '; |
|||
break; |
|||
case 'nameerr': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('Invalid name').' |
|||
</div> '; |
|||
break; |
|||
case 'userconflict': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('Username already taken').' |
|||
</div> '; |
|||
break; |
|||
case 'dnsdomain': |
|||
$warning = ' |
|||
<div class="error"> |
|||
'.t('XMPP Domain error, your account is not a correct Jabber ID').' |
|||
</div> '; |
|||
break; |
|||
} |
|||
|
|||
$submit = $this->genCallAjax('ajaxSubmit', "movim_parse_form('accountAdd')"); |
|||
?>
|
|||
<div id="account" style="width: 730px; margin: 0 auto;"> |
|||
<?php echo $warning; ?>
|
|||
<h1><?php echo t('Add your login informations'); ?></h1>
|
|||
<form style="width: 500px; float: left;" name="accountAdd"> |
|||
|
|||
<p style="margin-top: 20px;"> |
|||
<input |
|||
type="email" |
|||
autofocus |
|||
placeholder="<?php echo t("My address"); ?>" |
|||
class="big" |
|||
style="width: 500px;" |
|||
name="jid"/> |
|||
</p> |
|||
|
|||
<p> |
|||
<input |
|||
type="password" |
|||
placeholder="<?php echo t("Password"); ?>" |
|||
class="big" |
|||
style="width: 500px;" |
|||
name="password" |
|||
/> |
|||
</p> |
|||
|
|||
<p> |
|||
<input |
|||
type="password" |
|||
placeholder="<?php echo t("Retype"); ?>" |
|||
class="big" |
|||
style="width: 500px;" |
|||
name="passwordconf" |
|||
/> |
|||
</p> |
|||
|
|||
<p> |
|||
<input type="button" class="button big icon submit" style="float: right;" value="<?php echo t('Create'); ?>" onclick="<?php echo $submit;?> this.className='button big icon loading';"> |
|||
</p> |
|||
</form> |
|||
</div> |
|||
<?php |
|||
} |
|||
} |
|||
|
After Width: 10 | Height: 10 | Size: 271 B |
|
After Width: 10 | Height: 10 | Size: 228 B |
|
After Width: 10 | Height: 10 | Size: 307 B |
|
After Width: 10 | Height: 10 | Size: 227 B |
|
After Width: 10 | Height: 10 | Size: 432 B |
|
After Width: 449 | Height: 146 | Size: 47 KiB |
@ -1,7 +1,40 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
<style type="text/css"> |
|||
html { |
|||
height: 100%; |
|||
} |
|||
|
|||
body { |
|||
background-image: radial-gradient(center |
|||
45deg, circle closest-corner, #ffffff 0%, #717171 100%); |
|||
background-image: -moz-radial-gradient(center |
|||
45deg, ellipse, #6E9EA8 0%, #274950 100%); |
|||
background-repeat: no-repeat; |
|||
height: auto; |
|||
display: block; |
|||
vertical-align: middle; |
|||
} |
|||
.account_button { |
|||
margin: 2em auto; |
|||
width: 300px; |
|||
font-size: 1.6em; |
|||
} |
|||
h1 { |
|||
color: white; |
|||
display: block; |
|||
margin: 0 auto; |
|||
} |
|||
</style> |
|||
|
|||
<div id="center"> |
|||
<br /> |
|||
<?php $this->widget('Account');?> |
|||
<br /> |
|||
<h1><?php echo t('Make your choice !');?></h1> |
|||
<a href="?q=accountCreate"> |
|||
<div class="account_button button big green"><?php echo t('Create a new account'); ?></div> |
|||
</a> |
|||
<a href="?q=accountAdd"> |
|||
<div class="account_button button big green"><?php echo t('Link my actual account'); ?></div> |
|||
</a> |
|||
</div> |
|||
|
|||
@ -0,0 +1,7 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
<div id="center"> |
|||
<br /> |
|||
<?php $this->widget('AccountAdd');?> |
|||
</div> |
|||
|
|||
@ -0,0 +1,7 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
<div id="center"> |
|||
<br /> |
|||
<?php $this->widget('Account');?> |
|||
</div> |
|||
|
|||