File: anotherDtc.php

package info (click to toggle)
dtc 0.35.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 18,824 kB
  • sloc: php: 50,739; sh: 8,596; makefile: 572; perl: 148; xml: 25
file content (272 lines) | stat: -rw-r--r-- 9,822 bytes parent folder | download
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<?php
/**
 * @package DTC
 * @version $Id: anotherDtc.php,v 1.38 2007/02/05 06:46:39 thomas Exp $
 * @abstract language chose link/images
 * 
 * Added swedish to project languages
 * if posible translate to swedish.
 * $Log: anotherDtc.php,v $
 * Revision 1.38  2007/02/05 06:46:39  thomas
 * Better drawings on IE too. Work still in progress...
 *
 * Revision 1.37  2006/08/07 20:53:00  thomas
 * Added VPS renewal. Still have to validate payment by hand, but working
 * well appart from that.
 *
 * Revision 1.36  2006/05/21 12:52:41  seeb
 * Change dispaly bug
 *
 * Revision 1.35  2006/05/21 01:01:26  seeb
 * $txt_documentation added
 *
 * Revision 1.34  2006/05/21 00:20:00  seeb
 * *** empty log message ***
 *
 * Revision 1.33  2006/05/20 23:47:40  seeb
 * Adding swedish
 *
 */
function anotherLanguageSelection(){
	global $lang;
	global $rub;

	// Language selection box
	$out = "
<div align=\"right\">
<table cellpadding=\"0\" cellspacing=\"4\">
<tr><td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=fr&rub=$rub\">FR
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/fr.gif\"></a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=en&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/en.gif\">&nbsp;EN</a></td>
<td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=nl&rub=$rub\">NL
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/nl.gif\"></a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=ru&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/ru.gif\">&nbsp;RU</a></td>
<td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=pt&rub=$rub\">PT
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/pt.gif\"></a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=hu&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/hu.gif\">&nbsp;HU</a></td>
<td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=pt_BR&rub=$rub\">BR
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/pt_br.gif\"></a></td>
</tr><tr><td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=es&rub=$rub\">ES
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/es.gif\"></a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=de&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/de.gif\">&nbsp;DE</a></td>
<td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=it&rub=$rub\">IT
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/it.gif\"></a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=zh&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/zh.gif\">&nbsp;ZH</a></td>
<td valign=\"center\" nowrap>
	<a href=\"?change_language=zh_TW&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/tw.gif\">&nbsp;TW</a></td>
<td align=\"right\" valign=\"center\" nowrap>
	<a href=\"?change_language=pl&rub=$rub\">PL
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/pl.png\"></a></td>
<td><a href=\"?change_language=fi&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/fi.gif\">&nbsp;FI</a></td>
<td><a href=\"?change_language=lv&rub=$rub\">
	<img width=\"16\" height=\"11\" alt=\"*\" border=\"0\" src=\"gfx/language/lv.gif\">&nbsp;LV</a></td>
</tr></table>
</div>
";
	return $out;
}

$confirm_javascript="
<script language=\"JavaScript\" type=\"text/javascript\">

function dtc_js_confirm(text,url){
	if(window.confirm(text)){
		document.location = url;
	}
}

</script>
";
function dtcJavascriptConfirmLink($text,$url){
	global $conf_use_javascript;

	if($conf_use_javascript == "no"){
		return $url;
	}else{
		return "javascript:dtc_js_confirm('$text','$url')";
	}
}


function anotherFooter($content){
	global $lang;

	$sponsors_inside = "<center><font face=\"Arial\" size=\"-2\">
<i>Most of code done by:
<a target=\"_blank\" href=\"mailto:thomas [ at ] goirand.fr\">Thomas GOIRAND</a>, under
<a target=\"_blank\" href=\"http://www.gnu.org/copyleft/lesser.txt\">LGPL</a>. Please visit <a
target=\"_blank\" href=\"http://www.gplhost.com\">GPLHost</a> and <a
target=\"_blank\" href=\"http://www.gplhost.com/software-dtc.html\">DTC home</a> for more infos.</i></font>
</center>
";

	return $sponsors_inside;
}

