aboutsummaryrefslogblamecommitdiffstats
path: root/view/contact_selectors.php
blob: a7d3d0f5b79b42fe87533e037fd92ad7ed859d4e (plain) (tree)
1
2
3
4
5
6
7
8
9


     
                                           

                
                                                                                   
 
                                                                       











                                                                                                                  
<?php


function contact_profile_assign($current) {

	$o = '';
	$o .= "<select id=\"contact_profile_selector\" name=\"profile_assign\" />";

	$r = q("SELECT `profile-name` FROM `profile` WHERE `uid` = %d",
                        intval($_SESSION['uid']));

	if(count($r)) {
		foreach($r as $rr) {
			$selected = (($rr['profile-name'] == $current) ? " selected=\"selected\" " : "");
			$o .= "<option value=\"{$rr['profile-name']}\" $selected >{$rr['profile-name']}</option>";
		}
	}
	$o .= "</select>";
	return $o;
}