1313include_once ('../inc/menu.php ' );
1414?>
1515
16- <h2>Welcome!</h1>
17- <div>
18- Choose an option from the menu above or view your current tasks below.
19- </div>
16+ <h3>My Current Tasks | <a href="tasks-completed.php">My Completed Tasks</a></h3>
2017
21- <br />
22-
23- <h3>My Current Tasks</h2>
2418<?php
25- $ dg = new C_DataGrid ("SELECT ID, `Date`, contact, todo_type_id, todo_desc_id, task_status, Task_Update, sales_rep, Todo_Due_Date FROM notes " , "ID " , "notes " );
19+ $ dg = new C_DataGrid ("SELECT ID, `Date`, contact, todo_type_id, todo_desc_id, task_status, Task_Update, sales_rep, todo_due_date FROM notes " , "ID " , "notes " );
2620$ dg ->set_query_filter (" sales_rep = 1 && task_status != 2 " );
2721
2822$ dg ->set_col_hidden ('ID ' )->set_col_hidden ('sales_rep ' , false )->set_caption (' ' );
2923
30- $ dg ->set_col_title ('todo_type_id ' , 'Todo Type ' );
24+ $ dg ->set_col_title ('todo_type_id ' , 'Type ' );
3125$ dg ->set_col_title ('todo_desc_id ' , 'Description ' );
26+ $ dg ->set_col_title ('todo_due_date ' , 'Due Date ' );
3227
3328$ dg ->set_col_edittype ('task_status ' , 'select ' , 'SELECT ID, status FROM task_status ' );
3429$ dg ->set_col_edittype ('contact ' , 'select ' , 'SELECT ID, Contact_Last FROM Contact ' );
3530$ dg ->set_col_edittype ('todo_type_id ' , 'select ' , 'SELECT ID, Type FROM todo_type ' );
3631$ dg ->set_col_edittype ('todo_desc_id ' , 'select ' , 'SELECT ID, Description FROM todo_desc ' );
3732
38- /*
39- $col_formatter = <<<COLFORMATTER
40- function(cellvalue, options, rowObject){
41- n1 = parseInt(rowObject[0]);
42- return n1+n2;
43- }
44- COLFORMATTER;
45-
46- $dg -> add_column(
47- 'action',
48- array('name'=>'action',
49- 'index'=>'action',
50- 'width'=>'360',
51- 'formatter'=>$col_formatter),
52- 'Actions');
53- */
54-
55- $ dg ->set_scroll (true , 300 );
33+ $ dg ->add_column ("actions " , array ('name ' =>'actions ' ,
34+ 'index ' =>'actions ' ,
35+ 'width ' =>'70 ' ,
36+ 'formatter ' =>'actions ' ,
37+ 'formatoptions ' =>array ('keys ' =>true , 'editbutton ' =>true , 'delbutton ' =>false )),'Actions ' );
38+
39+ $ dg ->set_col_readonly ('Date, contact, todo_type_id, todo_desc_id, sales_rep, todo_due_date ' );
40+
41+ $ dg ->enable_edit ('INLINE ' );
42+ $ dg ->set_scroll (true , 200 );
5643$ dg -> display ();
5744?>
5845
46+
5947<?php
6048include_once ('../inc/footer.php ' );
6149?>
0 commit comments