false, 'sort' => false, 'time' => false); $ezin_opts['url'] = array('images' => 'icons/'); $ezin_opts['sort_field'] = array('-datetime', '-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/word-count.trigger'; $ezin_opts['triggers']['update']['before'][] = 'inc-db/triggers/word-count.trigger'; $ezin_opts['triggers']['insert']['before'][] = 'inc-db/triggers/text-flags.trigger'; $ezin_opts['triggers']['update']['before'][] = 'inc-db/triggers/text-flags.trigger'; // Field definitions $ezin_opts['fdd']['id'] = array( 'name'=>'ID', 'select'=>'T', 'maxlen'=>3, 'sort'=>true, 'default'=>'', 'options'=>'LDVFPCR', 'colattrs|LF'=>'align="center"', ); $ezin_opts['fdd']['section_id'] = array( 'name'=>'Section', 'select'=>'T', 'sort'=>true, 'required'=>true, 'strip_tags'=>true, 'values'=>array( 'table' => $ezin_sys['db']['tables']['sections'], 'orderby' => 'lang,ord,id', 'column' => 'id', 'description' => array( 'columns' => array('name', 'id', 'lang'), 'divs' => array(' (', ') ','')), 'filters' => 'FIND_IN_SET("editorials", `select`) > 0'), ); $ezin_opts['fdd']['article_id'] = array( 'name'=>'Article', 'select'=>'T', 'sort'=>true, 'required'=>true, 'strip_tags'=>true, 'values2'=>array(null=>'- no article -'), 'values'=>array( 'table' => $ezin_sys['db']['tables']['articles'], 'orderby' => '-datetime', 'column' => 'id', #'filters' => 'section_id = ', 'description' => array( 'columns' => array('atitle', 'id'), 'divs' => array(' (', ')'))), ); $ezin_opts['fdd']['datetime'] = array( 'name'=>Platon::htmlspecialchars2('Date & Time'), 'select'=>'T', 'sort'=>true, 'required'=>true, 'mask'=>'%.10s', 'default'=>date('Y-m-d H:i:s'), 'colattrs|LF'=>'align="center"', ); $ezin_opts['fdd']['text_wordcount'] = array( 'name'=>Platon::htmlspecialchars2('Text word count'), 'select'=>'T', 'options'=>'HCAP' ); $ezin_opts['fdd']['text_flags'] = array( 'name'=>Platon::htmlspecialchars2('Text flags'), 'select'=>'T', 'options'=>'HCAP' ); $ezin_opts['fdd']['title'] = array( 'name'=>'Title', 'select'=>'T', 'maxlen'=>255, 'sort'=>true, 'trimlen|LF'=>35, 'sql|LF'=>'REPLACE(CONCAT(PMEtable0.title, " | ", text), "\\r\\n", " ")' ); $ezin_opts['fdd']['text'] = array( 'name'=>Platon::htmlspecialchars2('Editorial text'), 'select'=>'T', 'textarea'=>array( 'rows'=>10, 'cols'=>65, 'wrap'=>'virtual' ), 'required'=>true, 'options'=>'ACPVD', 'trimlen|LF' => 35, 'strip_tags|LF' => true ); 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); } ?>