templates for redirected page

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@172 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-10-11 23:55:25 +00:00
parent d159b7ac35
commit 788a8dcd84
7 changed files with 215 additions and 256 deletions

View File

@ -0,0 +1,110 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>${msg:chat.window.title.agent}</title>
<link rel="shortcut icon" href="${webimroot}/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="${webimroot}/chat.css" />
</head>
<body bgcolor="#FFFFFF" background="${webimroot}/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="90"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="50%" height="90" class="window"><h1>${msg:chat.redirect.title}</h1></td>
<td width="50%" align="right" valign="bottom" class="window">
<h2>${msg:chat.redirect.choose_operator}</h2>
<img src='${webimroot}/images/free.gif' width="1" height="5" border="0" alt="" /><br>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="100%"></td>
<td>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="15"><img src='${webimroot}/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
<td width="100%" background="${webimroot}/images/winbg.gif" class="bgcy"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td width="15"><img src='${webimroot}/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
<tr>
<td height="100%" bgcolor="#FED840"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td background="${webimroot}/images/winbg.gif" class="bgcy">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="100%" valign="top" class="window">
<ul class="agentlist">
${page:pagination_list}
</ul>
</td>
</tr>
</table>
</td>
<td bgcolor="#E8A400"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><img src='${webimroot}/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
<td background="${webimroot}/images/winbg.gif" class="bgcy"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td><img src='${webimroot}/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="90"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="50%" align="left">
${pagination}
</td>
<td width="50%" align="right">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="javascript:window.back();" title="${msg:chat.redirect.back}"><img src='${webimroot}/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
<td width="5"></td>
<td class="button"><a href="javascript:window.back();" title="${msg:chat.redirect.back}">${msg:chat.redirect.back}</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td width="30"><img src='${webimroot}/images/free.gif' width="30" height="1" border="0" alt="" /></td>
<td width="100%"><img src='${webimroot}/images/free.gif' width="540" height="1" border="0" alt="" /></td>
<td width="30"><img src='${webimroot}/images/free.gif' width="30" height="1" border="0" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>${msg:chat.window.title.agent}</title>
<link rel="shortcut icon" href="${webimroot}/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="${webimroot}/chat.css" />
</head>
<body bgcolor="#FFFFFF" background="${webimroot}/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="75"></td>
<td class="window">
<h1>${msg:chat.redirected.title}</h1>
</td>
<td></td>
</tr>
<tr>
<td height="100%"></td>
<td>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="15"><img src='${webimroot}/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
<td width="100%" background="${webimroot}/images/winbg.gif" class="bgcy"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td width="15"><img src='${webimroot}/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
<tr>
<td height="100%" bgcolor="#FED840"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td background="${webimroot}/images/winbg.gif" class="bgcy">
${msg:chat.redirected.content,nextAgent}<br/>
<a href="javascript:window.close();">${msg:chat.redirected.closewindow}</a>
</td>
<td bgcolor="#E8A400"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><img src='${webimroot}/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
<td background="${webimroot}/images/winbg.gif" class="bgcy"><img src='${webimroot}/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td><img src='${webimroot}/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="70"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="100%" align="right">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="javascript:window.close();" title="${msg:chat.redirected.close}"><img src='${webimroot}/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
<td width="5"></td>
<td class="button"><a href="javascript:window.close();" title="${msg:chat.redirected.close}">${msg:chat.redirected.close}</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td width="30"><img src='${webimroot}/images/free.gif' width="30" height="1" border="0" alt="" /></td>
<td width="100%"><img src='${webimroot}/images/free.gif' width="540" height="1" border="0" alt="" /></td>
<td width="30"><img src='${webimroot}/images/free.gif' width="30" height="1" border="0" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -40,6 +40,8 @@ function expand_var($matches) {
if(!$prefix) {
if($var == 'webimroot') {
return $webimroot;
} else if($var == 'pagination') {
return generate_pagination($page['pagination']);
} else if($var == 'errors') {
if( isset($errors) && count($errors) > 0 ) {
$result = getlocal("errors.header");

View File

@ -69,8 +69,17 @@ $pparam = verifyparam( "act", "/^(redirect)$/", "default");
if( $pparam == "redirect" ) {
$found = get_operators();
setup_pagination($found);
$page['params'] = array('thread' => $threadid, 'token' => $token);
require('../view/redirect.php');
$agent_list = "";
$params = array('thread' => $threadid, 'token' => $token);
for( $indagent = 0; $indagent < count($page['pagination.items']); $indagent += 1 ) {
$agent = $page['pagination.items'][$indagent];
$params['nextAgent'] = $agent['operatorid'];
$agent_list .= "<li><a href=\"".add_params($webimroot."/operator/redirect.php",$params)."\" title=\"".topage($agent['vclocalename'])."\">".topage($agent['vclocalename'])."</a>";
}
$page['pagination_list'] = $agent_list;
expand("../design/default/redirect.tpl");
} else {
expand("../design/default/chat.tpl");
}

View File

@ -15,6 +15,7 @@
require_once('../libs/common.php');
require_once('../libs/operator.php');
require_once('../libs/chat.php');
require_once('../libs/expand.php');
$operator = check_login();
@ -49,11 +50,10 @@ if( $nextOperator ) {
$errors[] = "Unknown operator"; // FIXME
}
start_html_output();
if( count($errors) > 0 ) {
require('../view/chat_error.php');
expand("../design/default/error.tpl");
} else {
require('../view/redirected.php');
expand("../design/default/redirected.tpl");
}
?>

View File

@ -1,148 +0,0 @@
<?php
/*
* This file is part of Web Instant Messenger project.
*
* Copyright (c) 2005-2008 Web Messenger Community
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Gryaznov - initial API and implementation
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><?php echo getlocal("chat.window.title.agent") ?></title>
<link rel="shortcut icon" href="<?php echo $webimroot ?>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<?php echo $webimroot ?>/chat.css" />
</head>
<body bgcolor="#FFFFFF" background="<?php echo $webimroot ?>/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="90"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="50%" height="90" class="window"><h1><?php echo getlocal("chat.redirect.title") ?></h1></td>
<td width="50%" align="right" valign="bottom" class="window">
<h2><?php echo getlocal("chat.redirect.choose_operator") ?></h2>
<img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="5" border="0" alt="" /><br>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="100%"></td>
<td>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="15"><img src='<?php echo $webimroot ?>/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
<td width="100%" background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td width="15"><img src='<?php echo $webimroot ?>/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
<tr>
<td height="100%" bgcolor="#FED840"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="33%" valign="top" class="window">
<?php for( $indagent = 0; $indagent < count($page['pagination.items']); $indagent += 3 ) { $agent = $page['pagination.items'][$indagent]; ?>
<?php $page['params']['nextAgent'] = $agent['operatorid']; ?>
<a href="<?php echo add_params($webimroot."/operator/redirect.php",$page['params']) ?>" title="<?php echo topage($agent['vclocalename']) ?>"><?php echo topage($agent['vclocalename']) ?></a><br>
<img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="5" border="0" alt="" /><br>
<?php } ?>
</td>
<td width="50" background="<?php echo $webimroot ?>/images/textdiv.gif" valign="top">
<img src='<?php echo $webimroot ?>/images/textdiv.gif' width="50" height="1" border="0" alt="" /></td>
<td width="33%" valign="top" class="window">
<?php for( $indagent = 1; $indagent < count($page['pagination.items']); $indagent += 3 ) { $agent = $page['pagination.items'][$indagent]; ?>
<?php $page['params']['nextAgent'] = $agent['operatorid']; ?>
<a href="<?php echo add_params($webimroot."/operator/redirect.php",$page['params']) ?>" title="<?php echo topage($agent['vclocalename']) ?>"><?php echo topage($agent['vclocalename']) ?></a><br>
<img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="5" border="0" alt="" /><br>
<?php } ?>
</td>
<td width="50" background="<?php echo $webimroot ?>/images/textdiv.gif" valign="top">
<img src='<?php echo $webimroot ?>/images/textdiv.gif' width="50" height="1" border="0" alt="" /></td>
<td width="33%" valign="top" class="window">
<?php for( $indagent = 2; $indagent < count($page['pagination.items']); $indagent += 3 ) { $agent = $page['pagination.items'][$indagent]; ?>
<?php $page['params']['nextAgent'] = $agent['operatorid']; ?>
<a href="<?php echo add_params($webimroot."/operator/redirect.php",$page['params']) ?>" title="<?php echo topage($agent['vclocalename']) ?>"><?php echo topage($agent['vclocalename']) ?></a><br>
<img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="5" border="0" alt="" /><br>
<?php } ?>
</td>
</tr>
</table>
</td>
<td bgcolor="#E8A400"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><img src='<?php echo $webimroot ?>/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
<td background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td><img src='<?php echo $webimroot ?>/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="90"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="50%" align="left">
<?php echo generate_pagination($page['pagination']) ?>
</td>
<td width="50%" align="right">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="javascript:window.back();" title="<?php echo getlocal("chat.redirect.back") ?>"><img src='<?php echo $webimroot ?>/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
<td width="5"></td>
<td class="button"><a href="javascript:window.back();" title="<?php echo getlocal("chat.redirect.back") ?>"><?php echo getlocal("chat.redirect.back") ?></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td width="30"><img src='<?php echo $webimroot ?>/images/free.gif' width="30" height="1" border="0" alt="" /></td>
<td width="100%"><img src='<?php echo $webimroot ?>/images/free.gif' width="540" height="1" border="0" alt="" /></td>
<td width="30"><img src='<?php echo $webimroot ?>/images/free.gif' width="30" height="1" border="0" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -1,103 +0,0 @@
<?php
/*
* This file is part of Web Instant Messenger project.
*
* Copyright (c) 2005-2008 Web Messenger Community
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Evgeny Gryaznov - initial API and implementation
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><?php echo getlocal("chat.window.title.agent") ?></title>
<link rel="shortcut icon" href="<?php echo $webimroot ?>/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<?php echo $webimroot ?>/chat.css" />
</head>
<body bgcolor="#FFFFFF" background="<?php echo $webimroot ?>/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="75"></td>
<td class="window">
<h1><?php echo getlocal("chat.redirected.title") ?></h1>
</td>
<td></td>
</tr>
<tr>
<td height="100%"></td>
<td>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="15"><img src='<?php echo $webimroot ?>/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
<td width="100%" background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td width="15"><img src='<?php echo $webimroot ?>/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
<tr>
<td height="100%" bgcolor="#FED840"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy">
<?php echo getlocal2("chat.redirected.content",array($page['nextAgent'])) ?><br/>
<a href="javascript:window.close();"><?php echo getlocal("chat.redirected.closewindow") ?></a>
</td>
<td bgcolor="#E8A400"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><img src='<?php echo $webimroot ?>/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
<td background="<?php echo $webimroot ?>/images/winbg.gif" class="bgcy"><img src='<?php echo $webimroot ?>/images/free.gif' width="1" height="1" border="0" alt="" /></td>
<td><img src='<?php echo $webimroot ?>/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height="70"></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="100%" align="right">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="javascript:window.close();" title="<?php echo getlocal("chat.redirected.close") ?>"><img src='<?php echo $webimroot ?>/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
<td width="5"></td>
<td class="button"><a href="javascript:window.close();" title="<?php echo getlocal("chat.redirected.close") ?>"><?php echo getlocal("chat.redirected.close") ?></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td width="30"><img src='<?php echo $webimroot ?>/images/free.gif' width="30" height="1" border="0" alt="" /></td>
<td width="100%"><img src='<?php echo $webimroot ?>/images/free.gif' width="540" height="1" border="0" alt="" /></td>
<td width="30"><img src='<?php echo $webimroot ?>/images/free.gif' width="30" height="1" border="0" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>