"; foreach($images as $image){ $select .= "\n"; } $select .= ""; $html = "
Enable:
Image: {$select}
Message:
"; $page->set_title("Tips List"); $page->set_heading("Tips List"); $page->add_block(new NavBlock()); $page->add_block(new Block("Add Tip", $html, "main", 10)); } public function showTip($url, $tip) { global $page; $img = ""; if(!empty($tip['image'])) { $img = " "; } $html = "
".$img.$tip['text']."
"; $page->add_block(new Block(null, $html, "subheading", 10)); } public function showAll($url, $tips){ global $user, $page; $html = "". "". "". "". "". ""; if($user->is_admin()){ $html .= ""; } $html .= ""; $n = 0; foreach ($tips as $tip) { $oe = ($n++ % 2 == 0) ? "even" : "odd"; $tip_enable = ($tip['enable'] == "Y") ? "Yes" : "No"; $set_link = "".$tip_enable.""; $html .= "". "". "". ( empty($tip['image']) ? "" : "" ). ""; $del_link = "Delete"; if($user->is_admin()){ $html .= ""; } $html .= ""; } $html .= "
IDEnabledImageTextAction
".$tip['id']."".$set_link."".$tip['text']."".$del_link."
"; $page->add_block(new Block("All Tips", $html, "main", 20)); } } ?>