• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP nv_br2nl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中nv_br2nl函数的典型用法代码示例。如果您正苦于以下问题:PHP nv_br2nl函数的具体用法?PHP nv_br2nl怎么用?PHP nv_br2nl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了nv_br2nl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: BoldKeywordInStr

/**
 * BoldKeywordInStr()
 * 
 * @param mixed $str
 * @param mixed $keyword
 * @return
 */
function BoldKeywordInStr($str, $keyword, $logic)
{
    global $db;
    $str = nv_br2nl($str);
    $str = nv_nl2br($str, " ");
    $str = nv_unhtmlspecialchars(strip_tags(trim($str)));
    $str = $db->unfixdb($str);
    $pos = false;
    if ($logic == 'AND') {
        $array_keyword = array($keyword, nv_EncString($keyword));
    } else {
        $keyword .= " " . nv_EncString($keyword);
        $array_keyword = explode(" ", $keyword);
        $array_keyword = array_unique($array_keyword);
    }
    foreach ($array_keyword as $k) {
        unset($matches);
        if (preg_match("/^(.*?)" . preg_quote($k) . "/uis", $str, $matches)) {
            $strlen = nv_strlen($str);
            $kstrlen = nv_strlen($k);
            $residual = $strlen - 300;
            if ($residual > 0) {
                $lstrlen = nv_strlen($matches[1]);
                $rstrlen = $strlen - $lstrlen - $kstrlen;
                $medium = round((300 - $kstrlen) / 2);
                if ($lstrlen <= $medium) {
                    $str = nv_clean60($str, 300);
                } elseif ($rstrlen <= $medium) {
                    $str = nv_substr($str, $residual, 300);
                    $str = nv_substr_clean($str, 'l');
                } else {
                    $str = nv_substr($str, $lstrlen - $medium, $strlen - $lstrlen + $medium);
                    $str = nv_substr($str, 0, 300);
                    $str = nv_substr_clean($str, 'lr');
                }
            }
            $pos = true;
            break;
        }
    }
    if (!$pos) {
        return nv_clean60($str, 300);
    }
    $pattern = array();
    foreach ($array_keyword as $k) {
        $pattern[] = "/(" . preg_quote($k) . ")/uis";
    }
    $str = preg_replace($pattern, "{\\1}", $str);
    $str = str_replace(array("{", "}"), array("<span class=\"keyword\">", "</span>"), $str);
    return $str;
}
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:58,代码来源:functions.php


示例2: 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 = defined('NV_EDITOR') ? nv_editor_br2nl($data_block['htmlcontent']) : nv_br2nl($data_block['htmlcontent']);
     $htmlcontent = nv_htmlspecialchars($htmlcontent);
     if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
         $html = 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>';
 }
开发者ID:atarubi,项目名称:nuke-viet,代码行数:15,代码来源:global.html.php


示例3: BoldKeywordInStr

/**
 * BoldKeywordInStr()
 *
 * @param mixed $str
 * @param mixed $keyword
 * @return
 */
function BoldKeywordInStr($str, $keyword, $logic)
{
    $str = nv_br2nl($str);
    $str = nv_nl2br($str, ' ');
    $str = nv_unhtmlspecialchars(strip_tags(trim($str)));
    $pos = false;
    if ($logic == 'AND') {
        $array_keyword = array($keyword, nv_EncString($keyword));
    } else {
        $keyword .= ' ' . nv_EncString($keyword);
        $array_keyword = explode(' ', $keyword);
        $array_keyword = array_unique($array_keyword);
    }
    foreach ($array_keyword as $k) {
        if (preg_match('/^(.*?)' . nv_preg_quote($k) . '/uis', $str, $matches)) {
            $strlen = nv_strlen($str);
            $kstrlen = nv_strlen($k);
            $residual = $strlen - 300;
            if ($residual > 0) {
                $lstrlen = nv_strlen($matches[1]);
                $rstrlen = $strlen - $lstrlen - $kstrlen;
                $medium = round((300 - $kstrlen) / 2);
                if ($lstrlen <= $medium) {
                    $str = nv_clean60($str, 300);
                } elseif ($rstrlen <= $medium) {
                    $str = nv_substr($str, $residual, 300);
                    $str = nv_substr_clean($str, 'l');
                } else {
                    $str = nv_substr($str, $lstrlen - $medium, $strlen - $lstrlen + $medium);
                    $str = nv_substr($str, 0, 300);
                    $str = nv_substr_clean($str, 'lr');
                }
            }
            $pos = true;
            break;
        }
    }
    if (!$pos) {
        return nv_clean60($str, 300);
    }
    $pattern = array();
    foreach ($array_keyword as $k) {
        $pattern[] = '/(' . nv_preg_quote($k) . ')/uis';
    }
    $str = preg_replace($pattern, '{\\1}', $str);
    $str = str_replace(array('{', '}'), array('<span class="keyword">', '</span>'), $str);
    return $str;
}
开发者ID:lzhao18,项目名称:nukeviet,代码行数:55,代码来源:functions.php


