Changeset 417 for trunk/jabberit_messenger/inc
- Timestamp:
- 09/12/08 11:41:46 (16 years ago)
- Location:
- trunk/jabberit_messenger/inc
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/Controller.class.php
r382 r417 1 1 <?php 2 /***************************************************************************\ 3 * Expresso - Expresso Messenger * 4 * - Alexandre Correia / Rodrigo Souza * 5 * ------------------------------------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \***************************************************************************/ 2 11 3 12 class Controller -
trunk/jabberit_messenger/inc/class.contacts_im.inc.php
r382 r417 1 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 2 13 3 14 require_once "class.ldap_im.inc.php"; -
trunk/jabberit_messenger/inc/class.db_im.inc.php
r382 r417 1 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 \***************************************************************************/ 2 12 3 13 define('PHPGW_INCLUDE_ROOT','../'); … … 7 17 class db_im 8 18 { 9 10 19 private $db; 11 20 private $db_name; … … 28 37 } 29 38 39 private final function connectDB() 40 { 41 $this->db = new db(); 42 $this->db->connect($this->db_name,$this->db_host,$this->db_port,$this->db_user,$this->db_pass,$this->db_type); 43 } 44 45 public final function getApplicationsEnabled() 46 { 47 $this->connectDB(); 48 $this->db->query("SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' and config_name ='apps_jabberit'"); 49 if($this->db->num_rows()) 50 { 51 $tmp = ""; 52 while($this->db->next_record()) 53 { 54 $tmp[]= $this->db->row(); 55 } 56 return $tmp[0]['config_value']; 57 } 58 return false; 59 } 60 61 public final function getApplicationsList() 62 { 63 $this->connectDB(); 64 $this->db->query("SELECT * FROM phpgw_applications WHERE app_enabled = '1' order by app_name"); 65 if($this->db->num_rows()) 66 { 67 while ($this->db->next_record()) 68 { 69 $app = $this->db->f('app_name'); 70 $title = @$GLOBALS['phpgw_info']['apps'][$app]['title']; 71 if (empty($title)) 72 { 73 $title = lang($app) == $app.'*' ? $app : lang($app); 74 } 75 $apps[$app] = array( 76 'title' => $title, 77 'name' => $app, 78 'status' => $this->db->f('app_enabled') 79 ); 80 } 81 } 82 return $apps; 83 } 84 30 85 public final function get_accounts_acl() 31 86 { 32 33 $this->db = new db(); 34 $this->db->connect($this->db_name,$this->db_host,$this->db_port,$this->db_user,$this->db_pass,$this->db_type); 87 $this->connectDB(); 35 88 36 89 $query = "select acl_account from phpgw_acl where acl_location in (select acl_account from phpgw_acl where acl_appname = 'jabberit_messenger') "; … … 54 107 } 55 108 56 p rivate final function query_db($pQuery)109 public final function getPreferences() 57 110 { 58 if (!$this->db->query($pQuery)) 59 return false; 111 $this->connectDB(); 112 113 $result = array(); 114 $query = "select * from phpgw_preferences where preference_owner = '".$this->user_id."' and preference_app = 'jabberit_messenger'"; 115 116 if ( $this->db->query($query) ) 117 { 118 while($this->db->next_record()) 119 $result[] = $this->db->row(); 120 121 if(count($result) > 0) 122 return unserialize($result[0]['preference_value']); 123 } 124 125 return "openWindowJabberit:true"; 126 } 127 128 public final function setPreferences($pParam) 129 { 130 $this->connectDB(); 131 $preferences = $pParam['preferences']; 132 $user_id = $this->user_id; 133 134 $query = "insert into phpgw_preferences values('".$user_id."','jabberit_messenger','".serialize($preferences)."')"; 135 136 if($this->db->query($query)) 137 { 138 return "true"; 139 } 60 140 else 61 return true; 141 { 142 $query = "update phpgw_preferences set preference_value = '".serialize($preferences)."' where preference_app='jabberit_messenger' and preference_owner='".$user_id."'"; 143 144 if($this->db->query($query)) 145 return "true"; 146 else 147 return "false"; 148 } 149 } 150 151 public final function setApplications($pApplications) 152 { 153 $this->connectDB(); 154 $apps = serialize($pApplications); 155 156 if( $this->db ) 157 { 158 $query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' and config_name ='apps_jabberit'"; 159 160 $this->db->query($query); 161 162 if(!$this->db->next_record()) 163 { 164 $query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','apps_jabberit','".$apps."')"; 165 $this->db->query($query); 166 return true; 167 } 168 else 169 { 170 $query = "UPDATE phpgw_config SET config_value = '".$apps."' WHERE config_app = 'phpgwapi' AND config_name = 'apps_jabberit'"; 171 $this->db->query($query); 172 return true; 173 } 174 } 175 return false; 62 176 } 63 177 } 64 65 178 ?> -
trunk/jabberit_messenger/inc/class.ldap_im.inc.php
r382 r417 1 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 \***************************************************************************/ 2 12 3 13 define('PHPGW_INCLUDE_ROOT', '../'); … … 18 28 public final function __construct() 19 29 { 20 21 30 $this->ldap_host = $_SESSION['phpgw_info']['jabberit_messenger']['server_ldap_jabberit']; 22 31 $this->ldap_context = $_SESSION['phpgw_info']['jabberit_messenger']['context_ldap_jabberit']; … … 37 46 $this->common = new common(); 38 47 39 if( !$this->ldap ){ 48 if( !$this->ldap ) 49 { 40 50 $GLOBALS['phpgw_info']['server']['ldap_version3'] = true; 41 51 $this->ldap = $this->common->ldapConnect( $this->ldap_host,$this->ldap_dn,$this->ldap_pass ); … … 89 99 $_SESSION['phpgw_info']['jabberit_messenger']['photo'][trim($result_user[$i]['uid'])] = $photo[0]; 90 100 } 91 92 101 $i++; 93 102 } 94 95 103 $entry = ldap_next_entry($this->ldap,$entry); 96 104 } 97 98 105 return $result_user; 99 106 } … … 102 109 return "Many Results"; 103 110 } 104 105 111 } 106 112 return 0; 113 } 114 115 public final function teste() 116 { 117 return 'dentro da classe do php'; 107 118 } 108 119 } -
trunk/jabberit_messenger/inc/class.ujabber.inc.php
r382 r417 1 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 \***************************************************************************/ 2 12 3 13 require_once "class.jabber.inc.php"; … … 60 70 $this->disconnect(); 61 71 } 62 63 function statusWindow()64 {65 if(!isset($_SESSION['phpgw_info']['jabberit_messenger']['status']))66 return 'closed';67 else68 return $_SESSION['phpgw_info']['jabberit_messenger']['status'];69 }70 71 function setWindow($pStatus)72 {73 $_SESSION['phpgw_info']['jabberit_messenger']['status'] = $pStatus['window'];74 }75 72 } 76 73 ?> -
trunk/jabberit_messenger/inc/controller.xml
r382 r417 29 29 <php path="/var/www/expresso/jabberit_messenger/inc" suffix=".class.php"> 30 30 <item ref="contacts_im" alias="list_contacts" class="contacts_im" method="list_contacts" prefix="class." suffix=".inc.php"/> 31 <item ref="db_im" alias="get _preferences" class="db_im" method="get_preferences" prefix="class." suffix=".inc.php"/>32 <item ref="db_im" alias="set _preferences" class="db_im" method="set_preferences" prefix="class." suffix=".inc.php"/>31 <item ref="db_im" alias="getPreferences" class="db_im" method="getPreferences" prefix="class." suffix=".inc.php"/> 32 <item ref="db_im" alias="setPreferences" class="db_im" method="setPreferences" prefix="class." suffix=".inc.php"/> 33 33 <item ref="ldap_im" alias="list_organizations_ldap" class="ldap_im" method="list_organizations_ldap" prefix="class." suffix=".inc.php"/> 34 34 <item ref="ldap_im" alias="photo_ldap" class="ldap_im" method="photo_ldap" prefix="class." suffix=".inc.php"/> 35 35 <item ref="ujabber" alias="AddNewContact" class="ujabber" method="AddNewContact" prefix="class." suffix=".inc.php"/> 36 <item ref="ujabber" alias="statusWindow" class="ujabber" method="statusWindow" prefix="class." suffix=".inc.php"/>37 <item ref="ujabber" alias="setWindow" class="ujabber" method="setWindow" prefix="class." suffix=".inc.php"/>38 36 </php> 39 37 <xml></xml> -
trunk/jabberit_messenger/inc/getphoto.php
r382 r417 1 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 \***************************************************************************/ 2 12 3 function getPhotoSession($pUid) 13 class ldapPhoto 14 { 15 private $host; 16 private $dn; 17 private $passwd; 18 private $refer; 19 private $user_referral; 20 private $password_referral; 21 private $conn; 22 private $context; 23 private $photo_user = array(); 24 25 function __construct() 26 { 27 $this->host = "localhost"; 28 $this->dn = "uid=expresso-admin,ou=celepar,dc=ecelepar10612,dc=pr,dc=gov,dc=br"; 29 $this->passwd = "senha"; 30 $this->context = "dc=ecelepar10612,dc=pr,dc=gov,dc=br"; 31 32 $this->refer = true; 33 $this->version3 = true; 34 } 35 36 private final function ldap_rebind($ldap_connection, $ldap_url) 37 { 38 @ldap_bind($ldap_connection, $this->user_referral, $this->password_referral); 39 } 40 41 private final function ldapConnect() 42 { 43 if(!function_exists('ldap_connect')) 44 { 45 printf("<b>Erro : Ldap Não suportado %s</b><br>" , $this->host); 46 return False; 47 } 48 49 if(!$this->conn = ldap_connect($this->host)) 50 { 51 printf("<b>Erro: não pode conectar no servidor ldap %s!</b><br>", $this->host); 52 return False; 53 } 54 if( $this->version3 ) 55 { 56 if( !ldap_set_option($this->conn,LDAP_OPT_PROTOCOL_VERSION,3) ) 57 $this->version = false; 58 } 59 ldap_set_option($this->conn, LDAP_OPT_REFERRALS, $this->refer); 60 // verifica refer 61 if( $this->refer ) 62 { 63 $this->user_referral = $this->dn; 64 $this->password_referral = $this->passwd; 65 @ldap_set_rebind_proc($this->conn, $this->ldap_rebind); 66 } 67 68 // bind as admin 69 if($this->dn && $this->passwd && !ldap_bind($this->conn, $this->dn, $this->passwd)){ 70 echo "<center><b>ExpressoLivre indisponível no momento</b></center>"; 71 return False; 72 } 73 // bind as anonymous 74 if(!$this->dn && !$this->passwd && !@ldap_bind($this->conn)) 75 { 76 echo "<center><b>ExpressoLivre indisponível no momento</b></center>"; 77 return False; 78 } 79 } 80 81 public final function getPhotoLdap($uid) 82 { 83 $this->ldapConnect(); 84 if( $this->conn ) 85 { 86 $filter = "(&(phpgwaccounttype=u)(uid=".$uid."))"; 87 $justthese = array("uid","phpgwAccountVisible","jpegPhoto"); 88 $search = ldap_search($this->conn,$this->context,$filter,$justthese); 89 $entry1 = ldap_get_entries($this->conn,$search); 90 $entry = ldap_first_entry( $this->conn, $search ); 91 92 if( $entry1['count'] > 0 ) 93 { 94 $i = 0; 95 $photo = ""; 96 $return_photo = ""; 97 98 99 if ( $entry1[$i]['phpgwaccountvisible'][0] != '-1' ) 100 { 101 $photo = @ldap_get_values_len($this->conn, $entry, 'jpegphoto'); 102 103 if ( $photo ) 104 $return_photo = $photo[0]; 105 } 106 return $return_photo; 107 } 108 } 109 return false; 110 } 111 112 public final function getPhotoSession($pUid) 4 113 { 5 114 if(isset($_SESSION['phpgw_info']['jabberit_messenger']['photo'][$pUid])) … … 20 129 } 21 130 } 131 } 22 132 23 if(trim($_REQUEST['uid']) != "") 133 if(trim($_REQUEST['uid']) != "") 134 { 135 $uid = trim($_REQUEST['uid']); 136 $a = new ldapPhoto(); 137 138 if( strpos($uid,"@")) 24 139 { 25 getPhotoSession(trim($_REQUEST['uid'])); 140 $uid = substr($uid, 0, strpos($uid,"@")); 141 $photo = $a->getPhotoLdap($uid); 142 $photoWidth = 70; 143 $photoHeight = 90; 144 $newImage = imagecreatetruecolor($photoWidth,$photoHeight); 145 146 if($photo) 147 { 148 $photo = imagecreatefromstring($photo); 149 $trans = imagecolortransparent($photo); 150 imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 151 imagepng($newImage); 152 imagedestroy($newImage); 153 } 154 else 155 { 156 $photo = @imagecreatefrompng("../templates/celepar/images/photo.png"); 157 $trans = imagecolortransparent($photo); 158 imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 159 imagepng($newImage); 160 imagedestroy($newImage); 161 } 26 162 } 27 163 else 164 { 165 $a->getPhotoSession($uid); 166 } 167 } 28 168 ?> 29 169 -
trunk/jabberit_messenger/inc/hook_admin.inc.php
r382 r417 1 1 <?php 2 /**************************************************************************\ 3 * eGroupWare * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 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 \***************************************************************************/ 11 12 12 13 // Only Modify the $file and $title variables..... 13 14 $title = 'jabberit_messenger'; 14 15 $file = array( 15 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname) 16 'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), 17 'Configurar o Uso do Módulo' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.edit_conf') 16 18 ); 17 19 -
trunk/jabberit_messenger/inc/jabberit_acl.inc.php
r382 r417 1 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 \***************************************************************************/ 2 12 3 13 $size_of_acl = sizeof($GLOBALS['phpgw_info']['user']['acl']); … … 5 15 for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; $i++ ) 6 16 { 7 if ( $GLOBALS['phpgw_info']['user']['acl'][$i]['appname'] == 'jabberit_messenger' && ( $GLOBALS['phpgw_info']['flags']['currentapp'] == 'expressoMail1_2' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'jabberit_messenger' )) 17 $apps = unserialize($GLOBALS['phpgw_info']['server']['apps_jabberit']); 18 $flag = false; 19 20 foreach($apps as $tmp) 8 21 { 9 22 $app_enabled = substr($tmp,0,strpos($tmp,";")); 23 24 if( $GLOBALS['phpgw_info']['flags']['currentapp'] == $app_enabled ) 25 $flag = true; 26 } 27 28 if ( $GLOBALS['phpgw_info']['user']['acl'][$i]['appname'] == 'jabberit_messenger' && ( $flag || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'jabberit_messenger' )) 29 { 30 10 31 $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url']; 11 32 $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/'; … … 48 69 printf("<script type=\"text/javascript\">%s</script>", $script); 49 70 50 print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/ default/css/window.css">';51 print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/ default/css/common.css">';71 print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/celepar/css/window.css">'; 72 print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/celepar/css/common.css">'; 52 73 53 74 break; 54 75 } 76 55 77 } 56 78 ?> -
trunk/jabberit_messenger/inc/jabberit_sessions.inc.php
r402 r417 1 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 \***************************************************************************/ 2 12 13 //User 3 14 $_SESSION['phpgw_info']['jabberit_messenger']['user'] = $GLOBALS['phpgw_info']['user']['account_lid']; 15 $_SESSION['phpgw_info']['jabberit_messenger']['user_id'] = $GLOBALS['phpgw_info']['user']['account_id']; 4 16 $_SESSION['phpgw_info']['jabberit_messenger']['passwd'] = $GLOBALS['phpgw_info']['user']['passwd']; 5 17 … … 9 21 $_SESSION['phpgw_info']['jabberit_messenger']['user_ldap_jabberit'] = $GLOBALS['phpgw_info']['server']['user_ldap_jabberit']; 10 22 $_SESSION['phpgw_info']['jabberit_messenger']['password_ldap_jabberit'] = $GLOBALS['phpgw_info']['server']['password_ldap_jabberit']; 11 23 12 24 //DB 13 25 $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name']; … … 24 36 $_SESSION['phpgw_info']['jabberit_messenger']['group_chat_jabberit'] = $GLOBALS['phpgw_info']['server']['group_chat_server_jabberit']; 25 37 $_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit'] = $GLOBALS['phpgw_info']['server']['use_ssl_jabberit']; 26 //$_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java'] = $GLOBALS['phpgw_info']['server']['use_proxy_java'];38 $_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java'] = $GLOBALS['phpgw_info']['server']['use_proxy_java']; 27 39 28 40 ?> -
trunk/jabberit_messenger/inc/load_lang.php
r382 r417 1 <? 1 <?php 2 2 3 3 if ( file_exists(($fn = dirname(__FILE__) . '/../setup/phpgw_pt-br.lang')) ) -
trunk/jabberit_messenger/inc/login.php
r402 r417 1 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'); 2 15 3 16 if(isset($_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit'])) 4 17 { 5 18 $path = $_SESSION['phpgw_info']['jabberit_messenger']['webserver_url']; 19 $SERVER_EXPRESSO = gethostbyaddr($_SERVER['SERVER_ADDR']) . $path; 6 20 7 $newWindow = "<script type='text/javascript'>"; 8 $newWindow .= "document.write('<HTML>');"; 9 $newWindow .= "document.write('<HEAD>');"; 10 $newWindow .= "document.write('</HEAD>');"; 11 $newWindow .= "document.write('<BODY leftmargin=\'0\' topmargin=\'0\' marginwidth=\'0\' marginheight=\'0\'>');"; 12 $newWindow .= "document.write('<APPLET name=\'jeti\' "; 13 $newWindow .= "archive=\'".$path."applet.jar,"; 14 $newWindow .= $path."plugins/groupchat.jar,"; 15 $newWindow .= $path."plugins/sound.jar,"; 16 $newWindow .= $path."plugins/xhtml.jar\' CODE=\'nu.fw.jeti.applet.Jeti.class\' WIDTH=\'100%\' HEIGHT=\'400px\'>');"; 17 $newWindow .= "document.write('<PARAM NAME=\"SERVER\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']."\'>');"; 18 $newWindow .= "document.write('<PARAM NAME=\"HOST\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']."\'>');"; 19 $newWindow .= "document.write('<PARAM NAME=\"PORT\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['port_jabberit']."\'>');"; 20 $newWindow .= "document.write('<PARAM NAME=\"RESOURCE\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit']."\'>');"; 21 $newWindow .= "document.write('<PARAM NAME=\"USER\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['user']."\'>');"; 22 $newWindow .= "document.write('<PARAM NAME=\"PASSWORD\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['passwd']."\'>');"; 23 $newWindow .= "document.write('<PARAM NAME=\"SSL\" VALUE=\'".$_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit']."\'>');"; 24 $newWindow .= "document.write('<PARAM NAME=\"HIDELOGINSTATUS\" VALUE=\"TRUE\">');"; 25 //$newWindow .= "document.write('<PARAM NAME=\"USEPROXY\" VALUE=\'".strtoupper($_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java'])."\'>');"; 26 $newWindow .= "document.write('<PARAM NAME=\"EXTIPAGE\" VALUE=\"javascript:window.close();\">');"; 27 $newWindow .= "document.write('</APPLET>');"; 28 $newWindow .= "document.write('</BODY>');"; 29 $newWindow .= "document.write('</HTML>');"; 30 $newWindow .= "document.close();"; 31 $newWindow .= "</script>"; 21 $template = new Template('templates/celepar'); 22 $template->set_var("path", $path); 23 $template->set_var("file0", filemtime("applet.jar")); 24 $template->set_var("file1", filemtime("plugins/groupchat.jar")); 25 $template->set_var("file2", filemtime("plugins/sound.jar")); 26 $template->set_var("file3", filemtime("plugins/xhtml.jar")); 27 $template->set_var("value_server",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']); 28 $template->set_var("value_host",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']); 29 $template->set_var("value_port",$_SESSION['phpgw_info']['jabberit_messenger']['port_jabberit']); 30 $template->set_var("value_resource",$_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit']); 31 $template->set_var("value_user",$_SESSION['phpgw_info']['jabberit_messenger']['user']); 32 $template->set_var("value_password",$_SESSION['phpgw_info']['jabberit_messenger']['passwd']); 33 $template->set_var("value_ssl",$_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit']); 34 $template->set_var("value_hideloginstatus","TRUE"); 35 $template->set_var("value_userproxy",$_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java']); 36 $template->set_var("value_expresso",$SERVER_EXPRESSO); 37 $template->set_file(Array('jabberit_messenger' => 'jabberIM.tpl')); 38 $template->set_block('jabberit_messenger','index'); 39 $template->pfp('out','index'); 40 } 32 41 33 printf("%s",$newWindow);34 }35 42 ?>
Note: See TracChangeset
for help on using the changeset viewer.