// or with id=0 / no id for create mode. if (!canEdit('System')) { ajaxError('Insufficient privileges'); return; } $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; $tmpl = null; if ($id) { $row = dbFetchOne('SELECT * FROM EncoderTemplates WHERE Id = ?', null, array($id)); if (!$row) { ajaxError('Invalid template id'); return; } $tmpl = $row; } $encoders = array( 'libx264' => 'libx264', 'libx265' => 'libx265', 'h264_nvenc' => 'h264_nvenc', 'hevc_nvenc' => 'hevc_nvenc', 'h264_vaapi' => 'h264_vaapi', 'hevc_vaapi' => 'hevc_vaapi', ); ?>