<?php $head = array(lang('name'), lang('value')); $data[] = array($this->block->generate_required_mark(lang('keyword')), $keyword->keyword); $data[] = array($this->block->generate_required_mark(lang('link_url')), $keyword->link_url); $data[] = array(lang('global_search_monthly'), $keyword->global_search_monthly); $data[] = array(lang('usa_search'), $keyword->usa_search); $data[] = array(lang('search_result'), $keyword->search_result); $data[] = array(lang('search_intitle'), $keyword->search_intitle); $data[] = array(lang('compete_price'), $keyword->compete_price); $data[] = array(lang('compete_index'), $keyword->compete_index); $data[] = array(lang('intitle'), $keyword->intitle); $data[] = array(lang('price_per_click'), $keyword->price_per_click); $data[] = array(lang('page_first_ten'), $keyword->page_first_ten); $data[] = array(lang('com_ranking'), $keyword->com_ranking); foreach ($catalogs as $catalog) { $options[$catalog->id] = $catalog->name; } $cat_count = count($options); $data[] = array($this->block->generate_required_mark('Category'), form_dropdown('catalogs[]', $options, $catalog_ids ? object_to_array($catalog_ids, 'catalog_id') : array_keys($options), "id='catalogs' size=" . "'{$cat_count}'")); $config = array('name' => 'note', 'id' => 'note', 'value' => $keyword ? $keyword->note : '', 'style' => 'width:98%', 'rows' => '5', 'cols' => '5'); $data[] = array($this->block->generate_required_mark(lang('note')), form_textarea($config)); echo $this->block->generate_tinymce(array('note'), TRUE); $permission = $this->block->generate_permissions($seo_users, $permissions); $data[] = array($this->block->generate_required_mark('resource permission'), block_check_group('permissions[]', $permission)); $title = lang('seo_keyword_view_list'); $back_button = $this->block->generate_back_icon(site_url('seo/seo_keyword/view_list')); $title .= $back_button; echo block_header($title); echo $this->block->generate_table($head, $data); echo '<h2>' . $back_button . '</h2>';
$config = array('name' => 'mobile', 'id' => 'mobile', 'maxlength' => '255', 'size' => '30'); $data[] = array(lang('mobile'), form_input($config)); $config = array('name' => 'open_bank', 'id' => 'open_bank', 'maxlength' => '255', 'size' => '30'); $data[] = array(lang('open_bank'), form_input($config)); $config = array('name' => 'bank_account', 'id' => 'bank_account', 'maxlength' => '255', 'size' => '30'); $data[] = array(lang('bank_account'), form_input($config)); $config = array('name' => 'bank_title', 'id' => 'bank_title', 'maxlength' => '255', 'size' => '30'); $data[] = array(lang('bank_title'), form_input($config)); $config = array('name' => 'remark', 'id' => 'remark', 'rows' => '5', 'cols' => '40'); $data[] = array(lang('remark'), form_textarea($config)); $permission = ''; foreach ($purchase_users as $purchase_user) { $config = array('name' => 'permissions[]', 'value' => $purchase_user->u_id, 'style' => 'margin:10px'); $permission .= form_checkbox($config) . form_label($purchase_user->u_name); } $data[] = array($this->block->generate_required_mark(lang('purchase_permission')), block_check_group('permissions[]', $permission)); $title = lang('add_a_new_provider'); $back_button = $this->block->generate_back_icon(site_url('purchase/provider/management')); if ($popup) { $back_button = NULL; } $title .= $back_button; echo block_header($title); $attributes = array('id' => 'add_provider_form'); echo form_open(site_url('purchase/provider/add_save'), $attributes); echo $this->block->generate_table($head, $data); $url = site_url('purchase/provider/add_save'); $config = array('name' => 'submit', 'value' => lang('save'), 'type' => 'button', 'style' => 'margin:10px', 'onclick' => "this.blur();helper.ajax('{$url}',\$('add_provider_form').serialize(true), 1);"); if ($popup) { $config['onclick'] = "save('{$input_id}','{$url}');"; }
$data[] = array($this->block->generate_required_mark(lang('chinese_name')), form_input($config)); $str = form_dropdown('parent', $parent, $document_catalog->id); $data[] = array(lang('parent_catalog'), $str); $permission_str = ''; $group_ids = array(); if ($group_possession) { foreach ($group_possession as $group) { $group_ids[] = $group->group_id; } } $n = 1; foreach ($group_all as $group) { $config = array('name' => 'group[]', 'value' => $group->id, 'checked' => in_array($group->id, $group_ids) ? TRUE : FALSE, 'style' => 'margin:10px'); if ($n % 10 == 0) { $permission_str .= form_checkbox($config) . $group->name . '<br>'; } else { $permission_str .= form_checkbox($config) . $group->name; } $n++; } $data[] = array($this->block->generate_required_mark(lang('permission')), block_check_group('group[]', $permission_str)); $title = lang('add_a_new_document_catalog'); $back_button = $this->block->generate_back_icon(site_url('edu/catalog/manage')); echo block_header($title . $back_button); $attributes = array('id' => 'catalog_form'); echo form_open(site_url('edu/catalog/save'), $attributes); echo $this->block->generate_table($head, $data); $url = site_url('edu/catalog/save'); $config = array('name' => 'submit', 'value' => lang('save_document_catalog'), 'type' => 'button', 'style' => 'margin:10px', 'onclick' => "this.blur();helper.ajax('{$url}',\$('catalog_form').serialize(true), 1);"); echo form_hidden('catalog_id', isset($document_catalog) ? $document_catalog->id : '-1'); echo '<h2>' . block_button($config) . $back_button . '</h2>';
$forbidden_level_arr = array(); foreach (get_forbidden_level_obj($product->id) as $value) { $forbidden_level_arr[] = $value->ban_level; } foreach ($options as $key => $value) { $config = array('name' => 'forbidden_level[]', 'value' => $key, 'checked' => !empty($forbidden_level_arr) && in_array($key, $forbidden_level_arr) ? TRUE : FALSE, 'style' => 'margin:10px'); if (product_can_write('forbidden_level')) { $forbidden_level_html .= form_checkbox($config) . lang($value); } if (product_can_read('forbidden_level')) { if (!empty($forbidden_level_arr) && in_array($key, $forbidden_level_arr)) { $forbidden_level_html .= lang($value); } } } $data[] = array(lang('forbidden_level'), block_check_group('forbidden_level[]', $forbidden_level_html)); $config = array('name' => 'lowest_profit', 'id' => 'lowest_profit', 'value' => $product->lowest_profit == 0 ? '' : $product->lowest_profit, 'maxlength' => '10', 'size' => '10'); $html = ''; foreach ($coefficient as $v) { $html .= '<label onclick="get_coefficient(' . $v->lowest_profit . ')"> ' . $v->name_cn . ' : ' . $v->lowest_profit . ' </label>'; } if (product_can_write('lowest_profit')) { $data[] = array(lang('lowest_profit'), form_input($config) . $html); } else { if (product_can_read('lowest_profit')) { if (empty($product->lowest_profit)) { $config['disabled'] = true; } else { $config['readonly'] = true; } $data[] = array(lang('lowest_profit'), form_input($config) . ' <label onclick="get_coefficient(' . $coefficient . ')"> ' . lang('inheritance_profit_factor') . ' : ' . $coefficient . ' </label>');