| <?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_foundation_ro.class.php"; |
| |
| $_dbcf = new DBConnectionFoundation(); |
| $_dbhf = $_dbcf->connect(); |
| |
| $foundation_query = "SELECT PersonID, ProjectID from PeopleProjects WHERE Relation = 'CM' and InactiveDate is not null |
| ;"; |
| // echo( $foundation_query . "\n" ); |
| $result = mysql_query($foundation_query, $_dbhf); |
| 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"; |
| } |
| |
| ?> |