home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
oss
/
cvs-2004
/
bahasa
/
php
/
Web.php,v
< prev
Wrap
Text File
|
2003-10-26
|
7KB
|
308 lines
head 1.8;
access;
symbols
Initial:1.1.1.1 bule:1.1.1;
locks; strict;
comment @# @;
1.8
date 2003.10.26.01.53.09; author bule; state Exp;
branches;
next 1.7;
1.7
date 2003.10.17.00.39.35; author bule; state Exp;
branches;
next 1.6;
1.6
date 2003.10.06.00.39.26; author bule; state Exp;
branches;
next 1.5;
1.5
date 2003.09.02.07.07.24; author bule; state Exp;
branches;
next 1.4;
1.4
date 2003.08.31.00.02.48; author bule; state Exp;
branches;
next 1.3;
1.3
date 2003.08.19.06.08.57; author bule; state Exp;
branches;
next 1.2;
1.2
date 2003.08.18.19.06.01; author bule; state Exp;
branches;
next 1.1;
1.1
date 2003.08.12.19.18.23; author bule; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 2003.08.12.19.18.23; author bule; state Exp;
branches;
next ;
desc
@@
1.8
log
@*** empty log message ***
@
text
@<?
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// Project Name: Bahasa Indonesia Dictionary
// Directory: bahasa/php
// File Name: Web.php
// Author(s): John L. Whiteman
// Created: June 23, 2003
// Modified: October 22, 2003
// Description: This PHP class file contains various methods that handle
// common client web operations. This class file should
// reside outside of your web server's public virtual
// directories as a security precaution.
//
// Copyright (c) 2003 John L. Whiteman
//
// Permission is herby granted, free of charge, to any person obtaining a
// copy of this software, data, and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHERE IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING IN THE SOFTWARE.
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Web()
// get_date($timestamp)
// redirect($url)
// redirect_meta($url, $seconds=0);
// show_footer()
// show_logo($page_title="")
// strip($token)
// tohtml($token)
///////////////////////////////////////////////////////////////////////////////
class Web {
///////////////////////////////////////////////////////////////////////
//CLASS GLOBAL VARIABLES.
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//This is the class constructor.
///////////////////////////////////////////////////////////////////////
function Web() {
return;
}
///////////////////////////////////////////////////////////////////////
//Converts timestamp to date
///////////////////////////////////////////////////////////////////////
function get_date($timestamp) {
return(date("l, M j, Y [H:i:s]", $timestamp));
}
///////////////////////////////////////////////////////////////////////
//Redirects current web page to another URL
///////////////////////////////////////////////////////////////////////
function redirect($url) {
header("Location: $url");
exit;
}
///////////////////////////////////////////////////////////////////////
//Redirects current web page to another URL and using meta refresh.
//tag and seconds.
///////////////////////////////////////////////////////////////////////
function redirect_meta($url, $seconds=0) {
print
"<meta http-equiv=\"Refresh\" " .
"content=\"${seconds};url=${url}\">";
exit;
}
///////////////////////////////////////////////////////////////////////
//This method shows the footer, including copyright stuff.
///////////////////////////////////////////////////////////////////////
function show_footer() {
$dt = date("Y");
print
"<hr><div align=\"center\">\n" .
"<i><b><small>\n" .
"(c) Copyright 2003-${dt} John L. Whiteman.<br> " .
"An Open Source Dictionary Project" .
"</i></small></div><hr>\n";
return;
}
///////////////////////////////////////////////////////////////////////
//This method shows the sourceforge logo
///////////////////////////////////////////////////////////////////////
function show_logo($page_title="") {
print
"<h3>\n" .
"<a href=\"http://sourceforge.net\">\n" .
"<img src=\"http://sourceforge.net/sflogo.php?group_id=" .
"bahasa&type=1\" width=\"88\"\n" .
"height=\"31\" border=\"0\"\n" .
"alt=\"SourceForge.net Logo\" align=\"absmiddle\" /></a>\n" .
"<i>Bahasa Indonesia Dictionary</i>: " .
"${page_title}</h3>\n";
return;
}
///////////////////////////////////////////////////////////////////////
//Strip slashes from given token
///////////////////////////////////////////////////////////////////////
function strip($token) {
$token = trim($token);
$token = stripslashes($token);
$token = stripcslashes($token);
return($token);
}
///////////////////////////////////////////////////////////////////////
//Converts string taken from database to html format and returns it
///////////////////////////////////////////////////////////////////////
function tohtml($token) {
$token = stripslashes($token);
$token = stripcslashes($token);
$token = htmlspecialchars($token);
return($token);
}
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
?>
@
1.7
log
@*** empty log message ***
@
text
@d9 1
a9 1
// Modified: October 15, 2003
d79 1
a79 1
function redirect_meta($urls, $seconds=0) {
@
1.6
log
@*** empty log message ***
@
text
@d9 1
a9 1
// Modified: October 05, 2003
d41 2
a42 1
// show_logo()
d86 16
@
1.5
log
@*** empty log message ***
@
text
@d9 1
a9 1
// Modified: September 01, 2003
d41 1
d85 17
@
1.4
log
@*** empty log message ***
@
text
@d9 1
a9 1
// Modified: August 30, 2003
d41 1
d89 2
@
1.3
log
@*** empty log message ***
@
text
@d9 1
a9 1
// Modified: August 18, 2003
d83 11
@
1.2
log
@*** empty log message ***
@
text
@d2 34
@
1.1
log
@Initial revision
@
text
@d57 2
@
1.1.1.1
log
@Bahasa Indonesia Dictionary
@
text
@@