source: trunk/jabberit_messenger/inc/login.php @ 512

Revision 512, 3.0 KB checked in by niltonneto, 16 years ago (diff)

Alteração de pasta template.

  • Property svn:executable set to *
Line 
1<?php
2  /***************************************************************************\
3  *  Expresso - Expresso Messenger                                            *
4  *     - Alexandre Correia / Rodrigo Souza                                                               *
5  *     - JETI - http://jeti-im.org/                                                                              *
6  * ------------------------------------------------------------------------- *
7  *  This program is free software; you can redistribute it and/or modify it  *
8  *  under the terms of the GNU General Public License as published by the    *
9  *  Free Software Foundation; either version 2 of the License, or (at your   *
10  *  option) any later version.                                               *
11  \***************************************************************************/
12
13        define('PHPGW_API_INC','../../phpgwapi/inc');
14        require_once(PHPGW_API_INC . '/class.Template.inc.php');
15
16        if(isset($_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']))
17    {
18                $path = $_SESSION['phpgw_info']['jabberit_messenger']['webserver_url'];
19                $SERVER_EXPRESSO = $_SERVER['HTTP_HOST'] . $path;
20               
21                $uid = $_SESSION['phpgw_info']['jabberit_messenger']['user'];
22               
23                if(isset($_SESSION['phpgw_info']['jabberit_messenger']['use_attribute_jabberit']))
24                {
25                        $attribute = $_SESSION['phpgw_info']['jabberit_messenger']['use_attribute_jabberit'];
26                       
27                        if( trim($attribute) == 'mail')
28                        {
29                                $uid = $_SESSION['phpgw_info']['jabberit_messenger']['mail'];
30                                $uid = substr($uid,0,strpos($uid,"@"));
31                        }
32                        else
33                        {
34                                $uid = $_SESSION['phpgw_info']['jabberit_messenger']['user'];
35                        }       
36                }
37               
38                $template = new Template('templates/default');
39                $template->set_var("path", $path);
40                $template->set_var("file0", filemtime("applet.jar"));
41                $template->set_var("file1", filemtime("plugins/groupchat.jar"));
42                $template->set_var("file2", filemtime("plugins/sound.jar"));
43                $template->set_var("file3", filemtime("plugins/xhtml.jar"));           
44                $template->set_var("value_server",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']);
45                $template->set_var("value_host",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']);                       
46                $template->set_var("value_port",$_SESSION['phpgw_info']['jabberit_messenger']['port_jabberit']);
47                $template->set_var("value_resource",$_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit']);
48                $template->set_var("value_user",$uid);
49                $template->set_var("value_password",$_SESSION['phpgw_info']['jabberit_messenger']['passwd']);
50                $template->set_var("value_ssl",$_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit']);
51                $template->set_var("value_hideloginstatus","TRUE");
52                $template->set_var("value_userproxy",$_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java']);
53                $template->set_var("value_expresso",$SERVER_EXPRESSO);
54                $template->set_var("value_company", $_SESSION['phpgw_info']['jabberit_messenger']['name_company']);
55                $template->set_file(Array('jabberit_messenger' => 'jabberIM.tpl'));
56                $template->set_block('jabberit_messenger','index');
57                $template->pfp('out','index');
58    }
59
60?>
Note: See TracBrowser for help on using the repository browser.