This file is indexed.

/usr/share/IlohaMail/include/javascript.inc is in ilohamail 0.8.14-0rc3sid6.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
/////////////////////////////////////////////////////////
//	
//	include/javascript.inc
//
//	(C)Copyright 2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
//
//		This file is part of IlohaMail.
//		IlohaMail is free software released under the GPL 
//		license.  See enclosed file COPYING for details,
//		or see http://www.fsf.org/copyleft/gpl.html
//
/////////////////////////////////////////////////////////

/********************************************************

	AUTHOR: Ryo Chijiiwa <ryo@ilohamail.org>, Jeroen van der Vegt <jeroen@ilohamail.org>
	FILE:  include/javascript.inc
	PURPOSE:
		Display JavaScript (included from header_main.inc)
	COMMENTS:
		Assume that no global vars are available at this
		stage.  Anything that requires embedded PHP vars
		should be passed as JS parameters.
	
********************************************************/

$current_page = $_SERVER["PHP_SELF"];
$pos = strrpos($current_page, "/");
if ($pos !== false){
	$current_page = substr($current_page, $pos+1);
}

echo "\n<!-- $current_page //-->\n";


if (strpos($current_page, "main.php")!==false){
?>
		<SCRIPT type="text/javascript" language="JavaScript1.2">
		function SelectAllMessages(val) {
		    for (var i = 0; i < document.messages.elements.length; i++) {
				if(document.messages.elements[i].type == 'checkbox') {
					document.messages.elements[i].checked = !(document.messages.elements[i].checked);
					document.messages.elements[i].checked = val;
				}
		    }
		}
		</SCRIPT>

<?php
}else if (strpos($current_page, "compose2.php")!==false){
?>
		<script type="text/javascript" language="JavaScript1.2">
		var contacts_popup_visible=false;
		var contacts_popup;
		function CopyAdresses() {
			switch (document.forms[0].to_a_field.selectedIndex) {
			case 1:
				var target = document.forms[0].cc;
				break;
			case 2:
				var target = document.forms[0].bcc;
				break;
			default:
				var target = document.forms[0].to;
			}
			var selbox=document.forms[0].elements['to_a[]'];
			for (var i=0; selbox.length>i; i++) {
				if ((selbox.options[i].selected == true) &&
		 		 (target.value.indexOf(selbox.options[i].text, 0)==-1)) { //A check to prevent adresses from getting listed twice.
					if (target.value != '') 
						target.value += ', ';
					target.value += selbox.options[i].text;
				}
			}
		}
		
		function DeselectAdresses() {
			var selbox = document.forms[0].elements['to_a[]'];
			if (selbox) {
				for (var i=0; selbox.length>i; i++)
					selbox.options[i].selected = false;
			}
		}
		
		function DoCloseWindow(redirect_url){
			if(parent.frames.length!=0){
				parent.list2.location=redirect_url;
			}else{
				window.close();
			}
		}		
		
		function fixtitle(title_str) {
			if (document.forms[0].subject.value=='')
				document.title=title;
			else
				document.title=title_str+": "+document.forms[0].subject.value;
		}
		
		function open_popup(comp_uri) {
			if (comp_uri) {
				if (contacts_popup_visible==false) {
					if (document.forms[0].cc) comp_uri += "&cc=1";
					if (document.forms[0].bcc) comp_uri += "&bcc=1";
					contacts_popup = window.open(comp_uri, "_blank","width=500,height=500,scrollbars=yes,resizable=yes");
					if (contacts_popup.opener == null)
					contacts_popup.opener = window;
				}
				contacts_popup.focus();
			}
			return;
		}
		
  		function close_popup(){
			if (contacts_popup_visible)
  				contacts_popup.close();
  		}

		</SCRIPT>
<?php
}else if (strpos($current_page, "contacts_popup.php")!==false){
?>
		<script type="text/javascript" language="JavaScript1.2">
		var contacts;
		function gettarget() {
			switch (document.contactsopts.to_a_field.selectedIndex) {
			case 1:
				var target = opener.document.forms[0].cc;
				break;
			case 2:
				var target = opener.document.forms[0].bcc;
				break;
			default:
				var target = opener.document.forms[0].to;
			}
			return target;
		}

		function addcontact(address) {
			var target = gettarget();
			if (target.value.indexOf(address, 0)==-1) { //A check to prevent adresses from getting listed twice.
				if (target.value != '') target.value += ', ';
				target.value += address;
			}
		}
		
		function addcontact2(id) {
			for (var i=0; i<contacts.length; i++) {
				if (id==contacts[i][0])
					addcontact("\""+contacts[i][1]+"\" <"+contacts[i][2]+">");
			}
		}
		
		function addgroup(group) {
			for (var i=0; i<contacts.length; i++) {
				if (group==contacts[i][3])
					addcontact("\""+contacts[i][1]+"\" <"+contacts[i][2]+">");
			}
		}

		function acknowledge_popup() {
			opener.contacts_popup_visible=true;
		}
		
		function alert_close() {
			opener.contacts_popup_visible=false;
		}
		</script>
<?php
}else if (strpos($current_page, "prefs.php")!==false){
?>
		<script type="text/javascript" language="JavaScript1.2">
		var colprefs_popup_visible=false;
		var colprefs_popup;

		
		function open_popup(comp_uri) {
			if (comp_uri) {
				if (colprefs_popup_visible==false) {
					colprefs_popup = window.open(comp_uri, "_blank","width=350,height=350,scrollbars=yes,resizable=yes");
					if (colprefs_popup.opener == null)
					colprefs_popup.opener = window;
				}
				colprefs_popup.focus();
			}
			return;
		}
		
  		function close_popup(){
			if (colprefs_popup_visible)
  				colprefs_popup.close();
  		}

		</SCRIPT>
<?php
}
?>