Changeset 19098 for trunk


Ignore:
Timestamp:
07/30/18 19:59:07 (6 years ago)
Author:
Daniela Dorner
Message:
added associated members
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/dch/memberlist.php

    r18893 r19098  
    142142
    143143
    144     $current=" AND ADDDATE(start, INTERVAL 6 MONTH) < '".$date."' AND ADDDATE(stop, INTERVAL 1 YEAR) > '".$date."' ";
     144    $current=" AND ADDDATE(start, INTERVAL 6 MONTH) <= '".$date."' AND ADDDATE(stop, INTERVAL 1 YEAR) >= '".$date."' ";
    145145    $order=" ORDER BY lastname";
    146146    $querycurrent=$selectcurrent.$from.$join.$where.$current;
     
    207207    mysql_free_result($result);
    208208
    209 
    210209    echo "<h3>Institute List:</h3>\n";
    211210    echo "<table border='1'>\n";
     
    236235    mysql_free_result($result);
    237236
     237
     238    $queryassoc="SELECT username, firstname, middlename, lastname, Date(associatedstart), if(associatedstop='2020-12-31 23:59:59', 'unlimited', Date(associatedstop)), inst.institutename FROM memberlist.members LEFT JOIN memberlist.institutes inst USING(instituteid) ";
     239    $queryassoc.="WHERE not isnull(associatedstop) ORDER BY associatedstart";
     240    //$queryassoc.="WHERE associatedstart <= '".$date."' AND associatedstop >= '".$date."' ";
     241    //echo $queryassoc;
     242    $result  = mysql_query($queryassoc);
     243    //associated members
     244    echo "<h3>Associated Members:</h3>\n";
     245    echo "<table border='1'>\n";
     246    echo "<tbody>\n";
     247    echo "<thead><tr><th>First Middle Lastname</th><th>associated since</th><th>associated until</th><th>Host Institute (#)</th></tr></thead>\n";
     248    while ($row = mysql_fetch_row($result))
     249    {
     250        echo "<tr>";
     251        echo "<td>".$row[1]." ".$row[2]." ".$row[3]."</td>";
     252        echo "<td>".$row[4]."</td>";
     253        echo "<td>".$row[5]."</td>";
     254        echo "<td>".mb_convert_encoding($row[6], 'utf-8', 'iso-8859-1')." (".array_search($row[6], $institutes).")</td>";
     255    }
     256
     257    echo "</tbody>\n";
     258    echo "</table>\n<br>\n";
     259    mysql_free_result($result);
    238260
    239261    echo "<form name='formular' action='memberlist.php' METHOD='GET'>\n";
Note: See TracChangeset for help on using the changeset viewer.