GetGroupRight("workflow"); if($WORKFLOW_RIGHT=="D") $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/workflow/include.php"); IncludeModuleLangFile(__FILE__); $err_mess = "File: ".__FILE__."
Line: "; $rs = CSite::GetList(); while ($ar = $rs->Fetch()) $arrSites[$ar["ID"]] = $ar; $sTableID = "t_workflow_list"; $oSort = new CAdminSorting($sTableID, "s_date_modify", "desc");// sort init $lAdmin = new CAdminList($sTableID, $oSort);// list init $arFilterFields = Array( "find", "find_type", "find_id", "find_id_exact_match", "find_lock_status", "find_modify_1", "find_modify_2", "find_modified_user_id", "find_modified_user_id_exact_match", "find_site_id", "find_filename", "find_filename_exact_match", "find_title", "find_title_exact_match", "find_body", "find_body_exact_match", "find_status", "find_status_exact_match", "find_status_id", "FILTER_logic", //"find_modified_by", ); $lAdmin->InitFilter($arFilterFields);//filter init $filter = new CAdminFilter( $sTableID."_filter_id", array( GetMessage('FLOW_F_ID'), GetMessage('FLOW_F_LOCK_STATUS'), GetMessage("FLOW_F_DATE_MODIFY"), GetMessage('FLOW_F_MODIFIED_BY'), GetMessage('FLOW_F_SITE'), GetMessage('FLOW_F_FILENAME'), GetMessage('FLOW_F_TITLE'), GetMessage('FLOW_F_BODY'), GetMessage('FLOW_F_STATUS'), GetMessage('FLOW_F_LOGIC'), ) ); InitBVar($find_id_exact_match); InitBVar($find_modified_user_id_exact_match); InitBVar($find_filename_exact_match); InitBVar($find_title_exact_match); InitBVar($find_body_exact_match); InitBVar($find_status_exact_match); $arFilter = Array( "ID" => $find_id, "DATE_MODIFY_1" => $find_modify_1, "DATE_MODIFY_2" => $find_modify_2, //"MODIFIED_BY" => ($find_type == "modified_by" && strlen($find)>0 ? $find:$find_modified_by), "MODIFIED_USER_ID" => ($find_type == "modified_by" && $find <> '' ? $find:$find_modified_user_id), "LOCK_STATUS" => $find_lock_status, "STATUS" => $find_status, "STATUS_ID" => $find_status_id, "FILENAME" => $find_filename, "SITE_ID" => $find_site_id, "TITLE" => ($find_type == "title" && $find <> ''? $find:$find_title), "BODY" => ($find_type == "body" && $find <> ''? $find:$find_body), "ID_EXACT_MATCH" => $find_id_exact_match, "MODIFIED_USER_ID_EXACT_MATCH" => $find_modified_user_id_exact_match, "FILENAME_EXACT_MATCH" => $find_filename_exact_match, "TITLE_EXACT_MATCH" => $find_title_exact_match, "BODY_EXACT_MATCH" => $find_body_exact_match, "STATUS_EXACT_MATCH" => $find_status_exact_match, ); if ($WORKFLOW_RIGHT>"R" && $lAdmin->EditAction()) // list action handlers { foreach($FIELDS as $ID => $arFields) { $ID = intval($ID); if(!$lAdmin->IsUpdated($ID)) continue; if (CWorkflow::IsAllowEdit($ID,$locked_by,$date_lock)) { CWorkflow::SetStatus($ID, $arFields["STATUS_ID"], $FIELDS_OLD[$ID]["STATUS_ID"]); CWorkflow::UnLock($ID); } else { if (intval($locked_by)>0) { $str = str_replace("#DID#",$ID,GetMessage("FLOW_DOCUMENT_LOCKED")); $str = str_replace("#ID#",$locked_by,$str); $str = str_replace("#DATE#",$date_lock,$str); $lAdmin->AddUpdateError($str, $ID); //$strError .= $str."
"; } else { $str = str_replace("#ID#",$ID,GetMessage("FLOW_DOCUMENT_IS_NOT_AVAILABLE")); $lAdmin->AddUpdateError($str, $ID); //$strError .= $str."
"; } } } } if($WORKFLOW_RIGHT>"R" && $arID = $lAdmin->GroupAction()) { if($_REQUEST['action_target']=='selected') { $rsData = CWorkflow::GetList('', '', $arFilter); while($arRes = $rsData->Fetch()) $arID[] = $arRes['ID']; } foreach($arID as $ID) { $ID = intval($ID); if($ID <= 0) continue; switch($_REQUEST['action']) { case "delete": if (CWorkflow::IsAllowEdit($ID, $locked_by, $date_lock)) { CWorkflow::Delete($ID); } else { if (intval($locked_by)>0) { $str = str_replace("#DID#",$ID,GetMessage("FLOW_DOCUMENT_LOCKED")); $str = str_replace("#ID#",$locked_by,$str); $str = str_replace("#DATE#",$date_lock,$str); $lAdmin->AddGroupError($str, $ID); //$strError .= $str."
"; } else { $str = str_replace("#ID#",$ID,GetMessage("FLOW_DOCUMENT_IS_NOT_AVAILABLE")); $lAdmin->AddGroupError($str, $ID); //$strError .= $str."
"; } } break; case "unlock": CWorkflow::UnLock($ID); break; } } } global $by, $order; $rsData = CWorkflow::GetList($by, $order, $arFilter); $rsData = new CAdminResult($rsData, $sTableID); $rsData->NavStart(50); // navigation setup $lAdmin->NavText($rsData->GetNavPrint(GetMessage("FLOW_PAGES"))); $arHeaders = Array(); $arHeaders[] = Array("id"=>"ID", "content"=>"ID", "default"=>false, "sort" => "s_id"); $arHeaders[] = Array("id"=>"LOCK_STATUS", "content"=>GetMessage("FLOW_LOCK_STATUS"), "default"=>true, "sort" => "s_lock_status"); $arHeaders[] = Array("id"=>"DATE_MODIFY", "content"=>GetMessage("FLOW_DATE_MODIFY"), "default"=>true, "sort" => "s_date_modify"); $arHeaders[] = Array("id"=>"MODIFIED_BY", "content"=>GetMessage("FLOW_MODIFIED_BY"), "default"=>true, "sort" => "s_modified_by"); $arHeaders[] = Array("id"=>"TITLE", "content"=>GetMessage("FLOW_TITLE"), "default"=>true, "sort" => "s_title"); $arHeaders[] = Array("id"=>"FILENAME", "content"=>GetMessage("FLOW_FILENAME"), "default"=>true, "sort" => "s_filename"); $arHeaders[] = Array("id"=>"STATUS_ID", "content"=>GetMessage("FLOW_STATUS"), "default"=>true, "sort" => "s_status"); $arHeaders[] = Array("id"=>"SITE_ID", "content"=>GetMessage("FLOW_SITE"), "default"=>true, "sort" => "s_site_id"); $lAdmin->AddHeaders($arHeaders); $arStatus = Array(); $res = CWorkflowStatus::GetDropDownList(); while($ar = $res->Fetch()) $arStatus[$ar["REFERENCE_ID"]] = $ar["REFERENCE"]; // list fill while($arRes = $rsData->NavNext(true, "f_")) { $row =& $lAdmin->AddRow($f_ID, $arRes); if ($f_LOCK_STATUS=="green") $lamp_alt = GetMessage("FLOW_GREEN_ALT"); elseif ($f_LOCK_STATUS=="yellow") $lamp_alt = GetMessage("FLOW_YELLOW_ALT"); else $lamp_alt = GetMessage("FLOW_RED_ALT"); $str = '
'; $row->AddViewField("LOCK_STATUS", $str); $row->AddViewField("FILENAME", ''.$f_FILENAME.''); $row->AddSelectField("STATUS_ID", $arStatus); $str = '['.$f_MODIFIED_BY.'] '.$f_MUSER_NAME; $row->AddViewField("MODIFIED_BY", $str); $arActions = Array(); if ($f_LOCK_STATUS!="green") { if (CWorkflow::IsAdmin() || $f_LOCKED_BY==$USER->GetID()) { $arActions[] = array( "ICON" => "unlock", "TEXT"=>GetMessage("FLOW_UNLOCK"), "ACTION"=>"if(confirm('".GetMessage('FLOW_UNLOCK_CONFIRM')."')) ".$lAdmin->ActionDoGroup($f_ID, "unlock") ); $arActions[] = Array("SEPARATOR" => true); } } if ($f_STATUS_ID!=1) { $arActions[] = array( "DEFAULT" => "Y", "ICON"=>"edit", "TEXT"=>GetMessage("FLOW_EDIT"), "ACTION"=>$lAdmin->ActionRedirect("workflow_edit.php?lang=".LANG."&ID=".$f_ID) ); } else { $arActions[] = array( "ICON"=>"view", "TEXT"=>GetMessage("FLOW_VIEW"), "ACTION"=>$lAdmin->ActionRedirect("workflow_edit.php?lang=".LANG."&ID=".$f_ID) ); } if ($f_STATUS_ID!=1) { $arActions[] = array( "ICON"=>"view", "TEXT"=>GetMessage("FLOW_PREVIEW"), "ACTION"=>$lAdmin->ActionRedirect("workflow_preview.php?lang=".LANG."&ID=".$f_ID."&".bitrix_sessid_get()) ); } $arActions[] = array( "ICON"=>"view", "TEXT"=>GetMessage("FLOW_HISTORY"), "ACTION"=>$lAdmin->ActionRedirect("workflow_history_list.php?lang=".LANG."&find_document_id=".$f_ID."&find_document_id_exact_match=Y&set_filter=Y") ); $arActions[] = array( "ICON"=>"view", "TEXT"=>GetMessage("FLOW_HISTORY_FILE"), "ACTION"=>$lAdmin->ActionRedirect("workflow_history_list.php?lang=".LANG."&find_filename=".$f_FILENAME."&find_filename_exact_match=Y&set_filter=Y") ); if ($f_LOCK_STATUS!="red" && $WORKFLOW_RIGHT>"R") { $arActions[] = Array("SEPARATOR" => true); $arActions[] = array( "ICON" => "delete", "TEXT"=>GetMessage("FLOW_DELETE"), "ACTION"=>"if(confirm('".GetMessage('FLOW_DELETE_CONFIRM')."')) ".$lAdmin->ActionDoGroup($f_ID, "delete") ); } $row->AddActions($arActions); } if ($WORKFLOW_RIGHT>"R") { // list footer $lAdmin->AddFooter( array( array("title"=>GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value"=>$rsData->SelectedRowsCount()), array("counter"=>true, "title"=>GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value"=>"0"), ) ); } // action buttons $lAdmin->AddGroupActionTable(Array( "unlock"=>GetMessage("FLOW_UNLOCK_S"), "delete"=>GetMessage("MAIN_ADMIN_LIST_DELETE"), ) ); $aContext = array( array( "ICON" => "btn_new", "TEXT" => GetMessage("FLOW_ADD"), "TITLE" => GetMessage("FLOW_ADD"), "LINK" => "workflow_edit.php?lang=".LANG ), ); $lAdmin->AddAdminContextMenu($aContext); $lAdmin->CheckListMode(); $APPLICATION->SetTitle(GetMessage("FLOW_PAGE_TITLE")); require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");?>
Begin();?>
Fatal error: Uncaught Error: Call to undefined function GetMessage() in D:\ktt\ttepla.com\public_html\bitrix\modules\workflow\admin\workflow_list.php:347 Stack trace: #0 {main} thrown in D:\ktt\ttepla.com\public_html\bitrix\modules\workflow\admin\workflow_list.php on line 347