function writeSearchBar()
{
    writeSectionHeader("Search The Nerdery");
    $frm = new Form("field", "searchForm", "search.php", "runSearch");
    $frm->addFormElement("search_term", "text", "Search For", "", true);
    $frm->method = "get";
    $frm->draw();
}
Example #2
0
?>


<br>
<table border="0" width="750" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<?php 
//print_r ($_SESSION["user"]);
//echo $_SESSION["user"]->userID;
if ($_SESSION["user"]->signatureFile == 1) {
    $sig_file = "/images/signatures/" . $_SESSION["user"]->userID . ".sig";
} else {
    $sig_file = "";
}
$frm = new Form("field", "editUser", "edit_user.php", "updateUser");
$frm->addFormElement("display_name", "text", "Display Name", $_SESSION["user"]->displayName, true);
$frm->addFormElement("signature_file", "file", "Signature File", "", false);
$frm->addFormElement("signature_image", "image", "Current Signature", $sig_file, false);
$frm->draw();
?>
		</td>
	</tr>
</table>

<?php 
WriteFooter();
$application->save();
?>

Example #3
0
            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();
Example #4
0
            $results = mysql_fetch_array($rs);
            $max_waster = $results["UserID"];
            //echo "max_waster: '" . $max_waster . "'";
            Application::getInstance()->setTopTimeWaster($max_waster);
            Application::getInstance()->save();
        }
    }
}
WriteHeader(1, "The Nerdery User Login");
?>

<br><br><br><br>

<?php 
if ($err_msg == 1) {
    echo "The user name '" . $_POST["user_id"] . "' was not found in our records.  Please try again.";
} else {
    if ($err_msg == 2) {
        echo "Incorrect password for user '" . $_POST["user_id"] . "'.  Please try again.";
    }
}
$frm = new Form("field", "loginForm", "login.php?r=" . $_GET["r"], "verifyUser");
$frm->addFormElement("user_id", "text", "User ID", "", "yes");
$frm->addFormElement("user_pwd", "password", "Password", "", "yes");
$frm->draw();
?>
<br><br><br><br><br><br><br><br><br><br><br><br>

<?php 
WriteFooter();
$application->save();
Example #5
0
session_start();
/*
 * get a reference to the application object
 */
$application =& Application::getInstance();
/*
 * Check for login
 */
if (strcmp($_SERVER["PHP_SELF"], '/login.php') != 0) {
    if ($_SESSION["ValidLogin"] != 1) {
        header("location: login.php?r=" . $_SERVER["PHP_SELF"]);
    }
}
WriteHeader(3, "Nerdery Home", "Search the Nerdery");
$frm = new Form("field", "searchForm", "search.php", "runSearch");
$frm->addFormElement("search_term", "text", "Search For", "", true);
$frm->method = "get";
$frm->draw();
echo "<br><div align=\"center\">";
if ($page_action == "runSearch") {
    // search lists
    $sql = "SELECT L.*, I.* FROM Lists AS L, ListItems AS I WHERE ListItemText LIKE '%" . $_GET["search_term"] . "%' AND L.ListID=I.ListID";
    $rs = mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql);
    writeSectionHeader("Lists and List Items");
    echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"700\">";
    if (mysql_num_rows($rs) > 0) {
        $class = "evenCell";
        $count = 0;
        while ($row = mysql_fetch_array($rs)) {
            $class = $class == "evenCell" ? "oddCell" : "evenCell";
            //http://nerderydev.theirvins.net/view_list_item.php?l=95&i=1493