示例#1
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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(1, "Nerdery Voting");
writeCP();
?>

<table border="0" width="750" cellpadding="0" cellspacing="0">
	<tr>
		<td width="25" background="images/section.header.bg.gif"><img height="32" width="25" src="images/section.header.w.gif"></td>
		<td width="700" background="images/section.header.bg.gif">
			<span class="boldWhiteMediumText">
				Your fellow Nerderyers
			</span>
		</td>
		<td width="25"><img border="0" height="32" width="25" src="images/section.header.e.gif"></td>
	</tr>
	<tr>
		<td colspan="3">
示例#2
0
<?php

include_once 'framework\\template.php';
PrivatePageInit();
?>
<!DOCTYPE html>
<html>
    <?php 
WriteHeader();
?>

    <body>
        <div class="row" id="contactBody">
            <div id="contact">
                <img id="icon" src="http://1.bp.blogspot.com/-ZZ2g8Z1L8Zw/UAXzXMlXl7I/AAAAAAAAAPY/tlWM0dcEZg0/s1600/letter-icon.gif">
                <div id="address">
                    <address>
                        <strong>LightIT</strong><br>
                        Ukrainian st. 5a, f18 <br>
                        Zaporizhzhya, ZP, Ukraine<br>
                        <abbr title="Phone">P:</abbr> (095) 688-46-13
                    </address>

                    <address>
                        <strong>E-mail</strong><br>
                        <a href="mailto:#">viktor.didenko@gmail.com</a>
                    </address>

                </div>
            </div>
示例#3
0
    //				if (ImageSX($ds->_imgOrig) > ImageSY ($ds->_imgOrig))
    //					$ds->resizeToSize (800, 0);
    //				else if (ImageSX($ds->_imgOrig) > 800)
    //					$ds->resizeToSize (800, 0);
    //				$ds->saveFinal ($file);
    //			}
    //			$sql = "UPDATE ListItems SET ListItemFile='" . $extension . "' WHERE ListItemID=" . $new_cnt;
    //			mysql_query ($sql);
    //		}
    $sql = "UPDATE Lists SET LastModified='" . date("Y-m-d H:i:s") . "' WHERE ListID=" . $list_id;
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql);
    // insert a record into the history table
    $sql = "INSERT INTO NerderyEvents (EventTitle, EventDescription, UserID, EventTypeID, EventURL) " . "VALUES ('" . $_SESSION["user"]->displayName . " added a new item to a list', CONCAT('" . $_SESSION["user"]->displayName . " added a new item to the list \"', " . "(SELECT ListTitle FROM Lists WHERE ListID=" . $list_id . "), '\"'), " . "'" . $_SESSION["UserID"] . "', " . "(SELECT EventTypeID FROM NerderyEventType WHERE EventTypeName='ListItem'), " . "'/view_list.php?l=" . $list_id . "')";
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql);
}
WriteHeader(2, "The Nerdery::View List");
writeCP();
$curr_list = new VotingList($list_id);
?>

<script language="javascript" type="text/javascript">
</script>

<form name="redirectForm" action="view_list.php" method="post">
	<input type="hidden" name="paction" value="">
	<input type="hidden" name="list_id" value="">
</form>

<table border="0" width="750" cellpadding="0" cellspacing="0">
	<tr>
		<td width="25" background="images/section.header.bg.gif"><img height="32" width="25" src="images/section.header.w.gif"></td>
示例#4
0
    			echo "nothing found as oldest child, add between parent and parent's next sibling.<br>";
    			// get some new id in between parent's id and id of parent's next sibling
    		}
    	}
    }
    echo "prior_id: " . $prior_id . ", next_id " . $next_id;
    $insert_sql = "INSERT INTO DiscussionComments (DiscussionID, CommentID, CommentSubject, CommentAuthor, CommentDate, CommentText, CommentLevel) " .
    	"VALUES (" . $_POST["discussion_id"] .",?,'')";
    */
    /*
    $sql = "SELECT MAX (CommentID) AS LastChild FROM DiscussionComments WHERE DiscussionID=" . $_POST["discussion_id"] .
    	" AND CommentLevel > " . $before->commentLevel . " AND CommentID > " . $before->commentID .
    	" AND CommentID < ";
    */
}
WriteHeader(4, "The Nerdery::View Discussion Thread");
writeCP();
?>

<script language="javascript" type="text/javascript">
	function viewDiscussionPage (pid) {
		document.redirectForm.page.value = pid;
		document.redirectForm.submit ();
	}

	function viewDiscussion (did, p) {
		document.redirectForm.action = "view_discussion.php";
		document.redirectForm.discussion_id.value = did;
		document.redirectForm.page.value = p;
		document.redirectForm.submit ();
	}
示例#5
0
            $_SESSION["user"]->save();
            $sql = "DELETE FROM UserSessions WHERE UserID='" . $_SESSION["UserID"] . "'";
            mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>" . $sql);
            unset($_SESSION["ValidLogin"]);
            unset($_SESSION["user"]);
            $sql = "SELECT UserID FROM Users WHERE TotalTime=(SELECT MAX(TotalTime) FROM Users)";
            $rs = mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>" . $sql);
            $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");
<?php

/*
	
	Version 1.0
		Basic
*/
include "_Vars.php";
$sSubHead = 'Guest List';
//_GeneralFunction.php function WriteHeader($sPageTitle, $sHeader, $sSubHead, $sKeyWords)
$sKeyWords = 'Grateful Dead, Setlist, database, setlists, songs, the dead, jerry garcia';
//_GeneralFunction.php function WriteHeader($sPageTitle, $sHeader, $sSubHead, $sKeyWords)
$sKeyWords = 'Grateful Dead, Setlist, database, setlists, songs, the dead, jerry garcia';
WriteHeader('Grateful Dead Setlist Database by Kory Hurst', 'Grateful Dead', $sSubHead, $sKeyWords);
//content goes here
//sample content
// i need custom classes for the rest of the site here, actually can probable correct the
// default class in this style, as the intext ul with >> is junk.
$sSQL = 'select SongNotes as Guest, count(*) as Appearances  ';
$sSQL = $sSQL . 'from tblsetlistsongdetailextranotes ';
$sSQL = $sSQL . 'where SongNotes like "%with%" ';
$sSQL = $sSQL . 'group by SongNotes ';
$sSQL = $sSQL . 'order by count(*) desc ';
//echo $sSQL;
$aGuests = GetRS($sSQL);
//Print2DArray($aGuests);
echo '<div id="content" class="narrowcolumn">' . $GLOBALS['NewLine'];
echo '<div class="post">' . $GLOBALS['NewLine'];
//because we are matching up to Word Press we use post, but it is just a section
echo '<div id="entry">' . $GLOBALS['NewLine'];
echo '<table>';
<?php

