public function getMainNavigation()
{
$d = new Database();
$d->open('hacker_blog');
$sql = "SELECT * FROM navigation ";
if ($this->type == 'private') {
$sql .= " WHERE public = 0 ";
} else {
$sql .= " WHERE private = 1 ";
}
$s = $d->q($sql);
if ($s && $d->numrows() >= 1) {
$arr = array();
while ($r = $d->mfa()) {
//print_r($r);
array_push($arr, $r);
}
$this->messages = array("success" => "Found Navigation");
$this->current = $arr;
return $arr;
$d->close();
} else {
$this->messages = array("error" => "Could not Find Navigation");
$d->close();
return false;
}
}