Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 19. apríl 2024

Súbor: [Platon] / Metafox / admin / inc-db / boxes.inc.php (stiahnutie)

Revízia 1.3, Tue Nov 7 08:43:23 2017 UTC (6 years, 5 months ago) by nepto


Zmeny od 1.2: +1 -1 [lines]

Reuse existing DB handle in $ezin_db_handle variable instead of creating
a new one. Not only this needs more resources, but also newly created
handle does not have proper encoding initialized via SET NAMES query
(for example default UTF-8 vs required LATIN2)

<?php

// Authentification

if (@file_exists('inc/auth.inc.php') && @include_once 'inc/auth.inc.php');
else exit;

// General options
$ezin_opts['dbh'] = $ezin_db_handle;
$ezin_opts['tb']  = $ezin_sys['db']['tables']['boxes'];
$ezin_opts['key'] = 'id';
$ezin_opts['key_type'] = 'int';
$ezin_opts['inc'] = -1;
$ezin_opts['options'] = $ezin_user['role_articles'];
$ezin_opts['options'] = str_replace('A', '', $ezin_opts['options']);
$ezin_opts['multiple'] = '4';
$ezin_opts['navigation'] = $ezin_cfg['admin_navigation'].$ezin_cfg['admin_buttons_pos'];
$ezin_opts['display'] = array('query' => false, 'sort'  => false, 'time'  => false);
$ezin_opts['url'] = array('images' => 'icons/');
$ezin_opts['sort_field'] = array('theme','group_name','ord');
$ezin_opts['language'] = 'EN';
$ezin_opts['encoding'] = $ezin_cfg['encoding'];
$ezin_opts['ext_hsc'] = false;

// Triggers
$ezin_opts['triggers']['update']['after'] = 'inc-db/triggers/boxes.after';
$ezin_opts['triggers']['delete']['after'] = 'inc-db/triggers/boxes.after';

// Filters
$ezin_opts['filters'] = 'theme = "'.$ezin_cfg['theme']['name'].'"';

// Field definitions
$ezin_opts['fdd']['id'] = array(
    'name'=>'ID',
    'select'=>'T',
    'maxlen'=>3,
    'sort'=>true,
    'options'=>'LDVFPCR',
    'colattrs|LF' => 'align="center"',
);
$ezin_opts['fdd']['theme'] = array(
    'name'     => 'Theme',
    'select'   => 'T',
    'maxlen'   => 765,
    'sort'     => true,
    'options'  => 'R',
    'default'  => $ezin_cfg['theme']['name']
);
$ezin_opts['fdd']['name'] = array(
    'name'     => 'Name',
    'select'   => 'T',
    'maxlen'   => 765,
    'sort'     => true,
    'options'  =>'LDVFPCR'
);
$template_keys = ezin_admin_get_template_keys($ezin_sys['tmpl']['box']);
if (count($template_keys) > 0) {
    $ezin_opts['fdd']['template_key'] = array(
            'name'=>Platon::htmlspecialchars2('Template key'),
            'sort'=>true,
            'select'=>'T',
            'options'=>'ACPDV',
            'values2'=> array(''=>' - default template - '),
            'values' => $template_keys
            );
}

$ezin_opts['fdd']['bodytext'] = array(
    'name'     => 'Bodytext',
    'select'   => 'T',
    'textarea' => array(
        'rows'   => 15,
        'cols'   => 65,
        'wrap'   =>'virtual'),
    'options'  => 'ACPVL',
    'trimlen|L' => 100
);

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);
}

?>

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok