";
$link_id = db_connect();
if(!$link_id) die(sql_error());
if($_POST)
{
if($_POST['actione']=='add')
{
$posttext=$_POST['note_text'];
$posttext=strip_tags($posttext);
$Qinsert="INSERT into $tododb (todo_id, Pro_id, todo_text, lastaccess) VALUES(NULL,'$Pro_username','$posttext', NULL)";
$Rinsert=mysql_query($Qinsert);
if(!$Rinsert){die("Failed to add note");}
autoreload();
} else {
while(list($oom, $pahpah)=each($HTTP_POST_VARS))
{
if($pahpah=='on'){
$delQ="DELETE from $tododb WHERE todo_id='$oom'";
$delR=mysql_query($delQ);
if(!$delR) die(sql_error());
autoreload();
}
}
}
}
if(!empty($Pro_username))
{
$queryToDo = "SELECT * FROM $tododb WHERE Pro_id = '$Pro_username'";
$resultToDo = mysql_query($queryToDo);
$numrows=mysql_num_rows($resultToDo);
if($numrows==0)
{echo " You don't have any items on your \"To Do List\" right now ";
} else {
echo "";
}
echo "";
if((stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) && (stristr($_SERVER['HTTP_USER_AGENT'], "win")))
{
echo " Add your regular weekly appointments here!";
} else {
echo " Add your regular weekly appointments here!";
}
echo " If you wish to update your registration, click " . "here.";
echo " If you wish to change your password, click " . "here.";
echo " If you wish to check your appointments, click " . "here.";
echo " If you wish to add an appointment, click " . "here.";
if($_SESSION['userProid']=='zsaper')
{
echo " If you want to check others' schedules, click " . "here.";
}
echo "
New invoicing functions!
";
echo "Create invoices from your appointments here";
echo " Review your invoices and record payments here";
echo " Set your default rates here.";
}
else
{
echo " There is no service provider logged in. If you are a service provider, log in here.";
}
?>