function piworkflowRenderColumn($idcat, $idart, $idartlang, $column)
{
    global $area, $frame, $idtpl, $cfg, $alttitle, $tmp_articletitle;
    $defaultidworkflow = getWorkflowForCat($idcat);
    $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
    $associatedUserSequence = new WorkflowUserSequence();
    $associatedUserSequence->loadByPrimaryKey($idusersequence);
    $currentEditor = $associatedUserSequence->get("iduser");
    $workflowItem = $associatedUserSequence->getWorkflowItem();
    if (isCurrentEditor($associatedUserSequence->get("iduser"))) {
        $wfRights = $workflowItem->getStepRights();
        $mayEdit = true;
    } else {
        $wfRights = "";
        $mayEdit = false;
    }
    switch ($column) {
        case "wftitle":
            if ($wfRights["articleedit"] == true) {
                $mtitle = $tmp_articletitle;
            } else {
                $mtitle = strip_tags($tmp_articletitle);
            }
            return $mtitle;
        case "wfstep":
            if ($workflowItem === false) {
                return "nobody";
            }
            return $workflowItem->get("position") . ".) " . $workflowItem->get("name");
        case "wfeditor":
            $sEditor = getGroupOrUserName($currentEditor);
            if (!$sEditor) {
                $sEditor = "nobody";
            }
            return $sEditor;
        case "wfaction":
            $defaultidworkflow = getWorkflowForCat($idcat);
            $idusersequence = getCurrentUserSequence($idartlang, $defaultidworkflow);
            $sActionSelect = getActionSelect($idartlang, $idusersequence);
            if (!$sActionSelect) {
                $mayEdit = false;
            }
            $form = new UI_Form("wfaction" . $idartlang, "main.php", "get");
            $form->setVar("area", $area);
            $form->setVar("action", "workflow_do_action");
            $form->setVar("frame", $frame);
            $form->setVar("idcat", $idcat);
            $form->setVar("modidartlang", $idartlang);
            $form->setVar("idtpl", $idtpl);
            $form->add("select", '<table cellspacing="0" border="0"><tr><td>' . $sActionSelect . '</td><td>');
            $form->add("button", '<input type="image" src="' . $cfg["path"]["htmlpath"] . $cfg["path"]["images"] . "submit.gif" . '"></tr></table>');
            if ($mayEdit == true) {
                return $form->render(true);
            } else {
                return '--- ' . i18n("None") . ' ---';
            }
        case "wflaststatus":
            $sStatus = getLastWorkflowStatus($idartlang);
            if (!$sStatus) {
                $sStatus = '--- ' . i18n("None") . ' ---';
            }
            return $sStatus;
    }
}
        }
    }
}
$tpl->reset();
$tpl->setEncoding('iso-8859-1');
$tpl->set('s', 'SESSID', $sSession);
$tpl->set('s', 'SESSNAME', $sess->name);
$iIDCat = 0;
$iIDTpl = 0;
if ($perm->have_perm_area_action($area, "workflow_task_user_select")) {
    $form = new UI_Form("showusers", $sess->url("main.php?area={$area}&frame={$frame}"));
    $form->setVar("area", $area);
    $form->setEvent("submit", "setUsershow();");
    $form->setVar("frame", $frame);
    $form->setVar("action", "workflow_task_user_select");
    $form->add("select", i18n("Show users") . ": " . getUsers("show", $usershow));
    $form->add("button", '<input style="vertical-align:middle;" type="image" src="' . $cfg["path"]["htmlpath"] . $cfg["path"]["images"] . "submit.gif" . '">');
    $tpl->set('s', 'USERSELECT', $form->render(true));
} else {
    $tpl->set('s', 'USERSELECT', '');
}
$pageTitle = i18n('Search results') . ' - ' . i18n('Workflow tasks', 'workflow');
$tpl->set('s', 'PAGE_TITLE', $pageTitle);
$tpl->set('s', 'TH_START', i18n("Article"));
$tpl->set('s', 'TH_TEMPLATE', i18n("Template"));
$tpl->set('s', 'TH_ACTIONS', i18n("Actions"));
$tpl->set('s', 'TH_TITLE', i18n("Title"));
$tpl->set('s', 'TH_CHANGED', i18n("Changed"));
$tpl->set('s', 'TH_PUBLISHED', i18n("Published"));
$tpl->set('s', 'TH_WORKFLOW_STEP', i18n("Workflow Step", 'workflow'));
$tpl->set('s', 'TH_WORKFLOW_ACTION', i18n("Workflow Action", 'workflow'));