1 |
jonen |
1.1 |
<?php |
2 |
|
|
/** |
3 |
|
|
* This file contains helper functions related |
4 |
|
|
* to framesets and frames |
5 |
|
|
* |
6 |
jonen |
1.4 |
* $Id: frame_utils.inc,v 1.4 2003/09/15 21:58:23 hemna Exp $ |
7 |
jonen |
1.1 |
* |
8 |
|
|
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
9 |
|
|
* @package phpHtmlLib |
10 |
|
|
* |
11 |
|
|
*/ |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
/** |
15 |
|
|
* This function is used to build a |
16 |
|
|
* FRAMESETtag object with the most |
17 |
|
|
* common attributes. |
18 |
|
|
* NOTE: It comes with the following attributes |
19 |
|
|
* defaulted to: |
20 |
|
|
* framespacing = "0" |
21 |
|
|
* frameborder = "no" |
22 |
|
|
* |
23 |
|
|
* @param string - $rows - the rows attribute |
24 |
|
|
* @param string - $cols - the cols attribute |
25 |
|
|
* @param int - $border - the border attribute |
26 |
|
|
* @return FRAMESETtag object |
27 |
|
|
*/ |
28 |
jonen |
1.4 |
function html_frameset( $rows, $cols, $border="0" ) { |
29 |
jonen |
1.1 |
|
30 |
|
|
$attributes = array("border" => $border, |
31 |
jonen |
1.4 |
"framespacing" => "0", |
32 |
|
|
"frameborder" => "no", |
33 |
|
|
"rows" => $rows, |
34 |
|
|
"cols" => $cols); |
35 |
jonen |
1.1 |
|
36 |
|
|
return new FRAMESETtag( $attributes ); |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
/** |
40 |
|
|
* This function is used to build a |
41 |
|
|
* FRAMEtag object with some common attributes |
42 |
|
|
* already set. |
43 |
|
|
* NOT: this comes with the following attribtes |
44 |
|
|
* defaulted to: |
45 |
|
|
* marginwidth = "0" |
46 |
|
|
* marginheight = "0" |
47 |
|
|
* noresize |
48 |
|
|
* frameborder = "0" |
49 |
|
|
* |
50 |
|
|
* @param string - $name - the "name" attribute |
51 |
|
|
* @param string - $src - the "src" atribute |
52 |
|
|
* @param string - $scrolling - the "scrolling" attribute |
53 |
|
|
* @return FRAMEtag object. |
54 |
|
|
*/ |
55 |
|
|
function html_frame( $name, $src, $scrolling="no") { |
56 |
|
|
|
57 |
|
|
$attributes = array("name" => $name, |
58 |
|
|
"src" => $src, |
59 |
|
|
"scrolling" => $scrolling, |
60 |
jonen |
1.4 |
"marginwidth" => "0", |
61 |
|
|
"marginheight" => "0", |
62 |
jonen |
1.1 |
"noresize", |
63 |
|
|
"frameborder" => "no"); |
64 |
|
|
|
65 |
|
|
return new FRAMEtag( $attributes ); |
66 |
|
|
} |
67 |
|
|
|
68 |
|
|
|
69 |
|
|
?> |