/*
Version 1.0
*/
session_start();
include "mySQLFunctions.php";
include "CLHelperFunctions.php";
include "GeneralFunctions.php";
include "Security.php";
WriteHeader("Registration");
echo '<form action="SaveUser.php" method="post">';
echo '<table>';
echo '<tr>';
echo '<td>First Name:</td>';
echo '</tr>';
echo '<tr>';
echo '<td><input type="text" name="FirstName" /></td>';
echo '</tr>';
echo '<tr>';
echo '<td>Last Name:</td>';
echo '</tr>';
echo '<tr>';
echo '<td><input type="text" name="LastName" /></td>';
echo '</tr>';
echo '<tr>';
echo '<td>User Name:</td>';
echo '</tr>';
echo '<tr>';
echo '<td><input type="text" name="UserName" /></td>';
echo '</tr>';
示例#8
0
    }
}
//-------------------------------------------------------------------------
// Insert a new comment about this news item
//-------------------------------------------------------------------------
if ($page_action == "insertComment") {
    $sql = "INSERT INTO JournalEntryComments (JournalEntryID, CreatedDate, CommentAuthor, CommentText) " . "VALUES (" . $item_id . ",'" . date("Y-m-d H:i:s") . "','" . $_SESSION["UserID"] . "','" . mysql_escape_string($_POST["comment_text"]) . "')";
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql . "<br>");
    $sql = "UPDATE JournalEntries SET LastModified='" . date("Y-m-d H:i:s") . "' WHERE JournalEntryID=" . $item_id;
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql . "<br>");
    $sql = "UPDATE Journals SET LastModified='" . date("Y-m-d H:i:s") . "' WHERE JournalID=" . $journal_id;
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql . "<br>");
    $sql = "INSERT INTO NerderyEvents (EventTitle, EventDescription, UserID, EventTypeID, EventURL) VALUES (" . "CONCAT('New comment in ', (SELECT JournalEntrySubject FROM JournalEntries WHERE JournalEntryID=" . $item_id . ")), " . "CONCAT('" . $_SESSION["user"]->displayName . "',' commented on the news item ', (SELECT JournalEntrySubject FROM JournalEntries WHERE JournalEntryID=" . $item_id . ")), " . "'" . $_SESSION["UserID"] . "', (SELECT EventTypeID FROM NerderyEventType WHERE EventTypeName='NewsComment'), '/view_news_item.php?j=" . $journal_id . "&e=" . $item_id . "')";
    mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql);
}
WriteHeader(5, "The Nerdery::News");
writeCP();
$sql = "SELECT * FROM Journals WHERE JournalID={$journal_id}";
$rs = mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql . "<br>");
$row = mysql_fetch_array($rs);
?>

<table border="0" width="750" cellpadding="0" cellspacing="0">
	<tr>
		<td width="25" background="images/section.header.bg.gif"><img height="32" width="25" src="images/section.header.w.gif"></td>
		<td width="700" background="images/section.header.bg.gif">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td>
						<span class="boldWhiteMediumText">
							<a href="news.php" class="boldWhiteLink">News Columns</a>
示例#9
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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)) {
示例#10
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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(1, "Nerdery Home", "Since you were last here...");
writeCP();
?>
<style type="text/css">
	#homePageSection {
		width:	100%;
		font-weight: bold;
		border-style: solid;
		border-width: 2px;
		border-top:	none;
		border-left:none;
		border-right:none;
		border-color: #89A798;
	}

	#newsItem {
示例#11
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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(1, "Nerdery Users");
writeCP();
?>

<table border="0" width="750" cellpadding="0" cellspacing="0">
	<tr>
		<td width="25" background="images/section.header.bg.gif"><img height="32" width="25" src="images/section.header.w.gif"></td>
		<td width="700" background="images/section.header.bg.gif">
			<span class="boldWhiteMediumText">
				Your fellow Nerderyers
			</span>
		</td>
		<td width="25"><img border="0" height="32" width="25" src="images/section.header.e.gif"></td>
	</tr>
	<tr>
		<td></td>
示例#12
0
    if ($_SESSION["ValidLogin"] != 1) {
        header("location: login.php?r=" . $_SERVER["PHP_SELF"]);
    }
}
require_once 'includes/discussion.functions.php';
// set up vars for current list view
$filter_date = 1;
if (isset($_POST["filterDate"])) {
    $filter_date = $_POST["filterDate"];
}
$page_action = "";
if (isset($_POST["paction"])) {
    $page_action = $_POST["paction"];
}
$errMsg = "";
WriteHeader(4, "The Nerdery::Discussions");
writeCP();
?>

<script language="javascript" type="text/javascript">
	function viewDiscussion (did) {
		document.redirectForm.discussion_id.value = did;
		document.redirectForm.submit ();
	}
</script>

<form name="redirectForm" action="view_discussion.php" method="post">
	<input type="hidden" name="paction" value="">
	<input type="hidden" name="discussion_id" value="">
</form>
示例#13
0
$depth = array();
$content = array();
$xml = array();
include_once 'WriteHTML.php';
$content = implode("", file($xmlSiteSettings));
$xml = XML_unserialize($content);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>

