| <?php |
| $logfile = "/home/data/httpd/writable/community/commit-inserts.log"; |
| if( !preg_match( "/206\.191\.52\.40|209\.217\.126\.125/", $_SERVER['REMOTE_ADDR'] ) ) { /* dash.eclipse.org */ |
| $log = fopen( $logfile, "a" ); |
| fwrite( $log, date('Y-m-d.H:i:s') . " " . $_SERVER['REMOTE_ADDR'] . " is an invalid caller\n" ); |
| fclose( $log ); |
| echo $_SERVER['REMOTE_ADDR'] . " is an invalid caller<br>\n"; |
| exit; |
| } |
| header("Content-type: text/plain"); |
| require_once("/home/data/httpd/eclipse-php-classes/system/dbconnection_portal_rw.class.php"); |
| |
| $dbconnect = new DBConnectionPortalRW(); |
| $pdbh = $dbconnect->connect(); |
| |
| $sql = "SELECT PersonID, ProjectID FROM PeopleProjectActives |
| WHERE DATEDIFF(NOW(),ActiveDate) < 180 |
| ;"; |
| $result = mysql_query($sql, $pdbh); |
| if( !$result ) { |
| echo("MySQL Error: ". mysql_error()); |
| echo( $foundation_query . "\n" ); |
| exit( "Stopped because error\n" ); |
| } |
| while( $row = mysql_fetch_array($result) ) { |
| print $row[0] . "\t" . $row[1] . "\n"; |
| } |
| |
| ?> |