コード例 #1
0
				</div>
				<?php 
}
?>
			</div>
			
			<div class="row admin_sidebar_box">
				<p class="admin_sidebar_box_title"><?php 
echo $args_tax['taxonomy_name'];
?>
</p>
				<ul class="taxnomy_list tree">
					<?php 
$field_array['key'] = $args['taxonomy_key'];
$field_array['object_id'] = hm_get('id');
taxonomy_checkbox_list($field_array);
unset($field_array);
?>
				</ul>
			</div>
			
			<div class="row admin_sidebar_box">
				<p class="admin_sidebar_box_title"><?php 
echo _('Ảnh đại diện');
?>
</p>
				<?php 
$field_array['name'] = 'content_thumbnail';
$field_array['label'] = 'Chọn ảnh đại diện';
$field_array['imageonly'] = TRUE;
if (isset($fields_val['content_thumbnail'])) {
コード例 #2
0
    $('#nestable').nestable().on('change', updateOutput);
    updateOutput($('#nestable').data('output', $('#nestable-output')));
});
</script>
<div class="row" >
	<?php 
if (hm_get('mes') == 'add_success') {
    ?>
		<div class="alert alert-success" role="alert"><?php 
    echo _('Đã tạo trình đơn, bây giờ bạn có thể chỉnh sửa nó');
    ?>
</div>
	<?php 
}
?>
	<div class="col-md-12">
		<h1 class="page_title"><?php 
echo _('Chỉnh sửa trình đơn');
?>
</h1>
	</div>
	
	<div class="col-md-12">
	
		<div class="row admin_fullbar_box">
		
			<div class="col-md-3 menu_select_choise">
				<?php 
menu_select_choise(hm_get('id'));
?>
			</div>
コード例 #3
0
function taxonomy_checkbox_list($args = array())
{
    hook_action('taxonomy_checkbox_list');
    hook_filter('taxonomy_checkbox_list_before', $args);
    global $hmtaxonomy;
    $hmdb = new MySQL(true, DB_NAME, DB_HOST, DB_USER, DB_PASSWORD, DB_CHARSET);
    @($key = $args['key']);
    @($parent = $args['parent'] ? $args['parent'] : 0);
    @($default_value = $args['default_value']);
    @($object_id = $args['object_id']);
    if (is_numeric($object_id)) {
        $tableName = DB_PREFIX . "relationship";
        $whereArray = array('object_id' => MySQL::SQLValue($object_id), 'relationship' => MySQL::SQLValue('contax'));
        $hmdb->SelectRows($tableName, $whereArray);
        while ($row = $hmdb->Row()) {
            $default_value[] = $row->target_id;
        }
    }
    if (!is_array($default_value)) {
        $default_value = array();
    }
    $tax = $hmtaxonomy->hmtaxonomy;
    if (isset($tax[$key])) {
        $tableName = DB_PREFIX . "taxonomy";
        $whereArray = array('key' => MySQL::SQLValue($key), 'parent' => MySQL::SQLValue($parent), 'status' => MySQL::SQLValue('public'));
        $hmdb->SelectRows($tableName, $whereArray);
        if ($hmdb->HasRecords()) {
            if ($parent != 0) {
                echo '<ul class="taxonomy_tree_sub_group taxonomy_tree_sub_group_of_' . $parent . '">';
            }
            while ($row = $hmdb->Row()) {
                $taxs[] = $row;
            }
            foreach ($taxs as $tax) {
                if (in_array($tax->id, $default_value)) {
                    $checked = 'checked';
                } else {
                    $checked = '';
                }
                echo '<li data-id="' . $tax->id . '" data-slug="' . $tax->slug . '" class="tax_tree_item tax_tree_item_' . $tax->id . '">';
                echo '<input type="checkbox" name="taxonomy[]" value="' . $tax->id . '" ' . $checked . ' /> ';
                echo '<label>' . $tax->name . '</label>';
                taxonomy_checkbox_list(array('key' => $key, 'parent' => $tax->id, 'default_value' => $default_value));
                echo '</li>';
            }
            if ($parent != 0) {
                echo '</ul>';
            }
        }
    }
}