<?php 
global $xml;
// build header
WriteHeader($xml);
?>


  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

  <script language="JavaScript" type="text/javascript">
	var newwindow = '';

	function popitup(url)
	  {
	  if (!newwindow.closed && newwindow.location)
	    {
	    newwindow.location.href = url;
	    }
	  else
示例#14
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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(1, "Nerdery Home", "Edit your information");
if ($page_action == "updateUser") {
    $tmp = realpath(".") . "/temp";
    if (!file_exists($tmp)) {
        mkdir($tmp);
    }
    $tmpfile = $tmp . "/" . $_FILES["signature_file"]["name"];
    if (move_uploaded_file($_FILES["signature_file"]["tmp_name"], $tmpfile)) {
        $ext = getImageExtension($_FILES["signature_file"]["type"]);
        //echo $ext;
        if ($ext == "gif") {
            echo "The Nerdery does not currently support .gif files for signatures.  This will (hopefully) be fixed soon...";
        } else {
            $base = realpath(".") . "/images/signatures/" . $_SESSION["user"]->userID . ".";
            $final = $base . $ext;
            $resizer = new dropShadow(true);
<?php

/*
	Version 1.0
		Basic
*/
include "_Vars.php";
$sSortOrder = $_GET["SortOrder"];
$sSortBy = $_GET["SortBy"];
WriteHeader('Personal Site of Kory Hurst', 'Kory Hurst', 'Home', 'science, web development, experiments');
echo '<div id="content" class="narrowcolumn">' . $NewLine;
echo '<div class="post">' . $NewLine;
//because we are matching up to Word Press we use post, but it is just a section
echo '<div id="entry">' . $NewLine;
$sSQLJams = 'select JamID, JamText, count(*) as TimesPlayed ';
$sSQLJams = $sSQLJams . 'from tblJam ';
$sSQLJams = $sSQLJams . 'group by JamID ';
$sSQLJams = $sSQLJams . 'order by ' . $sSortBy . ' ' . $sSortOrder;
//echo $sSQLJams ;
$aSongs = GetRS($sSQLJams);
//Print2dArray(aSongs);
//content goes here
//echo floor(count($aSongs)/2);
echo '<table>';
echo '<tr>';
echo '<td valign="top">';
echo '<ul>';
foreach ($aSongs as $aSong) {
    $iSongCount = $iSongCount + 1;
    //echo $iSongCount ;
    if ($iSongCount == floor(count($aSongs) / 2)) {
示例#16
0
$filter_date = 1;
if (isset($_POST["filterDate"])) {
    $filter_date = $_POST["filterDate"];
}
$page_action = "";
if (isset($_POST["paction"])) {
    $page_action = $_POST["paction"];
}
$errMsg = "";
$ltitle_in = "";
$ldesc_in = "";
$ltype_in = 1;
/*
 * Renders the HTML <head> and beginning of body
 */
WriteHeader(2, "Nerdery Lists");
writeCP();
//---------------------------------------------------------------
// Insert list if requested in form data
//---------------------------------------------------------------
if ($page_action == "insertList") {
    if ($listService->listExists($_SESSION["UserID"], $_POST["list_title"])) {
        $errMsg = "You have already created a list with that title.  Please change the title of your new list.";
    } else {
        $listService->createList($_POST["list_title"], $_POST["list_description"], $_SESSION["user"]);
    }
    if (strlen($errMsg) > 0) {
        displayError($errMsg);
        $ltitle_in = $_POST["list_title"];
        $ltype_in = $_POST["list_type"];
        $ldesc_in = $_POST["list_description"];
示例#17
0
 */
session_set_save_handler("open_session", "close_session", "read_session", "write_session", "destroy_session", "session_gc");
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(1, "Nerdery Home", "User Cool Points<sup>TM</sup>");
writeCP();
$target_user = $_SESSION["UserID"];
if (isset($_POST["userID"])) {
    $target_user = $_POST["UserID"];
} else {
    if (isset($_GET["userID"])) {
        $target_user = $_GET["userID"];
    }
}
if ($page_action == "assignPoints") {
    if ($_POST["plus_minus"] == "add") {
        $add_in = 1;
    } else {
        $add_in = 0;
    }