2007-10-10 19:15:47 +04:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* This file is part of Web Instant Messenger project.
|
|
|
|
*
|
2008-05-06 01:08:57 +04:00
|
|
|
* Copyright (c) 2005-2008 Internet Services Ltd.
|
2007-10-10 19:15:47 +04: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
|
|
|
|
*/
|
|
|
|
|
2008-06-05 01:36:54 +04:00
|
|
|
require_once('libs/common.php');
|
|
|
|
require_once('libs/operator.php');
|
2007-10-10 19:15:47 +04:00
|
|
|
|
|
|
|
$image = verifyparam("image","/^\w+$/", "webim");
|
2007-10-17 15:32:50 +04:00
|
|
|
$lang = verifyparam("lang", "/^[\w-]{2,5}$/", "");
|
2007-10-10 19:15:47 +04:00
|
|
|
if( !$lang || !in_array($lang,$available_locales) )
|
|
|
|
$lang = $current_locale;
|
|
|
|
|
|
|
|
$image_postfix = has_online_operators() ? "on" : "off";
|
2008-05-06 01:08:57 +04:00
|
|
|
$filename = "locales/${lang}/button/${image}_${image_postfix}.gif";
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2008-05-06 01:08:57 +04:00
|
|
|
$fp = fopen($filename, 'rb') or die("no image");
|
2007-10-10 19:15:47 +04:00
|
|
|
header("Content-Type: image/gif");
|
2008-05-06 01:08:57 +04:00
|
|
|
header("Content-Length: ".filesize($filename));
|
2007-10-10 19:15:47 +04:00
|
|
|
fpassthru($fp);
|
|
|
|
exit;
|
2007-05-10 21:31:10 +04:00
|
|
|
?>
|