-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic_lib.php
More file actions
76 lines (65 loc) · 1.89 KB
/
Copy pathbasic_lib.php
File metadata and controls
76 lines (65 loc) · 1.89 KB
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
<?php
/**
* Basic header stuff.
*/
function head(){
$string = "<!DOCTYPE HTML>";
$string .= "<head> <title> Book Swap </title>";
$string .= "<link rel='stylesheet' type='text/css' href='style.css' />";
/** STYLES WILL GO HERE **/
$string .= "</head>";
$string .= "<body>";
return $string;
}
/**
* Basic Div Styling will go here
*/
function pre_content(){
$string = "<div id='contain'>";
$string .= "<div id='header'> <h1>BookSwap</h1> <h4>Share your books with Friends!</h4></div>";
return $string;
}
/**
* Positions given content into div.
*/
function fit_content( $content ){
return $content;
}
/**
* Takes username and formats userdata for it.
*/
function format_user( $username ){
$thisuser = new UserParse( $username );
$userImg = $thisuser->get_image();
$userName = $thisuser->get_fullname();
$userBooks = $thisuser->get_booklist();
$userNumB = $thisuser->get_numbooks();
$string = "<div class='user'>";
$string .= "<div class='info'>";
$string .= $userImg;
$string .= "<div class='deets'>";
$string .= "<h2>".$userName."</h2>";
$string .= "<h3>".$userNumB." Books </h3>";
$string .= "</div>";
$string .= "</div>";
$string .= "<div class='books'>".$userBooks."</div>";
$string .= "</div>";
return $string;
}
/**
* Basic end-Div Styling goes here.
*/
function post_content(){
$string = "<div id='footer'>BookSwap 2011. Emily Egeland</div>";
$string .= "</div>";
return $string;
}
/**
* Basic footer stuff.
*/
function footer(){
$string = "</body>";
$string .= "</html>";
return $string;
}
?>