false, 'sort' => false, 'time' => false); $ezin_opts['url'] = array('images' => 'icons/'); $ezin_opts['format_date'] = $ezin_cfg['format_date']; $ezin_opts['cgi']['persist'] = array('article_id' => Platon::get_cgi_var('article_id')); $ezin_opts['language'] = 'EN'; $ezin_opts['encoding'] = $ezin_cfg['encoding']; $ezin_opts['ext_hsc'] = false; // Triggers $ezin_opts['triggers']['insert']['after'][] = 'inc-db/triggers/messages.after'; $ezin_opts['triggers']['update']['after'][] = 'inc-db/triggers/messages.after'; $ezin_opts['triggers']['delete']['after'][] = 'inc-db/triggers/messages.after'; // Require require_once 'phpMyEdit/phpMyEdit.class.php'; require_once 'phpMyEdit/extensions/phpMyEdit-messages.class.php'; // Field definitions $ezin_opts['fdd']['id'] = array( 'name'=>Platon::htmlspecialchars2('Message ID'), 'select'=>'T', 'maxlen'=>3, 'sort'=>true, 'default'=>'', 'options'=>'LDVFPCR', ); $ezin_opts['fdd']['article_id'] = array( 'name'=>'Article', 'select'=>'T', 'strip_tags'=>true, 'values' => array( 'table' => $ezin_sys['db']['tables']['articles'], 'column' => 'id', 'description' => 'title'), 'options|A' => 'ACVDP', 'options' => 'ACVDPR', 'default' => phpMyEdit::get_data_cgi_var('article_id') ); $ezin_opts['fdd']['parent'] = array( 'name'=>'Parent ID', 'select'=>'T', 'sort'=>true, 'default'=>0 //'options' => 'CFVD' ); $ezin_opts['fdd']['author'] = array( 'name'=>'Author', 'select'=>'T', 'maxlen'=>255, 'sort'=>true, 'required'=>true ); $ezin_opts['fdd']['email'] = array( 'name'=>'E-mail', 'select'=>'T', 'maxlen'=>255, 'sort'=>true ); $ezin_opts['fdd']['homepage'] = array( 'name'=>'Homepage', 'select'=>'T', 'maxlen'=>255, 'sort'=>true ); $ezin_opts['fdd']['subject'] = array( 'name'=>'Subject', 'select'=>'T', 'maxlen'=>255, 'sort'=>true, 'required'=>true ); $ezin_opts['fdd']['ip'] = array( 'name'=>Platon::htmlspecialchars2('IP addresses'), 'name|LF'=>'IP', 'select'=>'T', 'maxlen'=>255, 'sort'=>true, 'trimlen|LF' => 15 ); $ezin_opts['fdd']['datetime'] = array( 'name'=>'Date & Time', 'select'=>'T', 'sort'=>true, 'required'=>true, 'mask'=>'%.16s', 'default'=>date('Y-m-d H:i:s') ); $ezin_opts['fdd']['message'] = array( 'name'=>'Message', 'select'=>'T', 'textarea'=>array( 'rows'=>10, 'cols'=>65, 'wrap'=>'virtual' ), 'sort'=>true, 'options'=>'ACFVD' ); // Execution code if (! ezin_admin_check_list_privileges($ezin_opts['options'])) { require 'inc-html/permdenied.html'; } else { new phpMyEdit_messages($ezin_opts); } ?>