Show index.php.in syntax highlighted
<?php
/* $Id: index.php.in 8856 2005-07-30 11:17:12Z daichik $
*
* IceWM homepage V2 script
*
* May 2001, maol, GPL
* Nov 2001 customized for Gtk-Gnutella by maol
*
*/
/* my definitions. we want them available in all subs... */
/****************************************************************
*
* general configuration variables are in here
*
*/
define(VERSION, "@@VERSION@@");
define(BASEDIR, "/home/groups/g/gt/gtk-gnutella/htdocs/files/");
define(NEWSMIN, 6);
define(NEWSMAX, 19);
/*
* end of user changeable variables
*
****************************************************************/
define(BASEURL, "$PHP_SELF");
define(GENDIR, "general/");
define(LANG, getlang());
/* ** hack ** fscking damn php won't use LANG in header() ** hack ** */
#$CHARSET[ru] = 'koi8-r';
$ru = $CHARSET[ru] = 'koi8-r';
if (isset($CHARSET[LANG])) {
# header("Content-Type: text/html; charset=$CHARSET[LANG]");
header("Content-Type: text/html; charset=$ru");
}
/* find out about the visitor's wish */
switch ($page) {
case "shots085":
define(TITLE, "Gtk-Gnutella 0.85 Screenshots");
iceinclude("header", 0);
icecontent("shots085");
iceinclude("footer", 0);
break;
case "shots090":
define(TITLE, "Gtk-Gnutella 0.90 Screenshots");
iceinclude("header", 0);
icecontent("shots090");
iceinclude("footer", 0);
break;
case "devel":
define(TITLE, "Gtk-Gnutella CVS and Changelog");
iceinclude("header", 0);
icecontent("devel");
iceinclude("footer", 0);
break;
case "mailing":
define(TITLE, "The Gtk-Gnutella Mailing Lists");
iceinclude("header", 0);
icecontent("mailing");
iceinclude("footer", 0);
break;
case "links":
define(TITLE, "Gnutella Links");
iceinclude("header", 0);
icecontent("links");
iceinclude("footer", 0);
break;
default: /* just send the frontpage */
define(TITLE, "Gtk-Gnutella - The Graphical Unix Gnutella Client");
iceinclude("header", 0);
icecontent("intro");
iceinclude("news", 0);
// icecontent("press");
iceinclude("footer", 0);
break;
}
/* getlang sub - check which language the visitor wants */
function getlang() {
global $cooklang, $lang, $HTTP_ACCEPT_LANGUAGE;
$accept = $HTTP_ACCEPT_LANGUAGE;
if (!isset ($lang)) { /* no language selection in http request */
if (isset ($cooklang)) { /* but a cookie is set */
$lang = $cooklang;
} else { /* not even a cookie. Choose from http_accept_language */
while ((empty($lang)) && (ereg("([a-z][a-z](-[A-Z][A-Z])?)",$accept,$res))) {
$lang = $res[1];
$accept = ereg_replace("$lang","",$accept);
}
if (!isset($lang)) { /* still no lang selected? take english */
$lang = "en";
}
}
}
setcookie("cooklang", $lang, time()+31536000);
return $lang;
}
/* icecontent sub - include the content files including pre and post files */
function icecontent($content) {
global $page; /* so the included files know about it */
// include(BASEDIR . GENDIR . "/cheader");
iceinclude($content, 1);
// include(BASEDIR . GENDIR . "/cfooter");
}
/* iceinclude sub - checks whether a file is available in the desired language */
function iceinclude($file, $box) {
global $page; /* so the included files know about it */
$incfile = BASEDIR . LANG . "/$file";
if (!file_exists($incfile)) {
$incfile = BASEDIR . "en/$file";
if (file_exists($incfile)) {
if ($box) { include(BASEDIR . GENDIR . "/cheader"); }
include("$incfile");
if ($box) { include(BASEDIR . GENDIR . "/cfooter"); }
}
} else {
if ($box) { include(BASEDIR . GENDIR . "/cheader"); }
include("$incfile");
if ($box) { include(BASEDIR . GENDIR . "/cfooter"); }
}
}
See more files for this project here
A GTK+ Gnutella client for Unix, efficient, reliable and fast, written in C. It has been optimized for speed and scalability, with low-memory consumption. It is meant to be left running 24x7, using little CPU and only the configured bandwidth.
Project homepage:
http://sourceforge.net/projects/gtk-gnutella
Programming language(s): C
License: other
de/
files/
de/
current_version
donate
faq
features
intro
links
mailing
news_44
news_45
news_46
news_47
news_48
news_49
news_bridge
news_header
news_old_header
searching_by_hash
sections
shots085
shots090
shots092
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
special_news
title
el/
bugreport_howto
code101
code101a
current_version
docs
donate
faq
features
intro
links
mailing
news_43
news_44
news_45
news_bridge
news_header
news_old_header
searching_by_hash
shots085
shots090
shots096u
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
special_news
title
en/
banners
bugreport_howto
code101
code101a
content.template
current_version
devel
developers_howto
docs
donate
faq
features
filtering_howto
footer
intro
links
mailing
news
news_0
news_1
news_10
news_11
news_12
news_13
news_14
news_15
news_16
news_17
news_18
news_19
news_2
news_20
news_21
news_22
news_23
news_24
news_25
news_26
news_27
news_28
news_29
news_3
news_30
news_31
news_32
news_33
news_34
news_35
news_36
news_37
news_38
news_39
news_4
news_40
news_41
news_42
news_43
news_44
news_45
news_46
news_47
news_48
news_49
news_5
news_50
news_51
news_52
news_53
news_6
news_7
news_8
news_9
news_bridge
news_header
news_old
news_old_header
news_template
release_history
searching_by_hash
sections
shots085
shots090
shots092
shots096u
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
special_news
title
fr/
current_version
docs
donate
features
intro
links
mailing
news_45
news_46
news_49
news_bridge
news_header
news_old_header
searching_by_hash
sections
shots085
shots090
shots092
shots096u
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
special_news
title
general/
cfooter
cheader
ja/
banners
bugreport_howto
code101
code101a
current_version
devel
developers_howto
docs
donate
faq
features
filtering_howto
intro
links
mailing
news_0
news_1
news_10
news_11
news_12
news_13
news_14
news_15
news_16
news_17
news_18
news_19
news_2
news_20
news_21
news_22
news_23
news_24
news_25
news_26
news_27
news_28
news_29
news_3
news_30
news_31
news_32
news_33
news_34
news_35
news_36
news_37
news_38
news_39
news_4
news_40
news_41
news_42
news_43
news_44
news_45
news_46
news_47
news_48
news_49
news_5
news_50
news_51
news_52
news_53
news_6
news_7
news_8
news_9
news_bridge
news_header
news_old_header
news_template
release_history
searching_by_hash
sections
shots085
shots090
shots092
shots096u
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
special_news
title
nl/
current_version
faq
intro
news_44
news_45
news_46
news_47
news_48
news_49
news_50
news_bridge
news_header
sections
sidenav
sidenav_conform
sidenav_copyright
sidenav_glade
sidenav_hosted
uk/
current_version
donate
intro
links
sidenav
sidenav_conform
sidenav_glade
sidenav_hosted
zh/
intro
news_45
news_header
sections
sidenav
.htaccess
VERSION
common.php
index.php
el/
files/
index.php
en/
files/
index.php
files/
de/
el/
en/
fr/
general/
ja/
nl/
uk/
zh/
.htaccess
VERSION
common.php
fr/
files/
index.php
images/
shots/
banner_chags.png
banner_dnar.png
banner_dnar1.png
banner_dnar2.png
banner_dnar3.png
banner_dnar4.png
banner_dnar6.png
banner_dnar7.png
banner_dnar8.png
banner_dnar9.png
banner_eqom14.png
banner_usuarios_balls.png
banner_usuarios_blue.png
banner_usuarios_leds_01.png
banner_usuarios_leds_02.png
banner_usuarios_planet.png
banner_usuarios_tree.png
cia.png
compression.jpg
favicon.png
gg.gif
gg.png
glade-banner.gif
glade-banner.png
gtk-gnutella.gif
gtk-gnutella.png
valid-css.png
valid-html401.png
ja/
files/
index.php
nl/
files/
index.php
tools/
sha1/
sha1sum/
sigs/
uk/
files/
index.php
zh/
files/
index.php
default.css
index.php
index.php.in
update_cvs