コード例 #1
0
         foreach ($arr['source_value'] as $key => $val) {
             $formdata['c_multi_' . $arr['title'] . '_' . $key] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array($key => $val)));
             if ($i == 1) {
                 $formdata['c_multi_' . $arr['title'] . '_' . $key]['label'] = $formdata[$arr['title']]['label'];
                 unset($formdata[$arr['title']]);
                 $i++;
             }
         }
     }
 }
 if ($arr['type'] == 'select' or $arr['type'] == 'radio') {
     if ($arr['source_table']) {
         if (isset(${$arr['title']})) {
             cross_table($arr['title'], ${$arr['title']});
         } else {
             cross_table($arr['title'], 0);
         }
     } else {
         $arr['source_value'] = unserialize($arr['source_value']);
         if ($arr['type'] != 'radio') {
             $formdata[$arr['title']]['settings']['data'][0] = "...";
         }
         foreach ($arr['source_value'] as $key => $val) {
             $formdata[$arr['title']]['settings']['data'][$key] = $val;
         }
     }
 }
 if ($arr['type'] == 'datepicker') {
     $formdata[$arr['title']]['parent_class'] = 'date';
     $formdata[$arr['title']]['value']['date'] = date('d.m.Y', $date);
     $formdata[$arr['title']]['value']['time'] = date('H:i', $date);
コード例 #2
0
<?php

$formdata['id_template'] = array('type' => 'select', 'label' => v('CMT_TEMPLATE'), 'class' => 'reload_select', 'settings' => array('data' => 'id_template'), 'style' => array('class' => "col-3_of_7"));
if (isset($id_template)) {
    cross_table('id_template', $id_template);
} else {
    cross_table('id_template');
}
foreach ($formdata as $key => $val) {
    if (isset(${$key})) {
        $formdata[$key]['value'] = ${$key};
    }
}
$filter_array['BASICS'] = $formdata;
$formdata = NULL;
if (!isset($order)) {
    $data_array['SORT'] = array("sort_order" => $direction);
} else {
    $data_array['SORT'] = array($order => $direction);
}
print "<div class='filter'>";
show_filter($filter_array);
print "</div><!-- /.filter -->";
$old_modul = $modul;
$modul = 'id_template';
if (isset($data_array['SORT'])) {
    $old_data_array['SORT'] = $data_array['SORT'];
    unset($data_array['SORT']);
    $data_array['SORT'] = array("sort_order" => $direction);
}
if (isset($data_array['FILTER'])) {
コード例 #3
0
ファイル: content.php プロジェクト: entire-media/comator
}
if (isset($to_date)) {
    $formdata['date']['value']['to_date'] = $to_date;
    $data_array['FILTER']['date']['to_date'] = mktime(23, 59, 59, $to_date['month'], $to_date['day'], $to_date['year']);
}
$formdata['id_template'] = array('type' => 'select', 'label' => v('CMT_TEMPLATE'), 'class' => 'reload_select', 'settings' => array('data' => 'id_template'), 'style' => array('class' => "col-3_of_7"));
if (isset($id_template)) {
    cross_table('id_template', $id_template);
} else {
    cross_table('id_template');
}
$formdata['id_tree'] = array('type' => 'select', 'label' => v('CMT_LEVEL'), 'settings' => array('data' => 'content_tree'), 'style' => array('class' => "col-3_of_7"));
if (isset($id_tree)) {
    cross_table('id_tree', $id_tree);
} else {
    cross_table('id_tree');
}
foreach ($formdata as $key => $val) {
    if (isset(${$key})) {
        $formdata[$key]['value'] = ${$key};
    }
}
$filter_array['BASICS'] = $formdata;
$formdata = NULL;
$formdata['q'] = array('type' => 'text', 'label' => v('CMT_SEARCH'), 'style' => array('class' => "col-3_of_7"));
$sql = "SELECT * FROM " . $_SESSION['TABLE_PREFIX'] . $modul . "_fields WHERE c_active = '1' AND c_search = '1' ";
$result = db_mysql_query($sql, $conn);
while ($arr = db_mysql_fetch_array($result)) {
    $formdata['c_q_' . $arr['title']] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox');
    $formdata['c_q_' . $arr['title']]['settings']['data'] = array('1' => v('CMT_' . strtoupper($arr['title'])));
    $formdata['c_q_' . $arr['title']]['value'] = 1;
コード例 #4
0
if (isset($update_parent)) {
    $formdata['update_parent'] = array('type' => 'hidden', 'value' => 1);
}
$formdata['date'] = array('type' => 'datepicker', 'label' => v('CMT_DATE'), 'parent_class' => 'date', 'value' => array('date' => date('d.m.Y', $date), 'time' => date('H:i', $date)));
$formdata['id_template'] = array('type' => 'select', 'label' => v('CMT_TEMPLATE'), 'settings' => array('data' => 'id_template'), 'style' => array('class' => "col-3_of_7"));
if (isset($id_template)) {
    cross_table('id_template', $id_template);
} else {
    cross_table('id_template');
}
$formdata['title'] = array('type' => 'text', 'label' => v('CMT_TITLE'), 'style' => array('class' => "col-3_of_7"));
$formdata['id_field'] = array('type' => 'select', 'label' => v('CMT_FIELD'), 'class' => 'reload_select', 'settings' => array('data' => 'content_fields'), 'style' => array('class' => "col-3_of_7"));
if (isset($id_field)) {
    cross_table('id_field', $id_field);
} else {
    cross_table('id_field');
}
$formdata['id_field']['settings']['data'][0] = v('CMT_BLOCK');
if (isset($id_field)) {
    if (!isset($label)) {
        $label = $title;
    }
    if (!isset($next_row)) {
        $next_row = 1;
    }
    if (!isset($max_columns)) {
        $max_columns = 0;
    }
    if (!isset($max_width)) {
        $max_width = 0;
    }
コード例 #5
0
print "\n\t\t</div><!-- /.popup-head -->\n\t\t<div class='popup-content'>";
if (isset($alert)) {
    print print_alert('error', v('CMT_HEADLINE_SAVE_ERROR'), v('CMT_TEXT_SAVE_ERROR'));
}
if (isset($success)) {
    print print_alert('success', v('CMT_HEADLINE_SAVE_SUCCESS'), v('CMT_TEXT_SAVE_SUCCESS'));
}
if (isset($update_parent)) {
    $formdata['update_parent'] = array('type' => 'hidden', 'value' => 1);
}
$formdata['date'] = array('type' => 'datepicker', 'label' => v('CMT_DATE'), 'parent_class' => 'date', 'value' => array('date' => date('d.m.Y', $date), 'time' => date('H:i', $date)));
$formdata['id_parent'] = array('type' => 'select', 'label' => v('CMT_LEVEL'), 'settings' => array('data' => 'content_tree'));
if (isset($id_parent)) {
    cross_table('id_parent', $id_parent);
} else {
    cross_table('id_parent');
}
$formdata['title'] = array('type' => 'text', 'label' => v('CMT_TITLE'), 'style' => array('class' => "col-3_of_7"));
$formdata['title_sub'] = array('type' => 'text', 'label' => v('CMT_TITLE_SUB'), 'style' => array('class' => "col-3_of_7"));
$formdata['text'] = array('type' => 'textarea', 'label' => v('CMT_TEXT'));
$formdata['addition'] = array('type' => 'textarea', 'label' => v('CMT_ADDITION'));
$formdata['description'] = array('type' => 'textarea', 'label' => v('CMT_DESCRIPTION'));
$formdata['sort_order'] = array('type' => 'text', 'label' => v('CMT_ORDER'), 'style' => array('class' => 'align-right col-1_of_7'));
$formdata['c_top'] = array('type' => 'checkbox', 'label' => v('CMT_POSITION'), 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_TOP'))));
$formdata['c_right'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_RIGHT'))));
$formdata['c_bottom'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_BOTTOM'))));
$formdata['c_left'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_LEFT'))));
$formdata['c_top_2'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_TOP') . " 2")));
$formdata['c_right_2'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_RIGHT') . " 2")));
$formdata['c_bottom_2'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_BOTTOM') . " 2")));
$formdata['c_left_2'] = array('type' => 'checkbox', 'parent_class' => 'multi_checkbox', 'settings' => array('data' => array('1' => v('CMT_LEFT') . " 2")));