Subdomain Posts
None | 1 day ago
None | 1 day ago
None | 762 days ago
None | 762 days ago
None | 787 days ago
Recent Posts
None | 14 sec ago
Bash | 17 sec ago
None | 36 sec ago
None | 38 sec ago
VisualBasic | 46 sec ago
None | 59 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Oberon 2 | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By matt on the 24th of Jan 2008 12:52:54 PM
Download |
Raw |
Embed |
Report
CLASS
ARRAY
has all the fiels in the mySQL table, so we can filter the REQUEST information
get($what)
{
switch templete
1 - select * from there where this
2 - select * from there where this and this
query the database
return the $result from the query
}
show($what, $template, $name)
{
switch template
1--------
sub headers($name) etc and any DIVS required
$result = CALL get($what)
$markup = display($result, $template)
$markup .= any other markup required, e.g. more div, subheaderEnd etc.
---------------------
2--------
etc etc
----------------------
end switch
return $markup
}
display($template, $result)
{
global $db;
SWITCH TEMPLATE
$out = '';
while($obj = mysqli_fetch_object($result))
{
$out .= $this->rowDesign($obj);
}
$out .= 'any required markup';
return $out;
}
rowDesign($template, $obj)
{
SWITCH TEMPLATE
the design for a single entry
return $rowMarkup
}
simpleGet($which)
{
returns a basic query - returns a $obj or the result, ready to use.
}
simpleAdd($_REQUEST)
{
add a new entry
}
simpleUpdate($_REQUEST, $IDtoUpdate)
{
updates an entry
}
Submit a correction or amendment below.
Make A New Post