PHP:Clientupdates body

From distributed.net
Jump to: navigation, search
//

global $dnetClientsDBHostname, $dnetClientsDBUsername, $dnetClientsDBPassword, $dnetClientsDBName;
$db = mysql_pconnect($dnetClientsDBHostname, $dnetClientsDBUsername, $dnetClientsDBPassword);
mysql_select_db($dnetClientsDBName,$db);

$result = mysql_query("select S.ranking, S.description as s_description, C.releasedate, C.build, C.description as c_description, C.urlpart, C.instruct, S.sectionid from sections S, clients C where C.sectionid=S.sectionid and C.visible='true' order by C.releasedate Desc, S.ranking Desc, S.description, C.build",$db);


$lastsection = "";

print "<table>";

while ($clientrow = mysql_fetch_array($result))
{
    if ($clientrow['releasedate'] != $lastsection) {
         printf('<tr><td colspan="4"><b>%s</b></td></tr>', $clientrow['releasedate']);
         $lastsection = $clientrow['releasedate'];
     }

     printf("<tr><td> </td>" .
          "<td>%s %s </td>" .
          '<td nowrap="nowrap" align="right"><b>%s</b></td>' .
          "</tr>"
      , $clientrow['s_description'], $clientrow['c_description'], $clientrow['build'] );
}

print "</table>";

//