mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 10:31:07 +03:00 
			
		
		
		
	Max connections from one thread option
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@457 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									96ee523783
								
							
						
					
					
						commit
						a0ed8dfa1a
					
				| @ -527,6 +527,7 @@ $settings = array( | ||||
| 	'geolinkparams' => 'width=440,height=100,toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1', | ||||
| 	'online_timeout' => 30,		/* Timeout (in seconds) when online operator becomes offline */ | ||||
| 	'max_uploaded_file_size' => 100000, | ||||
| 	'max_connections_from_one_host' => 10, | ||||
| 
 | ||||
| 	'email' => '',				/* inbox for left messages */ | ||||
| 	'left_messages_locale' => $home_locale, | ||||
|  | ||||
| @ -365,6 +365,8 @@ settings.host=URL of your website | ||||
| settings.logo.description=Enter http address of your company logo | ||||
| 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.saved=Changes saved | ||||
| settings.survey.askgroup.description=Show/hide department selection field in the survey | ||||
| settings.survey.askgroup=Allows visitor to choose department/group  | ||||
| @ -378,6 +380,7 @@ settings.usercanchangename=Allows users to change their names | ||||
| settings.usernamepattern.description=How to build visitor identifying string from {name}, {id} or {addr}. Default: {name} | ||||
| settings.usernamepattern=Visitor's identifier | ||||
| settings.wrong.email=Enter proper email address | ||||
| settings.wrong.onehostconnections="Max number of threads" field should be number | ||||
| site.title=openwebim.org | ||||
| site.url=http://openwebim.org | ||||
| statistics.dates=Select dates | ||||
|  | ||||
| @ -34,7 +34,7 @@ if($handle = opendir($stylesfolder)) { | ||||
| 
 | ||||
| $options = array( | ||||
| 		'email', 'title', 'logo', 'hosturl', 'usernamepattern', | ||||
| 		'chatstyle', 'chattitle', 'geolink', 'geolinkparams'); | ||||
| 		'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'max_connections_from_one_host'); | ||||
| 
 | ||||
| loadsettings(); | ||||
| $params = array(); | ||||
| @ -51,6 +51,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { | ||||
|     $params['chattitle'] = getparam('chattitle'); | ||||
|     $params['geolink'] = getparam('geolink'); | ||||
| 	$params['geolinkparams'] = getparam('geolinkparams'); | ||||
| 	$params['max_connections_from_one_host'] = trim(getparam('onehostconnections')); | ||||
| 
 | ||||
| 	$params['chatstyle'] = verifyparam("chatstyle","/^\w+$/", $params['chatstyle']); | ||||
| 	if(!in_array($params['chatstyle'], $stylelist)) { | ||||
| @ -60,6 +61,10 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { | ||||
|     if($params['email'] && !is_valid_email($params['email'])) { | ||||
|         $errors[] = getlocal("settings.wrong.email"); | ||||
|     } | ||||
|      | ||||
|     if(!preg_match("/^\d+$/",$params['max_connections_from_one_host'])) { | ||||
|         $errors[] = getlocal("settings.wrong.onehostconnections"); | ||||
| 	} | ||||
| 
 | ||||
|     if($params['geolinkparams']) { | ||||
|     	foreach(split(",", $params['geolinkparams']) as $oneparam) { | ||||
| @ -88,6 +93,7 @@ $page['formgeolinkparams'] = topage($params['geolinkparams']); | ||||
| $page['formusernamepattern'] = topage($params['usernamepattern']); | ||||
| $page['formchatstyle'] = $params['chatstyle']; | ||||
| $page['formchattitle'] = topage($params['chattitle']); | ||||
| $page['formonehostconnections'] = $params['max_connections_from_one_host']; | ||||
| $page['availableStyles'] = $stylelist; | ||||
| $page['stored'] = isset($_GET['stored']); | ||||
| 
 | ||||
|  | ||||
| @ -116,6 +116,15 @@ require_once('inc_errors.php'); | ||||
| 			<br clear="left"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.onehostconnections') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
| 				<input type="text" name="onehostconnections" size="10" value="<?php echo form_value('onehostconnections') ?>" class="formauth"/> | ||||
| 			</div> | ||||
| 			<div class="fdescr"> — <?php echo getlocal('settings.onehostconnections.description') ?></div>
 | ||||
| 			<br clear="left"/> | ||||
| 		</div> | ||||
| 
 | ||||
| 		<div class="field"> | ||||
| 			<div class="flabel"><?php echo getlocal('settings.chatstyle') ?></div>
 | ||||
| 			<div class="fvalue"> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user