if (empty($arFilter)) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    echo CAdminMessage::ShowMessage(GetMessage("PERFMON_ROW_EDIT_PK_ERROR"));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    die;
}
$arFields = $obTable->GetTableFields(false, true);
$rsRecord = $obTable->GetList(array_keys($arFields), $arFilter, array());
$arRecord = $rsRecord->Fetch();
if (!$arRecord) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    echo CAdminMessage::ShowMessage(GetMessage("PERFMON_ROW_EDIT_NOT_FOUND"));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    die;
}
$obSchema = new CPerfomanceSchema();
$arChildren = $obSchema->GetChildren($table_name);
$arParents = $obSchema->GetParents($table_name);
$aTabs = array(array("DIV" => "edit", "TAB" => GetMessage("PERFMON_ROW_EDIT_TAB"), "ICON" => "main_user_edit", "TITLE" => GetMessage("PERFMON_ROW_EDIT_TAB_TITLE", array("#TABLE_NAME#" => $table_name))), array("DIV" => "cache", "TAB" => GetMessage("PERFMON_ROW_CACHE_TAB"), "ICON" => "main_user_edit", "TITLE" => GetMessage("PERFMON_ROW_CACHE_TAB_TITLE")));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
$strError = '';
if ($_SERVER["REQUEST_METHOD"] === "POST" && check_bitrix_sessid() && $isAdmin) {
    $arToUpdate = array();
    $arFields = $obTable->GetTableFields(false, true);
    foreach ($arFields as $Field => $arField) {
        if (!in_array($Field, $arIndexColumns)) {
            $arToUpdate[$Field] = $_POST[$Field];
        }
    }
    $strUpdate = $DB->PrepareUpdate($table_name, $arToUpdate);
    if (strlen($strUpdate)) {
Esempio n. 2
0
 }
 $className = \Bitrix\Main\Entity\Base::snake2camel(implode("_", $tableParts));
 $obTable = new CPerfomanceTable();
 $obTable->Init($table_name);
 $arFields = $obTable->GetTableFields(false, true);
 $arUniqueIndexes = $obTable->GetUniqueIndexes();
 $hasID = false;
 foreach ($arUniqueIndexes as $indexName => $indexColumns) {
     if (array_values($indexColumns) === array("ID")) {
         $hasID = $indexName;
     }
 }
 if ($hasID) {
     $arUniqueIndexes = array($hasID => $arUniqueIndexes[$hasID]);
 }
 $obSchema = new CPerfomanceSchema();
 $arParents = $obSchema->GetParents($table_name);
 $arValidators = array();
 $arMessages = array();
 echo "File: /bitrix/modules/" . $tableParts[0] . "/lib/" . strtolower($className) . ".php";
 echo "<hr>";
 echo "<pre>";
 echo "&lt;", "?", "php\n";
 echo "namespace Bitrix\\" . $moduleNamespace . ";\n";
 echo "\n";
 echo "use Bitrix\\Main\\Entity;\n";
 echo "use Bitrix\\Main\\Localization\\Loc;\n";
 echo "Loc::loadMessages(_" . "_FILE_" . "_);\n";
 echo "\n";
 echo "/" . "**\n";
 echo " * Class " . $className . "Table\n";