mirror of
				https://github.com/Mibew/java.git
				synced 2025-10-31 10:31:07 +03:00 
			
		
		
		
	escape ampersand, html 4.0 compatible page for old browsers, preview of error page
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@531 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									165edcf6c3
								
							
						
					
					
						commit
						155f238a1b
					
				
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -15,9 +15,9 @@ var FrameUtils = { | ||||
| 	var doc = this.getDocument(frm); | ||||
| 	doc.open(); | ||||
| 	doc.write("<html><head>"); | ||||
| 	doc.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\""+Chat.cssfile+"\" />"); | ||||
| 	doc.write("</head><body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0'>"); | ||||
| 	doc.write("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message' id='content'></td></tr></table><a id='bottom'/>"); | ||||
| 	doc.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\""+Chat.cssfile+"\">"); | ||||
| 	doc.write("</head><body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400'>"); | ||||
| 	doc.write("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message' id='content'></td></tr></table><a id='bottom'></a>"); | ||||
| 	doc.write("</body></html>"); | ||||
| 	doc.close(); | ||||
| 	frm.onload = function() { | ||||
|  | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -160,22 +160,25 @@ function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agen | ||||
| 		$output = get_messages($threadid,"html",$isuser,$lastid); | ||||
| 
 | ||||
| 		start_html_output(); | ||||
| 		$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); | ||||
| 		$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); | ||||
| 
 | ||||
| 		print("<html><head>\n". | ||||
| 			"<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/styles/default/chat.css\" />\n". | ||||
| 			"<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 		print( | ||||
| 			"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">". | ||||
| 			"<html>\n<head>\n". | ||||
| 			"<link href=\"$webimroot/styles/default/chat.css\" rel=\"stylesheet\" type=\"text/css\">\n". | ||||
| 			"<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 			"<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | ||||
| 			"</head>". | ||||
| 			"<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">". | ||||
| 			"<title>chat</title>\n". | ||||
| 			"</head>\n". | ||||
| 			"<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">". | ||||
| 			"<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" ); | ||||
| 
 | ||||
| 		 | ||||
| 		foreach( $output as $msg ) { | ||||
| 			print $msg; | ||||
| 		} | ||||
| 
 | ||||
| 		print( | ||||
| 			"</td></tr></table><a name='aend'>". | ||||
| 			"</td></tr></table><a name='aend'></a>". | ||||
| 			"</body></html>" ); | ||||
| 	} | ||||
| } | ||||
| @ -317,11 +320,11 @@ function setup_chatview_for_user($thread,$level) { | ||||
| 		$page['ignorectrl'] =  0; | ||||
| 	} | ||||
| 
 | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['mailLink'] = "$webimroot/client.php?".$params."&level=$level&act=mailthread"; | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['mailLink'] = "$webimroot/client.php?".$params."&level=$level&act=mailthread"; | ||||
| 
 | ||||
| 	if($settings['enablessl'] == "1" && !is_secure_request()) { | ||||
| 		$page['sslLink'] = get_app_location(true, true)."/client.php?".$params."&level=$level"; | ||||
| 		$page['sslLink'] = get_app_location(true, true)."/client.php?".$params."&level=$level"; | ||||
| 	} | ||||
| 
 | ||||
| 	$page['isOpera95'] = is_agent_opera95(); | ||||
| @ -374,7 +377,7 @@ function setup_chatview_for_operator($thread,$operator) { | ||||
| 	} | ||||
| 
 | ||||
| 	if($settings['enablessl'] == "1" && !is_secure_request()) { | ||||
| 		$page['sslLink'] = get_app_location(true, true)."/operator/agent.php?thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 		$page['sslLink'] = get_app_location(true, true)."/operator/agent.php?thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	} | ||||
| 	$page['isOpera95'] = is_agent_opera95(); | ||||
| 	$page['neediframesrc'] = needsFramesrc(); | ||||
| @ -386,8 +389,8 @@ function setup_chatview_for_operator($thread,$operator) { | ||||
| 		$predefinedres .= "<option>".htmlspecialchars(topage($answer['vcvalue']))."</option>"; | ||||
| 	} | ||||
| 	$page['predefinedAnswers'] = $predefinedres; | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['redirectLink'] = "$webimroot/operator/agent.php?".$params."&act=redirect"; | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['redirectLink'] = "$webimroot/operator/agent.php?".$params."&act=redirect"; | ||||
| 
 | ||||
