Clean up repository
							
								
								
									
										9
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @ -1,9 +0,0 @@ | ||||
| bin | ||||
| src/messenger/.idea/workspace.xml | ||||
| src/messenger/webim/install/package | ||||
| src/messenger/absent_* | ||||
| src/messenger/release* | ||||
| src/mibewjava/.idea/workspace.xml | ||||
| src/mibewjava/org.mibew.notifier/resources/ | ||||
| mibew.ini | ||||
| .DS_Store | ||||
| Before Width: | Height: | Size: 348 B | 
| Before Width: | Height: | Size: 796 B | 
| Before Width: | Height: | Size: 1.9 KiB | 
| @ -1 +0,0 @@ | ||||
| messenger | ||||
| @ -1,31 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="ProjectCodeStyleSettingsManager"> | ||||
|     <option name="PER_PROJECT_SETTINGS"> | ||||
|       <value> | ||||
|         <option name="OTHER_INDENT_OPTIONS"> | ||||
|           <value> | ||||
|             <option name="INDENT_SIZE" value="4" /> | ||||
|             <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|             <option name="TAB_SIZE" value="4" /> | ||||
|             <option name="USE_TAB_CHARACTER" value="true" /> | ||||
|             <option name="SMART_TABS" value="false" /> | ||||
|             <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|             <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|             <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|           </value> | ||||
|         </option> | ||||
|         <XML> | ||||
|           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | ||||
|         </XML> | ||||
|         <codeStyleSettings language="PHP"> | ||||
|           <indentOptions> | ||||
|             <option name="USE_TAB_CHARACTER" value="true" /> | ||||
|           </indentOptions> | ||||
|         </codeStyleSettings> | ||||
|       </value> | ||||
|     </option> | ||||
|     <option name="USE_PER_PROJECT_SETTINGS" value="true" /> | ||||
|   </component> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,13 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"> | ||||
|     <file url="file://$PROJECT_DIR$" charset="UTF-8" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/be/properties" charset="windows-1251" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/bg/properties" charset="windows-1251" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/ca/properties" charset="ISO-8859-1" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/ru/properties" charset="windows-1251" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/sp/properties" charset="ISO-8859-1" /> | ||||
|     <file url="file://$PROJECT_DIR$/webim/locales/ua/properties" charset="windows-1251" /> | ||||
|   </component> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,11 +0,0 @@ | ||||
| <component name="InspectionProjectProfileManager"> | ||||
|   <profile version="1.0" is_locked="false"> | ||||
|     <option name="myName" value="Project Default" /> | ||||
|     <option name="myLocal" value="false" /> | ||||
|     <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false"> | ||||
|       <option name="processCode" value="true" /> | ||||
|       <option name="processLiterals" value="true" /> | ||||
|       <option name="processComments" value="true" /> | ||||
|     </inspection_tool> | ||||
|   </profile> | ||||
| </component> | ||||
| @ -1,7 +0,0 @@ | ||||
| <component name="InspectionProjectProfileManager"> | ||||
|   <settings> | ||||
|     <option name="PROJECT_PROFILE" value="Project Default" /> | ||||
|     <option name="USE_PROJECT_PROFILE" value="true" /> | ||||
|     <version value="1.0" /> | ||||
|   </settings> | ||||
| </component> | ||||
| @ -1,15 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <module type="WEB_MODULE" version="4"> | ||||
|   <component name="NewModuleRootManager"> | ||||
|     <content url="file://$MODULE_DIR$" /> | ||||
|     <orderEntry type="inheritedJdk" /> | ||||
|     <orderEntry type="sourceFolder" forTests="false" /> | ||||
|     <orderEntry type="module-library"> | ||||
|       <library name="PHP"> | ||||
|         <CLASSES /> | ||||
|         <SOURCES /> | ||||
|       </library> | ||||
|     </orderEntry> | ||||
|   </component> | ||||
| </module> | ||||
| 
 | ||||
| @ -1,8 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="ProjectResources"> | ||||
|     <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype> | ||||
|   </component> | ||||
|   <component name="ProjectRootManager" version="2" /> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,9 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="ProjectModuleManager"> | ||||
|     <modules> | ||||
|       <module fileurl="file://$PROJECT_DIR$/.idea/messenger.iml" filepath="$PROJECT_DIR$/.idea/messenger.iml" /> | ||||
|     </modules> | ||||
|   </component> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,80 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="CodeStyleSettingsManager"> | ||||
|     <option name="PER_PROJECT_SETTINGS"> | ||||
|       <value> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="js"> | ||||
|           <option name="INDENT_SIZE" value="4" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="jsp"> | ||||
|           <option name="INDENT_SIZE" value="4" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="php"> | ||||
|           <option name="INDENT_SIZE" value="4" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="sass"> | ||||
|           <option name="INDENT_SIZE" value="2" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="sql"> | ||||
|           <option name="INDENT_SIZE" value="2" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="xml"> | ||||
|           <option name="INDENT_SIZE" value="4" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|         <ADDITIONAL_INDENT_OPTIONS fileType="yml"> | ||||
|           <option name="INDENT_SIZE" value="2" /> | ||||
|           <option name="CONTINUATION_INDENT_SIZE" value="8" /> | ||||
|           <option name="TAB_SIZE" value="4" /> | ||||
|           <option name="USE_TAB_CHARACTER" value="false" /> | ||||
|           <option name="SMART_TABS" value="false" /> | ||||
|           <option name="LABEL_INDENT_SIZE" value="0" /> | ||||
|           <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | ||||
|           <option name="USE_RELATIVE_INDENTS" value="false" /> | ||||
|         </ADDITIONAL_INDENT_OPTIONS> | ||||
|       </value> | ||||
|     </option> | ||||
|   </component> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,5 +0,0 @@ | ||||
| <component name="DependencyValidationManager"> | ||||
|   <state> | ||||
|     <option name="SKIP_IMPORT_STATEMENTS" value="false" /> | ||||
|   </state> | ||||
| </component> | ||||
| @ -1,7 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project version="4"> | ||||
|   <component name="VcsDirectoryMappings"> | ||||
|     <mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> | ||||
|   </component> | ||||
| </project> | ||||
| 
 | ||||
| @ -1,56 +0,0 @@ | ||||
| #!/usr/bin/perl | ||||
| 
 | ||||
| sub read_transl($) { | ||||
| 	my($from) = @_; | ||||
| 	my %translation = (); | ||||
| 	open(IN, "webim/locales/$from/properties"); | ||||
| 	while(<IN>) { | ||||
| 		chomp; | ||||
| 		if(/^([\w\.]+)=(.*)$/) { | ||||
| 			if($1 ne "encoding" && $1 ne "output_charset" && $1 ne "output_encoding") { | ||||
| 				$translation{$1} = $2; | ||||
| 			} | ||||
| 		} else { | ||||
| 			die "wrong line in $from: $_\n"; | ||||
| 		} | ||||
| 	} | ||||
| 	close(IN); | ||||
| 	return %translation; | ||||
| } | ||||
| 
 | ||||
| %tr_en = read_transl("en"); | ||||
| 
 | ||||
| @all_keys = keys %tr_en; | ||||
| 
 | ||||
