require_once('/dept/ucmpweb1/www/php_weblib/bnhm_cal_util.php');
$studentcount = 0;
$staffcount = 0;
$facultycount = 0;
$sql = "
SELECT * FROM webcal_affiliates
WHERE cal_create_by = 'UCMP'
ORDER BY groupname, lastname
";
$result = dbconnect($sql);
while ($row = mysql_fetch_array($result)) {
if ($row['groupname']==1) {
if ($studentcount == 0) {
$student_display_block .= "
";
}
$student_display_block .= format_gallery($row);
$studentcount++;
if ($studentcount == 3) {
$student_display_block .= "
";
$studentcount = 0;
}
}
if (($row['groupname']==2) || ($row['groupname']==5) || ($row['groupname']==4)){
if ($staffcount == 0) {
$staff_display_block .= "";
}
$staff_display_block .= format_gallery($row);
$staffcount++;
if ($staffcount == 3) {
$staff_display_block .= "
";
$staffcount = 0;
}
}
if ($row['groupname']==3) {
if ($facultycount == 0) {
$faculty_display_block .= "";
}
$faculty_display_block .= format_gallery($row);
$facultycount++;
if ($facultycount == 3) {
$faculty_display_block .= "
";
$facultycount = 0;
}
}
if ($row['groupname']==6) {
if ($affiliatecount == 0) {
$affiliate_display_block .= "";
}
$affiliate_display_block .= format_gallery($row);
$affiliatecount++;
if ($affiliatecount == 3) {
$affiliate_display_block .= "
";
$affiliatecount = 0;
}
}
}
?>
UCMP People Gallery