Location: PHPKode > projects > ProjectPress > projectpress/projects/p_lead.php
<?php
/**
 * ProjectPress project creator
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();

//include(dirname(dirname(__FILE__)) . '/config.inc.php');
//require_once(PM_DIR . 'includes/global.inc.php');
//include_once(PM_DIR . 'functions.php');

$limit = "";

if(@$_REQUEST['val'])
{
	$pl_user = pmdb::connect()->query(strtolower($_REQUEST['pl_user']));
	$project_id = $_REQUEST['project_id'];

	pmdb::connect()->query("INSERT INTO ".DB."project_leaders (p_id,pl_user) VALUES('".$project_id."','".$pl_user."')");
	
	$limit = "limit 1";
}

$result = pmdb::connect()->query("SELECT * FROM ".DB."project_leaders, ".DB."members WHERE pl_user = username AND p_id = '".$_GET['p_id']."' order by pl_user LIMIT 1");

while ($row = $result->fetch_array())
{?>

   <div class="show_lead">
   	<?php get_user_avatar($row['pl_user'],$user->get_user_info($row['pl_user'],'email')); ?>
	   <label style="float:left;" class="text">
	   <b><?php echo '<a href="'.PM_URI.'/profile/profile.php?username='.$row['pl_user'].'">' . get_name($row['pl_user']) . '</a>';?></b>
	   <br />
	   <?php echo clickable_link($row['email']);?>
	   </label>
	   <!--<a href="#" class="pl_remove" ce="pl_user-<?php echo $row['pl_user']; ?>" id="lead-<?php echo $row['p_id']?>">x</a>-->
		<br clear="all" />
   </div>
<?php
}
Return current item: ProjectPress