| sub check_transl($%) { | ||||
| 	my($name,%tr) = @_; | ||||
| 	print "checking $name...\n"; | ||||
| 	my @totransl = (); | ||||
| 	for $key (@all_keys) { | ||||
| 		unless(exists $tr{$key}) { | ||||
| 			push @totransl, "$key=".$tr_en{$key}; | ||||
| 		} | ||||
| 	} | ||||
| 	for $key(keys %tr) { | ||||
| 		unless(exists $tr_en{$key}) { | ||||
| 			print "unknown key in $name: $key\n"; | ||||
| 		} | ||||
| 	} | ||||
| 	if($#totransl >= 0) { | ||||
| 		print "@{[$#totransl+1]} lines absent in locales/$name/properties\n"; | ||||
| 		open(OUT, "> absent_$name"); | ||||
| 		for(sort @totransl) { | ||||
| 			print OUT "$_\n"; | ||||
| 		} | ||||
| 		close(OUT); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| check_transl("ru", read_transl("ru")); | ||||
| check_transl("fr", read_transl("fr")); | ||||
| check_transl("de", read_transl("de")); | ||||
| check_transl("sp", read_transl("sp")); | ||||
| check_transl("it", read_transl("it")); | ||||
| check_transl("pl", read_transl("pl")); | ||||
| check_transl("zh-tw", read_transl("zh-tw")); | ||||
| 
 | ||||
| @ -1,5 +0,0 @@ | ||||
| #!/bin/sh | ||||
| 
 | ||||
| cd webim/js/source | ||||
| ant | ||||
| rm -rf bin | ||||
| @ -1,245 +0,0 @@ | ||||
| #!/usr/bin/perl | ||||
| 
 | ||||
| use Digest::MD5 qw(md5 md5_hex md5_base64); | ||||
| 
 | ||||
| @rules = ( | ||||
| 	["redirect(ed)?\\.tpl", 1], | ||||
| 	["\\.tpl", 0], | ||||
| 	 | ||||
| 	["view/license.php", 0], | ||||
| 	["view/themes.php", 2], | ||||
| 	["view/translate.php", 2], | ||||
| 	["view/translatelist.php", 2], | ||||
| 	["view/settings.php", 2], | ||||
| 	["view/updates.php", 2], | ||||
| 	["view/features.php", 2], | ||||
| 	["view/performance.php", 2], | ||||
| 	["view/avatar.php", 2], | ||||
| 	["view/permissions.php", 2], | ||||
| 	["view/agent.php", 2], | ||||
| 	["view/agents.php", 2], | ||||
| 	["view/group.php", 2], | ||||
| 	["view/groupmembers.php", 2], | ||||
| 	["view/groups.php", 2], | ||||
| 	["view/operator_groups.php", 2], | ||||
| 	["view/gen_button.php", 2], | ||||
| 	["view/install_err.php", 2], | ||||
| 	["view/install_index.php", 2], | ||||
| 	["view/.*\\.php", 1], | ||||
| 	 | ||||
| 	["install/.*\\.php", 2], | ||||
| 	 | ||||
| 	["operator/themes.php", 2], | ||||
| 	["operator/translate.php", 2], | ||||
| 	["operator/settings.php", 2], | ||||
| 	["operator/updates.php", 2], | ||||
| 	["operator/features.php", 2], | ||||
| 	["operator/performance.php", 2], | ||||
| 	["operator/avatar.php", 2], | ||||
| 	["operator/permissions.php", 2], | ||||
| 	["operator/operator.php", 2], | ||||
| 	["operator/operators.php", 2], | ||||
| 	["operator/group.php", 2], | ||||
| 	["operator/groupmembers.php", 2], | ||||
| 	["operator/groups.php", 2], | ||||
| 	["operator/opgroups.php", 2], | ||||
| 	["operator/getcode.php", 2], | ||||
| 	["operator/.*\\.php", 1], | ||||
| 	 | ||||
| 	["webim/client.php", 0], | ||||
| 	["webim/leavemessage.php", 0], | ||||
| 	["webim/captcha.php", 0], | ||||
| 	["webim/license.php", 0], | ||||
| 	["webim/mail.php", 0],	 | ||||
| 
 | ||||
| 	["libs/operator_settings.php", 2], | ||||
| 	["webim/libs/chat.php", 0], | ||||
| 	["libs/pagination.php", 1], | ||||
| 	["libs/settings.php", 2], | ||||
| 	["libs/groups.php", 2], | ||||
| 	["libs/demothread.php", 2], | ||||
| 
 | ||||
| 	["webim/thread.php", 0], | ||||
| 	["webim/b.php", 0], | ||||
| 	["webim/button.php", 0], | ||||
| 	["webim/index.php", 0], | ||||
| 
 | ||||
| 	["webim/libs/.*\\.php", 1], | ||||
| ); | ||||
| 
 | ||||
| %messagekeys = ( | ||||
| 	"localeid" => 0, | ||||
| 	"output_charset" => 0, | ||||
| 	"output_encoding" => 0, | ||||
| 	"harderrors.header" => 0, | ||||
| 
 | ||||
| 	"errors.required" => 0, | ||||
| 	"errors.wrong_field" => 0,	 | ||||
| 	"errors.file.move.error" => 2, | ||||
| 	"errors.invalid.file.type" => 2, | ||||
| 	"errors.file.size.exceeded" => 2, | ||||
| 
 | ||||
| 	"permission.admin" => 1, | ||||
| 	"permission.takeover" => 1, | ||||
| 	"permission.viewthreads" => 1, | ||||
| 	 | ||||
| 	"chat.thread.state_chatting_with_agent" => 1, | ||||
| 	"chat.thread.state_closed" => 1, | ||||
| 	"chat.thread.state_loading" => 1, | ||||
| 	"chat.thread.state_wait" => 1, | ||||
| 	"chat.thread.state_wait_for_another_agent" => 1, | ||||
| 
 | ||||
| 	"clients.queue.chat" => 1, | ||||
| 	"clients.queue.prio" => 1, | ||||
| 	"clients.queue.wait" => 1, | ||||
| ); | ||||
| 
 | ||||
| 
 | ||||
| $webimPath = "webim"; | ||||
| 
 | ||||
| %urls = (); | ||||
| 
 | ||||
| %usermessages = (); | ||||
| %operatormessages = (); | ||||
| $current_level = 0; | ||||
| 
 | ||||
| sub usemsg($) { | ||||
| 	my ($m) = @_; | ||||
| 	$messagekeys{$m} = exists $messagekeys{$m} && $messagekeys{$m} < $current_level ? $messagekeys{$m} : $current_level; | ||||
| 	if($current_level == -1) { | ||||
| 		print " .. $m\n"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| sub file_content($) { | ||||
| 	my $input = $_[0]; | ||||
| 	open( IN1, "< $input" ) or die "cannot find file $input"; | ||||
| 	my $oldslash = $/; | ||||
| 	$/ = EOI; | ||||
| 	$content = <IN1>; | ||||
|     close( IN1 ); | ||||
| 	if($content =~ s/\r//g) { | ||||
| 	    open( OUT1, "> $input") or die "cannot fix $input"; | ||||
| 	    print OUT1 $content; | ||||
| 	    close(OUT1); | ||||
| 	} | ||||
| 	$/ = $oldslash; | ||||
| 	return $content; | ||||
| } | ||||
| 
 | ||||
| sub process_tpl($) { | ||||
| 	my ($filename) = @_; | ||||
| 	my $m = file_content($filename); | ||||
| 	while( $m =~ /\${msg:([\w\.]+)(,[\w\.]+)?}/g ) { | ||||
| 		usemsg($1); | ||||
| 	} | ||||
| 	while( $m =~ /\${url:([\w\.]+)(,[\w\.]+)?}/g ) { | ||||
| 		usemsg($1); | ||||
| 		$urls{"%$1"} = 1; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| sub process_php($) { | ||||
| 	my ($source) = @_; | ||||
| 	my $content = file_content($source); | ||||
| 	$content =~ s/<\?xml version=\\"1\.0\\" encoding=\\"UTF-8\\"\?>//; | ||||
| 
 | ||||
| 	while( $content =~ s/<\?(?!xml)(.*?)\?>//s ) { | ||||
| 		my $inner = $1; | ||||
| 		while($inner =~ s/(getlocal|getstring|no_field)2?_?\((.*?)[,\)]//s) { | ||||
| 			my $firstarg = $2; | ||||
| 			if( $firstarg =~ /^["']([\w\.]+)['"]$/) { | ||||
| 				usemsg($1); | ||||
| 			} elsif($firstarg =~ /^\$\w+$/ || $firstarg eq '"$var.header"' || $firstarg eq '"permission.$permid"' || $firstarg eq '$threadstate_key[$thread[\'istate\']]') { | ||||
| 				# skip | ||||
| 			} else { | ||||
| 				print "> unknown: $firstarg\n"; | ||||
| 			}  | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| sub file_checksum($) { | ||||
|     my ($source) = @_; | ||||
|     if($source =~ /\.(png|gif|jpg|ico|wav)$/ || $source =~ /config\.php$/) { | ||||
|     	return "-"; | ||||
|     } | ||||
| 
 | ||||
|     my $content = file_content($source); | ||||
|     return md5_hex($content); | ||||
| } | ||||
| 
 | ||||
| @allsources = (); | ||||
| 
 | ||||
| sub process_one($) { | ||||
| 	my($source) = @_; | ||||
| 	push @allsources, $source unless $source =~ /$webimPath\/locales/ && $source !~ /$webimPath\/locales\/(en|names)/ || $source =~ /\/package$/; | ||||
| 
 | ||||
| 	if($source !~ /\.(php|tpl)$/) { | ||||
| 		return; | ||||
| 	} | ||||
| 	 | ||||
| 	$current_level = -1; | ||||
| 
 | ||||
| 	A: foreach $rule (@rules) { | ||||
| 		my $key = $$rule[0]; | ||||
| 		if($source =~ /$key/) { | ||||
| 			$current_level = $$rule[1]; | ||||
| 			last A; | ||||
| 		} | ||||
| 	} | ||||
| 	if($current_level < 0 || $current_level > 2) { | ||||
| 		print "not detected for: $source\n"; | ||||
| 		$current_level = 0; | ||||
| 	} | ||||
| 
 | ||||
| 	if($source =~ /\.php$/) { | ||||
| 		# print "$source ($current_level)\n"; | ||||
| 		process_php($source); | ||||
| 	} elsif($source =~ /\.tpl$/) { | ||||
| 		process_tpl($source); | ||||
| 	} else { | ||||
| 		#print ". $source\n"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| sub process_files($) { | ||||
| 	my($from) = @_; | ||||
| 	opendir(DIR, $from) || die "can't opendir $from: $!"; | ||||
| 	my @content = readdir(DIR); | ||||
| 	closedir DIR; | ||||
| 
 | ||||
| 	for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess") } @content) { | ||||
| 		process_one("$from/$_"); | ||||
| 	} | ||||
| 	for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) { | ||||
| 		process_files("$from/$_"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| process_files($webimPath); | ||||
| 
 | ||||
| # fix | ||||
| $messagekeys{'page.analysis.userhistory.title'} = 1; | ||||
| $messagekeys{'errors.failed.uploading.file'} = 2; | ||||
| 
 | ||||
| 
 | ||||
| open( OUT, "> $webimPath/locales/names/level1") or die "cannot write file, $!"; | ||||
| for $key(sort grep { $messagekeys{$_} == 0 } keys %messagekeys) { | ||||
| 	print OUT "$key\n"; | ||||
| } | ||||
| close( OUT ); | ||||
| 
 | ||||
| open( OUT, "> $webimPath/locales/names/level2") or die "cannot write file, $!"; | ||||
| for $key(sort grep { $messagekeys{$_} == 1 } keys %messagekeys) { | ||||
| 	print OUT "$key\n"; | ||||
| } | ||||
| close( OUT ); | ||||
| 
 | ||||
| open( OUT, "> $webimPath/install/package") or die "cannot write file, $!"; | ||||
| for $key(sort @allsources) { | ||||
|     $digest = file_checksum($key); | ||||
|     $key =~ s/$webimPath\///; | ||||
|     print OUT "$key $digest\n"; | ||||
| } | ||||
| close( OUT ); | ||||
| @ -1,66 +0,0 @@ | ||||
| #!/usr/bin/perl | ||||
| 
 | ||||
| ################################################################## | ||||
| # Arguments | ||||
| ################################################################## | ||||
| 
 | ||||
| $targetFolder = "deploy"; | ||||
| $suffix = "167"; | ||||
| 
 | ||||
| ################################################################## | ||||
| # Copies tree into target folder, preprocess .phps | ||||
| ################################################################## | ||||
| 
 | ||||
| sub process_dir($$) { | ||||
| 	my ($from,$to) = @_; | ||||
| 	opendir(DIR, $from) || die "can't opendir $from: $!"; | ||||
|     my @content = readdir(DIR); | ||||
|     closedir DIR; | ||||
|     mkdir $to; | ||||
|      | ||||
| 	for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess" || $_ eq ".keep") } @content) { | ||||
| 		my ($source,$target) = ("$from/$_","$to/$_"); | ||||
| 
 | ||||
| 		open (IN,"$source"); | ||||
| 		binmode(IN); | ||||
| 		open (OUT,">$target"); | ||||
| 		binmode(OUT); | ||||
| 		print OUT $buffer while (read (IN,$buffer,65536)); | ||||
| 	} | ||||
| 	 | ||||
| 	for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) { | ||||
| 		process_dir("$from/$_","$to/$_"); | ||||
| 	}  | ||||
| } | ||||
| 
 | ||||
| ################################################################## | ||||
| # Main | ||||
| ################################################################## | ||||
| 
 | ||||
| `rm -rf $targetFolder`; | ||||
| die "Target folder exists: $targetFolder" if -e $targetFolder; | ||||
| 
 | ||||
| process_dir("./webim", $targetFolder); | ||||
| 
 | ||||
| `rm -rf release$suffix`; | ||||
| die "release folder exists: release$suffix" if -e "release$suffix"; | ||||
| mkdir "release$suffix"; | ||||
| 
 | ||||
| chdir "$targetFolder"; | ||||
| 
 | ||||
| `zip -r ../release$suffix/mibew${suffix}_all.zip * .htaccess`; | ||||
| 
 | ||||
| chdir "locales"; | ||||
| 
 | ||||
| foreach $locale qw ( ar be bg ca cs da de el fa fi fr he hr hu id it ka lv nl pl pt-br pt-pt ro ru sp sv th tr ua zh-cn zh-tw ) { | ||||
| 
 | ||||
|     `zip -r ../../release$suffix/mibew${suffix}_$locale.zip $locale`; | ||||
|     `rm -rf $locale`; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| chdir ".."; | ||||
| `zip -r ../release$suffix/mibew$suffix.zip * .htaccess`; | ||||
| 
 | ||||
| chdir ".."; | ||||
| `rm -rf $targetFolder`; | ||||
| @ -1,13 +0,0 @@ | ||||
| Copyright 2005-2013 the original author or authors. | ||||
| 
 | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
| 
 | ||||
|     http://www.apache.org/licenses/LICENSE-2.0 | ||||
| 
 | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| @ -1,56 +0,0 @@ | ||||
| #!/usr/bin/perl | ||||
| 
 | ||||
| $sourceFolder = "../webim"; | ||||
| 
 | ||||
| sub file_content($) { | ||||
| 	my $input = $_[0]; | ||||
| 	open( IN1, "< $input" ) or die "cannot find file $input"; | ||||
| 	$/ = EOI; | ||||
| 	$content = <IN1>; | ||||
| 	$content =~ s/\r//g; | ||||
| 	close( IN1 ); | ||||
| 	return $content; | ||||
| } | ||||
| 
 | ||||
| $php_header = file_content("header.txt"); | ||||
| $php_header =~ s/\s+$//; | ||||
| 
 | ||||
| @allfiles = (); | ||||
| 
 | ||||
| sub process_folder($) { | ||||
| 	my($from) = @_; | ||||
| 	 | ||||
| 	opendir(DIR, $from) || die "can't opendir $from: $!"; | ||||
| 	my @content = readdir(DIR); | ||||
| 	closedir DIR; | ||||
| 
 | ||||
| 	for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess") } @content) { | ||||
| 		push @allfiles, "$from/$_"; | ||||
| 	} | ||||
| 	for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) { | ||||
| 		process_folder("$from/$_"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| process_folder($sourceFolder); | ||||
| 
 | ||||
| P: for $phpfile (grep { /\.php$/ } @allfiles) { | ||||
| 	$content = file_content($phpfile); | ||||
| 	$content =~ s/\s+$//g; | ||||
| 	die "not a php: $phpfile" unless $content =~ /^<\?php\n(\/\*.*?\*\/)?/s; | ||||
| 	die "no comment in $phpfile" unless defined($1); | ||||
| 	$comment = $1; | ||||
| 	if($comment =~ /\[external\]/) { | ||||
| 		next P; | ||||
| 	}; | ||||
| 	$newcomment = "$php_header"; | ||||
| 	$newcomment =~ s/^/ * /gm; | ||||
| 	$newcomment =~ s/\s+$//gm; | ||||
| 	$newcomment = "/*\n$newcomment\n */"; | ||||
| 	 | ||||
| 	$content =~ s/^(<\?php\n)\/\*.*?\*\//$1$newcomment/s; | ||||
| 	 | ||||
|     open( OUT, "> $phpfile" ) or die "cannot write file: $phpfile\n"; | ||||
|     print OUT $content; | ||||
|     close( OUT ); | ||||
| } | ||||
| @ -1,33 +0,0 @@ | ||||
| #!/usr/bin/perl | ||||
| 
 | ||||
| sub sort_transl($) { | ||||
| 	my($from) = @_; | ||||
| 	my @translation = (); | ||||
| 	my $header = ""; | ||||
| 	open(IN, "$from"); | ||||
| 	while(<IN>) { | ||||
| 		chomp; | ||||
| 		my $curr = $_; | ||||
| 		if(/^([\w\.]+)=(.*)$/) { | ||||
| 			if($1 ne "encoding" && $1 ne "output_charset" && $1 ne "output_encoding") { | ||||
| 				push @translation, $curr; | ||||
| 			} else { | ||||
| 			    $header .= "$curr\n"; | ||||
| 			} | ||||
| 		} else { | ||||
| 			die "wrong line in $from: $curr\n"; | ||||
| 		} | ||||
| 	} | ||||
| 	close(IN); | ||||
| 	open(OUT, "> $from"); | ||||
| 	print OUT $header; | ||||
| 	for$line(sort @translation) { | ||||
| 	    print OUT "$line\n"; | ||||
| 	} | ||||
| 	close(OUT); | ||||
| } | ||||
| 
 | ||||
| die "no parameter\n" if $#ARGV < 0; | ||||
| die "doesn't exists\n" unless -e $ARGV[0]; | ||||
| 
 | ||||
| sort_transl($ARGV[0]); | ||||
| @ -1,4 +0,0 @@ | ||||
| <IfModule mod_security.c> | ||||
| SecFilterEngine Off | ||||
| SecFilterScanPOST Off | ||||
| </IfModule> | ||||
| @ -1,202 +0,0 @@ | ||||
| 
 | ||||
|                                  Apache License | ||||
|                            Version 2.0, January 2004 | ||||
|                         http://www.apache.org/licenses/ | ||||
| 
 | ||||
|    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||||
| 
 | ||||
|    1. Definitions. | ||||
| 
 | ||||
|       "License" shall mean the terms and conditions for use, reproduction, | ||||
|       and distribution as defined by Sections 1 through 9 of this document. | ||||
| 
 | ||||
|       "Licensor" shall mean the copyright owner or entity authorized by | ||||
|       the copyright owner that is granting the License. | ||||
| 
 | ||||
|       "Legal Entity" shall mean the union of the acting entity and all | ||||
|       other entities that control, are controlled by, or are under common | ||||
|       control with that entity. For the purposes of this definition, | ||||
|       "control" means (i) the power, direct or indirect, to cause the | ||||
|       direction or management of such entity, whether by contract or | ||||
|       otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||||
|       outstanding shares, or (iii) beneficial ownership of such entity. | ||||
| 
 | ||||
|       "You" (or "Your") shall mean an individual or Legal Entity | ||||
|       exercising permissions granted by this License. | ||||
| 
 | ||||
|       "Source" form shall mean the preferred form for making modifications, | ||||
|       including but not limited to software source code, documentation | ||||
|       source, and configuration files. | ||||
| 
 | ||||
|       "Object" form shall mean any form resulting from mechanical | ||||
|       transformation or translation of a Source form, including but | ||||
|       not limited to compiled object code, generated documentation, | ||||
|       and conversions to other media types. | ||||
| 
 | ||||
|       "Work" shall mean the work of authorship, whether in Source or | ||||
|       Object form, made available under the License, as indicated by a | ||||
|       copyright notice that is included in or attached to the work | ||||
|       (an example is provided in the Appendix below). | ||||
| 
 | ||||
|       "Derivative Works" shall mean any work, whether in Source or Object | ||||
|       form, that is based on (or derived from) the Work and for which the | ||||
|       editorial revisions, annotations, elaborations, or other modifications | ||||
|       represent, as a whole, an original work of authorship. For the purposes | ||||
|       of this License, Derivative Works shall not include works that remain | ||||
|       separable from, or merely link (or bind by name) to the interfaces of, | ||||
|       the Work and Derivative Works thereof. | ||||
| 
 | ||||
|       "Contribution" shall mean any work of authorship, including | ||||
|       the original version of the Work and any modifications or additions | ||||
|       to that Work or Derivative Works thereof, that is intentionally | ||||
|       submitted to Licensor for inclusion in the Work by the copyright owner | ||||
|       or by an individual or Legal Entity authorized to submit on behalf of | ||||
|       the copyright owner. For the purposes of this definition, "submitted" | ||||
|       means any form of electronic, verbal, or written communication sent | ||||
|       to the Licensor or its representatives, including but not limited to | ||||
|       communication on electronic mailing lists, source code control systems, | ||||
|       and issue tracking systems that are managed by, or on behalf of, the | ||||
|       Licensor for the purpose of discussing and improving the Work, but | ||||
|       excluding communication that is conspicuously marked or otherwise | ||||
|       designated in writing by the copyright owner as "Not a Contribution." | ||||
| 
 | ||||
|       "Contributor" shall mean Licensor and any individual or Legal Entity | ||||
|       on behalf of whom a Contribution has been received by Licensor and | ||||
|       subsequently incorporated within the Work. | ||||
| 
 | ||||
|    2. Grant of Copyright License. Subject to the terms and conditions of | ||||
|       this License, each Contributor hereby grants to You a perpetual, | ||||
|       worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||||
|       copyright license to reproduce, prepare Derivative Works of, | ||||
|       publicly display, publicly perform, sublicense, and distribute the | ||||
|       Work and such Derivative Works in Source or Object form. | ||||
| 
 | ||||
|    3. Grant of Patent License. Subject to the terms and conditions of | ||||
|       this License, each Contributor hereby grants to You a perpetual, | ||||
|       worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||||
|       (except as stated in this section) patent license to make, have made, | ||||
|       use, offer to sell, sell, import, and otherwise transfer the Work, | ||||
|       where such license applies only to those patent claims licensable | ||||
|       by such Contributor that are necessarily infringed by their | ||||
|       Contribution(s) alone or by combination of their Contribution(s) | ||||
|       with the Work to which such Contribution(s) was submitted. If You | ||||
|       institute patent litigation against any entity (including a | ||||
|       cross-claim or counterclaim in a lawsuit) alleging that the Work | ||||
|       or a Contribution incorporated within the Work constitutes direct | ||||
|       or contributory patent infringement, then any patent licenses | ||||
|       granted to You under this License for that Work shall terminate | ||||
|       as of the date such litigation is filed. | ||||
| 
 | ||||
|    4. Redistribution. You may reproduce and distribute copies of the | ||||
|       Work or Derivative Works thereof in any medium, with or without | ||||
|       modifications, and in Source or Object form, provided that You | ||||
|       meet the following conditions: | ||||
| 
 | ||||
|       (a) You must give any other recipients of the Work or | ||||
|           Derivative Works a copy of this License; and | ||||
| 
 | ||||
|       (b) You must cause any modified files to carry prominent notices | ||||
|           stating that You changed the files; and | ||||
| 
 | ||||
|       (c) You must retain, in the Source form of any Derivative Works | ||||
|           that You distribute, all copyright, patent, trademark, and | ||||
|           attribution notices from the Source form of the Work, | ||||
|           excluding those notices that do not pertain to any part of | ||||
|           the Derivative Works; and | ||||
| 
 | ||||
|       (d) If the Work includes a "NOTICE" text file as part of its | ||||
|           distribution, then any Derivative Works that You distribute must | ||||
|           include a readable copy of the attribution notices contained | ||||
|           within such NOTICE file, excluding those notices that do not | ||||
|           pertain to any part of the Derivative Works, in at least one | ||||
|           of the following places: within a NOTICE text file distributed | ||||
|           as part of the Derivative Works; within the Source form or | ||||
|           documentation, if provided along with the Derivative Works; or, | ||||
|           within a display generated by the Derivative Works, if and | ||||
|           wherever such third-party notices normally appear. The contents | ||||
|           of the NOTICE file are for informational purposes only and | ||||
|           do not modify the License. You may add Your own attribution | ||||
|           notices within Derivative Works that You distribute, alongside | ||||
|           or as an addendum to the NOTICE text from the Work, provided | ||||
|           that such additional attribution notices cannot be construed | ||||
|           as modifying the License. | ||||
| 
 | ||||
|       You may add Your own copyright statement to Your modifications and | ||||
|       may provide additional or different license terms and conditions | ||||
|       for use, reproduction, or distribution of Your modifications, or | ||||
|       for any such Derivative Works as a whole, provided Your use, | ||||
|       reproduction, and distribution of the Work otherwise complies with | ||||
|       the conditions stated in this License. | ||||
| 
 | ||||
|    5. Submission of Contributions. Unless You explicitly state otherwise, | ||||
|       any Contribution intentionally submitted for inclusion in the Work | ||||
|       by You to the Licensor shall be under the terms and conditions of | ||||
|       this License, without any additional terms or conditions. | ||||
|       Notwithstanding the above, nothing herein shall supersede or modify | ||||
|       the terms of any separate license agreement you may have executed | ||||
|       with Licensor regarding such Contributions. | ||||
| 
 | ||||
|    6. Trademarks. This License does not grant permission to use the trade | ||||
|       names, trademarks, service marks, or product names of the Licensor, | ||||
|       except as required for reasonable and customary use in describing the | ||||
|       origin of the Work and reproducing the content of the NOTICE file. | ||||
| 
 | ||||
|    7. Disclaimer of Warranty. Unless required by applicable law or | ||||
|       agreed to in writing, Licensor provides the Work (and each | ||||
|       Contributor provides its Contributions) on an "AS IS" BASIS, | ||||
|       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||||
|       implied, including, without limitation, any warranties or conditions | ||||
|       of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||||
|       PARTICULAR PURPOSE. You are solely responsible for determining the | ||||
|       appropriateness of using or redistributing the Work and assume any | ||||
|       risks associated with Your exercise of permissions under this License. | ||||
| 
 | ||||
|    8. Limitation of Liability. In no event and under no legal theory, | ||||
|       whether in tort (including negligence), contract, or otherwise, | ||||
|       unless required by applicable law (such as deliberate and grossly | ||||
|       negligent acts) or agreed to in writing, shall any Contributor be | ||||
|       liable to You for damages, including any direct, indirect, special, | ||||
|       incidental, or consequential damages of any character arising as a | ||||
|       result of this License or out of the use or inability to use the | ||||
|       Work (including but not limited to damages for loss of goodwill, | ||||
|       work stoppage, computer failure or malfunction, or any and all | ||||
|       other commercial damages or losses), even if such Contributor | ||||
|       has been advised of the possibility of such damages. | ||||
| 
 | ||||
|    9. Accepting Warranty or Additional Liability. While redistributing | ||||
|       the Work or Derivative Works thereof, You may choose to offer, | ||||
|       and charge a fee for, acceptance of support, warranty, indemnity, | ||||
|       or other liability obligations and/or rights consistent with this | ||||
|       License. However, in accepting such obligations, You may act only | ||||
|       on Your own behalf and on Your sole responsibility, not on behalf | ||||
|       of any other Contributor, and only if You agree to indemnify, | ||||
|       defend, and hold each Contributor harmless for any liability | ||||
|       incurred by, or claims asserted against, such Contributor by reason | ||||
|       of your accepting any such warranty or additional liability. | ||||
| 
 | ||||
|    END OF TERMS AND CONDITIONS | ||||
| 
 | ||||
|    APPENDIX: How to apply the Apache License to your work. | ||||
| 
 | ||||
|       To apply the Apache License to your work, attach the following | ||||
|       boilerplate notice, with the fields enclosed by brackets "[]" | ||||
|       replaced with your own identifying information. (Don't include | ||||
|       the brackets!)  The text should be enclosed in the appropriate | ||||
|       comment syntax for the file format. We also recommend that a | ||||
|       file or class name and description of purpose be included on the | ||||
|       same "printed page" as the copyright notice for easier | ||||
|       identification within third-party archives. | ||||
| 
 | ||||
|    Copyright [yyyy] [name of copyright owner] | ||||
| 
 | ||||
|    Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|    you may not use this file except in compliance with the License. | ||||
|    You may obtain a copy of the License at | ||||
| 
 | ||||
|        http://www.apache.org/licenses/LICENSE-2.0 | ||||
| 
 | ||||
|    Unless required by applicable law or agreed to in writing, software | ||||
|    distributed under the License is distributed on an "AS IS" BASIS, | ||||
|    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|    See the License for the specific language governing permissions and | ||||
|    limitations under the License. | ||||
| @ -1,41 +0,0 @@ | ||||
| Mibew Messenger | ||||
| Copyright 2005-2013 the original author or authors. | ||||
| 
 | ||||
| REQUIREMENTS | ||||
| 
 | ||||
|  * Apache web server 1.3.34 or above | ||||
|  * MySQL database 5.0 or above | ||||
|  * PHP 4.x or above with MySQL support | ||||
| 
 | ||||
| INSTALLATION | ||||
| 
 | ||||
| 1. Create folder with name 'mibew' in the root of your website. | ||||
| 2. Upload all the files contained in this archive (retaining the directory structure) into created folder. | ||||
|    Be sure to chromo the mibew folder to 755 and the install folder to 644. | ||||
| 3. Add a MySQL database with the name 'mibew' | ||||
| 4. Edit /mibew/libs/config.php to the information needed to connect to the database | ||||
| 5. Using your web browser visit http://<yourdomain>/mibew/install/ and | ||||
|    hit 'Create tables' | ||||
| 6. Remove /mibew/install/ directory from your server | ||||
| 7. Logon as | ||||
|                   user: admin | ||||
|                   password: <empty> | ||||
| 8. Get button code and setup it on your site. | ||||
| 9. Change your password and name. | ||||
| 10. Wait for your visitors on 'Pending users' page. | ||||
| 
 | ||||
| On unix/linux platforms change the owner of /mibew/images/avatar folder  | ||||
| to the user, under which the web server is running (for instance, www). | ||||
| The owner should have all rights on the folder /mibew/images/avatar  | ||||
| (chmod 700 /mibew/images/avatar). | ||||
| 
 | ||||
| UPDATE | ||||
| 
 | ||||
| 1. Backup your /mibew/libs/config.php | ||||
| 2. Backup your /mibew/images/avatar folder. | ||||
| 3. Delete the items in the mibew folder on the server. | ||||
| 4. Upload all the files contained in the downloaded archive (retaining the directory structure) into mibew folder. | ||||
| 5. Re-edit the MySQL database settings you config.php | ||||
| 6. Visit http://<yourdomain>/mibew/install/ and follow the instructions to update database (if needed). | ||||
| 7. Remove /mibew/install/ directory from your server | ||||
| 8. Restore contents of /mibew/images/avatar folder. | ||||
| @ -1 +0,0 @@ | ||||
| Mibew/1.6.7 | ||||
| @ -1,74 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| require_once('libs/common.php'); | ||||
| require_once('libs/chat.php'); | ||||
| require_once('libs/operator.php'); | ||||
| require_once('libs/groups.php'); | ||||
| 
 | ||||
| $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | ||||
| if($referer && isset($_SESSION['threadid'])) { | ||||
| 	$link = connect(); | ||||
| 	$thread = thread_by_id_($_SESSION['threadid'], $link); | ||||
|     if ($thread && $thread['istate'] != $state_closed) { | ||||
|         $msg = getstring2_("chat.client.visited.page", array($referer), $thread['locale'], true); | ||||
|         post_message_($thread['threadid'], $kind_for_agent,$msg,$link); | ||||
|     } | ||||
|     mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| $image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); | ||||
| $lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", ""); | ||||
| if(!$lang || !locale_pattern_check($lang) || !locale_exists($lang)) { | ||||
| 	$lang = $current_locale; | ||||
| } | ||||
| 
 | ||||
| $groupid = verifyparam( "group", "/^\d{1,10}$/", ""); | ||||
| if($groupid) { | ||||
| 	loadsettings(); | ||||
| 	if($settings['enablegroups'] == '1') { | ||||
| 		$group = group_by_id($groupid); | ||||
| 		if(!$group) { | ||||
| 			$groupid = ""; | ||||
| 		} | ||||
| 	} else { | ||||
| 		$groupid = ""; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $image_postfix = has_online_operators($groupid) ? "on" : "off"; | ||||
| $filename = dirname(__FILE__) . "/locales/${lang}/button/${image}_${image_postfix}.gif"; | ||||
| if (!file_exists($filename)) { | ||||
| 	die("no image"); | ||||
| } | ||||
| $fp = fopen($filename, 'rb') or die("unable to get image"); | ||||
| header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); | ||||
| header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||
| header("Pragma: no-cache"); | ||||
| header("Content-Type: image/gif"); | ||||
| header("Content-Length: ".filesize($filename)); | ||||
| if(function_exists('fpassthru')){ | ||||
| 	@fpassthru($fp); | ||||
| } else { | ||||
| 	while( (!feof($fp)) && (connection_status()==0)){ | ||||
| 		print(fread($fp, 1024*8)); | ||||
| 		flush(); | ||||
| 	} | ||||
| 	fclose($fp); | ||||
| } | ||||
| exit; | ||||
| ?>
 | ||||
| @ -1,20 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| require_once('b.php'); | ||||
| exit; | ||||
| ?>
 | ||||
| @ -1,26 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| require_once('libs/common.php'); | ||||
| require_once('libs/captcha.php'); | ||||
| 
 | ||||
| $captchaCode = gen_captcha(); | ||||
| $_SESSION["mibew_captcha"] = $captchaCode; | ||||
| draw_captcha($captchaCode); | ||||
| 
 | ||||
| exit; | ||||
| ?>
 | ||||
| @ -1,180 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| require_once('libs/common.php'); | ||||
| require_once('libs/chat.php'); | ||||
| require_once('libs/operator.php'); | ||||
| require_once('libs/groups.php'); | ||||
| require_once('libs/expand.php'); | ||||
| require_once('libs/captcha.php'); | ||||
| require_once('libs/notify.php'); | ||||
| 
 | ||||
| loadsettings(); | ||||
| if($settings['enablessl'] == "1" && $settings['forcessl'] == "1") { | ||||
| 	if(!is_secure_request()) { | ||||
| 		$requested = $_SERVER['PHP_SELF']; | ||||
| 		if($_SERVER['REQUEST_METHOD'] == 'GET' && $_SERVER['QUERY_STRING']) { | ||||
| 			header("Location: ".get_app_location(true,true)."/client.php?".$_SERVER['QUERY_STRING']); | ||||
| 		} else { | ||||
| 			die("only https connections are handled"); | ||||
| 		} 		 | ||||
| 		exit; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | ||||
| 
 | ||||
| 	$thread = NULL; | ||||
| 	if( isset($_SESSION['threadid']) ) { | ||||
| 		$thread = reopen_thread($_SESSION['threadid']); | ||||
| 	} | ||||
| 
 | ||||
| 	if( !$thread ) { | ||||
| 		$groupid = ""; | ||||
| 		$groupname = ""; | ||||
| 		if($settings['enablegroups'] == '1') { | ||||
| 			$groupid = verifyparam( "group", "/^\d{1,10}$/", ""); | ||||
| 			if($groupid) { | ||||
| 				$group = group_by_id($groupid); | ||||
| 				if(!$group) { | ||||
| 					$groupid = ""; | ||||
| 				} else { | ||||
| 					$groupname = get_group_name($group); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		$visitor = visitor_from_request(); | ||||
| 		 | ||||
| 		if(isset($_POST['survey']) && $_POST['survey'] == 'on') { | ||||
| 			$firstmessage = getparam("message"); | ||||
| 			$info = getparam("info"); | ||||
| 			$email = getparam("email"); | ||||
| 			$referrer = urldecode(getparam("referrer")); | ||||
| 			if ($settings["surveyaskcaptcha"] == "1") { | ||||
| 				$captcha = getparam('captcha'); | ||||
| 				$original = isset($_SESSION["mibew_captcha"]) | ||||
| 					? $_SESSION["mibew_captcha"] | ||||
| 					: ""; | ||||
| 				$survey_captcha_failed = empty($original) | ||||
| 					|| empty($captcha) | ||||
| 					|| $captcha != $original; | ||||
| 				unset($_SESSION['mibew_captcha']); | ||||
| 			} | ||||
| 
 | ||||
| 			if($settings['usercanchangename'] == "1" && isset($_POST['name'])) { | ||||
| 				$newname = getparam("name"); | ||||
| 				if($newname != $visitor['name']) { | ||||
| 					$data = strtr(base64_encode(myiconv($mibew_encoding,"utf-8",$newname)), '+/=', '-_,'); | ||||
| 					setcookie($namecookie, $data, time()+60*60*24*365); | ||||
| 					$visitor['name'] = $newname; | ||||
| 				} | ||||
| 			} | ||||
| 		} else { | ||||
| 			$firstmessage = NULL; | ||||
| 			$info = getgetparam('info'); | ||||
| 			$email = getgetparam('email'); | ||||
| 			$referrer = isset($_GET['url']) ? $_GET['url'] : | ||||
| 				(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""); | ||||
| 			if(isset($_GET['referrer']) && $_GET['referrer']) { | ||||
| 				$referrer .= "\n".$_GET['referrer']; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if(!has_online_operators($groupid)) { | ||||
| 			$page = array(); | ||||
| 			setup_logo(); | ||||
| 			setup_leavemessage($visitor['name'],$email,$firstmessage,$groupid,$groupname,$info,$referrer,can_show_captcha()); | ||||
| 			expand("styles", getchatstyle(), "leavemessage.tpl"); | ||||
| 			exit; | ||||
| 		} | ||||
| 
 | ||||
| 		$show_survey = $settings['enablepresurvey'] == '1' | ||||
| 			&& ( | ||||
| 			    !(isset($_POST['survey']) && $_POST['survey'] == 'on') | ||||
| 			    || ($settings["surveyaskcaptcha"] == "1" && !empty($survey_captcha_failed)) | ||||
| 			); | ||||
| 		if($show_survey) { | ||||
| 			$page = array(); | ||||
| 			setup_logo(); | ||||
| 			if (!empty($survey_captcha_failed)) { | ||||
| 			    $errors[] = getlocal('errors.captcha'); | ||||
| 			} | ||||
| 			setup_survey($visitor['name'], $email, $groupid, $info, $referrer, can_show_captcha()); | ||||
| 			expand("styles", getchatstyle(), "survey.tpl"); | ||||
| 			exit; | ||||
| 		} | ||||
| 
 | ||||
| 		$remoteHost = get_remote_host(); | ||||
| 		$userbrowser = $_SERVER['HTTP_USER_AGENT']; | ||||
| 
 | ||||
| 		$link = connect(); | ||||
| 		if(!check_connections_from_remote($remoteHost, $link)) { | ||||
| 			mysql_close($link); | ||||
| 			die("number of connections from your IP is exceeded, try again later"); | ||||
| 		} | ||||
| 		$thread = create_thread($groupid,$visitor['name'], $remoteHost, $referrer,$current_locale,$visitor['id'], $userbrowser,$state_loading,$link); | ||||
| 		$_SESSION['threadid'] = $thread['threadid']; | ||||
| 		 | ||||
| 		if( $referrer ) { | ||||
| 			post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referrer),true),$link); | ||||
| 		} | ||||
| 		post_message_($thread['threadid'],$kind_info,getstring('chat.wait', true),$link); | ||||
| 		if($email) { | ||||
| 			post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.visitor.email',array($email),true),$link); | ||||
| 		} | ||||
| 		if($info) { | ||||
| 			post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.visitor.info',array($info),true),$link); | ||||
| 		} | ||||
| 		if($firstmessage) { | ||||
| 			$postedid = post_message_($thread['threadid'],$kind_user,$firstmessage,$link,$visitor['name']); | ||||
| 			commit_thread( $thread['threadid'], array('shownmessageid' => intval($postedid)), $link); | ||||
| 		} | ||||
| 		notify_operators($thread, $firstmessage, $link); | ||||
| 		mysql_close($link); | ||||
| 	} | ||||
| 	$threadid = $thread['threadid']; | ||||
| 	$token = $thread['ltoken']; | ||||
| 	$level = get_remote_level($_SERVER['HTTP_USER_AGENT']); | ||||
| 	$chatstyle = verifyparam( "style", "/^\w+$/", ""); | ||||
| 	header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,10}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,10}$/"); | ||||
| $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| setup_chatview_for_user($thread, $level); | ||||
| 
 | ||||
| $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); | ||||
| if( $pparam == "mailthread" ) { | ||||
| 	expand("styles", getchatstyle(), "mail.tpl"); | ||||
| } else if( $level == "ajaxed" ) { | ||||
| 	expand("styles", getchatstyle(), "chat.tpl"); | ||||
| } else if( $level == "simple" ) { | ||||
| 	expand("styles", getchatstyle(), "chatsimple.tpl"); | ||||
| } else if( $level == "old" ) { | ||||
| 	expand("styles", getchatstyle(), "nochat.tpl"); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,917 +0,0 @@ | ||||
| /* | ||||
|  * Copyright 2005-2013 Evgeny Gryaznov | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| /* reset all */ | ||||
| 
 | ||||
| html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td { margin: 0; padding: 0; } | ||||
| table { border-collapse:collapse; border-spacing:0; } | ||||
| fieldset,img { border:0; } | ||||
| ol,ul { list-style:none; } | ||||
| h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; } | ||||
| q:before,q:after { content:''; } | ||||
| 
 | ||||
| body { | ||||
| 	background: #FFFFFF url(images/header.gif) repeat-x; | ||||
| 	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; | ||||
| 	font-size: 0.8em; | ||||
| 	line-height: 140%; | ||||
| 	color: #333333; | ||||
| } | ||||
| 
 | ||||
| /* 100% height with footer, 200 px sidebar	 */ | ||||
| 
 | ||||
| html, body { | ||||
| 	height: 100%; | ||||
| } | ||||
| 
 | ||||
| body { | ||||
| 	min-width: 750px; | ||||
| } | ||||
| 
 | ||||
| a { | ||||
| 	color: #2f7599; | ||||
| } | ||||
| 
 | ||||
| #wrap400, #wrap700, #fixedwrap  { | ||||
| 	position:relative; | ||||
| 	margin: 0px auto -41px; | ||||
| 	height:auto !important; | ||||
| 	height:100%; | ||||
| 	min-height:100%; | ||||
| } | ||||
| 
 | ||||
| #wrap400 { | ||||
| 	width: 100%; | ||||
| 	min-width:450px; | ||||
| } | ||||
| 
 | ||||
| #wrap700 { | ||||
| 	width: 100%; | ||||
| 	min-width:750px; | ||||
| } | ||||
| 
 | ||||
| #fixedwrap { | ||||
| 	width: 750px; | ||||
| }	 | ||||
| 
 | ||||
| .contentdiv { | ||||
| 	float:left; | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .contentinner { | ||||
| 	margin-right: 210px; | ||||
| 	padding: 10px 60px 10px 20px; | ||||
| 	overflow: hidden; | ||||
| } | ||||
| 
 | ||||
| .contentnomenu { | ||||
| 	padding: 10px 60px 10px 20px; | ||||
| } | ||||
| 
 | ||||
| .empty_inner { | ||||
| 	height:40px; | ||||
| } | ||||
| 
 | ||||
| #footer { | ||||
| 	background: white url(images/footer.gif) bottom repeat-x; | ||||
| 	font-size:11px; | ||||
| 	position:relative; | ||||
| 
 | ||||
| 	min-height: 40px; | ||||
| 	height:40px; | ||||
| 	vertical-align:middle; | ||||
| 
 | ||||
| 	width:100%; | ||||
| 	text-align: center; | ||||
| } | ||||
| 
 | ||||
| #legal { | ||||
| 	clear: both; | ||||
| 	line-height: 30px; | ||||
| 	padding-top:10px; | ||||
| 	text-align: center; | ||||
| 	color: #375C69; | ||||
| 	margin-bottom: 0px; | ||||
| } | ||||
| 
 | ||||
| #footer .flink { | ||||
| 	color: #2f7599; | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| #togglediv {  | ||||
| 	float:right; | ||||
| 	padding-right:10px; | ||||
| } | ||||
| 
 | ||||
| /* Header */ | ||||
| 
 | ||||
| #header { | ||||
| 	width: 100%; | ||||
| 	height: 32px; | ||||
| 	margin: 0px -2px 10px 0px; | ||||
| 	padding-top: 10px; | ||||
| 	padding-bottom: 5px; | ||||
| 	background: url(images/graydot.gif) repeat-x left bottom; | ||||
| 	display: block; | ||||
| } | ||||
| 
 | ||||
| #header { | ||||
| 	float: left; | ||||
| } | ||||
| 
 | ||||
| img.left { | ||||
| 	float: left; | ||||
| 	margin-right: 15px; | ||||
| } | ||||
| 
 | ||||
| #header h1 { | ||||
| 	font-size: 2em; | ||||
| 	line-height: 32px; | ||||
| 	color: #494949; | ||||
| 	margin-left: 40px; | ||||
| } | ||||
| 
 | ||||
| #header h1 a { | ||||
| 	color: #494949; | ||||
| } | ||||
| 
 | ||||
| #header a { | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| #title { | ||||
| 	float: left; | ||||
| 	display: inline; | ||||
| } | ||||
| 
 | ||||
| #path { | ||||
| 	float: right; | ||||
| 	padding: 10px 20px 0px 0px; | ||||
| 	line-height: 22px; | ||||
| 	display: inline; | ||||
| } | ||||
| 
 | ||||
| /* Sidebar */ | ||||
| 
 | ||||
| #sidebar { | ||||
| 	float: left; | ||||
| 	width: 185px; | ||||
| 	margin-left: -210px; | ||||
| 	margin-top: 20px; | ||||
| 	position:relative; | ||||
| 	line-height: 180% | ||||
| } | ||||
| 
 | ||||
| #sidebar ul { | ||||
| 	margin: 0; | ||||
| 	padding: 0; | ||||
| 	list-style: none; | ||||
| } | ||||
| 
 | ||||
| #sidebar li { | ||||
| 	margin-bottom: 20px; | ||||
| } | ||||
| 
 | ||||
| #sidebar li ul { | ||||
| } | ||||
| 
 | ||||
| #sidebar li li { | ||||
| 	margin: 0; | ||||
| } | ||||
| 
 | ||||
| #sidebar h2 { | ||||
| 	text-transform: lowercase; | ||||
| 	margin-bottom: 10px; | ||||
| 	background: url(images/graydot.gif) repeat-x left bottom; | ||||
| 	font-size: 1.3em; | ||||
| 	font-weight: bold; | ||||
| } | ||||
| 
 | ||||
| .locales a { | ||||
| 	color: #2f7599; | ||||
| 	font-size: 1em; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .locales .active a { | ||||
| 	color: #555; | ||||
| } | ||||
| 
 | ||||
| .locales a:hover { | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| .submenu a { | ||||
| 	padding-left: 15px; | ||||
| 	color: #2f7599; | ||||
| 	font-size: 1em; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .submenu a.inner { padding-left: 0px; } | ||||
| .submenu span.small { font-size: 80%; padding-left: 5px; } | ||||
| 
 | ||||
| .submenu .active a { | ||||
| 	background: url(images/li.gif) no-repeat left 1px; | ||||
| 	color: #555; | ||||
| } | ||||
| 
 | ||||
| .submenu .active a.inner { | ||||
| 	background: none; | ||||
| } | ||||
| 
 | ||||
| .submenu a:hover { | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| /* form, tabbed form */ | ||||
| 
 | ||||
| .mform { | ||||
| 	background: url(images/loginbg.gif); | ||||
| 	clear: both; | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .tabs { | ||||
| 	float: right; | ||||
| 	margin-left: 15px; | ||||
| 	display: inline; | ||||
| 	margin-right: 15px; | ||||
| } | ||||
| 
 | ||||
| .tabs li { | ||||
| 	display: inline; | ||||
| } | ||||
| 
 | ||||
| .tabs a { | ||||
| 	display: block; | ||||
| 	float: left; | ||||
| 	padding: 2px 9px 3px 9px; | ||||
| 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; | ||||
| 	font-size: 11px; | ||||
| 	color: #2f7599; | ||||
| } | ||||
| 
 | ||||
| .tabs li.active a { | ||||
| 	background: url(images/loginbg.gif); | ||||
| 	border-left:1px solid #bbbbbb;border-top:1px solid #bbbbbb;border-right:1px solid #bbbbbb; | ||||
| 	color: #000; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .formtop, .formbottom, .formtopi, .formbottomi { height: 15px;} | ||||
| .formtop { background: url(images/logincrnrt.gif) no-repeat top right;} | ||||
| .formtopi { background: url(images/logincrnlt.gif) no-repeat top left; } | ||||
| .formbottom { background: url(images/logincrnrb.gif) no-repeat bottom right; } | ||||
| .formbottomi { background: url(images/logincrnlb.gif) no-repeat bottom left; } | ||||
| .forminner { margin: 0px 15px;} | ||||
| .forminner p { margin-bottom: 1em; } | ||||
| 
 | ||||
| /* fieldForm */ | ||||
| 
 | ||||
| .fieldForm { | ||||
| 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; | ||||
| 	font-size: 11px; | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .packedFormField { | ||||
| 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; | ||||
| 	font-size: 11px; | ||||
| 	float:left; | ||||
| 	margin-right:25px; | ||||
| 	margin-bottom:8px; | ||||
| } | ||||
| 
 | ||||
| .packedFormField select { | ||||
| 	min-width: 130px; | ||||
| } | ||||
| 
 | ||||
| div.errinfo { | ||||
| 	color: #c13030; | ||||
| }	 | ||||
| 
 | ||||
| .field { | ||||
| 	width: 100%; | ||||
| 	margin-top: 5px; | ||||
| } | ||||
| 
 | ||||
| .flabel { | ||||
| 	position: relative; | ||||
| 	margin: 8px auto 2px; | ||||
| 	color: black; | ||||
| } | ||||
| 
 | ||||
| .fleftlabel { | ||||
| 	float: left; | ||||
| 	width: 11em; | ||||
| }  | ||||
| 
 | ||||
| .flabel span.required { | ||||
| 	font-size:8.0pt; | ||||
| 	color:red; | ||||
| 	font-weight: bold; | ||||
| } | ||||
| 
 | ||||
| .field .subfield { | ||||
| 	padding-left: 30px; | ||||
| 	background: url(images/subitem.gif) no-repeat 10px 2px; | ||||
| } | ||||
| 
 | ||||
| .fieldinrow { | ||||
| 	min-width: 300px; | ||||
| 	display: inline; | ||||
| 	float:left; | ||||
| 	width: 45%; | ||||
| } | ||||
| 
 | ||||
| .fvalue { | ||||
| 	float: left; | ||||
| } | ||||
| 
 | ||||
| .fvaluewithta { | ||||
| 	float: left; | ||||
| 	width: 67%; | ||||
| } | ||||
| 
 | ||||
| .fvaluewithta textarea { | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .fvaluenodesc { | ||||
| } | ||||
| 
 | ||||
| .fvalueframe { | ||||
| 	overflow: auto; | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .fvalueframe iframe { | ||||
| 	border: solid 1px #999; | ||||
| } | ||||
| 	 | ||||
| .fdescr { | ||||
| 	float:left; | ||||
| 	padding-left:10px; | ||||
| 	color: #676767; | ||||
| 	font-size: 10px; | ||||
| 	min-width: 200px; | ||||
| } | ||||
| 
 | ||||
| .fbutton {  | ||||
| 	background: url(images/formline.gif) repeat-x; | ||||
| 	margin-top: 20px; | ||||
| 	padding-top: 10px; | ||||
| } | ||||
| 
 | ||||
| .fbutton .links { | ||||
| 	float: right; | ||||
| 	margin-top: 5px; | ||||
| } | ||||
| 
 | ||||
| .fbutton .submitbutton { | ||||
| 	float: left; | ||||
| } | ||||
| 
 | ||||
| .formauth { | ||||
| } | ||||
| 
 | ||||
| textarea.wide { | ||||
| 	border:1px solid #878787; | ||||
| 	overflow:auto; | ||||
| 	width: 95%; | ||||
| } | ||||
| 
 | ||||
| input.formauth { | ||||
| 	border: 1px solid #878787; | ||||
| 	color: #333; | ||||
| 	margin-right:15px; | ||||
| 	padding-right: 0px;	 | ||||
| } | ||||
| 
 | ||||
| #formmessage { | ||||
| 	border: 1px solid #4C96D4; | ||||
| 	background-color: #E7F1F9; | ||||
| 	padding: 8px 11px; | ||||
| 	font-size: 0.85em; | ||||
| 	font-weight:bold; | ||||
| 	max-width: 700px; | ||||
| 	margin: -10px 2px 10px; | ||||
| 	color: #515151; | ||||
| } | ||||
| 
 | ||||
| #offwarn { | ||||
| 	border: 1px solid #4CD496; | ||||
| 	background-color: #E7F9F1; | ||||
| 	color: #515151; | ||||
| 	padding: 8px 11px; | ||||
| 	font-size: 0.85em; | ||||
| 	font-weight:bold; | ||||
| 	line-height: 140%; | ||||
| 	margin: 0px; | ||||
| } | ||||
| 
 | ||||
| #offwarn img { | ||||
| 	margin-top: .4em; | ||||
| 	float: left; | ||||
| 	padding-right: 10px; | ||||
| } | ||||
| 
 | ||||
| .asterisk { | ||||
| 	padding: 10px 20px; | ||||
| } | ||||
| 
 | ||||
| /* tables */ | ||||
| 
 | ||||
| .tabletool { | ||||
| 	float: right; | ||||
| } | ||||
| 
 | ||||
| .tabletool a { | ||||
| 	color: #296685; | ||||
| 	vertical-align: top; | ||||
| 	padding-left: 4px; | ||||
| } | ||||
| 
 | ||||
| .tabletitle { | ||||
| 	background: url(images/graydot.gif) repeat-x left bottom; | ||||
| 	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; | ||||
| 	font-size: 1.4em; | ||||
| 	margin: 10px 0px 20px; | ||||
| 	padding-bottom: 10px; | ||||
| 	color: #1D485E; | ||||
| 	font-weight: bold; | ||||
| } | ||||
| 
 | ||||
| table.list, table.translate, table.statistics { | ||||
| 	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; | ||||
| 	background: #fff; | ||||
| 	width: 100%; | ||||
| 	border-collapse: collapse; | ||||
| 	text-align: left; | ||||
| } | ||||
| 
 | ||||
| table.list th, table.translate th, table.statistics th { | ||||
| 	font-size: 1.2em; | ||||
| 	font-weight: normal; | ||||
| 	padding: 10px 8px; | ||||
| 	border-bottom: 2px solid #2F7598; | ||||
| } | ||||
| 
 | ||||
| table.list th, table.translate th { color: #1D485E; } | ||||
| table.statistics th { color: #2F7598; } | ||||
| 
 | ||||
| table.list td, table.statistics td { | ||||
| 	color: #2f7599; | ||||
| 	padding: 10px 8px; | ||||
| 	border-bottom: 1px solid #ccc; | ||||
| } | ||||
| 
 | ||||
| table.translate td { | ||||
| 	font-family: Arial, Helvetica, sans-serif; | ||||
| 	font-size: 12px; | ||||
| 	color: #515151; | ||||
| 	padding: 2px 8px; | ||||
| 	border-bottom: 1px solid #ccc; | ||||
| } | ||||
| 
 | ||||
| table.list td a.man { | ||||
| 	background: url(images/tbliclogin.gif) no-repeat left center; | ||||
| 	padding-left: 15px; | ||||
| } | ||||
| 
 | ||||
| table.list td a.mail { | ||||
| 	background: url(images/mail.png) no-repeat left center; | ||||
| 	padding-left: 24px; | ||||
| } | ||||
| 
 | ||||
| table.list td a.xmpp { | ||||
| 	background: url(images/xmpp.png) no-repeat left center; | ||||
| 	padding-left: 24px; | ||||
| } | ||||
| 
 | ||||
| table.list tbody tr:hover td, table.list tbody tr:hover td a, table.statistics tbody tr:hover td { | ||||
| 	color: #1D485E; | ||||
| } | ||||
| 
 | ||||
| /* awaiting */ | ||||
| 
 | ||||
| table.awaiting { | ||||
| 	font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; | ||||
| 	background: #fff; | ||||
| 	width: 100%; | ||||
| 	border-collapse: collapse; | ||||
| 	text-align: left; | ||||
| } | ||||
| 
 | ||||
| table.awaiting th { | ||||
| 	font-size: 1.2em; | ||||
| 	font-weight: normal; | ||||
| 	color: #1D485E; | ||||
| 	padding: 10px 8px; | ||||
| 	border-bottom: 2px solid #2F7598; | ||||
| 	text-align: center; | ||||
| } | ||||
| 
 | ||||
| table.awaiting th.first { | ||||
| 	text-align: left; | ||||
| } | ||||
| 
 | ||||
| table.awaiting table.inner { | ||||
| 	border: none; | ||||
| 	width: 100%;	 | ||||
| } | ||||
| 
 | ||||
| table.awaiting table.inner .icon { | ||||
| 	width: 30px; | ||||
| 	text-align: center; | ||||
| } | ||||
| 
 | ||||
| table.awaiting td.visitor { | ||||
| 	color: #296685; | ||||
| 	border-bottom: 1px solid #ccc; | ||||
| 	padding: 10px 8px; | ||||
| 	margin: 0px; | ||||
| } | ||||
| 
 | ||||
| .awaiting .visitor a { color: #296685; } | ||||
| .awaiting tr:hover .visitor, .awaiting tr:hover .visitor a { color: #1D485E; } | ||||
| 
 | ||||
| .awaiting tr.ban .visitor, .awaiting tr.ban .visitor a { color: #9AC8E0; }  | ||||
| .awaiting tr.ban:hover .visitor, .awaiting tr.ban:hover .visitor a { color: #4C9CC8; }  | ||||
| 
 | ||||
| .awaiting tr.inwait .visitor, .awaiting tr.inwait a { font-weight: bold; }  | ||||
| .awaiting tr.inprio .visitor, .awaiting tr.inprio a { font-weight: bold; font-size: 1.05em; }  | ||||
| .awaiting tr.inchat .visitor, .awaiting tr.inchat .visitor a { color: #777; } | ||||
| .awaiting tr.inchat:hover .visitor, .awaiting tr.inchat:hover .visitor a { color: #444; }  | ||||
| .awaiting tr.inchat a { text-decoration: none; } | ||||
| 
 | ||||
| .firstmessage { | ||||
| 	text-align: right; | ||||
| 	font-size: 0.8em; | ||||
| 	padding-right: 10px; | ||||
| } | ||||
| 
 | ||||
| .firstmessage a { | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .firstmessage a:hover { | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| #connstatus { | ||||
| 	float:right; | ||||
| 	margin: 10px 10px; | ||||
| } | ||||
| 
 | ||||
| #connlinks { | ||||
| 	margin: 10px 10px; | ||||
| } | ||||
| 
 | ||||
| #connlinks a { | ||||
| 	color: #777; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| #connlinks a:hover { | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| /* online operators */ | ||||
| 
 | ||||
| #onlineoperators { | ||||
| 	padding-right: 10px; | ||||
| 	float: right; | ||||
| } | ||||
| 
 | ||||
| /* search */ | ||||
| 
 | ||||
| #searchtext { | ||||
| 	float:left; | ||||
| 	display: inline; | ||||
| 	margin:7px 20px 5px 0px; | ||||
| 	width:75%; | ||||
| 	padding-right:5px; | ||||
| } | ||||
| 
 | ||||
| .searchctrl { | ||||
| 	float: left; | ||||
| 	margin:7px 20px 5px 0px; | ||||
| 	padding-right:5px; | ||||
| 	display: inline;	 | ||||
| } | ||||
| 
 | ||||
| #searchtext input { | ||||
| 	width: 100%; | ||||
| 	margin: 0px; | ||||
| } | ||||
| 
 | ||||
| #searchbutton { | ||||
| 	float:left; | ||||
| } | ||||
| 
 | ||||
| /* login */ | ||||
| 
 | ||||
| #loginsmallpane { | ||||
| 	float: right; | ||||
| 	padding: 10px 15px 0px 0px; | ||||
| 	margin-right: 0px; | ||||
| 	line-height: 22px; | ||||
| 	display: inline; | ||||
| } | ||||
| 
 | ||||
| #loginsmallpane input { | ||||
| 	margin: 0px 3px; | ||||
| 	padding: 0px 2px; | ||||
| } | ||||
| 
 | ||||
| #loginsmallpane .butt { | ||||
| 	height: 1.3em; | ||||
| 	border: 0px; | ||||
| 	background: none; | ||||
| } | ||||
| 
 | ||||
| #loginsmallpane .butt:hover { | ||||
| 	background: #aaa; | ||||
| } | ||||
| 
 | ||||
| #loginintro { | ||||
| 	width: 400px; | ||||
| 	margin: 10px 30px; | ||||
| } | ||||
| 
 | ||||
| #loginpane { | ||||
| 	width: 400px; | ||||
| 	margin: 30px 30px; | ||||
| } | ||||
| 
 | ||||
| #loginpane .header h2 { | ||||
| 	font-size: 2em; | ||||
| 	margin-bottom: 0.9em; | ||||
| 	padding-bottom: 0.8em; | ||||
| 	border-bottom: 2px solid #2F7598; | ||||
| } | ||||
| 
 | ||||
| /* nice button */ | ||||
| 
 | ||||
| #confirmpane { | ||||
| 	width:450px; | ||||
| 	margin:0px auto 5px; | ||||
| 	padding-top: 70px; | ||||
| } | ||||
| 
 | ||||
| .nicebutton { | ||||
| 	border: none; | ||||
| 	float: left; | ||||
| 	margin-left: 30px; | ||||
| } | ||||
| 
 | ||||
| .submit a { | ||||
| 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; | ||||
| 	font-size: 11px; | ||||
| 	line-height: 35px; | ||||
| 	color: #000000; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .submit { | ||||
| 	background: url(images/submitbg.gif) repeat-x; | ||||
| 	vertical-align: top; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /* thread log */ | ||||
| 
 | ||||
| .logpane { | ||||
| 	margin: 10px 0px; | ||||
| 	line-height: 150%; | ||||
| } | ||||
| 
 | ||||
| .logpane .header { | ||||
| 	padding-bottom: 0.8em; | ||||
| 	border-bottom: 2px solid #2F7598; | ||||
| } | ||||
| 
 | ||||
| .logpane .wlabel { | ||||
| 	width: 10em; | ||||
| 	float: left; | ||||
| 	margin-right:10px; | ||||
| } | ||||
| 
 | ||||
| .logpane .wvalue { | ||||
| 	float: left; | ||||
| } | ||||
| 
 | ||||
| /* dashboard */ | ||||
| 
 | ||||
| #dashboard { | ||||
| 	width: 100%; | ||||
| } | ||||
| 
 | ||||
| .dashitem { | ||||
| 	width:33%; | ||||
| 	margin: 0px 2em 5em 0px; | ||||
| 	padding: 5px 2em 5em; | ||||
| 	vertical-align: top; | ||||
| } | ||||
| 
 | ||||
| .dashitem:hover { | ||||
| } | ||||
| 
 | ||||
| .dashitem a { | ||||
| 	padding-top:2px; | ||||
| 	padding-bottom: 10px; | ||||
| 	display: block;	 | ||||
| } | ||||
| 
 | ||||
| .dashitem img, #dashlocalesPopup h2 img { | ||||
| 	float: left; | ||||
| 	padding-right:10px; | ||||
| 	width: 24px; | ||||
| 	height: 24px; | ||||
| } | ||||
| 
 | ||||
| #dashlocalesPopup h2 img { | ||||
| 	margin-top: -3px; | ||||
| } | ||||
| 
 | ||||
