コード例 #1
0
ファイル: charts.php プロジェクト: RA2WP/RA2WP
    //Parse tpl
    $template_site->pparse('header');
    $template_site->pparse('charts-edit-2');
}
/**** Edit chart: save modifications ***/
if ($_POST[$wpbi_settings['parameter']['action']] == $wpbi_settings['value']['edit'] && isset($_POST[$wpbi_settings['parameter']['ch-id']])) {
    //set chart metadata
    $vo_new_chart = new vo_chart(NULL);
    $vo_new_chart->set_chart_id($_POST[$wpbi_settings['parameter']['ch-id']]);
    $vo_new_chart->set_query_id($_POST[$wpbi_settings['parameter']['qy_id']]);
    $vo_new_chart->set_chart_key(md5(date('YmdHis') . rand(100)));
    $vo_new_chart->set_chart_name($_POST[$wpbi_settings['parameter']['ch-name']]);
    $vo_new_chart->set_chart_type($_POST[$wpbi_settings['parameter']['ch-type']]);
    $vo_new_chart->set_chart_title($_POST[$wpbi_settings['parameter']['ch-title']]);
    $vo_new_chart->set_chart_title_size($_POST[$wpbi_settings['parameter']['ch-title-size']]);
    $vo_new_chart->set_chart_title_color($_POST[$wpbi_settings['parameter']['ch-title-color']]);
    $vo_new_chart->set_chart_time_format($_POST[$wpbi_settings['parameter']['ch-time-format']]);
    $vo_new_chart->set_chart_bg_color($_POST[$wpbi_settings['parameter']['ch-bgcolor']]);
    $vo_new_chart->set_chart_width($_POST[$wpbi_settings['parameter']['ch-width']]);
    $vo_new_chart->set_chart_width_percent(isset($_POST[$wpbi_settings['parameter']['ch-width-percent']]) ? 1 : 0);
    $vo_new_chart->set_chart_height($_POST[$wpbi_settings['parameter']['ch-height']]);
    $vo_new_chart->set_chart_height_percent(isset($_POST[$wpbi_settings['parameter']['ch-height-percent']]) ? 1 : 0);
    $vo_new_chart->set_chart_snapshot(isset($_POST[$wpbi_settings['parameter']['ch-snapshot']]) ? 1 : 0);
    $vo_new_chart->set_chart_stacked(isset($_POST[$wpbi_settings['parameter']['ch-stacked']]) ? 1 : 0);
    $vo_new_chart->set_chart_x_color($_POST[$wpbi_settings['parameter']['ch-x-axis-color']]);
    $vo_new_chart->set_chart_x_precision($_POST[$wpbi_settings['parameter']['ch-x-precision']]);
    $vo_new_chart->set_chart_x_thickness($_POST[$wpbi_settings['parameter']['ch-x-axis-thick']]);
    $vo_new_chart->set_chart_x_grid_color($_POST[$wpbi_settings['parameter']['ch-x-grid-color']]);
    $vo_new_chart->set_chart_x_grid_lines($_POST[$wpbi_settings['parameter']['ch-x-grid-step']]);
    $vo_new_chart->set_chart_x_label($_POST[$wpbi_settings['parameter']['ch-x-label']]);
    $vo_new_chart->set_chart_x_labels_color($_POST[$wpbi_settings['parameter']['ch-x-label-color']]);