示例4: elseif

    $rowcat['id'] = $id;
    $rowcat['url'] = $url;
    $rowcat['title'] = $title;
    $rowcat['urlimg'] = $image;
    $rowcat['description'] = $description;
} elseif ($id > 0) {
    $query = $db->sql_query("SELECT * FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `id`=" . $id . "");
    $rowcat = $db->sql_fetchrow($query);
    if ($rowcat['id'] > 0) {
        $page_title = $lang_module['weblink_edit_link'];
    }
}
if (empty($rowcat['id'])) {
    $page_title = $lang_module['weblink_add_link'];
}
$rowcat['description'] = defined('NV_EDITOR') ? nv_editor_br2nl($rowcat['description']) : nv_br2nl($rowcat['description']);
// dung de lay data tu CSDL
$rowcat['description'] = nv_htmlspecialchars($rowcat['description']);
// dung de dua vao editor
if (!empty($rowcat['urlimg']) and !nv_is_url($rowcat['urlimg'])) {
    $rowcat['urlimg'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . "/" . $rowcat['urlimg'];
}
if (defined('NV_EDITOR')) {
    require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
}
$contents = "";
if ($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";
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:content.php


示例5: nv_del_moduleCache

             $array['admin_id'] = $admin_info['admin_id'];
         }
         $sql = "UPDATE `" . NV_PREFIXLANG . "_" . $module_data . "_comments` SET \n            `subject`=" . $db->dbescape($array['subject']) . ", \n            `comment`=" . $db->dbescape($array['comment']) . ", \n            `admin_reply`=" . $db->dbescape($array['admin_reply']) . ", \n            `admin_id`=" . $array['admin_id'] . " \n            WHERE `id`=" . $id;
         $result = $db->sql_query($sql);
         if (!$result) {
             $is_error = true;
             $error = $lang_module['file_error1'];
         } else {
             nv_del_moduleCache($module_name);
             Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=comment&status=" . $row['status']);
             exit;
         }
     }
 } else {
     $array['subject'] = $row['subject'];
     $array['comment'] = nv_br2nl($row['comment']);
     $array['admin_reply'] = $row['admin_reply'];
     $array['admin_id'] = (int) $row['admin_id'];
 }
 if (!empty($array['comment'])) {
     $array['comment'] = nv_htmlspecialchars($array['comment']);
 }
 $xtpl = new XTemplate("comment_edit.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file);
 $xtpl->assign('FORM_ACTION', NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=" . $op . "&amp;edit=1&amp;id=" . $id);
 $xtpl->assign('LANG', $lang_module);
 $xtpl->assign('DATA', $array);
 if ($is_error) {
     $xtpl->assign('ERROR', $error);
     $xtpl->parse('main.error');
 }
 $xtpl->parse('main');
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:comment.php


示例6: nv_fix_banner_weight

        $stmt->bindParam(':title', $title, PDO::PARAM_STR);
        $stmt->bindParam(':description', $description, PDO::PARAM_STR);
        $stmt->bindParam(':form', $form, PDO::PARAM_STR);
        $stmt->execute();
        if ($form_old != $form or $blang_old != $blang) {
            nv_fix_banner_weight($id);
        }
        nv_insert_logs(NV_LANG_DATA, $module_name, 'log_edit_plan', 'planid ' . $id, $admin_info['userid']);
        nv_CreateXML_bannerPlan();
        Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=info_plan&id=' . $id);
        die;
    }
} else {
    $blang = $row['blang'];
    $title = $row['title'];
    $description = nv_br2nl($row['description']);
    $form = $row['form'];
    $width = $row['width'];
    $height = $row['height'];
}
if (!empty($description)) {
    $description = nv_htmlspecialchars($description);
}
if (empty($form)) {
    $form = 'sequential';
}
if (empty($width)) {
    $width = 50;
}
if (empty($height)) {
    $height = 50;
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:edit_plan.php


示例7: user_info

/**
 * user_info()
 *
 * @param mixed $data
 * @return
 */
function user_info($data, $array_field_config, $custom_fields, $error)
{
    global $module_info, $module_file, $global_config, $lang_global, $lang_module, $module_name;
    $groups_list = nv_groups_list_pub();
    $xtpl = new XTemplate('info.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
    $xtpl->assign('EDITINFO_FORM', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=editinfo');
    $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('NV_LANG_INTERFACE', NV_LANG_INTERFACE);
    $xtpl->assign('LANG', $lang_module);
    if (!empty($error)) {
        $xtpl->assign('ERROR', $error);
        $xtpl->parse('main.error');
    }
    $xtpl->assign('URL_HREF', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=');
    $xtpl->assign('URL_MODULE', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name);
    if (defined('NV_OPENID_ALLOWED')) {
        $xtpl->parse('main.allowopenid');
    }
    if (!empty($groups_list) and $global_config['allowuserpublic'] == 1) {
        $xtpl->parse('main.regroups');
    }
    $xtpl->assign('DATA', $data);
    if ($data['allowloginchange']) {
        $xtpl->assign('NICK_MAXLENGTH', NV_UNICKMAX);
        $xtpl->parse('main.username_change');
    } else {
        $xtpl->parse('main.username_no_change');
    }
    if ($data['allowmailchange']) {
        $xtpl->parse('main.email_change');
    } else {
        $xtpl->parse('main.email_no_change');
    }
    foreach ($data['gender_array'] as $gender) {
        $xtpl->assign('GENDER', $gender);
        $xtpl->parse('main.gender_option');
    }
    // Parse photo
    if (!empty($data['photo'])) {
        $xtpl->parse('main.photo');
    } else {
        $xtpl->parse('main.add_photo');
    }
    $xtpl->parse('main.name_show_' . $global_config['name_show']);
    // Parse custom fields
    if (!empty($array_field_config)) {
        $a = 0;
        $userid = 0;
        foreach ($array_field_config as $row) {
            if ($row['show_register'] and $userid == 0 or $userid > 0) {
                $row['tbodyclass'] = $a % 2 ? ' class="second"' : '';
                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.field.loop.required');
                }
                if ($row['field_type'] == 'textbox' or $row['field_type'] == 'number') {
                    $xtpl->parse('main.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.field.loop.date');
                } elseif ($row['field_type'] == 'textarea') {
                    $row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
                    $xtpl->assign('FIELD', $row);
                    $xtpl->parse('main.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.field.loop.editor');
                    } else {
                        $row['class'] = '';
                        $xtpl->assign('FIELD', $row);
                        $xtpl->parse('main.field.loop.textarea');
//.........这里部分代码省略.........
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:101,代码来源:theme.php


示例8: array

            } else {
                $module_config[$c_module][$c_config_name] = $c_config_value;
            }
        }
    }
}
$theme_array = array();
$theme_array_file = nv_scandir(NV_ROOTDIR . "/themes", $global_config['check_theme']);
$sql = "SELECT DISTINCT `theme` FROM `" . NV_PREFIXLANG . "_modthemes`  WHERE `func_id`=0";
$result = $db->sql_query($sql);
while (list($theme) = $db->sql_fetchrow($result)) {
    if (in_array($theme, $theme_array_file)) {
        $theme_array[] = $theme;
    }
}
$global_config['disable_site_content'] = nv_br2nl($global_config['disable_site_content']);
// dung de lay data tu CSDL
$global_config['disable_site_content'] = nv_htmlspecialchars($global_config['disable_site_content']);
$value_setting[] = array("sitename" => $global_config['site_name'], "site_logo" => $global_config['site_logo'], "description" => $global_config['site_description'], "disable_content" => $global_config['disable_site_content']);
$module_array = array();
$sql = "SELECT title, custom_title FROM `" . NV_MODULES_TABLE . "` WHERE `act`=1 ORDER BY `weight` ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    $module_array[] = $row;
}
$xtpl = new XTemplate("main.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file . "");
$xtpl->assign('LANG', $lang_module);
foreach ($value_setting as $value_setting_i) {
    $xtpl->assign('VALUE', $value_setting_i);
}
foreach ($theme_array as $folder) {
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:main.php


示例9: nv_show_cat_list

            } else {
                $error = $lang_module['errorsave'];
            }
            $db->sql_freeresult();
        }
    }
}
global $array_cat, $numcat;
$contents = "<div id=\"module_show_list\">";
$contents .= nv_show_cat_list($array_cat, $numcat);
$contents .= "</div><br>\n";
$catid = isset($_GET['catid']) ? intval($_GET['catid']) : 0;
if ($catid > 0) {
    list($catid, $parentid, $title, $catimage, $alias, $description, $keywords) = $db->sql_fetchrow($db->sql_query("SELECT `catid`, `parentid`, `title`, `catimage`, `alias`, `description`, `keywords`  FROM `" . NV_PREFIXLANG . "_" . $module_data . "_cat` where `catid`=" . $catid . ""));
    $caption = $lang_module['edit_cat'];
    $description = nv_br2nl($description);
} else {
    $catimage = '';
    $caption = $lang_module['add_cat'];
    $parentid = 0;
}
$description = nv_htmlspecialchars($description);
if ($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\" method=\"post\">";
$contents .= "<input type=\"hidden\" name =\"" . NV_NAME_VARIABLE . "\"value=\"" . $module_name . "\" />";
$contents .= "<input type=\"hidden\" name =\"" . NV_OP_VARIABLE . "\"value=\"" . $op . "\" />";
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:cat.php


示例10: redriect

            } else {
                $url = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
                $msg1 = $lang_module['content_saveok'];
                $msg2 = $lang_module['content_main'] . ' ' . $module_info['custom_title'];
                redriect($msg1, $msg2, $url, $module_data . '_bodyhtml');
            }
        }
    } else {
        $url = 'javascript: history.go(-1)';
        $msg1 = implode('<br />', $error);
        $msg2 = $lang_module['content_back'];
        redriect($msg1, $msg2, $url, $module_data . '_bodyhtml', 'back');
    }
    $id_block_content = $id_block_content_post;
}
$rowcontent['hometext'] = nv_htmlspecialchars(nv_br2nl($rowcontent['hometext']));
$rowcontent['bodyhtml'] = htmlspecialchars(nv_editor_br2nl($rowcontent['bodyhtml']));
if (!empty($rowcontent['homeimgfile']) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/img/' . $rowcontent['homeimgfile'])) {
    $rowcontent['homeimgfile'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/img/' . $rowcontent['homeimgfile'];
}
if (!empty($rowcontent['vid_path']) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/vid/' . $rowcontent['vid_path'])) {
    $rowcontent['vid_path'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/vid/' . $rowcontent['vid_path'];
}
$array_catid_in_row = explode(',', $rowcontent['listcatid']);
$sql = 'SELECT sourceid, title FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources ORDER BY weight ASC';
$result = $db->query($sql);
$array_source_module = array();
$array_source_module[0] = $lang_module['sources_sl'];
while (list($sourceid_i, $title_i) = $result->fetch(3)) {
    $array_source_module[$sourceid_i] = $title_i;
}
开发者ID:webvangvn,项目名称:nv4_module_videos,代码行数:31,代码来源:content.php


示例11: nv_del_moduleCache

                 $fileimage = NV_UPLOADS_DIR . $row['fileimage'];
                 if (file_exists(NV_ROOTDIR . '/' . $fileimage)) {
                     @nv_deletefile(NV_ROOTDIR . '/' . $fileimage);
                 }
             }
             $db->query('DELETE FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tmp WHERE id=' . $id);
             nv_del_moduleCache($module_name);
             Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=filequeue');
             exit;
         }
     }
 } else {
     $array['catid'] = (int) $row['catid'];
     $array['title'] = $row['title'];
     $array['description'] = nv_editor_br2nl($row['description']);
     $array['introtext'] = nv_br2nl($row['introtext']);
     $array['user_name'] = $row['user_name'];
     $array['author_name'] = $row['author_name'];
     $array['author_email'] = $row['author_email'];
     $array['author_url'] = $row['author_url'];
     $array['fileupload'] = $row['fileupload'];
     $array['fileupload2'] = array();
     $array['linkdirect'] = $row['linkdirect'];
     $array['version'] = $row['version'];
     $array['filesize'] = (int) $row['filesize'];
     $array['fileimage'] = $row['fileimage'];
     $array['fileimage2'] = '';
     $array['copyright'] = $row['copyright'];
     $array['groups_view'] = $array['groups_download'] = '6';
     $array['groups_comment'] = $module_config[$module_name]['setcomm'];
     $array['fileupload'] = !empty($array['fileupload']) ? explode('[NV]', $array['fileupload']) : array();
开发者ID:ThinhNguyenVB,项目名称:module-download,代码行数:31,代码来源:filequeue.php


示例12: elseif

    }
} elseif (empty($id)) {
    $row['image'] = '';
    $row['imagealt'] = '';
    $row['imageposition'] = 0;
    $row['layout_func'] = '';
    $row['description'] = '';
    $row['bodytext'] = '';
    $row['activecomm'] = $module_config[$module_name]['setcomm'];
    $row['socialbutton'] = 1;
    $row['gid'] = 0;
}
if (defined('NV_EDITOR')) {
    require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
}
$row['description'] = nv_htmlspecialchars(nv_br2nl($row['description']));
$row['bodytext'] = htmlspecialchars(nv_editor_br2nl($row['bodytext']));
if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
    $row['bodytext'] = nv_aleditor('bodytext', '100%', '300px', $row['bodytext']);
} else {
    $row['bodytext'] = '<textarea style="width:100%;height:300px" name="bodytext">' . $row['bodytext'] . '</textarea>';
}
if (!empty($row['image']) and is_file(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/' . $row['image'])) {
    $row['image'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $row['image'];
}
$lang_global['title_suggest_max'] = sprintf($lang_global['length_suggest_max'], 65);
$lang_global['description_suggest_max'] = sprintf($lang_global['length_suggest_max'], 160);
$xtpl = new XTemplate('content.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', $action);
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:content.php


示例13: nv_editor_br2nl

/**
 * nv_editor_br2nl()
 *
 * @param mixed $text
 * @return
 */
function nv_editor_br2nl($text)
{
    if (empty($text)) {
        return '';
    }
    if (defined('NV_EDITOR')) {
        return $text;
    }
    return nv_br2nl($text);
}
开发者ID:nukeviet,项目名称:nukeviet,代码行数:16,代码来源:functions.php


示例14: nv_update_keywords

             if (!$db->sql_query_insert_id($sql)) {
                 $is_error = true;
                 $error = $lang_module['faq_error_notResult2'];
             } else {
                 nv_update_keywords($array['catid']);
                 Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name);
                 exit;
             }
         }
     }
 } else {
     if (defined('IS_EDIT')) {
         $array['catid'] = (int) $row['catid'];
         $array['title'] = $row['title'];
         $array['answer'] = nv_editor_br2nl($row['answer']);
         $array['question'] = nv_br2nl($row['question']);
     } else {
         $array['catid'] = 0;
         $array['title'] = $array['answer'] = $array['question'] = "";
     }
 }
 if (!empty($array['answer'])) {
     $array['answer'] = nv_htmlspecialchars($array['answer']);
 }
 if (!empty($array['question'])) {
     $array['question'] = nv_htmlspecialchars($array['question']);
 }
 $listcats = nv_listcats($array['catid']);
 if (empty($listcats)) {
     Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=cat&add=1");
     exit;
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:main.php


示例15: user_info


//.........这里部分代码省略.........
        $a = 0;
        $userid = 0;
        foreach ($array_field_config as $row) {
            $row['tbodyclass'] = $a % 2 ? ' class="second"' : '';
            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.tab_edit_others.loop.required');
            }
            if ($row['field_type'] == 'textbox' or $row['field_type'] == 'number') {
                $xtpl->parse('main.tab_edit_others.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.tab_edit_others.loop.date');
            } elseif ($row['field_type'] == 'textarea') {
                $row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
                $xtpl->assign('FIELD', $row);
                $xtpl->parse('main.tab_edit_others.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'], 'Basic');
                    $xtpl->assign('EDITOR', $edits);
                    $xtpl->parse('main.tab_edit_others.loop.editor');
                } else {
                    $row['class'] = '';
                    $xtpl->assign('FIELD', $row);
                    $xtpl->parse('main.tab_edit_others.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.tab_edit_others.loop.select.loop');
                }
                $xtpl->parse('main.tab_edit_others.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.tab_edit_others.loop.radio.loop');
                }
                $xtpl->parse('main.tab_edit_others.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));
开发者ID:hongoctrien,项目名称:nukeviet,代码行数:67,代码来源:theme.php


示例16: nv_info_die

// Goi js
$BL->callFrameWorks('ui.sortable', 'tipsy', 'autosize', 'ui.autocomplete', 'ui.datepicker', 'shadowbox');
$page_title = $BL->lang('blogManager');
// Lay va khoi tao cac bien
$error = "";
$complete = false;
$id = $nv_Request->get_int('id', 'get, post', 0);
// Xu ly
if ($id) {
    $sql = "SELECT * FROM " . $BL->table_prefix . "_rows WHERE id=" . $id;
    $result = $db->query($sql);
    if ($result->rowCount() != 1) {
        nv_info_die($BL->glang('error_404_title'), $BL->glang('error_404_title'), $BL->glang('error_404_content'));
    }
    $row = $result->fetch();
    $array_old = $array = array("postid" => (int) $row['postid'], "postgoogleid" => $row['postgoogleid'], "sitetitle" => $row['sitetitle'], "title" => $row['title'], "alias" => $row['alias'], "keywords" => $row['keywords'], "images" => $row['images'], "mediatype" => (int) $row['mediatype'], "mediaheight" => (int) $row['mediaheight'], "mediavalue" => $row['mediavalue'], "hometext" => nv_br2nl($row['hometext']), "bodytext" => $row['bodytext'], "bodyhtml" => '', "posttype" => (int) $row['posttype'], "fullpage" => (int) $row['fullpage'], "inhome" => (int) $row['inhome'], "catids" => $BL->string2array($row['catids']), "tagids" => $BL->string2array($row['tagids']), "numwords" => (int) $row['numwords'], "pubtime" => (int) $row['pubtime'], "pubtime_h" => date("G", $row['pubtime']), "pubtime_m" => (int) date("i", $row['pubtime']), "exptime" => (int) $row['exptime'], "exptime_h" => $row['exptime'] ? date("G", $row['exptime']) : 0, "exptime_m" => $row['exptime'] ? (int) date("i", $row['exptime']) : 0, "expmode" => (int) $row['expmode'], "status" => (int) $row['status']);
    $sql = "SELECT * FROM " . $BL->table_prefix . "_data_" . ceil($id / 4000) . " WHERE id=" . $id;
    $result = $db->query($sql);
    if ($result->rowCount()) {
        $row = $result->fetch();
        $array_old['bodyhtml'] = $array['bodyhtml'] = $row['bodyhtml'];
    }
    $form_action = NV_BASE_ADMINURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=" . $op . "&amp;id=" . $id;
    $table_caption = $BL->lang('blogEdit');
    // Gui email den cac email dang ky nhan tin
    $newsletters = 0;
    $isAutoKeywords = 0;
} else {
    $form_action = NV_BASE_ADMINURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=" . $op;
    $table_caption = $BL->lang('blogAdd');
    $array = array("postid" => $admin_info['userid'], "postgoogleid" => $BL->setting['sysGoogleAuthor'], "sitetitle" => '', "title" => '', "alias" => '', "keywords" => '', "images" => '', "mediatype" => $BL->setting['initMediaType'], "mediaheight" => $BL->setting['initMediaHeight'], "mediavalue" => '', "hometext" => '', "bodytext" => '', "bodyhtml" => '', "posttype" => $BL->setting['initPostType'], "fullpage" => 0, "inhome" => 1, "catids" => array(), "tagids" => array(), "numwords" => 0, "pubtime" => NV_CURRENTTIME, "pubtime_h" => date("G", NV_CURRENTTIME), "pubtime_m" => (int) date("i", NV_CURRENTTIME), "exptime" => 0, "exptime_h" => 0, "exptime_m" => 0, "expmode" => $BL->setting['initPostExp'], "status" => -2);
开发者ID:hoangvtien,项目名称:blog,代码行数:31,代码来源:blog-content.php


示例17: array

$sql = $db->sql();
$sth = $db->prepare($sql);
if (strpos($sql, ':content')) {
    $sth->bindValue(':content', '%' . $from['q'] . '%', PDO::PARAM_STR);
}
if (strpos($sql, ':post_name')) {
    $sth->bindValue(':post_name', '%' . $from['q'] . '%', PDO::PARAM_STR);
}
if (strpos($sql, ':post_email')) {
    $sth->bindValue(':post_email', '%' . $from['q'] . '%', PDO::PARAM_STR);
}
$sth->execute();
$array = array();
while (list($cid, $module, $area, $id, $content, $userid, $post_name, $email, $status) = $sth->fetch(3)) {
    if ($userid > 0) {
        $email = '<a href="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=users&amp;' . NV_OP_VARIABLE . '=edit&amp;userid=' . $userid . '"> ' . $email . '</a>';
    }
    $content = nv_br2nl($content);
    $row = array('cid' => $cid, 'post_name' => $post_name, 'email' => $email, 'title' => nv_clean60($content, 255), 'content' => $content, 'module' => $module, 'link' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module . '&amp;' . NV_OP_VARIABLE . '=view&amp;area=' . $area . '&amp;id=' . $id, 'active' => $status ? 'checked="checked"' : '', 'status' => $status == 1 ? 'check' : 'circle-o', 'linkedit' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=edit&amp;cid=' . $cid, 'linkdelete' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=del&amp;list=' . $cid);
    $xtpl->assign('ROW', $row);
    $xtpl->parse('main.loop');
}
if (!empty($generate_page)) {
    $xtpl->assign('GENERATE_PAGE', $generate_page);
    $xtpl->parse('main.generate_page');
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:main.php


示例18: defined

    $value .= $row_bpn['width'] . "x" . $row_bpn['height'] . "px";
    $value .= ")";
    $sel = $row['xbanner'] == $row_bpn['id'] ? ' selected' : '';
    $contents .= "<option value=\"" . $row_bpn['id'] . "\" " . $sel . ">" . $value . "</option>\n";
}
$contents .= "</select></td>\n";
$contents .= "</tr>\n";
$contents .= "</tbody>\n";
$showstype = $row['type'] == 'html' ? "" : " style='display:none' ";
$contents .= "<tbody " . $showstype . " id='html'>\n";
$contents .= "<tr>\n";
$contents .= "<td colspan='2'>" . $lang_module['block_content'] . ":<br />\n";
if (defined('NV_EDITOR')) {
    require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
}
$row['xhtml'] = defined('NV_EDITOR') ? nv_editor_br2nl($row['xhtml']) : nv_br2nl($row['xhtml']);
$row['xhtml'] = nv_htmlspecialchars($row['xhtml']);
if (defined('NV_EDITOR') and function_exists('nv_aleditor')) {
    $contents .= nv_aleditor("htmlcontent", '700px', '150px', $row['xhtml']);
} else {
    $contents .= "<textarea style=\"width: 700px\" name=\"htmlcontent\" id=\"htmlcontent\" cols=\"20\" rows=\"8\">" . $row['xhtml'] . "</textarea>";
}
$contents .= "</td>\n";
$contents .= "</tr>\n";
$contents .= "</tbody>\n";
$showstype = $row['type'] == 'rss' ? "" : " style='display:none' ";
$contents .= "<tbody " . $showstype . " id='rss'>\n";
$contents .= "<tr>\n";
$contents .= "<td>" . $lang_module['block_rss_url'] . ":</td>\n";
$contents .= "<td><input name=\"xrss\" type=\"text\" value=\"" . $row['xrss'] . "\" style=\"width:500px\"/></td>\n";
$contents .= "</tr>\n";
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:31,代码来源:front_add.php


示例19: str_replace

                }
                $file_name = str_replace(NV_ROOTDIR . "/", "", $upload_info['name']);
                $sql = "UPDATE `" . NV_USERS_GLOBALTABLE . "` SET `photo`=" . $db->dbescape($file_name) . " WHERE `userid`=" . $userid;
                $db->sql_query($sql);
            }
        }
        Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name);
        exit;
    }
} else {
    $_user = $row;
    $_user['password1'] = $_user['pa 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP nv_capcha_txt函数代码示例发布时间:2022-05-15
下一篇:
PHP nv_base64_encode函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap