Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-admin/profile-aboutme.php
<?php
	//initialise---------------------------------------
	require_once('./admin.php');
	$Display->Title = 'Profile';
	$Display->Subtitle = 'About Me';
	require('./admin-display-header.php');
	
	//database
	if(empty($Error))
	{
		$Data = $DC->Select('profile', 'profile_category', 'About me');
	}
?>
	<h2> About Me </h2>
	<p> You can add a profile element directly in your 'About me' profile category here. Just type the heading and its contents. </p>
	
	<form method="post" action="profile-aboutme-update.php?action=update">
	<table>
<?php
if(!empty($Data))
{
	foreach($Data as $Key)
	{
?>
		<tr> <td valign="top"> <input type="text" value="<?php _P($Key['profile_name']); ?>" name="<?php _P($Key['profile_id']); ?>" size="32" style="color:blue; font-weight:bold; font-family:Arial, Helvetica, sans-serif;" /> </td>
			<td> <textarea cols="62" rows="8" name="<?php _P($Key['profile_id'].'v'); ?>"><?php _P($Key['profile_value']); ?></textarea> </td>
		</tr>
<?
	}
}

/* Following code was meant to add more rows, but adding rows results in loosing unsaved data, needs some Ajax alternative	
	//adding more rows
	if(empty($_GET['more']))
		$More = 0;
	else
		$More = intval($_GET['more']);
?>
	<tr> <td> &nbsp; </td>
		<td> <a href="profile-aboutme.php?more=<?php $AddMore = $More+1; _P($AddMore); ?>">Add a row</a> </td>
	</tr>
<?php
	$i = 0;
	while($i < $More)
	{
		$i++;
?>
		<tr> <td valign="top"> <input type="text" name="" size="32" style="color:blue; font-weight:bold; font-family:Arial, Helvetica, sans-serif;" /> </td>
			<td> <textarea cols="62" rows="8"></textarea> </td>
		</tr>
<?php
	}
*/
?>
	<tr> <td valign="top"> <input type="text" name="new" size="32" style="color:blue; font-weight:bold; font-family:Arial, Helvetica, sans-serif;" /> </td>
		<td> <textarea cols="62" rows="8" name="newv"></textarea> </td>
	</tr>
	
	<tr> <td>&nbsp;  </td>
		<td> To add a new row, Please click on the button 'Update Profile' </td>
	</tr>	
	
	<tr> <td>&nbsp;  </td>
		<td> <input type="submit" value="Update Profile &raquo;" /> </td>
	</tr>
	</table> </form>

<?php
	_foot();
?>
Return current item: Prsaar Social Networking Platform