false, 'sort' => false, 'time' => false); $ezin_opts['url'] = array('images' => 'icons/'); $ezin_opts['sort_field'] = array('ord', '-id'); $ezin_opts['language'] = 'EN'; $ezin_opts['encoding'] = $ezin_cfg['encoding']; $ezin_opts['ext_hsc'] = false; // Triggers $ezin_opts['triggers']['insert']['before'][] = 'inc-db/triggers/access-key.trigger'; $ezin_opts['triggers']['update']['before'][] = 'inc-db/triggers/access-key.trigger'; $ezin_opts['triggers']['insert']['after'][] = 'inc-db/triggers/sections.after'; $ezin_opts['triggers']['update']['after'][] = 'inc-db/triggers/sections.after'; $ezin_opts['triggers']['delete']['after'][] = 'inc-db/triggers/sections.after'; $ezin_opts['triggers']['insert']['after'][] = 'inc-db/triggers/access-key.insert.after'; $ezin_opts['triggers']['update']['after'][] = 'inc-db/triggers/access-key.update.after'; $ezin_opts['triggers']['delete']['after'][] = 'inc-db/triggers/access-key.delete.after'; // Field definitions $ezin_opts['fdd']['id'] = array( 'name'=>'ID', 'select'=>'T', 'sort'=>true, 'size'=>5, 'default'=>'', 'options'=>'LDVFPCR', 'URL'=>ezin_get_link('S', '$value'), // TODO: fix for length >= 4 'sql|LF'=>'IF(TRIM(PMEtable0.access_key) != "",' .' CONCAT(LPAD(PMEtable0.id,3,"0"), ""), LPAD(PMEtable0.id,3,"0"))', 'escape' => false, 'colattrs|LF'=>'align="center"', ); /* $ezin_opts['fdd']['type'] = array( 'name'=>'Type', 'name|LF'=>'T', 'select'=>'D', 'sort'=>true, 'required'=>true, 'values2' => array( 'normal' => 'normal (default)', 'global' => 'global (show all articles)', 'hidden' => 'hidden (accessible with accessible articles; removed from list)', 'hidden2' => 'hidden (accessible with accessible articles not in global; removed from list)', 'full_hidden' => 'partly disabled (unaccessible with accessible articles; removed from list)', 'disabled' => 'disabled (unaccesible with unaccessible articles; removed from list)'), 'values2|LF' => array( 'global' => 'G', 'normal' => 'N', 'hidden' => 'h', 'hidden2' => 'H', 'full_hidden' => 'd', 'disabled' => 'D'), 'colattrs|LF'=>'align="center"', ); */ $ezin_opts['fdd']['type2'] = array( 'name'=>'Type2', 'name|LF'=>'T2', 'select'=>'C', 'select|LF'=>'M', 'sort'=>true, 'values2' => array( 'global' => 'global'), 'values2|LF' => array( '' => 'N', 'global' => 'G'), 'colattrs|LF'=>'align="center"', ); $ezin_opts['fdd']['display'] = array( 'name'=>'Display', 'name|LF'=>'D', 'select'=>'C', 'select|LF'=>'M', 'sort'=>true, 'values2' => array( 'in_list' => 'Display section', 'articles_enabled' => 'Enabled articles', 'articles_in_normal' => 'Display articles in normal section', 'articles_in_global' => 'Display articles in global section'), 'values2|LF' => array( '' => 'Disabled', 'in_list' => 'S', 'articles_enabled' => 'A', 'articles_in_normal' => 'N', 'articles_in_global' => 'G'), 'colattrs|LF'=>'align="center"', ); $ezin_opts['fdd']['select'] = array( 'name'=>'Select', 'name|LF'=>'S', 'select'=>'C', 'select|LF'=>'M', 'sort'=>true, 'values2' => array( 'articles' => 'Articles', 'pages' => 'Pages', 'editorials' => 'Editorials'), 'values2|LF' => array( '' => 'None', 'articles' => 'A', 'pages' => 'P', 'editorials' => 'E'), 'colattrs|LF'=>'align="center"', ); $template_keys = array_unique(array_merge( ezin_admin_get_template_keys($ezin_sys['tmpl']['section']), ezin_admin_get_template_keys($ezin_sys['tmpl']['section_item']), ezin_admin_get_template_keys($ezin_sys['tmpl']['article_item']) )); if (count($template_keys) > 0) { $ezin_opts['fdd']['template_key'] = array( 'name'=>Platon::htmlspecialchars2('Template key'), 'select'=>'T', 'sort'=>true, 'options'=>'ACPDV', 'values2'=> array(''=>' - default template - '), 'values' => $template_keys ); } $ezin_opts['fdd']['access_key'] = array( 'name'=>Platon::htmlspecialchars2('Access key'), 'name|LF'=>'Key', 'select'=>'T', 'sort'=>true, 'options'=>'ACPDV' ); $ezin_opts['fdd']['lang'] = array( 'name'=>'Language', 'name|LF'=>'Lang', 'select'=>'D', 'sort'=>true, 'values2' => array('' => 'undefined'), 'values2|LF' => array('' => '--'), 'default'=>'', 'options' => 'ACPVD'.(is_array($ezin_cfg['languages']) ? 'LF' : 'HR'), 'colattrs|LF'=>'align="center"', ); if (is_array($ezin_cfg['languages'])) { foreach ($ezin_cfg['languages'] as $ezin_val) { $ezin_opts['fdd']['lang']['values2|LF'][$ezin_val] = $ezin_opts['fdd']['lang']['values2'][$ezin_val] = strtoupper($ezin_val); } } $ezin_opts['fdd']['bind_lang'] = array( 'name'=>Platon::htmlspecialchars2('Language bind'), 'select'=>'D', 'sort'=>true, 'options' => 0 && count($ezin_cfg['languages']) ? 'ACPVD' : '' ); $ezin_opts['fdd']['accesses_count'] = array( 'name'=>Platon::htmlspecialchars2('Accesses count'), 'options'=>'VDACP'.'HR', 'default'=>'0' ); $ezin_opts['fdd']['sessions_count'] = array( 'name'=>Platon::htmlspecialchars2('Sessions count'), 'options'=>'VDACP'.'HR', 'default'=>'0' ); $ezin_opts['fdd']['raw_accesses_count'] = array( 'name'=>Platon::htmlspecialchars2('Raw accesses count'), 'options'=>'VDACP'.'HR', 'default'=>'0' ); $ezin_opts['fdd']['raw_sessions_count'] = array( 'name'=>Platon::htmlspecialchars2('Raw sessions count'), 'options'=>'VDACP'.'HR', 'default'=>'0' ); $ezin_opts['fdd']['ord'] = array( 'name'=>'Ord', 'select'=>'T', 'default'=>'100', 'maxlen'=>5, 'sort'=>true, 'colattrs|LF'=>'align="center"', ); $ezin_opts['fdd']['a_limit'] = array( 'name'=>'Limit', 'select'=>'T', 'default'=>'0', 'maxlen'=>2, 'sort'=>true, 'options'=>'VDACP' ); $ezin_opts['fdd']['author_id'] = array( 'name'=>Platon::htmlspecialchars2('Section Leader'), 'select'=>'T', 'sort'=>true, 'strip_tags'=>true, 'required'=>true, 'options'=>'ACPVD', 'values' => array( 'table' => $ezin_sys['db']['tables']['authors'], 'column' => 'id', 'description' => 'name') ); if ($ezin_cfg['single_author_id'] >= 0) { /* If we have just one Author in DB, we do not need to show him */ $ezin_opts['fdd']['author_id']['options'] = 'ACPVDRH'; $ezin_opts['fdd']['author_id']['default'] = $ezin_cfg['single_author_id']; } $ezin_opts['fdd']['name'] = array( 'name'=>'Name', 'select'=>'T', 'maxlen'=>60, 'sort'=>true, 'required'=>true, 'trimlen|LF'=>35, ); $ezin_opts['fdd']['link'] = array( 'name'=>Platon::htmlspecialchars2('Link'), 'select'=>'T', 'maxlen'=>255, 'sort'=>true, 'required'=>false ); include dirname(__FILE__).'/_credentials.inc.php'; // Execution code if (! ezin_admin_check_list_privileges($ezin_opts['options'])) { require 'inc-html/permdenied.html'; } else { require_once 'phpMyEdit/phpMyEdit.class.php'; new phpMyEdit($ezin_opts); } ?>