Example #1
0
function getSelectBox($language, $table, $name, $title, $checked, $onchange = NULL, $Town_id = NULL)
{
    switch ($table) {
        case 'jea_kind':
            $rows = getKindList($language);
            break;
        case 'jea_legal':
            $rows = getLegalList($language);
            break;
        case 'jea_position':
            $rows = getPositionList($language);
            break;
        case 'jea_direction':
            $rows = getDirectionList($language);
            break;
        case 'jea_area_unit':
            $rows = getAreaUnitList($language);
            break;
        case 'jea_type':
            $rows = getTypeList($language);
            break;
        case 'jea_town':
            $rows = getTownList($language);
            break;
        case 'jea_area':
            $rows = getAreaList($Town_id, $language);
            break;
    }
    $html = '';
    $html .= "<select name='{$name}' id='{$name}'  {$onchange} >";
    if (!empty($title)) {
        $html .= "<option value='0'>{$title}</option>";
    }
    foreach ($rows as $row) {
        $selected = '';
        $selected = $row[0] == $checked ? 'selected = selected' : '';
        $html .= "<option  value={$row['0']} {$selected} >{$row['1']}</option>";
    }
    $html .= "</select>";
    return $html;
}
<?php

$gmap_styles = getGooglemapStyles();
// Switcher choises
$THEMEREX_shortcodes_yes_no = getYesNoList();
$THEMEREX_shortcodes_on_off = getOnOffList();
$THEMEREX_shortcodes_dir = getDirectionList();
$THEMEREX_shortcodes_align = getAlignmentList();
$THEMEREX_shortcodes_text_align = getAlignList();
$THEMEREX_shortcodes_float = getFloatList();
$THEMEREX_shortcodes_show_hide = getShowHideList();
$THEMEREX_shortcodes_box_style = getBoxStyles();
$THEMEREX_shortcodes_sorting = getSortingList();
$THEMEREX_shortcodes_ordering = getOrderingList();
$THEMEREX_shortcodes_sliders = getSlidersList();
$THEMEREX_shortcodes_users = getUsersList();
$THEMEREX_shortcodes_categories = getCategoriesList();
$THEMEREX_shortcodes_columns = getColumnsList();
$THEMEREX_shortcodes_images = themerex_array_merge(array('none' => "none"), getListFiles("/images/icons", "png"));
$THEMEREX_shortcodes_icons = array_merge(array("none"), getIconsList());
$THEMEREX_shortcodes_locations = getDedicatedLocationsList();
global $THEMEREX_shortcodes_yes_no;
// Current elemnt id
$THEMEREX_shortcodes_id = array("id" => "id", "title" => __("Element ID", "themerex"), "desc" => __("ID for current element", "themerex"), "divider" => false, "value" => "", "type" => "text");
// Width and height params
function THEMEREX_shortcodes_width($w = '')
{
    return array("id" => "width", "title" => __("Width", "themerex"), "divider" => false, "value" => $w, "type" => "text");
}
function THEMEREX_shortcodes_height($h = '', $des = 'Width (in pixels or percent) and height (only in pixels) of element')
{
global $THEMEREX_shortname;
$THEMEREX_shortname = 'wps';
// Prepare arrays
$fonts = getThemeFontsList(false);
$themes = getThemesList(false);
$socials = getSocialsList(false);
$puzzles = getPuzzlesList(false);
$categories = getCategoriesList(false);
$sidebars = getSidebarsList(false);
$positions = getSidebarsPositions(false);
$blog_styles = getBlogStylesList(false);
$body_styles = getBodyStylesList(false);
$sliders = getSlidersList(false);
$yes_no = getYesNoList(false);
$dir = getDirectionList(false);
$show_hide = getShowHideList(false);
$sorting = getSortingList(false);
$ordering = getOrderingList(false);
// Theme options arrays
$THEMEREX_theme_options = array();
/*
###############################
#### General               #### 
###############################
*/
$THEMEREX_theme_options[] = array("name" => __('General', 'themerex'), "override" => "category,post,page", "type" => "heading");
$THEMEREX_theme_options[] = array("name" => __('Contact form email', 'themerex'), "desc" => __('E-mail for send contact form and user registration data', 'themerex'), "id" => $THEMEREX_shortname . "_" . "contact_email", "std" => "", "type" => "text");
$THEMEREX_theme_options[] = array("name" => __('Favicon', 'themerex'), "desc" => __('Upload a 16px x 16px image that will represent your website\'s favicon.<br /><br /><em>To ensure cross-browser compatibility, we recommend converting the favicon into .ico format before uploading. (<a href="http://www.favicon.cc/">www.favicon.cc</a>)</em>', 'themerex'), "id" => $THEMEREX_shortname . "_" . "favicon", "std" => "", "type" => "upload");
$THEMEREX_theme_options[] = array("name" => __('Logo image', 'themerex'), "desc" => __('Upload logo image', 'themerex'), "id" => $THEMEREX_shortname . "_" . "logo_image", "std" => "", "type" => "mediamanager");
$THEMEREX_theme_options[] = array("name" => __('Logo text', 'themerex'), "desc" => __('Write logo text (if empty the logo image). Use characters [ and ] to select accented part.', 'themerex'), "id" => $THEMEREX_shortname . "_" . "logo_text", "std" => "puz[z]les", "type" => "text");
// Prepare arrays
if (is_themerex_options_used()) {
    $fonts = getThemeFontsList();
    $themes = getThemesList();
    $socials = getSocialsList();
    $icons = getIconsList();
    $categories = getCategoriesList();
    $sidebars = getSidebarsList();
    $positions = getSidebarsPositions();
    $body_styles = getBodyStylesList();
    $blog_styles = getBlogStylesList();
    $hovers = getHoversList();
    $sliders = getSlidersList();
    $popups = getPopupEngines();
    $gmap_styles = getGooglemapStyles();
    $dir = getDirectionList();
    $yes_no = getYesNoList();
    $on_off = getOnOffList();
    $show_hide = getShowHideList();
    $sorting = getSortingList();
    $ordering = getOrderingList();
} else {
    $hovers = $fonts = $themes = $socials = $icons = $categories = $sidebars = $positions = $body_styles = $blog_styles = $sliders = $popups = $gmap_styles = $dir = $yes_no = $on_off = $show_hide = $sorting = $ordering = array();
}
// Theme options arrays
$THEMEREX_options = array();
//###############################
//#### General               ####
//###############################
$THEMEREX_options[] = array("title" => __('General', 'themerex'), "id" => "partition_general", "start" => "partitions", "override" => "category,post,page", "icon" => "iconadmin-wrench", "divider" => false, "type" => "partition");
$THEMEREX_options[] = array("title" => __('General parameters', 'themerex'), "desc" => __('Select (or upload) logo and favicon, advertisement parameters, etc.', 'themerex'), "override" => "category,post,page", "type" => "info");