| 	$page['namePostfix'] = ""; | ||||
| } | ||||
|  | ||||
| @ -434,10 +434,10 @@ function get_gifimage_size($filename) { | ||||
| function add_params($servlet, $params) { | ||||
| 	$infix = '?'; | ||||
| 	if( strstr($servlet,$infix) !== FALSE ) | ||||
| 		$infix = '&'; | ||||
| 		$infix = '&'; | ||||
| 	foreach($params as $k => $v) { | ||||
| 		$servlet .= $infix.$k."=".$v; | ||||
| 		$infix = '&'; | ||||
| 		$infix = '&'; | ||||
| 	} | ||||
| 	return $servlet; | ||||
| } | ||||
|  | ||||
| @ -30,14 +30,19 @@ function demo_process_thread($act,$outformat,$lastid,$isuser,$canpost,$istyping, | ||||
| 			print("<thread lastid=\"$lastid\" typing=\"".($istyping ? 1 : 0)."\" canpost=\"".($canpost ? 1 : 0)."\">"); | ||||
| 		} else { | ||||
| 			start_html_output(); | ||||
| 			$url = "$webimroot/thread.php?act=refresh&thread=0&token=123&html=on&user=".($isuser?"true":"false"); | ||||
| 			print("<html><head>\n". | ||||
| 				"<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/styles/default/chat.css\" />\n". | ||||
| 				"<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 			$url = "$webimroot/thread.php?act=refresh&thread=0&token=123&html=on&user=".($isuser?"true":"false"); | ||||
| 			 | ||||
| 			print( | ||||
| 				"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">". | ||||
| 				"<html>\n<head>\n". | ||||
| 				"<link href=\"$webimroot/styles/default/chat.css\" rel=\"stylesheet\" type=\"text/css\">\n". | ||||
| 				"<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 				"<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | ||||
| 				"</head>". | ||||
| 				"<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0'>". | ||||
| 				"<title>chat</title>\n". | ||||
| 				"</head>\n". | ||||
| 				"<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400'>". | ||||
| 				"<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" ); | ||||
| 			 | ||||
| 		} | ||||
| 		if($lastid == 1) { | ||||
| 			demo_print_message( | ||||
| @ -70,7 +75,7 @@ function demo_process_thread($act,$outformat,$lastid,$isuser,$canpost,$istyping, | ||||
| 			print("</thread>"); | ||||
| 		} else { | ||||
| 			print( | ||||
| 				"</td></tr></table><a name='aend'>". | ||||
| 				"</td></tr></table><a name='aend'></a>". | ||||
| 				"</body></html>" ); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| @ -38,10 +38,10 @@ if(!in_array($preview, $stylelist)) { | ||||
| 	$preview = $stylelist[0]; | ||||
| } | ||||
| 
 | ||||
| $show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", ""); | ||||
| $show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat|error)$/", ""); | ||||
| $showerrors = verifyparam("showerr", "/^on$/", "") == "on"; | ||||
| $errors = array(); | ||||
| if($showerrors) { | ||||
| if($showerrors || $show == 'error') { | ||||
| 	$errors[] = "Test error"; | ||||
| } | ||||
| 
 | ||||
| @ -59,7 +59,7 @@ if($show == 'survey') { | ||||
| 	expand("../styles", "$preview", "$show.tpl"); | ||||
| 	exit; | ||||
| } | ||||
| if($show == 'mailsent') { | ||||
| if($show == 'mailsent' || $show == 'error') { | ||||
| 	$page['email'] = "admin@yourdomain.com"; | ||||
| 	setup_logo(); | ||||
| 	expand("../styles", "$preview", "$show.tpl"); | ||||
| @ -101,6 +101,7 @@ $templateList = array( | ||||
| 	array('label' => getlocal("page.preview.redirected"), 'id' => 'redirected', 'h' => 480, 'w' => 640), | ||||
| 	array('label' => getlocal("page.preview.agentchat"), 'id' => 'agentchat', 'h' => 480, 'w' => 640), | ||||
| 	array('label' => getlocal("page.preview.agentrochat"), 'id' => 'agentrochat', 'h' => 480, 'w' => 640), | ||||
| 	array('label' => getlocal("page.preview.error"), 'id' => 'error', 'h' => 480, 'w' => 640), | ||||
| ); | ||||
| 
 | ||||
| $template = verifyparam("template", "/^\w+$/", "chat"); | ||||
| @ -115,7 +116,7 @@ $page['availableTemplates'] = array( | ||||
| 	"survey", "leavemessage", "leavemessagesent", | ||||
| 	"mail", "mailsent", | ||||
| 	"redirect", "redirected", | ||||
| 	"agentchat", "agentrochat", | ||||
| 	"agentchat", "agentrochat", "error", | ||||
| 	"all"); | ||||
| 
 | ||||
| $page['showlink'] = "$webimroot/operator/themes.php?preview=$preview&".($showerrors?"showerr=on&":"")."show="; | ||||
|  | ||||
| @ -19,7 +19,7 @@ $page['menuid'] = "users"; | ||||
| 
 | ||||
| function tpl_header() { global $page, $webimroot; | ||||
| ?>	
 | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/common.js?v=160a1"></script> | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/common.js?v=161"></script> | ||||
| <script type="text/javascript" language="javascript"><!-- | ||||
| var localized = new Array( | ||||
|     "<?php echo getlocal("pending.table.speak") ?>", | ||||
| @ -34,7 +34,7 @@ var updaterOptions = { | ||||
| 	agentservl:"<?php echo $webimroot ?>/operator/agent.php", | ||||
| 	noclients:"<?php echo getlocal("clients.no_clients") ?>", havemenu: <?php echo $page['havemenu'] ?>, showpopup: <?php echo $page['showpopup'] ?> };
 | ||||
| //--></script>
 | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/users.js?v=160a1"></script> | ||||
| <script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/users.js?v=161"></script> | ||||
| <?php | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user