X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=blobdiff_plain;f=index.php;fp=index.php;h=03e307755e6895685e8a84a73312af2136fbe9e4;hp=88e5605d123b60bf1abc099b868261c306d5aa31;hb=1656ee459ec82ab8f1113ebc71a8c923517b43ad;hpb=8791a30f25ff57ca8e35f00f046761ba553ac967 diff --git a/index.php b/index.php index 88e5605..03e3077 100644 --- a/index.php +++ b/index.php @@ -115,14 +115,17 @@ function totals_summary($arr) { function _index_main() { $client_id = logged_in(); + $ever_was_contractor = ever_was_contractor(); - # make sure they've filled out the tiny user agreement - $tiny_agreement = db_get_value('people', 'tiny_agreement', 'where id=%i', $client_id); - if($tiny_agreement < 30 || $tiny_agreement > 999) { - return './tiny_agreement'; + # make sure the client (not the contractor) has filled out the tiny agreement + if(!$ever_was_contractor) { + $tiny_agreement = db_get_value('people', 'tiny_agreement', 'where id=%i', $client_id); + if($tiny_agreement < 30 || $tiny_agreement > 999) { + return './tiny_agreement'; + } } - if(ever_was_contractor()) { + if($ever_was_contractor) { tem_show('su_link'); }