Quantcast
Channel: Function Library - Sodapop Documentation
Viewing all articles
Browse latest Browse all 30

$sodapop->database->pageData($sodapop)

$
0
0
appData() retrieves all the info from the apps table for the given handle and packs it into the $app array.  If no app exists, it routes to a 404 app...  
Parameters: $sodapop - this is the applications primary class
Location: model.sodapop.php
public function pageData($sodapop) {
// Get the handle
$this->handle = $sodapop->getHandle();

// Get the app data from the table for this handle
$query = " select *
from pages
where handle = '$this->handle'";
$result = $this->getData($query);
while ($row= mysql_fetch_array($result, MYSQL_ASSOC)) { 
$page['id'] = $row['pageID'];
$page['name'] = $row['name'];
$page['handle'] = $row['handle'];
$page['getApp'] = $row['getApp'];
}

// So what happens if there is not a app for the handle?  We'll load the 404 app, that's what happens.
if (!$page['id']) {
$page['getApp'] = "404";
}

return $page;
}


Viewing all articles
Browse latest Browse all 30

Trending Articles