} else { load_file($_FILES["file"]["tmp_name"], $group, $profile, $nivel, $pass_policy, $avatar); } } } $table = new StdClass(); $table->width = '100%'; $table->class = 'search-table'; $table->size = array(); $table->size[0] = '120px'; $table->align[3] = "right"; $table->data = array(); if (!isset($id_group)) { $id_group = ''; } $table->data[0][0] = combo_groups_visible_for_me($config['id_user'], 'group', 0, 'TW', $id_group, true); $table->data[1][0] = "<label>" . __('Profiles') . "</label>"; $table->data[1][0] .= "<select name='perfil' class='w155' style='width: 218px;' >"; $sql = 'SELECT * FROM tprofile ORDER BY name'; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $table->data[1][0] .= "<option value='" . $row["id"] . "'>" . $row["name"]; } $table->data[1][0] .= '</select>'; $table->data[2][0] = "<label>" . __('Global profile') . "</label>"; $table->data[2][0] .= __('Standard user') . ' <input type="radio" class="chk" name="nivel" value="0" checked>'; $table->data[2][0] .= " "; $table->data[2][0] .= __('External user') . ' <input type="radio" class="chk" name="nivel" value="-1">'; $table->data[3][1] = "<label>" . __('Enable policy password') . "</label>"; $table->data[3][1] .= __('Yes') . ' <input type="radio" class="chk" name="pass_policy" value="1">'; $table->data[3][1] .= " ";
echo '<table width="100%" class="search-table-button">'; echo "<tr>"; echo "<td class=datos>"; echo __('Category'); echo "<td class=datos>"; if(!isset($id_category)){ $id_category = ''; } combo_download_categories ($id_category, 0); echo "<tr>"; echo "<td class=datos2>"; echo __('Group'); echo "<td class=datos2>"; combo_groups_visible_for_me ($config["id_user"], 'id_group', 1, 'KR', $id_group, false, 0 ); echo "</table>"; echo "<div class='button-form'>"; if ($id == -1) echo print_submit_button (__('Create'), 'crt_btn', false, 'class="sub create"', true); else echo print_submit_button (__('Update'), 'upd_btn', false, 'class="sub upd"', true); echo "</div>"; echo "</form>"; } // Show list of categories // ======================= if ((!isset($_GET["update"])) AND (!isset($_GET["create"]))){ echo "<h2>".__('File release category access management')."</h2><h4>".__('Assigned categories / group')."</h4>";
} else { echo "<h2>" . __("Newsletter update") . "</h2>"; $newsletter = get_db_row("tnewsletter", "id", $id); $name = $newsletter["name"]; $id_group = $newsletter["id_group"]; $from_desc = $newsletter["from_desc"]; $from_address = $newsletter["from_address"]; $description = $newsletter["description"]; } $table->width = '90%'; $table->class = 'databox'; $table->colspan = array(); $table->colspan[3][0] = 2; $table->data = array(); $table->data[0][0] = print_input_text('name', $name, '', 40, 100, true, __('Name')); $table->data[0][1] = combo_groups_visible_for_me($config["id_user"], "id_group", 0, "VR", $id_group, true, true); $table->data[1][0] = print_input_text('from_desc', $from_desc, '', 35, 120, true, __('From description')); $table->data[1][1] = print_input_text('from_address', $from_address, '', 35, 120, true, __('From address')); $table->data[3][0] = print_textarea("description", 14, 1, $description, '', true, __('Description')); echo '<form method="post" action="index.php?sec=customers&sec2=operation/newsletter/newsletter_definition">'; print_table($table); if ($permission) { echo '<div class="button" style="width: ' . $table->width . '">'; if ($id) { print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"'); print_input_hidden('id', $id); print_input_hidden('update', 1); } else { print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"'); print_input_hidden('create', 1); }