print "<div id='cleancode'>"; $r = get_work_process($work_unit_id); $cell_id = $r['cell_id']; $process_id = $r['process_id']; $work_id = $r['work_id']; $cdata = get_cell_data($cell_id); $process_function = get_process_function($process_id); if ($process_function == false) { //search area print "<div id='searcharea'><label for='search'>" . T_("Search") . ":</label><input type='text' id='search' name='search'/> <span id='searchclick'>" . T_("Click here to search (or press enter)") . "</span></div>"; //coding print "<div class='header' id='header'>"; if ($code_id == false) { display_codes($work_unit_id, $operator_id, $cdata[0]); } else { display_all_codes($code_id, true, $work_unit_id); } print "</div>"; } else { if (is_callable($process_function)) { call_user_func($process_function, $cell_id, $cdata[0], $work_unit_id); } else { print "<p>" . T_("Error: Cannot execute process function:") . " {$process_function}</p>"; } } print "<input type='hidden' name='work_unit_id' value='{$work_unit_id}'/></div>"; print "</form>"; } print "</div>"; print "<div id='workhistory'>"; xhtml_object("workhistory.php", "work-history");
/** * Display multiple choice codes (root is multiple choice, each code (if any) is a child * Each column is a root multiple choice code * * @param int $cmgi Column multi group id * */ function display_multi_root($cmgi) { global $db; //Get all columns with this $cmgi $sql = "SELECT column_id,description,code_level_id\r\n\t\tFROM `column`\r\n\t\tWHERE column_multi_group_id = '{$cmgi}'"; $rs = $db->GetAll($sql); //Display columns as rows with check boxes. print "<div class='level'>"; foreach ($rs as $r) { print "<div class='row'><input class='cb' type='checkbox' name='ci{$r['column_id']}' id='ci{$r['column_id']}' value='1' "; if (false) { print " checked='checked'"; } print "/><label for='ci{$r['column_id']}'>{$r['description']}</label>"; print "</div>"; //display codes under this column $sql = "SELECT c.code_id\r\n\t\t\tFROM code as c\r\n\t\t\tWHERE c.code_level_id = '{$r['code_level_id']}'\r\n\t\t\tLIMIT 1"; $a = $db->GetRow($sql); if (!empty($a)) { print "<div class='subcode' id='sc{$r['column_id']}' style='display:inline;'>"; display_all_codes($a['code_id'], false); print "</div>"; } } //When check boxes selected, should display all relevant codes (if any) //Allow for adding a new column print "<div class='row'><div><input type='hidden' name='newcodemulti' value='{$cmgi}'/><input type='text' name='newcodetextm'/><input type='submit' name='submit_add_multi' value='" . T_("Add") . "'/></div></div>"; print "</div>"; }