$file = substr($file, 1);
+ $file = ereg_replace('_[0-9]*[.]css', '.css', $file);
+
+ $mtime = filemtime($file);
+ if($mtime === false) {
+ header('Content-Type: text/plain');
+ print("cannot stat $file");
+ return;
+ }
+
header('Content-Type: text/css');
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
if(ie5or6()) {
echo(ereg_replace("\n[^\n]*remove this line for IE 5.5 and 6[^\n]*\n", "\n", read_whole_file($file)));
<table cellspacing="0" cellpadding="4" border="0" summary="">
<!--~client_row start~-->
- <tr><td class="caption">Client: </td><td class="field"><select name="client_id"><!--~client_id.options~--></select></td></tr>
+ <tr><td class="caption">Client: </td><td class="field"><select name="client_id"><option value="">Choose One...</option><!--~client_id.options~--></select></td></tr>
<!--~end~-->
<tr><td class="caption">Title: </td><td class="field"><input type="text" size="40" name="title" value="~title.attr~" /></td></tr>
}
}
- if("you're happy with the POSTed values") { # if you change this change the one above
+ if(!logged_in_as_contractor() || $_REQUEST['client_id']) { # if you change this change the one above
if($edit_id) {
$tables = 'title,url,description,state';
$values = array($title, $url, $description, $state);
$client_id = logged_in();
if(logged_in_as_contractor() && $_REQUEST['client_id']) {
$client_id = format_int($_REQUEST['client_id']);
+ $client_name = db_get_value('people', 'name', 'where id=%i', $client_id);
} else {
# if client entered the task, no price is set
$price = 0;
$ord = 0;
}
db_insert('tasks', 'client_id,title,url,description,state,paid,price,ord', $client_id, $title, $url, $description, $state, $paid, $price, $ord);
- message('Task saved.');
+ if(logged_in_as_contractor()) {
+ message("Task saved for $client_name.");
+ } else {
+ message('Task saved.');
+ }
}
if($GLOBALS['tasks_form_recipient'] != "fixme@example.com") {
$to = $GLOBALS['tasks_form_recipient'];
if($error !== true) {
return './';
}
+ } else {
+ message('Error: you must select a client for the task');
}
# otherwise, we display the form again. tasks_get_fields() has
# already put the posted values back into the template engine, so they will
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JasonWoof -- Website Services</title>
- <link rel="stylesheet" href="style4.css" type="text/css" />
- <link rel="stylesheet" href="tasks2.css" type="text/css" />
+ <link rel="stylesheet" href="style_4.css" type="text/css" />
+ <link rel="stylesheet" href="tasks_2.css" type="text/css" />
</head>
<body onload="document.getElementById('screen_height').style.height = (window.innerHeight ? window.innerHeight : document.documentElement.clientWidth) + 'px'">