Location: PHPKode > projects > FeedMeLinks, Social BookmarkingSince2002 > contribute/features/edit.php
<% # $Id: edit.php,v 1.3 2004/05/12 19:16:25 hirokai Exp $ %>
<% 
	include_once( "../../modules/utils.inc.php" ); 
	$tok =  $authenticated = $_COOKIE["c_pass_token"];
	$u   =  $sessionUserId = $_COOKIE["c_uid"];

	if( $u ) 
		include( "$modules/header.inc.php" ); 
	else {
		include( "$modules/header.insecure.inc.php" ); 
		include( "$modules/menu-insecure.inc.php" ); 
	}
%>
<base href="http://dev.feedmelinks.com/contribute/features/edit" />
<%
		if( $id && $tok && $tok == md5( getPasswdForUser( $u ))) {
			if( $op == "edit" ) {
				include_once( "do-edit.inc.php" );
			} else {

				mysql_connect( );
				mysql_selectdb( getDBName() );
				$qs = "SELECT * FROM linksFeatures WHERE ID = $id";
				$q = mysql_query( $qs );
				if( $q ) {
					$id = mysql_result($q,0,"ID");
					$name = urldecode( mysql_result($q,0,"name"));
					$type = urldecode( mysql_result($q,0,"type"));
					$desc = urldecode( mysql_result($q,0,"description"));
				}
				mysql_close();
				$op = "edit";

			include_once( "add-form.inc.php" );
		}
	} else {
		echo "ERROR: no auth or no feature request id ($id)";
	}
%>

<% include( "$modules/footer.inc.php" ); %>
Return current item: FeedMeLinks, Social BookmarkingSince2002