function writeSectionHeader($title, $cp = false)
{
    $sh = new SectionHeader($title, $cp);
    $sh->start();
    $sh->end();
}
Example #2
0
     if ($gallery->isPublic || $gallery->creator == $_SESSION["UserID"]) {
         // form for creating an album
         writeSectionHeader("Create an Album");
         $frm = new Form("field", "createAlbum", "galleries.php?gid=" . $_GET["gid"], "addAlbum");
         $frm->addHidden("gid", $_GET["gid"]);
         $frm->addFormElement("album_name", "text", "Name", "", true);
         $frm->addFormElement("album_description", "textarea", "Description", "", true);
         $frm->addFormElement("album_files", "file", "Zip File", "", true);
         $frm->method = "post";
         $frm->draw();
     }
 } else {
     writeHeader(3, "Nerdery Pictures", "Picture Galleries");
     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>';