JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
works with published version of wfpl, started on documentation
authorJason Woofenden <jason283@herkamire.com>
Mon, 17 Nov 2008 10:56:06 +0000 (05:56 -0500)
committerJason Woofenden <jason283@herkamire.com>
Mon, 17 Nov 2008 10:56:06 +0000 (05:56 -0500)
.gitignore
INSTALL [new file with mode: 0644]
README [new file with mode: 0644]
code/config.php
run.php [new symlink]

index a6417db..d648379 100644 (file)
@@ -1,6 +1,5 @@
 code/wfpl
 images
 *.tgz
 code/wfpl
 images
 *.tgz
-run.php
 style*.css
 w
 style*.css
 w
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..1fccecb
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,40 @@
+INSTALLING
+
+System Requirements:
+
+       * PHP 5
+       * MySQL
+       * apache
+
+You'll also need a recent version of wfpl in code/wfpl:
+
+       $ cd code
+       $ git clone git://github.com/JasonWoof/wfpl.git
+
+Apache settings:
+
+       There is .htaccess file with all the needed settings. You may need to
+       change apache's AllowOverride directive to allow these settings to be
+       changed in the .htaccessfile.
+
+       Also, since mod_rewrite does not allow you to redirect to relative URLs,
+       you'll have to edit the rewrite rules if you don't install this at the
+       root directory for the [sub]domain.
+
+Localization:
+
+       There are still several places that have the contractor's name hardcoded
+       to "Jason". This will be fixed at some point, but for now You'll have to
+       go through and fix it (unless you're name happens to be Jason.)
+
+Database:
+       
+       create a mysql database, and these tables: people.sql tasks.sql
+       code/wfpl/examples/session.sql
+
+       Create the Contractor account:
+               go to /logout in browser (this creates a session)
+               in mysql do: insert into wfpl_session_data (name,value,session_id) values("auth_username", "1", (select id from wfpl_sessions limit 1));
+               Then go to /people in your browser and create your account (first account created is administrator/contractor)
+       
+       Now you can create accounts for your customers, and/or create tasks for yourself.
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..aafe13a
--- /dev/null
+++ b/README
@@ -0,0 +1,49 @@
+This project is a website for managing tasks between a freelance programmer and
+their clients.
+
+Current features:
+
+       1) Password protection
+
+       2) Add client accounts
+
+       3) Enter and edit task descriptions
+
+       4) Clients can save as draft or save and request price from contractor
+
+       6) Contractor can set a price or mark a task description as needing
+       clarification.
+
+       5) Clients can approve price or edit further (or let it sit)
+
+       6) Contractor can mark a task as in-progress at which point it is no longer
+       editable.
+
+       7) Contractor can mark a task as finished (needing testing). Then client can
+       test and mark it as confirmed finished.
+
+
+       Client's display is sorted into tasks needing their attention and tasks that
+       are waiting for contractor.
+
+       Contractor's display lists tasks needing his attention from all clients.
+       Contractor has additional page allowing him to switch his session to be logged
+       in as any of the clients.
+
+
+Planned features in a probably order of appearance:
+
+       1) Clients can re-order the queue (the list of tasks which are approved
+       and priced, but work hasn't started yet)
+
+       2) Contractor gets an e-mail whenever a client causes a task to move into
+       his list of things to attend to.
+
+       3) Contractor can add money to the client's balance, and system will
+       automatically mark finished tasks as paid, and reduce the balance.
+
+       4) Contractor can auto-generate an invoice from tasks and contact info in
+       the database.
+
+       5) Site detects when client's balance is too low for work to continue and
+       displays that prominently to them.
index 1e59d64..32d8076 100644 (file)
@@ -24,3 +24,33 @@ function logged_in_as_contractor() {
 function enc_money($float) {
        return format_money($float, $cents = true);
 }
 function enc_money($float) {
        return format_money($float, $cents = true);
 }
+
+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) {
+       if(strpos($encrypted, ':') !== 32) {
+               die("password field corrupted");
+       }
+       
+       list($md5, $salt) = explode(':', $encrypted);
+
+       if(md5($salt . $pass) == $md5) {
+               return true;
+       }
+
+       return false;
+}
+
+function encrypt_password($plain) {
+       $password = '';
+
+       $salt = substr(md5(rand() . "f"), 0, 2); # FIXME make this more effecient and clear
+
+       $password = md5($salt . $plain) . ':' . $salt;
+
+       return $password;
+}
diff --git a/run.php b/run.php
new file mode 120000 (symlink)
index 0000000..1d3ff92
--- /dev/null
+++ b/run.php
@@ -0,0 +1 @@
+code/wfpl/run.php
\ No newline at end of file