| #dashlocalesPopup .locales { | ||||
| 	line-height: 180%; | ||||
| 	margin-left:10px; | ||||
| } | ||||
| 
 | ||||
| #dashlocalesPopup h2 { | ||||
| 	font-size: 1.5em; | ||||
| 	margin-bottom: 0.9em; | ||||
| 	padding: 5px 30px 0.8em 0px; | ||||
| 	border-bottom: 2px solid #2F7598; | ||||
| } | ||||
| 
 | ||||
| #dashlocalesPopupClose { | ||||
| 	float: right; | ||||
| 	position:absolute; | ||||
| 	right:5px; | ||||
| 	top:5px; | ||||
| } | ||||
| 
 | ||||
| #dashlocalesPopup { | ||||
| 	display:none;   | ||||
| 	position:fixed;   | ||||
| 	_position:absolute; /* ie6*/   | ||||
| 	background:#FFFFFF;   | ||||
| 	border:2px solid #2F7598;   | ||||
| 	z-index:110;   | ||||
| 	padding:1em 1em;   | ||||
| 	font-size:1em; | ||||
| } | ||||
| 
 | ||||
| #backgroundPopup{   | ||||
| 	display:none;   | ||||
| 	position:fixed;   | ||||
| 	_position:absolute; /* ie6*/   | ||||
| 	height:100%; | ||||
| 	opacity: .5; | ||||
| 	width:100%;   | ||||
| 	top:0;   | ||||
| 	left:0;   | ||||
| 	background:#000000;   | ||||
| 	border:1px solid #cecece;   | ||||
| 	z-index:101;   | ||||
| }   | ||||
| 
 | ||||
| /* install */ | ||||
| 
 | ||||
| #install li { | ||||
| 	list-style-type: circle; | ||||
| 	list-style-position: inside; | ||||
| 	margin-left: 2em; | ||||
| } | ||||
| 
 | ||||
| #check-nv, #check-nm { | ||||
| 	color: #2f7599; | ||||
| 	text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| #check-nv:hover, #check-nm:hover { | ||||
| 	text-decoration: underline; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /* chat */ | ||||
| 
 | ||||
| .message { | ||||
| 	font-family: Arial, Helvetica, sans-serif; | ||||
| 	font-size: 12px; | ||||
| 	color: #4F4F4F; | ||||
| 	padding: 15px 0px 0px 0px; | ||||
| 	line-height: 17px; | ||||
| } | ||||
| 
 | ||||
| .message span.time { | ||||
| 	color: #000000; | ||||
| } | ||||
| 
 | ||||
| .message span.nuser { | ||||
| 	color: #B11E23; | ||||
| 	font-weight: bold; | ||||
| } | ||||
| 
 | ||||
| .message span.nagent { | ||||
| 	font-weight: bold; | ||||
| } | ||||
| 
 | ||||
| .message span.minf { | ||||
| 	color: #1E48B1; | ||||
| 	font-size: 11px; | ||||
| } | ||||
| 
 | ||||
| .message span.mevent { | ||||
| 	color: #A1A1A1; | ||||
| 	font-size: 11px; | ||||
| } | ||||
| 
 | ||||
| .message span.mhidden { | ||||
| 	color: #A1A1A1; | ||||
| 	font-size: 11px; | ||||
| } | ||||
| 
 | ||||
| .message span.mconn { | ||||
| 	color: #A1A1A1; | ||||
| 	font-size: 11px; | ||||
| } | ||||
| 
 | ||||
| /* updates */ | ||||
| 
 | ||||
| #news { | ||||
| 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; | ||||
| 	font-size: 11px; | ||||
| 	margin-bottom:15px; | ||||
| 	padding:4px; | ||||
| } | ||||
| 
 | ||||
| .newstext { | ||||
| 	margin-bottom:1em; | ||||
| } | ||||
| 
 | ||||
| /* rtl rules */ | ||||
| 
 | ||||
| .lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img { | ||||
| 	float: right; | ||||
| 	padding-right:0px; | ||||
| 	padding-left:10px; | ||||
| } | ||||
| 
 | ||||
| .lrtl .fleftlabel { | ||||
| 	float: right; | ||||
| 	width: 11em; | ||||
| } | ||||
| 
 | ||||
| .lrtl .fdescr { | ||||
| 	float:right; | ||||
| 	padding-right:10px; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| .lrtl .field .subfield { | ||||
| 	padding-right: 30px; | ||||
| 	background: url(images/subitem_rtl.gif) no-repeat 99% 2px; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| .lrtl .fvalue { | ||||
| 	float: right; | ||||
| } | ||||
| 
 | ||||
| .lrtl .logpane .wlabel { | ||||
| 	float: right; | ||||
| 	margin-left:10px; | ||||
| } | ||||
| 
 | ||||
| .lrtl .logpane .wvalue { | ||||
| 	float: right; | ||||
| } | ||||
| 
 | ||||
| .lrtl .fvaluewithta { | ||||
| 	float: right; | ||||
| } | ||||
| 
 | ||||
| .lrtl #togglediv {  | ||||
| 	float:left; | ||||
| 	padding-left:10px; | ||||
| } | ||||
| Before Width: | Height: | Size: 372 B | 
| @ -1,4 +0,0 @@ | ||||
| <html><head> | ||||
| </head><body> | ||||
| </body></html> | ||||
| 
 | ||||
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 732 B | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 340 B | 
| Before Width: | Height: | Size: 728 B | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 604 B | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 690 B | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| @ -1,19 +0,0 @@ | ||||
| "34aL volume 3.1" icons set | ||||
| 
 | ||||
| Ammount of icons: | ||||
| 60 | ||||
| 
 | ||||
| Colors:  | ||||
| Colored, grey | ||||
| 
 | ||||
| Icon Sizes: | ||||
| 24x24 | ||||
| 
 | ||||
| File Types: | ||||
| .ico (RGBA, 256 color, 16 color),  | ||||
| .tiff (RGBA) | ||||
| .gif (indexed) | ||||
| .bmp (RGB - 1 color background),  | ||||
| .png (RGBA) | ||||
| 
 | ||||
| Note: These icons are free for use. | ||||
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 162 B | 
| Before Width: | Height: | Size: 43 B | 
| Before Width: | Height: | Size: 49 B | 
| Before Width: | Height: | Size: 43 B | 
| Before Width: | Height: | Size: 162 B | 
| Before Width: | Height: | Size: 713 B | 
| Before Width: | Height: | Size: 60 B | 
| Before Width: | Height: | Size: 377 B | 
| Before Width: | Height: | Size: 68 B | 
| Before Width: | Height: | Size: 148 B | 
| Before Width: | Height: | Size: 199 B | 
| Before Width: | Height: | Size: 139 B | 
| Before Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 796 B | 
| Before Width: | Height: | Size: 328 B | 
| Before Width: | Height: | Size: 2.2 KiB | 
| Before Width: | Height: | Size: 915 B | 
| Before Width: | Height: | Size: 905 B | 
| Before Width: | Height: | Size: 906 B | 
| Before Width: | Height: | Size: 914 B | 
| Before Width: | Height: | Size: 75 B | 
| Before Width: | Height: | Size: 74 B | 
| Before Width: | Height: | Size: 1.6 KiB | 
| Before Width: | Height: | Size: 55 B | 
| Before Width: | Height: | Size: 89 B | 
| Before Width: | Height: | Size: 43 B | 
| Before Width: | Height: | Size: 92 B | 
| Before Width: | Height: | Size: 329 B | 
| Before Width: | Height: | Size: 309 B | 
| Before Width: | Height: | Size: 554 B | 
| Before Width: | Height: | Size: 338 B | 
| Before Width: | Height: | Size: 640 B | 
| Before Width: | Height: | Size: 53 B | 
| Before Width: | Height: | Size: 70 B | 
| Before Width: | Height: | Size: 331 B | 
| @ -1,21 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| header("Location: operator/index.php"); | ||||
| exit; | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,229 +0,0 @@ | ||||
| <?php | ||||
| /* | ||||
|  * Copyright 2005-2013 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  * You may obtain a copy of the License at | ||||
|  * | ||||
|  *     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  * | ||||
|  * Unless required by applicable law or agreed to in writing, software | ||||
|  * distributed under the License is distributed on an "AS IS" BASIS, | ||||
|  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| $dbtables = array( | ||||
| 	"${mysqlprefix}chatgroup" => array( | ||||
| 		"groupid" => "int NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"vcemail" => "varchar(64)", | ||||
| 		"vclocalname" => "varchar(64) NOT NULL", | ||||
| 		"vccommonname" => "varchar(64) NOT NULL", | ||||
| 		"vclocaldescription" => "varchar(1024) NOT NULL", | ||||
| 		"vccommondescription" => "varchar(1024) NOT NULL", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatthread" => array( | ||||
| 		"threadid" => "int NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"userName" => "varchar(64) NOT NULL", | ||||
| 		"userid" => "varchar(255)", | ||||
| 		"agentName" => "varchar(64)", | ||||
| 		"agentId" => "int NOT NULL DEFAULT 0", | ||||
| 		"dtmcreated" => "datetime DEFAULT 0", | ||||
| 		"dtmmodified" => "datetime DEFAULT 0", | ||||
| 		"lrevision" => "int NOT NULL DEFAULT 0", | ||||
| 		"istate" => "int NOT NULL DEFAULT 0", | ||||
| 		"ltoken" => "int NOT NULL", | ||||
| 		"remote" => "varchar(255)", | ||||
| 		"referer" => "text", | ||||
| 		"nextagent" => "int NOT NULL DEFAULT 0", | ||||
| 		"locale" => "varchar(8)", | ||||
| 		"lastpinguser" => "datetime DEFAULT 0", | ||||
| 		"lastpingagent" => "datetime DEFAULT 0", | ||||
| 		"userTyping" => "int DEFAULT 0", | ||||
| 		"agentTyping" => "int DEFAULT 0", | ||||
| 		"shownmessageid" => "int NOT NULL DEFAULT 0", | ||||
| 		"userAgent" => "varchar(255)", | ||||
| 		"messageCount" => "varchar(16)", | ||||
| 		"groupid" => "int references ${mysqlprefix}chatgroup(groupid)", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatmessage" => array( | ||||
| 		"messageid" => "int NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"threadid" => "int NOT NULL references ${mysqlprefix}chatthread(threadid)", | ||||
| 		"ikind" => "int NOT NULL", | ||||
| 		"agentId" => "int NOT NULL DEFAULT 0", | ||||
| 		"tmessage" => "text NOT NULL", | ||||
| 		"dtmcreated" => "datetime DEFAULT 0", | ||||
| 		"tname" => "varchar(64)" | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatoperator" => array( | ||||
| 		"operatorid" => "int NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"vclogin" => "varchar(64) NOT NULL", | ||||
| 		"vcpassword" => "varchar(64) NOT NULL", | ||||
| 		"vclocalename" => "varchar(64) NOT NULL", | ||||
| 		"vccommonname" => "varchar(64) NOT NULL", | ||||
| 		"vcemail" => "varchar(64)", | ||||
| 		"dtmlastvisited" => "datetime DEFAULT 0", | ||||
| 		"istatus" => "int DEFAULT 0", /* 0 - online, 1 - away */ | ||||
| 		"vcavatar" => "varchar(255)", | ||||
| 		"vcjabbername" => "varchar(255)", | ||||
| 		"iperm" => "int DEFAULT 65535", | ||||
| 		"inotify" => "int DEFAULT 0", /* 0 - none, 1 - jabber */ | ||||
| 		"dtmrestore" => "datetime DEFAULT 0", | ||||
| 		"vcrestoretoken" => "varchar(64)", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatrevision" => array( | ||||
| 		"id" => "INT NOT NULL" | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatgroupoperator" => array( | ||||
| 		"groupid" => "int NOT NULL references ${mysqlprefix}chatgroup(groupid)", | ||||
| 		"operatorid" => "int NOT NULL references ${mysqlprefix}chatoperator(operatorid)", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatban" => array( | ||||
| 		"banid" => "INT NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"dtmcreated" => "datetime DEFAULT 0", | ||||
| 		"dtmtill" => "datetime DEFAULT 0", | ||||
| 		"address" => "varchar(255)", | ||||
| 		"comment" => "varchar(255)", | ||||
| 		"blockedCount" => "int DEFAULT 0" | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatconfig" => array( | ||||
| 		"id" => "INT NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"vckey" => "varchar(255)", | ||||
| 		"vcvalue" => "varchar(255)", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatresponses" => array( | ||||
| 		"id" => "INT NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"locale" => "varchar(8)", | ||||
| 		"groupid" => "int references ${mysqlprefix}chatgroup(groupid)", | ||||
| 		"vcvalue" => "varchar(1024) NOT NULL", | ||||
| 	), | ||||
| 
 | ||||
| 	"${mysqlprefix}chatnotification" => array( | ||||
| 		"id" => "INT NOT NULL auto_increment PRIMARY KEY", | ||||
| 		"locale" => "varchar(8)", | ||||
| 		"vckind" => "varchar(16)", | ||||
| 		"vcto" => "varchar(256)", | ||||
| 		"dtmcreated" => "datetime DEFAULT 0", | ||||
| 		"vcsubject" => "varchar(256)", | ||||
| 		"tmessage" => "text NOT NULL", | ||||
| 		"refoperator" => "int NOT NULL references ${mysqlprefix}chatoperator(operatorid)", | ||||
| 	), | ||||
| ); | ||||
| 
 | ||||
| $dbtables_indexes = array( | ||||
| 	"${mysqlprefix}chatmessage" => array( | ||||
| 		"idx_agentid" => "agentid" | ||||
| 	) | ||||
| ); | ||||
| 
 | ||||
| $memtables = array(); | ||||
| 
 | ||||
| $dbtables_can_update = array( | ||||
| 	"${mysqlprefix}chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent", "groupid"), | ||||
| 	"${mysqlprefix}chatmessage" => array("agentId"), | ||||
| 	"${mysqlprefix}chatoperator" => array("vcavatar", "vcjabbername", "iperm", "istatus", "vcemail", "dtmrestore", "vcrestoretoken", "inotify"), | ||||
| 	"${mysqlprefix}chatban" => array(), | ||||
| 	"${mysqlprefix}chatgroup" => array("vcemail"), | ||||
| 	"${mysqlprefix}chatgroupoperator" => array(), | ||||
| 	"${mysqlprefix}chatresponses" => array(), | ||||
| 	"${mysqlprefix}chatnotification" => array(), | ||||
| ); | ||||
| 
 | ||||
