) ) ); */ if(isset($fields[$step_id])) { $form = new Form(); $form->fields = $fields[$step_id]; echo $form->buildForm(); } // see if user at this IP has an item checked out $sql = "SELECT * FROM turk_activity WHERE last_checkout_ip='".$_SERVER['REMOTE_ADDR']."'"; $result = $db->query($sql); if($db->getNumRows($result)>=1) { $row = $db->getRow($result); $step_id = 3; $_GET['id'] = $row['note_id']; } if($step_id==1) { echo "<h2>Please select a note to read from the list below. Once you've found one, click on it to check it out:</br>(NOTE: items in grey have already been completed or are currently checked-out by other workers. Please, do not read these or you will not be paid. Thank you.)</h2>"; /* $timeout_hours = 3; $timeout_ms = $timeout_hours * 60 * 60 * 1000; */