writeCP(); $sh = new SectionHeader("Picture Galleries", true); $sh->start(); $sh->end(); echo '<table border="0" cellpadding="2" cellspacing="0" width="700">'; $each = getGalleries(); $i = 0; while ($g = $each[$i]) { //print_r ($g); if (strtotime($g->lastModified) > strtotime($_SESSION["PrevVisit"])) { $classname = "modifiedLink"; } else { $classname = "unmodifiedLink"; } echo "<tr><td colspan=\"2\"><a href=\"galleries.php?gid=" . $g->id . "\"><span class=\"" . $classname . "\">" . $g->name . "</span></a></td></tr><tr><td width=\"20\"></td><td width=\"680\"><span class=\"itemText\">" . $g->description . " (" . strtotime($g->lastModified) . " - " . strtotime($_SESSION["PrevVisit"]) . " - " . (strtotime($g->lastModified) > strtotime($_SESSION["PrevVisit"])) . ")</span></td></tr>"; $i++; } echo '</table><br>'; writeSectionHeader("Create a Gallery"); $frm = new Form("field", "createGallery", "galleries.php", "addGallery"); $frm->addDescription("All users can add pictures to public galleries."); $frm->addFormElement("is_public", "checkbox", "Public", true, true); $frm->addFormElement("gallery_name", "text", "Name", "", true); $frm->addFormElement("gallery_description", "textarea", "Description", "", true); $frm->method = "post"; $frm->draw(); } } } writeFooter(); $application->save();