| function show_install_err($text) | ||||
| { | ||||
| 	global $page, $version, $errors, $mibewroot; | ||||
| 	$page = array( | ||||
| 		'version' => $version, | ||||
| 		'localeLinks' => get_locale_links("$mibewroot/install/index.php") | ||||
| 	); | ||||
| 	$errors = array($text); | ||||
| 	start_html_output(); | ||||
| 	require('../view/install_err.php'); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| function create_table($id, $link) | ||||
| { | ||||
| 	global $dbtables, $dbtables_indexes, $memtables, $dbencoding, $mysqlprefix; | ||||
| 
 | ||||
| 	if (!isset($dbtables[$id])) { | ||||
| 		show_install_err("Unknown table: $id, " . mysql_error($link)); | ||||
| 	} | ||||
| 
 | ||||
| 	$query = | ||||
| 			"CREATE TABLE $id\n" . | ||||
| 			"(\n"; | ||||
| 	foreach ($dbtables[$id] as $k => $v) { | ||||
| 		$query .= "	$k $v,\n"; | ||||
| 	} | ||||
| 
 | ||||
| 	if (isset($dbtables_indexes[$id])) { | ||||
| 	    foreach ($dbtables_indexes[$id] as $k => $v) { | ||||
| 		    $query .= "	INDEX $k ($v),\n"; | ||||
| 	    } | ||||
| 	} | ||||
| 
 | ||||
| 	$query = preg_replace("/,\n$/", "", $query); | ||||
| 	$query .= ") charset $dbencoding"; | ||||
| 	if (in_array($id, $memtables)) { | ||||
| 		$query .= " ENGINE=MEMORY"; | ||||
| 	} else { | ||||
| 		$query .= " ENGINE=InnoDb"; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link)); | ||||
| 
 | ||||
| 	if ($id == "${mysqlprefix}chatoperator") { | ||||
| 		create_operator_("admin", "", "", "", "Administrator", "Administrator", 0, "", $link); | ||||
| 	} else if ($id == "${mysqlprefix}chatrevision") { | ||||
| 		perform_query("INSERT INTO ${mysqlprefix}chatrevision VALUES (1)", $link); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_tables($link) | ||||
| { | ||||
| 	global $mysqldb, $errors; | ||||
| 	$result = mysql_query("SHOW TABLES FROM `$mysqldb`", $link); | ||||
| 	if ($result) { | ||||
| 		$arr = array(); | ||||
| 		while ($row = mysql_fetch_array($result, MYSQL_NUM)) { | ||||
| 			$arr[] = $row[0]; | ||||
| 		} | ||||
| 		mysql_free_result($result); | ||||
| 		return $arr; | ||||
| 
 | ||||
| 	} else { | ||||
| 		$errors[] = "Cannot get tables from database. Error: " . mysql_error($link); | ||||
| 		return false; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_columns($tablename, $link) | ||||
| { | ||||
| 	global $errors; | ||||
| 	$result = mysql_query("SHOW COLUMNS FROM $tablename", $link); | ||||
| 	if ($result) { | ||||
| 		$arr = array(); | ||||
| 		while ($row = mysql_fetch_array($result, MYSQL_NUM)) { | ||||
| 			$arr[] = $row[0]; | ||||
| 		} | ||||
| 		mysql_free_result($result); | ||||
| 		return $arr; | ||||
| 
 | ||||
| 	} else { | ||||
| 		$errors[] = "Cannot get columns from table \"$tablename\". Error: " . mysql_error($link);
 | ||||
| 		return false; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||