function anotherTopBanner($inside,$drawLanguageSelect="no"){
	global $conf_dtc_version;
	global $conf_dtc_release;
	global $conf_unix_type;
	global $adm_login;
	global $adm_email_login;
	global $panel_type;	

	global $conf_panel_title;
	global $conf_panel_subtitle;
	global $conf_panel_logo;
	global $conf_panel_logolink;
	
	global $conf_skin;
	global $dtcshared_path;
	
	$nowrap = " style=\"white-space:nowrap\" valign=\"top\" nowrap ";
	if($drawLanguageSelect=="yes"){
		$zeLanguage = "
	<td valign=\"top\">&nbsp;</td>
	<td $nowrap width=\"1\">".anotherLanguageSelection()."</td>";
		$links = "<a target=\"_blank\" href=\"/dtcdoc/\">". _("Documentation") ."</a> <a target=\"_blank\" href=\"/phpmyadmin/\">". _("PhpMyAdmin") . "</a>";
	}else{
		$links = "";
		$zeLanguage = "";
	}


	if($panel_type == "admin"){
		$display_user = $_SERVER["PHP_AUTH_USER"];
	}else if($panel_type == "client"){
		$display_user = $adm_login;
	}else if($panel_type == "email"){
		$display_user = $adm_email_login;
	}else{
		$display_user = "";
	}

	$pagetop_filename = $dtcshared_path.'/gfx/skin/'.$conf_skin.'/pagetop.html';
	if(file_exists($pagetop_filename)){
		$fp = fopen($pagetop_filename,"r");
		$inside = fread($fp,filesize($pagetop_filename));
		fclose($fp);
		// Enable possible customization of the title and logos
		if($conf_panel_title == "default"){
			$inside = str_replace("__DTC_TITLE__", _("Domain Technologie Control") ,$inside);
		}else{
			$inside = str_replace("__DTC_TITLE__", $conf_panel_title ,$inside);
		}
		if($conf_panel_subtitle == "default"){
			$inside = str_replace("__DTC_SUBTITLE__", _("Take control of your domain name") ,$inside);
		}else{
			$inside = str_replace("__DTC_SUBTITLE__", $conf_panel_subtitle ,$inside);
		}
		if($conf_panel_logo == "default"){
			// Prefer a default logo in PNG format
			$panel_logo = "gfx/skin/".$conf_skin."/gfx/logo_dtc.png";
			if (!file_exists($dtcshared_path."/".$panel_logo)) {
				// fall-back to GIF format
				$panel_logo = "gfx/skin/".$conf_skin."/gfx/logo_dtc.gif";
			}
			$inside = str_replace("__DTC_LOGO__", $panel_logo ,$inside);
		}else{
			$inside = str_replace("__DTC_LOGO__", "gfx/skin/".$conf_skin."/gfx/". $conf_panel_logo ,$inside);
		}
		if($conf_panel_logolink == "default"){
			$inside = str_replace("__DTC_LOGOLINK__", "http://www.gplhost.com/software-dtc.html", $inside);
		}else{
			$inside = str_replace("__DTC_LOGOLINK__", $conf_panel_logolink, $inside);
		}
		$inside = str_replace("__DTC_LANGUAGES_LINKS__",$zeLanguage,$inside);
		$inside = str_replace("__DTC_VERSION__","V$conf_dtc_version R$conf_dtc_release - $conf_unix_type",$inside);
		$inside = str_replace("__DTC_LINK__",$links,$inside);
		$inside = str_replace("__AUTH_USER__",_("Logged in as:") . " " . $display_user,$inside);
		$inside = str_replace("__DOCUMENTATION__",_("Documentation"),$inside);
		$inside = str_replace("__PHPMYADMIN__",_("PhpMyAdmin"),$inside);
		$inside .= "<script language=\"JavaScript\" type=\"text/javascript\" src=\"gfx/wz_tooltip.js\"></script>";
		return $inside;
	}else{
		return "
<script language=\"JavaScript\" type=\"text/javascript\" src=\"gfx/wz_tooltip.js\"></script>
<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\" height=\"1\">
<tr>
	<td $nowrap><center><a href=\"http://www.gplhost.com/software-dtc.html\"><img border=\"0\" alt=\"Domain Teck Control\" src=\"gfx/dtc_logo_small.gif\"></a><br>
<font size=\"-2\" face=\"Arial\">V$conf_dtc_version R$conf_dtc_release - $conf_unix_type</font></center></td>
	<td $nowrap><center><b><font size=\"+1\" face=\"Verdana\">Domain Technologie Control</font></b><br>
<font size=\"-1\"><i>". _("Take control of your domain name") ."</i></font><br>$links</center></td>
	<td $nowrap width=\"100%\">&nbsp;</td>".$zeLanguage."
</tr>
</table>
";
	}
}

function anotherPage($title,$meta,$java_script,$onloads,$banner,$menu,$content,$footer){
	global $page_metacontent;
	global $conf_skin;
	global $dtcshared_path;

	global $skinCssString;
	global $confirm_javascript;

	if(file_exists($dtcshared_path.'/gfx/skin/'.$conf_skin.'/bgcolor.php')){
		include($dtcshared_path.'/gfx/skin/'.$conf_skin.'/bgcolor.php');
	}else{
		$body_tag = "<link rel=\"stylesheet\" href=\"gfx/dtc.css\" type=\"text/css\">
<body bgcolor=\"#74748A\" text=\"#FFFFFF\" leftmargin=\"0\"
topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
	}

return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>DTC: $title ".$_SERVER['SERVER_NAME']."</title>
$page_metacontent
$meta
</head>

$onloads
$confirm_javascript
$java_script
$skinCssString

$body_tag

<table width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\">
<tr><td width=\"100%\" height=\"1\">$banner</td></tr>
<tr><td width=\"100%\" height=\"1\">$menu</td></tr>
<tr><td width=\"100%\" height=\"1\" valign=\"top\">$content</td></tr>
<tr><td width=\"100%\" height=\"100%\">&nbsp;<br><br></td></tr>
<tr><td width=\"100%\" height=\"1\">$footer</td></tr>
</table>
</html>";
}

function anotherLeftFrame($left,$right){
	return "
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\">
<tr><td valign=\"top\" width=\"1\">
	$left
</td><td valign=\"top\">
	$right
</td></tr>
</table>
";
}


?>