/**
 * install form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Install
 * @author Henry Ruhs
 */
function install_form()
{
    global $d_type, $d_host, $d_name, $d_user, $d_password, $d_prefix, $name, $user, $password, $email;
    /* build type array */
    $typeArray = array();
    foreach (PDO::getAvailableDrivers() as $driver) {
        if (is_dir('database/' . $driver)) {
            $typeArray[$driver] = $driver;
        }
    }
    /* collect output */
    $output = '<h2 class="title_content">' . l('installation') . '</h2>';
    $output .= form_element('form', 'form_install', 'js_validate_form js_accordion form_default', '', '', '', 'action="' . FILE . '" method="post" autocomplete="off"');
    /* collect database set */
    $output .= '<fieldset class="js_set_accordion js_set_active set_accordion set_accordion_default set_active">';
    $output .= '<legend class="js_title_accordion js_title_active title_accordion title_accordion_default title_active">' . l('database_setup') . '</legend>';
    $output .= '<ul class="js_box_accordion js_box_active box_accordion box_accordion_default box_active">';
    if ($typeArray) {
        $output .= '<li>' . select_element('type', 'field_select', 'd_type', $typeArray, $d_type, l('type')) . '</li>';
    }
    $output .= '<li>' . form_element('text', 'd_host', 'field_text field_note', 'd_host', $d_host, '* ' . l('host'), 'maxlength="50" required="required" autofocus="autofocus" data-default="localhost" data-sqlite="' . substr(sha1(uniqid()), 0, 10) . '.sqlite"') . '</li>';
    $output .= '<li>' . form_element('text', 'd_name', 'field_text field_note', 'd_name', $d_name, '* ' . l('name'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('text', 'd_user', 'field_text field_note', 'd_user', $d_user, '* ' . l('user'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('password', 'd_password', 'js_unmask_password field_text', 'd_password', $d_password, l('password'), 'maxlength="50"') . '</li>';
    $output .= '<li>' . form_element('text', 'd_prefix', 'field_text', 'd_prefix', $d_prefix, l('prefix'), 'maxlength="50"') . '</li>';
    $output .= '</ul></fieldset>';
    /* collect account set */
    $output .= '<fieldset class="js_set_accordion js_set_accordion_last set_accordion set_accordion_default set_accordion_last">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_default">' . l('account_create') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_default">';
    $output .= '<li>' . form_element('text', 'name', 'field_text field_note', 'name', $name, '* ' . l('name'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('text', 'user', 'field_text field_note', 'user', $user, '* ' . l('user'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('password', 'password', 'js_unmask_password field_text field_note', 'password', $password, '* ' . l('password'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('email', 'email', 'field_text field_note', 'email', $email, '* ' . l('email'), 'maxlength="50" required="required"') . '</li>';
    $output .= '</ul></fieldset>';
    /* collect hidden and button output */
    $output .= form_element('hidden', '', '', 'd_salt', hash_generator(40));
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    $output .= form_element('button', '', 'js_submit button_default button_large', 'install_post', l('install'));
    $output .= '</form>';
    echo $output;
}
/**
 * admin contents form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_contents_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    /* switch table */
    switch (TABLE_PARAMETER) {
        case 'categories':
            $wording_single = 'category';
            $wording_sibling = 'category_sibling';
            break;
        case 'articles':
            $wording_single = 'article';
            $wording_sibling = 'article_sibling';
            break;
        case 'extras':
            $wording_single = 'extra';
            $wording_sibling = 'extra_sibling';
            break;
        case 'comments':
            $wording_single = 'comment';
            break;
    }
    /* define fields for existing user */
    if (ADMIN_PARAMETER == 'edit' && ID_PARAMETER) {
        /* query content */
        $result = Redaxscript\Db::forTablePrefix(TABLE_PARAMETER)->where('id', ID_PARAMETER)->findArray();
        $r = $result[0];
        if ($r) {
            foreach ($r as $key => $value) {
                ${$key} = stripslashes($value);
            }
        }
        if (TABLE_PARAMETER == 'comments') {
            $wording_headline = $author;
        } else {
            $wording_headline = $title;
        }
        if (TABLE_PARAMETER != 'categories') {
            $text = htmlspecialchars($text);
        }
        $wording_submit = l('save');
        $route = 'admin/process/' . TABLE_PARAMETER . '/' . $id;
    } else {
        if (ADMIN_PARAMETER == 'new') {
            if (TABLE_PARAMETER == 'comments') {
                $author = MY_USER;
                $email = MY_EMAIL;
                $code_readonly = ' readonly="readonly"';
            }
            if (TABLE_PARAMETER == 'categories') {
                $sibling = 0;
                $parent = 0;
            }
            if (TABLE_PARAMETER == 'articles' || TABLE_PARAMETER == 'extras') {
                $category = 0;
                $headline = 1;
            }
            if (TABLE_PARAMETER == 'articles') {
                $sibling = 0;
                $infoline = 0;
                $comments = 0;
            }
            if (TABLE_PARAMETER == 'extras') {
                $sibling = 0;
            }
            $status = 1;
            $rank = Redaxscript\Db::forTablePrefix(TABLE_PARAMETER)->max('rank') + 1;
            $access = null;
            $wording_headline = l($wording_single . '_new');
            $wording_submit = l('create');
            $route = 'admin/process/' . TABLE_PARAMETER;
        }
    }
    /* collect output */
    $output .= '<h2 class="title_content">' . $wording_headline . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_tab form_admin hidden_legend', '', '', '', 'action="' . REWRITE_ROUTE . $route . '" method="post"');
    /* collect tab list output */
    $output .= '<ul class="js_list_tab list_tab list_tab_admin">';
    $output .= '<li class="js_item_active item_first item_active">' . anchor_element('internal', '', '', l($wording_single), FULL_ROUTE . '#tab-1') . '</li>';
    $output .= '<li class="item_second">' . anchor_element('internal', '', '', l('customize'), FULL_ROUTE . '#tab-2') . '</li>';
    if (TABLE_PARAMETER != 'categories') {
        $output .= '<li class="item_last">' . anchor_element('internal', '', '', l('date'), FULL_ROUTE . '#tab-3') . '</li>';
    }
    $output .= '</ul>';
    /* collect tab box output */
    $output .= '<div class="js_box_tab box_tab box_tab_admin">';
    /* collect content set */
    $output .= form_element('fieldset', 'tab-1', 'js_set_tab js_set_active set_tab set_tab_admin set_active', '', '', l($wording_single)) . '<ul>';
    if (TABLE_PARAMETER == 'comments') {
        $output .= '<li>' . form_element('text', 'author', 'field_text_admin field_note', 'author', $author, '* ' . l('author'), 'maxlength="50" required="required" autofocus="autofocus"' . $code_readonly) . '</li>';
        $output .= '<li>' . form_element('email', 'email', 'field_text_admin field_note', 'email', $email, '* ' . l('email'), 'maxlength="50" required="required"' . $code_readonly) . '</li>';
        $output .= '<li>' . form_element('url', 'url', 'field_text_admin', 'url', $url, l('url'), 'maxlength="50"') . '</li>';
    } else {
        $output .= '<li>' . form_element('text', 'title', 'js_generate_alias_input field_text_admin field_note', 'title', $title, l('title'), 'maxlength="50" required="required" autofocus="autofocus"') . '</li>';
        $output .= '<li>' . form_element('text', 'alias', 'js_generate_alias_output field_text_admin field_note', 'alias', $alias, l('alias'), 'maxlength="50" required="required"') . '</li>';
    }
    if (TABLE_PARAMETER == 'categories' || TABLE_PARAMETER == 'articles') {
        $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small', 'description', $description, l('description'), 'rows="1" cols="15"') . '</li>';
        $output .= '<li>' . form_element('textarea', 'keywords', 'js_auto_resize js_generate_keyword_output field_textarea_admin field_small', 'keywords', $keywords, l('keywords'), 'rows="1" cols="15"') . '</li>';
    }
    if (TABLE_PARAMETER != 'categories') {
        $output .= '<li>' . form_element('textarea', 'text', 'js_auto_resize js_generate_keyword_input js_editor_textarea field_textarea_admin field_note', 'text', $text, l('text'), 'rows="5" cols="100" required="required"') . '</li>';
    }
    $output .= '</ul></fieldset>';
    /* collect customize set */
    $output .= form_element('fieldset', 'tab-2', 'js_set_tab set_tab set_tab_admin', '', '', l('customize')) . '<ul>';
    /* languages directory object */
    $languages_directory = new Redaxscript\Directory();
    $languages_directory->init('languages');
    $languages_directory_array = $languages_directory->getArray();
    /* build languages select */
    $language_array[l('select')] = '';
    foreach ($languages_directory_array as $value) {
        $value = substr($value, 0, 2);
        $language_array[l($value, '_index')] = $value;
    }
    $output .= '<li>' . select_element('language', 'field_select_admin', 'language', $language_array, $language, l('language')) . '</li>';
    if (TABLE_PARAMETER == 'categories' || TABLE_PARAMETER == 'articles') {
        /* templates directory object */
        $templates_directory = new Redaxscript\Directory();
        $templates_directory->init('templates', array('admin', 'install'));
        $templates_directory_array = $templates_directory->getArray();
        /* build templates select */
        $template_array[l('select')] = '';
        foreach ($templates_directory_array as $value) {
            $template_array[$value] = $value;
        }
        $output .= '<li>' . select_element('template', 'field_select_admin', 'template', $template_array, $template, l('template')) . '</li>';
    }
    /* build sibling select */
    if (TABLE_PARAMETER == 'categories' || TABLE_PARAMETER == 'articles' || TABLE_PARAMETER == 'extras') {
        $sibling_array[l('none')] = 0;
        $sibling_result = Redaxscript\Db::forTablePrefix(TABLE_PARAMETER)->orderByAsc('rank')->findArray();
        if ($sibling_result) {
            foreach ($sibling_result as $s) {
                if (ID_PARAMETER != $s['id']) {
                    $sibling_array[$s['title'] . ' (' . $s['id'] . ')'] = $s['id'];
                }
            }
        }
        $output .= '<li>' . select_element('sibling', 'field_select_admin', 'sibling', $sibling_array, $sibling, l($wording_sibling)) . '</li>';
    }
    /* build category and parent select */
    if (TABLE_PARAMETER != 'comments') {
        if (TABLE_PARAMETER == 'extras') {
            $category_array[l('all')] = 0;
        } else {
            $category_array[l('none')] = 0;
        }
        $categories_result = Redaxscript\Db::forTablePrefix('categories')->orderByAsc('rank')->findArray();
        if ($categories_result) {
            foreach ($categories_result as $c) {
                if (TABLE_PARAMETER != 'categories') {
                    $category_array[$c['title'] . ' (' . $c['id'] . ')'] = $c['id'];
                } else {
                    if (ID_PARAMETER != $c['id'] && $c['parent'] == 0) {
                        $category_array[$c['title'] . ' (' . $c['id'] . ')'] = $c['id'];
                    }
                }
            }
        }
        if (TABLE_PARAMETER == 'categories') {
            $output .= '<li>' . select_element('parent', 'field_select_admin', 'parent', $category_array, $parent, l('category_parent')) . '</li>';
        } else {
            $output .= '<li>' . select_element('category', 'field_select_admin', 'category', $category_array, $category, l('category')) . '</li>';
        }
    }
    /* build article select */
    if (TABLE_PARAMETER == 'extras' || TABLE_PARAMETER == 'comments') {
        if (TABLE_PARAMETER == 'extras') {
            $article_array[l('all')] = 0;
        }
        $articles = Redaxscript\Db::forTablePrefix('articles');
        if (TABLE_PARAMETER == 'comments') {
            $articles->where('comments', 0);
        }
        $articles_result = $articles->orderByAsc('rank')->findArray();
        if ($articles_result) {
            foreach ($articles_result as $a) {
                $article_array[$a['title'] . ' (' . $a['id'] . ')'] = $a['id'];
            }
        }
        $output .= '<li>' . select_element('article', 'field_select_admin', 'article', $article_array, $article, l('article')) . '</li>';
    }
    if (TABLE_PARAMETER == 'articles' || TABLE_PARAMETER == 'extras') {
        $output .= '<li>' . select_element('headline', 'field_select_admin', 'headline', array(l('enable') => 1, l('disable') => 0), $headline, l('headline')) . '</li>';
    }
    if (TABLE_PARAMETER == 'articles') {
        $output .= '<li>' . select_element('infoline', 'field_select_admin', 'infoline', array(l('enable') => 1, l('disable') => 0), $infoline, l('infoline')) . '</li>';
        $output .= '<li>' . select_element('comments', 'field_select_admin', 'comments', array(l('enable') => 1, l('freeze') => 2, l('restrict') => 3, l('disable') => 0), $comments, l('comments')) . '</li>';
    }
    if ($status != 2) {
        $output .= '<li>' . select_element('status', 'field_select_admin', 'status', array(l('publish') => 1, l('unpublish') => 0), $status, l('status')) . '</li>';
    }
    /* build access select */
    if (GROUPS_EDIT == 1) {
        $access_array[l('all')] = null;
        $access_result = Redaxscript\Db::forTablePrefix('groups')->orderByAsc('name')->findArray();
        if ($access_result) {
            foreach ($access_result as $g) {
                $access_array[$g['name']] = $g['id'];
            }
        }
        $output .= '<li>' . select_element('access', 'field_select_admin', 'access', $access_array, $access, l('access'), 'multiple="multiple"') . '</li>';
    }
    $output .= '</ul></fieldset>';
    /* collect date set */
    if (TABLE_PARAMETER != 'categories') {
        $output .= form_element('fieldset', 'tab-3', 'js_set_tab set_tab set_tab_admin', '', '', l('date')) . '<ul>';
        $output .= '<li>' . select_date('day', 'field_select_admin', 'day', $date, 'd', 1, 32, l('day')) . '</li>';
        $output .= '<li>' . select_date('month', 'field_select_admin', 'month', $date, 'm', 1, 13, l('month')) . '</li>';
        $output .= '<li>' . select_date('year', 'field_select_admin', 'year', $date, 'Y', 2000, 2021, l('year')) . '</li>';
        $output .= '<li>' . select_date('hour', 'field_select_admin', 'hour', $date, 'H', 0, 24, l('hour')) . '</li>';
        $output .= '<li>' . select_date('minute', 'field_select_admin', 'minute', $date, 'i', 0, 60, l('minute')) . '</li>';
        $output .= '</ul></fieldset>';
    }
    $output .= '</div>';
    /* collect hidden output */
    if (TABLE_PARAMETER != 'comments') {
        $output .= form_element('hidden', '', '', 'author', MY_USER);
    }
    if ($status == 2) {
        $output .= form_element('hidden', '', '', 'publish', 2);
    }
    $output .= form_element('hidden', '', '', 'rank', $rank);
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    /* cancel button */
    if (TABLE_EDIT == 1 || TABLE_DELETE == 1) {
        $cancel_route = 'admin/view/' . TABLE_PARAMETER;
    } else {
        $cancel_route = 'admin';
    }
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large button_cancel_admin', l('cancel'), $cancel_route);
    /* delete button */
    if (TABLE_DELETE == 1 && $id) {
        $output .= anchor_element('internal', '', 'js_delete js_confirm button_admin button_large button_delete_admin', l('delete'), 'admin/delete/' . TABLE_PARAMETER . '/' . $id . '/' . TOKEN);
    }
    /* submit button */
    if (TABLE_NEW == 1 || TABLE_EDIT == 1) {
        $output .= form_element('button', '', 'js_submit button_admin button_large button_submit_admin', ADMIN_PARAMETER, $wording_submit);
    }
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
Exemple #3
0
/**
 * admin groups form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_groups_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    /* define fields for existing group */
    if (ADMIN_PARAMETER == 'edit' && ID_PARAMETER) {
        /* query user */
        $query = 'SELECT * FROM ' . PREFIX . 'groups WHERE id = ' . ID_PARAMETER;
        $result = mysql_query($query);
        $r = mysql_fetch_assoc($result);
        if ($r) {
            foreach ($r as $key => $value) {
                ${$key} = stripslashes($value);
            }
        }
        $wording_headline = $name;
        $wording_submit = l('save');
        $route = 'admin/process/groups/' . $id;
    } else {
        if (ADMIN_PARAMETER == 'new') {
            $categories = 0;
            $articles = 0;
            $extras = 0;
            $comments = 0;
            $groups = 0;
            $users = 0;
            $modules = 0;
            $settings = 0;
            $filter = 1;
            $status = 1;
            $wording_headline = l('group_new');
            $wording_submit = l('create');
            $route = 'admin/process/groups';
        }
    }
    $access_array = array(l('create') => 1, l('edit') => 2, l('delete') => 3);
    $modules_access_array = array(l('install') => 1, l('edit') => 2, l('uninstall') => 3);
    /* collect output */
    $output .= '<h2 class="title_content">' . $wording_headline . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_tab form_admin hidden_legend', '', '', '', 'action="' . REWRITE_ROUTE . $route . '" method="post"');
    /* collect tab list output */
    $output .= '<ul class="js_list_tab list_tab list_tab_admin">';
    $output .= '<li class="js_item_active item_first item_active">' . anchor_element('internal', '', '', l('group'), FULL_ROUTE . '#tab-1') . '</li>';
    if ($id == '' || $id > 1) {
        $output .= '<li class="item_second">' . anchor_element('internal', '', '', l('access'), FULL_ROUTE . '#tab-2') . '</li>';
        $output .= '<li class="item_last">' . anchor_element('internal', '', '', l('customize'), FULL_ROUTE . '#tab-3') . '</li>';
    }
    $output .= '</ul>';
    /* collect tab box output */
    $output .= '<div class="js_box_tab box_tab box_tab_admin">';
    /* collect group set */
    $output .= form_element('fieldset', 'tab-1', 'js_set_tab js_set_active set_tab set_tab_admin set_active', '', '', l('group')) . '<ul>';
    $output .= '<li>' . form_element('text', 'name', 'js_generate_alias_input field_text_admin field_note', 'name', $name, l('name'), 'maxlength="50" required="required" autofocus="autofocus"') . '</li>';
    $output .= '<li>' . form_element('text', 'alias', 'js_generate_alias_output field_text_admin field_note', 'alias', $alias, l('alias'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small_admin', 'description', $description, l('description'), 'rows="1" cols="15"') . '</li>';
    $output .= '</ul></fieldset>';
    if ($id == '' || $id > 1) {
        /* collect access set */
        $output .= form_element('fieldset', 'tab-2', 'js_set_tab set_tab set_tab_admin', '', '', l('acccess')) . '<ul>';
        $output .= '<li>' . select_element('categories', 'field_select_admin', 'categories', $access_array, $categories, l('categories'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('articles', 'field_select_admin', 'articles', $access_array, $articles, l('articles'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('extras', 'field_select_admin', 'extras', $access_array, $extras, l('extras'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('comments', 'field_select_admin', 'comments', $access_array, $comments, l('comments'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('groups', 'field_select_admin', 'groups', $access_array, $groups, l('groups'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('users', 'field_select_admin', 'users', $access_array, $users, l('users'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('modules', 'field_select_admin', 'modules', $modules_access_array, $modules, l('modules'), 'multiple="multiple"') . '</li>';
        $output .= '<li>' . select_element('settings', 'field_select_admin', 'settings', array(l('none') => 0, l('edit') => 1), $settings, l('settings')) . '</li>';
        $output .= '</ul></fieldset>';
        /* collect customize set */
        $output .= form_element('fieldset', 'tab-3', 'js_set_tab set_tab set_tab_admin', '', '', l('customize')) . '<ul>';
        $output .= '<li>' . select_element('filter', 'field_select_admin', 'filter', array(l('enable') => 1, l('disable') => 0), $filter, l('filter')) . '</li>';
        $output .= '<li>' . select_element('status', 'field_select_admin', 'status', array(l('enable') => 1, l('disable') => 0), $status, l('status')) . '</li>';
        $output .= '</ul></fieldset>';
    }
    $output .= '</div>';
    /* collect hidden output */
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    /* cancel button */
    if (GROUPS_EDIT == 1 || GROUPS_DELETE == 1) {
        $cancel_route = 'admin/view/groups';
    } else {
        $cancel_route = 'admin';
    }
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large_admin button_cancel_admin', l('cancel'), $cancel_route);
    /* delete button */
    if (GROUPS_DELETE == 1 && $id > 1) {
        $output .= anchor_element('internal', '', 'js_delete js_confirm button_admin button_large_admin button_delete_admin', l('delete'), 'admin/delete/groups/' . $id . '/' . TOKEN);
    }
    /* submit button */
    if (GROUPS_NEW == 1 || GROUPS_EDIT == 1) {
        $output .= form_element('button', '', 'js_submit button_admin button_large_admin button_submit_admin', ADMIN_PARAMETER, $wording_submit);
    }
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
/**
 * select date
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Generate
 * @author Henry Ruhs
 *
 * @param string $id
 * @param string $class
 * @param string $name
 * @param string $date
 * @param string $format
 * @param integer $start
 * @param integer $end
 * @param string $label
 * @param string $code
 * @return string
 */
function select_date($id = '', $class = '', $name = '', $date = '', $format = '', $start = '', $end = '', $label = '', $code = '')
{
    /* build select */
    $select = $date ? date($format, strtotime($date)) : date($format);
    /* build options */
    for ($i = $start; $i < $end; $i++) {
        $options[] = sprintf('%02d', $i);
    }
    /* collect output */
    $output = select_element($id, $class, $name, $options, $select, $label, $code);
    return $output;
}
/**
 * admin settings form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_settings_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    $output .= '<h2 class="title_content">' . l('settings') . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_accordion form_admin', '', '', '', 'action="' . REWRITE_ROUTE . 'admin/update/settings" method="post"');
    /* collect general set */
    $output .= '<fieldset class="js_set_accordion js_set_active set_accordion set_accordion_admin set_active">';
    $output .= '<legend class="js_title_accordion js_title_active title_accordion title_accordion_admin title_active">' . l('general') . '</legend>';
    $output .= '<ul class="js_box_accordion js_box_active box_accordion box_accordion_admin box_active">';
    /* languages directory object */
    $languages_directory = new Redaxscript\Directory();
    $languages_directory->init('languages');
    $languages_directory_array = $languages_directory->getArray();
    /* build languages select */
    if (count($languages_directory_array) > 1) {
        $language_array[l('detect')] = 'detect';
    }
    foreach ($languages_directory_array as $value) {
        $value = substr($value, 0, 2);
        $language_array[l($value, '_index')] = $value;
    }
    $output .= '<li>' . select_element('language', 'field_select_admin', 'language', $language_array, s('language'), l('language')) . '</li>';
    /* templates directory object */
    $templates_directory = new Redaxscript\Directory();
    $templates_directory->init('templates', array('admin', 'install'));
    $templates_directory_array = $templates_directory->getArray();
    /* build templates select */
    $output .= '<li>' . select_element('template', 'field_select_admin', 'template', $templates_directory_array, s('template'), l('template')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect metadata set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('metadata') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . form_element('text', 'title', 'field_text_admin', 'title', s('title'), l('title'), 'maxlength="50"') . '</li>';
    $output .= '<li>' . form_element('text', 'author', 'field_text_admin', 'author', s('author'), l('author'), 'maxlength="50"') . '</li>';
    $output .= '<li>' . form_element('text', 'copyright', 'field_text_admin', 'copyright', s('copyright'), l('copyright'), 'maxlength="50"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small', 'description', s('description'), l('description'), 'rows="1" cols="15"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'keywords', 'js_auto_resize field_textarea_admin field_small', 'keywords', s('keywords'), l('keywords'), 'rows="1" cols="15"') . '</li>';
    $output .= '<li>' . select_element('robots', 'field_select_admin', 'robots', array(l('index') => 'all', l('index_no') => 'none'), s('robots'), l('robots')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect contact set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('contact') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . form_element('email', 'email', 'field_text_admin field_note', 'email', s('email'), l('email'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('text', 'subject', 'field_text_admin', 'subject', s('subject'), l('subject'), 'maxlength="50"') . '</li>';
    $output .= '<li>' . select_element('notification', 'field_select_admin', 'notification', array(l('enable') => 1, l('disable') => 0), s('notification'), l('notification')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect formatting set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('formatting') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . form_element('text', 'charset', 'field_text_admin field_note', 'charset', s('charset'), l('charset'), 'maxlength="10" required="required"') . '</li>';
    $output .= '<li>' . form_element('text', 'divider', 'field_text_admin', 'divider', s('divider'), l('divider'), 'maxlength="10"') . '</li>';
    $output .= '<li>' . select_element('time', 'field_select_admin', 'time', array('H:i', 'h:i'), s('time'), l('time')) . '</li>';
    $output .= '<li>' . select_element('date', 'field_select_admin', 'date', array('d.m.Y', 'm.d.Y', 'Y.m.d'), s('date'), l('date')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect contents set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('contents') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $homepage_array[l('none')] = 0;
    $homepage_result = Redaxscript\Db::forTablePrefix('articles')->orderByAsc('title')->findArray();
    if ($homepage_result) {
        foreach ($homepage_result as $r) {
            $homepage_array[$r['title'] . ' (' . $r['id'] . ')'] = $r['id'];
        }
    }
    $output .= '<li>' . select_element('homepage', 'field_select_admin', 'homepage', $homepage_array, s('homepage'), l('homepage')) . '</li>';
    $output .= '<li>' . form_element('text', 'limit', 'field_text_admin field_note', 'limit', s('limit'), l('limit'), 'min="1" max="1000" required="required"') . '</li>';
    $output .= '<li>' . select_element('order', 'field_select_admin', 'order', array(l('ascending') => 'asc', l('descending') => 'desc'), s('order'), l('order')) . '</li>';
    $output .= '<li>' . select_element('pagination', 'field_select_admin', 'pagination', array(l('enable') => 1, l('disable') => 0), s('pagination'), l('pagination')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect comments set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('comments') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . select_element('moderation', 'field_select_admin', 'moderation', array(l('enable') => 1, l('disable') => 0), s('moderation'), l('moderation')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect users set */
    $output .= '<fieldset class="js_set_accordion set_accordion set_accordion_admin">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('users') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . select_element('registration', 'field_select_admin', 'registration', array(l('enable') => 1, l('disable') => 0), s('registration'), l('registration')) . '</li>';
    $output .= '<li>' . select_element('verification', 'field_select_admin', 'verification', array(l('enable') => 1, l('disable') => 0), s('verification'), l('verification')) . '</li>';
    $output .= '<li>' . select_element('reminder', 'field_select_admin', 'reminder', array(l('enable') => 1, l('disable') => 0), s('reminder'), l('reminder')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect security set */
    $output .= '<fieldset class="js_set_accordion js_set_accordion_last set_accordion set_accordion_admin set_accordion_last">';
    $output .= '<legend class="js_title_accordion title_accordion title_accordion_admin">' . l('security') . '</legend>';
    $output .= '<ul class="js_box_accordion box_accordion box_accordion_admin">';
    $output .= '<li>' . select_element('captcha', 'field_select_admin', 'captcha', array(l('random') => 1, l('addition') => 2, l('subtraction') => 3, l('disable') => 0), s('captcha'), l('captcha')) . '</li>';
    $output .= '<li>' . select_element('blocker', 'field_select_admin', 'blocker', array(l('enable') => 1, l('disable') => 0), s('blocker'), l('blocker')) . '</li>';
    $output .= '</ul></fieldset>';
    /* collect hidden and button output */
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large button_cancel_admin', l('cancel'), 'admin');
    $output .= form_element('button', '', 'js_submit button_admin button_large button_submit_admin', 'update', l('save'));
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
/**
 * admin users form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_users_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    /* define fields for existing user */
    if (ADMIN_PARAMETER == 'edit' && ID_PARAMETER) {
        /* query user */
        $result = Redaxscript\Db::forTablePrefix('users')->where('id', ID_PARAMETER)->findArray();
        $r = $result[0];
        if ($r) {
            foreach ($r as $key => $value) {
                ${$key} = stripslashes($value);
            }
        }
        $wording_headline = $name;
        $wording_submit = l('save');
        $route = 'admin/process/users/' . $id;
    } else {
        if (ADMIN_PARAMETER == 'new') {
            $status = 1;
            $groups = 0;
            $wording_headline = l('user_new');
            $wording_submit = l('create');
            $route = 'admin/process/users';
            $code_required = ' required="required"';
        }
    }
    /* collect output */
    $output .= '<h2 class="title_content">' . $wording_headline . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_tab form_admin hidden_legend', '', '', '', 'action="' . REWRITE_ROUTE . $route . '" method="post"');
    /* collect tab list output */
    $output .= '<ul class="js_list_tab list_tab list_tab_admin">';
    $output .= '<li class="js_item_active item_first item_active">' . anchor_element('internal', '', '', l('user'), FULL_ROUTE . '#tab-1') . '</li>';
    $output .= '<li class="item_second">' . anchor_element('internal', '', '', l('customize'), FULL_ROUTE . '#tab-2') . '</li></ul>';
    /* collect tab box output */
    $output .= '<div class="js_box_tab box_tab box_tab_admin">';
    /* collect user set */
    $output .= form_element('fieldset', 'tab-1', 'js_set_tab js_set_active set_tab set_tab_admin set_active', '', '', l('user')) . '<ul>';
    $output .= '<li>' . form_element('text', 'name', 'field_text_admin field_note', 'name', $name, l('name'), 'maxlength="50" required="required" autofocus="autofocus"') . '</li>';
    if ($id == '') {
        $output .= '<li>' . form_element('text', 'user', 'field_text_admin field_note', 'user', $user, l('user'), 'maxlength="50" required="required"') . '</li>';
    }
    $output .= '<li>' . form_element('password', 'password', 'js_unmask_password field_text_admin field_note', 'password', '', l('password'), 'maxlength="50" autocomplete="off"' . $code_required) . '</li>';
    $output .= '<li>' . form_element('password', 'password_confirm', 'js_unmask_password field_text_admin field_note', 'password_confirm', '', l('password_confirm'), 'maxlength="50" autocomplete="off"' . $code_required) . '</li>';
    $output .= '<li>' . form_element('email', 'email', 'field_text_admin field_note', 'email', $email, l('email'), 'maxlength="50" required="required"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small', 'description', $description, l('description'), 'rows="1" cols="15"') . '</li>';
    $output .= '</ul></fieldset>';
    /* collect customize set */
    $output .= form_element('fieldset', 'tab-2', 'js_set_tab set_tab set_tab_admin', '', '', l('customize')) . '<ul>';
    /* languages directory object */
    $languages_directory = new Redaxscript\Directory();
    $languages_directory->init('languages');
    $languages_directory_array = $languages_directory->getArray();
    /* build languages select */
    $language_array[l('select')] = '';
    foreach ($languages_directory_array as $value) {
        $value = substr($value, 0, 2);
        $language_array[l($value, '_index')] = $value;
    }
    $output .= '<li>' . select_element('language', 'field_select_admin', 'language', $language_array, $language, l('language')) . '</li>';
    if ($id == '' || $id > 1) {
        $output .= '<li>' . select_element('status', 'field_select_admin', 'status', array(l('enable') => 1, l('disable') => 0), $status, l('status')) . '</li>';
        /* build groups select */
        if (GROUPS_EDIT == 1 && USERS_EDIT == 1) {
            $groups_result = Redaxscript\Db::forTablePrefix('groups')->orderByAsc('name')->findArray();
            if ($groups_result) {
                foreach ($groups_result as $g) {
                    $groups_array[$g['name']] = $g['id'];
                }
            }
            $output .= '<li>' . select_element('groups', 'field_select_admin', 'groups', $groups_array, $groups, l('groups'), 'multiple="multiple"') . '</li>';
        }
    }
    $output .= '</ul></fieldset></div>';
    /* collect hidden output */
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    /* collect button output */
    if (USERS_EDIT == 1 || USERS_DELETE == 1) {
        $cancel_route = 'admin/view/users';
    } else {
        $cancel_route = 'admin';
    }
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large button_cancel_admin', l('cancel'), $cancel_route);
    /* delete button */
    if ((USERS_DELETE == 1 || USERS_EXCEPTION == 1) && $id > 1) {
        $output .= anchor_element('internal', '', 'js_delete js_confirm button_admin button_large button_delete_admin', l('delete'), 'admin/delete/users/' . $id . '/' . TOKEN);
    }
    /* submit button */
    if (USERS_NEW == 1 || USERS_EDIT == 1 || USERS_EXCEPTION == 1) {
        $output .= form_element('button', '', 'js_submit button_admin button_large button_submit_admin', ADMIN_PARAMETER, $wording_submit);
    }
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
/**
 * admin modules form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_modules_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    /* define fields for existing user */
    if (ADMIN_PARAMETER == 'edit' && ID_PARAMETER) {
        /* query modules */
        $result = Redaxscript\Db::forTablePrefix('modules')->where('id', ID_PARAMETER)->findArray();
        $r = $result[0];
        if ($r) {
            foreach ($r as $key => $value) {
                ${$key} = stripslashes($value);
            }
        }
        $wording_headline = $name;
        $wording_submit = l('save');
        $route = 'admin/process/modules/' . $id;
    }
    /* directory object */
    $docs_directory = new Redaxscript\Directory();
    $docs_directory->init('modules/' . $alias . '/docs');
    $docs_directory_array = $docs_directory->getArray();
    /* collect output */
    $output .= '<h2 class="title_content">' . $wording_headline . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_tab form_admin hidden_legend', '', '', '', 'action="' . REWRITE_ROUTE . $route . '" method="post"');
    /* collect tab list output */
    $output .= '<ul class="js_list_tab list_tab list_tab_admin">';
    $output .= '<li class="js_item_active item_first item_active">' . anchor_element('internal', '', '', l('module'), FULL_ROUTE . '#tab-1') . '</li>';
    $output .= '<li class="item_second">' . anchor_element('internal', '', '', l('customize'), FULL_ROUTE . '#tab-2') . '</li>';
    foreach ($docs_directory_array as $key => $value) {
        $output .= '<li class="item_third">' . anchor_element('internal', '', '', str_replace('.phtml', '', $value), FULL_ROUTE . '#tab-' . ($key + 3)) . '</li>';
    }
    $output .= '</ul>';
    /* collect tab box output */
    $output .= '<div class="js_box_tab box_tab box_tab_admin">';
    /* collect module set */
    $output .= form_element('fieldset', 'tab-1', 'js_set_tab js_set_active set_tab set_tab_admin set_active', '', '', l('user')) . '<ul>';
    $output .= '<li>' . form_element('text', 'name', 'field_text_admin field_note', 'name', $name, l('name'), 'maxlength="50" required="required" autofocus="autofocus"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small', 'description', $description, l('description'), 'rows="1" cols="15"') . '</li>';
    $output .= '</ul></fieldset>';
    /* collect customize set */
    $output .= form_element('fieldset', 'tab-2', 'js_set_tab set_tab set_tab_admin', '', '', l('customize')) . '<ul>';
    $output .= '<li>' . select_element('status', 'field_select_admin', 'status', array(l('enable') => 1, l('disable') => 0), $status, l('status')) . '</li>';
    /* build access select */
    if (GROUPS_EDIT == 1) {
        $access_array[l('all')] = null;
        $access_result = Redaxscript\Db::forTablePrefix('groups')->orderByAsc('name')->findArray();
        if ($access_result) {
            foreach ($access_result as $g) {
                $access_array[$g['name']] = $g['id'];
            }
        }
        $output .= '<li>' . select_element('access', 'field_select_admin', 'access', $access_array, $access, l('access'), 'multiple="multiple"') . '</li></ul></fieldset>';
    }
    /* template object */
    $template = new Redaxscript\Template();
    /* collect docs set */
    foreach ($docs_directory_array as $key => $value) {
        $output .= form_element('fieldset', 'tab-' . ($key + 3), 'js_set_tab set_tab set_tab_admin', '', '', 'docs') . '<ul>';
        $output .= '<li>' . $template->partial('modules/' . $alias . '/docs/' . $value) . '</li></ul></fieldset>';
    }
    $output .= '</div>';
    /* collect hidden output */
    $output .= form_element('hidden', '', '', 'alias', $alias);
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    /* cancel button */
    if (MODULES_EDIT == 1 || MODULES_UNINSTALL == 1) {
        $cancel_route = 'admin/view/modules';
    } else {
        $cancel_route = 'admin';
    }
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large button_cancel_admin', l('cancel'), $cancel_route);
    /* uninstall button */
    if (MODULES_UNINSTALL == 1) {
        $output .= anchor_element('internal', '', 'js_delete js_confirm button_admin button_large button_uninstall_admin', l('uninstall'), 'admin/uninstall/modules/' . $alias . '/' . TOKEN);
    }
    /* submit button */
    if (MODULES_EDIT == 1) {
        $output .= form_element('button', '', 'js_submit button_admin button_large button_submit_admin', ADMIN_PARAMETER, $wording_submit);
    }
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
echo textarea(array('name' => 'description', 'value' => $controlledvocab_term->description, 'cols' => '30', 'rows' => '10'), '', 'Description');
?>
</div>
<div class="input">


<?php 
echo text(array('name' => 'uri', 'value' => $controlledvocab_term->uri), '', 'Uri');
?>
</div>
<div class="input">
<?php 
echo select(array('name' => 'vocab_id'), $vocabs, '', 'Vocabulary');
?>

<p class="explanation">The Controlled Vocabulary this term belongs to.</p>
</div>
<div class="input">
<?php 
echo select_element(array('name' => 'element_ids', 'multiple' => 'true'), '', 'Elements');
?>

</div>
<?php 
echo submit(array('class' => 'submit'));
?>
</form>

</fieldset>
<?php 
foot();
Exemple #9
0
/**
 * admin modules form
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Admin
 * @author Henry Ruhs
 */
function admin_modules_form()
{
    $output = Redaxscript\Hook::trigger(__FUNCTION__ . '_start');
    /* define fields for existing user */
    if (ADMIN_PARAMETER == 'edit' && ID_PARAMETER) {
        /* query modules */
        $query = 'SELECT * FROM ' . PREFIX . 'modules WHERE id = ' . ID_PARAMETER;
        $result = mysql_query($query);
        $r = mysql_fetch_assoc($result);
        if ($r) {
            foreach ($r as $key => $value) {
                ${$key} = stripslashes($value);
            }
        }
        $wording_headline = $name;
        $wording_submit = l('save');
        $route = 'admin/process/modules/' . $id;
    }
    $file_install = is_dir('modules/' . $alias);
    /* collect output */
    $output .= '<h2 class="title_content">' . $wording_headline . '</h2>';
    $output .= form_element('form', 'form_admin', 'js_validate_form js_tab form_admin hidden_legend', '', '', '', 'action="' . REWRITE_ROUTE . $route . '" method="post"');
    /* collect tab list output */
    $output .= '<ul class="js_list_tab list_tab list_tab_admin">';
    $output .= '<li class="js_item_active item_first item_active">' . anchor_element('internal', '', '', l('module'), FULL_ROUTE . '#tab-1') . '</li>';
    $output .= '<li class="item_second">' . anchor_element('internal', '', '', l('customize'), FULL_ROUTE . '#tab-2') . '</li></ul>';
    /* collect tab box output */
    $output .= '<div class="js_box_tab box_tab box_tab_admin">';
    /* collect module set */
    $output .= form_element('fieldset', 'tab-1', 'js_set_tab js_set_active set_tab set_tab_admin set_active', '', '', l('user')) . '<ul>';
    $output .= '<li>' . form_element('text', 'name', 'field_text_admin field_note', 'name', $name, l('name'), 'maxlength="50" required="required" autofocus="autofocus"') . '</li>';
    $output .= '<li>' . form_element('textarea', 'description', 'js_auto_resize field_textarea_admin field_small_admin', 'description', $description, l('description'), 'rows="1" cols="15"') . '</li>';
    $output .= '</ul></fieldset>';
    /* collect customize set */
    $output .= form_element('fieldset', 'tab-2', 'js_set_tab set_tab set_tab_admin', '', '', l('customize')) . '<ul>';
    $output .= '<li>' . select_element('status', 'field_select_admin', 'status', array(l('enable') => 1, l('disable') => 0), $status, l('status')) . '</li>';
    /* build access select */
    if (GROUPS_EDIT == 1) {
        $access_array[l('all')] = 0;
        $access_query = 'SELECT * FROM ' . PREFIX . 'groups ORDER BY name ASC';
        $access_result = mysql_query($access_query);
        if ($access_result) {
            while ($g = mysql_fetch_assoc($access_result)) {
                $access_array[$g['name']] = $g['id'];
            }
        }
        $output .= '<li>' . select_element('access', 'field_select_admin', 'access', $access_array, $access, l('access'), 'multiple="multiple"') . '</li>';
    }
    $output .= '</ul></fieldset></div>';
    /* collect hidden output */
    $output .= form_element('hidden', '', '', 'alias', $alias);
    $output .= form_element('hidden', '', '', 'token', TOKEN);
    /* cancel button */
    if (MODULES_EDIT == 1 || MODULES_UNINSTALL == 1) {
        $cancel_route = 'admin/view/modules';
    } else {
        $cancel_route = 'admin';
    }
    $output .= anchor_element('internal', '', 'js_cancel button_admin button_large_admin button_cancel_admin', l('cancel'), $cancel_route);
    /* uninstall button */
    if (MODULES_UNINSTALL == 1 && $file_install) {
        $output .= anchor_element('internal', '', 'js_delete js_confirm button_admin button_large_admin button_uninstall_admin', l('uninstall'), 'admin/uninstall/modules/' . $alias . '/' . TOKEN);
    }
    /* submit button */
    if (MODULES_EDIT == 1) {
        $output .= form_element('button', '', 'js_submit button_admin button_large_admin button_submit_admin', ADMIN_PARAMETER, $wording_submit);
    }
    $output .= '</form>';
    $output .= Redaxscript\Hook::trigger(__FUNCTION__ . '_end');
    echo $output;
}
Exemple #10
0
    echo select_item_type(array('class' => 'feed-importer-item-type', 'name' => "tc[{$tag->id}][item_type_id]"));
    echo select(array('name' => "tc[{$tag->id}][item_type_id_priority]"), $priorityArray, $tag->item_type_id_priority, "Priority");
    ?>
	
	</td>
	<td>
		<?php 
    echo select(array('class' => 'feed-importer-tag', 'multiple' => 'true', 'size' => '5', 'name' => "tc[{$tag->id}][tags_map]"), $tagPairs, unserialize($tag->tags_map));
    ?>
	</td>
	<td>
	<?php 
    echo "<label>Element Set</label>" . select(array('onchange' => 'FI.showElSet(event)', 'class' => 'fi_elset_select'), $elSetPairs);
    foreach ($elSetPairs as $id => $elSet) {
        $elementsMap = unserialize($tag->elements_map);
        echo "<div class='feed-importer-element-set feed-importer-element-set-{$id}'>" . select_element(array('name' => "tc[{$tag->id}][elements_map][{$elSet}]", 'multiple' => 'true', 'size' => '5'), $elementsMap[$elSet], $elSet, array('element_set_name' => $elSet)) . "</div>";
    }
    ?>
	
	
	</td>

</tr>

<?php 
}
?>

</tbody>

</table>
<?php 
echo text(array('name' => 'uri', 'value' => $controlledvocab_term->uri), $controlledvocab_term->uri, 'Uri');
?>
<p class='controlled-vocab-explanation'>A URI that identifies the term.</p>
</div>

<div class="input">
<?php 
echo select(array('name' => 'vocab_id'), $vocabs, $controlledvocab_term->vocab_id, 'Vocabulary');
?>

<p class='controlled-vocab-explanation'>The controlled vocabulary the term belongs to.</p>
</div>
<div class="input">
<?php 
echo select_element(array('name' => 'element_ids', 'multiple' => 'true'), unserialize($controlledvocab_term->element_ids), 'Elements');
?>
<p class='controlled-vocab-explanation'>The element sets and elements to which the term applies.</p>
</div>
<?php 
echo submit(array('class' => 'submit'));
?>
</form>
<p id="delete_item_link">
	<a class="delete" href="<?php 
echo uri('controlled-vocab/terms/delete/') . $controlledvocab_term->id;
?>
">Delete This Item</a>       
</p>
</fieldset>
<?php