From: Jason Woofenden Date: Wed, 4 Nov 2009 06:12:21 +0000 (-0500) Subject: updated to latest wfpl X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=commitdiff_plain;h=98110d79b6536290baffd1468f22cb8b046902cd updated to latest wfpl --- diff --git a/code/config.php b/code/config.php index 82fb0cc..30691ab 100644 --- a/code/config.php +++ b/code/config.php @@ -10,33 +10,23 @@ function cms_get() { return false; } -function logged_in_as_admin() { +# whether currently logged in as admin (can be changed with su) +function logged_in_as_contractor() { if(!isset($GLOBALS['logged_in_as_admin'])) { $GLOBALS['logged_in_as_admin'] = (logged_in() == 1); # logged_in() returns id. id #1 is admin } return $GLOBALS['logged_in_as_admin']; } -function logged_in_as_contractor() { - return logged_in_as_admin(); -} - +# whether originally logged in as contractor (reguardless of current su) function ever_was_contractor() { - return logged_in_as_contractor() || session_get('auth_was_contractor') == 'Yes'; -} - -function set_was_contractor() { - session_set('auth_was_contractor', 'Yes'); + return logged_in_as_admin(); } function enc_money($float) { return format_money($float, $cents = false); } -function logged_in() { - return session_exists_and_authed(); -} - # 1st arg: the correct encrypted password # 2nd arg: clear-text password entered by someone function check_password($encrypted, $pass) { diff --git a/code/wfpl b/code/wfpl index f250e40..dfd0f15 160000 --- a/code/wfpl +++ b/code/wfpl @@ -1 +1 @@ -Subproject commit f250e40ff0e93be2feeb474660d0a21dccef4298 +Subproject commit dfd0f158f89020b3142e41127d21e48c8512aa1e diff --git a/index.html b/index.html index 1310540..34d035c 100644 --- a/index.html +++ b/index.html @@ -7,82 +7,82 @@ - +

Progress Manager

This page is for giving Jason Woofenden work and figuring out the details of the associated tasks, costs and priorities.

-

Add a taskReport a problemManage accountsSwitch login

+

Add a taskReport a problemManage accountsSwitch login

- +

Tasks needing your attention:

- - - - - - - + + + + + + + - +

Tasks waiting for Jason:

- - - - + + + + - +

Jason is currently working on:

- - - - + + + + - +

Queued tasks

Jason hasn't started on these yet. You can use the arrows to set the priority order. Jason will do the top one first.
- - - - + + + + - +

Finished but not tested

- - - -
Total: ~task_total.money~
- + + + +
Total: ~task_total money~
+ - +

Finished tasks

- - - -
Total: ~task_total.money~
- + + + +
Total: ~task_total money~
+ - +

Unpaid totals

- - - + + +
ClientQueued
& WIP
DoneDone &
Tested
Done But
Not Tested
~client.html~~queued_total.money~~done_total.money~~tested_total.money~~not_tested_total.money~
~client html~~queued_total money~~done_total money~~tested_total money~~not_tested_total money~
- + - +

Finished and paid for

- - - - + + + + - - + + - + diff --git a/login.html b/login.html index 66f2708..0b6bd59 100644 --- a/login.html +++ b/login.html @@ -7,27 +7,27 @@ - +

Client Login

- +
Incorrect username and/or password
- +
- + - + - + @@ -35,6 +35,6 @@
Username:
Password:
- + diff --git a/login.php b/login.php index f0eb6dd..da07a64 100644 --- a/login.php +++ b/login.php @@ -45,6 +45,9 @@ function login_main() { message("Logged in successfully."); session_new(); session_set('auth_username', "$id"); + if($id == '1') { + session_set('auth_admin', 'yes'); + } if($url) { return $url; } else { diff --git a/narrative_example.html b/narrative_example.html index 0d52cb9..eee9505 100644 --- a/narrative_example.html +++ b/narrative_example.html @@ -7,7 +7,7 @@ - +

Narrative Example

When you commission Jason Woofenden you are asked to write about your change/addition in the form of a first-person narrative. In this narrative you write as if the change/addition you would like has already been implemented. You write the specifics of what you do and what you see as a result.

@@ -16,6 +16,6 @@

I go to my home page, (or any other page on my site) and I click a link labeled "Contact Us" which is just below the "About Us" link on the left. Then I see a page with a headline "Contact Us" and a form with these fields: "Name", "E-mail", "Comments" and a button "Send". When I click "Send", all information entered is e-mailed to foo@example.com and I see a page with the headline "Thank You" and this paragraph: "Thank you for your interest. We can usually reply within one business day."

After Jason makes the changes, you can verify that they are complete by following the steps in the narrative and making sure you can see everything it describes.

- + diff --git a/people.html b/people.html index e775865..ae61b3e 100644 --- a/people.html +++ b/people.html @@ -7,60 +7,60 @@ - + - +
- - + +
- -

~message_text.html~

- + +

~message_text html~

+
- + - -

Add a new accountEdit ~username.html~'s account

+ +

Add a new accountEdit ~username html~'s account

-
+ - + - + - + - + - +
Username:
Username:
Password:
Password:
Name:
Name:
Privs:
Privs:
Balance:
Balance:
- - + +

Account Administration

- +

[Add a new account]

- - + +
NameLogin 
~name.html~~username.html~[delete]
NameLogin 
~name html~~username html~[delete]
- - -

No ~field_plural.html~ in database.

- + + +

No ~field_plural html~ in database.

+

[Add a new account]

Back to main page

- + - + diff --git a/su.html b/su.html index 919ae94..3633f19 100644 --- a/su.html +++ b/su.html @@ -7,17 +7,17 @@ - +

Switch Login

With the links below you can quickly switch to being logged in under one of the client accounts. You will then see exactly what they see when they log in, and have exactly the same privileges to edit, etc. except that you are not prompted to fill out the tiny agreement and can still access this "Switch Login" page.

- -

log in as ~client_name.html~ (~client_username~)

- + +

log in as ~client_name html~ (~client_username~)

+

Cancel

- + diff --git a/su.php b/su.php index d777117..6f26627 100644 --- a/su.php +++ b/su.php @@ -18,9 +18,8 @@ require_once('code/wfpl/format.php'); function su_main() { - if(logged_in_as_contractor()) { - set_was_contractor(); - } elseif(!ever_was_contractor()) { + # If you log in to the admin account, you can su to a customer account and still have access to su back to admin. That's why we're checking for admin not "contractor" here. + if(!logged_in_as_admin()) { $GLOBALS['url'] = this_url(); message('You must be logged in as an administrator to access that function'); return 'login'; diff --git a/tasks.email.txt b/tasks.email.txt index ebcd37b..86e867d 100644 --- a/tasks.email.txt +++ b/tasks.email.txt @@ -5,6 +5,6 @@ ord: ~ord~ title: ~title~ url: ~url~ description: -~description.tab~ +~description tab~ state: ~state~ paid: ~paid~ diff --git a/tasks.html b/tasks.html index 192426b..21907ae 100644 --- a/tasks.html +++ b/tasks.html @@ -7,86 +7,86 @@ - + - -

Task #~task_id~Problem Report "~title.html~"

+ +

Task #~task_id~Problem Report "~title html~"

-

Title: ~title.html~

+

Title: ~title html~

-

Status: ~state.html~ (finished on ~finished_at.mmddyyyy~) (tested on ~tested_at.mmddyyyy~)

+

Status: ~state html~ (finished on ~finished_at mmddyyyy~) (tested on ~tested_at mmddyyyy~)

-

URL: ~url.html~

+

URL: ~url html~

Narrative:
- ~description.htmlbrtab~

+ ~description htmlbrtab~

-

Price: ~price.money~   Paid

+

Price: ~price money~   Paid

-

Mark as paid

+

Mark as paid

-

Approve price

+

Approve price

-

Edit this task

-

Edit this task

+

Edit this task

+

Edit this task

-

I'm starting on this now

+

I'm starting on this now

-

Place this task on hold

+

Place this task on hold

-

Mark this task as finished (request testing)

+

Mark this task as finished (request testing)

-

Please test everything in the narrative! If everything is working, Mark this task as finished Otherwise please e-mail or call Jason.

+

Please test everything in the narrative! If everything is working, Mark this task as finished Otherwise please e-mail or call Jason.

Back

- + - -

Report a problemAdd a new taskEdit task #~tasks_edit_id~ "~title.html~"

+ +

Report a problemAdd a new taskEdit task #~tasks_edit_id~ "~title html~"

-
+ - - - + + + - + - + - - - - - + + + + + - - + + - - + + - +
Client:
Client:
Title:
Title:
URL:
URL:
- The narrative below contains "FIXME". This is Jason's way of marking the places in the narrative that need your attention. Please update these parts of the narrative to be more complete/specific and remove the "FIXME". - Mark trouble spots with "FIXME". - Below, write as if the change/addition you would like has already been implemented. Write a first-person narrative with the specifics of what you do and what you see as a result. See an example. - Below, describe in detail 1) what you do, 2) what you expect to see, 3) what you see instead + The narrative below contains "FIXME". This is Jason's way of marking the places in the narrative that need your attention. Please update these parts of the narrative to be more complete/specific and remove the "FIXME". + Mark trouble spots with "FIXME". + Below, write as if the change/addition you would like has already been implemented. Write a first-person narrative with the specifics of what you do and what you see as a result. See an example. + Below, describe in detail 1) what you do, 2) what you expect to see, 3) what you see instead
Price:
Price:
(directly to queue if <= tiny)
(even if it's <= tiny agreement)

Cancel

- + - + diff --git a/template.html b/template.html index 552caef..447d351 100644 --- a/template.html +++ b/template.html @@ -21,16 +21,16 @@
- +
- - + +
- -

~message_text.html~

- + +

~message_text html~

+
- +
diff --git a/tiny_agreement.html b/tiny_agreement.html index 96d4143..b2386f3 100644 --- a/tiny_agreement.html +++ b/tiny_agreement.html @@ -7,7 +7,7 @@ - +

Tiny Job Agreement

Welcome to the task manager! I'd like to take this opportunity to have you make an agreement with me about very small jobs. Please read it carefully, and call me if you have any questions.

@@ -15,11 +15,11 @@

For tiny jobs ($30 or less) the normal pricing approval process is cumbersome. So I have my clients make the following agreement:

-

For work that I request of Jason Woofenden (whether through this site, or other forms of communication like e-mail or phone), I hereby agree to pay the fee he chooses, so long as it is hereby agree to pay the fee he chooses, so long as it is or less.

Cutting out the overhead of quotes for tiny jobs should make it so I can keep my minimum fee at $10.

- +