本文整理汇总了PHP中nv_aleditor函数的典型用法代码示例。如果您正苦于以下问题:PHP nv_aleditor函数的具体用法?PHP nv_aleditor怎么用?PHP nv_aleditor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了nv_aleditor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nv_block_data_config_html
function nv_block_data_config_html($module, $data_block, $lang_block)
{
global $lang_module;
if (defined('NV_EDITOR')) {
require NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
}
$htmlcontent = htmlspecialchars(nv_editor_br2nl($data_block['htmlcontent']));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$html = nv_add_editor_js() . nv_aleditor("htmlcontent", '100%', '150px', $htmlcontent);
} else {
$html = "<textarea style=\"width: 100%\" name=\"htmlcontent\" id=\"htmlcontent\" cols=\"20\" rows=\"8\">" . $htmlcontent . "</textarea>";
}
return '<tr><td colspan="2">' . $lang_block['htmlcontent'] . '<br>' . $html . '</td></tr>';
}
示例2: VALUES
} else {
$stmt = $db->prepare("INSERT INTO " . NV_MOD_TABLE . "_config VALUES (\n\t\t\t\t'siteterms_" . NV_LANG_DATA . "', :content, " . NV_CURRENTTIME . ")");
}
$stmt->bindParam(':content', $content, PDO::PARAM_STR, strlen($content));
if ($stmt->execute()) {
$error = $lang_module['saveok'];
} else {
$error = $lang_module['errorsave'];
}
}
}
$content = htmlspecialchars(nv_editor_br2nl($content));
$xtpl = new XTemplate('siteterms.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('FORM_ACTION', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op);
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$data = nv_aleditor('content', '100%', '300px', $content);
} else {
$data = '<textarea style="width: 100%" name="content" id="content" cols="20" rows="8">' . $content . '</textarea>';
}
$xtpl->assign('DATA', $data);
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
示例3: foreach
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
}
if (!empty($array_cat_list)) {
if (empty($alias)) {
$xtpl->parse('main.content.getalias');
}
foreach ($cat_listsub as $data) {
$xtpl->assign('cat_listsub', $data);
$xtpl->parse('main.content.cat_listsub');
}
foreach ($groups_views as $data) {
$xtpl->assign('groups_views', $data);
$xtpl->parse('main.content.groups_views');
}
$descriptionhtml = nv_htmlspecialchars(nv_editor_br2nl($descriptionhtml));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$_uploads_dir = NV_UPLOADS_DIR . '/' . $module_upload;
$descriptionhtml = nv_aleditor('descriptionhtml', '100%', '200px', $descriptionhtml, 'Basic', $_uploads_dir, $_uploads_dir);
} else {
$descriptionhtml = "<textarea style=\"width: 100%\" name=\"descriptionhtml\" id=\"descriptionhtml\" cols=\"20\" rows=\"15\">" . $descriptionhtml . "</textarea>";
}
$xtpl->assign('DESCRIPTIONHTML', $descriptionhtml);
$xtpl->parse('main.content');
}
$xtpl->parse('main');
$contents .= $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
示例4: nv_editor_br2nl
if ($db->sql_affectedrows() > 0) {
$error = $lang_module['saveok'];
} else {
$error = $lang_module['errorsave'];
}
}
} else {
$content = nv_editor_br2nl($row['content']);
}
if (!empty($content)) {
$content = nv_htmlspecialchars($content);
}
$xtpl = new XTemplate("siteterms.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('FORM_ACTION', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op);
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$data = nv_aleditor("content", '100%', '300px', $content);
} else {
$data = "<textarea style=\"width: 100%\" name=\"content\" id=\"content\" cols=\"20\" rows=\"8\">" . $content . "</textarea>";
}
$xtpl->assign('DATA', $data);
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . "/includes/header.php";
echo nv_admin_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";
示例5: date
$mess_content .= "<br /><br />----------<br />Best regards,<br /><br />" . $admin_name . "<br />";
if (!empty($admin_info['position'])) {
$mess_content .= $admin_info['position'] . "<br />";
}
$mess_content .= "<br />";
$mess_content .= "E-mail: " . $admin_info['email'] . "<br />";
$mess_content .= "Website: " . $global_config['site_name'] . "<br />" . $global_config['site_url'] . "<br /><br />";
$mess_content .= "--------------------------------------------------------------------------------<br />";
$mess_content .= "<strong>From:</strong> " . $row['sender_name'] . " [mailto:" . $row['sender_email'] . "]<br />";
$mess_content .= "<strong>Sent:</strong> " . date("r", $row['send_time']) . "<br />";
$mess_content .= "<strong>To:</strong> " . $contact_allowed['view'][$row['cid']] . "<br />";
$mess_content .= "<strong>Subject:</strong> " . $row['title'] . "<br /><br />";
$mess_content .= $row['content'];
}
$mess_content = nv_htmlspecialchars($mess_content);
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$mess_content = nv_aleditor("mess_content", '100%', '300px', $mess_content);
} else {
$mess_content = "<textarea style=\"width:99%\" name=\"mess_content\" id=\"mess_content\" cols=\"20\" rows=\"8\">" . $mess_content . "</textarea>";
}
$xtpl->assign('FORM_ACTION', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "&id=" . $id);
$xtpl->assign('MESS_CONTENT', $mess_content);
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . "/includes/header.php";
echo nv_admin_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";
示例6: array
$xtpl->assign('CONFIG_SOURCE', array('key' => $key, 'title' => $val, 'selected' => $key == $module_config[$module_name]['config_source'] ? ' selected="selected"' : ''));
$xtpl->parse('main.config_source');
}
$array_imgposition = array(0 => $lang_module['imgposition_0'], 1 => $lang_module['imgposition_1'], 2 => $lang_module['imgposition_2']);
// position images
while (list($id_imgposition, $title_imgposition) = each($array_imgposition)) {
$sl = $id_imgposition == $module_config[$module_name]['imgposition'] ? ' selected="selected"' : '';
$xtpl->assign('id_imgposition', $id_imgposition);
$xtpl->assign('title_imgposition', $title_imgposition);
$xtpl->assign('posl', $sl);
$xtpl->parse('main.looppos');
}
$copyright = nv_htmlspecialchars(nv_editor_br2nl($module_config[$module_name]['copyright']));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$_uploads_dir = NV_UPLOADS_DIR . '/' . $module_upload;
$copyright = nv_aleditor('copyright', '100%', '100px', $copyright, 'Basic', $_uploads_dir, $_uploads_dir);
} else {
$copyright = "<textarea style=\"width: 100%\" name=\"copyright\" id=\"copyright\" cols=\"20\" rows=\"15\">" . $copyright . "</textarea>";
}
$xtpl->assign('COPYRIGHTHTML', $copyright);
$xtpl->assign('PATH', defined('NV_IS_SPADMIN') ? "" : NV_UPLOADS_DIR . '/' . $module_upload);
$xtpl->assign('CURRENTPATH', defined('NV_IS_SPADMIN') ? "images" : NV_UPLOADS_DIR . '/' . $module_upload);
if (defined('NV_IS_ADMIN_FULL_MODULE') or !in_array('admins', $allow_func)) {
$groups_list = nv_groups_list();
unset($groups_list[6]);
$savepost = $nv_Request->get_int('savepost', 'post', 0);
if (!empty($savepost)) {
$array_config = array();
$array_group_id = $nv_Request->get_typed_array('array_group_id', 'post');
$array_addcontent = $nv_Request->get_typed_array('array_addcontent', 'post');
$array_postcontent = $nv_Request->get_typed_array('array_postcontent', 'post');
示例7: nv_htmlspecialchars
}
}
}
}
if (!empty($note)) {
$note = nv_htmlspecialchars($note);
}
if (empty($row['alias'])) {
$xtpl->parse('main.get_alias');
}
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$note = nv_aleditor('note', '100%', '150px', $note);
} else {
$note = '<textarea style="width:100%;height:150px" name="note" id="note">' . $note . '</textarea>';
}
$xtpl->assign('DATA', array('full_name' => $full_name, 'alias' => $alias, 'phone' => $phone, 'fax' => $fax, 'email' => $email, 'yahoo' => $yahoo, 'skype' => $skype, 'note' => $note));
//list danh sách bộ phận liên hệ
$a = 0;
foreach ($adms as $admid => $values) {
$xtpl->assign('ADMIN', array('login' => $values['login'], 'first_name' => $values['first_name'], 'last_name' => $values['last_name'], 'email' => $values['email'], 'admid' => $admid, 'view_level' => ($values['level'] === 1 or !empty($view_level) and in_array($admid, $view_level)) ? ' checked="checked"' : '', 'reply_level' => ($values['level'] === 1 or !empty($reply_level) and in_array($admid, $reply_level)) ? ' checked="checked"' : '', 'obt_level' => (!empty($obt_level) and in_array($admid, $obt_level)) ? ' checked="checked"' : '', 'disabled' => $values['level'] === 1 ? ' disabled="disabled"' : ''));
$xtpl->parse('main.admin');
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
示例8: IN
$xtpl->assign('SELECTED', $global_config['mobile_theme'] == $folder ? ' selected="selected"' : '');
$xtpl->assign('SITE_THEME', $folder);
$xtpl->parse('main.mobile_theme.loop');
}
$xtpl->parse('main.mobile_theme');
}
$sql = "SELECT title, custom_title FROM " . NV_MODULES_TABLE . " WHERE act=1 AND title NOT IN ('menu', 'comment') ORDER BY weight ASC";
$mods = $db->query($sql);
foreach ($mods as $mod) {
$xtpl->assign('SELECTED', $global_config['site_home_module'] == $mod['title'] ? ' selected="selected"' : '');
$xtpl->assign('MODULE', $mod);
$xtpl->parse('main.module');
}
$global_config['disable_site_content'] = htmlspecialchars(nv_editor_br2nl($global_config['disable_site_content']));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$disable_site_content = nv_aleditor('disable_site_content', '100%', '100px', $global_config['disable_site_content']);
} else {
$disable_site_content = "<textarea style=\"width:100%;height:100px\" name=\"disable_site_content\" id=\"disable_site_content\">" . $global_config['disable_site_content'] . "</textarea>";
}
$xtpl->assign('DISABLE_SITE_CONTENT', $disable_site_content);
$xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('SHOW_SSL_MODULES', intval($show_ssl_modules));
if (!$show_ssl_modules) {
$xtpl->parse('main.ssl_https_modules_hide');
}
foreach ($site_mods as $_mod_title => $_mod_values) {
$xtpl->assign('MOD_TITLE', $_mod_title);
$xtpl->assign('MOD_CHECKED', in_array($_mod_title, $global_config['ssl_https_modules']) ? ' checked="checked"' : '');
$xtpl->parse('main.ssl_https_modules');
}
示例9: str_pad
$select .= "<option value=\"" . $i . "\"" . ($i == $emin ? ' selected="selected"' : '') . ">" . str_pad($i, 2, "0", STR_PAD_LEFT) . "</option>\n";
}
$xtpl->assign('emin', $select);
// allowed comm
$allowed_comm = explode(',', $rowcontent['allowed_comm']);
foreach ($groups_list as $_group_id => $_title) {
$xtpl->assign('ALLOWED_COMM', array('value' => $_group_id, 'checked' => in_array($_group_id, $allowed_comm) ? ' checked="checked"' : '', 'title' => $_title));
$xtpl->parse('main.allowed_comm');
}
if ($module_config[$module_name]['allowed_comm'] != '-1') {
$xtpl->parse('main.content_note_comm');
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$edits = nv_aleditor('bodyhtml', '100%', '400px', $rowcontent['bodyhtml'], '', $uploads_dir_user, $currentpath);
$edit_rule = nv_aleditor('rule', '100%', '400px', $rowcontent['rule'], '', $uploads_dir_user, $currentpath);
$edit_content = nv_aleditor('content', '100%', '400px', $rowcontent['content'], '', $uploads_dir_user, $currentpath);
} else {
$edits = "<textarea style=\"width: 100%\" name=\"bodyhtml\" id=\"bodyhtml\" cols=\"20\" rows=\"15\">" . $rowcontent['bodyhtml'] . "</textarea>";
$edit_rule = "<textarea style=\"width: 100%\" name=\"rule\" id=\"rule\" cols=\"20\" rows=\"15\">" . $rowcontent['rule'] . "</textarea>";
$edit_content = "<textarea style=\"width: 100%\" name=\"content\" id=\"content\" cols=\"20\" rows=\"15\">" . $rowcontent['content'] . "</textarea>";
}
$shtm = '';
if (!empty($rowcontent['keywords'])) {
$keywords_array = explode(',', $rowcontent['keywords']);
foreach ($keywords_array as $keywords) {
$xtpl->assign('KEYWORDS', $keywords);
$xtpl->parse('main.keywords');
}
}
$archive_checked = $rowcontent['archive'] ? ' checked="checked"' : '';
$xtpl->assign('archive_checked', $archive_checked);
示例10: nv_theme_nvform_main
/**
* nv_theme_nvform_main()
*
* @param mixed $form_info
* @param mixed $question
* @return
*/
function nv_theme_nvform_main($form_info, $question_info, $answer_info, $info)
{
global $global_config, $module_name, $module_file, $lang_module, $module_config, $module_info, $op, $my_head;
$my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/jquery/jquery.validate.min.js\"></script>\n";
$my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/language/jquery.validator-" . NV_LANG_INTERFACE . ".js\"></script>\n";
$my_head .= "<script type=\"text/javascript\">\n";
$my_head .= "\$(document).ready(function(){\n\t\t\t\t\t\$('#question').validate({\n\t\t\t\t\t});\n\t\t\t\t });";
$my_head .= " </script>\n";
if (!empty($form_info['end_time'])) {
$form_info['close_info'] = sprintf($lang_module['form_close_info'], date('d/m/Y H:i'));
}
$xtpl = new XTemplate($op . '.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('FORM', $form_info);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
if ($form_info['question_display'] == 'question_display_left') {
$xtpl->assign('FORM_LEFT', 'class="form-horizontal"');
}
foreach ($question_info as $row) {
$row['value'] = isset($answer_info[$row['qid']]) ? $answer_info[$row['qid']] : '';
$row['required'] = $row['required'] ? 'required' : '';
$xtpl->assign('QUESTION', $row);
if ($row['required']) {
$xtpl->parse('main.loop.required');
}
if ($row['question_type'] == 'textbox' or $row['question_type'] == 'number') {
if ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) {
$row['readonly'] = 'readonly="readonly"';
}
$xtpl->assign('QUESTION', $row);
$xtpl->parse('main.loop.textbox');
} elseif ($row['question_type'] == 'date') {
$row['value'] = empty($row['value']) ? '' : date('d/m/Y', $row['value']);
$row['datepicker'] = ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) ? '' : 'datepicker';
$xtpl->assign('QUESTION', $row);
$xtpl->parse('main.loop.date');
} elseif ($row['question_type'] == 'textarea') {
if ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) {
$row['readonly'] = 'readonly';
}
$row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
$xtpl->assign('QUESTION', $row);
$xtpl->parse('main.loop.textarea');
} elseif ($row['question_type'] == 'editor') {
if (defined('NV_EDITOR')) {
require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
} elseif (!nv_function_exists('nv_aleditor') and file_exists(NV_ROOTDIR . '/' . NV_EDITORSDIR . '/ckeditor/ckeditor_php5.php')) {
define('NV_EDITOR', true);
define('NV_IS_CKEDITOR', true);
require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/ckeditor/ckeditor_php5.php';
function nv_aleditor($textareaname, $width = '100%', $height = '450px', $val = '')
{
// Create class instance.
$editortoolbar = array(array('Link', 'Unlink', 'Image', 'Table', 'Font', 'FontSize', 'RemoveFormat'), array('Bold', 'Italic', 'Underline', 'StrikeThrough', '-', 'Subscript', 'Superscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', 'TextColor', 'BGColor', 'Source'));
$CKEditor = new CKEditor();
// Do not print the code directly to the browser, return it instead
$CKEditor->returnOutput = true;
$CKEditor->config['skin'] = 'kama';
$CKEditor->config['entities'] = false;
// $CKEditor->config['enterMode'] = 2;
$CKEditor->config['language'] = NV_LANG_INTERFACE;
$CKEditor->config['toolbar'] = $editortoolbar;
// Path to CKEditor directory, ideally instead of relative dir, use an
// absolute path:
// $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = NV_BASE_SITEURL . NV_EDITORSDIR . '/ckeditor/';
// Set global configuration (will be used by all instances of CKEditor).
if (!empty($width)) {
$CKEditor->config['width'] = strpos($width, '%') ? $width : intval($width);
}
if (!empty($height)) {
$CKEditor->config['height'] = strpos($height, '%') ? $height : intval($height);
}
// Change default textarea attributes
$CKEditor->textareaAttributes = array('cols' => 80, 'rows' => 10);
$val = nv_unhtmlspecialchars($val);
return $CKEditor->editor($textareaname, $val);
}
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$row['value'] = nv_htmlspecialchars(nv_editor_br2nl($row['value']));
$edits = nv_aleditor('question[' . $row['qid'] . ']', '100%', '350px', $row['value']);
$xtpl->assign('EDITOR', $edits);
$xtpl->parse('main.loop.editor');
} else {
$row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
$row['class'] = '';
$xtpl->assign('QUESTION', $row);
$xtpl->parse('main.loop.textarea');
}
} elseif ($row['question_type'] == 'select') {
$row['question_choices'] = unserialize($row['question_choices']);
//.........这里部分代码省略.........
示例11: manager_theme
function manager_theme($news_contents, $list_users, $array_keyword, $content_comment)
{
global $global_config, $module_name, $module_file, $lang_module, $my_head, $module_info, $op, $global_array_fam, $global_array_location_city, $global_array_location_district, $global_array_location_ward;
$xtpl = new XTemplate("manager-genealogy.tpl", NV_ROOTDIR . "/themes/" . $module_info['template'] . "/modules/" . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('NV_ACTION_FILE', nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/Manager' . $global_config['rewrite_exturl'], true));
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('TEMPLATE', $module_info['template']);
$xtpl->assign('OP', $op);
foreach ($global_array_fam as $global_array_fam_i) {
$global_array_fam_i['selected'] = $global_array_fam_i['fid'] == $news_contents['fid'] ? ' selected="selected"' : '';
$xtpl->assign('FAMILY', $global_array_fam_i);
$xtpl->parse('main.family');
}
foreach ($global_array_location_city as $global_array_city_i) {
$global_array_city_i['selected'] = $global_array_city_i['city_id'] == $news_contents['cityid'] ? ' selected="selected"' : '';
$xtpl->assign('CITY', $global_array_city_i);
$xtpl->parse('main.city');
}
foreach ($global_array_location_district as $global_array_district_i) {
$global_array_district_i['selected'] = $global_array_district_i['district_id'] == $news_contents['districtid'] ? ' selected="selected"' : '';
$xtpl->assign('DISTRICT', $global_array_district_i);
$xtpl->parse('main.district');
}
foreach ($global_array_location_ward as $global_array_ward_i) {
$global_array_ward_i['selected'] = $global_array_ward_i['ward_id'] == $news_contents['wardid'] ? ' selected="selected"' : '';
$xtpl->assign('WARD', $global_array_ward_i);
$xtpl->parse('main.ward');
}
/*
$post['status_checked'] = ($post['status']) ? ' checked="checked"' : '';
*/
$array_who_view = array(0 => $lang_module['who_view0'], 1 => $lang_module['who_view1'], 2 => $lang_module['who_view2']);
foreach ($array_who_view as $key => $value) {
$row = array('id' => $key, 'title' => $value, 'selected' => '');
$xtpl->assign('WHO_VIEW', $row);
$xtpl->parse('main.who_view');
}
if (nv_function_exists('nv_aleditor')) {
$news_contents['bodytext'] = nv_aleditor('bodytext', '100%', '200px', $news_contents['bodytext']);
$news_contents['rule'] = nv_aleditor('rule', '100%', '200px', $news_contents['rule']);
$news_contents['content'] = nv_aleditor('content', '100%', '200px', $news_contents['content']);
} else {
$news_contents['bodytext'] = "<textarea style=\"width: 100%\" name=\"bodytext\" cols=\"20\" rows=\"15\">" . $news_contents['bodytext'] . "</textarea>";
$news_contents['rule'] = "<textarea style=\"width: 100%\" name=\"rule\" cols=\"20\" rows=\"15\">" . $news_contents['rulet'] . "</textarea>";
$news_contents['content'] = "<textarea style=\"width: 100%\" name=\"content\" cols=\"20\" rows=\"15\">" . $news_contents['content'] . "</textarea>";
}
$xtpl->assign('DATA', $news_contents);
if (!empty($list_users)) {
$xtpl->assign('DATATREE', nv_manager_viewdirtree_genealogy(0, 'manager-genealogy'));
$xtpl->parse('main.foldertree');
if (defined('NV_IS_GENEALOGY_MANAGER')) {
$xtpl->parse('main.contextMenu');
}
} else {
if (defined('NV_IS_GENEALOGY_MANAGER')) {
$xtpl->parse('main.create_users');
} else {
$xtpl->parse('main.no_list');
}
}
$xtpl->parse('main');
return $xtpl->text('main');
}
示例12: nv_aleditor
$contents .= "<form action=\"" . $action . "\" method=\"post\">\n";
$contents .= "<input name=\"save\" type=\"hidden\" value=\"1\" />\n";
$contents .= "<table summary=\"\" style=\"margin-top:8px;margin-bottom:8px;\">\n";
$contents .= "<col valign=\"top\" width=\"150px\" />\n";
$contents .= "<tr>\n";
$contents .= "<td>" . $lang_module['aabout2'] . ":</td>\n";
$contents .= "<td><input style=\"width:400px\" name=\"title\" id=\"title\" type=\"text\" value=\"" . $title . "\" maxlength=\"255\" /></td>\n";
$contents .= "</tr>\n";
$contents .= "<tr>\n";
$contents .= "<td>" . $lang_module['alias'] . ":</td>\n";
$contents .= "<td><input style=\"width:400px\" name=\"alias\" id=\"alias\" type=\"text\" value=\"" . $alias . "\" maxlength=\"255\" /></td>\n";
$contents .= "</tr>\n";
$contents .= "<tr>\n";
$contents .= "<td colspan=\"2\">" . $lang_module['aabout11'] . ":</td>\n";
$contents .= "</tr>\n";
$contents .= "<tr>\n";
$contents .= "<td colspan=\"2\">\n";
if (defined('NV_EDITOR') and function_exists('nv_aleditor')) {
$contents .= nv_aleditor("bodytext", '750px', '300px', $bodytext);
} else {
$contents .= "<textarea style=\"width:750px;height:300px\" name=\"bodytext\" id=\"bodytext\">" . $bodytext . "</textarea>";
}
$contents .= "</td>\n";
$contents .= "</tr>\n";
$contents .= "</table>\n";
$contents .= "<br>\n";
$contents .= "<div style=\"text-align:center\"><input name=\"submit1\" type=\"submit\" value=\"" . $lang_module['save'] . "\" /></div>\n";
$contents .= "</form>\n";
include NV_ROOTDIR . "/includes/header.php";
echo nv_admin_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";
示例13: array
$xtpl->assign('MODULE_UPLOAD', $module_upload);
$xtpl->assign('MODULE_FILE', $module_file);
$xtpl->assign('OP', $op);
$xtpl->assign('ROW', $row);
$array_cat[0] = array('id' => 0, 'title' => $lang_module['cat_none']);
if (!empty($array_cat)) {
$i = 0;
foreach ($array_cat as $cat) {
$cat['checked'] = ($i == 0 or $row['catid'] == $cat['id']) ? 'checked="checked"' : '';
$xtpl->assign('CAT', $cat);
$xtpl->parse('main.cat');
$i++;
}
}
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$editor = nv_aleditor('descriptionhtml', '100%', '250px', $row['descriptionhtml']);
} else {
$editor = "<textarea style=\"width: 100%\" name=\"descriptionhtml\" id=\"descriptionhtml\" cols=\"20\" rows=\"15\">" . $row['descriptionhtml'] . "</textarea>";
}
$xtpl->assign('EDITOR', $editor);
if (!empty($error)) {
$xtpl->assign('ERROR', implode('<br />', $error));
$xtpl->parse('main.error');
}
if (empty($row['id'])) {
$xtpl->parse('main.auto_get_alias');
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
$page_title = $lang_module['content'];
include NV_ROOTDIR . '/includes/header.php';
示例14: nv_block_login
//.........这里部分代码省略.........
$array_field_config[] = $row_field;
}
if (!empty($array_field_config)) {
$userid = 0;
foreach ($array_field_config as $_k => $row) {
$row['customID'] = $_k;
if ($row['show_register'] and $userid == 0 or $userid > 0) {
if ($userid == 0 and empty($custom_fields)) {
if (!empty($row['field_choices'])) {
if ($row['field_type'] == 'date') {
$row['value'] = $row['field_choices']['current_date'] ? NV_CURRENTTIME : $row['default_value'];
} elseif ($row['field_type'] == 'number') {
$row['value'] = $row['default_value'];
} else {
$temp = array_keys($row['field_choices']);
$tempkey = intval($row['default_value']) - 1;
$row['value'] = isset($temp[$tempkey]) ? $temp[$tempkey] : '';
}
} else {
$row['value'] = $row['default_value'];
}
} else {
$row['value'] = isset($custom_fields[$row['field']]) ? $custom_fields[$row['field']] : $row['default_value'];
}
$row['required'] = $row['required'] ? 'required' : '';
$xtpl->assign('FIELD', $row);
if ($row['required']) {
$xtpl->parse('main.allowuserreg.field.loop.required');
}
if ($row['field_type'] == 'textbox' or $row['field_type'] == 'number') {
$xtpl->parse('main.allowuserreg.field.loop.textbox');
} elseif ($row['field_type'] == 'date') {
$row['value'] = empty($row['value']) ? '' : date('d/m/Y', $row['value']);
$xtpl->assign('FIELD', $row);
$xtpl->parse('main.allowuserreg.field.loop.date');
$datepicker = true;
} elseif ($row['field_type'] == 'textarea') {
$row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
$xtpl->assign('FIELD', $row);
$xtpl->parse('main.allowuserreg.field.loop.textarea');
} elseif ($row['field_type'] == 'editor') {
$row['value'] = htmlspecialchars(nv_editor_br2nl($row['value']));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
$array_tmp = explode('@', $row['class']);
$edits = nv_aleditor('custom_fields[' . $row['field'] . ']', $array_tmp[0], $array_tmp[1], $row['value']);
$xtpl->assign('EDITOR', $edits);
$xtpl->parse('main.allowuserreg.field.loop.editor');
} else {
$row['class'] = '';
$xtpl->assign('FIELD', $row);
$xtpl->parse('main.allowuserreg.field.loop.textarea');
}
} elseif ($row['field_type'] == 'select') {
foreach ($row['field_choices'] as $key => $value) {
$xtpl->assign('FIELD_CHOICES', array('key' => $key, 'selected' => $key == $row['value'] ? ' selected="selected"' : '', 'value' => $value));
$xtpl->parse('main.allowuserreg.field.loop.select.loop');
}
$xtpl->parse('main.allowuserreg.field.loop.select');
} elseif ($row['field_type'] == 'radio') {
$number = 0;
foreach ($row['field_choices'] as $key => $value) {
$xtpl->assign('FIELD_CHOICES', array('id' => $row['fid'] . '_' . $number++, 'key' => $key, 'checked' => $key == $row['value'] ? ' checked="checked"' : '', 'value' => $value));
$xtpl->parse('main.allowuserreg.field.loop.radio.loop');
}
$xtpl->parse('main.allowuserreg.field.loop.radio');
} elseif ($row['field_type'] == 'checkbox') {
$number = 0;
$valuecheckbox = !empty($row['value']) ? explode(',', $row['value']) : array();
foreach ($row['field_choices'] as $key => $value) {
$xtpl->assign('FIELD_CHOICES', array('id' => $row['fid'] . '_' . $number++, 'key' => $key, 'checked' => in_array($key, $valuecheckbox) ? ' checked="checked"' : '', 'value' => $value));
$xtpl->parse('main.allowuserreg.field.loop.checkbox.loop');
}
$xtpl->parse('main.allowuserreg.field.loop.checkbox');
} elseif ($row['field_type'] == 'multiselect') {
$valueselect = !empty($row['value']) ? explode(',', $row['value']) : array();
foreach ($row['field_choices'] as $key => $value) {
$xtpl->assign('FIELD_CHOICES', array('key' => $key, 'selected' => in_array($key, $valueselect) ? ' selected="selected"' : '', 'value' => $value));
$xtpl->parse('main.allowuserreg.field.loop.multiselect.loop');
}
$xtpl->parse('main.allowuserreg.field.loop.multiselect');
}
$xtpl->parse('main.allowuserreg.field.loop');
}
}
$xtpl->parse('main.allowuserreg.field');
}
$xtpl->parse('main.allowuserreg');
!empty($block_config['display_mode']) ? $xtpl->parse('main.' . $display_layout . '.allowuserreg2') : $xtpl->parse('main.' . $display_layout . '.allowuserreg2_form');
if ($datepicker) {
$xtpl->parse('main.datepicker');
}
}
}
$xtpl->parse('main.' . $display_layout);
$xtpl->parse('main');
$content = $xtpl->text('main');
}
}
return $content;
}
示例15: nv_editor_br2nl
if ($db->sql_affectedrows() > 0) {
$error = $lang_module['saveok'];
} else {
$error = $lang_module['errorsave'];
}
}
} else {
$content = nv_editor_br2nl($row['content']);
}
if (!empty($content)) {
$content = nv_htmlspecialchars($content);
}
$contents = "";
if (!empty($error)) {
$contents .= "<div class=\"quote\" style=\"width:780px;\">\n";
$contents .= "<blockquote class=\"error\"><span>" . $error . "</span></blockquote>\n";
$contents .= "</div>\n";
$contents .= "<div class=\"clear\"></div>\n";
}
$contents .= "<form action=\"" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "\" method=\"post\">";
$contents .= "<input type=\"hidden\" name =\"save\"value=\"1\" />";
if (defined('NV_EDITOR') and function_exists('nv_aleditor')) {
$contents .= nv_aleditor("content", '780px', '300px', $content);
} else {
$contents .= "<textarea style=\"width: 780px\" name=\"content\" id=\"content\" cols=\"20\" rows=\"8\">" . $content . "</textarea>";
}
$contents .= "<div style=\"text-align:center;padding-top:15px\"><input name=\"submit1\" type=\"submit\" value=\"" . $lang_global['save'] . "\" /></div>\n";
$contents .= "</form>\n";
include NV_ROOTDIR . "/includes/header.php";
echo nv_admin_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";