function navbar($sid, $title, $thold, $mode, $order) { global $MAIN_CFG, $prefix, $db, $mainindex, $cpgtpl, $textcolor1, $textcolor2, $bgcolor1, $bgcolor2; list($count) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $prefix . "_comments WHERE sid='{$sid}'", SQL_NUM); $thold = intval($thold); $cpgtpl->assign_vars(array('F_NEWSHIDE' => '', 'S_COUNT' => $count, 'S_COMMENTS' => $count == 1 ? _COMMENT : _COMMENTS, 'S_COMMWARN' => _COMMENTSWARNING, 'S_POSTCOMM' => $MAIN_CFG['global']['anonpost'] || is_user() ? _REPLYMAIN : '', 'S_SELTHOLD' => select_option('thold', $thold, array('-1', '0', '1', '2', '3', '4', '5')), 'S_SELMODE' => select_box('mode', $mode, array('nested' => _NESTED, 'flat' => _FLAT, 'thread' => _THREAD)), 'S_SELORDER' => select_box('order', $order, array('0' => _OLDEST, '1' => _NEWEST, '2' => _HIGHEST)), 'S_THRESHOLD' => _THRESHOLD, 'S_TITLE' => $title, 'S_USER' => is_user() ? _CONFIGURE : _LOGINCREATE, 'S_REFRESH' => _REFRESH, 'S_TEXTCOLOR1' => $textcolor1, 'S_TEXTCOLOR2' => $textcolor2, 'S_BGCOLOR1' => $bgcolor1, 'S_BGCOLOR2' => $bgcolor2, 'U_ARTICLE' => URL::index('&file=article&sid=' . $sid), 'U_TOPREPLY' => URL::index('&reply=0&sid=' . $sid), 'U_USER' => is_user() ? URL::index('Your_Account&op=editcomm') : URL::index('Your_Account'))); }
function search_form($search_id = false) { global $db, $dl_prefix, $user_prefix, $module_name, $CPG_SESS, $bgcolor3; $searchdata = $_POST; $return = ''; if ($search_id) { if (isset($CPG_SESS[$module_name]['search'][$search_id])) { $searchdata = $CPG_SESS[$module_name]['search'][$search_id]; $return .= '<div style="background-color: ' . $bgcolor3 . '; padding: 3px;">Editing criteria for search #' . $search_id . '; <a href="' . URL::index('&file=search') . '">start new search</a></div>'; } else { $return .= $this->show_error('Invalid or expired search session. Please start a new search below.'); } } $return .= '<form action="' . URL::index('&file=search') . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <h3>Keywords</h3><input type="text" name="s_BASICSEARCH" size="53" value="' . (isset($searchdata['s_BASICSEARCH']) ? htmlprepare($searchdata['s_BASICSEARCH']) : '') . '" maxlength="255" /><br /><br /> <div style="float: left; width: 50%"><h3>Basic information</h3> <label class="ulog" for="s_cid">' . _CATEGORY . '</label> ' . DL_Cat::selectbox(isset($searchdata['s_cid']) ? intval($searchdata['s_cid']) : 0, 's_cid', 2) . '<br /> <label class="ulog" for="s_submitter">' . _DLP_SUBMITTEDBY . '</label> <input type="text" name="s_submitter" id="s_submitter" size="30" maxlength="255" value="' . (isset($searchdata['s_submitter']) ? htmlprepare($searchdata['s_submitter']) : '') . '" /><br /> <label class="ulog" for="s_name">' . _AUTHORNAME . '</label> <input type="text" name="s_name" id="s_name" size="30" maxlength="255" value="' . (isset($searchdata['s_name']) ? htmlprepare($searchdata['s_name']) : '') . '" /><br /> <label class="ulog" for="s_email">' . _AUTHOREMAIL . '</label> <input type="text" name="s_email" id="s_email" size="30" maxlength="255" value="' . (isset($searchdata['s_email']) ? htmlprepare($searchdata['s_email']) : '') . '" /><br /> <h3>Special options</h3> <label class="ulog" for="s_pick">' . _DLP_EDPICK . '</label> <input type="checkbox" name="s_pick" id="s_pick" value="1"' . (isset($searchdata['s_pick']) && $searchdata['s_pick'] == 1 ? ' checked="checked"' : '') . ' /> ' . _YES . '<br /> <label class="ulog" for="s_screenshot">Only downloads with screenshot(s)</label> <input type="checkbox" name="s_screenshot" id="s_screenshot" value="1"' . (isset($searchdata['s_screenshot']) && $searchdata['s_screenshot'] == 1 ? ' checked="checked"' : '') . ' /> ' . _YES . '<br /> <label class="ulog" for="s_date">Published in past</label> ' . select_option('s_date', isset($searchdata['s_date']) ? intval($searchdata['s_date']) : '', array('', 3, 7, 14, 30, 60, 90, 180, 365)) . ' days<br /> <label class="ulog" for="s_updated">Updated in past</label> ' . select_option('s_updated', isset($searchdata['s_updated']) ? intval($searchdata['s_updated']) : '', array('', 3, 7, 14, 30, 60, 90, 180, 365)) . ' days</div> <div style="float: right; width: 50%"><h3>Additional information</h3>'; $result = $db->sql_uquery("SELECT * FROM " . $dl_prefix . "_fields \n\t\t\tWHERE visible > 0 \n\t\t\tORDER BY title"); while ($field = $db->sql_fetchrow($result)) { $f_title = defined($field['title']) ? constant($field['title']) : $field['title']; $f_title = $field['visible'] == 2 ? '* ' . $f_title : $f_title; $return .= '<label class="ulog" for="s_' . $field['field'] . '">' . $f_title . '</label>'; if ($field['type'] == 1 || $field['type'] == 3) { $f_value = isset($searchdata['s_' . $field['field']]) ? intval($searchdata['s_' . $field['field']]) : 0; $return .= '<input type="checkbox" name="s_' . $field['field'] . '" id="s_' . $field['field'] . '" value="1"' . ($f_value == 1 ? ' checked="checked"' : '') . ' /> ' . _YES . '<br />'; } else { $f_value = isset($searchdata['s_' . $field['field']]) ? htmlprepare($searchdata['s_' . $field['field']]) : ''; $return .= '<input type="text" name="s_' . $field['field'] . '" id="s_' . $field['field'] . '" size="30" maxlength="' . $field['size'] . '" value="' . $f_value . '" /><br />'; } } $return .= '</div><br /><br /><input type="submit" name="search" value="' . _SEARCH . '" /></form>'; return $return; }
EOE; } // END options / antispam //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// //// //// START PAGE FIVE: USER OPTIONS //// //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// if (isset($_GET['optionsview']) and $_GET['optionsview'] == 'user' and !isset($_GET['advancedview'])) { /** * Store language option variables * */ $admin_lang_select = select_option('../language', 'adminlangfile'); $timezone_select = timezone_select(); $local_time = gmdate($cfgrow['dateformat'], time() + 3600 * $cfgrow['timezone']); $decoded_pass = ''; $_POST['newadminpass'] = ''; echo <<<EOE \t\t<form method="post" action="{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}&optaction=updateuser" accept-charset="UTF-8"> \t\t \t\t<!-- Username / Pass Options --> \t\t \t\t \t\t<div class="jcaption">{$admin_lang_optn_usr_pss}</div> \t\t \t\t<div class="content"> \t\t\t<table border="0" cellspacing="2" cellpadding="0">
<?php $type_option = OptionArray(D('User')->managerRole(), 'type', 'name'); $role_selected = $user ? $user['role'] : $manager_role; ?> <form method="post" action="<?php echo U('user/submit_edit'); ?> " class="form-horizontal post_ajax_form"> <table class="table table-noborder"> <tr> <td class="item-label">类型</td> <td> <select class="form-control input-sm span2 type_choose" name="manager_role"> <?php echo select_option($type_option, $role_selected); ?> </select> </td> </tr> <tr> <td class="item-label">用户名</td> <td> <input type="text" value="<?php echo $user['username']; ?> " name="username" class="form-control input-sm" placeholder="请输入用户名" > </td> </tr> <?php if (!$user) {
function form_select($class, $value, $options) { $html .= "<select {$class} >"; $html .= select_option($options, $value); $html .= "</select>"; return $html; }
echo $category_id; ?> " /> <div class="category-select"><?php echo content_category_select($category_tree, '', 0, $category_id); ?> </div> </div> <?php if ($category['enable_children']) { ?> <label class="item-label">所属内容</label> <select id="status" name="parent_id" class="pull-left span3 form-control input-sm" style="width:550px"> <option vlaue="0"> -无-</option> <?php echo select_option($parent_contents, $content['parent_id']); ?> </select><?php } ?> </td> </tr> <?php if (is_array($model_fields)) { foreach ($model_fields as $key => $field) { switch ($field["type"]) { case "pictures": ?> <tr> <?php $object_id = $content['id'];
function ma_formfield($type, $field, $size, $userinfo) { global $MAIN_CFG, $CPG_SESS, $l10n_dst_regions, $l10n_gmt_regions; if ($type == 0) { return '<input type="text" name="' . ($field == 'name' ? 'realname' : $field) . '" value="' . htmlprepare($userinfo[$field]) . '" class="post" style="width: 200px" size="25" maxlength="' . $size . '" />'; } else { if ($type == 1) { return yesno_option($field, is_user() ? $userinfo[$field] : $size); } else { if ($type == 2) { return '<textarea name="' . $field . '" style="width: 300px" rows="6" cols="30" class="post">' . htmlprepare($userinfo[$field]) . '</textarea>'; } else { if ($type == 3) { $ret = select_box($field, $userinfo[$field], $l10n_gmt_regions); if ($field == 'user_timezone') { $ret .= '<br /><select name="user_dst">'; foreach ($l10n_dst_regions as $region => $data) { $sel = $userinfo['user_dst'] == $region ? 'selected="selected"' : ''; $ret .= "<option value=\"{$region}\" {$sel}>{$data['0']}</option>\n"; } $ret .= '</select>'; } return $ret; } else { if ($type == 4) { return '<input type="text" name="' . $field . '" value="' . htmlprepare(is_user() ? $userinfo[$field] : '') . '" class="post" style="width: 100px" size="15" maxlength="' . $size . '" />'; } else { if ($type == 5) { return select_box($field, is_user() ? $userinfo[$field] : 'm', array('m' => _MALE, 'f' => _FEMALE)); } else { if ($type == 6) { return '<input type="text" name="' . $field . '" value="' . (is_user() ? date_short($userinfo[$field]) : '') . '" class="post" style="width: 100px" size="15" maxlength="10" /> 10/24/1980'; } else { if ($type == 7) { $themelist = array(); $handle = opendir('themes'); while ($file = readdir($handle)) { if (false === strpos($file, '.') && $file != 'CVS' && file_exists("themes/{$file}/theme.php")) { $themelist[] = "{$file}"; } } closedir($handle); natcasesort($themelist); return select_option($field, is_user() && !empty($userinfo['theme']) && is_dir('themes/' . $userinfo['theme']) ? $userinfo['theme'] : $CPG_SESS['theme'], $themelist); } else { if ($type == 8) { if ($field == 'user_lang') { return lang_selectbox($userinfo['user_lang'], $field, false); } return ''; } } } } } } } } } return ''; }
$ignore = array('banners.php', 'error.php', 'header.php', 'footer.php', 'install.php'); $filesa = $filesi = array(); $dir = dir(BASEDIR); while ($file = $dir->read()) { if (is_file(BASEDIR . $file) && preg_match('#\\.php$#', $file) && !in_array($file, $ignore)) { if ($file != 'index.php') { $filesa[] = $file; } $filesi[] = $file; } } $dir->close(); natcasesort($filesa); natcasesort($filesi); array_unshift($filesi, '[none]'); $avail_settings = array(array('L_TITLE' => 'Full debugging', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => yesno_option('config_debug', NEXOS_DEBUG)), array('L_TITLE' => 'Index file</span><br /><i>If you change this into something else then index.php or [none]<br/>then you must modify LEO in .htaccess</i>', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => select_option('config_index', $mainindex, $filesi)), array('L_TITLE' => 'Admin file', 'L_TOOLTIP' => '', 'B_INPUT' => false, 'S_TYPE' => select_option('config_admin', $adminindex, $filesa))); } else { if ($section == 12) { $p3p_header = !empty($MAIN_CFG['header']['P3P']) ? $MAIN_CFG['header']['P3P'] : $MAIN_CFG['header']['P3P_default']; foreach ($P3P_CP as $policy => $data) { $bg = !empty($bg) ? '' : ' style="background-color: ' . $bgcolor2 . ';"'; // echo '<td colspan="2"><span class="genmed" style="background-color: '.$bgcolor4."; font-weight: bold;\">$data</span></td>\n"; //echo "<tr$bg>\n"; if (is_int($policy)) { /*$pos = 0;*/ $p3p_sect = $policy; $avail_settings[] = array('L_TITLE' => $data, 'L_TOOLTIP' => ' style="background-color: ' . $bgcolor4 . '; font-weight: bold;"', 'B_INPUT' => false, 'S_TYPE' => ''); } else { $def_option = ''; if (preg_match('/(' . $policy . '[aio|\\s]{0,1})/', $p3p_header, $match)) { $def_option = trim($match[1]);
function showrecords() { global $Ticket_Number, $name, $tts, $prefix, $hlpdsk_prefix, $hlpdsk_theme, $nuke_user_table, $nuke_user_last_name_fieldname, $nuke_username_fieldname, $hours, $mins, $javascript, $nuke_user_id_fieldname, $nuke_user_first_name_fieldname, $datepicker, $cmdOk, $cmdReset, $GO_SECURITY, $acl_read, $acl_write, $GO_LANGUAGE; require $GO_LANGUAGE->get_language_file('opentts'); $acl_read = get_cross_value("{$prefix}{$hlpdsk_prefix}_tickets", 'acl_read', "where ticket_number='{$Ticket_Number}'"); $acl_write = get_cross_value("{$prefix}{$hlpdsk_prefix}_tickets", 'acl_write', "where ticket_number='{$Ticket_Number}'"); if ($GO_SECURITY->user_in_acl(whoami(), $acl_read) or $GO_SECURITY->user_in_acl(whoami(), $acl_write) or Security::is_action_allowed("view_all_tickets")) { $query_condition = " "; } else { $query_condition = " and (t_from='" . whoami() . "' or t_assigned='" . whoami() . "')"; } $querytext = "select * from {$prefix}{$hlpdsk_prefix}_tickets where Ticket_Number='{$Ticket_Number}' {$query_condition} "; $tts->query($querytext); $recordcount = $tts->num_rows(); $row = 0; if ($recordcount = 0) { return 'missing'; } while ($tts->next_record()) { $post_date = $tts->f('post_date'); $due_date = $tts->f('due_date'); $end_date = $tts->f('end_date'); $complete = $tts->f('complete'); $t_from = $tts->f('t_from'); $t_stage = $tts->f('t_stage'); $t_category = $tts->f('t_category'); $t_priority = $tts->f('t_priority'); $t_subject = htmlspecialchars($tts->f('t_subject')); $t_description = htmlspecialchars($tts->f('t_description')); #$t_description=str_replace("\n"," <br> ",$t_description); $t_assigned = $tts->f('t_assigned'); $t_email = $tts->f('t_email'); $t_sms = $tts->f('t_sms'); $t_status = $tts->f('t_status'); $change_date = htmlspecialchars($tts->f('change_date')); $activity_id = $tts->f('activity_id'); $project_id = $tts->f('project_id'); $due_date = date("Y/m/d H:i", $due_date); $end_date = date("Y/m/d H:i", $end_date); $action_changes = $javascript; if ($t_sms == "on") { $t_sms = " CHECKED"; } if ($t_email == "on") { $t_email = " CHECKED"; } if ($GO_SECURITY->user_in_acl(whoami(), $acl_write)) { $button = new button(); $action_changes .= $button->get_button($cmdOk, "javascript:document.change_status.submit()"); $action_changes .= $button->get_button($cmdReset, "javascript:document.change_status.reset()"); } else { $action_changes .= ''; } $action_changes .= "</form></center>"; $tts_lang_ticket_number = "Ticket Number:"; $tts_lang_post_date_value = date("{$_SESSION['GO_SESSION']['date_format']} H:i", $post_date); $fullname = opentts::get_fullname($t_from); if (Security::is_action_allowed("imperson", 0, $acl_write)) { $select = new select('user', 'change_status', 't_from', $t_from); $tts_lang_issuer = $select->get_link("{$tts_lang_issuer}"); $tts_lang_issuer_value = $select->get_field(); } else { $tts_lang_issuer_value = "{$fullname}"; } $stage_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_stages", "stage_name", " where stage_id='{$t_stage}'")); $category_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_categories", "category_name", " where category_id='{$t_category}'")); $project_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_projects", "project_name", " where project_id='{$project_id}'")); $select_complete = "<select name='complete' class=textbox>" . "<option value='0' >0%</option>" . "<option value='10'>10%</option>" . "<option value='20'>20%</option>" . "<option value='30'>30%</option>" . "<option value='40'>40%</option>" . "<option value='50'>50%</option>" . "<option value='60'>60%</option>" . "<option value='70'>70%</option>" . "<option value='80'>80%</option>" . "<option value='90'>90%</option>" . "<option value='100'>100%</option>" . "</select>"; $t_assigned_name = Security::whatsmyname($t_assigned); if (Security::is_action_allowed("change_subject", 0, $acl_write)) { $tts_lang_subject_value = "<input name=t_subject value=\"" . Security::sqlsecure($t_subject) . "\" class=textbox max=80 size=80>"; } else { $tts_lang_subject_value = "<input name=t_subject value=\"" . Security::sqlsecure($t_subject) . "\" class=textbox max=80 size=80 readonly>"; } $tts_lang_description_value = "<textarea name=t_description cols=80 rows=12 class=textbox readonly>" . Security::sqlsecure($t_description) . "</textarea>"; $tts_lang_change_date_VALUE = date("{$_SESSION['GO_SESSION']['date_format']} H:i", $change_date); $tts_lang_email = "Email {$tts_lang_issuer}: <input type=checkbox name=t_email_issuer value=1><br>Email {$tts_lang_assigned} <input type=checkbox name=t_email_agent value=1>"; $post_changes = "<form name=\"change_status\" method=\"POST\" action=\"change_ticket.php?Ticket_Number={$Ticket_Number}&func=change_status\">"; if (Security::is_action_allowed("change_project", 0, $acl_write)) { $project_name = select_option("{$project_id}", fill_select("project_id", "{$prefix}{$hlpdsk_prefix}_projects", "project_id", "project_name", " order by project_id")); $tts_lang_project_value = "{$project_name}"; } else { $project_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_projects", "project_name", " where project_id='{$project_id}'")); $tts_lang_project_value = "{$project_name}"; } $fullname = opentts::get_fullname($t_assigned); if (Security::is_action_allowed("change_assigned", 0, $acl_write)) { $select = new select('user', 'change_status', 't_assigned', $t_assigned); $tts_lang_assign_to = $select->get_link("{$tts_lang_assign_to}"); $tts_lang_assign_to_value = $select->get_field(); } else { $tts_lang_assign_to_value = "{$fullname}"; } if (Security::is_action_allowed("change_end_date", 0, $acl_write)) { $time = strtotime($end_date); #$end_date_d_m_y=date("Y/m/d",$time); $end_date_h = date("H", $time); $end_date_i = date("i", $time); $today = date($_SESSION['GO_SESSION']['date_format'], $time); $end_date = $datepicker->get_date_picker('end_date_d_m_y', $_SESSION['GO_SESSION']['date_format'], $today); $dropbox = new dropbox(); $dropbox->add_arrays($hours, $hours); $end_date .= '<td>'; $end_date_h_value = $dropbox->get_dropbox("end_date_h", $end_date_h); $dropbox = new dropbox(); $dropbox->add_arrays($mins, $mins); $end_date_i_value = $dropbox->get_dropbox("end_date_i", $end_date_i); if ($htmldirection == 'rtl') { $end_date .= "{$end_date_i_value}:{$end_date_h_value}"; } else { $end_date .= "{$end_date_h_value}:{$end_date_i_value}"; } $tts_lang_end_date_value = "{$end_date} "; } else { $tts_lang_end_date_value = "{$end_date}"; } if (Security::is_action_allowed("change_complete", 0, $acl_write)) { $_PERCENTAGE_COMPLETE_VALUE = select_option("{$complete}", "{$select_complete}"); } else { $_PERCENTAGE_COMPLETE_VALUE = "{$complete} %"; } if (Security::is_action_allowed("change_due_date", 0, $acl_write)) { $time = strtotime($due_date); $due_date_d_m_y = date($_SESSION['GO_SESSION']['date_format'], $time); $due_date_h = date("H", $time); $due_date_i = date("i", $time); $today = date($_SESSION['GO_SESSION']['date_format'], $time); $due_date = $datepicker->get_date_picker('due_date_d_m_y', $_SESSION['GO_SESSION']['date_format'], $today, '', '', 'onchange="javascript:document.change_status.end_date_d_m_y.value=this.value;"'); $dropbox = new dropbox(); $dropbox->add_arrays($hours, $hours); $due_date .= '<td>'; $due_date_h_value = $dropbox->get_dropbox("due_date_h", $due_date_h, 'onchange="javascript:update_end_hour(this.value);"'); $dropbox = new dropbox(); $dropbox->add_arrays($mins, $mins); $due_date_i_value = $dropbox->get_dropbox("due_date_i", $due_date_i, 'onchange="javascript:update_end_min(this.value);"'); if ($htmldirection == 'rtl') { $due_date .= "{$due_date_i_value}:{$due_date_h_value}"; } else { $due_date .= "{$due_date_h_value}:{$due_date_i_value}"; } $tts_lang_due_date_value = "{$due_date} "; } else { $tts_lang_due_date_value = "{$tts_lang_due_date}{$due_date}"; } if (Security::is_action_allowed("change_activity", 0, $acl_write)) { $activity = select_option("{$activity_id}", fill_select("activity_id", "{$prefix}{$hlpdsk_prefix}_activities", "activity_id", "activity_name", " ")); $tts_lang_activity_value = "<br>{$activity} "; } else { $tts_lang_activity_value = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_activities", "activity_name", "where activity_id='{$activity_id}'")); } if (Security::is_action_allowed("change_status", 0, $acl_write)) { $t_status_sel = select_option("{$t_status}", fill_select("t_status", "{$prefix}{$hlpdsk_prefix}_status", "status_id", "status_name", " ")); $tts_lang_status_value = "<br>{$t_status_sel}"; } else { $status_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_status", "status_name", " where status_id='{$t_status}'")); $tts_lang_status_value = "{$status_name}"; } if (Security::is_action_allowed("change_priority", 0, $acl_write)) { $t_priorities = select_option("{$t_priority}", fill_select("t_priority", "{$prefix}{$hlpdsk_prefix}_priorities", "priority_id", "priority_name", " ")); $tts_lang_priority_value = "{$t_priorities}<br>"; } else { $t_priority_name = Security::htmlsecure(get_cross_value("{$prefix}{$hlpdsk_prefix}_priorities", "priority_name", " where priority_id={$t_priority}")); $tts_lang_priority_value = "{$t_priority_name}"; } if (Security::is_action_allowed("change_category", 0, $acl_write)) { $t_category = select_option("{$t_category}", fill_select("t_category", "{$prefix}{$hlpdsk_prefix}_categories", "category_id", "category_name", " ")); $tts_lang_category_value = "{$t_category}<br>"; } else { $tts_lang_category_value = "{$category_name}"; } if (Security::is_action_allowed("change_stage", 0, $acl_write)) { $t_stage = select_option("{$t_stage}", fill_select("t_stage", "{$prefix}{$hlpdsk_prefix}_stages", "stage_id", "stage_name", " ")); $tts_lang_stage_value = "<br>{$t_stage}<br>"; } else { $tts_lang_stage_value = Security::htmlsecure("{$stage_name}"); } $mailto_subject = "?subject=" . addslashes("Ticket Task {$Ticket_Number}: ") . addslashes($t_subject); $mailto_body = "&body=" . addslashes("Ticket/Task: {$Ticket_Number} / ") . addslashes($t_description); $mailto = $mailto_subject . $mailto_body; $tts_lang_mail_this = "<a href=\"mailto:{$mailto}\">Send email</a>"; $tts_lang_estimated_time = $_MONEY = ''; $tts_lang_mail_this = ""; $file = "themes/{$hlpdsk_theme}/showline_ticket.html"; $file = addslashes(implode("", file($file))); eval("\$content=stripslashes(\" {$file}\");"); echo $content; $row++; } }
if ($mode == 'avatar') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'avatar', 'S_AV_ALLOW_LOCAL' => yesno_option('allow_local', $MAIN_CFG['avatar']['allow_local']), 'S_AV_ALLOW_REMOTE' => yesno_option('allow_remote', $MAIN_CFG['avatar']['allow_remote']), 'S_AV_ALLOW_UPLOAD' => yesno_option('allow_upload', $MAIN_CFG['avatar']['allow_upload']), 'S_AV_ALLOW_ANIMATED' => yesno_option('animated', $MAIN_CFG['avatar']['animated']), 'S_AV_MAX_FILESIZE' => $MAIN_CFG['avatar']['filesize'], 'S_AV_MAX_HEIGHT' => $MAIN_CFG['avatar']['max_height'], 'S_AV_MAX_WIDTH' => $MAIN_CFG['avatar']['max_width'], 'S_AV_STORAGE_PATH' => $MAIN_CFG['avatar']['path'], 'S_AV_GALLERY_PATH' => $MAIN_CFG['avatar']['gallery_path'], 'S_AV_DEFAULT' => $MAIN_CFG['avatar']['default'])); } else { if ($mode == 'fields') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'fields')); $section = 0; $result = $db->sql_query("SELECT * FROM " . $user_prefix . "_users_fields ORDER BY section"); while ($row = $db->sql_fetchrow($result)) { $options = array(0 => _MA_HIDDEN, 1 => _MA_VISIBLE); if ($row['type'] != 1 && $row['type'] != 3) { $options[2] = _MA_REQUIRED; } $cpgtpl->assign_block_vars('section', array('S_SECTION' => $row['section'], 'S_PROFILE' => $row['section'] == 1 && !$section, 'S_ADDITIONAL' => $row['section'] == 2 && $section !== 2, 'S_PRIVATE' => $row['section'] == 3 && $section !== 3, 'S_PREFERENCES' => $row['section'] == 5 && $section !== 5, 'S_INFO' => defined($row['langdef']) ? constant($row['langdef']) : $row['langdef'], 'S_SELECT' => select_box($row['field'], $row['visible'], $options), 'U_DELFIELD' => URL::admin('users_cfg&delfield=' . $row['field']))); $section = (int) $row['section']; } $db->sql_freeresult($result); } else { if ($mode == 'addfield') { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'add_field')); } else { if ($mode == 'mlist') { //$db->sql_ufetchrow('SELECT * FROM '); } else { $cpgtpl->assign_vars(array('S_USERS_CFG_SAVE' => 'member', 'S_ADMIN_HELP' => 1 == $MAIN_CFG['global']['admin_help'], 'S_HEADLINES_TIP' => show_tooltip('my_headlines'), 'S_HEADLINES_CFG' => yesno_option('my_headlines', $MAIN_CFG['member']['my_headlines'], 3), 'S_USER_NEWS_TIP' => show_tooltip('user_news'), 'S_USER_NEWS_CFG' => yesno_option('user_news', $MAIN_CFG['member']['user_news']), 'S_THEME_TIP' => show_tooltip('allowusertheme'), 'S_THEME_CFG' => yesno_option('allowusertheme', $MAIN_CFG['member']['allowusertheme']), 'S_MAILCHANGE_TIP' => show_tooltip('allowmailchange'), 'S_MAILCHANGE_CFG' => yesno_option('allowmailchange', $MAIN_CFG['member']['allowmailchange']), 'S_MINPASS_TIP' => show_tooltip('minpass'), 'S_MINPASS_CFG' => select_option('minpass', $MAIN_CFG['member']['minpass'], array('3', '5', '8', '10')), 'S_USERREG_TIP' => show_tooltip('allowuserreg'), 'S_USERREG_CFG' => yesno_option('allowuserreg', $MAIN_CFG['member']['allowuserreg']), 'S_USER_ACTIVATE_TIP' => show_tooltip('useactivate'), 'S_USER_ACTIVATE_CFG' => yesno_option('useactivate', $MAIN_CFG['member']['useactivate']), 'S_REQUIRE_ADMIN_TIP' => show_tooltip('requireadmin'), 'S_REQUIRE_ADMIN_CFG' => yesno_option('requireadmin', $MAIN_CFG['member']['requireadmin']), 'S_SENDMAIL_TIP' => show_tooltip('sendaddmail'), 'S_SENDMAIL_CFG' => yesno_option('sendaddmail', $MAIN_CFG['member']['sendaddmail']), 'S_SHOW_REGMSG_TIP' => show_tooltip('show_registermsg'), 'S_SHOW_REGMSG_CFG' => yesno_option('show_registermsg', $MAIN_CFG['member']['show_registermsg']), 'S_REGMSG_CFG' => $MAIN_CFG['member']['registermsg'], 'S_WELCOME_PM_TIP' => show_tooltip('send_welcomepm'), 'S_WELCOME_PM_CFG' => yesno_option('send_welcomepm', $MAIN_CFG['member']['send_welcomepm']), 'S_WELCOME_MSG_BB' => bbcode_table('welcomepm_msg', 'config', 1), 'S_WELCOME_MSG_CFG' => $MAIN_CFG['member']['welcomepm_msg'])); } } } } $cpgtpl->set_handle('body', 'admin/users/index.html'); $cpgtpl->display('body'); CloseTable();
} ?> <tr> <td style="width: 10px;"><span class="trextend" title="单击预览,拖拽排序"><img src="/Public/Manage/css/img/dragsort_flag.png"></span></td> <td><input type="text" name="extends_title[]" class="form-control input-sm" value=""></td> <td><input type="text" name="extends_name[]" class="form-control input-sm" placeholder="限英文和下划线"></td> <td> <input type="text" name="extends_tip[]" class="form-control input-sm" value="<?php echo $one['tip']; ?> "> </td> <td> <select name="extends_type[]" class="span1 form-control input-sm extend_type"> <?php echo select_option($field_types); ?> </select> <input type="text" name="extends_option[]" class="form-control input-sm" value="<?php echo $one['options']; ?> " style="display:none" placeholder="用空格分隔下拉框各个选项"/> </td> </tr> </table> <div class="form-group form-actions"> <input type="hidden" name="id" value="<?php echo $extend['id']; ?> "> <div class="col-md-9 col-md-offset-1">
function edithome() { global $userinfo, $pagetitle, $MAIN_CFG, $Blocks; $block = array('bid' => 10000, 'view' => 1, 'side' => 'l', 'title' => _TB_BLOCK, 'content' => member_block()); $Blocks->custom($block); $block = NULL; $pagetitle .= ' ' . _BC_DELIM . ' ' . _MA_HOMECONFIG; require_once 'header.php'; require_once CORE_PATH . 'nbbcode.php'; $cpgtpl->assign_vars(array('U_SAVEHOME' => URL::index('&op=savehome'), 'S_USER_NEWS' => $MAIN_CFG['member']['user_news'] ? select_option('storynum', $userinfo['storynum'], array('4', '6', '8', '10', '12', '14', '16', '18', '20')) : false, 'S_STORY_NUM' => $MAIN_CFG['global']['storyhome'], 'S_UBLOCKON' => yesno_option('ublockon', $userinfo['ublockon']), 'S_CONT_SIZE' => sprintf(_M_CHARS, 255), 'S_BBCODETBL' => bbcode_table('ublock', 'edit_home', 1), 'S_UBLOCK' => $userinfo['ublock'])); $cpgtpl->set_filenames(array('body' => 'your_account/edit_home.html')); $cpgtpl->display('body'); }
<option value="0">-类型-</option><?php echo select_option($models, $smodel_id); ?> </select> </td> <td> <select class="form-control input-sm" name="sstatus"> <option value="0">-状态-</option><?php echo select_option($statuses, $sstatus); ?> </select> </td> <td> <select class="form-control input-sm" name="screate_user_id"> <option value="0">-编辑-</option><?php echo select_option($seditors, $screate_user_id); ?> </select> </td> <td> <div class="input-group"> <input class="form-control input-sm" name="stitle" value="<?php echo $stitle; ?> " placeholder="标题" /> <span class="input-group-btn"> <button class="btn btn-default btn-sm" type="submit">搜索</button> <a href="<?php echo U('Content/index'); ?> " class="btn btn-default btn-sm" title="重置"><i class="hi hi-repeat"></i></a>
/** * Simple form select options * @param $name * @param $list * @param $selected * @param $options * @return string */ function form_select($name, $list, $selected, $options) { $options['id'] = $name; if (!isset($options['name'])) { $options['name'] = $name; } $html = []; foreach ($list as $value => $display) { $html[] = select_option($display, $value, $selected); } // Once we have all of this HTML, we can join this into a single element after // formatting the attributes into an HTML "attributes" string, then we will // build out a final select statement, which will contain all the values. $options = select_attributes($options); $list = implode('', $html); return "<select{$options}>{$list}</select>"; }