/[corp_html]/back/phormation/misc_fcns.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /back/phormation/misc_fcns.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Fri Jan 26 17:53:58 2001 UTC (23 years, 3 months ago) by dpavlin
Branch: MAIN, dbp
CVS Tags: alpha, HEAD
Changes since 1.1: +0 -0 lines
alpha

1 <?
2 /*
3 * Phormation
4 * - A library of PHP code to make development of database-driven
5 * html forms easy and quick
6 *
7 * Copyright (C) 2000 Jason D. Hildebrand
8 * PeaceWorks Computer Consulting
9 *
10 * jason@peaceworks.ca
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
25 */
26
27
28 function add_var_to_url( $url, $keyvalue )
29 {
30 // add a key-value pair (such as "content=main" to a url)
31 if( ! strpos( $url, "?" ) ) {
32 $url .= "?" . $keyvalue;
33 } else {
34 $url .= "&" . $keyvalue;
35 }
36 return $url;
37 }
38
39
40 function lpad( $str, $length, $padchar )
41 {
42 $output = "";
43 $actuallen = strlen( $str );
44 for( $i = 0; $i < $length - $actuallen; $i++ ) {
45 $output .= $padchar;
46 }
47 $output .= $str;
48 return( $output );
49 }
50
51
52 function make_error( $str )
53 {
54 exit( "ERROR : $str<BR>" );
55 }
56 ?>

  ViewVC Help
Powered by ViewVC 1.1.26