mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 10:31:07 +03:00 
			
		
		
		
	performance options
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@596 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									19a5576539
								
							
						
					
					
						commit
						9aa07e48de
					
				| @ -31,7 +31,8 @@ function setup_settings_tabs($active) { | ||||
| 	$page['tabs'] = array( | ||||
| 		getlocal("page_settings.tab.main") => $active != 0 ? "$webimroot/operator/settings.php" : "", | ||||
| 		getlocal("page_settings.tab.features") => $active != 1 ? "$webimroot/operator/features.php" : "", | ||||
| 		getlocal("page_settings.tab.themes") => $active != 2 ? "$webimroot/operator/themes.php" : "", | ||||
| 		getlocal("page_settings.tab.performance") => $active != 2 ? "$webimroot/operator/performance.php" : "", | ||||
| 		getlocal("page_settings.tab.themes") => $active != 3 ? "$webimroot/operator/themes.php" : "", | ||||
| 	); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -326,6 +326,7 @@ page_settings.intro=Specify options affecting chat window and common system beha | ||||
| page_settings.tab.features=Optional Services | ||||
| page_settings.tab.main=General | ||||
| page_settings.tab.themes=Themes preview | ||||
| page_settings.tab.performance=Performance | ||||
| pending.menu.hide=Hide menu >> | ||||
| pending.menu.show=Show menu >> | ||||
| pending.popup_notification=New visitor is waiting for an answer. | ||||
| @ -389,6 +390,12 @@ settings.enablestatistics.description=Adds page with messenger usage reports. | ||||
| settings.enablestatistics=Enable "Statistics" | ||||
| settings.forcessl.description=Show chats only through https connection | ||||
| settings.forcessl=Force all chats to be secure | ||||
| settings.frequencychat.description=Specify the poll interval in seconds. Default is 2 seconds. | ||||
| settings.frequencychat=Visitor's chat refresh time | ||||
| settings.frequencyoldchat.description=Old browsers need to refresh the whole page to get messages. Default is 7 seconds. | ||||
| settings.frequencyoldchat=Page refresh time for old browsers | ||||
| settings.frequencyoperator.description=Specify the poll interval in seconds. Default is 2 seconds. | ||||
| settings.frequencyoperator=Operator's chat refresh time | ||||
| settings.geolink.description=Each IP becomes a link opening in new window. {ip} is substituted with a real ip.   | ||||
| settings.geolink=Link to an external geolocation service | ||||
| settings.geolinkparams.description=Window size and toolbars hiding  | ||||
| @ -402,6 +409,8 @@ settings.logo=Your company logo | ||||
| settings.no.title=Please enter your company title | ||||
| settings.onehostconnections.description=0 allows any number of connections | ||||
| settings.onehostconnections=Max number of threads from one address | ||||
| settings.onlinetimeout.description=Set the number of seconds to show operator as online. Default is 30 seconds. | ||||
| settings.onlinetimeout=Operator online time threshold | ||||
| settings.popup_notification.description=Small dialog appears to attract your attention.   | ||||
| settings.popup_notification=Enable "Popup dialog notification of the new visitor". | ||||
| settings.saved=Changes saved | ||||
|  | ||||
							
								
								
									
										74
									
								
								src/messenger/webim/operator/performance.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								src/messenger/webim/operator/performance.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,74 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Mibew Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2009 Mibew 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 | ||||
|  */ | ||||
| 
 | ||||
| require_once('../libs/common.php'); | ||||
| require_once('../libs/operator.php'); | ||||
| require_once('../libs/settings.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array('agentId' => ''); | ||||
| $errors = array(); | ||||
| 
 | ||||
| $options = array( | ||||
| 		'online_timeout', 'updatefrequency_operator', 'updatefrequency_chat', 'updatefrequency_oldchat'); | ||||
| 
 | ||||
| loadsettings(); | ||||
| $params = array(); | ||||
| foreach($options as $opt) { | ||||
| 	$params[$opt] = $settings[$opt]; | ||||
| } | ||||
| 
 | ||||
| if (isset($_POST['onlinetimeout'])) { | ||||
|     $params['online_timeout'] = getparam('onlinetimeout'); | ||||
|     if(!is_numeric($params['online_timeout'])) { | ||||
|     	$errors[] = wrong_field("settings.onlinetimeout"); | ||||
|     } | ||||
|      | ||||
|     $params['updatefrequency_operator'] = getparam('frequencyoperator'); | ||||
|     if(!is_numeric($params['updatefrequency_operator'])) { | ||||
|     	$errors[] = wrong_field("settings.frequencyoperator"); | ||||
|     } | ||||
|      | ||||
|     $params['updatefrequency_chat'] = getparam('frequencychat'); | ||||
|     if(!is_numeric($params['updatefrequency_chat'])) { | ||||
|     	$errors[] = wrong_field("settings.frequencychat"); | ||||
|     } | ||||
|      | ||||
|     $params['updatefrequency_oldchat'] = getparam('frequencyoldchat'); | ||||
|     if(!is_numeric($params['updatefrequency_oldchat'])) { | ||||
|     	$errors[] = wrong_field("settings.frequencyoldchat"); | ||||
|     } | ||||
|      | ||||
|     if (count($errors) == 0) { | ||||
| 		foreach($options as $opt) { | ||||
| 			$settings[$opt] = $params[$opt]; | ||||
| 		} | ||||
|     	update_settings(); | ||||
|         header("Location: $webimroot/operator/performance.php?stored"); | ||||
|         exit; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| $page['formonlinetimeout'] = $params['online_timeout']; | ||||
| $page['formfrequencyoperator'] = $params['updatefrequency_operator']; | ||||
| $page['formfrequencychat'] = $params['updatefrequency_chat']; | ||||
| $page['formfrequencyoldchat'] = $params['updatefrequency_oldchat']; | ||||
| $page['stored'] = isset($_GET['stored']); | ||||
| 
 | ||||
| prepare_menu($operator); | ||||
| setup_settings_tabs(2); | ||||
| start_html_output(); | ||||
| require('../view/performance.php'); | ||||
| ?>
 | ||||
| @ -130,6 +130,6 @@ foreach($templateList as $tpl) { | ||||
| 
 | ||||
| prepare_menu($operator); | ||||
| start_html_output(); | ||||
| setup_settings_tabs(2); | ||||
| setup_settings_tabs(3); | ||||
| require('../view/themes.php'); | ||||
| ?>
 | ||||
							
								
								
									
										102
									
								
								src/messenger/webim/view/performance.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								src/messenger/webim/view/performance.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,102 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Mibew Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2009 Mibew 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 | ||||
|  */ | ||||
| 
 | ||||
| require_once("inc_menu.php"); | ||||
| $page['title'] = getlocal("settings.title"); | ||||
| $page['menuid'] = "settings"; | ||||
| 
 | ||||
| function tpl_content() { global $page, $webimroot, $errors; | ||||
| ?>
 | ||||
| 
 | ||||
| <?php echo getlocal("page_settings.intro") ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| <?php  | ||||
| require_once('inc_errors.php'); | ||||
| ?>
 | ||||
| <?php if( $page['stored'] ) { ?>
 | ||||
| <div id="formmessage"><?php echo getlocal("settings.saved") ?></div>
 | ||||
| <?php } ?>
 | ||||
| 
 | ||||
| <form name="performance" method="post" action="<?php echo $webimroot ?>/operator/performance.php"> | ||||
| 
 | ||||
| 	<div> | ||||
| <?php if($page['tabs']) { ?>
 | ||||
| 	<ul class="tabs"> | ||||
| 
 | ||||
| <?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
 | ||||
| 	<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
 | ||||
| <?php } else { ?>
 | ||||
| 	<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
 | ||||
| 	</ul> | ||||
| <?php } ?>
 | ||||
| 	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> | ||||
| 
 | ||||
| 	<div class="fieldForm"> | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.onlinetimeout') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
| 				<input type="text" name="onlinetimeout" size="40" value="<?php echo form_value('onlinetimeout') ?>" class="formauth"/> | ||||
| 			</div> | ||||
| 			<div class="fdescr"> — <?php echo getlocal('settings.onlinetimeout.description') ?></div>
 | ||||
| 			<br clear="all"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.frequencyoperator') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
| 				<input type="text" name="frequencyoperator" size="40" value="<?php echo form_value('frequencyoperator') ?>" class="formauth"/> | ||||
| 			</div> | ||||
| 			<div class="fdescr"> — <?php echo getlocal('settings.frequencyoperator.description') ?></div>
 | ||||
| 			<br clear="all"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.frequencychat') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
| 				<input type="text" name="frequencychat" size="40" value="<?php echo form_value('frequencychat') ?>" class="formauth"/> | ||||
| 			</div> | ||||
| 			<div class="fdescr"> — <?php echo getlocal('settings.frequencychat.description') ?></div>
 | ||||
| 			<br clear="all"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.frequencyoldchat') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
| 				<input type="text" name="frequencyoldchat" size="40" value="<?php echo form_value('frequencyoldchat') ?>" class="formauth"/> | ||||
| 			</div> | ||||
| 			<div class="fdescr"> — <?php echo getlocal('settings.frequencyoldchat.description') ?></div>
 | ||||
| 			<br clear="all"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="fbutton"> | ||||
| 			<input type="image" name="save" value="" src='<?php echo $webimroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/> | ||||
| 		</div> | ||||
| 
 | ||||
| 	</div> | ||||
| 	 | ||||
| 	</div><div class="formbottom"><div class="formbottomi"></div></div></div> | ||||
| 	</div>		 | ||||
| 	 | ||||
| 	<div class="asterisk"> | ||||
| 		<?php echo getlocal("common.asterisk_explanation") ?>
 | ||||
| 	</div> | ||||
| 
 | ||||
| </form> | ||||
| 
 | ||||
| <?php  | ||||
| } /* content */ | ||||
| 
 | ||||
| require_once('inc_main.php'); | ||||
| ?>
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user