2008-11-27 03:55:54 +03:00
|
|
|
<?php
|
|
|
|
/*
|
2009-06-04 02:44:32 +04:00
|
|
|
* This file is part of Mibew Messenger project.
|
2008-11-27 03:55:54 +03:00
|
|
|
*
|
2009-06-04 02:44:32 +04:00
|
|
|
* Copyright (c) 2005-2009 Mibew Messenger Community
|
2008-11-27 03:55:54 +03:00
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
require_once("inc_menu.php");
|
|
|
|
$page['title'] = getlocal("page.translate.title");
|
|
|
|
$page['menuid'] = "translate";
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
function tpl_content() { global $page, $webimroot;
|
|
|
|
?>
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php echo getlocal("page.translate.descr") ?>
|
|
|
|
<br />
|
|
|
|
<br />
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<form name="translateForm" method="get" action="<?php echo $webimroot ?>/operator/translate.php">
|
|
|
|
|
|
|
|
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<div class="packedFormField">
|
|
|
|
<?php echo getlocal("translate.direction") ?><br/>
|
|
|
|
<select name="source" onchange="this.form.submit();"><?php
|
|
|
|
foreach($page['availableLocales'] as $k) {
|
|
|
|
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("source") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
|
|
|
|
} ?></select>
|
|
|
|
=>
|
|
|
|
<select name="target" onchange="this.form.submit();"><?php
|
|
|
|
foreach($page['availableLocales'] as $k) {
|
|
|
|
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("target") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
|
|
|
|
} ?></select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="packedFormField">
|
|
|
|
<?php echo getlocal("translate.sort") ?><br/>
|
|
|
|
<select name="sort" onchange="this.form.submit();"><?php
|
|
|
|
foreach($page['availableOrders'] as $k) {
|
|
|
|
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("sort") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
|
|
|
|
} ?></select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="packedFormField">
|
|
|
|
<?php echo getlocal("translate.show") ?><br/>
|
|
|
|
<select name="show" onchange="this.form.submit();"><?php
|
|
|
|
foreach($page['showOptions'] as $k) {
|
|
|
|
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("show") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
|
|
|
|
} ?></select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br clear="all"/>
|
|
|
|
|
|
|
|
</div><div class="formbottom"><div class="formbottomi"></div></div></div>
|
|
|
|
</form>
|
|
|
|
<br/>
|
2008-11-27 03:55:54 +03:00
|
|
|
|
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php
|
|
|
|
if( $page['pagination'] ) {
|
|
|
|
if( $page['pagination.items'] ) {
|
|
|
|
echo generate_pagination($page['pagination'], false);
|
|
|
|
}
|
|
|
|
?>
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<table class="translate">
|
|
|
|
<thead>
|
|
|
|
<tr class="header"><th>
|
|
|
|
Key
|
|
|
|
</th><th>
|
|
|
|
<?php echo topage($page['title1']) ?>
|
|
|
|
</th><th>
|
|
|
|
<?php echo topage($page['title2']) ?>
|
|
|
|
</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
if( $page['pagination.items'] ) {
|
|
|
|
foreach( $page['pagination.items'] as $localstr ) { ?>
|
2009-03-08 23:53:16 +03:00
|
|
|
<tr>
|
2009-03-16 03:16:22 +03:00
|
|
|
<td>
|
|
|
|
<a href="<?php echo $webimroot ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&target=<?php echo $page['lang2'] ?>&key=<?php echo $localstr['id'] ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo $webimroot ?>/operator/translate.php?source=<?php echo $page['lang1'] ?>&target=<?php echo $page['lang2'] ?>&key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo topage($localstr['id']) ?></a>
|
2008-11-27 03:55:54 +03:00
|
|
|
</td>
|
2009-03-08 23:53:16 +03:00
|
|
|
<td>
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php echo topage($localstr['l1']) ?>
|
2009-03-08 23:53:16 +03:00
|
|
|
</td>
|
|
|
|
<td>
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php echo topage($localstr['l2']) ?>
|
2009-03-08 23:53:16 +03:00
|
|
|
</td>
|
2008-11-27 03:55:54 +03:00
|
|
|
</tr>
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td colspan="3">
|
2009-03-20 04:58:21 +03:00
|
|
|
<?php echo getlocal("tag.pagination.no_items") ?>
|
2009-03-16 03:16:22 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
2008-11-27 03:55:54 +03:00
|
|
|
</table>
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php
|
|
|
|
if( $page['pagination.items'] ) {
|
|
|
|
echo "<br/>";
|
|
|
|
echo generate_pagination($page['pagination']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
<?php
|
|
|
|
} /* content */
|
2008-11-27 03:55:54 +03:00
|
|
|
|
2009-03-16 03:16:22 +03:00
|
|
|
require_once('inc_main.php');
|
|
|
|
?>
|