From ba364b253f2a61970eee1432b4e4393ad9a3241a Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 8 Jan 2009 13:17:08 -0500 Subject: [PATCH] tasks page shows when the task has been payed for --- tasks.html | 2 +- tasks.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tasks.html b/tasks.html index 65fc163..c70a568 100644 --- a/tasks.html +++ b/tasks.html @@ -22,7 +22,7 @@

Narrative:
~description.htmlbrtab~

-

Price: ~price.money~

+

Price: ~price.money~   Paid

Mark as paid

diff --git a/tasks.php b/tasks.php index ed35222..dd4ad15 100644 --- a/tasks.php +++ b/tasks.php @@ -84,12 +84,12 @@ function tasks_display_main() { $task_id = format_int($_REQUEST['tasks_id']);; $client_id = logged_in(); if(logged_in_as_contractor()) { - $row = db_get_row('tasks', 'title,url,description,state,price,client_id', 'where id=%i', $task_id); + $row = db_get_row('tasks', 'title,url,description,state,price,client_id,paid', 'where id=%i', $task_id); } else { - $row = db_get_row('tasks', 'title,url,description,state,price,client_id', 'where id=%i && client_id=%i', $task_id, $client_id); + $row = db_get_row('tasks', 'title,url,description,state,price,client_id,paid', 'where id=%i && client_id=%i', $task_id, $client_id); } if($row) { - list($title, $url, $description, $state, $price, $owner_id) = $row; + list($title, $url, $description, $state, $price, $owner_id, $paid) = $row; tem_set('task_id', $task_id); tem_set('title', $title); tem_set('url', $url); @@ -129,8 +129,12 @@ function tasks_display_main() { } # FALL THROUGH case TASK_FINISHED: + if($paid) { + tem_show('marked_paid'); + } else { + tem_show('mark_paid_link'); + } tem_show('price_row'); - tem_show('mark_paid_link'); # FIXME break; } } else { -- 1.7.10.4